-
Notifications
You must be signed in to change notification settings - Fork 182
Cannot pass OpenSCADObject as parameter #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi Endre - This issue has come up before, but I think this is a possible way forward that would allow us to use imported OpenSCAD code to make calculations as well as create geometry, which is how I wrote this in the first place. Thanks for your code here! I think this has promise for dealing with |
Give the version released on PyPI as SolidPython 1.0.3 a try; it should have resolved this issue. In addition, any SolidPython object should be able to take imported OpenSCAD code as an argument to a function, so this should be a general solution to the problem. There are, I think some complexities to this approach. If you did a set of nested calculations with imported OpenSCAD code, I'm not certain this would represent them correctly. BUT, for most purposes, which is "Somebody did some calculations I need in this OpenSCAD module-- can I just use them in SolidPython?", this should do the trick. |
Hi, I have verified this with the polygon stuffs. Works great. Thanks! |
Hi,
Thanks for creating
SolidPython
! It is a very useful tool forOpenSCAD
.I have recently started to use its
Importing OpenSCAD code
feature (https://solidpython.readthedocs.io/en/latest/#importing-openscad-code), and luckily I started with a case which doesn't seem to be supported.I had problem with the
Round-Anything
module'spolyRound()
function: https://kurthutten.com/blog/round-anything-api/An example
OpenSCAD
code looks like:Calling it from
SolidPython
would look like:Unfortunately it doesn't work since the constructor of
solid.polygon
, which cannot take onOpenSCADObject
parameters:It would be very nice to support
OpenSCADObject
s as paramters.I have created a very ugly draft patch for myself to make it work:
Would it be possible to implement a nice solution for this use-case?
Best Regards,
Endre
The text was updated successfully, but these errors were encountered: