-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(CAG): reverted back CAG to default to canonicalized = false
- this fixed some issues dealing in some official OpenJSCAD examples - enables .canonicalized() to work correctly again - added tests to cover cases - updated existing tests to match new default
- Loading branch information
1 parent
c660d13
commit 68a0558
Showing
4 changed files
with
25 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const test = require('ava') | ||
const {CAG, CSG} = require('../csg') | ||
|
||
test('CAG getOutlinePaths should work correctly', t => { | ||
const radius = 10 | ||
const cag = CAG.fromPoints([ | ||
[-radius, -radius, 0], | ||
[radius, -radius, 0], | ||
[radius, radius, 0] | ||
]).expand(2, CSG.defaultResolution2D) | ||
|
||
const result = cag.getOutlinePaths() | ||
|
||
t.deepEqual(cag.sides.length, 35) | ||
t.deepEqual(cag.isCanonicalized, true) | ||
}) |