Fix failing tests after three-mesh-bvh upgrade to ^0.9.9#174
Fix failing tests after three-mesh-bvh upgrade to ^0.9.9#174jgphilpott merged 4 commits intomainfrom
Conversation
Co-authored-by: jgphilpott <4128208+jgphilpott@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates slicer tests to avoid three-bvh-csg (currently broken due to a three-mesh-bvh@0.9.9 circular reference issue in some builds) by rebuilding the “sheet with holes” test geometry using native three.js Shape + ExtrudeGeometry.
Changes:
- Replaced CSG-based “box minus cylinders” geometry generation with
THREE.Shape+ circular hole paths andTHREE.ExtrudeGeometry. - Removed test-only console.warn suppression that was specific to
three-bvh-csgwarnings.
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: jgphilpott <4128208+jgphilpott@users.noreply.github.com>
Done in 20d1607:
|
|
@copilot I am still seeing some console warnings: Could these either be removed or suppressed please? |
…th Combing tests Co-authored-by: jgphilpott <4128208+jgphilpott@users.noreply.github.com>
... Fixed in 934bd30. The warnings were coming from two more tests in |
three-mesh-bvh@0.9.9introducedObjectBVH extends BVHwhereBVHis self-imported from the same package. In the UMD/CJS build this circular reference resolves toundefinedat evaluation time, crashing the entire module load — which cascades to breakthree-bvh-csg.Changes
src/slicer/slice.test.coffee— Removedthree-bvh-csgfrom bothWall Print Order with Holestests; replaced CSG box-minus-cylinders geometry with native three.jsTHREE.Shape+THREE.ExtrudeGeometry. Extracted a sharedbuildSheetWithHolesMesh()helper with named constants (SHEET_SIZE,THICKNESS,GRID_SIZE,HOLE_RADIUS) to eliminate duplication. Fixedabsarcclockwise flag tofalsefor robust full-circle arc generation.src/slicer/walls/walls.test.coffee— Removedthree-bvh-csgfrom bothTravel Path Combingtests; replaced CSG box-minus-cylinder(s) geometry with native three.jsTHREE.Shape+THREE.ExtrudeGeometry. Extracted a sharedbuildSheetWithHolesMesh(holePositions)helper with named constants (SHEET_W,DEPTH,HOLE_RADIUS) and removed the try/catch guard andconsole.warnfallback that was silently skipping these tests when the package was unavailable.The resulting geometries are equivalent — a thin rectangular sheet with through-holes — constructed entirely without CSG. No
three-bvh-csgreferences remain in the test suite.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.