jscad / OpenJSCAD.org

JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
https://openjscad.xyz/
MIT License
2.58k stars 505 forks source link

fix(modeling): geom2 mirroring transform #1302

Closed platypii closed 9 months ago

platypii commented 9 months ago

Fixes #1301 (thanks @gilboonet)

When a mirroring transform is applied to a geometry, we should reverse the point order so that orientation is preserved.

This was already done for geom3/poly3 geometries here, but was not applied to geom2.

This PR uses the 2D determinant in geom2.transform to check if a transform is a mirroring transform in 2D.

Added to V3 branch since this is technically a breaking change. Although I would argue this is a fix of bad behavior.

All Submissions: