Class ForceAPI
Last update: 16.07.2025Namespace: VM.API.Pre
Assembly: VM.API.Pre.dll
This class implements APIs for force.
public static class ForceAPI
Inheritance
Extension Methods
LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType), LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType), LinkPropertyItemCache.GetLinkedObjects<T>(object, LinkPropertyType)
Methods
CreateBushing(SubSystemDocument, Obj, Obj, Vector, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity" })]
[MatchTypeObj(new object[] { "baseEntity", typeof(IConnectable), "actionEntity", typeof(IConnectable) })]
public static Obj CreateBushing(this SubSystemDocument subSystemDocument, Obj baseEntity, Obj actionEntity, Vector position, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
baseEntity Obj
The base entity of a bush force.
actionEntity Obj
The action entity of a bush force.
position Vector
The position of a bush force.
name string
The name of a bush force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'baseEntity', 'actionEntity' argument is null.
Will be thrown if the type of 'baseEntity', 'actionEntity' is not
Will be thrown if 'baseEntity' is equal to 'actionEntity'.
CreateBushing(SubSystemDocument, Obj, Obj, Vector, Vector, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity" })]
[MatchTypeObj(new object[] { "baseEntity", typeof(IConnectable), "actionEntity", typeof(IConnectable) })]
[NotZeroMagnitude(new string[] { "direction" })]
public static Obj CreateBushing(this SubSystemDocument subSystemDocument, Obj baseEntity, Obj actionEntity, Vector position, Vector direction, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
baseEntity Obj
The base entity of a bush force.
actionEntity Obj
The action entity of a bush force.
position Vector
The position of a bushr force.
direction Vector
The direction of a bush force.
name string
The name of a bush force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'baseEntity', 'actionEntity' argument is null.
Will be thrown if the type of 'baseEntity', 'actionEntity' is not
Will be thrown if 'baseEntity' is equal to 'actionEntity'.
CreateBushing(SubSystemDocument, Obj, Obj, Vector, OMatrix, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity" })]
[MatchTypeObj(new object[] { "baseEntity", typeof(IConnectable), "actionEntity", typeof(IConnectable) })]
public static Obj CreateBushing(this SubSystemDocument subSystemDocument, Obj baseEntity, Obj actionEntity, Vector position, OMatrix orientation, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
baseEntity Obj
The base entity of a bush force.
actionEntity Obj
The action entity of a bush force.
position Vector
The position of a bush force.
orientation OMatrix
The orientation of a bush force.
name string
The name of a bush force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'baseEntity', 'actionEntity' argument is null.
Will be thrown if the type of 'baseEntity', 'actionEntity' is not
Will be thrown if 'baseEntity' is equal to 'actionEntity'.
Will be thrown if the X, Y, Z Vector magnitudes of 'orientation' are equal to 0.
CreateGeneralBearing(SubSystemDocument, Obj, Obj, Vector, Vector, string)
Create BearingGeneral
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity" })]
[MatchTypeObj(new object[] { "baseEntity", typeof(IConnectable), "actionEntity", typeof(IConnectable) })]
[NotZeroMagnitude(new string[] { "axisZ" })]
public static Obj CreateGeneralBearing(this SubSystemDocument subSystemDocument, Obj baseEntity, Obj actionEntity, Vector position, Vector axisZ, string name = "")
Parameters
subSystemDocument SubSystemDocument
The
baseEntity Obj
The base entity of a bearing general force.
actionEntity Obj
The action entity of a bearing general force.
position Vector
The position of a bearing general force.
axisZ Vector
The Z-Axis of a bearing general force.
name string
The name of a bearing general force.
Returns
the new BearingGeneral object created by this API.
Exceptions
Will be thrown if 'subSystemDocument', 'baseEntity', 'actionEntity' argument is null.
Will be thrown if the magnitude of 'axisZ' is 0 and if the type of 'baseEntity', 'actionEntity' is not
Will be thrown if 'baseEntity' is equal to 'actionEntity'.
CreateLeafSpring(SubSystemDocument, Obj, Obj, Obj, TMatrix, Vector, Vector, string)
Create
[NotNull(new string[] { "subSystemDocument", "transform" })]
[NotNullObj(new string[] { "frontConnectionFrame", "rearConnectionFrame", "axle" })]
[MatchTypeObj(new object[] { "frontConnectionFrame", typeof(IConnectable), "rearConnectionFrame", typeof(IConnectable), "axle", typeof(IConnectable) })]
public static Obj CreateLeafSpring(this SubSystemDocument subSystemDocument, Obj frontConnectionFrame, Obj rearConnectionFrame, Obj axle, TMatrix transform, Vector eyePosition, Vector shackleToFramePosition, string name = "")
Parameters
subSystemDocument SubSystemDocument
The
frontConnectionFrame Obj
The front connection frame of a leaf spring.
rearConnectionFrame Obj
The rear connection frame of a leaf spring.
axle Obj
The axle of a leaf spring.
transform TMatrix
The transform of a leaf spring.
eyePosition Vector
The eye position of a leaf spring.
shackleToFramePosition Vector
The shackle to frame position of a leaf spring.
name string
The name of a leaf spring.
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'transform', 'frontConnectionFrame', 'rearConnectionFrame', 'axle' argument is null.
Will be thrown if the type of 'frontConnectionFrame', 'rearConnectionFrame', 'axle' is not
Will be thrown if 'frontConnectionFrame', 'rearConnectionFrame', 'axle' are same.
Will be thrown if the X, Y, Z Vector magnitudes of 'transform' are equal to 0.
Will be thrown if 'eyePosition' is equal to 'shackleToFramePosition'.
CreateMagnetic(SubSystemDocument, IEnumerable<Obj>)
Create a magnetic.
[NotNull(new string[] { "subSystemDocument", "groups" })]
public static void CreateMagnetic(this SubSystemDocument subSystemDocument, IEnumerable<Obj> groups)
Parameters
subSystemDocument SubSystemDocument
The
groups IEnumerable<Obj>
The groups of a magnetic force.
Exceptions
Will be thrown if 'subSystemDocument', 'groups' is null.
Will be thrown if the type of 'groups' is not
CreateMatrix(SubSystemDocument, Obj, Obj, Vector, Vector, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity" })]
[MatchTypeObj(new object[] { "baseEntity", typeof(IConnectable), "actionEntity", typeof(IConnectable) })]
public static Obj CreateMatrix(this SubSystemDocument subSystemDocument, Obj baseEntity, Obj actionEntity, Vector basePosition, Vector actionPosition, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
baseEntity Obj
The base entity of a matrix force.
actionEntity Obj
The action entity of a matrix force.
basePosition Vector
The base position of a matrix force.
actionPosition Vector
The action position of a matrix force.
name string
The name of a matrix force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'baseEntity', 'actionEntity' argument is null.
Will be thrown if the type of 'baseEntity', 'actionEntity' is not
CreateMatrix(SubSystemDocument, Obj, Obj, Vector, Vector, Obj?, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity" })]
[MatchTypeObj(new object[] { "baseEntity", typeof(IConnectable), "actionEntity", typeof(IConnectable) })]
public static Obj CreateMatrix(this SubSystemDocument subSystemDocument, Obj baseEntity, Obj actionEntity, Vector basePosition, Vector actionPosition, Obj? userSubroutine, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
baseEntity Obj
The base entity of a matrix force.
actionEntity Obj
The action entity of a matrix force.
basePosition Vector
The base position of a matrix force.
actionPosition Vector
The action position of a matrix force.
userSubroutine Obj?
The user subroutine of a matrix force.
name string
The name of a matrix force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'baseEntity', 'actionEntity' argument is null.
Will be thrown if the type of 'baseEntity', 'actionEntity' is not
Will be thrown if 'baseEntity' is equal to 'actionEntity'.
Will be thrown if the type of 'userSubroutine' is equal to
CreateRotationalScalar(SubSystemDocument, Obj, Obj?, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "joint" })]
[MatchTypeObj(new object[] { "joint", typeof(IRScalarComponent) })]
public static Obj CreateRotationalScalar(this SubSystemDocument subSystemDocument, Obj joint, Obj? function = null, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
joint Obj
The joint of a rotational scalar force.
function Obj?
The function of a rotational scalar force.
name string
The name of a rotational scalar force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'joint' argument is null.
Will be thrown if the type of 'joint' is not
Will be thrown if the type of 'function' is not
CreateRotationalScalar(SubSystemDocument, Obj, Obj, Vector, Vector, Obj?, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity" })]
[MatchTypeObj(new object[] { "baseEntity", typeof(IConnectable), "actionEntity", typeof(IConnectable) })]
[NotZeroMagnitude(new string[] { "axisZ" })]
public static Obj CreateRotationalScalar(this SubSystemDocument subSystemDocument, Obj baseEntity, Obj actionEntity, Vector position, Vector axisZ, Obj? function = null, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
baseEntity Obj
The base entity of a rotational scalar force.
actionEntity Obj
The action entity of a rotational scalar force.
position Vector
The position of a rotational scalar force.
axisZ Vector
The Z-Axis of a rotational scalar force.
function Obj?
The function of a rotational scalar force.
name string
The name of a rotational scalar force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'baseEntity', 'actionEntity' argument is null.
Will be thrown if the magnitude of 'axisZ' is 0 and if the type of 'baseEntity', 'actionEntity' is not
Will be thrown if 'baseEntity' is equal to 'actionEntity'.
Will be thrown if the type of 'function' is not
CreateRotationalSpring(SubSystemDocument, Obj, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "joint" })]
[MatchTypeObj(new object[] { "joint", typeof(IRotationalMotionComponent) })]
public static Obj CreateRotationalSpring(this SubSystemDocument subSystemDocument, Obj joint, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
joint Obj
The joint of a rotational spring damper force.
name string
The name of a rotational spring damper force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'joint' argument is null.
Will be thrown if the type of 'joint' is not
CreateSpring(SubSystemDocument, Obj, Obj, Vector, Vector, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity" })]
[MatchTypeObj(new object[] { "baseEntity", typeof(IConnectable), "actionEntity", typeof(IConnectable) })]
public static Obj CreateSpring(this SubSystemDocument subSystemDocument, Obj baseEntity, Obj actionEntity, Vector basePosition, Vector actionPosition, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
baseEntity Obj
The base entity of a translational spring damper force.
actionEntity Obj
The action entity of a translational spring damper force.
basePosition Vector
The base position of a translational spring damper force.
actionPosition Vector
The action position of a translational spring damper force.
name string
The name of a translational spring damper force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'baseEntity', 'actionEntity' argument is null.
Will be thrown if the type of 'baseEntity', 'actionEntity' is not
Will be thrown if 'baseEntity' is equal to 'actionEntity' or if 'basePosition' is equal to 'actionPosition'.
CreateTranslationalScalar(SubSystemDocument, Obj, Obj, Vector, Vector, Obj?, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity" })]
[MatchTypeObj(new object[] { "baseEntity", typeof(IConnectable), "actionEntity", typeof(IConnectable) })]
public static Obj CreateTranslationalScalar(this SubSystemDocument subSystemDocument, Obj baseEntity, Obj actionEntity, Vector basePosition, Vector actionPosition, Obj? function = null, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
baseEntity Obj
The base entity of a translational scalar force.
actionEntity Obj
The action entity of a translational scalar force.
basePosition Vector
The base position of a translational scalar force.
actionPosition Vector
The action position of a translational scalar force.
function Obj?
The function of a translational scalar force.
name string
The name of a translational scalar force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'baseEntity', 'actionEntity' argument is null.
Will be thrown if the type of 'baseEntity', 'actionEntity' is not
Will be thrown if 'baseEntity' is equal to 'actionEntity' or if 'basePosition' is equal to 'actionPosition'.
Will be thrown if the type of 'function' is not
CreateVector(SubSystemDocument, Obj, Obj, Vector, VectorFunctions?, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity" })]
[MatchTypeObj(new object[] { "baseEntity", typeof(IConnectable), "actionEntity", typeof(IConnectable) })]
public static Obj CreateVector(this SubSystemDocument subSystemDocument, Obj baseEntity, Obj actionEntity, Vector position, VectorFunctions? functions = null, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
baseEntity Obj
The base entity of a vector force.
actionEntity Obj
The action entity of a vector force.
position Vector
The position of a vector force.
functions VectorFunctions?
The functions of a vector force.
name string
The name of a vector force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'baseEntity', 'actionEntity' argument is null.
Will be thrown if the type of 'baseEntity', 'actionEntity' is not
CreateVector(SubSystemDocument, Obj, Obj, Vector, Vector, VectorFunctions?, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity" })]
[MatchTypeObj(new object[] { "baseEntity", typeof(IConnectable), "actionEntity", typeof(IConnectable) })]
public static Obj CreateVector(this SubSystemDocument subSystemDocument, Obj baseEntity, Obj actionEntity, Vector basePosition, Vector actionPosition, VectorFunctions? functions = null, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
baseEntity Obj
The base entity of a vector force.
actionEntity Obj
The action entity of a vector force.
basePosition Vector
The base position of a vector force.
actionPosition Vector
The action position of a vector force.
functions VectorFunctions?
The functions of a vector force.
name string
The name of a vector force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'baseEntity', 'actionEntity' argument is null.
Will be thrown if the type of 'baseEntity', 'actionEntity' is not
Will be thrown if 'baseEntity' is equal to 'actionEntity'.
CreateVector(SubSystemDocument, Obj, Obj, Vector, Obj, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity", "userSubroutine" })]
[MatchTypeObj(new object[] { "baseEntity", typeof(IConnectable), "actionEntity", typeof(IConnectable) })]
public static Obj CreateVector(this SubSystemDocument subSystemDocument, Obj baseEntity, Obj actionEntity, Vector position, Obj userSubroutine, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
baseEntity Obj
The base entity of a vector force.
actionEntity Obj
The action entity of a vector force.
position Vector
The position of a vector force.
userSubroutine Obj
The user subroutine of a vector force.
name string
The name of a vector force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'baseEntity', 'actionEntity', 'userSubroutine' argument is null.
Will be thrown if the type of 'baseEntity', 'actionEntity' is not
CreateVector(SubSystemDocument, Obj, Obj, Vector, Vector, Obj, string, SymmetricType)
Create
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity", "userSubroutine" })]
[MatchTypeObj(new object[] { "baseEntity", typeof(IConnectable), "actionEntity", typeof(IConnectable) })]
public static Obj CreateVector(this SubSystemDocument subSystemDocument, Obj baseEntity, Obj actionEntity, Vector basePosition, Vector actionPosition, Obj userSubroutine, string name = "", SymmetricType symmetricType = SymmetricType.None)
Parameters
subSystemDocument SubSystemDocument
The
baseEntity Obj
The base entity of a vector force.
actionEntity Obj
The action entity of a vector force.
basePosition Vector
The base position of a vector force.
actionPosition Vector
The action position of a vector force.
userSubroutine Obj
The user subroutine of a vector force.
name string
The name of a vector force.
symmetricType SymmetricType
The symmetric type of the new
Returns
the new
Exceptions
Will be thrown if 'subSystemDocument', 'baseEntity', 'actionEntity', 'userSubroutine' argument is null.
Will be thrown if the type of 'baseEntity', 'actionEntity' is not
Will be thrown if 'baseEntity' is equal to 'actionEntity'.
Will be thrown if the type of 'userSubroutine' is not
RunLeafSpringSimulation(SubSystemDocument, Obj, bool)
Create a
[NotNull(new string[] { "subSystemDocument", "leafSpring" })]
[MatchTypeObj(new object[] { "leafSpring", typeof(LeafSpring) })]
public static void RunLeafSpringSimulation(this SubSystemDocument subSystemDocument, Obj leafSpring, bool isForceTest)
Parameters
subSystemDocument SubSystemDocument
The
leafSpring Obj
The leaf spring of a leaf spring simulation.
isForceTest bool
The isForceTest of a leaf spring simulation.
Exceptions
Will be thrown if 'subSystemDocument', 'getLeafSpring' is null.
Will be thrown if the type of 'leafSpring' is not