Table of Contents

Class SplitSolidByPlane

Namespace
CADability.Actions
Assembly
CADability.dll

Interactive splitting of a solid by a plane: the user defines the plane (initially the drawing plane) with a ConstructAction.PlaneInput, which is shown as a feedback rectangle, and when the action is finished the solid is replaced in the model by the solids on both sides of the plane (see SplitByPlane(Shell, Plane)). Created with the solid to split and started by its context menu command "MenuId.SplitByPlane"; its id is "Constr.SplitSolidByPlane".

public class SplitSolidByPlane : ConstructAction, ICommandHandler, IPropertyEntry
Inheritance
SplitSolidByPlane
Implements
Inherited Members

Constructors

SplitSolidByPlane(Solid)

public SplitSolidByPlane(Solid toSplit)

Parameters

toSplit Solid

Methods

GetID()

Must be implemented by derived class. Returns an identification string. All CADability actions return the unique strings like "Draw.Line.TwoPoints" or "Zoom"

public override string GetID()

Returns

string

the identification of the action

OnActivate(Action, bool)

Implements OnActivate(Action, bool). If you override this method don't forget to call the base implementation.

public override void OnActivate(Action OldActiveAction, bool SettingAction)

Parameters

OldActiveAction Action
SettingAction bool

OnDone()

Called, when the ConstructAction is done, i.e. all non-optional inputs have been fixed. The default implementation adds the active object (if it exists and HasValidData() returns true) to the active model and removes this action. Override this method if you need a different behaviour.

public override void OnDone()

OnInactivate(Action, bool)

Implements OnInactivate(Action, bool). If you override this method don't forget to call the bas implementation.

public override void OnInactivate(Action NewActiveAction, bool RemovingAction)

Parameters

NewActiveAction Action

the action that will become active

RemovingAction bool

true: if called because the action is removed, false: if called when a new action is set on top of this action

OnRemoveAction()

Implements OnRemoveAction(). If you override this method don't forget to call the bas implementation.

public override void OnRemoveAction()

OnSetAction()

Implements OnSetAction(). If you override this method don't forget to call the base implementation.

public override void OnSetAction()