Class RotateObjects
- Namespace
- CADability.Actions
- Assembly
- CADability.dll
Action which rotates a list of objects (typically the current selection). The rotation center is the reference point, by default the center of the extent of the objects, changeable via a hotspot; the axis is the normal of the active drawing plane unless the user picks a line as the axis. The angle is given numerically, by the mouse (direction from the reference point), by a start and an end point, or by a source and a target plane (the objects are rotated so that the source plane is mapped onto the target plane); an additional offset of 0, 90, 180 or 270 degrees can be chosen. The objects are modified in place or, if "copy" is selected or Shift is held, rotated copies are added to the model. Started with the menu id "RotateObjects".
public class RotateObjects : ConstructAction, ICommandHandler, IPropertyEntry
- Inheritance
-
RotateObjects
- Implements
- Inherited Members
Constructors
RotateObjects(GeoObjectList)
public RotateObjects(GeoObjectList list)
Parameters
listGeoObjectList
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()
OnUpdateCommand(string, CommandState)
Override if you also override OnCommand(string) to manipulate the appearance of the corresponding menu item or the state of the toolbar button. The default implementation checks whether the MenuId from the parameter corresponds to the menuId member variable and checks the item if appropriate
public override bool OnUpdateCommand(string MenuId, CommandState CommandState)
Parameters
MenuIdstringmenu id the command state is queried for
CommandStateCommandStatethe command state to manipulate