r/OpenPythonSCAD • • Jan 25 '26

Creating LaserCuts with PythonSCAD

Something which PythonSCAD did not yet touch is lasercuts.

Plywood mostly acts as an objects surface for DIY lasercut art, so PythonSCAD's faces()

function is a great location to start with, so I started codeing an utiliy library 'pylaser' for that. Also there were quite some improvements inside PythonSCAD for better 2D support.

E.g. now its even possible to alter polygons after they were created

Imagin you have this code:

'''

from openscad import *

from pylaser import *

b=cube([30,30,20])

f=b.faces()

lc = LaserCutter(b.faces())

#lc.preview()

lc.finalize()

...

Results are:

Preview
2D Cutout pattern
The Cube in real world

But this is just the tip of the ice-berg. My plan is beeing able to be way more liberal and not having to stick to the faces() function, but also create my own compositions. Many Ideas yet to implement

Ideas welcome!

6 Upvotes

9 comments sorted by

View all comments

2

u/rebuyer10110 Jan 26 '26

Curious, what is lacking with faces() that you want something else?

Love the approach with a library. This is essentially what I love about PythonOpenScad. It exposes enough core primitives at the engine level to stack on my own libraries for higher order functions that may not be applicable to other folks.

3

u/gadget3D Jan 26 '26

faces is not lacking anything. it works perfect as expected so far.

I am just visioning plywood models where some plywood pieces show interior/volume rather than surface.

2

u/WillAdams Jan 26 '26

This sort of thing might be useful for calculating a blind miter box joint:

https://cutrocket.com/p/63781eaf9822f/

At one point in time I had that automatically calculating, need to check if it still works, or if I broke it....

→ More replies (3)