Skip to content
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

How would one include external libraries? #51

Closed
dneise opened this issue Nov 2, 2023 · 3 comments
Closed

How would one include external libraries? #51

dneise opened this issue Nov 2, 2023 · 3 comments

Comments

@dneise
Copy link

dneise commented Nov 2, 2023

Hey there!
I've not yet started with openScad, but am still looking around and found your awesome project.

I found that openScad supports external libraries, like e.g. these chamfered primitives https://github.com/SebiTimeWaster/Chamfers-for-OpenSCAD

In oder to use them in the openScad lang one needs to include <Chamfers-for-OpenSCAD/Chamfer.scad>;. Now I wonder how and if this translates to Python?

For sure, we cannot simply do:

from Chamfers-for-OpenSCAD import Chamfer

Chamfer.chamferCube(...)

Have a great day and thanks a lot!

@jeff-dh
Copy link
Owner

jeff-dh commented Nov 2, 2023

https://github.com/jeff-dh/SolidPython/blob/master-2.0.0-beta-dev/solid2/examples/07-libs.x.py

Furthermore solidpython has a relative new feature which even supports from chamfer_lib import Chamfer checkout
https://github.com/jeff-dh/SolidPython/blob/master-2.0.0-beta-dev/solid2/extensions/openscad_extension_generator.py

But I would suggest to take look at the built in bosl2 library first. It includes a whole lot of stuff (and is built in and the bosl2 support is pretty good I think).

@jeff-dh
Copy link
Owner

jeff-dh commented Nov 2, 2023

solid2-chamfer

@dneise
Copy link
Author

dneise commented Nov 6, 2023

Thanks so much! I think we can close this

@dneise dneise closed this as completed Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants