gsohler / openscad

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

Hull() doesn't work in Python mode #10

Closed Matthieu-LAURENT39 closed 10 months ago

Matthieu-LAURENT39 commented 10 months ago

Describe the bug I'm translating this code into python:

hull() {
    circle(5);
    translate([0,20,0])
    circle(5);
}

The translation:

hull(circle(5), circle(5).translate([0,0,5]) )

The original scad code works fine, but the python code raises TypeError: error duing parsing advanced csg.

Expected behavior Render is successful, and works the same way as regular scad

Code reproducing the issue

o = hull(circle(5), circle(5).translate([0,0,5]) )
output(o)

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

Matthieu-LAURENT39 commented 10 months ago

Actually, after more testing, it seems hull() expects a list as input, which caused the error

gsohler commented 10 months ago

Hi Mattheu,, thank you for pointing out. I am still not clear, if its better to provide an array with the inputs or if its better to supply the plain arguments. In any case when providing plain arguments the parameter length is rather fixed whereas when supplying an array we are not fixed to a certain parameter count.

Matthieu-LAURENT39 commented 10 months ago

we should probably move this conversation to #11