Class PhysicsCable
Represents a cable that is simulated by the physics system.
Inherited Members
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
sistent("Cable")]
public class PhysicsCable : GraphicComponent, IHasTransform, IHasFrames, IAttachableChild, ISupportCopy, IGfxObject
Remarks
Only available in 64-bit build.
Constructors
PhysicsCable(PimDocument)
Declaration
protected PhysicsCable(PimDocument doc)
Parameters
Type | Name | Description |
---|---|---|
RobotStudio.API.Persistence.PimDocument | doc |
PhysicsCable(IEnumerable<PhysicsCableControlPoint>, Double, Double)
Creates a new PhysicsCable.
Declaration
public PhysicsCable(IEnumerable<PhysicsCableControlPoint> initialControlPoints, double radius, double segmentLength = 0.1)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<PhysicsCableControlPoint> | initialControlPoints | A list of PhysicsCableControlPoints through which the cable is initially routed. At least two are required. |
Double | radius | Radius of the cable. |
Double | segmentLength | Approximate length of the discretized cable segments. |
Remarks
The length of the cable will be determined by the control points. A smaller segment length will mean more accurate simulation but higher CPU usage. Note that the cable will not be segmented and fully defined until the Cable object has been added to the Station.
PhysicsCable(IEnumerable<PhysicsCableControlPoint>, Double, Double, Double)
Creates a new PhysicsCable.
Declaration
public PhysicsCable(IEnumerable<PhysicsCableControlPoint> initialControlPoints, double radius, double segmentLength, double desiredLength = 0)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<PhysicsCableControlPoint> | initialControlPoints | A list of PhysicsCableControlPoints through which the cable is initially routed. At least two are required. |
Double | radius | Radius of the cable. |
Double | segmentLength | Approximate length of the discretized cable segments. |
Double | desiredLength | Desired length of the cable, if longer than the total distance between the control points. |
Remarks
A smaller segment length will mean more accurate simulation but higher CPU usage. Note that the cable will not be segmented and fully defined until the Cable object has been added to the Station.
Properties
Color
Gets or sets the color of the cable.
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
Color |
DesiredLength
Gets the desired length of the cable as specified in the constructor.
Declaration
public double DesiredLength { get; }
Property Value
Type | Description |
---|---|
Double |
Length
Gets the actual (current) length of the cable.
Declaration
public double Length { get; }
Property Value
Type | Description |
---|---|
Double |
Radius
Gets or sets the radius of the cable.
Declaration
public double Radius { get; set; }
Property Value
Type | Description |
---|---|
Double |
Resolution
Gets the number of discretized cable segments per unit length (meter).
Declaration
public double Resolution { get; }
Property Value
Type | Description |
---|---|
Double |
RestLength
Returns the length of the cable at rest (when not being stretched or compressed)
Declaration
public double RestLength { get; }
Property Value
Type | Description |
---|---|
Double |
Remarks
Note that the returned value will not be valid until the Cable has been added to the Station.
SegmentLength
Gets the approximate length of each discretized cable segment.
Declaration
public double SegmentLength { get; }
Property Value
Type | Description |
---|---|
Double |
Segments
ABB internal use
Declaration
public ReadOnlyCollection<PhysicsCableSegment> Segments { get; }
Property Value
Type | Description |
---|---|
ReadOnlyCollection<RobotStudio.API.Internal.PhysicsCableSegment> |
Methods
AdjustLength(Double, Double)
Adjusts the length of the cable while preserving its routing.
Declaration
public void AdjustLength(double delta, double segLength)
Parameters
Type | Name | Description |
---|---|---|
Double | delta | The amount (in meters) to change the length. |
Double | segLength | Approximate length of the discretized cable segments. |
AfterLoad(PimDocument)
Declaration
protected override void AfterLoad(PimDocument doc)
Parameters
Type | Name | Description |
---|---|---|
RobotStudio.API.Persistence.PimDocument | doc |
Overrides
BeforeSave(PimDocument)
Declaration
protected override void BeforeSave(PimDocument doc)
Parameters
Type | Name | Description |
---|---|---|
RobotStudio.API.Persistence.PimDocument | doc |
Overrides
CanAdjustLength()
Returns if the cable length can be adjusted.
Declaration
public bool CanAdjustLength()
Returns
Type | Description |
---|---|
Boolean |
GetPhysicsMaterial()
Gets the material properties of the cable.
Declaration
public PhysicsMaterial GetPhysicsMaterial()
Returns
Type | Description |
---|---|
PhysicsMaterial |
OnCreatingObject()
Declaration
protected override void OnCreatingObject()
Overrides
OnUndoRedo()
Declaration
protected override void OnUndoRedo()
Overrides
SetPhysicsMaterial(PhysicsMaterial)
Sets the material properties of the cable.
Declaration
public void SetPhysicsMaterial(PhysicsMaterial material)
Parameters
Type | Name | Description |
---|---|---|
PhysicsMaterial | material |