dxf-viewer
Advanced tools
Comparing version 1.0.35 to 1.0.36
{ | ||
"name": "dxf-viewer", | ||
"version": "1.0.35", | ||
"version": "1.0.36", | ||
"description": "JavaScript DXF file viewer", | ||
@@ -28,3 +28,4 @@ "main": "src/index.js", | ||
"opentype.js": "^1.3.4", | ||
"three": "^0.161.0" | ||
"three": "^0.161.0", | ||
"earcut": "^3.0.0" | ||
}, | ||
@@ -31,0 +32,0 @@ "devDependencies": { |
@@ -52,7 +52,9 @@ import { Vector2, Matrix3, Box2 } from "three" | ||
this.nodes.sort((e1, e2) => e1.intersection[0] - e2.intersection[0]) | ||
if (this.style == HatchStyle.ODD_PARITY) { | ||
return this._GenerateOddParitySegments() | ||
if (this.style == HatchStyle.THROUGH_ENTIRE_AREA) { | ||
return this._GenerateThroughAllSegments() | ||
} | ||
//XXX assume through all for all the reset style | ||
return this._GenerateThroughAllSegments() | ||
/* ODD_PARITY and OUTERMOST are differentiated by filtering loops list (for outermost style | ||
* only external and outermost loop should be left). | ||
*/ | ||
return this._GenerateOddParitySegments() | ||
} | ||
@@ -59,0 +61,0 @@ |
@@ -240,6 +240,10 @@ import * as helpers from "../ParseHelpers.js" | ||
if (curr.code != 92) { | ||
return null; | ||
return null | ||
} | ||
entity = {type: curr.value}; | ||
curr = scanner.next(); | ||
entity = { | ||
type: curr.value, | ||
isExternal: (curr.value & 1) != 0, | ||
isOutermost: (curr.value & 16) != 0 | ||
} | ||
curr = scanner.next() | ||
} | ||
@@ -253,6 +257,6 @@ | ||
while (numEdges) { | ||
const edge = ParseEdge(); | ||
const edge = ParseEdge() | ||
if (edge) { | ||
entity.edges.push(edge); | ||
numEdges--; | ||
entity.edges.push(edge) | ||
numEdges-- | ||
} else { | ||
@@ -265,5 +269,5 @@ numEdges = 0; | ||
if (curr.code == 330) { | ||
entity.sourceRefs.push(curr.value); | ||
numSourceRefs--; | ||
curr = scanner.next(); | ||
entity.sourceRefs.push(curr.value) | ||
numSourceRefs-- | ||
curr = scanner.next() | ||
} else { | ||
@@ -276,3 +280,3 @@ numSourceRefs = 0 | ||
case 93: | ||
numEdges = curr.value; | ||
numEdges = curr.value | ||
if (numEdges > 0) { | ||
@@ -283,3 +287,3 @@ entity.edges = [] | ||
case 97: | ||
numSourceRefs = curr.value; | ||
numSourceRefs = curr.value | ||
if (numSourceRefs > 0) { | ||
@@ -290,6 +294,6 @@ entity.sourceRefs = [] | ||
default: | ||
scanner.rewind(); | ||
return entity; | ||
scanner.rewind() | ||
return entity | ||
} | ||
curr = scanner.next(); | ||
curr = scanner.next() | ||
} | ||
@@ -296,0 +300,0 @@ } |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
783146
18978
4
+ Addedearcut@^3.0.0
+ Addedearcut@3.0.0(transitive)