Skip to content

Commit

Permalink
fix(modeling): created TS definitions for splitPolygonByPlane
Browse files Browse the repository at this point in the history
  • Loading branch information
FishOrBear committed Apr 30, 2024
1 parent 7f02f7d commit 0998e7e
Showing 1 changed file with 33 additions and 0 deletions.
@@ -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;

0 comments on commit 0998e7e

Please sign in to comment.