Tracer (hwx.inspire.motion)#
- class Tracer(self, **kwds)#
Bases:
MotionObject
A point in the model that traces out a path during Motion Runs
# Name
Type
animator
TraceAnimator
color
enableTrail
folder
str
icon
str
location
movable
bool
paper
parts
pen
position
property
size
int
thickness
trailFrames
# Name
Description
createCurve
(self, analysis)createPolyline
(self, analysis)getDrawPoints
(self, wrtPaper=True)Get points to draw if trace lines turned on
getPoints
(self, analysis, wrtPaper=False, startFrame=0)Get tracer location at every frame of the analysis
hideTraces
()showTraces
(analysis=True, frames=(0, None), ignoreTrails=True, **kwds)Show trace lines for all Tracers in the model. Limit what frames are
writeCsv
(tracers, file, analysis=None)Write points of all passed Tracers to a csv file
Example
from hwx import inspire from hwx.inspire import motion model = inspire.openTutorialFile("Motion/M01_FourBar.stmod") link = model.getChild('Link Single Slot') tracer = motion.Tracer( name='Tracer 1', pen=link.features[0], location=link.location, color='Red', thickness=2 ) analysis = motion.MbdAnalysis() analysis.analyze()
- getPoints(analysis, wrtPaper=False, startFrame=0)#
Get tracer location at every frame of the analysis
wrtPaper - transform points into paper parts reference frame
- getDrawPoints(wrtPaper=True)#
Get points to draw if trace lines turned on