gif
This commit is contained in:
@@ -2,6 +2,7 @@ A gear module for FreeCAD > 0.16
|
||||
---------------------------
|
||||
|
||||

|
||||

|
||||
|
||||
## supported gear-types:
|
||||
- cylindric involute
|
||||
@@ -49,4 +50,4 @@ A gear module for FreeCAD > 0.16
|
||||
* go to the gear workbench
|
||||
* create new document
|
||||
* create a gear (click on gear symbol)
|
||||
* change parameters
|
||||
* change parameters
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# script for bevel-gear animation
|
||||
|
||||
from PySide import QtGui, QtCore
|
||||
import FreeCADGui as Gui
|
||||
import numpy as np
|
||||
import imageio
|
||||
|
||||
doc = App.ActiveDocument
|
||||
g2 = doc.Common
|
||||
@@ -8,6 +11,17 @@ g1 = doc.Common001
|
||||
|
||||
timer = QtCore.QTimer()
|
||||
|
||||
def make_pics():
|
||||
n = 30
|
||||
for i in range(n):
|
||||
phi = np.pi * 2 / 30 / n
|
||||
g1.Placement.Rotation.Angle += phi * 2
|
||||
g2.Placement.Rotation.Angle -= phi
|
||||
Gui.activeDocument().activeView().saveImage('/home/lo/Schreibtisch/animated_gear/gear_{}.png'.format(i) ,300,300,'Current')
|
||||
|
||||
def make_animated_gif():
|
||||
|
||||
|
||||
def update(*args):
|
||||
print("time")
|
||||
delta_phi = 0.005
|
||||
@@ -15,4 +29,4 @@ def update(*args):
|
||||
g2.Placement.Rotation.Angle -= delta_phi
|
||||
|
||||
timer.timeout.connect(update)
|
||||
timer.start()
|
||||
timer.start()
|
||||
|
||||
Reference in New Issue
Block a user