11#! /usr/bin/env python3
2- import os
32import sys
43from math import cos , sin
54from typing import Optional
65
76from solid import scad_render_animated_file
8- from solid .solidpython import OpenSCADObject
97from solid .objects import square , translate
8+ from solid .solidpython import OpenSCADObject
109
1110
1211def my_animate (_time : Optional [float ] = 0 ) -> OpenSCADObject :
@@ -29,16 +28,15 @@ def my_animate(_time: Optional[float] = 0) -> OpenSCADObject:
2928 # at the bottom of the OpenSCAD window
3029 # - FPS & Steps are flexible. For a start, set both to 20
3130 # play around from there
32- file_out = scad_render_animated_file (my_animate , # A function that takes a float argument
33- # called '_time' in [0,1)
34- # and returns an OpenSCAD object
35- steps = 20 , # Number of steps to create one complete motion
36- back_and_forth = True , # If true, runs the complete motion
37- # forward and then in reverse,
38- # to avoid discontinuity
31+ file_out = scad_render_animated_file (my_animate , # A function that takes a float argument
32+ # called '_time' in [0,1)
33+ # and returns an OpenSCAD object
34+ steps = 20 , # Number of steps to create one complete motion
35+ back_and_forth = True , # If true, runs the complete motion
36+ # forward and then in reverse,
37+ # to avoid discontinuity
3938 out_dir = out_dir ,
40- include_orig_code = True ) # Append SolidPython code
41- # to the end of the generated
42- # OpenSCAD code.
39+ include_orig_code = True ) # Append SolidPython code
40+ # to the end of the generated
41+ # OpenSCAD code.
4342 print (f"{ __file__ } : SCAD file written to: \n { file_out } " )
44-
0 commit comments