diff --git a/utils/copy_type.ts b/utils/copy_type.ts index c2780e972..b476d8042 100644 --- a/utils/copy_type.ts +++ b/utils/copy_type.ts @@ -101,3 +101,48 @@ writeFile("node_modules\\@jscad\\modeling\\src\\operations\\modifiers\\retessell console.log("retessellate.d.ts ok"); } ); + + +writeFile("node_modules/@jscad/modeling/src/operations/booleans/trees/splitPolygonByPlane.d.ts", ` +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;`, err => { }); + +writeFile("node_modules/@jscad/modeling/src/operations/booleans/scission.d.ts", ` +iimport { Geom2, Geom3 } from '../../geometries/types' +import RecursiveArray from '../../utils/recursiveArray' + +export default scission + +declare function scission(...geometries: RecursiveArray): Geom2 +declare function scission(...geometries: RecursiveArray): Geom3`, err => { });