@eturnity/eturnity_maths
Advanced tools
Comparing version 7.37.0-EPDM-12170.1 to 7.37.0-qa-25.0
{ | ||
"name": "@eturnity/eturnity_maths", | ||
"version": "7.37.0-EPDM-12170.1", | ||
"version": "7.37.0-qa-25.0", | ||
"author": "Eturnity Team", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -678,14 +678,2 @@ import { mmTolerance, polygonCloseTolerance } from './config' | ||
} | ||
export function getNormalVectorFromFlatOutline(outline) { | ||
const ABC = get3pointNotAlignedFromOutline(outline) | ||
if (!ABC) { | ||
return null | ||
} | ||
let normalVector = getNormalVectorFrom3Points(...ABC) | ||
if (normalVector.z < 0) { | ||
normalVector = multiplyVector(-1, normalVector) | ||
} | ||
normalVector = normalizeVector(normalVector) | ||
return normalVector | ||
} | ||
export function getNormalVectortoEdgeTowardPolygon(k, outline) { | ||
@@ -692,0 +680,0 @@ const A = outline[k] |
@@ -12,2 +12,1 @@ export * from './coords' | ||
export * from './stats' | ||
export * from './irradiance' |
@@ -170,11 +170,8 @@ import { translate2D, getDegree } from '../geometry' | ||
}) | ||
if (this.layer == 'moduleField' && this.data && this.data.modules) { | ||
this.data.modules.forEach((module) => { | ||
module.outline.forEach((p) => { | ||
p[0] += vectorInMm.x | ||
p[1] += vectorInMm.y | ||
}) | ||
if (this.layer == 'moduleField') { | ||
this.trimedOutline = this.trimedOutline.map((point) => { | ||
return addVector(point, vectorInMm) | ||
}) | ||
} | ||
updateComputedGeometryPolygon(this) | ||
} | ||
@@ -185,2 +182,5 @@ translateOffset(newPositionOffset, center = { x: 0, y: 0 }) { | ||
} | ||
resetOffset() { | ||
this.positionOffset = { x: 0, y: 0, z: 0 } | ||
} | ||
serialize() { | ||
@@ -187,0 +187,0 @@ const baseSerialization = { |
189685
43
6333