brepjs 7.2.0 → 7.3.0
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/README.md +1 -0
- package/dist/2d/blueprints/blueprintFns.d.ts +33 -64
- package/dist/2d/blueprints/blueprintFns.d.ts.map +1 -1
- package/dist/2d/blueprints/boolean2dFns.d.ts +6 -3
- package/dist/2d/blueprints/boolean2dFns.d.ts.map +1 -1
- package/dist/2d.cjs +57 -13
- package/dist/2d.d.ts +6 -2
- package/dist/2d.d.ts.map +1 -1
- package/dist/2d.js +59 -15
- package/dist/{Blueprint-DCoXzdIm.cjs → Blueprint-3Dyu0OL6.cjs} +7 -7
- package/dist/{Blueprint-9Gdmj67R.js → Blueprint-DSHD89bZ.js} +7 -7
- package/dist/{boolean2D-9E0ZB4yu.cjs → boolean2D-BwOpOv6L.cjs} +9 -9
- package/dist/{boolean2D-BfpQtXOQ.js → boolean2D-CtyE2hK5.js} +9 -9
- package/dist/{booleanFns-7VTkk7ns.cjs → booleanFns-5KSbtLBU.cjs} +2 -2
- package/dist/{booleanFns-CZzbd4sX.js → booleanFns-DcxqLQSG.js} +2 -2
- package/dist/brepjs.cjs +95 -30
- package/dist/brepjs.js +134 -69
- package/dist/{cast-Bx3PuKsP.js → cast-D1s7Im9E.js} +1 -1
- package/dist/{cast-CQ7SKb6A.cjs → cast-DsxJk_F0.cjs} +1 -1
- package/dist/core/errors.d.ts +19 -8
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/kernelCall.d.ts +6 -0
- package/dist/core/kernelCall.d.ts.map +1 -1
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{curveFns-DqT7DqLQ.cjs → curveFns-BilyYL_s.cjs} +1 -1
- package/dist/{curveFns-DFRn4NzJ.js → curveFns-CdVE4da7.js} +1 -1
- package/dist/{drawFns-jZkfPayI.cjs → drawFns-C6KQjmQj.cjs} +11 -11
- package/dist/{drawFns-CzYsisur.js → drawFns-CSbH7uoI.js} +11 -11
- package/dist/{errors-C7Inmd1n.cjs → errors-DK1VAdP4.cjs} +81 -17
- package/dist/{errors-EPHOk9hi.js → errors-wGhcJMpB.js} +82 -18
- package/dist/{faceFns-BOc1QawY.cjs → faceFns-B9if-FPW.cjs} +2 -2
- package/dist/{faceFns-SBxx55zv.js → faceFns-Bl6HHbqO.js} +2 -2
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/io.cjs +3 -3
- package/dist/io.js +3 -3
- package/dist/{loft-BJHEEDu4.js → loft-BlNndTOR.js} +3 -3
- package/dist/{loft-Cz36k5dM.cjs → loft-Cc5E5pAf.cjs} +3 -3
- package/dist/{measurement-DqiOwyhS.cjs → measurement-BVdZ9cG3.cjs} +1 -1
- package/dist/{measurement-DZUawVj4.js → measurement-D75pyJi1.js} +10 -10
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +8 -8
- package/dist/{meshFns-OmRn9qly.cjs → meshFns-mVlogI3J.cjs} +1 -1
- package/dist/{meshFns-BanGVcaW.js → meshFns-p_kv--PW.js} +1 -1
- package/dist/operations/api.d.ts +4 -4
- package/dist/operations/api.d.ts.map +1 -1
- package/dist/operations/exporterFns.d.ts +4 -2
- package/dist/operations/exporterFns.d.ts.map +1 -1
- package/dist/operations/exporters.d.ts +3 -3
- package/dist/operations/exporters.d.ts.map +1 -1
- package/dist/operations/extrude.d.ts +6 -4
- package/dist/operations/extrude.d.ts.map +1 -1
- package/dist/operations/extrudeFns.d.ts +3 -3
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/extrudeUtils.d.ts +3 -1
- package/dist/operations/extrudeUtils.d.ts.map +1 -1
- package/dist/operations/loft.d.ts +2 -2
- package/dist/operations/loft.d.ts.map +1 -1
- package/dist/operations/loftFns.d.ts +4 -2
- package/dist/operations/loftFns.d.ts.map +1 -1
- package/dist/{operations-C6ry44Xe.js → operations-CEV-gqkX.js} +5 -5
- package/dist/{operations-IwYUx4V_.cjs → operations-SRN-mfTx.cjs} +5 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.d.ts +3 -3
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +2 -2
- package/dist/{query-CMkm1olv.js → query-D7XclvBZ.js} +6 -6
- package/dist/{query-Dd1h9qFw.cjs → query-DkcMfh6j.cjs} +6 -6
- package/dist/query.cjs +1 -1
- package/dist/query.js +1 -1
- package/dist/result.cjs +1 -1
- package/dist/result.js +2 -2
- package/dist/{shapeFns-GaYcQL6U.js → shapeFns-BpCPVHFT.js} +2 -2
- package/dist/{shapeFns-Df3OAlpp.cjs → shapeFns-DjsWo98C.cjs} +2 -2
- package/dist/{shapeHelpers-XCWxPN_X.cjs → shapeHelpers-BBSVHPGk.cjs} +3 -3
- package/dist/{shapeHelpers-DL3Kro2n.js → shapeHelpers-C4QIp7u5.js} +3 -3
- package/dist/sketching/CompoundSketch.d.ts +2 -2
- package/dist/sketching/CompoundSketch.d.ts.map +1 -1
- package/dist/sketching/Sketch.d.ts +4 -4
- package/dist/sketching/Sketch.d.ts.map +1 -1
- package/dist/sketching/Sketcher.d.ts +3 -3
- package/dist/sketching/Sketcher.d.ts.map +1 -1
- package/dist/sketching/Sketcher2d.d.ts +3 -3
- package/dist/sketching/Sketcher2d.d.ts.map +1 -1
- package/dist/sketching/cannedSketches.d.ts +2 -2
- package/dist/sketching/cannedSketches.d.ts.map +1 -1
- package/dist/sketching/draw.d.ts +3 -3
- package/dist/sketching/draw.d.ts.map +1 -1
- package/dist/sketching/sketchFns.d.ts +5 -5
- package/dist/sketching/sketchFns.d.ts.map +1 -1
- package/dist/sketching/sketchLib.d.ts +2 -2
- package/dist/sketching/sketchLib.d.ts.map +1 -1
- package/dist/sketching/sketcherlib.d.ts +6 -4
- package/dist/sketching/sketcherlib.d.ts.map +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.d.ts +2 -2
- package/dist/sketching.d.ts.map +1 -1
- package/dist/sketching.js +2 -2
- package/dist/topology/api.d.ts +4 -3
- package/dist/topology/api.d.ts.map +1 -1
- package/dist/topology/index.d.ts +1 -1
- package/dist/topology/index.d.ts.map +1 -1
- package/dist/topology/modifierFns.d.ts.map +1 -1
- package/dist/topology/primitiveFns.d.ts +3 -3
- package/dist/topology/primitiveFns.d.ts.map +1 -1
- package/dist/topology/shapeHelpers.d.ts +2 -2
- package/dist/topology/shapeHelpers.d.ts.map +1 -1
- package/dist/topology/shapeModifiers.d.ts +3 -1
- package/dist/topology/shapeModifiers.d.ts.map +1 -1
- package/dist/topology/wrapperFns.d.ts +12 -5
- package/dist/topology/wrapperFns.d.ts.map +1 -1
- package/dist/{topology-q7nA7fzs.js → topology-BEMrS4WZ.js} +7 -7
- package/dist/{topology-CzVovLTs.cjs → topology-Bb1W3SyF.cjs} +7 -7
- package/dist/topology.cjs +7 -7
- package/dist/topology.js +7 -7
- package/dist/{vectors-Bhj7KHrb.js → vectors-CBuaMeZv.js} +1 -1
- package/dist/{vectors-CCdx6erh.cjs → vectors-ChWEZPwy.cjs} +1 -1
- package/dist/vectors.cjs +1 -1
- package/dist/vectors.js +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
[](https://github.com/andymai/brepjs/actions/workflows/ci.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/brepjs)
|
|
5
5
|
[](./LICENSE)
|
|
6
|
+
[](./CONTRIBUTING.md#code-coverage-requirements)
|
|
6
7
|
|
|
7
8
|
Web CAD library built on OpenCascade with a layered architecture and kernel abstraction layer.
|
|
8
9
|
|
|
@@ -10,79 +10,48 @@ import { ScaleMode } from '../curves.js';
|
|
|
10
10
|
* @see {@link Blueprint} constructor.
|
|
11
11
|
*/
|
|
12
12
|
export declare function createBlueprint(curves: Blueprint['curves']): Blueprint;
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
13
|
+
/** Get the axis-aligned bounding box of a 2D blueprint. */
|
|
14
|
+
export declare function getBounds2D(bp: Blueprint): BoundingBox2d;
|
|
15
|
+
/** Get the winding direction of a 2D blueprint. */
|
|
16
|
+
export declare function getOrientation2D(bp: Blueprint): 'clockwise' | 'counterClockwise';
|
|
17
|
+
/** Test whether a 2D point lies strictly inside a blueprint. */
|
|
18
|
+
export declare function isInside2D(bp: Blueprint, point: Point2D): boolean;
|
|
19
|
+
/** Convert a 2D blueprint to an SVG path d attribute string. */
|
|
20
|
+
export declare function toSVGPathD(bp: Blueprint): string;
|
|
21
|
+
/** Translate a 2D blueprint by the given x and y distances. */
|
|
22
|
+
export declare function translate2D(bp: Blueprint, dx: number, dy: number): Blueprint;
|
|
23
|
+
/** Rotate a 2D blueprint by the given angle in degrees. */
|
|
24
|
+
export declare function rotate2D(bp: Blueprint, angle: number, center?: Point2D): Blueprint;
|
|
25
|
+
/** Uniformly scale a 2D blueprint by a factor around a center point. */
|
|
26
|
+
export declare function scale2D(bp: Blueprint, factor: number, center?: Point2D): Blueprint;
|
|
27
|
+
/** Mirror a 2D blueprint across a point or plane. */
|
|
28
|
+
export declare function mirror2D(bp: Blueprint, centerOrDirection: Point2D, origin?: Point2D, mode?: 'center' | 'plane'): Blueprint;
|
|
29
|
+
/** Stretch a 2D blueprint along a direction by a given ratio. */
|
|
30
|
+
export declare function stretch2D(bp: Blueprint, ratio: number, direction: Point2D, origin?: Point2D): Blueprint;
|
|
31
|
+
/** Project a blueprint onto a 3D plane, producing sketch data. */
|
|
32
|
+
export declare function sketch2DOnPlane(bp: Blueprint, inputPlane?: PlaneName | Plane, origin?: PointInput | number): any;
|
|
33
|
+
/** Map a blueprint onto a 3D face's UV surface, producing sketch data. */
|
|
34
|
+
export declare function sketch2DOnFace(bp: Blueprint, face: Face, scaleMode?: ScaleMode): any;
|
|
35
|
+
/** @deprecated Use getBounds2D instead. Will be removed in v8.0.0. */
|
|
18
36
|
export declare function blueprintBoundingBox(bp: Blueprint): BoundingBox2d;
|
|
19
|
-
/**
|
|
20
|
-
* Get the winding direction of a blueprint (`'clockwise'` or `'counterClockwise'`).
|
|
21
|
-
*
|
|
22
|
-
* @see {@link Blueprint.orientation}
|
|
23
|
-
*/
|
|
37
|
+
/** @deprecated Use getOrientation2D instead. Will be removed in v8.0.0. */
|
|
24
38
|
export declare function blueprintOrientation(bp: Blueprint): 'clockwise' | 'counterClockwise';
|
|
25
|
-
/**
|
|
26
|
-
* Translate a blueprint by the given x and y distances.
|
|
27
|
-
*
|
|
28
|
-
* @returns A new translated Blueprint.
|
|
29
|
-
* @see {@link Blueprint.translate}
|
|
30
|
-
*/
|
|
39
|
+
/** @deprecated Use translate2D instead. Will be removed in v8.0.0. */
|
|
31
40
|
export declare function translateBlueprint(bp: Blueprint, dx: number, dy: number): Blueprint;
|
|
32
|
-
/**
|
|
33
|
-
* Rotate a blueprint by the given angle in degrees.
|
|
34
|
-
*
|
|
35
|
-
* @param center - Center of rotation (defaults to the origin).
|
|
36
|
-
* @returns A new rotated Blueprint.
|
|
37
|
-
* @see {@link Blueprint.rotate}
|
|
38
|
-
*/
|
|
41
|
+
/** @deprecated Use rotate2D instead. Will be removed in v8.0.0. */
|
|
39
42
|
export declare function rotateBlueprint(bp: Blueprint, angle: number, center?: Point2D): Blueprint;
|
|
40
|
-
/**
|
|
41
|
-
* Uniformly scale a blueprint by a factor around a center point.
|
|
42
|
-
*
|
|
43
|
-
* @param center - Center of scaling (defaults to the bounding box center).
|
|
44
|
-
* @returns A new scaled Blueprint.
|
|
45
|
-
* @see {@link Blueprint.scale}
|
|
46
|
-
*/
|
|
43
|
+
/** @deprecated Use scale2D instead. Will be removed in v8.0.0. */
|
|
47
44
|
export declare function scaleBlueprint(bp: Blueprint, factor: number, center?: Point2D): Blueprint;
|
|
48
|
-
/**
|
|
49
|
-
* Mirror a blueprint across a point or plane.
|
|
50
|
-
*
|
|
51
|
-
* @param mode - `'center'` for point symmetry, `'plane'` for reflection across an axis.
|
|
52
|
-
* @returns A new mirrored Blueprint.
|
|
53
|
-
* @see {@link Blueprint.mirror}
|
|
54
|
-
*/
|
|
45
|
+
/** @deprecated Use mirror2D instead. Will be removed in v8.0.0. */
|
|
55
46
|
export declare function mirrorBlueprint(bp: Blueprint, centerOrDirection: Point2D, origin?: Point2D, mode?: 'center' | 'plane'): Blueprint;
|
|
56
|
-
/**
|
|
57
|
-
* Stretch a blueprint along a direction by a given ratio.
|
|
58
|
-
*
|
|
59
|
-
* @returns A new stretched Blueprint.
|
|
60
|
-
* @see {@link Blueprint.stretch}
|
|
61
|
-
*/
|
|
47
|
+
/** @deprecated Use stretch2D instead. Will be removed in v8.0.0. */
|
|
62
48
|
export declare function stretchBlueprint(bp: Blueprint, ratio: number, direction: Point2D, origin?: Point2D): Blueprint;
|
|
63
|
-
/**
|
|
64
|
-
* Convert a blueprint to an SVG path `d` attribute string.
|
|
65
|
-
*
|
|
66
|
-
* @see {@link Blueprint.toSVGPathD}
|
|
67
|
-
*/
|
|
49
|
+
/** @deprecated Use toSVGPathD instead. Will be removed in v8.0.0. */
|
|
68
50
|
export declare function blueprintToSVGPathD(bp: Blueprint): string;
|
|
69
|
-
/**
|
|
70
|
-
* Test whether a 2D point lies strictly inside the blueprint.
|
|
71
|
-
*
|
|
72
|
-
* @returns `true` if the point is inside (boundary points return `false`).
|
|
73
|
-
* @see {@link Blueprint.isInside}
|
|
74
|
-
*/
|
|
51
|
+
/** @deprecated Use isInside2D instead. Will be removed in v8.0.0. */
|
|
75
52
|
export declare function blueprintIsInside(bp: Blueprint, point: Point2D): boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Project a blueprint onto a 3D plane, producing sketch data.
|
|
78
|
-
*
|
|
79
|
-
* @see {@link Blueprint.sketchOnPlane}
|
|
80
|
-
*/
|
|
53
|
+
/** @deprecated Use sketch2DOnPlane instead. Will be removed in v8.0.0. */
|
|
81
54
|
export declare function sketchBlueprintOnPlane(bp: Blueprint, inputPlane?: PlaneName | Plane, origin?: PointInput | number): any;
|
|
82
|
-
/**
|
|
83
|
-
* Map a blueprint onto a 3D face's UV surface, producing sketch data.
|
|
84
|
-
*
|
|
85
|
-
* @see {@link Blueprint.sketchOnFace}
|
|
86
|
-
*/
|
|
55
|
+
/** @deprecated Use sketch2DOnFace instead. Will be removed in v8.0.0. */
|
|
87
56
|
export declare function sketchBlueprintOnFace(bp: Blueprint, face: Face, scaleMode?: ScaleMode): any;
|
|
88
57
|
//# sourceMappingURL=blueprintFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blueprintFns.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/blueprintFns.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,SAAS,CAEtE;AAED
|
|
1
|
+
{"version":3,"file":"blueprintFns.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/blueprintFns.ts"],"names":[],"mappings":"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"}
|
|
@@ -5,18 +5,20 @@ import { Shape2D } from './boolean2D.js';
|
|
|
5
5
|
/**
|
|
6
6
|
* Compute the boolean union of two 2D shapes.
|
|
7
7
|
*
|
|
8
|
+
* @deprecated Use fuse2D instead. Will be removed in v8.0.0.
|
|
8
9
|
* @returns The fused shape, or `null` if the result is empty.
|
|
9
10
|
* @see {@link fuse2D}
|
|
10
11
|
*
|
|
11
12
|
* @example
|
|
12
13
|
* ```ts
|
|
13
|
-
* const union =
|
|
14
|
+
* const union = fuse2D(circle, rectangle);
|
|
14
15
|
* ```
|
|
15
16
|
*/
|
|
16
17
|
export declare function fuseBlueprint2D(a: Blueprint | CompoundBlueprint | Blueprints, b: Blueprint | CompoundBlueprint | Blueprints): Shape2D;
|
|
17
18
|
/**
|
|
18
19
|
* Compute the boolean difference of two 2D shapes (base minus tool).
|
|
19
20
|
*
|
|
21
|
+
* @deprecated Use cut2D instead. Will be removed in v8.0.0.
|
|
20
22
|
* @param base - The shape to cut from.
|
|
21
23
|
* @param tool - The shape to subtract.
|
|
22
24
|
* @returns The remaining shape, or `null` if nothing remains.
|
|
@@ -24,19 +26,20 @@ export declare function fuseBlueprint2D(a: Blueprint | CompoundBlueprint | Bluep
|
|
|
24
26
|
*
|
|
25
27
|
* @example
|
|
26
28
|
* ```ts
|
|
27
|
-
* const withHole =
|
|
29
|
+
* const withHole = cut2D(outerRect, innerCircle);
|
|
28
30
|
* ```
|
|
29
31
|
*/
|
|
30
32
|
export declare function cutBlueprint2D(base: Blueprint | CompoundBlueprint | Blueprints, tool: Blueprint | CompoundBlueprint | Blueprints): Shape2D;
|
|
31
33
|
/**
|
|
32
34
|
* Compute the boolean intersection of two 2D shapes.
|
|
33
35
|
*
|
|
36
|
+
* @deprecated Use intersect2D instead. Will be removed in v8.0.0.
|
|
34
37
|
* @returns The overlapping region, or `null` if the shapes do not overlap.
|
|
35
38
|
* @see {@link intersect2D}
|
|
36
39
|
*
|
|
37
40
|
* @example
|
|
38
41
|
* ```ts
|
|
39
|
-
* const overlap =
|
|
42
|
+
* const overlap = intersect2D(circle, rectangle);
|
|
40
43
|
* ```
|
|
41
44
|
*/
|
|
42
45
|
export declare function intersectBlueprint2D(a: Blueprint | CompoundBlueprint | Blueprints, b: Blueprint | CompoundBlueprint | Blueprints): Shape2D;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean2dFns.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/boolean2dFns.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAA8B,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE1E
|
|
1
|
+
{"version":3,"file":"boolean2dFns.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/boolean2dFns.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAA8B,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE1E;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,UAAU,EAC7C,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,UAAU,GAC5C,OAAO,CAET;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,SAAS,GAAG,iBAAiB,GAAG,UAAU,EAChD,IAAI,EAAE,SAAS,GAAG,iBAAiB,GAAG,UAAU,GAC/C,OAAO,CAET;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,UAAU,EAC7C,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,UAAU,GAC5C,OAAO,CAET"}
|
package/dist/2d.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const Blueprint = require("./Blueprint-
|
|
4
|
-
const boolean2D = require("./boolean2D-
|
|
3
|
+
const Blueprint = require("./Blueprint-3Dyu0OL6.cjs");
|
|
4
|
+
const boolean2D = require("./boolean2D-BwOpOv6L.cjs");
|
|
5
5
|
function reverseCurve(curve) {
|
|
6
6
|
const cloned = curve.clone();
|
|
7
7
|
cloned.reverse();
|
|
@@ -34,38 +34,71 @@ function curve2dDistanceFrom(curve, point) {
|
|
|
34
34
|
function createBlueprint(curves) {
|
|
35
35
|
return new Blueprint.Blueprint(curves);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function getBounds2D(bp) {
|
|
38
38
|
return bp.boundingBox;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function getOrientation2D(bp) {
|
|
41
41
|
return bp.orientation;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function isInside2D(bp, point) {
|
|
44
|
+
return bp.isInside(point);
|
|
45
|
+
}
|
|
46
|
+
function toSVGPathD(bp) {
|
|
47
|
+
return bp.toSVGPathD();
|
|
48
|
+
}
|
|
49
|
+
function translate2D(bp, dx, dy) {
|
|
44
50
|
return bp.translate(dx, dy);
|
|
45
51
|
}
|
|
46
|
-
function
|
|
52
|
+
function rotate2D(bp, angle, center) {
|
|
47
53
|
return bp.rotate(angle, center);
|
|
48
54
|
}
|
|
49
|
-
function
|
|
55
|
+
function scale2D(bp, factor, center) {
|
|
50
56
|
return bp.scale(factor, center);
|
|
51
57
|
}
|
|
52
|
-
function
|
|
58
|
+
function mirror2D(bp, centerOrDirection, origin, mode) {
|
|
53
59
|
return bp.mirror(centerOrDirection, origin, mode);
|
|
54
60
|
}
|
|
55
|
-
function
|
|
61
|
+
function stretch2D(bp, ratio, direction, origin) {
|
|
56
62
|
return bp.stretch(ratio, direction, origin);
|
|
57
63
|
}
|
|
64
|
+
function sketch2DOnPlane(bp, inputPlane, origin) {
|
|
65
|
+
return bp.sketchOnPlane(inputPlane, origin);
|
|
66
|
+
}
|
|
67
|
+
function sketch2DOnFace(bp, face, scaleMode) {
|
|
68
|
+
return bp.sketchOnFace(face, scaleMode);
|
|
69
|
+
}
|
|
70
|
+
function blueprintBoundingBox(bp) {
|
|
71
|
+
return getBounds2D(bp);
|
|
72
|
+
}
|
|
73
|
+
function blueprintOrientation(bp) {
|
|
74
|
+
return getOrientation2D(bp);
|
|
75
|
+
}
|
|
76
|
+
function translateBlueprint(bp, dx, dy) {
|
|
77
|
+
return translate2D(bp, dx, dy);
|
|
78
|
+
}
|
|
79
|
+
function rotateBlueprint(bp, angle, center) {
|
|
80
|
+
return rotate2D(bp, angle, center);
|
|
81
|
+
}
|
|
82
|
+
function scaleBlueprint(bp, factor, center) {
|
|
83
|
+
return scale2D(bp, factor, center);
|
|
84
|
+
}
|
|
85
|
+
function mirrorBlueprint(bp, centerOrDirection, origin, mode) {
|
|
86
|
+
return mirror2D(bp, centerOrDirection, origin, mode);
|
|
87
|
+
}
|
|
88
|
+
function stretchBlueprint(bp, ratio, direction, origin) {
|
|
89
|
+
return stretch2D(bp, ratio, direction, origin);
|
|
90
|
+
}
|
|
58
91
|
function blueprintToSVGPathD(bp) {
|
|
59
|
-
return
|
|
92
|
+
return toSVGPathD(bp);
|
|
60
93
|
}
|
|
61
94
|
function blueprintIsInside(bp, point) {
|
|
62
|
-
return bp
|
|
95
|
+
return isInside2D(bp, point);
|
|
63
96
|
}
|
|
64
97
|
function sketchBlueprintOnPlane(bp, inputPlane, origin) {
|
|
65
|
-
return bp
|
|
98
|
+
return sketch2DOnPlane(bp, inputPlane, origin);
|
|
66
99
|
}
|
|
67
100
|
function sketchBlueprintOnFace(bp, face, scaleMode) {
|
|
68
|
-
return bp
|
|
101
|
+
return sketch2DOnFace(bp, face, scaleMode);
|
|
69
102
|
}
|
|
70
103
|
function fuseBlueprint2D(a, b) {
|
|
71
104
|
return boolean2D.fuse2D(a, b);
|
|
@@ -106,12 +139,23 @@ exports.curve2dSplitAt = curve2dSplitAt;
|
|
|
106
139
|
exports.curve2dTangentAt = curve2dTangentAt;
|
|
107
140
|
exports.cutBlueprint2D = cutBlueprint2D;
|
|
108
141
|
exports.fuseBlueprint2D = fuseBlueprint2D;
|
|
142
|
+
exports.getBounds2D = getBounds2D;
|
|
143
|
+
exports.getOrientation2D = getOrientation2D;
|
|
109
144
|
exports.intersectBlueprint2D = intersectBlueprint2D;
|
|
145
|
+
exports.isInside2D = isInside2D;
|
|
146
|
+
exports.mirror2D = mirror2D;
|
|
110
147
|
exports.mirrorBlueprint = mirrorBlueprint;
|
|
111
148
|
exports.reverseCurve = reverseCurve;
|
|
149
|
+
exports.rotate2D = rotate2D;
|
|
112
150
|
exports.rotateBlueprint = rotateBlueprint;
|
|
151
|
+
exports.scale2D = scale2D;
|
|
113
152
|
exports.scaleBlueprint = scaleBlueprint;
|
|
153
|
+
exports.sketch2DOnFace = sketch2DOnFace;
|
|
154
|
+
exports.sketch2DOnPlane = sketch2DOnPlane;
|
|
114
155
|
exports.sketchBlueprintOnFace = sketchBlueprintOnFace;
|
|
115
156
|
exports.sketchBlueprintOnPlane = sketchBlueprintOnPlane;
|
|
157
|
+
exports.stretch2D = stretch2D;
|
|
116
158
|
exports.stretchBlueprint = stretchBlueprint;
|
|
159
|
+
exports.toSVGPathD = toSVGPathD;
|
|
160
|
+
exports.translate2D = translate2D;
|
|
117
161
|
exports.translateBlueprint = translateBlueprint;
|
package/dist/2d.d.ts
CHANGED
|
@@ -3,13 +3,17 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @example
|
|
5
5
|
* ```typescript
|
|
6
|
-
* import { createBlueprint,
|
|
6
|
+
* import { createBlueprint, fuse2D, Blueprint } from 'brepjs/2d';
|
|
7
|
+
*
|
|
8
|
+
* // Clean 2D API (recommended)
|
|
9
|
+
* const translated = translate2D(bp, 10, 20);
|
|
10
|
+
* const union = fuse2D(bp1, bp2);
|
|
7
11
|
* ```
|
|
8
12
|
*/
|
|
9
13
|
export { default as Blueprint } from './2d/blueprints/Blueprint.js';
|
|
10
14
|
export { default as CompoundBlueprint } from './2d/blueprints/CompoundBlueprint.js';
|
|
11
15
|
export { default as Blueprints } from './2d/blueprints/Blueprints.js';
|
|
12
|
-
export { createBlueprint, blueprintBoundingBox, blueprintOrientation, translateBlueprint, rotateBlueprint, scaleBlueprint, mirrorBlueprint, stretchBlueprint, blueprintToSVGPathD, blueprintIsInside, sketchBlueprintOnPlane, sketchBlueprintOnFace, } from './2d/blueprints/blueprintFns.js';
|
|
16
|
+
export { createBlueprint, getBounds2D, getOrientation2D, isInside2D, toSVGPathD, translate2D, rotate2D, scale2D, mirror2D, stretch2D, sketch2DOnPlane, sketch2DOnFace, blueprintBoundingBox, blueprintOrientation, translateBlueprint, rotateBlueprint, scaleBlueprint, mirrorBlueprint, stretchBlueprint, blueprintToSVGPathD, blueprintIsInside, sketchBlueprintOnPlane, sketchBlueprintOnFace, } from './2d/blueprints/blueprintFns.js';
|
|
13
17
|
export { fuseBlueprint2D, cutBlueprint2D, intersectBlueprint2D, } from './2d/blueprints/boolean2dFns.js';
|
|
14
18
|
export { fuseBlueprints, cutBlueprints, intersectBlueprints, } from './2d/blueprints/booleanOperations.js';
|
|
15
19
|
export { fuse2D, cut2D, intersect2D, type Shape2D } from './2d/blueprints/boolean2D.js';
|
package/dist/2d.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2d.d.ts","sourceRoot":"","sources":["../src/2d.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"2d.d.ts","sourceRoot":"","sources":["../src/2d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAItE,OAAO,EACL,eAAe,EAEf,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,SAAS,EACT,eAAe,EACf,cAAc,EAEd,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EAEL,eAAe,EACf,cAAc,EACd,oBAAoB,GACrB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,cAAc,EACd,aAAa,EACb,mBAAmB,GACpB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAIxF,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAIhC,OAAO,EAAE,KAAK,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AACpG,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/2d.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as Blueprint } from "./Blueprint-
|
|
2
|
-
import { a, C, b } from "./Blueprint-
|
|
3
|
-
import { c as cut2D, f as fuse2D, i as intersect2D } from "./boolean2D-
|
|
4
|
-
import { b as b2, C as C2, d, e, g, o, p, r } from "./boolean2D-
|
|
1
|
+
import { B as Blueprint } from "./Blueprint-DSHD89bZ.js";
|
|
2
|
+
import { a, C, b } from "./Blueprint-DSHD89bZ.js";
|
|
3
|
+
import { c as cut2D, f as fuse2D, i as intersect2D } from "./boolean2D-CtyE2hK5.js";
|
|
4
|
+
import { b as b2, C as C2, d, e, g, o, p, r } from "./boolean2D-CtyE2hK5.js";
|
|
5
5
|
function reverseCurve(curve) {
|
|
6
6
|
const cloned = curve.clone();
|
|
7
7
|
cloned.reverse();
|
|
@@ -34,38 +34,71 @@ function curve2dDistanceFrom(curve, point) {
|
|
|
34
34
|
function createBlueprint(curves) {
|
|
35
35
|
return new Blueprint(curves);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function getBounds2D(bp) {
|
|
38
38
|
return bp.boundingBox;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function getOrientation2D(bp) {
|
|
41
41
|
return bp.orientation;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function isInside2D(bp, point) {
|
|
44
|
+
return bp.isInside(point);
|
|
45
|
+
}
|
|
46
|
+
function toSVGPathD(bp) {
|
|
47
|
+
return bp.toSVGPathD();
|
|
48
|
+
}
|
|
49
|
+
function translate2D(bp, dx, dy) {
|
|
44
50
|
return bp.translate(dx, dy);
|
|
45
51
|
}
|
|
46
|
-
function
|
|
52
|
+
function rotate2D(bp, angle, center) {
|
|
47
53
|
return bp.rotate(angle, center);
|
|
48
54
|
}
|
|
49
|
-
function
|
|
55
|
+
function scale2D(bp, factor, center) {
|
|
50
56
|
return bp.scale(factor, center);
|
|
51
57
|
}
|
|
52
|
-
function
|
|
58
|
+
function mirror2D(bp, centerOrDirection, origin, mode) {
|
|
53
59
|
return bp.mirror(centerOrDirection, origin, mode);
|
|
54
60
|
}
|
|
55
|
-
function
|
|
61
|
+
function stretch2D(bp, ratio, direction, origin) {
|
|
56
62
|
return bp.stretch(ratio, direction, origin);
|
|
57
63
|
}
|
|
64
|
+
function sketch2DOnPlane(bp, inputPlane, origin) {
|
|
65
|
+
return bp.sketchOnPlane(inputPlane, origin);
|
|
66
|
+
}
|
|
67
|
+
function sketch2DOnFace(bp, face, scaleMode) {
|
|
68
|
+
return bp.sketchOnFace(face, scaleMode);
|
|
69
|
+
}
|
|
70
|
+
function blueprintBoundingBox(bp) {
|
|
71
|
+
return getBounds2D(bp);
|
|
72
|
+
}
|
|
73
|
+
function blueprintOrientation(bp) {
|
|
74
|
+
return getOrientation2D(bp);
|
|
75
|
+
}
|
|
76
|
+
function translateBlueprint(bp, dx, dy) {
|
|
77
|
+
return translate2D(bp, dx, dy);
|
|
78
|
+
}
|
|
79
|
+
function rotateBlueprint(bp, angle, center) {
|
|
80
|
+
return rotate2D(bp, angle, center);
|
|
81
|
+
}
|
|
82
|
+
function scaleBlueprint(bp, factor, center) {
|
|
83
|
+
return scale2D(bp, factor, center);
|
|
84
|
+
}
|
|
85
|
+
function mirrorBlueprint(bp, centerOrDirection, origin, mode) {
|
|
86
|
+
return mirror2D(bp, centerOrDirection, origin, mode);
|
|
87
|
+
}
|
|
88
|
+
function stretchBlueprint(bp, ratio, direction, origin) {
|
|
89
|
+
return stretch2D(bp, ratio, direction, origin);
|
|
90
|
+
}
|
|
58
91
|
function blueprintToSVGPathD(bp) {
|
|
59
|
-
return
|
|
92
|
+
return toSVGPathD(bp);
|
|
60
93
|
}
|
|
61
94
|
function blueprintIsInside(bp, point) {
|
|
62
|
-
return bp
|
|
95
|
+
return isInside2D(bp, point);
|
|
63
96
|
}
|
|
64
97
|
function sketchBlueprintOnPlane(bp, inputPlane, origin) {
|
|
65
|
-
return bp
|
|
98
|
+
return sketch2DOnPlane(bp, inputPlane, origin);
|
|
66
99
|
}
|
|
67
100
|
function sketchBlueprintOnFace(bp, face, scaleMode) {
|
|
68
|
-
return bp
|
|
101
|
+
return sketch2DOnFace(bp, face, scaleMode);
|
|
69
102
|
}
|
|
70
103
|
function fuseBlueprint2D(a2, b3) {
|
|
71
104
|
return fuse2D(a2, b3);
|
|
@@ -102,18 +135,29 @@ export {
|
|
|
102
135
|
fuse2D,
|
|
103
136
|
fuseBlueprint2D,
|
|
104
137
|
e as fuseBlueprints,
|
|
138
|
+
getBounds2D,
|
|
139
|
+
getOrientation2D,
|
|
105
140
|
intersect2D,
|
|
106
141
|
intersectBlueprint2D,
|
|
107
142
|
g as intersectBlueprints,
|
|
143
|
+
isInside2D,
|
|
144
|
+
mirror2D,
|
|
108
145
|
mirrorBlueprint,
|
|
109
146
|
o as organiseBlueprints,
|
|
110
147
|
p as polysidesBlueprint,
|
|
111
148
|
reverseCurve,
|
|
149
|
+
rotate2D,
|
|
112
150
|
rotateBlueprint,
|
|
113
151
|
r as roundedRectangleBlueprint,
|
|
152
|
+
scale2D,
|
|
114
153
|
scaleBlueprint,
|
|
154
|
+
sketch2DOnFace,
|
|
155
|
+
sketch2DOnPlane,
|
|
115
156
|
sketchBlueprintOnFace,
|
|
116
157
|
sketchBlueprintOnPlane,
|
|
158
|
+
stretch2D,
|
|
117
159
|
stretchBlueprint,
|
|
160
|
+
toSVGPathD,
|
|
161
|
+
translate2D,
|
|
118
162
|
translateBlueprint
|
|
119
163
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const vectors = require("./vectors-
|
|
2
|
+
const vectors = require("./vectors-ChWEZPwy.cjs");
|
|
3
3
|
const occtBoundary = require("./occtBoundary-du8_ex-p.cjs");
|
|
4
4
|
const shapeTypes = require("./shapeTypes-DKhwEnUM.cjs");
|
|
5
|
-
const faceFns = require("./faceFns-
|
|
6
|
-
const curveFns = require("./curveFns-
|
|
7
|
-
const errors = require("./errors-
|
|
8
|
-
const shapeHelpers = require("./shapeHelpers-
|
|
9
|
-
const query = require("./query-
|
|
10
|
-
const cast = require("./cast-
|
|
5
|
+
const faceFns = require("./faceFns-B9if-FPW.cjs");
|
|
6
|
+
const curveFns = require("./curveFns-BilyYL_s.cjs");
|
|
7
|
+
const errors = require("./errors-DK1VAdP4.cjs");
|
|
8
|
+
const shapeHelpers = require("./shapeHelpers-BBSVHPGk.cjs");
|
|
9
|
+
const query = require("./query-DkcMfh6j.cjs");
|
|
10
|
+
const cast = require("./cast-DsxJk_F0.cjs");
|
|
11
11
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
12
12
|
const result = require("./result.cjs");
|
|
13
13
|
function makePlane(plane, origin) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { r as resolvePlane } from "./vectors-
|
|
1
|
+
import { r as resolvePlane } from "./vectors-CBuaMeZv.js";
|
|
2
2
|
import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-CwegMzqc.js";
|
|
3
3
|
import { o as localGC, y as registerForCleanup, z as unregisterFromCleanup, n as gcWithScope, t as createEdge, s as createWire } from "./shapeTypes-BlSElW8z.js";
|
|
4
|
-
import { u as uvBounds, a as faceGeomType, f as faceCenter, h as uvCoordinates } from "./faceFns-
|
|
5
|
-
import { j as findCurveType, m as getOrientation } from "./curveFns-
|
|
6
|
-
import { u as unwrap, l as ok, e as err, b as computationError, x as validationError } from "./errors-
|
|
7
|
-
import { z as zip, o as makeFace } from "./shapeHelpers-
|
|
8
|
-
import { i as distance2d, s as samePoint, h as scalarMultiply2d, b as add2d, n as normalize2d, a as subtract2d, g as getSingleFace } from "./query-
|
|
9
|
-
import { c as cast } from "./cast-
|
|
4
|
+
import { u as uvBounds, a as faceGeomType, f as faceCenter, h as uvCoordinates } from "./faceFns-Bl6HHbqO.js";
|
|
5
|
+
import { j as findCurveType, m as getOrientation } from "./curveFns-CdVE4da7.js";
|
|
6
|
+
import { u as unwrap, l as ok, e as err, b as computationError, x as validationError } from "./errors-wGhcJMpB.js";
|
|
7
|
+
import { z as zip, o as makeFace } from "./shapeHelpers-C4QIp7u5.js";
|
|
8
|
+
import { i as distance2d, s as samePoint, h as scalarMultiply2d, b as add2d, n as normalize2d, a as subtract2d, g as getSingleFace } from "./query-D7XclvBZ.js";
|
|
9
|
+
import { c as cast } from "./cast-D1s7Im9E.js";
|
|
10
10
|
import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
11
11
|
import { bug } from "./result.js";
|
|
12
12
|
function makePlane(plane, origin) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const vectors = require("./vectors-
|
|
3
|
-
const shapeHelpers = require("./shapeHelpers-
|
|
4
|
-
const errors = require("./errors-
|
|
5
|
-
const cast = require("./cast-
|
|
2
|
+
const vectors = require("./vectors-ChWEZPwy.cjs");
|
|
3
|
+
const shapeHelpers = require("./shapeHelpers-BBSVHPGk.cjs");
|
|
4
|
+
const errors = require("./errors-DK1VAdP4.cjs");
|
|
5
|
+
const cast = require("./cast-DsxJk_F0.cjs");
|
|
6
6
|
const occtBoundary = require("./occtBoundary-du8_ex-p.cjs");
|
|
7
7
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
8
|
-
const loft = require("./loft-
|
|
8
|
+
const loft = require("./loft-Cc5E5pAf.cjs");
|
|
9
9
|
const shapeTypes = require("./shapeTypes-DKhwEnUM.cjs");
|
|
10
|
-
const curveFns = require("./curveFns-
|
|
11
|
-
const faceFns = require("./faceFns-
|
|
10
|
+
const curveFns = require("./curveFns-BilyYL_s.cjs");
|
|
11
|
+
const faceFns = require("./faceFns-B9if-FPW.cjs");
|
|
12
12
|
const result = require("./result.cjs");
|
|
13
|
-
const query = require("./query-
|
|
14
|
-
const Blueprint = require("./Blueprint-
|
|
13
|
+
const query = require("./query-DkcMfh6j.cjs");
|
|
14
|
+
const Blueprint = require("./Blueprint-3Dyu0OL6.cjs");
|
|
15
15
|
function* pointsIteration(intersector) {
|
|
16
16
|
const nPoints = intersector.NbPoints();
|
|
17
17
|
if (!nPoints) return;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { a as createPlane } from "./vectors-
|
|
2
|
-
import { o as makeFace, u as makeNewFaceWithinFace, a as assembleWire, z as zip } from "./shapeHelpers-
|
|
3
|
-
import { l as ok, e as err, b as computationError, u as unwrap, g as isOk } from "./errors-
|
|
4
|
-
import { d as downcast } from "./cast-
|
|
1
|
+
import { a as createPlane } from "./vectors-CBuaMeZv.js";
|
|
2
|
+
import { o as makeFace, u as makeNewFaceWithinFace, a as assembleWire, z as zip } from "./shapeHelpers-C4QIp7u5.js";
|
|
3
|
+
import { l as ok, e as err, b as computationError, u as unwrap, g as isOk } from "./errors-wGhcJMpB.js";
|
|
4
|
+
import { d as downcast } from "./cast-D1s7Im9E.js";
|
|
5
5
|
import { g as getKernel, a as toVec3 } from "./occtBoundary-CwegMzqc.js";
|
|
6
6
|
import { n as vecScale, j as vecNormalize, b as vecCross, D as DEG2RAD, R as RAD2DEG } from "./vecOps-ZDdZWbwT.js";
|
|
7
|
-
import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-
|
|
7
|
+
import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-BlNndTOR.js";
|
|
8
8
|
import { n as gcWithScope, q as createFace, s as createWire, o as localGC, t as createEdge } from "./shapeTypes-BlSElW8z.js";
|
|
9
|
-
import { e as curveStartPoint, a as curveTangentAt, c as curveIsClosed } from "./curveFns-
|
|
10
|
-
import { u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-
|
|
9
|
+
import { e as curveStartPoint, a as curveTangentAt, c as curveIsClosed } from "./curveFns-CdVE4da7.js";
|
|
10
|
+
import { u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-Bl6HHbqO.js";
|
|
11
11
|
import { bug } from "./result.js";
|
|
12
|
-
import { s as samePoint$1, n as normalize2d, a as subtract2d, b as add2d, d as crossProduct2d, h as scalarMultiply2d, p as polarToCartesian, i as distance2d, r as rotate2d, j as cartesianToPolar, k as polarAngle2d, P as PRECISION_INTERSECTION } from "./query-
|
|
13
|
-
import { C as Curve2D, c as make2dSegmentCurve, d as approximateAsBSpline, i as isPoint2D, e as make2dCircle, f as make2dThreePointArc, g as make2dArcFromCenter, a as BoundingBox2d, v as viewbox, h as asSVG, B as Blueprint, j as make2dTangentArc, k as make2dEllipseArc, l as make2dBezierCurve, b as axis2d, r as removeDuplicatePoints } from "./Blueprint-
|
|
12
|
+
import { s as samePoint$1, n as normalize2d, a as subtract2d, b as add2d, d as crossProduct2d, h as scalarMultiply2d, p as polarToCartesian, i as distance2d, r as rotate2d, j as cartesianToPolar, k as polarAngle2d, P as PRECISION_INTERSECTION } from "./query-D7XclvBZ.js";
|
|
13
|
+
import { C as Curve2D, c as make2dSegmentCurve, d as approximateAsBSpline, i as isPoint2D, e as make2dCircle, f as make2dThreePointArc, g as make2dArcFromCenter, a as BoundingBox2d, v as viewbox, h as asSVG, B as Blueprint, j as make2dTangentArc, k as make2dEllipseArc, l as make2dBezierCurve, b as axis2d, r as removeDuplicatePoints } from "./Blueprint-DSHD89bZ.js";
|
|
14
14
|
function* pointsIteration(intersector) {
|
|
15
15
|
const nPoints = intersector.NbPoints();
|
|
16
16
|
if (!nPoints) return;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const occtBoundary = require("./occtBoundary-du8_ex-p.cjs");
|
|
3
3
|
const shapeTypes = require("./shapeTypes-DKhwEnUM.cjs");
|
|
4
|
-
const errors = require("./errors-
|
|
5
|
-
const vectors = require("./vectors-
|
|
4
|
+
const errors = require("./errors-DK1VAdP4.cjs");
|
|
5
|
+
const vectors = require("./vectors-ChWEZPwy.cjs");
|
|
6
6
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
7
7
|
function applyGlue(op, optimisation) {
|
|
8
8
|
const oc = occtBoundary.getKernel().oc;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { g as getKernel } from "./occtBoundary-CwegMzqc.js";
|
|
2
2
|
import { n as gcWithScope, c as castShape, h as isShape3D } from "./shapeTypes-BlSElW8z.js";
|
|
3
|
-
import { l as ok, d as isErr, e as err, x as validationError, B as BrepErrorCode, p as typeCastError, o as occtError } from "./errors-
|
|
4
|
-
import { r as resolvePlane } from "./vectors-
|
|
3
|
+
import { l as ok, d as isErr, e as err, x as validationError, B as BrepErrorCode, p as typeCastError, o as occtError } from "./errors-wGhcJMpB.js";
|
|
4
|
+
import { r as resolvePlane } from "./vectors-CBuaMeZv.js";
|
|
5
5
|
import { n as vecScale, v as vecAdd } from "./vecOps-ZDdZWbwT.js";
|
|
6
6
|
function applyGlue(op, optimisation) {
|
|
7
7
|
const oc = getKernel().oc;
|