-
Notifications
You must be signed in to change notification settings - Fork 26
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
solid2/jupyterscad override render in the namespace #48
Comments
first of all some context: #45 I would say that using the openscad GUI is still the default workflow for solidpython2 and therefor it's useful in solidpython2. in that case (which seems pretty unusual since we got the solidpython2-jupyterscad-integration) I would suggest to use this: from jupyterscad import render as jupyter_render
from solid2 import * # maybe also a different solid2 import style see https://github.com/jeff-dh/SolidPython/wiki/Importing-SolidPython
jupyter_render(render(cube())) |
This change recently...... see the context links in the previous post. from solid2 import cube, sphere, ... And the wiki docs discuss three styles: from solid2 import *
from solid2 import cube, sphere
import solid2 as s |
oh good points. I'll continue forward with one of the last two suggestions above. |
Btw: if you need this for some docs / example / show case for jupyterscad you could probably hack a solution by changing the order of the imports. I would assume a later import overwrites a previous one, so first importing solid2 and importing jupyterscad afterwards would result in exactly what you were asking for ;) |
The suggested way to use solid2 is
from solid2 import *
. One of the functions imported isrender
. This causes a conflict when using solid2 and jupyterscad together:Inspecting the
render
fcn that is in the namespace we see that the openscad render fcn is what is in the namespace:But this function is useless outside of openscad GUI, since it just specifies the preview mechanics (openscad user manual entry).
What would you think of removing
render
from the solid2 namespace?The text was updated successfully, but these errors were encountered: