"The Chebyshev's Lambda Mechanism[1] is a four-bar mechanism that converts rotational motion to approximate straight-line motion with approximate constant velocity" (from http://en.wikipedia.org/wiki/Chebyshev% ... _Mechanism )
I am always wondering how one can get such ideas.
Code: Select all
#Macro Animate Chebychev's Lambda Mechanism
# http://en.wikipedia.org/wiki/Chebyshev%27s_Lambda_Mechanism
#
import FreeCAD
from FreeCAD import Base, Draft
import Part, Mesh, PartGui, sys, math, collections
import time
sketch = App.ActiveDocument.Sketch
for rev in range(0,2):
wire = []
for theta in range(0,360,5):
sketch.setDatum(13,App.Units.Quantity(str(theta) + ' deg'))
p=sketch.Shape.Vertexes[4].Point
wire.append(FreeCAD.Vector(p[0],p[1],p[2])) #
App.ActiveDocument.recompute()
# Update display
Gui.updateGui()
time.sleep(0.02)
theWire = Draft.makeWire(wire,closed=True,face=False,support=None)
Part.show(theWire.Shape)
#Macro End: