@eturnity/eturnity_maths
Advanced tools
Comparing version 6.34.1 to 6.34.3-EPDM-8157.0
{ | ||
"name": "@eturnity/eturnity_maths", | ||
"version": "6.34.1", | ||
"version": "6.34.3-EPDM-8157.0", | ||
"author": "Eturnity Team", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -72,2 +72,10 @@ import { | ||
} | ||
export function get3DDistanceBetweenPoints(firstPoint, secondPoint) { | ||
const distance = Math.hypot( | ||
firstPoint.x - secondPoint.x, | ||
firstPoint.y - secondPoint.y, | ||
firstPoint.z - secondPoint.z | ||
) | ||
return distance | ||
} | ||
@@ -74,0 +82,0 @@ export function getDegree(H, I, J) { |
@@ -122,3 +122,7 @@ | ||
type: this.type, | ||
outline: this.outline.map(p=>{return {...p}}), | ||
outline: this.outline.map(p=>{return { | ||
x:parseInt(p.x), | ||
y:parseInt(p.y), | ||
z:parseInt(p.z), | ||
}}), | ||
holes: this.holes.map((p) => p.id), | ||
@@ -128,3 +132,7 @@ layer: this.layer, | ||
visible: this.visible, | ||
margins: JSON.parse(JSON.stringify(this.margins)) | ||
margins: { | ||
isSameMargin:this.margins.isSameMargin, | ||
sameMargin:this.margins.sameMargin, | ||
distances:JSON.parse(JSON.stringify(this.margins.distances)) | ||
} | ||
} | ||
@@ -145,11 +153,12 @@ const extraSerialization = {} | ||
} else if (this.layer == 'moduleField') { | ||
extraSerialization.data = {...this.data} | ||
extraSerialization.data = {...this.data,modules:[]} | ||
extraSerialization.roof = { id: this.roof.id } | ||
extraSerialization.pvData = this.pvData?{...this.pvData}:null | ||
extraSerialization.mountingData = this.mountingData?{...this.mountingData}:null | ||
extraSerialization.panels = this.panels | ||
? this.panels.map((p) => { | ||
return { id: p.id, index: p.index, outline: p.outline } | ||
}) | ||
: [] | ||
extraSerialization.panels = [] | ||
// this.panels | ||
// ? this.panels.map((p) => { | ||
// return { id: p.id, index: p.index, outline: p.outline } | ||
// }) | ||
// : [] | ||
extraSerialization.userDeactivatedPanels = this.userDeactivatedPanels | ||
@@ -156,0 +165,0 @@ ? this.userDeactivatedPanels.map((p) => { |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
99571
3105
2