Class CurveDrive
- Namespace
- CADability
- Assembly
- CADability.dll
Describes a movement along a curve (which may be any path or simple curve like a line)
public class CurveDrive : PropertyEntryImpl, IPropertyEntry, IShowProperty, IDrive, ISerializable, ICommandHandler, IDeserializationCallback, IJsonSerialize, IJsonSerializeDone
- Inheritance
-
CurveDrive
- Implements
- Inherited Members
Constructors
CurveDrive(ICurve, double)
Defines a CurveDrive providing the curve for the movement. The objects being moved are specified by MovedObjects. The currentPosition describes the position of the object as it is defined in the model relative to the startpoint of the curve. It must be between 0.0 and the length of the curve.
public CurveDrive(ICurve along, double currentPosition)
Parameters
CurveDrive(SerializationInfo, StreamingContext)
protected CurveDrive(SerializationInfo info, StreamingContext context)
Parameters
infoSerializationInfocontextStreamingContext
Properties
ContextMenu
Must be overridden, when Flags contains PropertyEntryType.ContextMenu. See ContextMenu
public override MenuWithHandler[] ContextMenu { get; }
Property Value
Curve
public ICurve Curve { get; }
Property Value
Flags
Implementation of Flags: the derived class states what the entry is and what the user can do with it. The flags must match the overridden members, e.g. HasSubEntries requires SubItems, ValueEditable requires Value and EndEdit(bool, bool, string), DropDown requires GetDropDownList() and ListBoxSelected(int).
public override PropertyEntryType Flags { get; }
Property Value
LabelText
An explicit label text. When set (not null) it is shown instead of the text from the StringTable; use it for entries whose label is not a fixed resource string, e.g. the name of an item. Call Refresh() after changing it while the entry is displayed.
public override string LabelText { get; set; }
Property Value
MoveAlong
public ICurve MoveAlong { get; set; }
Property Value
NullPosition
public double NullPosition { get; set; }
Property Value
SubItems
Must be overridden, when Flags contains PropertyEntryType.HasSubEntries. See SubItems
public override IPropertyEntry[] SubItems { get; }
Property Value
Tangential
Gets or sets the tangential movement property. If true, the orientation of the driven objects will follow the tangent of the curve, if false, the orientation of the driven objects will stay fixed in space.
public bool Tangential { get; set; }
Property Value
Methods
EndEdit(bool, bool, string)
Must be overridden when Flags contains PropertyEntryType.ValueEditable. See EndEdit(bool, bool, string)
public override void EndEdit(bool aborted, bool modified, string newValue)
Parameters
GetObjectData(IJsonWriteData)
public void GetObjectData(IJsonWriteData data)
Parameters
dataIJsonWriteData
Refresh()
Asks the property page to redisplay this entry (see Refresh(IPropertyEntry)); call it after the label, the value or the sub entries changed. Does nothing while the entry is not shown.
public override void Refresh()
RuledSurface(CurveDrive, CurveDrive)
Returns a Shell composed of connected faces that describes the ruled surface which is described by a line synchronously connecting the two CurveDrives.
public static Shell RuledSurface(CurveDrive wire1, CurveDrive wire2)
Parameters
wire1CurveDriveFirst wire
wire2CurveDriveSecond wire
Returns
- Shell
Shell describing the ruled surface
SetObjectData(IJsonReadData)
public void SetObjectData(IJsonReadData data)
Parameters
dataIJsonReadData