@eturnity/eturnity_maths
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "@eturnity/eturnity_maths", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"author": "Eturnity Team", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -16,3 +16,3 @@ import { PlanarFaceTree } from 'planar-face-discovery' | ||
verticalProjectionOnPlane, | ||
polygonsHasSame2DOutline | ||
polygonsHaveSame2DOutline | ||
} from './geometry' | ||
@@ -98,3 +98,11 @@ import { groupBy } from 'lodash' | ||
for (let k = 0; k < outlineList.length; k++) { | ||
polygonList.push(new Polygon(outlineList[k], 'roof')) | ||
//check if roof with same outline already exist: | ||
let roof = roofs.find((roof) => | ||
polygonsHaveSame2DOutline(outlineList[k], roof.outline) | ||
) | ||
let newRoof=new Polygon(outlineList[k], 'roof') | ||
if (roof) { | ||
newRoof.id=roof.id | ||
} | ||
polygonList.push(newRoof) | ||
} | ||
@@ -427,6 +435,6 @@ return polygonList | ||
//check for existing roofs | ||
//check for existing roofs(for z value) | ||
outlines = outlines.map((outline) => { | ||
let roof = roofs.find((roof) => | ||
polygonsHasSame2DOutline(outline, roof.outline) | ||
polygonsHaveSame2DOutline(outline, roof.outline) | ||
) | ||
@@ -433,0 +441,0 @@ if (roof) { |
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
101995
3170