Marker
Model ElementMarker defines an orthonormal, right-handed coordinate system and reference frame in MotionSolve. A Marker must belong to a part. The body can be any type: rigid, flexible, or point.
Class Name
Marker
Description
The Newtonian reference frame (Ground) is considered to be a special case of a rigid PART.
Attribute Summary
Name | Property | Modifiable by command? | Designable? |
---|---|---|---|
id | Int () | ||
label | Str () | ||
part | Reference (Part) | Yes | |
point_mass | Reference (PointMass) | Yes | |
flex_body | Reference (FlexBody) | Yes | |
body | Reference (Body) # Alias | Yes | Yes |
qp | Location (Point(), required=True) | Yes | Yes |
zp | Location () | Yes | Yes |
xp | Location () | Yes | Yes |
xv | Location() | Yes | |
zv | Location() | Yes | |
reuler | Angles () | Yes | Yes |
floating | Bool () | ||
rm | Reference ("Marker") | ||
node | Int () | ||
usexp | Bool () | ||
usexv | Bool () | ||
function | Function ("MARKER_READ()") | ||
routine | Routine () |
Usage
#1: Defined completely in the input file
Marker (body=objBody, optional_attributes)
#2: Defined in a compiled user-written subroutine
Marker (body=objBody, function=userString, routine=string, optional_attributes)
#3: Defined in a Python script
Marker (body=objBody, function=userString, routine=functionPointer, optional_attributes)
Attributes
- body
- Reference to an existing Part, PointMass or FlexBody object
- qp
- A Location object or a list of 3 doubles
- zp
- A Location object or a list of 3 doubles
- xp
- A Location object or a list of 3 doubles.
- usexp
- Boolean
- zv
- A Location object or a list of 3doubles.
- xv
- A Location object or a list of 3doubles.
- usexv
- Boolean.
- reuler
- A list of 3 doubles
- body
- Reference to an existing Part, PointMass or FlexBody object
- function
- String
- routine
- String
- body
- Reference to an existing Part, PointMass or FlexBody object
- function
- String
- routine
- Pointer to a callable function in Python
- id
- Integer
- label
- String
- rm
- Reference to an existing Marker
- floating
- Boolean
- node
- Integer
Examples
m1012 = Marker (id=1012, label="marker 1012", body=p1000, qp=[1.414,3.142,1.618],
zp=[101.327,3.142,-2.545], xp=[1.414, 3.142, 101.618])
m30303 = Marker (label="joint 3-marker-i", body=p30303)
m30102040 = Marker (id=30102040, label="Marker 2", body=p30102, function="user(1, -0.5, 0.3, 0., 1.57079633, 1.57079633, -1.57079633)",
routine=marker_read)
def marker_read (id, par, npar):
eflg = 0
errflg = 0
r = 3*[0.0]
angle = 6*[0.0]
angle_type = int(par[0])
r[0] = par[1]
r[1] = par[2]
r[2] = par[3]
if angle_type==0: # DCMTX
angle[0] = par[4]
angle[1] = par[5]
angle[2] = par[6]
angle[3] = par[7]
angle[4] = par[8]
angle[5] = par[9]
elif (angle_type == 1) | (angle_type == 2): # Euler angles (313 or YPR)
angle[0] = par[4]
angle[1] = par[5]
angle[2] = par[6]
elif angle_type == 3: # Euler parameters
angle[0] = par[4]
angle[1] = par[5]
angle[2] = par[6]
angle[3] = par[7]
else:
errflg = 1;
return errflg
eflg = py_put_marker(id, r, angle_type, angle)
return errflg
# DVs_
qpx = Dv (label="X coordinate of Point B", b=40)
qpy = Dv (label="Y coordinate of Point B", b=200)
qpz = Dv (label="Z coordinate of Point B", b=350)
# QP
qp = [qpx, qpy, qpz]
# ZP is along x-axis
zp = [qpx+10, qpy, qpz]
# XP is along z-axis
xp = [qpx, qpy, qpz+10]
# Now define the Marker and hold it in the Python variable markerB
markerB = Marker (body=p1, qp=qp, zp=zp, xp=xp, label="markerB")
m2 = Marker (body=p2, qp=m1.qp, zp=m1.zp, xp=m1.xp, label="m2")
Comments
- See Properties for an explanation about what properties are, why they are used, and how you can extend these.
- For a more detailed explanation about Marker, see Reference: Marker.