gsohler / openscad

OpenSCAD - The Programmers Solid 3D CAD Modeller
https://www.openscad.org
Other
29 stars 7 forks source link

align() crashes if a handle is passed as a first parameter. #42

Open willywong opened 6 hours ago

willywong commented 6 hours ago

Describe the bug align() crashes if a handle is passed as a first parameter.

To Reproduce Steps to reproduce the behavior:

Paste this into python scad and run it.

from openscad import *

s = square([5, 5])
ss = linear_extrude(s, height=5)
sss = ss.up(10).right(9).back(8)
ssss = sss.rotz(90)

print(ssss.origin)
inv = [[0, 1, 0, 9], [-1, 0, 0, -8], [0, 0, 1, -10], [0, 0, 0, 1]]
ori = align(ssss.origin, inv)

output([ssss, ori])

It will crash on line 10. Changing line 10 to ori = align(ssss, inv) will stop crashing.

Expected behavior Not crash.

Code reproducing the issue See above.

Environment and Version info (please complete the following information):

gsohler commented 5 hours ago

Thank you for the bug report. Fixed it now and pushed on github. will be available on next release.