This allowed me to better visualize the mechanism for pitch control of a cycloidal rotor for my current project: A Novel and Simple Aircraft Requiring Minimal Power to Hover.
Here is the resulting video which I animated using a fairly simple loop that I directly write in the Python console, something along the lines of
Code: Select all
import time
n=1;
App.ActiveDocument.Sketch.setDatum('pitchRodXorig',App.Units.Quantity(str(0)+' mm'))
App.ActiveDocument.Sketch.setDatum('pitchRodYorig',App.Units.Quantity(str(0)+' mm'))
for X in range(-10,10,2):
App.ActiveDocument.Sketch.setDatum('pitchRodXorig',App.Units.Quantity(str(X)+' mm'))
for i in range(0,720,5):
App.ActiveDocument.Sketch.setDatum('rotationControl',App.Units.Quantity(i/180*3.1416))
Gui.activeDocument().activeView().saveImage('/home/louis/Pictures/cycloFreeCAD/test'+str(n).zfill(4)+'.png',800,600,'Current') # to save image...
n+=1;
# time.sleep(0.005)
for Y in range(-10,10,2):
App.ActiveDocument.Sketch.setDatum('pitchRodYorig',App.Units.Quantity(str(Y)+' mm'))
for i in range(0,720,5):
App.ActiveDocument.Sketch.setDatum('rotationControl',App.Units.Quantity(i/180*3.1416))
Gui.activeDocument().activeView().saveImage('/home/louis/Pictures/cycloFreeCAD/test'+str(n).zfill(4)+'.png',800,600,'Current') # to save image...
n+=1;
# time.sleep(0.005)
I did it with FreeCAD version 0.18.4 on Ubuntu Linux. I use more computers, so not sure whether locale/build info can really be useful here! I'm attaching the FreeCAD file instead (I am licensing it under a Creative Commons Attribution 4.0 International License). and warn that some "tuning" to the given Python script may be required, it seems to be very sensible to changes in the file!