Point Mass Body
Point Mass Body
Class PointMassBody()
PointMassBody(parent='MODEL', name='PointMassBody_n',
label='PointMassBody_n', active=True, mass=0, use_vx=False, use_vy=False,
use_vz=False, vx=0, vy=0, vz=0, usecm=False, cg=None)
Point mass body.
Keyword Arguments
Argument | Data Type | Description | Default |
---|---|---|---|
name | String | The variable name. | Body_n, for next available integer n. |
label | String | The descriptive label. | Body_n, for next available integer n. |
parent | Object | The parent. | MODEL |
active | Boolean | Used to activate or deactivate this entity. | True |
mass | Double | The mass. | 0 |
use_vx | Bool | Use initial translation velocity in x direction when True. | False |
use_vy | Bool | Use initial translation velocity in y direction when True. | False |
use_vz | Bool | Use initial translation velocity in z direction when True. | False |
vx | Double | The initial translation velocity in x direction. | 0 |
vy | Double | The initial translation velocity in y direction. | 0 |
vz | Double | The initial translation velocity in z direction. | 0 |
usecm | Bool | Use center of mass coordinate system when True. | False |
cg | Point | The origin for center of mass coordinate system. | None |
Instances
cm (Marker) - The marker for center of mass coordinate system.
Notes
1. The parent parameter can only be initialized by the constructor and should not be modified directly.
2. Only parent can be used as a positional argument in the constructor.
3. Instance is a reference to an entity. You cannot modify an instance, but can modify its properties.
Point Mass Body Pair
Class PointMassBodyPair()
PointMassBodyPair(parent='MODEL', name='PointMassBodyPair_n', label='PointMassBodyPair_n', active=True, sym='NONE')
PointMassBody pair containing left and right instances of singles.
Keyword Arguments
Argument | Data Type | Description | Default |
---|---|---|---|
name | String | The variable name. | PointMassBodyPair_n, for next available integer n. |
label | String | The descriptive label. | PointMassBodyPair_n, for next available integer n. |
parent | Object | The parent. | MODEL |
active | Bool | Defines if entity is activated when True or deactivated when False. | True |
sym | Enum | The symmetry of pair entity. Takes values "LEFT" for left entity as master, "RIGHT" for right entity as master or "NONE" when it is not symmetric. | 'NONE' |
Instances
Instance | Type | Description |
---|---|---|
l | Point | The left point mass body. |
r | Point | The right point mass body. |
Notes
Instance is a reference to an entity. You cannot modify an instance, but can modify its properties.
Examples
========
Create PointMassBody and modify its attribute values.
>>> # Create a Pair of PointMassBody
>>> pmbp1 = mview.PointMassBodyPair(name="pmbp_1", label="PointMassBody Pair 1", sym="LEFT")
>>> pmbp1.mass = 10
>>> pmbp1.usecm = True
>>> pmbp1.cg = mview.PointPair(x=1, y=1, z=1, sym="LEFT")
>>> # You can also align cm with other methods. For example:
>>> pmbp1.cm.setValues(ornt_meth = "TWOAXES", ornt_dir1 = "Z", align_meth1 = "Point", align_meth2 = "Point")
>>> pmbp1.cm.setValues(origin=mview.PointPair(x=1, y=1, z=1, sym="LEFT"), align_pt1=mview.PointPair(x=2, y=1, z=1, sym="LEFT"), align_pt2=mview.PointPair(x=1, y=1, z=2, sym="LEFT"))
>>> pmbp1.l.setValues(use_vy = True, vy = 20, use_vz = True, vz = 30)
>>> pmbp1.r.setValues(use_vx = True, vx = 10)