@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_maths",
3
- "version": "7.48.1",
3
+ "version": "7.48.2",
4
4
  "author": "Eturnity Team",
5
5
  "main": "src/index.js",
6
6
  "private": false,
@@ -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)