brepjs 8.0.0 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d/blueprints/booleanHelpers.d.ts +32 -0
- package/dist/2d/blueprints/booleanHelpers.d.ts.map +1 -0
- package/dist/2d/blueprints/booleanOperations.d.ts +5 -3
- package/dist/2d/blueprints/booleanOperations.d.ts.map +1 -1
- package/dist/2d/blueprints/intersectionSegments.d.ts +12 -0
- package/dist/2d/blueprints/intersectionSegments.d.ts.map +1 -0
- package/dist/2d/blueprints/segmentAssembly.d.ts +31 -0
- package/dist/2d/blueprints/segmentAssembly.d.ts.map +1 -0
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +8 -8
- package/dist/{Blueprint-D3JfGJTz.js → Blueprint-B9fhnpFp.js} +117 -30
- package/dist/{Blueprint-CVctc41Z.cjs → Blueprint-VGbo3izk.cjs} +111 -24
- package/dist/{boolean2D-BdZATaHs.cjs → boolean2D-B1XrGVgx.cjs} +426 -345
- package/dist/{boolean2D-hOw5Qay5.js → boolean2D-_WiqPxWZ.js} +391 -310
- package/dist/{booleanFns-BBSVKhL2.cjs → booleanFns-BxW-N3rP.cjs} +12 -16
- package/dist/{booleanFns-CqehfzcK.js → booleanFns-CkccZ7UL.js} +14 -18
- package/dist/brepjs.cjs +133 -62
- package/dist/brepjs.js +290 -217
- package/dist/{cast-DQaUibmm.js → cast-C4Ff_1Qe.js} +2 -2
- package/dist/{cast-DkB0GKmQ.cjs → cast-DIiyxDLo.cjs} +2 -2
- package/dist/core/disposal.d.ts +1 -1
- package/dist/core/disposal.d.ts.map +1 -1
- package/dist/core.cjs +3 -3
- package/dist/core.js +3 -3
- package/dist/cornerFinder-BndBNtJE.cjs +58 -0
- package/dist/cornerFinder-DzGzfiqb.js +59 -0
- package/dist/curveBuilders-BUoFO1UG.cjs +196 -0
- package/dist/curveBuilders-CBlIWlbU.js +197 -0
- package/dist/{curveFns-BilyYL_s.cjs → curveFns-BrJDkaWi.cjs} +31 -44
- package/dist/{curveFns-CdVE4da7.js → curveFns-BshHA9Ys.js} +31 -44
- package/dist/{drawFns-921SkhDL.js → drawFns-Btmlh_Oz.js} +13 -14
- package/dist/{drawFns-CUyx50gi.cjs → drawFns-D2eDcf4k.cjs} +58 -59
- package/dist/{faceFns-DHu-2JpA.js → faceFns-DDzCECn3.js} +3 -3
- package/dist/{faceFns-BwK7FP7N.cjs → faceFns-NDRFeekj.cjs} +3 -3
- package/dist/helpers-Ck8GJ58k.cjs +203 -0
- package/dist/helpers-jku2V1DY.js +204 -0
- package/dist/io.cjs +4 -4
- package/dist/io.js +4 -4
- package/dist/kernel/occtAdapter.d.ts +1 -0
- package/dist/kernel/occtAdapter.d.ts.map +1 -1
- package/dist/kernel/sweepOps.d.ts +8 -0
- package/dist/kernel/sweepOps.d.ts.map +1 -1
- package/dist/kernel/types.d.ts +1 -0
- package/dist/kernel/types.d.ts.map +1 -1
- package/dist/loft-Bk9EM0gZ.js +373 -0
- package/dist/loft-DJXwxV_L.cjs +372 -0
- package/dist/{measurement-C5JGCuUP.js → measurement-DlXaTzKc.js} +3 -3
- package/dist/{measurement-fxm_pW7x.cjs → measurement-LcGh4wV0.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-AqAjTTVl.js → meshFns-Djzdn-CS.js} +1 -1
- package/dist/{meshFns-BhrZGi6w.cjs → meshFns-c8lDKfYy.cjs} +1 -1
- package/dist/{occtBoundary-du8_ex-p.cjs → occtBoundary-6kQSl3cF.cjs} +21 -0
- package/dist/{occtBoundary-CwegMzqc.js → occtBoundary-CqXvDhZY.js} +26 -5
- package/dist/operations/extrude.d.ts.map +1 -1
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/extrudeUtils.d.ts +17 -0
- package/dist/operations/extrudeUtils.d.ts.map +1 -1
- package/dist/{operations-C1rWoba2.js → operations-CrQlFDHc.js} +30 -7
- package/dist/{operations-BP1wVDw0.cjs → operations-Do-WZGXc.cjs} +30 -7
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +4 -4
- package/dist/query/cornerFinder.d.ts +48 -0
- package/dist/query/cornerFinder.d.ts.map +1 -0
- package/dist/query/directionUtils.d.ts +6 -0
- package/dist/query/directionUtils.d.ts.map +1 -0
- package/dist/query/edgeFinder.d.ts +15 -0
- package/dist/query/edgeFinder.d.ts.map +1 -0
- package/dist/query/faceFinder.d.ts +15 -0
- package/dist/query/faceFinder.d.ts.map +1 -0
- package/dist/query/finderCore.d.ts +35 -0
- package/dist/query/finderCore.d.ts.map +1 -0
- package/dist/query/finderFns.d.ts +21 -106
- package/dist/query/finderFns.d.ts.map +1 -1
- package/dist/query/shapeDistanceFilter.d.ts +11 -0
- package/dist/query/shapeDistanceFilter.d.ts.map +1 -0
- package/dist/query/vertexFinder.d.ts +16 -0
- package/dist/query/vertexFinder.d.ts.map +1 -0
- package/dist/query/wireFinder.d.ts +10 -0
- package/dist/query/wireFinder.d.ts.map +1 -0
- package/dist/query.cjs +42 -5
- package/dist/query.js +40 -2
- package/dist/{shapeFns-BrF97sKt.js → shapeFns-DQtpzndX.js} +17 -18
- package/dist/{shapeFns-BvOndshS.cjs → shapeFns-cN4qGpbO.cjs} +6 -7
- package/dist/{shapeTypes-DKhwEnUM.cjs → shapeTypes-BJ3Hmskg.cjs} +24 -20
- package/dist/{shapeTypes-BlSElW8z.js → shapeTypes-C9sUsmEW.js} +32 -28
- package/dist/sketching/Sketcher.d.ts.map +1 -1
- package/dist/sketching/Sketcher2d.d.ts +12 -4
- package/dist/sketching/Sketcher2d.d.ts.map +1 -1
- package/dist/sketching/ellipseUtils.d.ts +29 -0
- package/dist/sketching/ellipseUtils.d.ts.map +1 -0
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/curveBuilders.d.ts +75 -0
- package/dist/topology/curveBuilders.d.ts.map +1 -0
- package/dist/topology/curveFns.d.ts.map +1 -1
- package/dist/topology/primitiveFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/shapeHelpers.d.ts +6 -173
- package/dist/topology/shapeHelpers.d.ts.map +1 -1
- package/dist/topology/shapeUtils.d.ts +13 -0
- package/dist/topology/shapeUtils.d.ts.map +1 -0
- package/dist/topology/solidBuilders.d.ts +70 -0
- package/dist/topology/solidBuilders.d.ts.map +1 -0
- package/dist/topology/surfaceBuilders.d.ts +35 -0
- package/dist/topology/surfaceBuilders.d.ts.map +1 -0
- package/dist/topology/wrapperFns.d.ts +1 -0
- package/dist/topology/wrapperFns.d.ts.map +1 -1
- package/dist/{topology-tFzqSrGH.js → topology-CtfUZwLR.js} +8 -8
- package/dist/{topology-CIooytHH.cjs → topology-DXq8dLsi.cjs} +8 -8
- package/dist/topology.cjs +7 -7
- package/dist/topology.js +31 -31
- package/dist/{vectors-CBuaMeZv.js → vectors-BVgXsYWl.js} +1 -1
- package/dist/{vectors-ChWEZPwy.cjs → vectors-DK2hEKcI.cjs} +1 -1
- package/dist/vectors.cjs +2 -2
- package/dist/vectors.js +2 -2
- package/package.json +1 -1
- package/dist/loft-BzWFokmC.cjs +0 -178
- package/dist/loft-CtG5nMq5.js +0 -179
- package/dist/query-V6nV-VfL.js +0 -396
- package/dist/query-hMSmOWJP.cjs +0 -395
- package/dist/shapeHelpers-B2SXz1p4.cjs +0 -488
- package/dist/shapeHelpers-BcoZf2N9.js +0 -489
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shapeHelpers.d.ts","sourceRoot":"","sources":["../../src/topology/shapeHelpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shapeHelpers.d.ts","sourceRoot":"","sources":["../../src/topology/shapeHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,QAAQ,EACR,UAAU,EACV,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,wBAAwB,EACxB,KAAK,2BAA2B,EAChC,eAAe,EACf,cAAc,EACd,YAAY,GACb,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,QAAQ,EACR,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,aAAa,EACb,OAAO,EACP,UAAU,EACV,UAAU,EACV,YAAY,EACZ,SAAS,GACV,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Result } from '../core/result.js';
|
|
2
|
+
import { AnyShape, Face, Shell } from '../core/shapeTypes.js';
|
|
3
|
+
/** Sew faces/shells into a single shape using the kernel's sewing algorithm. */
|
|
4
|
+
export declare function weldShapes(facesOrShells: Array<Face | Shell>): AnyShape;
|
|
5
|
+
/**
|
|
6
|
+
* Welds faces and shells into a single shell.
|
|
7
|
+
*
|
|
8
|
+
* @param facesOrShells - An array of faces and shells to be welded.
|
|
9
|
+
* @param ignoreType - If true, the function will not check if the result is a shell.
|
|
10
|
+
* @returns A shell that contains all the faces and shells.
|
|
11
|
+
*/
|
|
12
|
+
export declare function weldShellsAndFaces(facesOrShells: Array<Face | Shell>, ignoreType?: boolean): Result<Shell>;
|
|
13
|
+
//# sourceMappingURL=shapeUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shapeUtils.d.ts","sourceRoot":"","sources":["../../src/topology/shapeUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,KAAK,MAAM,EAAmB,MAAM,mBAAmB,CAAC;AAEjE,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAInE,gFAAgF;AAChF,wBAAgB,UAAU,CAAC,aAAa,EAAE,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,QAAQ,CAGvE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,EAClC,UAAU,UAAQ,GACjB,MAAM,CAAC,KAAK,CAAC,CAOf"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Vec3 } from '../core/types.js';
|
|
2
|
+
import { Result } from '../core/result.js';
|
|
3
|
+
import { AnyShape, Shape3D, Compound, Face, Vertex, Shell, Solid } from '../core/shapeTypes.js';
|
|
4
|
+
/**
|
|
5
|
+
* Creates a cylinder with the given radius and height.
|
|
6
|
+
*
|
|
7
|
+
* @category Solids
|
|
8
|
+
*/
|
|
9
|
+
export declare function makeCylinder(radius: number, height: number, location?: Vec3, direction?: Vec3): Solid;
|
|
10
|
+
/**
|
|
11
|
+
* Creates a sphere with the given radius.
|
|
12
|
+
*
|
|
13
|
+
* @category Solids
|
|
14
|
+
*/
|
|
15
|
+
export declare function makeSphere(radius: number): Solid;
|
|
16
|
+
/**
|
|
17
|
+
* Creates a cone (or frustum) with the given radii and height.
|
|
18
|
+
*
|
|
19
|
+
* @category Solids
|
|
20
|
+
*/
|
|
21
|
+
export declare function makeCone(radius1: number, radius2: number, height: number, location?: Vec3, direction?: Vec3): Solid;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a torus with the given major and minor radii.
|
|
24
|
+
*
|
|
25
|
+
* @category Solids
|
|
26
|
+
*/
|
|
27
|
+
export declare function makeTorus(majorRadius: number, minorRadius: number, location?: Vec3, direction?: Vec3): Solid;
|
|
28
|
+
/**
|
|
29
|
+
* Creates an ellipsoid with the given axis lengths.
|
|
30
|
+
*
|
|
31
|
+
* The algorithm creates a unit BSpline sphere surface, transforms its
|
|
32
|
+
* control-point poles with an affinity matrix to match the requested
|
|
33
|
+
* axis half-lengths, then sews the result into a solid.
|
|
34
|
+
*
|
|
35
|
+
* @category Solids
|
|
36
|
+
*/
|
|
37
|
+
export declare function makeEllipsoid(aLength: number, bLength: number, cLength: number): Solid;
|
|
38
|
+
/**
|
|
39
|
+
* Creates a box with the given corner points.
|
|
40
|
+
*
|
|
41
|
+
* @category Solids
|
|
42
|
+
*/
|
|
43
|
+
export declare function makeBox(corner1: Vec3, corner2: Vec3): Solid;
|
|
44
|
+
/** Create a vertex at a 3D point. */
|
|
45
|
+
export declare function makeVertex(point: Vec3): Vertex;
|
|
46
|
+
/**
|
|
47
|
+
* Create an offset shape from a face.
|
|
48
|
+
*
|
|
49
|
+
* @param offset - Signed offset distance (positive = outward).
|
|
50
|
+
* @param tolerance - Geometric tolerance for the offset algorithm.
|
|
51
|
+
* @returns An error if the result is not a valid 3D shape.
|
|
52
|
+
*/
|
|
53
|
+
export declare function makeOffset(face: Face, offset: number, tolerance?: number): Result<Shape3D>;
|
|
54
|
+
/**
|
|
55
|
+
* Build a compound from multiple shapes.
|
|
56
|
+
*
|
|
57
|
+
* @param shapeArray - Shapes to group into a single compound.
|
|
58
|
+
* @returns A new Compound containing all input shapes.
|
|
59
|
+
*/
|
|
60
|
+
export declare function makeCompound(shapeArray: AnyShape[]): Compound;
|
|
61
|
+
/**
|
|
62
|
+
* Welds faces and shells into a single shell and then makes a solid.
|
|
63
|
+
*
|
|
64
|
+
* @param facesOrShells - An array of faces and shells to be welded.
|
|
65
|
+
* @returns A solid that contains all the faces and shells.
|
|
66
|
+
*
|
|
67
|
+
* @category Solids
|
|
68
|
+
*/
|
|
69
|
+
export declare function makeSolid(facesOrShells: Array<Face | Shell>): Result<Solid>;
|
|
70
|
+
//# sourceMappingURL=solidBuilders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solidBuilders.d.ts","sourceRoot":"","sources":["../../src/topology/solidBuilders.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE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,QAAQ,EAAE,GAAG,QAAQ,CAY7D;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,aAAa,EAAE,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAS3E"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Vec3 } from '../core/types.js';
|
|
2
|
+
import { Result } from '../core/result.js';
|
|
3
|
+
import { Face, Wire } from '../core/shapeTypes.js';
|
|
4
|
+
/**
|
|
5
|
+
* Create a planar face from a closed wire, optionally with hole wires.
|
|
6
|
+
*
|
|
7
|
+
* @returns An error if the wire is non-planar or the face cannot be built.
|
|
8
|
+
*/
|
|
9
|
+
export declare function makeFace(wire: Wire, holes?: Wire[]): Result<Face>;
|
|
10
|
+
/**
|
|
11
|
+
* Create a face bounded by a wire on an existing face's underlying surface.
|
|
12
|
+
*
|
|
13
|
+
* @param originFace - Face whose surface geometry is reused.
|
|
14
|
+
* @param wire - Wire that defines the boundary on that surface.
|
|
15
|
+
*/
|
|
16
|
+
export declare function makeNewFaceWithinFace(originFace: Face, wire: Wire): Face;
|
|
17
|
+
/**
|
|
18
|
+
* Create a non-planar face from a wire using surface filling.
|
|
19
|
+
*
|
|
20
|
+
* @returns An error if the filling algorithm fails to produce a face.
|
|
21
|
+
*/
|
|
22
|
+
export declare function makeNonPlanarFace(wire: Wire): Result<Face>;
|
|
23
|
+
/**
|
|
24
|
+
* Add hole wires to an existing face.
|
|
25
|
+
*
|
|
26
|
+
* Orientation of the holes is automatically fixed.
|
|
27
|
+
*/
|
|
28
|
+
export declare function addHolesInFace(face: Face, holes: Wire[]): Face;
|
|
29
|
+
/**
|
|
30
|
+
* Create a polygonal face from three or more coplanar points.
|
|
31
|
+
*
|
|
32
|
+
* @returns An error if fewer than 3 points are provided or the face cannot be built.
|
|
33
|
+
*/
|
|
34
|
+
export declare function makePolygon(points: Vec3[]): Result<Face>;
|
|
35
|
+
//# sourceMappingURL=surfaceBuilders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surfaceBuilders.d.ts","sourceRoot":"","sources":["../../src/topology/surfaceBuilders.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,KAAK,MAAM,EAAoB,MAAM,mBAAmB,CAAC;AAElE,OAAO,KAAK,EAAQ,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAO9D;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,CAgBjE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CASxE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CA0B1D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAiB9D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,CAWxD"}
|
|
@@ -74,6 +74,7 @@ export interface Wrapped3D<T extends Shape3D> extends Wrapped<T> {
|
|
|
74
74
|
fuse(tool: Shapeable<Shape3D>, options?: BooleanOptions): Wrapped3D<T>;
|
|
75
75
|
cut(tool: Shapeable<Shape3D>, options?: BooleanOptions): Wrapped3D<T>;
|
|
76
76
|
intersect(tool: Shapeable<Shape3D>, options?: BooleanOptions): Wrapped3D<T>;
|
|
77
|
+
fuseAll(tools: Shapeable<Shape3D>[], options?: BooleanOptions): Wrapped3D<T>;
|
|
77
78
|
cutAll(tools: Shape3D[], options?: BooleanOptions): Wrapped3D<T>;
|
|
78
79
|
section(plane: PlaneInput, options?: {
|
|
79
80
|
approximation?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapperFns.d.ts","sourceRoot":"","sources":["../../src/topology/wrapperFns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EACV,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,KAAK,EACL,MAAM,EACN,OAAO,EACR,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA+B1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AASrE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAY9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAahE;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,Q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,SAAS,CAAC,KAAK,CAAC,CAAC;IACjD,OAAO,CAAC,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,IAAI,CAAC;QAAC,EAAE,CAAC,EAAE,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;CACnF;AAiLD,2FAA2F;AAC3F,wBAAgB,KAAK,CAAC,YAAY,EAAE;IAAE,IAAI,IAAI,IAAI,CAAA;CAAE,GAAG,IAAI,GAAG,WAAW,CAAC;AAC1E,iDAAiD;AACjD,wBAAgB,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;AACtD,iDAAiD;AACjD,wBAAgB,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;AACtD,iDAAiD;AACjD,wBAAgB,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;AACtD,gDAAgD;AAChD,wBAAgB,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;AACtD,mDAAmD;AACnD,wBAAgB,KAAK,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./booleanFns-
|
|
3
|
-
import { g as getKernel } from "./occtBoundary-
|
|
4
|
-
import { c as castShape, h as isShape3D, k as isSolid, e as isFace, m as isWire } from "./shapeTypes-
|
|
5
|
-
import { d as downcast } from "./cast-
|
|
1
|
+
import { l as getWires, j as getFaces } from "./shapeFns-DQtpzndX.js";
|
|
2
|
+
import "./booleanFns-CkccZ7UL.js";
|
|
3
|
+
import { g as getKernel } from "./occtBoundary-CqXvDhZY.js";
|
|
4
|
+
import { c as castShape, h as isShape3D, k as isSolid, e as isFace, m as isWire } from "./shapeTypes-C9sUsmEW.js";
|
|
5
|
+
import { d as downcast } from "./cast-C4Ff_1Qe.js";
|
|
6
6
|
import { e as err, x as validationError, o as occtError, d as isErr, p as typeCastError, l as ok, u as unwrap, g as isOk, B as BrepErrorCode } from "./errors-wGhcJMpB.js";
|
|
7
|
-
import "./curveFns-
|
|
8
|
-
import "./faceFns-
|
|
7
|
+
import "./curveFns-BshHA9Ys.js";
|
|
8
|
+
import "./faceFns-DDzCECn3.js";
|
|
9
9
|
import { H as HASH_CODE_MAX } from "./vecOps-ZDdZWbwT.js";
|
|
10
|
-
import "./meshFns-
|
|
10
|
+
import "./meshFns-Djzdn-CS.js";
|
|
11
11
|
function toBufferGeometryData(mesh) {
|
|
12
12
|
return {
|
|
13
13
|
position: mesh.vertices,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const shapeFns = require("./shapeFns-
|
|
3
|
-
require("./booleanFns-
|
|
4
|
-
const occtBoundary = require("./occtBoundary-
|
|
5
|
-
const shapeTypes = require("./shapeTypes-
|
|
6
|
-
const cast = require("./cast-
|
|
2
|
+
const shapeFns = require("./shapeFns-cN4qGpbO.cjs");
|
|
3
|
+
require("./booleanFns-BxW-N3rP.cjs");
|
|
4
|
+
const occtBoundary = require("./occtBoundary-6kQSl3cF.cjs");
|
|
5
|
+
const shapeTypes = require("./shapeTypes-BJ3Hmskg.cjs");
|
|
6
|
+
const cast = require("./cast-DIiyxDLo.cjs");
|
|
7
7
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
8
|
-
require("./curveFns-
|
|
9
|
-
require("./faceFns-
|
|
8
|
+
require("./curveFns-BrJDkaWi.cjs");
|
|
9
|
+
require("./faceFns-NDRFeekj.cjs");
|
|
10
10
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
11
|
-
require("./meshFns-
|
|
11
|
+
require("./meshFns-c8lDKfYy.cjs");
|
|
12
12
|
function toBufferGeometryData(mesh) {
|
|
13
13
|
return {
|
|
14
14
|
position: mesh.vertices,
|
package/dist/topology.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const shapeFns = require("./shapeFns-
|
|
4
|
-
const booleanFns = require("./booleanFns-
|
|
5
|
-
const topology = require("./topology-
|
|
6
|
-
const curveFns = require("./curveFns-
|
|
7
|
-
const faceFns = require("./faceFns-
|
|
8
|
-
const meshFns = require("./meshFns-
|
|
9
|
-
const cast = require("./cast-
|
|
3
|
+
const shapeFns = require("./shapeFns-cN4qGpbO.cjs");
|
|
4
|
+
const booleanFns = require("./booleanFns-BxW-N3rP.cjs");
|
|
5
|
+
const topology = require("./topology-DXq8dLsi.cjs");
|
|
6
|
+
const curveFns = require("./curveFns-BrJDkaWi.cjs");
|
|
7
|
+
const faceFns = require("./faceFns-NDRFeekj.cjs");
|
|
8
|
+
const meshFns = require("./meshFns-c8lDKfYy.cjs");
|
|
9
|
+
const cast = require("./cast-DIiyxDLo.cjs");
|
|
10
10
|
exports.getBounds = shapeFns.getBounds;
|
|
11
11
|
exports.getEdges = shapeFns.getEdges;
|
|
12
12
|
exports.getFaces = shapeFns.getFaces;
|
package/dist/topology.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d,
|
|
3
|
-
import { a, b, c, e as e2, f
|
|
4
|
-
import { g as
|
|
5
|
-
import { c as c3, f as
|
|
6
|
-
import { c as c4, b as b4, e as e5, d as d5, f as
|
|
7
|
-
import { e as e6, c as c5, f as
|
|
1
|
+
import { h, a, j, g, k, l, n, i, o, p, q, u, v } from "./shapeFns-DQtpzndX.js";
|
|
2
|
+
import { d, e } from "./booleanFns-CkccZ7UL.js";
|
|
3
|
+
import { a as a2, b, c, e as e2, f, d as d2, g as g2, j as j2, s, t, k as k2, l as l2, v as v2, w } from "./topology-CtfUZwLR.js";
|
|
4
|
+
import { g as g3, d as d3, c as c2, h as h2, f as f2, i as i2, b as b2, e as e3, a as a3, k as k3, l as l3, m, n as n2, o as o2 } from "./curveFns-BshHA9Ys.js";
|
|
5
|
+
import { c as c3, f as f3, a as a4, b as b3, d as d4, g as g4, i as i3, n as n3, o as o3, p as p2, e as e4, u as u2, h as h3 } from "./faceFns-DDzCECn3.js";
|
|
6
|
+
import { c as c4, b as b4, e as e5, d as d5, f as f4 } from "./meshFns-Djzdn-CS.js";
|
|
7
|
+
import { e as e6, c as c5, f as f5, d as d6, g as g5, i as i4, s as s2 } from "./cast-C4Ff_1Qe.js";
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
a2 as adjacentFaces,
|
|
10
|
+
g3 as approximateCurve,
|
|
11
11
|
e6 as asTopo,
|
|
12
12
|
b as autoHeal,
|
|
13
13
|
c5 as cast,
|
|
@@ -18,45 +18,45 @@ export {
|
|
|
18
18
|
d3 as curveEndPoint,
|
|
19
19
|
c2 as curveIsClosed,
|
|
20
20
|
h2 as curveIsPeriodic,
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
f2 as curveLength,
|
|
22
|
+
i2 as curvePeriod,
|
|
23
23
|
b2 as curvePointAt,
|
|
24
24
|
e3 as curveStartPoint,
|
|
25
|
-
|
|
25
|
+
a3 as curveTangentAt,
|
|
26
26
|
d as cutAll,
|
|
27
|
-
|
|
27
|
+
f5 as deserializeShape,
|
|
28
28
|
d6 as downcast,
|
|
29
29
|
e2 as edgesOfFace,
|
|
30
30
|
e5 as exportIGES,
|
|
31
31
|
d5 as exportSTEP,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
f4 as exportSTL,
|
|
33
|
+
f3 as faceCenter,
|
|
34
|
+
a4 as faceGeomType,
|
|
35
35
|
b3 as faceOrientation,
|
|
36
|
-
|
|
36
|
+
f as facesOfEdge,
|
|
37
37
|
d4 as flipFaceOrientation,
|
|
38
38
|
k3 as flipOrientation,
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
e as fuseAll,
|
|
40
|
+
h as getBounds,
|
|
41
41
|
l3 as getCurveType,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
a as getEdges,
|
|
43
|
+
j as getFaces,
|
|
44
|
+
g as getHashCode,
|
|
45
45
|
m as getOrientation,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
g4 as getSurfaceType,
|
|
47
|
+
k as getVertices,
|
|
48
|
+
l as getWires,
|
|
49
49
|
d2 as healFace,
|
|
50
|
-
|
|
50
|
+
g2 as healSolid,
|
|
51
51
|
j2 as healWire,
|
|
52
|
-
|
|
52
|
+
i3 as innerWires,
|
|
53
53
|
n2 as interpolateCurve,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
g5 as isCompSolid,
|
|
55
|
+
n as isEqualShape,
|
|
56
|
+
i as isSameShape,
|
|
57
57
|
o as iterEdges,
|
|
58
58
|
p as iterFaces,
|
|
59
|
-
|
|
59
|
+
i4 as iterTopo,
|
|
60
60
|
q as iterVertices,
|
|
61
61
|
u as iterWires,
|
|
62
62
|
n3 as normalAt,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as makeOcAx3, a as toVec3 } from "./occtBoundary-CqXvDhZY.js";
|
|
2
2
|
import { j as vecNormalize, f as vecIsZero, b as vecCross, v as vecAdd, n as vecScale, o as vecSub, d as vecDot, m as vecRotate, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
3
3
|
import { e as err, x as validationError, l as ok } from "./errors-wGhcJMpB.js";
|
|
4
4
|
function createPlane(origin, xDirection = null, normal = [0, 0, 1]) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-6kQSl3cF.cjs");
|
|
3
3
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
4
4
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
5
5
|
function createPlane(origin, xDirection = null, normal = [0, 0, 1]) {
|
package/dist/vectors.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
+
const occtBoundary = require("./occtBoundary-6kQSl3cF.cjs");
|
|
4
4
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
5
|
-
const vectors = require("./vectors-
|
|
5
|
+
const vectors = require("./vectors-DK2hEKcI.cjs");
|
|
6
6
|
exports.resolveDirection = occtBoundary.resolveDirection;
|
|
7
7
|
exports.toVec2 = occtBoundary.toVec2;
|
|
8
8
|
exports.toVec3 = occtBoundary.toVec3;
|
package/dist/vectors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r, t, a } from "./occtBoundary-
|
|
1
|
+
import { r, t, a } from "./occtBoundary-CqXvDhZY.js";
|
|
2
2
|
import { D, R, v, a as a2, b, c, d, e, f, g, h, i, j, k, l, m, n, o } from "./vecOps-ZDdZWbwT.js";
|
|
3
|
-
import { c as c2, a as a3, p, r as r2, t as t2 } from "./vectors-
|
|
3
|
+
import { c as c2, a as a3, p, r as r2, t as t2 } from "./vectors-BVgXsYWl.js";
|
|
4
4
|
export {
|
|
5
5
|
D as DEG2RAD,
|
|
6
6
|
R as RAD2DEG,
|
package/package.json
CHANGED
package/dist/loft-BzWFokmC.cjs
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-du8_ex-p.cjs");
|
|
3
|
-
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
4
|
-
const cast = require("./cast-DkB0GKmQ.cjs");
|
|
5
|
-
const errors = require("./errors-DK1VAdP4.cjs");
|
|
6
|
-
const shapeTypes = require("./shapeTypes-DKhwEnUM.cjs");
|
|
7
|
-
const shapeHelpers = require("./shapeHelpers-B2SXz1p4.cjs");
|
|
8
|
-
function buildLawFromProfile(extrusionLength, { profile, endFactor = 1 }) {
|
|
9
|
-
const oc = occtBoundary.getKernel().oc;
|
|
10
|
-
const r = shapeTypes.gcWithScope();
|
|
11
|
-
let law;
|
|
12
|
-
if (profile === "s-curve") {
|
|
13
|
-
law = r(new oc.Law_S());
|
|
14
|
-
law.Set_1(0, 1, extrusionLength, endFactor);
|
|
15
|
-
} else if (profile === "linear") {
|
|
16
|
-
law = r(new oc.Law_Linear());
|
|
17
|
-
law.Set(0, 1, extrusionLength, endFactor);
|
|
18
|
-
} else {
|
|
19
|
-
return errors.err(
|
|
20
|
-
errors.validationError("UNSUPPORTED_PROFILE", `Unsupported extrusion profile: ${String(profile)}`)
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
return errors.ok(law.Trim(0, extrusionLength, 1e-6));
|
|
24
|
-
}
|
|
25
|
-
const basicFaceExtrusion = (face, extrusionVec) => {
|
|
26
|
-
const oc = occtBoundary.getKernel().oc;
|
|
27
|
-
const [r, gc] = shapeTypes.localGC();
|
|
28
|
-
const vec = occtBoundary.toVec3(extrusionVec);
|
|
29
|
-
const ocVec = r(new oc.gp_Vec_4(vec[0], vec[1], vec[2]));
|
|
30
|
-
const solidBuilder = r(new oc.BRepPrimAPI_MakePrism_1(face.wrapped, ocVec, false, true));
|
|
31
|
-
const solid = shapeTypes.createSolid(errors.unwrap(cast.downcast(solidBuilder.Shape())));
|
|
32
|
-
gc();
|
|
33
|
-
return solid;
|
|
34
|
-
};
|
|
35
|
-
const revolution = (face, center = [0, 0, 0], direction = [0, 0, 1], angle = 360) => {
|
|
36
|
-
const oc = occtBoundary.getKernel().oc;
|
|
37
|
-
const [r, gc] = shapeTypes.localGC();
|
|
38
|
-
const centerVec = occtBoundary.toVec3(center);
|
|
39
|
-
const directionVec = occtBoundary.toVec3(direction);
|
|
40
|
-
const ax = r(occtBoundary.makeOcAx1(centerVec, directionVec));
|
|
41
|
-
const revolBuilder = r(new oc.BRepPrimAPI_MakeRevol_1(face.wrapped, ax, angle * vecOps.DEG2RAD, false));
|
|
42
|
-
const result = errors.andThen(cast.cast(revolBuilder.Shape()), (shape) => {
|
|
43
|
-
if (!cast.isShape3D(shape))
|
|
44
|
-
return errors.err(errors.typeCastError("REVOLUTION_NOT_3D", "Revolution did not produce a 3D shape"));
|
|
45
|
-
return errors.ok(shape);
|
|
46
|
-
});
|
|
47
|
-
gc();
|
|
48
|
-
return result;
|
|
49
|
-
};
|
|
50
|
-
function genericSweep(wire, spine, {
|
|
51
|
-
frenet = false,
|
|
52
|
-
auxiliarySpine,
|
|
53
|
-
law = null,
|
|
54
|
-
transitionMode = "right",
|
|
55
|
-
withContact,
|
|
56
|
-
support,
|
|
57
|
-
forceProfileSpineOthogonality
|
|
58
|
-
} = {}, shellMode = false) {
|
|
59
|
-
const oc = occtBoundary.getKernel().oc;
|
|
60
|
-
const [r, gc] = shapeTypes.localGC();
|
|
61
|
-
const withCorrection = transitionMode === "round" ? true : !!forceProfileSpineOthogonality;
|
|
62
|
-
const sweepBuilder = r(new oc.BRepOffsetAPI_MakePipeShell(spine.wrapped));
|
|
63
|
-
{
|
|
64
|
-
const mode = {
|
|
65
|
-
transformed: oc.BRepBuilderAPI_TransitionMode.BRepBuilderAPI_Transformed,
|
|
66
|
-
round: oc.BRepBuilderAPI_TransitionMode.BRepBuilderAPI_RoundCorner,
|
|
67
|
-
right: oc.BRepBuilderAPI_TransitionMode.BRepBuilderAPI_RightCorner
|
|
68
|
-
}[transitionMode];
|
|
69
|
-
if (mode) sweepBuilder.SetTransitionMode(mode);
|
|
70
|
-
}
|
|
71
|
-
if (support) {
|
|
72
|
-
sweepBuilder.SetMode_4(support);
|
|
73
|
-
} else if (frenet) {
|
|
74
|
-
sweepBuilder.SetMode_1(frenet);
|
|
75
|
-
}
|
|
76
|
-
if (auxiliarySpine) {
|
|
77
|
-
sweepBuilder.SetMode_5(
|
|
78
|
-
auxiliarySpine.wrapped,
|
|
79
|
-
false,
|
|
80
|
-
oc.BRepFill_TypeOfContact.BRepFill_NoContact
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
if (!law) sweepBuilder.Add_1(wire.wrapped, !!withContact, withCorrection);
|
|
84
|
-
else sweepBuilder.SetLaw_1(wire.wrapped, law, !!withContact, withCorrection);
|
|
85
|
-
const progress = r(new oc.Message_ProgressRange_1());
|
|
86
|
-
sweepBuilder.Build(progress);
|
|
87
|
-
if (!sweepBuilder.IsDone()) {
|
|
88
|
-
gc();
|
|
89
|
-
return errors.err(errors.occtError("SWEEP_FAILED", "Sweep operation failed"));
|
|
90
|
-
}
|
|
91
|
-
if (!shellMode) {
|
|
92
|
-
sweepBuilder.MakeSolid();
|
|
93
|
-
}
|
|
94
|
-
const shape = errors.unwrap(cast.cast(sweepBuilder.Shape()));
|
|
95
|
-
if (!cast.isShape3D(shape)) {
|
|
96
|
-
gc();
|
|
97
|
-
return errors.err(errors.typeCastError("SWEEP_NOT_3D", "Sweep did not produce a 3D shape"));
|
|
98
|
-
}
|
|
99
|
-
if (shellMode) {
|
|
100
|
-
const startWire = errors.unwrap(cast.cast(sweepBuilder.FirstShape()));
|
|
101
|
-
const endWire = errors.unwrap(cast.cast(sweepBuilder.LastShape()));
|
|
102
|
-
if (!cast.isWire(startWire)) {
|
|
103
|
-
gc();
|
|
104
|
-
return errors.err(errors.typeCastError("SWEEP_START_NOT_WIRE", "Sweep did not produce a start Wire"));
|
|
105
|
-
}
|
|
106
|
-
if (!cast.isWire(endWire)) {
|
|
107
|
-
gc();
|
|
108
|
-
return errors.err(errors.typeCastError("SWEEP_END_NOT_WIRE", "Sweep did not produce an end Wire"));
|
|
109
|
-
}
|
|
110
|
-
gc();
|
|
111
|
-
return errors.ok([shape, startWire, endWire]);
|
|
112
|
-
}
|
|
113
|
-
gc();
|
|
114
|
-
return errors.ok(shape);
|
|
115
|
-
}
|
|
116
|
-
function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
|
|
117
|
-
const [r, gc] = shapeTypes.localGC();
|
|
118
|
-
const centerVec = occtBoundary.toVec3(center);
|
|
119
|
-
const normalVec = occtBoundary.toVec3(normal);
|
|
120
|
-
const endVec = vecOps.vecAdd(centerVec, normalVec);
|
|
121
|
-
const mainSpineEdge = r(shapeHelpers.makeLine(centerVec, endVec));
|
|
122
|
-
const spine = r(errors.unwrap(shapeHelpers.assembleWire([mainSpineEdge])));
|
|
123
|
-
const law = profileShape ? r(errors.unwrap(buildLawFromProfile(vecOps.vecLength(normalVec), profileShape))) : null;
|
|
124
|
-
const result = shellMode ? genericSweep(wire, spine, { law }, shellMode) : genericSweep(wire, spine, { law }, shellMode);
|
|
125
|
-
gc();
|
|
126
|
-
return result;
|
|
127
|
-
}
|
|
128
|
-
function twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMode = false) {
|
|
129
|
-
const [r, gc] = shapeTypes.localGC();
|
|
130
|
-
const centerVec = occtBoundary.toVec3(center);
|
|
131
|
-
const normalVec = occtBoundary.toVec3(normal);
|
|
132
|
-
const endVec = vecOps.vecAdd(centerVec, normalVec);
|
|
133
|
-
const mainSpineEdge = r(shapeHelpers.makeLine(centerVec, endVec));
|
|
134
|
-
const spine = r(errors.unwrap(shapeHelpers.assembleWire([mainSpineEdge])));
|
|
135
|
-
const extrusionLength = vecOps.vecLength(normalVec);
|
|
136
|
-
const pitch = 360 / angleDegrees * extrusionLength;
|
|
137
|
-
const radius = 1;
|
|
138
|
-
const auxiliarySpine = r(shapeHelpers.makeHelix(pitch, extrusionLength, radius, centerVec, normalVec));
|
|
139
|
-
const law = profileShape ? r(errors.unwrap(buildLawFromProfile(extrusionLength, profileShape))) : null;
|
|
140
|
-
const result = shellMode ? genericSweep(wire, spine, { auxiliarySpine, law }, shellMode) : genericSweep(wire, spine, { auxiliarySpine, law }, shellMode);
|
|
141
|
-
gc();
|
|
142
|
-
return result;
|
|
143
|
-
}
|
|
144
|
-
const loft = (wires, { ruled = true, startPoint, endPoint } = {}, returnShell = false) => {
|
|
145
|
-
if (wires.length === 0 && !startPoint && !endPoint) {
|
|
146
|
-
return errors.err(errors.validationError("LOFT_EMPTY", "Loft requires at least one wire or start/end point"));
|
|
147
|
-
}
|
|
148
|
-
const oc = occtBoundary.getKernel().oc;
|
|
149
|
-
const [r, gc] = shapeTypes.localGC();
|
|
150
|
-
const loftBuilder = r(new oc.BRepOffsetAPI_ThruSections(!returnShell, ruled, 1e-6));
|
|
151
|
-
if (startPoint) {
|
|
152
|
-
loftBuilder.AddVertex(r(shapeHelpers.makeVertex(occtBoundary.toVec3(startPoint))).wrapped);
|
|
153
|
-
}
|
|
154
|
-
wires.forEach((w) => loftBuilder.AddWire(w.wrapped));
|
|
155
|
-
if (endPoint) {
|
|
156
|
-
loftBuilder.AddVertex(r(shapeHelpers.makeVertex(occtBoundary.toVec3(endPoint))).wrapped);
|
|
157
|
-
}
|
|
158
|
-
const progress = r(new oc.Message_ProgressRange_1());
|
|
159
|
-
loftBuilder.Build(progress);
|
|
160
|
-
if (!loftBuilder.IsDone()) {
|
|
161
|
-
gc();
|
|
162
|
-
return errors.err(errors.occtError("LOFT_FAILED", "Loft operation failed"));
|
|
163
|
-
}
|
|
164
|
-
const result = errors.andThen(cast.cast(loftBuilder.Shape()), (shape) => {
|
|
165
|
-
if (!cast.isShape3D(shape))
|
|
166
|
-
return errors.err(errors.typeCastError("LOFT_NOT_3D", "Loft did not produce a 3D shape"));
|
|
167
|
-
return errors.ok(shape);
|
|
168
|
-
});
|
|
169
|
-
gc();
|
|
170
|
-
return result;
|
|
171
|
-
};
|
|
172
|
-
exports.basicFaceExtrusion = basicFaceExtrusion;
|
|
173
|
-
exports.buildLawFromProfile = buildLawFromProfile;
|
|
174
|
-
exports.complexExtrude = complexExtrude;
|
|
175
|
-
exports.genericSweep = genericSweep;
|
|
176
|
-
exports.loft = loft;
|
|
177
|
-
exports.revolution = revolution;
|
|
178
|
-
exports.twistExtrude = twistExtrude;
|