@eturnity/eturnity_maths 7.48.1 → 7.48.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/objects/Polygon.js +11 -1
package/package.json
CHANGED
package/src/objects/Polygon.js
CHANGED
|
@@ -170,7 +170,17 @@ export class Polygon {
|
|
|
170
170
|
this.outline = this.outline.map((point) => {
|
|
171
171
|
return translate2D(point, vectorInMm)
|
|
172
172
|
})
|
|
173
|
-
|
|
173
|
+
if (this.layer == 'moduleField' && this.data && this.data.modules) {
|
|
174
|
+
this.data.modules.forEach((module) => {
|
|
175
|
+
module.outline.forEach((p) => {
|
|
176
|
+
p[0] += vectorInMm.x
|
|
177
|
+
p[1] += vectorInMm.y
|
|
178
|
+
if (vectorInMm.z) {
|
|
179
|
+
p[2] += vectorInMm.z
|
|
180
|
+
}
|
|
181
|
+
})
|
|
182
|
+
})
|
|
183
|
+
}
|
|
174
184
|
if (this.layer == 'moduleField' && this.trimedOutline) {
|
|
175
185
|
this.trimedOutline = this.trimedOutline.map((point) => {
|
|
176
186
|
return addVector(point, vectorInMm)
|