Added support for DXF layers to gcodepreview (my library for OpenPythonSCAD)

4 views
Skip to first unread message

William Adams

unread,
Feb 25, 2026, 10:07:29 PMFeb 25
to PythonSCAD
Here:


Basically, one can have a .py file which generates a colour-coded 3D preview:

Screenshot 2026-02-25 220504.png

which generates a DXF:

Screenshot 2026-02-25 220546.png

which can be imported into a CAM tool:

Screenshot 2026-02-25 220634.png

which preserves the layer assignments, and for some CAM tools, allows toolpaths to be associated with layers.

William


John David

unread,
Feb 26, 2026, 12:02:47 AMFeb 26
to William Adams, PythonSCAD
Cool!  What CAM tool are you using in the third image?  Or is this the interface for gcodepreview?

If you are interested in laser cutting, Guenther and I will be coming out with a toolchain that lets you either set the colomap association with power and feed rate, or alternatively encode the power and feed directly into the object color.  I'll have to remember gcodepreview for other work in the future, but all my mills and router are down ATM.

  EBo --

--
You received this message because you are subscribed to the Google Groups "PythonSCAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pythonscad+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/0fce4fa0-347b-4f25-a957-93a2c7b468f0n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

William Adams

unread,
Feb 26, 2026, 7:31:27 AMFeb 26
to PythonSCAD
Thanks!

No UI for gcodepreview (beyond what the Customizer in OpenPythonSCAD affords), that is Carbide Create (ob. discl., I work for Carbide 3D).

I wrote up a bit about it at:


but one needs the new beta version (and a Pro license if one doesn't have a Carbide 3D machine):


I've been following the laser stuff, and it's _awesome_ --- maybe see if you can integrate w/ the boxes.py folks so that there can be a version of that project which has 3D previews.

William


John David

unread,
Feb 26, 2026, 8:54:19 AMFeb 26
to William Adams, PythonSCAD
I will have to look into more deeply later.  Thanks for the write-ups and post.

re: boxes.py...

For my work on jigs, I developed a tabbed_box library, that allows me to do things like skip tabs so that my French cleat boxes have full support for the cleats, sides or dividers.  In fact, my first project I am using for testing uses tabbed_box and uses two different materials/thicknesses.  I'm planning to publicly release it once it stabilized, and I have used it for a bunch of things.

  EBo --

Reply all
Reply to author
Forward
0 new messages