brepjs 20.12.1 → 20.12.4
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.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{adjacencyFns-C0YD3Zrp.js → adjacencyFns-54UTqtan.js} +3 -3
- package/dist/{adjacencyFns-Cibtcqdl.cjs → adjacencyFns-C_Vb1AeW.cjs} +3 -3
- package/dist/{blueprint-CHBjfXQO.cjs → blueprint-D0VEeTzJ.cjs} +5 -5
- package/dist/{blueprint-CN5dNZ1h.js → blueprint-DFpjcrlm.js} +5 -5
- package/dist/{blueprintFns-DOdzDcPX.cjs → blueprintFns-Douf5ZdX.cjs} +2 -2
- package/dist/{blueprintFns--26Mr3Lm.js → blueprintFns-Dye1jezD.js} +2 -2
- package/dist/{blueprintSketcher-CQPC4SEF.js → blueprintSketcher-Cr0Lr1Dq.js} +3 -3
- package/dist/{blueprintSketcher-CG4H8A6M.cjs → blueprintSketcher-W9yON-UC.cjs} +3 -3
- package/dist/{boolean2D-DjJogOY-.cjs → boolean2D-C9VghXHG.cjs} +4 -4
- package/dist/{boolean2D-tR_2N_Vy.js → boolean2D-CCV3R6lN.js} +4 -4
- package/dist/brepjs.cjs +30 -30
- package/dist/brepjs.js +30 -30
- package/dist/{cameraFns-xUCRxpsa.js → cameraFns-DZOI_ewG.js} +3 -3
- package/dist/{cameraFns-CUX8VNKT.cjs → cameraFns-x3L6dtA8.cjs} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-Bg67ivza.cjs → cornerFinder-B8PqO4um.cjs} +1 -1
- package/dist/{cornerFinder-utEooGH7.js → cornerFinder-BY10jciz.js} +1 -1
- package/dist/{curveFns-CMiP40Ko.cjs → curveFns-8lUhNquZ.cjs} +1 -1
- package/dist/{curveFns-AMqd_WaO.js → curveFns-B4308HNM.js} +1 -1
- package/dist/{drawFns-C_YnK4Ar.cjs → drawFns-C7zAvera.cjs} +12 -12
- package/dist/{drawFns-D6YK0JbH.js → drawFns-DjnU3fEd.js} +12 -12
- package/dist/{faceFns-Ciq7lYTa.js → faceFns-7eHqNM0P.js} +9 -5
- package/dist/{faceFns-CdUF0JOe.cjs → faceFns-BjmlYcc9.cjs} +9 -5
- package/dist/{healingFns-Dchd7dm5.js → healingFns-BW7mZ_SW.js} +5 -5
- package/dist/{healingFns-CrUTSyyK.cjs → healingFns-CYLIcIWv.cjs} +5 -5
- package/dist/{helpers-CBXclBes.js → helpers-BQ6XMFcm.js} +6 -6
- package/dist/{helpers-GZyqAK5c.cjs → helpers-De0Z_6iV.cjs} +6 -6
- package/dist/{importFns-C3LbWc6X.cjs → importFns-3IMBHQrQ.cjs} +2 -2
- package/dist/{importFns-CcPhunG6.js → importFns-BCL4-H8e.js} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/geometry2d.d.ts +7 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/{loftFns-BsFinbgs.cjs → loftFns-DlG5oR0X.cjs} +1 -1
- package/dist/{loftFns-pMh0ET-J.js → loftFns-H4ZOpRAk.js} +1 -1
- package/dist/{measureFns-DukwjzUl.js → measureFns-1IfNe629.js} +3 -3
- package/dist/{measureFns-Cyjpl2Kl.cjs → measureFns-Ce01LVwq.cjs} +3 -3
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-LytwBtBQ.js → meshFns-DaRZxa7B.js} +3 -3
- package/dist/{meshFns-BNrdUhgG.cjs → meshFns-nEvfwNRF.cjs} +3 -3
- package/dist/{occtWasmAdapter-D1EXktNq.cjs → occtWasmAdapter-CRd9RFEu.cjs} +32 -3
- package/dist/{occtWasmAdapter-RBm-JLoN.js → occtWasmAdapter-ipKUdNLN.js} +32 -3
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{originTrackingFns-BRJ2PZ8J.cjs → originTrackingFns-9gyCMFFQ.cjs} +2 -2
- package/dist/{originTrackingFns-BqlxFeWq.js → originTrackingFns-zrksCJTa.js} +2 -2
- package/dist/{primitiveFns-eE9jyVCs.cjs → primitiveFns-BRXZ7jnP.cjs} +4 -4
- package/dist/{primitiveFns-Vf_2qORp.js → primitiveFns-ClQP6zMQ.js} +4 -4
- package/dist/{principalBoxFns-ClynMQMo.js → principalBoxFns-DsfWOoXg.js} +3 -3
- package/dist/{principalBoxFns-uZrBoGLA.cjs → principalBoxFns-tIv-crMB.cjs} +3 -3
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-BvQkLKLw.js → refResolveFns-BG3JGs--.js} +6 -6
- package/dist/{refResolveFns-awGNYa3x.cjs → refResolveFns-BZdUlv9f.cjs} +6 -6
- package/dist/{shapeFns-D7DcPxfx.js → shapeFns-BCgegapL.js} +2 -2
- package/dist/{shapeFns-CHFmX5HQ.cjs → shapeFns-BbXqiNqY.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-Db3yAgTO.js → shapeTypes-DAz6aAnJ.js} +1 -1
- package/dist/{shapeTypes-HDVHzNk1.cjs → shapeTypes-DJT3SnGK.cjs} +1 -1
- package/dist/sketching/sketchFns.d.ts +8 -3
- package/dist/sketching/sketches.d.ts +6 -0
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-DKNxcpSB.js → solidBuilders-8xytLt8-.js} +5 -5
- package/dist/{solidBuilders-fzrTygbj.cjs → solidBuilders-BWbqhbyv.cjs} +5 -5
- package/dist/{surfaceBuilders-B1Ikcte3.js → surfaceBuilders-BO96DMCH.js} +3 -3
- package/dist/{surfaceBuilders-DFqsIPkm.cjs → surfaceBuilders-CwG_RPdZ.cjs} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-C38JfUeN.cjs → textBlueprints-DHfYmLtP.cjs} +40 -12
- package/dist/{textBlueprints-TLU7rjuN.js → textBlueprints-Dhe8_Uvc.js} +40 -12
- package/dist/{textMetrics-CEnX8GBe.js → textMetrics-Bbf-Dllw.js} +1 -1
- package/dist/{textMetrics-r9ldmBb5.cjs → textMetrics-CwYDH9js.cjs} +1 -1
- package/dist/{threadFns-BzxB-0i5.cjs → threadFns-B23RqugN.cjs} +7 -7
- package/dist/{threadFns-eDV-yg06.js → threadFns-Cn7_bmux.js} +7 -7
- package/dist/topology/cast.d.ts +6 -3
- package/dist/topology/topologyQueryFns.d.ts +9 -1
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-DKNVBMuN.js → topologyQueryFns-BfYdGOJc.js} +1 -14
- package/dist/{topologyQueryFns-gyva7bvF.cjs → topologyQueryFns-xh11vEQw.cjs} +1 -14
- package/dist/{validityTypes-BmqE7KfX.js → validityTypes-BfOuvfyp.js} +1 -1
- package/dist/{validityTypes-CwMwVFdY.cjs → validityTypes-CXkecqMw.cjs} +1 -1
- package/package.json +1 -1
|
@@ -26,20 +26,25 @@ export declare function sketchWires(sketch: Sketch): Wire;
|
|
|
26
26
|
/**
|
|
27
27
|
* Revolve a sketch around an axis to produce a solid of revolution.
|
|
28
28
|
*
|
|
29
|
+
* Accepts anything `Drawing.sketchOnPlane` returns: a profile with holes or
|
|
30
|
+
* several profiles revolves each one and returns them as a compound.
|
|
31
|
+
*
|
|
29
32
|
* @remarks Consumes the sketch — calling twice throws on the second call.
|
|
30
33
|
*/
|
|
31
|
-
export declare function sketchRevolve(sketch:
|
|
34
|
+
export declare function sketchRevolve(sketch: SketchInterface, revolutionAxis?: PointInput, config?: {
|
|
32
35
|
origin?: PointInput;
|
|
33
36
|
}): Shape3D;
|
|
34
37
|
/**
|
|
35
38
|
* Extrude a sketch to a given distance.
|
|
36
39
|
*
|
|
37
40
|
* Supports profile (taper) extrusion via `extrusionProfile`, twist extrusion
|
|
38
|
-
* via `twistAngle`, and direction/origin overrides.
|
|
41
|
+
* via `twistAngle`, and direction/origin overrides. Accepts anything
|
|
42
|
+
* `Drawing.sketchOnPlane` returns: a profile with holes or several profiles
|
|
43
|
+
* extrudes each one and returns them as a compound.
|
|
39
44
|
*
|
|
40
45
|
* @remarks Consumes the sketch — calling twice throws on the second call.
|
|
41
46
|
*/
|
|
42
|
-
export declare function sketchExtrude(sketch:
|
|
47
|
+
export declare function sketchExtrude(sketch: SketchInterface, extrusionDistance: number, config?: {
|
|
43
48
|
extrusionDirection?: PointInput;
|
|
44
49
|
extrusionProfile?: ExtrusionProfile;
|
|
45
50
|
twistAngle?: number;
|
|
@@ -66,4 +66,10 @@ export default class Sketches implements SketchInterface {
|
|
|
66
66
|
revolve(revolutionAxis?: PointInput, config?: {
|
|
67
67
|
origin?: PointInput;
|
|
68
68
|
}): Compound;
|
|
69
|
+
/**
|
|
70
|
+
* Combine per-profile results into one compound (which holds its own references) and
|
|
71
|
+
* release what the profiles leave behind: a `Sketch` deletes itself when extruded or
|
|
72
|
+
* revolved, but a `CompoundSketch` leaves its wires to the caller.
|
|
73
|
+
*/
|
|
74
|
+
private consumeInto;
|
|
69
75
|
}
|
package/dist/sketching.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
3
|
-
const require_drawFns = require("./drawFns-
|
|
4
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
+
const require_blueprintSketcher = require("./blueprintSketcher-W9yON-UC.cjs");
|
|
3
|
+
const require_drawFns = require("./drawFns-C7zAvera.cjs");
|
|
4
|
+
const require_textBlueprints = require("./textBlueprints-DHfYmLtP.cjs");
|
|
5
5
|
// src/sketching.ts
|
|
6
6
|
/**
|
|
7
7
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
package/dist/sketching.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
2
|
-
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-
|
|
3
|
-
import { a as Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-
|
|
1
|
+
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-Cr0Lr1Dq.js";
|
|
2
|
+
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-DjnU3fEd.js";
|
|
3
|
+
import { a as Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-Dhe8_Uvc.js";
|
|
4
4
|
// src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { C as isSolid, D as getShapeKind, E as GeometryCleanupError, G as _usingCtx, S as isShell, d as createSolid, f as createVertex, h as disposeResultShape, n as castResultShape, q as getKernel, s as createCompound, x as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { C as isSolid, D as getShapeKind, E as GeometryCleanupError, G as _usingCtx, S as isShell, d as createSolid, f as createVertex, h as disposeResultShape, n as castResultShape, q as getKernel, s as createCompound, x as isShape3D } from "./shapeTypes-DAz6aAnJ.js";
|
|
2
2
|
import { E as ok, P as unwrap, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, m as andThen, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { C as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { C as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-BfYdGOJc.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { a as vecDot, g as vecSub, h as vecScale, t as vecAdd } from "./vecOps-S-m9H_fe.js";
|
|
6
6
|
import { o as resolvePlane } from "./planeOps-D3yDuMux.js";
|
|
7
|
-
import { _ as cast, y as downcast } from "./faceFns-
|
|
8
|
-
import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-
|
|
7
|
+
import { _ as cast, y as downcast } from "./faceFns-7eHqNM0P.js";
|
|
8
|
+
import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-zrksCJTa.js";
|
|
9
9
|
import { n as hasFaceRoles, r as propagateFaceRolesFromEvolution } from "./faceRoleFns-BPxzQF-n.js";
|
|
10
10
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
11
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
11
|
+
import { r as makeFace } from "./surfaceBuilders-BO96DMCH.js";
|
|
12
12
|
// src/topology/metadata/faceTagFns.ts
|
|
13
13
|
var shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
14
14
|
var tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DJT3SnGK.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-xh11vEQw.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
6
|
const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
|
|
7
|
-
const require_faceFns = require("./faceFns-
|
|
8
|
-
const require_originTrackingFns = require("./originTrackingFns-
|
|
7
|
+
const require_faceFns = require("./faceFns-BjmlYcc9.cjs");
|
|
8
|
+
const require_originTrackingFns = require("./originTrackingFns-9gyCMFFQ.cjs");
|
|
9
9
|
const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
|
|
10
10
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
11
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
11
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CwG_RPdZ.cjs");
|
|
12
12
|
// src/topology/metadata/faceTagFns.ts
|
|
13
13
|
var shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
14
14
|
var tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel, y as isFace } from "./shapeTypes-
|
|
1
|
+
import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel, y as isFace } from "./shapeTypes-DAz6aAnJ.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, i as kernelError, m as andThen } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { a as isPlanarFace } from "./validityTypes-
|
|
4
|
-
import { _ as cast, u as outerWire } from "./faceFns-
|
|
3
|
+
import { a as isPlanarFace } from "./validityTypes-BfOuvfyp.js";
|
|
4
|
+
import { _ as cast, u as outerWire } from "./faceFns-7eHqNM0P.js";
|
|
5
5
|
// src/utils/range.ts
|
|
6
6
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
7
7
|
function range(len) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DJT3SnGK.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_validityTypes = require("./validityTypes-CXkecqMw.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-BjmlYcc9.cjs");
|
|
5
5
|
// src/utils/range.ts
|
|
6
6
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
7
7
|
function range(len) {
|
package/dist/text.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
const require_textMetrics = require("./textMetrics-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-DHfYmLtP.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-CwYDH9js.cjs");
|
|
4
4
|
exports.fontMetrics = require_textMetrics.fontMetrics;
|
|
5
5
|
exports.getFont = require_textBlueprints.getFont;
|
|
6
6
|
exports.loadFont = require_textBlueprints.loadFont;
|
package/dist/text.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as setFallbackFont, n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-
|
|
2
|
-
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-
|
|
1
|
+
import { i as setFallbackFont, n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-Dhe8_Uvc.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-Bbf-Dllw.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, setFallbackFont, sketchText, textBlueprints, textMetrics };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-DJT3SnGK.cjs");
|
|
3
3
|
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
4
4
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
5
5
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
6
6
|
const require_types = require("./types-CjF9Rofr.cjs");
|
|
7
7
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
8
8
|
const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
|
|
9
|
-
const require_faceFns = require("./faceFns-
|
|
10
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
9
|
+
const require_faceFns = require("./faceFns-BjmlYcc9.cjs");
|
|
10
|
+
const require_solidBuilders = require("./solidBuilders-BWbqhbyv.cjs");
|
|
11
11
|
const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
|
|
12
|
-
const require_curveFns = require("./curveFns-
|
|
12
|
+
const require_curveFns = require("./curveFns-8lUhNquZ.cjs");
|
|
13
13
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
14
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
15
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
16
|
-
const require_loftFns = require("./loftFns-
|
|
14
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CwG_RPdZ.cjs");
|
|
15
|
+
const require_blueprintSketcher = require("./blueprintSketcher-W9yON-UC.cjs");
|
|
16
|
+
const require_loftFns = require("./loftFns-DlG5oR0X.cjs");
|
|
17
17
|
let opentype_js = require("opentype.js");
|
|
18
18
|
opentype_js = require_rolldown_runtime.__toESM(opentype_js, 1);
|
|
19
19
|
// src/topology/shapeRef/extrudeRoleFns.ts
|
|
@@ -408,9 +408,18 @@ function sketchWires(sketch) {
|
|
|
408
408
|
/**
|
|
409
409
|
* Revolve a sketch around an axis to produce a solid of revolution.
|
|
410
410
|
*
|
|
411
|
+
* Accepts anything `Drawing.sketchOnPlane` returns: a profile with holes or
|
|
412
|
+
* several profiles revolves each one and returns them as a compound.
|
|
413
|
+
*
|
|
411
414
|
* @remarks Consumes the sketch — calling twice throws on the second call.
|
|
412
415
|
*/
|
|
413
|
-
function sketchRevolve(sketch, revolutionAxis,
|
|
416
|
+
function sketchRevolve(sketch, revolutionAxis, config = {}) {
|
|
417
|
+
if (!(sketch instanceof Sketch)) {
|
|
418
|
+
const solid = sketch.revolve(revolutionAxis, config);
|
|
419
|
+
if (sketch instanceof CompoundSketch) sketch.delete();
|
|
420
|
+
return solid;
|
|
421
|
+
}
|
|
422
|
+
const { origin } = config;
|
|
414
423
|
const face = require_errors.unwrap(require_surfaceBuilders.makeFace(sketch.wire));
|
|
415
424
|
const center = origin ? require_types.toVec3(origin) : sketch.defaultOrigin;
|
|
416
425
|
const dir = revolutionAxis ? require_types.toVec3(revolutionAxis) : [
|
|
@@ -427,11 +436,19 @@ function sketchRevolve(sketch, revolutionAxis, { origin } = {}) {
|
|
|
427
436
|
* Extrude a sketch to a given distance.
|
|
428
437
|
*
|
|
429
438
|
* Supports profile (taper) extrusion via `extrusionProfile`, twist extrusion
|
|
430
|
-
* via `twistAngle`, and direction/origin overrides.
|
|
439
|
+
* via `twistAngle`, and direction/origin overrides. Accepts anything
|
|
440
|
+
* `Drawing.sketchOnPlane` returns: a profile with holes or several profiles
|
|
441
|
+
* extrudes each one and returns them as a compound.
|
|
431
442
|
*
|
|
432
443
|
* @remarks Consumes the sketch — calling twice throws on the second call.
|
|
433
444
|
*/
|
|
434
|
-
function sketchExtrude(sketch, extrusionDistance,
|
|
445
|
+
function sketchExtrude(sketch, extrusionDistance, config = {}) {
|
|
446
|
+
if (!(sketch instanceof Sketch)) {
|
|
447
|
+
const solid = sketch.extrude(extrusionDistance, config);
|
|
448
|
+
if (sketch instanceof CompoundSketch) sketch.delete();
|
|
449
|
+
return solid;
|
|
450
|
+
}
|
|
451
|
+
const { extrusionDirection, extrusionProfile, twistAngle, origin } = config;
|
|
435
452
|
const direction = extrusionDirection ? require_types.toVec3(extrusionDirection) : sketch.defaultDirection;
|
|
436
453
|
const extrusionVec = require_vecOps.vecScale(require_vecOps.vecNormalize(direction), extrusionDistance);
|
|
437
454
|
const originVec = origin ? require_types.toVec3(origin) : sketch.defaultOrigin;
|
|
@@ -787,14 +804,25 @@ var Sketches = class {
|
|
|
787
804
|
*/
|
|
788
805
|
extrude(extrusionDistance, extrusionConfig = {}) {
|
|
789
806
|
const extruded = this.sketches.map((s) => s.extrude(extrusionDistance, extrusionConfig));
|
|
790
|
-
return
|
|
807
|
+
return this.consumeInto(extruded);
|
|
791
808
|
}
|
|
792
809
|
/**
|
|
793
810
|
* Revolves the drawing on an axis (defined by its direction and an origin
|
|
794
811
|
* (defaults to the sketch origin)
|
|
795
812
|
*/
|
|
796
813
|
revolve(revolutionAxis, config) {
|
|
797
|
-
return
|
|
814
|
+
return this.consumeInto(this.sketches.map((s) => s.revolve(revolutionAxis, config)));
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Combine per-profile results into one compound (which holds its own references) and
|
|
818
|
+
* release what the profiles leave behind: a `Sketch` deletes itself when extruded or
|
|
819
|
+
* revolved, but a `CompoundSketch` leaves its wires to the caller.
|
|
820
|
+
*/
|
|
821
|
+
consumeInto(parts) {
|
|
822
|
+
const compound = require_solidBuilders.makeCompound(parts);
|
|
823
|
+
for (const part of parts) part[Symbol.dispose]();
|
|
824
|
+
for (const s of this.sketches) if (!(s instanceof Sketch)) s.delete();
|
|
825
|
+
return compound;
|
|
798
826
|
}
|
|
799
827
|
};
|
|
800
828
|
// src/text/fontRegistry.ts
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { d as createSolid, h as disposeResultShape, l as createFace, m as disposeDowncastSource, n as castResultShape, p as createWire, q as getKernel, x as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { d as createSolid, h as disposeResultShape, l as createFace, m as disposeDowncastSource, n as castResultShape, p as createWire, q as getKernel, x as isShape3D } from "./shapeTypes-DAz6aAnJ.js";
|
|
2
2
|
import { n as bug } from "./bug-ClMTAJhe.js";
|
|
3
3
|
import { E as ok, P as unwrap, d as validationError, g as err, i as kernelError, l as typeCastError, r as ioError, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { r as toVec3 } from "./types-CKXsIm9-.js";
|
|
6
6
|
import { c as vecLength, d as vecNormalize, h as vecScale, i as vecDistance, r as vecCross, t as vecAdd } from "./vecOps-S-m9H_fe.js";
|
|
7
7
|
import { n as createPlane } from "./planeOps-D3yDuMux.js";
|
|
8
|
-
import { v as copyShape } from "./faceFns-
|
|
9
|
-
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-
|
|
8
|
+
import { v as copyShape } from "./faceFns-7eHqNM0P.js";
|
|
9
|
+
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-8xytLt8-.js";
|
|
10
10
|
import { i as setFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
|
|
11
|
-
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-
|
|
11
|
+
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-B4308HNM.js";
|
|
12
12
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
13
|
-
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-
|
|
14
|
-
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
15
|
-
import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-
|
|
13
|
+
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-BO96DMCH.js";
|
|
14
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-Cr0Lr1Dq.js";
|
|
15
|
+
import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-H4ZOpRAk.js";
|
|
16
16
|
import opentype from "opentype.js";
|
|
17
17
|
// src/topology/shapeRef/extrudeRoleFns.ts
|
|
18
18
|
/** Match tolerance as a fraction of the extrusion's size. */
|
|
@@ -406,9 +406,18 @@ function sketchWires(sketch) {
|
|
|
406
406
|
/**
|
|
407
407
|
* Revolve a sketch around an axis to produce a solid of revolution.
|
|
408
408
|
*
|
|
409
|
+
* Accepts anything `Drawing.sketchOnPlane` returns: a profile with holes or
|
|
410
|
+
* several profiles revolves each one and returns them as a compound.
|
|
411
|
+
*
|
|
409
412
|
* @remarks Consumes the sketch — calling twice throws on the second call.
|
|
410
413
|
*/
|
|
411
|
-
function sketchRevolve(sketch, revolutionAxis,
|
|
414
|
+
function sketchRevolve(sketch, revolutionAxis, config = {}) {
|
|
415
|
+
if (!(sketch instanceof Sketch)) {
|
|
416
|
+
const solid = sketch.revolve(revolutionAxis, config);
|
|
417
|
+
if (sketch instanceof CompoundSketch) sketch.delete();
|
|
418
|
+
return solid;
|
|
419
|
+
}
|
|
420
|
+
const { origin } = config;
|
|
412
421
|
const face = unwrap(makeFace(sketch.wire));
|
|
413
422
|
const center = origin ? toVec3(origin) : sketch.defaultOrigin;
|
|
414
423
|
const dir = revolutionAxis ? toVec3(revolutionAxis) : [
|
|
@@ -425,11 +434,19 @@ function sketchRevolve(sketch, revolutionAxis, { origin } = {}) {
|
|
|
425
434
|
* Extrude a sketch to a given distance.
|
|
426
435
|
*
|
|
427
436
|
* Supports profile (taper) extrusion via `extrusionProfile`, twist extrusion
|
|
428
|
-
* via `twistAngle`, and direction/origin overrides.
|
|
437
|
+
* via `twistAngle`, and direction/origin overrides. Accepts anything
|
|
438
|
+
* `Drawing.sketchOnPlane` returns: a profile with holes or several profiles
|
|
439
|
+
* extrudes each one and returns them as a compound.
|
|
429
440
|
*
|
|
430
441
|
* @remarks Consumes the sketch — calling twice throws on the second call.
|
|
431
442
|
*/
|
|
432
|
-
function sketchExtrude(sketch, extrusionDistance,
|
|
443
|
+
function sketchExtrude(sketch, extrusionDistance, config = {}) {
|
|
444
|
+
if (!(sketch instanceof Sketch)) {
|
|
445
|
+
const solid = sketch.extrude(extrusionDistance, config);
|
|
446
|
+
if (sketch instanceof CompoundSketch) sketch.delete();
|
|
447
|
+
return solid;
|
|
448
|
+
}
|
|
449
|
+
const { extrusionDirection, extrusionProfile, twistAngle, origin } = config;
|
|
433
450
|
const direction = extrusionDirection ? toVec3(extrusionDirection) : sketch.defaultDirection;
|
|
434
451
|
const extrusionVec = vecScale(vecNormalize(direction), extrusionDistance);
|
|
435
452
|
const originVec = origin ? toVec3(origin) : sketch.defaultOrigin;
|
|
@@ -785,14 +802,25 @@ var Sketches = class {
|
|
|
785
802
|
*/
|
|
786
803
|
extrude(extrusionDistance, extrusionConfig = {}) {
|
|
787
804
|
const extruded = this.sketches.map((s) => s.extrude(extrusionDistance, extrusionConfig));
|
|
788
|
-
return
|
|
805
|
+
return this.consumeInto(extruded);
|
|
789
806
|
}
|
|
790
807
|
/**
|
|
791
808
|
* Revolves the drawing on an axis (defined by its direction and an origin
|
|
792
809
|
* (defaults to the sketch origin)
|
|
793
810
|
*/
|
|
794
811
|
revolve(revolutionAxis, config) {
|
|
795
|
-
return
|
|
812
|
+
return this.consumeInto(this.sketches.map((s) => s.revolve(revolutionAxis, config)));
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* Combine per-profile results into one compound (which holds its own references) and
|
|
816
|
+
* release what the profiles leave behind: a `Sketch` deletes itself when extruded or
|
|
817
|
+
* revolved, but a `CompoundSketch` leaves its wires to the caller.
|
|
818
|
+
*/
|
|
819
|
+
consumeInto(parts) {
|
|
820
|
+
const compound = makeCompound(parts);
|
|
821
|
+
for (const part of parts) part[Symbol.dispose]();
|
|
822
|
+
for (const s of this.sketches) if (!(s instanceof Sketch)) s.delete();
|
|
823
|
+
return compound;
|
|
796
824
|
}
|
|
797
825
|
};
|
|
798
826
|
// src/text/fontRegistry.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
2
|
-
import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-
|
|
2
|
+
import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-Dhe8_Uvc.js";
|
|
3
3
|
// src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-DHfYmLtP.cjs");
|
|
3
3
|
// src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DJT3SnGK.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
5
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
6
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
7
|
-
const require_shapeFns = require("./shapeFns-
|
|
8
|
-
const require_loftFns = require("./loftFns-
|
|
9
|
-
const require_refResolveFns = require("./refResolveFns-
|
|
4
|
+
const require_faceFns = require("./faceFns-BjmlYcc9.cjs");
|
|
5
|
+
const require_solidBuilders = require("./solidBuilders-BWbqhbyv.cjs");
|
|
6
|
+
const require_primitiveFns = require("./primitiveFns-BRXZ7jnP.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-BbXqiNqY.cjs");
|
|
8
|
+
const require_loftFns = require("./loftFns-DlG5oR0X.cjs");
|
|
9
|
+
const require_refResolveFns = require("./refResolveFns-BZdUlv9f.cjs");
|
|
10
10
|
// src/utils/uuid.ts
|
|
11
11
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
12
12
|
function uuidv() {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-DAz6aAnJ.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, n as computationError, r as ioError, t as BrepErrorCode, x as isOk } from "./errors-BTccWbtE.js";
|
|
3
3
|
import { d as vecNormalize, s as vecIsZero } from "./vecOps-S-m9H_fe.js";
|
|
4
|
-
import { b as fromBREP } from "./faceFns-
|
|
5
|
-
import { h as fuseAll } from "./solidBuilders-
|
|
6
|
-
import { E as wire, h as line } from "./primitiveFns-
|
|
7
|
-
import { s as toBREP } from "./shapeFns-
|
|
8
|
-
import { t as loft } from "./loftFns-
|
|
9
|
-
import { c as resolveRefParams } from "./refResolveFns-
|
|
4
|
+
import { b as fromBREP } from "./faceFns-7eHqNM0P.js";
|
|
5
|
+
import { h as fuseAll } from "./solidBuilders-8xytLt8-.js";
|
|
6
|
+
import { E as wire, h as line } from "./primitiveFns-ClQP6zMQ.js";
|
|
7
|
+
import { s as toBREP } from "./shapeFns-BCgegapL.js";
|
|
8
|
+
import { t as loft } from "./loftFns-H4ZOpRAk.js";
|
|
9
|
+
import { c as resolveRefParams } from "./refResolveFns-BG3JGs--.js";
|
|
10
10
|
// src/utils/uuid.ts
|
|
11
11
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
12
12
|
function uuidv() {
|
package/dist/topology/cast.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KernelShape, KernelType } from '../kernel/types.js';
|
|
1
|
+
import { KernelShape, KernelType, ShapeType } from '../kernel/types.js';
|
|
2
2
|
import { AnyShape, CompSolid, Dimension } from '../core/shapeTypes.js';
|
|
3
3
|
import { Result } from '../core/result.js';
|
|
4
4
|
/** String literal identifying a topological entity type for TopExp_Explorer iteration. */
|
|
@@ -8,8 +8,11 @@ export type GenericTopo = KernelShape;
|
|
|
8
8
|
/** Convert a TopoEntity string to its kernel TopAbs_ShapeEnum value. */
|
|
9
9
|
export declare const asTopo: (entity: TopoEntity) => KernelType;
|
|
10
10
|
export declare const iterTopo: (shape: KernelShape, topo: TopoEntity) => IterableIterator<KernelShape>;
|
|
11
|
-
/**
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Get the topological type of a shape (`'solid'`, `'face'`, ...), returning Err for null
|
|
13
|
+
* shapes. Accepts a branded shape or its raw kernel handle (`shape.wrapped`).
|
|
14
|
+
*/
|
|
15
|
+
export declare const shapeType: (shape: KernelShape) => Result<ShapeType>;
|
|
13
16
|
/**
|
|
14
17
|
* Downcast a generic KernelShape to its concrete kernel type (e.g., kernel topology_Face).
|
|
15
18
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KernelShape, ShapeType, SurfaceType } from '../kernel/types.js';
|
|
2
|
-
import { AnyShape, Dimension, Edge, Face, Wire, Vertex, Shell, Solid, CompSolid, ShapeKind } from '../core/shapeTypes.js';
|
|
2
|
+
import { AnyShape, Dimension, Edge, Face, Wire, Vertex, Shell, Solid, CompSolid, Shape3D, ShapeKind } from '../core/shapeTypes.js';
|
|
3
3
|
import { Vec3 } from '../core/types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Count sub-shapes of a type without materialising (and disposing) a handle per
|
|
@@ -53,6 +53,7 @@ export declare function getCacheEntry(shape: AnyShape<Dimension>): TopoCacheEntr
|
|
|
53
53
|
*/
|
|
54
54
|
export declare function invalidateShapeCache(shape: AnyShape<Dimension>): void;
|
|
55
55
|
/** Get all edges of a shape as branded Edge handles. Results are cached per shape. */
|
|
56
|
+
export declare function getEdges(shape: Shape3D): Edge[];
|
|
56
57
|
export declare function getEdges<D extends Dimension>(shape: AnyShape<D>): Edge<D>[];
|
|
57
58
|
/**
|
|
58
59
|
* Get all faces of a shape. Results are cached per shape.
|
|
@@ -60,10 +61,13 @@ export declare function getEdges<D extends Dimension>(shape: AnyShape<D>): Edge<
|
|
|
60
61
|
* Returns `Face[]` — use `isOrientedFace()` or `orientedFace()` to narrow
|
|
61
62
|
* individual faces to `OrientedFace` when the orientation guarantee is needed.
|
|
62
63
|
*/
|
|
64
|
+
export declare function getFaces(shape: Shape3D): Face[];
|
|
63
65
|
export declare function getFaces<D extends Dimension>(shape: AnyShape<D>): Face<D>[];
|
|
64
66
|
/** Get all wires of a shape as branded Wire handles. Results are cached per shape. */
|
|
67
|
+
export declare function getWires(shape: Shape3D): Wire[];
|
|
65
68
|
export declare function getWires<D extends Dimension>(shape: AnyShape<D>): Wire<D>[];
|
|
66
69
|
/** Get all vertices of a shape as branded Vertex handles. Results are cached per shape. */
|
|
70
|
+
export declare function getVertices(shape: Shape3D): Vertex[];
|
|
67
71
|
export declare function getVertices<D extends Dimension>(shape: AnyShape<D>): Vertex<D>[];
|
|
68
72
|
/**
|
|
69
73
|
* Get all solids of a shape as branded Solid handles. Results are cached per shape.
|
|
@@ -78,12 +82,16 @@ export declare function getShells(shape: AnyShape<Dimension>): Shell[];
|
|
|
78
82
|
/** Get all compsolids of a shape as branded CompSolid handles. Results are cached per shape. */
|
|
79
83
|
export declare function getCompSolids(shape: AnyShape<Dimension>): CompSolid[];
|
|
80
84
|
/** Lazily iterate edges of a shape, yielding branded Edge handles one at a time. */
|
|
85
|
+
export declare function iterEdges(shape: Shape3D): Generator<Edge>;
|
|
81
86
|
export declare function iterEdges<D extends Dimension>(shape: AnyShape<D>): Generator<Edge<D>>;
|
|
82
87
|
/** Lazily iterate faces of a shape, yielding branded Face handles one at a time. */
|
|
88
|
+
export declare function iterFaces(shape: Shape3D): Generator<Face>;
|
|
83
89
|
export declare function iterFaces<D extends Dimension>(shape: AnyShape<D>): Generator<Face<D>>;
|
|
84
90
|
/** Lazily iterate wires of a shape, yielding branded Wire handles one at a time. */
|
|
91
|
+
export declare function iterWires(shape: Shape3D): Generator<Wire>;
|
|
85
92
|
export declare function iterWires<D extends Dimension>(shape: AnyShape<D>): Generator<Wire<D>>;
|
|
86
93
|
/** Lazily iterate vertices of a shape, yielding branded Vertex handles one at a time. */
|
|
94
|
+
export declare function iterVertices(shape: Shape3D): Generator<Vertex>;
|
|
87
95
|
export declare function iterVertices<D extends Dimension>(shape: AnyShape<D>): Generator<Vertex<D>>;
|
|
88
96
|
/** Lazily iterate solids of a shape, yielding branded Solid handles one at a time. */
|
|
89
97
|
export declare function iterSolids(shape: AnyShape<Dimension>): Generator<Solid>;
|
package/dist/topology.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
5
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
6
|
-
const require_shapeFns = require("./shapeFns-
|
|
7
|
-
const require_curveFns = require("./curveFns-
|
|
8
|
-
const require_meshFns = require("./meshFns-
|
|
9
|
-
const require_healingFns = require("./healingFns-
|
|
10
|
-
const require_adjacencyFns = require("./adjacencyFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-xh11vEQw.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-BjmlYcc9.cjs");
|
|
4
|
+
const require_solidBuilders = require("./solidBuilders-BWbqhbyv.cjs");
|
|
5
|
+
const require_primitiveFns = require("./primitiveFns-BRXZ7jnP.cjs");
|
|
6
|
+
const require_shapeFns = require("./shapeFns-BbXqiNqY.cjs");
|
|
7
|
+
const require_curveFns = require("./curveFns-8lUhNquZ.cjs");
|
|
8
|
+
const require_meshFns = require("./meshFns-nEvfwNRF.cjs");
|
|
9
|
+
const require_healingFns = require("./healingFns-CYLIcIWv.cjs");
|
|
10
|
+
const require_adjacencyFns = require("./adjacencyFns-C_Vb1AeW.cjs");
|
|
11
11
|
exports.addHoles = require_primitiveFns.addHoles;
|
|
12
12
|
exports.adjacentFaces = require_adjacencyFns.adjacentFaces;
|
|
13
13
|
exports.approximateCurve = require_curveFns.approximateCurve;
|
package/dist/topology.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, w as vertexPosition, x as iterWires } from "./topologyQueryFns-
|
|
2
|
-
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-
|
|
3
|
-
import { h as fuseAll, p as cutAll } from "./solidBuilders-
|
|
4
|
-
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-
|
|
5
|
-
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-
|
|
6
|
-
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-
|
|
7
|
-
import { d as clearMeshCache, f as createMeshCache, n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-
|
|
8
|
-
import { A as variableFillet, F as toLineGeometryData, M as toGroupedBufferGeometryData, S as chamferDistAngle, _ as checkBoolean, a as healFace, b as getNurbsCurveData, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, j as toBufferGeometryData, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-
|
|
9
|
-
import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-
|
|
1
|
+
import { _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, w as vertexPosition, x as iterWires } from "./topologyQueryFns-BfYdGOJc.js";
|
|
2
|
+
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-7eHqNM0P.js";
|
|
3
|
+
import { h as fuseAll, p as cutAll } from "./solidBuilders-8xytLt8-.js";
|
|
4
|
+
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-ClQP6zMQ.js";
|
|
5
|
+
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-BCgegapL.js";
|
|
6
|
+
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-B4308HNM.js";
|
|
7
|
+
import { d as clearMeshCache, f as createMeshCache, n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-DaRZxa7B.js";
|
|
8
|
+
import { A as variableFillet, F as toLineGeometryData, M as toGroupedBufferGeometryData, S as chamferDistAngle, _ as checkBoolean, a as healFace, b as getNurbsCurveData, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, j as toBufferGeometryData, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-BW7mZ_SW.js";
|
|
9
|
+
import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-54UTqtan.js";
|
|
10
10
|
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceAxis, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseAllBisect, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as _usingCtx, N as DisposalScope, O as getOrQueryType, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType } from "./shapeTypes-
|
|
1
|
+
import { G as _usingCtx, N as DisposalScope, O as getOrQueryType, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType } from "./shapeTypes-DAz6aAnJ.js";
|
|
2
2
|
import { E as ok, g as err } from "./errors-BTccWbtE.js";
|
|
3
3
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
4
4
|
// src/core/kernelErrorTranslation.ts
|
|
@@ -282,7 +282,6 @@ function getCacheEntry(shape) {
|
|
|
282
282
|
function invalidateShapeCache(shape) {
|
|
283
283
|
disposeCacheEntry(shape.wrapped);
|
|
284
284
|
}
|
|
285
|
-
/** Get all edges of a shape as branded Edge handles. Results are cached per shape. */
|
|
286
285
|
function getEdges(shape) {
|
|
287
286
|
const cache = getOrCreateCache(shape);
|
|
288
287
|
if (cache.edges) return cache.edges;
|
|
@@ -290,12 +289,6 @@ function getEdges(shape) {
|
|
|
290
289
|
cache.edges = edges;
|
|
291
290
|
return edges;
|
|
292
291
|
}
|
|
293
|
-
/**
|
|
294
|
-
* Get all faces of a shape. Results are cached per shape.
|
|
295
|
-
*
|
|
296
|
-
* Returns `Face[]` — use `isOrientedFace()` or `orientedFace()` to narrow
|
|
297
|
-
* individual faces to `OrientedFace` when the orientation guarantee is needed.
|
|
298
|
-
*/
|
|
299
292
|
function getFaces(shape) {
|
|
300
293
|
const cache = getOrCreateCache(shape);
|
|
301
294
|
if (cache.faces) return cache.faces;
|
|
@@ -303,7 +296,6 @@ function getFaces(shape) {
|
|
|
303
296
|
cache.faces = faces;
|
|
304
297
|
return faces;
|
|
305
298
|
}
|
|
306
|
-
/** Get all wires of a shape as branded Wire handles. Results are cached per shape. */
|
|
307
299
|
function getWires(shape) {
|
|
308
300
|
const cache = getOrCreateCache(shape);
|
|
309
301
|
if (cache.wires) return cache.wires;
|
|
@@ -311,7 +303,6 @@ function getWires(shape) {
|
|
|
311
303
|
cache.wires = wires;
|
|
312
304
|
return wires;
|
|
313
305
|
}
|
|
314
|
-
/** Get all vertices of a shape as branded Vertex handles. Results are cached per shape. */
|
|
315
306
|
function getVertices(shape) {
|
|
316
307
|
const cache = getOrCreateCache(shape);
|
|
317
308
|
if (cache.vertices) return cache.vertices;
|
|
@@ -349,19 +340,15 @@ function getCompSolids(shape) {
|
|
|
349
340
|
cache.compSolids = compSolids;
|
|
350
341
|
return compSolids;
|
|
351
342
|
}
|
|
352
|
-
/** Lazily iterate edges of a shape, yielding branded Edge handles one at a time. */
|
|
353
343
|
function* iterEdges(shape) {
|
|
354
344
|
for (const e of getKernel().iterShapes(shape.wrapped, "edge")) yield castResultShapeWithKnownType(e, "edge");
|
|
355
345
|
}
|
|
356
|
-
/** Lazily iterate faces of a shape, yielding branded Face handles one at a time. */
|
|
357
346
|
function* iterFaces(shape) {
|
|
358
347
|
for (const f of getKernel().iterShapes(shape.wrapped, "face")) yield castResultShapeWithKnownType(f, "face");
|
|
359
348
|
}
|
|
360
|
-
/** Lazily iterate wires of a shape, yielding branded Wire handles one at a time. */
|
|
361
349
|
function* iterWires(shape) {
|
|
362
350
|
for (const w of getKernel().iterShapes(shape.wrapped, "wire")) yield castResultShapeWithKnownType(w, "wire");
|
|
363
351
|
}
|
|
364
|
-
/** Lazily iterate vertices of a shape, yielding branded Vertex handles one at a time. */
|
|
365
352
|
function* iterVertices(shape) {
|
|
366
353
|
for (const v of getKernel().iterShapes(shape.wrapped, "vertex")) yield castResultShapeWithKnownType(v, "vertex");
|
|
367
354
|
}
|