@eturnity/eturnity_maths
Advanced tools
Comparing version 7.51.0 to 7.51.1
{ | ||
"name": "@eturnity/eturnity_maths", | ||
"version": "7.51.0", | ||
"version": "7.51.1", | ||
"author": "Eturnity Team", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -18,3 +18,16 @@ import { mmTolerance, polygonCloseTolerance } from './config' | ||
import { isSelfIntersecting } from './intersectionPolygon' | ||
export function get3DPolylineLength(outline) { | ||
return outline.reduce((acc, cur, i) => { | ||
return ( | ||
acc + get3DDistanceBetweenPoints(cur, outline[(i + 1) % outline.length]) | ||
) | ||
}, 0) | ||
} | ||
export function getPolylineLength(outline) { | ||
return outline.reduce((acc, cur, i) => { | ||
return ( | ||
acc + getDistanceBetweenPoints(cur, outline[(i + 1) % outline.length]) | ||
) | ||
}, 0) | ||
} | ||
export function getConcaveOutlines(selectedPanels, onePanelOutline) { | ||
@@ -21,0 +34,0 @@ let buckets = groupAdjacentObjects(selectedPanels) |
@@ -13,1 +13,4 @@ export * from './coords' | ||
export * from './spherical' | ||
export * from './SHPSolver' | ||
export * from './panelFunctions' | ||
export * from './stringPatchMatching' |
@@ -5,2 +5,4 @@ import { | ||
isSamePoint2D, | ||
isInsideEdge2D, | ||
getDegree, | ||
} from './geometry' | ||
@@ -89,2 +91,11 @@ import { | ||
} | ||
export function isLastPointsInOutlineAtCloseAngle(outline) { | ||
const length = outline.length | ||
const previousIndex = (length - 1) % length | ||
const previousP = outline[previousIndex] | ||
const nextIndex = 0 | ||
const nextP = outline[nextIndex] | ||
const P = outline[length - 1] | ||
return getDegree(previousP, P, nextP) == 0 | ||
} | ||
@@ -91,0 +102,0 @@ export function logicOperationOnPolygons( |
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
245019
62
8411