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

test(modeling): measureArea for all tests #1300

Closed platypii closed 9 months ago

platypii commented 9 months ago

Improvements to tests by adding measureArea to as many tests as possible. Continues the work started in #1197

Volume and Area tests are nice because they provide a check against all the vertices of a geometry, but don't depend on the exact order of vertices. These measures should be stable, even if we change underlying geometry algorithms. The goal is to have solid tests so that we can make changes with confidence.

In a couple places, I changed unnecessary t.deepEquals to t.is tests.

All Submissions: