SolidCode / SolidPython

A python frontend for solid modelling that compiles to OpenSCAD
1.1k stars 171 forks source link

extrude_along_path() is broken - normals inverted #187

Closed ShurikMur closed 2 years ago

ShurikMur commented 2 years ago

After updating solidpython to the latest (1.1.1) the extrude_along_path function seems to get broken: either first, last or side face of result solid gets a reversed normal and openSCAD crashes on rendering. Changing the order of shape points reverses normals but there are still some faces facing wrong direction.

etjones commented 2 years ago

Good catch on this. I was adding lots and lots of inverted facets to the polyhedron() calls, which I just now realized can be visualized with OpenSCAD's F12 'Thrown Together' view. Everything should look good now. You'd need to pull the latest master to see the fix, but it's there. I'm going to hold off on a release just now, because there's a much bigger release coming shortly and I'm not sure where this will end up in the mix.

Gigahawk commented 2 years ago

As far as I can tell, this is still broken as of 37417da, running path_extrude_example.py still breaks when trying to render in OpenSCAD.

Reverting to 1.0.5 seems to work fine.

etjones commented 2 years ago

What kind of failure do you run into? Running the code at 37417da it took me almost 14 minutes to render with CGAL, but everything looks like it's working correctly. What does your breakage look like?

Gigahawk commented 2 years ago

Ok weird, I tried to recreate this in a clean environment and it seems to work fine, maybe pip didn't replace the regular 1.1.1 release when i tried to install from git.

My bad, feel free to close this again.

etjones commented 2 years ago

All good- “no bug here” is the best outcome! Thanks for reporting.