Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(modeling): created TS definitions for splitPolygonByPlane
- Loading branch information
1 parent
7f02f7d
commit 0998e7e
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
packages/modeling/src/operations/booleans/trees/splitPolygonByPlane.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Poly3 } from '../../../geometries/types'; | ||
import { Plane } from '../../../maths/types'; | ||
|
||
enum ResType | ||
{ | ||
coplanar_front = 0, | ||
coplanar_back = 1, | ||
front = 2, | ||
back = 3, | ||
spanning = 4, | ||
} | ||
|
||
|
||
interface SplitRes | ||
{ | ||
type: ResType, | ||
front: Poly3, | ||
back: Poly3; | ||
} | ||
|
||
// Returns object: | ||
// .type: | ||
// 0: coplanar-front | ||
// 1: coplanar-back | ||
// 2: front | ||
// 3: back | ||
// 4: spanning | ||
// In case the polygon is spanning, returns: | ||
// .front: a Polygon3 of the front part | ||
// .back: a Polygon3 of the back part | ||
declare function splitPolygonByPlane(plane: Plane, polygon: Poly3): SplitRes; | ||
|
||
export default splitPolygonByPlane; |