Body
Class Body()
class Body(parent='MODEL', name='Body_n', label='Body_n', active=True, mass=0.0,
ixx=0.0, ixy=0.0, iyz=0.0, ixz=0.0, iyy=0.0, izz=0.0, use_vx=False, use_vy=False,
use_vz=False, use_wx=False, use_wy=False, use_wz=False, vx=0.0, vy=0.0, vz=0.0, wx=0.0,
wy=0.0, wz=0.0, use_vm=False, use_wm=False, vm=None, wm=None, usecm=False,
useim=False, uselprf=False, cg=None, im_origin=None, lprf_origin=None, use_flex=False,
inertia_props_from_graphic=False)
Rigid body.
setValue, getValue, getAssociatedGraphics
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 | Bool | Used to activate or deactivate this entity. | True |
mass | Double | The mass. | 0 |
ixx | Double | The ixx inertia property with respect to the inertia coordinate system. | 0 |
iyy | Double | The iyy inertia property with respect to the inertia coordinate system. | 0 |
izz | Double | The izz inertia property with respect to the inertia coordinate system. | 0 |
ixy | Double | The ixy inertia property with respect to the inertia coordinate system. | 0 |
iyz | Double | The iyz inertia property with respect to the inertia coordinate system. | 0 |
ixz | Double | The ixz inertia property with respect to the inertia coordinate system. | 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 |
use_wx | Bool | Use initial rotational velocity about x when True. | False |
use_wy | Bool | Use initial rotational velocity about y when True. | False |
use_wz | Bool | Use initial rotational velocity about z 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 |
wx | Double | The initial rotational velocity about x. | 0 |
wy | Double | The initial rotational velocity about y. | 0 |
wz | Double | The initial rotational velocity about z. | 0 |
usevm | Bool | Use reference marker (vm) for initial translational velocity when True. | False |
usewm | Bool | Use reference marker (wm) for initial rotational velocity when True. | False |
vm | Marker | The reference marker (vm) for initial translational velocity. | 0 |
wm | Marker | The reference (vm) for initial rotational velocity. | 0 |
usecm | Bool | Use center of mass coordinate system when True. | False |
useim | Bool | Use inertia coordinate system when True. | False |
uselprf | Bool | Use body coordinate system when True. | False |
cg | Point | The origin for center of mass coordinate system. | None |
im_origin | Point | The origin for inertia coordinate system. | None |
lprf_origin | Point | The origin for body coordinate system. | None |
useflex | Bool | Use as a flexible body if True. | False |
inertia_props_from_graphic | Bool | Use properties from associated inertia graphic when True. | False |
Instances
Instance | Type | Description |
---|---|---|
cm | Marker | Marker for center of mass coordinate system. |
im | Marker | Marker for inertia coordinate system. |
lprf | Marker | Marker for body coordinate system. |
flex | FlexBody | Flexbody when useflex is True. |
Readonly Properties
geomprops (InertiaProps) - Inertia properties of the body when get properties from associated graphics [inertia_props_from_graphic] is True. Defaults to -.
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.
4. Readonly Properties cannot be modified.
Methods
- getAssociatedGraphics()
-
Get all the graphics that are associated with this object.
Returns:
List of all graphic associated with this body.
Return type:
(list)
- getValue(name)
-
Returns value of an attribute.
Parameters:
name (str) - Name of the attribute. Defaults to -.
Returns:
The return value. Return type depends on the attribute type.
- setValue(name, value)
-
Sets value of an attribute.
Parameters:
name str Name of the attribute. value ** Value of the attribute to be set. Returns:
Returns True if the value was successfully set else False.
Return type:
Bool