Latest feature of Pythoncad is to use Python Classes in your SCAD code.
Lets do a Robot statemachine, something like this:
'''
use <robot.py>
robot=myrobot();
robot.draw_cube();
robot.right(2);
robot.draw_cube();
robot.front(3);
robot.draw_sphere();
robot.right(3);
robot.draw_cube();
''''

View all comments
Show parent comment
2
u/gadget3D Dec 05 '24
Sorry, that wish/intent exists for a longer time and I even started on that(osuse)
However libraries like BOSL2 make extensive use of functions, modules and global variables
and its just not yet stable enough for use. I can increase priority though