Class ParametricsAngleAction
- Namespace
- CADability.Actions
- Assembly
- CADability.dll
Action to modify the angle between faces. The angle between two faces is determined depending on the surfaces: For two planes, the axis is the intersection line, the angle is the angle between the normals. For objects with an axis (cylinder cone, torus?) the axis is the cross product of the two directions, or the shortest line between these axis. When parallel, it is the normal of the common plane somewhere at the extent of the faces. For axis object and plane this is ambiguous, when the axis is perpendicular to the plane
public class ParametricsAngleAction : ConstructAction, ICommandHandler, IPropertyEntry
- Inheritance
-
ParametricsAngleAction
- Implements
- Inherited Members
Constructors
ParametricsAngleAction(Face, Face, Axis, GeoVector, GeoVector, Edge, IFrame)
public ParametricsAngleAction(Face faceToRotate, Face referenceFace, Axis axis, GeoVector fromHere, GeoVector toHere, Edge axisEdge, IFrame frame)
Parameters
faceToRotateFacereferenceFaceFaceaxisAxisfromHereGeoVectortoHereGeoVectoraxisEdgeEdgeframeIFrame
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
GetRotationAxis(Face, Face, Axis, Edge)
Calculates a rotation axis between the face toRotate and the referenceFace. The returned axis will be
close to the pickBeam. The returned vectors fromHere and toHere are the current position of the enclosing angle.
If axisEdge is provided, this edge is the axis and the location is at the center of this edge
public static (Axis axis, GeoVector fromHere, GeoVector toHere) GetRotationAxis(Face toRotate, Face referenceFace, Axis pickBeam, Edge axisEdge = null)
Parameters
toRotateFacereferenceFaceFacepickBeamAxisaxisEdgeEdgeoptional edge whose curve is a line to be used as the rotation axis, located at the center of the edge. If null, the common linear edge of the two faces closest to
pickBeamis used
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()