Class PhysicsConstraint
Controls how two physics enabled GraphicComponents can move in relation to eachother.
Inherited Members
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
sistent("PhysicsConstraint")]
public class PhysicsConstraint : ProjectObject
Remarks
Only supported in 64-bit build.
Constructors
PhysicsConstraint(PhysicsConstraintType, GraphicComponent, GraphicComponent, Matrix4, Matrix4)
Creates a physics constraint (joint) of the specified type.
Declaration
public PhysicsConstraint(PhysicsConstraintType type, GraphicComponent firstComponent, GraphicComponent secondComponent, Matrix4 firstFrame, Matrix4 secondFrame)
Parameters
Type | Name | Description |
---|---|---|
PhysicsConstraintType | type | |
GraphicComponent | firstComponent | |
GraphicComponent | secondComponent | |
Matrix4 | firstFrame | |
Matrix4 | secondFrame |
PhysicsConstraint(PhysicsConstraintType, GraphicComponent, GraphicComponent, Ray)
Creates a physics constraint (joint) of the specified type.
Declaration
public PhysicsConstraint(PhysicsConstraintType type, GraphicComponent firstComponent, GraphicComponent secondComponent, Ray axis)
Parameters
Type | Name | Description |
---|---|---|
PhysicsConstraintType | type | |
GraphicComponent | firstComponent | |
GraphicComponent | secondComponent | |
Ray | axis |
PhysicsConstraint(PimDocument)
Declaration
protected PhysicsConstraint(PimDocument doc)
Parameters
Type | Name | Description |
---|---|---|
RobotStudio.API.Persistence.PimDocument | doc |
Properties
ConstraintType
Gets the type of constraint.
Declaration
public PhysicsConstraintType ConstraintType { get; }
Property Value
Type | Description |
---|---|
PhysicsConstraintType |
FirstComponent
Gets the first GraphicComponent of the constraint.
Declaration
public GraphicComponent FirstComponent { get; }
Property Value
Type | Description |
---|---|
GraphicComponent |
NumDof
Gets the number of configurable degrees of freedom (number of limits, springs and motors).
Declaration
public int NumDof { get; }
Property Value
Type | Description |
---|---|
Int32 |
SecondComponent
Gets the second GraphicComponent of the constraint.
Declaration
public GraphicComponent SecondComponent { get; }
Property Value
Type | Description |
---|---|
GraphicComponent |
Methods
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
CopyPropertiesTo(PhysicsConstraint)
Copies all constraint properties to the given target constraint.
Declaration
public void CopyPropertiesTo(PhysicsConstraint target)
Parameters
Type | Name | Description |
---|---|---|
PhysicsConstraint | target |
Remarks
Source and target must be of the same type. Copied properties include motor, spring, limit, friction and elasticity parameters
GetElasticity()
Returns the elasticity along the constrained degrees of freedom
Declaration
public double[] GetElasticity()
Returns
Type | Description |
---|---|
Double[] |
GetFrictionForce(Int32)
Gets the frictional force/torque that is applied to this joint
Declaration
public double GetFrictionForce(int dof = 0)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dof |
Returns
Type | Description |
---|---|
Double |
GetfrictionParameters(Int32)
This method is obsolete and will be removed in a future version.
Declaration
olete("No longer supported")]
public PhysicsFrictionParameters GetfrictionParameters(int dof = 0)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dof |
Returns
Type | Description |
---|---|
PhysicsFrictionParameters |
GetLimitParameters(Int32)
Gets limit parameters for the specified degree of freedom
Declaration
public PhysicsLimitParameters GetLimitParameters(int dof = 0)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dof | Degree of freedom. Must be 0 for a rotational or prismatic constraint, 0 or 1 for a cylindrical constraint. |
Returns
Type | Description |
---|---|
PhysicsLimitParameters |
Remarks
Not supported for ball or lock constraint.
GetMotorDisplayParameters(Int32)
This property is obsolete and will be removed in a future version
Declaration
olete("No longer supported")]
public PhysicsMotorDisplayParameters GetMotorDisplayParameters(int dof = 0)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dof |
Returns
Type | Description |
---|---|
PhysicsMotorDisplayParameters |
GetMotorParameters(Int32)
Gets motor parameters for the specified degree of freedom
Declaration
public PhysicsMotorParameters GetMotorParameters(int dof = 0)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dof | Degree of freedom. Must be 0 for a rotational or prismatic constraint, 0 or 1 for a cylindrical constraint. |
Returns
Type | Description |
---|---|
PhysicsMotorParameters |
Remarks
Not supported for ball or lock constraint.
GetSpringParameters(Int32)
Gets spring parameters for the specified degree of freedom
Declaration
public PhysicsSpringParameters GetSpringParameters(int dof = 0)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dof | Degree of freedom. Must be 0 for a rotational or prismatic constraint, 0 or 1 for a cylindrical constraint. |
Returns
Type | Description |
---|---|
PhysicsSpringParameters | Spring parameters |
Remarks
Not supported for ball or lock constraint.
OnCreatingObject()
Declaration
protected override void OnCreatingObject()
Overrides
OnUndoRedo()
Declaration
protected override void OnUndoRedo()
Overrides
SetElasticity(Double[])
Sets the elasticity along the constrained degrees of freedom
Declaration
public void SetElasticity(double[] values)
Parameters
Type | Name | Description |
---|---|---|
Double[] | values |
SetFrictionForce(Double, Int32)
Sets the frictional force/torque that should applied to this joint
Declaration
public void SetFrictionForce(double force, int dof = 0)
Parameters
Type | Name | Description |
---|---|---|
Double | force | |
Int32 | dof |
SetFrictionParameters(PhysicsFrictionParameters, Int32)
This type is obsolete and will be removed in a future version.
Declaration
olete("No longer supported")]
public void SetFrictionParameters(PhysicsFrictionParameters friction, int dof = 0)
Parameters
Type | Name | Description |
---|---|---|
PhysicsFrictionParameters | friction | |
Int32 | dof |
SetLimitParameters(PhysicsLimitParameters, Int32)
Sets limit parameters for the specified degree of freedom
Declaration
public void SetLimitParameters(PhysicsLimitParameters limit, int dof = 0)
Parameters
Type | Name | Description |
---|---|---|
PhysicsLimitParameters | limit | |
Int32 | dof | Degree of freedom. Must be 0 for a rotational or prismatic constraint, 0 or 1 for a cylindrical constraint. |
Remarks
Not supported for ball or lock constraint.
SetMotorDisplayParameters(PhysicsMotorDisplayParameters, Int32)
This method is obsolete and will be removed in a future version
Declaration
olete("No longer supported")]
public void SetMotorDisplayParameters(PhysicsMotorDisplayParameters motorDisplay, int dof = 0)
Parameters
Type | Name | Description |
---|---|---|
PhysicsMotorDisplayParameters | motorDisplay | |
Int32 | dof |
SetMotorParameters(PhysicsMotorParameters, Int32)
Sets motor parameters for the specified degree of freedom
Declaration
public void SetMotorParameters(PhysicsMotorParameters motor, int dof = 0)
Parameters
Type | Name | Description |
---|---|---|
PhysicsMotorParameters | motor | |
Int32 | dof | Degree of freedom. Must be 0 for a rotational or prismatic constraint, 0 or 1 for a cylindrical constraint. |
Remarks
Not supported for ball or lock constraint.
SetSpringParameters(PhysicsSpringParameters, Int32)
Sets spring parameters for the specified degree of freedom
Declaration
public void SetSpringParameters(PhysicsSpringParameters spring, int dof = 0)
Parameters
Type | Name | Description |
---|---|---|
PhysicsSpringParameters | spring | Spring parameters |
Int32 | dof | Degree of freedom. Must be 0 for a rotational or prismatic constraint, 0 or 1 for a cylindrical constraint. |
Remarks
Not supported for ball or lock constraint.