Closed Michael0x2a closed 5 years ago
Hi Michael, thanks for the contribution. Seems like a good idea; I can't think of any downsides. Any thoughts, Evan?
Looks good. Also, thanks for including the unit test; that's rare in pull requests, and appreciated!
This pull request adjusts the way SolidPython converts Python parameters into OpenSCAD parameters by converting any iterable object into a vector, not just list, tuples, and numpy ndarrays.
This means it's now possible to write Python code that looks like this:
This program previously used to generate invalid OpenSCAD code -- the
py2openscad(...)
would fall back to callingstr(...)
on the Vector3, producingcube(size = Vector3(1, 2, 3))
as output.