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

Wish: xcsg support #160

Closed
ebak opened this issue Jan 8, 2021 · 2 comments
Closed

Wish: xcsg support #160

ebak opened this issue Jan 8, 2021 · 2 comments

Comments

@ebak
Copy link

ebak commented Jan 8, 2021

Hi,

SolidPython offers me the best python based CAD workflow.
Some of my projects are using intensive computed geometries, like many union of hull of spheres.
Unfortunately OpenSCAD renders them slow, sometimes I can render only sub-parts with OpenSCAD and union them with Blender.

I was looking for a faster alternative of OpenSCAD and I have found AngelCAD and xcsg.

Currently I have only a very brief experience with them, which is very promising, although I cannot say anything about the maturity of these tools.

What I have did so far:

openscad VaseTop.scad --o VaseTop.csg
time xcsg --obj VaseTop.csg
...
Created OBJ file     : VaseTop.obj
xcsg finished using 0h 0m 24.197s

real    0m24,277s
user    1m15,905s
sys     0m3,348s

image

I thought it would be nice to have a SolidPython like tool which could output directly to .xcsg too.
Output to .xcsg may not be as simple as generate .scad output, since .xcsg needs explicit model matrices. As I see all translate()(), rotate()() operations should calculate the proper model matrices in SolidPython side, maybe the PyGLM module could provide efficient help in it.

So it is not an issue, just a daydreaming.

Happy new year!

@etjones
Copy link
Contributor

etjones commented Jan 11, 2021

I think there's probably more work to outputting .xcsg code than I'm up for in SolidPython, but you're absolutely right about the speed of OpenSCAD's rendering. One similar project which SolidPython can handle, and which also works much faster than OpenSCAD, is ImplicitCAD. The code is very similar to OpenSCAD, but the renderer is much faster and there's native support for a number of extra features like rounded shapes that OpenSCAD lacks. Check it out!

@etjones etjones closed this as completed Jan 11, 2021
@ebak
Copy link
Author

ebak commented Jan 11, 2021

Thanks for mentioning ImplicitCAD! I'll take a look. Of course SolidPython support would be very nice.
Meanwhile I have started to work on an .xcsg generator

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