Marker

Marker

Class Marker()

Marker(parent='MODEL', name='Marker_n', label='Marker_n', active=True, 
origin='P_Global_Origin', ornt_meth='TWOAXES', ornt_dir1='Z', align_meth1='DxDyDz', 
align_pt1=None, align_vec1=None, ornt_dir2='X', align_meth2='DxDyDz', align_pt2=None, 
align_vec2=None, e1=1, e2=0, e3=0, rm='Global_Frame', x1=0, y1=0, z1=1, x2=1, y2=0, z2=0, 
floating=False, body='B_Ground')

A marker is a coordinate system attached to a body that is used as a reference for applied loads and output requests.

Keyword Arguments

Argument Data Type Description Default
name String The variable name. Marker_n, for next available integer n.
label String The descriptive label. Marker_n, for next available integer n.
parent Object The parent. MODEL
active Bool Used to activate or deactivate this entity. True
origin Reference The location of marker. Defaults to P_Global_Origin. * ornt_meth (Enum) - The orientation method. One of TWOAXES, ONEAXIS or ANGLES. TWOAXES
ornt_dir1 Enum The direction used to orient axis 1. One of X, Y or Z. Z
align_meth1 MultiRef Alignment method for axis 1. One of Point, Vector or DxDyDz. True. Defaults to DxDyDz.
align_pt1 Reference The point when align_meth1 is Point. None
align_vec1 Reference The point reference when align_meth1 is Point. None
ornt_dir2 Enum The direction used to orient axis 1. One of X, Y or Z. X
align_meth2 MultiRef Alignment method for axis 1. One of Point, Vector or DxDyDz. DxDyDz
align_pt2 Reference The point reference when align_meth2 is Point. None
align_vec2 Reference The point reference when align_meth2 is Point. None
e1 Double The e1 Euler angle (z-x'-z'') in radians with respect to rm. 1
e2 Double The e2 Euler angle (z-x'-z'') in radians with respect to rm. 0
e3 Double The e3 Euler angle (z-x'-z'') in radians with respect to rm. 0
rm Reference The reference marker when ornt_meth is ANGLES. Global_Frame
x1 Double The direction cosine x1 for axis 1. 0
y1 Double The direction cosine y1 for axis 1. 0
z1 Double The direction cosine z1 for axis 1. 1
x2 Double The direction cosine x2 for axis 2. 1
y2 Double The direction cosine y2 for axis 2. 0
z2 Double The direction cosine z2 for axis 2. 0
floating Bool Creates a floating marker when True. False
body Body Body associated with this marker. Defaults to B_Ground.  

Readonly Properties

Argument Data Type Description  
xaxis Vector The vector in x direction of orientation.  
yaxis Vector The vector in y direction of orientation.  
zaxis Vector The vector in z direction of orientation.  

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. Readonly Properties cannot be modified.

Marker Pair

Class MarkerPair()

MarkerPair(parent='MODEL', name='MarkerPair_n', label='MarkerPair_n', active=True, sym='NONE')

Marker pair containing left and right instances of singles.

Keyword Arguments

Argument Data Type Description Default
name String The variable name. MarkerPair_n, for next available integer n.
label String The descriptive label. MarkerPair_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 leader, 'RIGHT' for right entity as leader or 'NONE' when it is not symmetric. NONE

Instances

Instanc Type Description
l Point The left marker.
r Point The right marker.

Notes

Instance is a reference to an entity. You cannot modify an instance, but can modify its properties.

Examples

========
Create and modify attributes of a Marker.
>>> from hw import mview
>>> #Create a marker entity
>>> m1 = mview.Marker(name='m1',label='Marker1')
>>> #Get values for attributes (e.g. body)
>>> m1.body.name
'B_Ground'
>>> #Set marker body and origin
>>> b1 = mview.Body()
>>> p1 = mview.Point(name='Point_1',x=10)
>>> m1.body = b1
>>> m1.origin = 'Point_1'
>>> m1.ornt_meth
'TWOAXES'
>>> #Change orientation and alignment methods
>>> m1.ornt_meth = 'ONEAXIS'
>>> m1.align_meth1 = 'DxDyDz'
>>> m1.x1 =1.0
>>> m1.y1 =1.0
>>> m1.z1 =0.0
>>> #Use Point as alignment method
>>> m1.align_meth1 = 'POINT'
>>> m1.align_pt1 = 'P_Global_Origin'
>>> #Use Vector as alignment method
>>> m1.align_meth1 = 'VECTOR'
>>> v1 = mview.Vector()
>>> m1.align_vec1 = v1
>>> #Set multiple values at a time
>>> m1.setValues(ornt_dir1 = 'X',ornt_meth = 'ANGLES')
>>> m1.e1 = 10
>>> m1.e2 = 30
>>> m1.e3 = -20
>>> # Make the marker floating
>>> m1.floating = True
>>> #Create and modify MarkerPair's left and right symmetry
>>> m2 = mview.MarkerPair(name='m2_pair',sym='LEFT')
>>> m2.l.x1 = 0.5
>>> m2.r.y2 = 2