mirror of
https://github.com/xibyte/jsketcher
synced 2026-02-19 05:44:09 +01:00
fix zero triangles error
This commit is contained in:
parent
b474fc6267
commit
f97cd2b08c
1 changed files with 3 additions and 0 deletions
|
|
@ -636,6 +636,9 @@ TCAD.craft._makeFromPolygons = function(polygons) {
|
|||
var a = refs[i][0] + off;
|
||||
var b = refs[i][1] + off;
|
||||
var c = refs[i][2] + off;
|
||||
if (points[b].minus(points[a]).cross(points[c].minus(points[a])).length() === 0) {
|
||||
continue;
|
||||
}
|
||||
var csgPoly = new CSG.Polygon([
|
||||
new CSG.Vertex(csgVec(points[a]), csgVec(poly.normal)),
|
||||
new CSG.Vertex(csgVec(points[b]), csgVec(poly.normal)),
|
||||
|
|
|
|||
Loading…
Reference in a new issue