small typo makes pythonscad scrash

8 views
Skip to first unread message

Matthieu Hendriks

unread,
Jun 15, 2025, 3:02:55 AMJun 15
to PythonSCAD
A typo usuing a ,translate instead op .translate (komma versus dot) makes pythonscad crash (Ubuntu, build from sourcecode)

# filename p1.py
from openscad import *
blok = union(cube([30,8,2]) ,text('Hello World', size=4.0).linear_extrude(3),translate([1,1,0]))
blok.show()

I got the most recent version. When I start from the command promt

./openscad
Loaded design '/home/matthieu/pyscad_drawings/proef/p1.py'.
Running Python 3.10.12 without venv.
Segmentation fault (core dumped)

Guenther Sohler

unread,
Jun 15, 2025, 5:19:34 AMJun 15
to Matthieu Hendriks, PythonSCAD
Thank you for pointing that out.
Guys like you help to make it more stable.
Of course this error is corrected already in latest github repository
As a bonus, translate will also accept a list of solids.
For union, intersection and difference, following arruments are also possible now
None, False -> void
True            -> opposite of void

This allows for nice algorithms like

e.g.
result = None
for i in range(3)
  result = union(result, cube(4).rotz(40*i)

But it's way better to work with objects lists instead




--
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/001ac118-d1df-4465-b397-31749096b324n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages