Class ParametricsDistanceAction
- Namespace
- CADability.Actions
- Assembly
- CADability.dll
Interactive parametric modification of a solid: the distance between two sets of faces of a shell is changed by moving the faces of one set, or both sets symmetrically, along the direction of the distance, e.g. to change the distance of a hole from a side face or the position of the axis of a cylindrical face. The faces, the direction and the current distance are determined when the action is created from the context menu of the selected faces ("MenuId.FaceDistance", "MenuId.AxisPosition"); the user enters the new distance, may add more faces to move in either direction and may add a named ParametricDistanceProperty to the shell to keep the distance adjustable. When finished, the solid is replaced in the model by the modified one. Its id is "Constr.Parametrics.DistanceTo".
public class ParametricsDistanceAction : ConstructAction, ICommandHandler, IPropertyEntry
- Inheritance
-
ParametricsDistanceAction
- Implements
- Inherited Members
Constructors
ParametricsDistanceAction(IEnumerable<Face>, Line, IFrame)
public ParametricsDistanceAction(IEnumerable<Face> facesToMove, Line axis, IFrame frame)
Parameters
facesToMoveIEnumerable<Face>axisLineframeIFrame
ParametricsDistanceAction(IEnumerable<Face>, IEnumerable<Face>, GeoPoint, GeoPoint, IFrame)
public ParametricsDistanceAction(IEnumerable<Face> part1, IEnumerable<Face> part2, GeoPoint point1, GeoPoint point2, IFrame frame)
Parameters
part1IEnumerable<Face>part2IEnumerable<Face>point1GeoPointpoint2GeoPointframeIFrame
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
OnCommand(string)
Handles a few context menu commands. Don't forget to call the base implementation if you override this method. See ICommandHandler.
public override bool OnCommand(string MenuId)
Parameters
MenuIdstring
Returns
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()
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()