User Tools

Site Tools


animation:animplacment

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

animation:animplacment [2015/11/16 17:15]
freek angelegt
animation:animplacment [2015/11/30 23:11] (current)
freek
Line 1: Line 1:
 +====== animplacement.py ======
 +
 +
 +==Parameters==
 +
 +Floats can be used in formulas
 +
 +  * x0, y0, z0,
 +  * x1, y1, z1,
 +  * arc0, arc1
 +
 +
 +  * Position of the rotation axis
 +  * Direction of the rotation axis
 +
 +The variable time runs from 0 to 1. It can be set by the animation manager (frame 0 to 100) or by hand
 +
 +
 +
 +== Data from a source object ==
 +
 +
 +If a source object is specified (it must have a FreeCAD.Placement property)
 +
 +  * sx, sy,sz  = Base coorinates
 +  * srx, sry, srz, sarc = Rotation Axis and Angle
 +
 +==Formulas==
 +
 +  *x, y, z  = formulas for the Base coordinates
 +  *arc = formula for the rotation angle
 +
 +Example run on a circle radius 50 in height 10
 +
 +<​code>​
 +target=App.ActiveDocument.MyPartToAnimate
 +ap=animplacement.create("​My anim Tool",​target)
 +
 +ap.x="​80 * math.cos(math.pi*2*time)"​
 +ap.y="​80 * math.sin(math.pi*2*time)"​
 +ap.z="​10"​
 +</​code>​
 +
 +math is imported, so full math functionality is supported in formulas.
 +
 +The objects calculation can be stopped by hidding the icon.
 +
 +The animplacement is renamed to [[animation:​Placer]] and integrated into the [[:​animation_wokbench|Animation Workbench]]
 +
  
animation/animplacment.txt ยท Last modified: 2015/11/30 23:11 by freek