brepjs 20.5.0 → 20.7.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.cjs +9 -11
- package/dist/2d.js +9 -11
- package/dist/{adjacencyFns-DeyXahej.js → adjacencyFns-BgJQQjdt.js} +5 -6
- package/dist/{adjacencyFns-1rxgJ6Hw.cjs → adjacencyFns-_RTYhwtD.cjs} +5 -6
- package/dist/{arrayAccess-DrUGPADn.js → arrayAccess-BpgouNir.js} +1 -2
- package/dist/{arrayAccess-e4H9cBfh.cjs → arrayAccess-DpJYARwv.cjs} +1 -2
- package/dist/{blueprint-rwJjYPzo.js → blueprint-Bth4EVaO.js} +24 -37
- package/dist/{blueprint-Yyoiz-U1.cjs → blueprint-wq2TU1XP.cjs} +24 -37
- package/dist/{blueprintFns-Q3Sq-Fse.js → blueprintFns-DQmNe1p6.js} +5 -7
- package/dist/{blueprintFns-Ce6OoPSX.cjs → blueprintFns-Dd0gm1rX.cjs} +5 -7
- package/dist/{blueprintSketcher-CzKbxeTk.cjs → blueprintSketcher-CSDqr27-.cjs} +19 -31
- package/dist/{blueprintSketcher-FywUpRiV.js → blueprintSketcher-DNp87aQZ.js} +19 -31
- package/dist/{boolean2D-D8igCYc9.js → boolean2D-BAb4SnIL.js} +13 -19
- package/dist/{boolean2D-BzZ9iBSn.cjs → boolean2D-BkgOjMRt.cjs} +13 -19
- package/dist/brepjs.cjs +113 -187
- package/dist/brepjs.js +113 -188
- package/dist/{bug-O02CsAmt.cjs → bug-CBcpIPuf.cjs} +2 -4
- package/dist/{bug-BdOHwn_e.js → bug-ClMTAJhe.js} +2 -4
- package/dist/{cameraFns-Cs6v3bWQ.js → cameraFns-9AGyuZVp.js} +8 -11
- package/dist/{cameraFns-RHCb1F1s.cjs → cameraFns-CKUN90f_.cjs} +8 -11
- package/dist/{constants-ITRzCnCp.js → constants-iraOnb2p.js} +1 -2
- package/dist/{constants-BOVyEYGH.cjs → constants-oee0S_x6.cjs} +1 -2
- package/dist/core/errors.d.ts +3 -0
- package/dist/core.cjs +8 -8
- package/dist/core.js +8 -8
- package/dist/{cornerFinder-Dlae8IX5.js → cornerFinder-Cr_04etw.js} +4 -5
- package/dist/{cornerFinder-Cji_BK-R.cjs → cornerFinder-DJWo6h1Z.cjs} +4 -5
- package/dist/{curveFns-KS1BWGhF.js → curveFns-CkA2WJP2.js} +3 -4
- package/dist/{curveFns-6-ULFrEB.cjs → curveFns-U7srQ3ZA.cjs} +3 -4
- package/dist/{drawFns-3yRVBDgI.js → drawFns-C6bmFijD.js} +32 -45
- package/dist/{drawFns-Ddlgp9gQ.cjs → drawFns-DlCxozRP.cjs} +32 -45
- package/dist/{errors-jwhfQJZK.cjs → errors-GVyCnpi0.cjs} +6 -5
- package/dist/{errors-Zb3jBa0u.js → errors-vxP5FT8B.js} +6 -5
- package/dist/{faceFns-CTlJC5IY.js → faceFns-BBk6XKJO.js} +6 -8
- package/dist/{faceFns-CZeHWke7.cjs → faceFns-DSRREV5G.cjs} +6 -8
- package/dist/{faceRoleFns-CWU1-Pm8.js → faceRoleFns-BPxzQF-n.js} +1 -2
- package/dist/{faceRoleFns-CtH_48MO.cjs → faceRoleFns-Db5bYj4Q.cjs} +1 -2
- package/dist/{healingFns-DwSpJZfg.cjs → healingFns-C9G3yjOe.cjs} +148 -51
- package/dist/{healingFns-Ct3gEMvk.js → healingFns-CEr0afli.js} +148 -51
- package/dist/{helpers-NRZVshPb.cjs → helpers-JuPoaP_b.cjs} +15 -21
- package/dist/{helpers-BN1mVMuZ.js → helpers-sDialr0f.js} +15 -21
- package/dist/{importFns-BEi-HsSw.cjs → importFns-ClqPJCFR.cjs} +12 -19
- package/dist/{importFns-0kHGg-b8.js → importFns-DSUfSQn2.js} +12 -19
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/capabilities.d.ts +8 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -2
- package/dist/{loftFns-B5mq1WDh.js → loftFns-B8DSoG-F.js} +7 -10
- package/dist/{loftFns-DL9UsQhd.cjs → loftFns-mkJeOaII.cjs} +7 -10
- package/dist/{measureFns-D_GpQw5z.cjs → measureFns-BvNkzSR6.cjs} +6 -8
- package/dist/{measureFns-CyDVZomf.js → measureFns-PRM3gOjw.js} +6 -8
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-COlno8TY.js → meshFns-CgbT3uuO.js} +6 -8
- package/dist/{meshFns-CAxkaRTm.cjs → meshFns-W7ZTKqiJ.cjs} +6 -8
- package/dist/{occtWasmAdapter-CA6PmIIj.cjs → occtWasmAdapter-BSQeA69d.cjs} +49 -57
- package/dist/{occtWasmAdapter-BX10fyla.js → occtWasmAdapter-PzZJHUAd.js} +44 -58
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{originTrackingFns-DiHy5BZC.js → originTrackingFns-D8SNCDKj.js} +4 -5
- package/dist/{originTrackingFns-CWo6NWHK.cjs → originTrackingFns-DJDTRJh3.cjs} +4 -5
- package/dist/{planeOps-DJuclNxa.cjs → planeOps-C9d2Y56B.cjs} +5 -6
- package/dist/{planeOps-Cxws4Tiu.js → planeOps-Dp0YvuFE.js} +5 -6
- package/dist/{primitiveFns-ZV3aMbqG.cjs → primitiveFns-EtHyTqhw.cjs} +8 -10
- package/dist/{primitiveFns-CGJzS4MO.js → primitiveFns-W3RYNJcm.js} +8 -10
- package/dist/{principalBoxFns-BJgGEoik.js → principalBoxFns-Cbtty-2_.js} +7 -8
- package/dist/{principalBoxFns-5FSbxAj-.cjs → principalBoxFns-CmZa7qHi.cjs} +7 -8
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -2
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-CpVZoeOT.js → refResolveFns-BkciKtNP.js} +14 -21
- package/dist/{refResolveFns-Ct52Uw7R.cjs → refResolveFns-D99Vqe7a.cjs} +14 -21
- package/dist/result.cjs +2 -2
- package/dist/result.js +2 -2
- package/dist/{rolldown-runtime-C0BPl7ul.cjs → rolldown-runtime-BW-eSwOZ.cjs} +1 -2
- package/dist/{shapeFns-C2j6oZ2u.cjs → shapeFns-B54CsPyk.cjs} +5 -6
- package/dist/{shapeFns--1wNlcc_.js → shapeFns-DB3l3ULC.js} +5 -6
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -2
- package/dist/{shapeTypes-CqNJoSam.js → shapeTypes-CgbUTASh.js} +82 -161
- package/dist/{shapeTypes-DH2ShBU_.cjs → shapeTypes-D_anqiRe.cjs} +82 -161
- package/dist/sketching.cjs +4 -5
- package/dist/sketching.js +4 -5
- package/dist/{solidBuilders-CgicU3le.cjs → solidBuilders-CUd-korS.cjs} +17 -23
- package/dist/{solidBuilders-IstbiWju.js → solidBuilders-DE_na4G3.js} +17 -23
- package/dist/{surfaceBuilders-vYgSvgI6.cjs → surfaceBuilders-DOn2jWkh.cjs} +8 -12
- package/dist/{surfaceBuilders-8nLk2PWk.js → surfaceBuilders-wdGNiImD.js} +8 -12
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-fa7VHJZz.cjs → textBlueprints-BQ60Rc96.cjs} +24 -32
- package/dist/{textBlueprints-C13NAA3C.js → textBlueprints-B_jwMuej.js} +23 -31
- package/dist/{textMetrics--cikHkGX.cjs → textMetrics-Bm0a4kh7.cjs} +4 -6
- package/dist/{textMetrics-Dcc63qRm.js → textMetrics-Dj3yfZNQ.js} +4 -6
- package/dist/{threadFns-BUQPg_vI.cjs → threadFns-BuRPVenB.cjs} +21 -33
- package/dist/{threadFns-3U9x4v_M.js → threadFns-DlL5VnMf.js} +21 -33
- package/dist/topology/modifierFns.d.ts +5 -0
- package/dist/topology/thickResultCheck.d.ts +18 -0
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-DnfjQgP7.js → topologyQueryFns-6M_dbT1R.js} +10 -10
- package/dist/{topologyQueryFns-q2bGyuEV.cjs → topologyQueryFns-ENxs8uu2.cjs} +15 -9
- package/dist/{types-D24Y27N0.js → types-CKXsIm9-.js} +1 -2
- package/dist/{types-KjA8tY4Y.cjs → types-CjF9Rofr.cjs} +1 -2
- package/dist/{validityTypes-r0A2YdNq.cjs → validityTypes-BPamqRZ8.cjs} +3 -4
- package/dist/{validityTypes-t7JpS0Ki.js → validityTypes-BTuI0vcR.js} +3 -4
- package/dist/{vecOps-CCnJt-yH.cjs → vecOps-CrGEPPQM.cjs} +1 -2
- package/dist/{vecOps-SKPRvPH-.js → vecOps-S-m9H_fe.js} +1 -2
- package/dist/vectors.cjs +4 -4
- package/dist/vectors.js +4 -4
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +1 -2
- package/dist/{workerPool-XcYX2UZ0.js → workerPool-Bc5hmJc4.js} +5 -10
- package/dist/{workerPool-D30NsiIW.cjs → workerPool-D5tiNXrI.cjs} +5 -10
- package/package.json +10 -10
package/dist/sketching.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
5
|
-
|
|
2
|
+
const require_blueprintSketcher = require("./blueprintSketcher-CSDqr27-.cjs");
|
|
3
|
+
const require_drawFns = require("./drawFns-DlCxozRP.cjs");
|
|
4
|
+
const require_textBlueprints = require("./textBlueprints-BQ60Rc96.cjs");
|
|
5
|
+
// src/sketching.ts
|
|
6
6
|
/**
|
|
7
7
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
8
8
|
*
|
|
@@ -11,7 +11,6 @@ const require_textBlueprints = require("./textBlueprints-fa7VHJZz.cjs");
|
|
|
11
11
|
* import { Sketcher, sketchExtrude, drawRectangle } from 'brepjs/sketching';
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
//#endregion
|
|
15
14
|
exports.BaseSketcher2d = require_blueprintSketcher.BaseSketcher2d;
|
|
16
15
|
exports.BlueprintSketcher = require_blueprintSketcher.BlueprintSketcher;
|
|
17
16
|
exports.CompoundSketch = require_textBlueprints.CompoundSketch;
|
package/dist/sketching.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-
|
|
4
|
-
|
|
1
|
+
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-DNp87aQZ.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-C6bmFijD.js";
|
|
3
|
+
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-B_jwMuej.js";
|
|
4
|
+
// src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
7
7
|
*
|
|
@@ -10,5 +10,4 @@ import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft,
|
|
|
10
10
|
* import { Sketcher, sketchExtrude, drawRectangle } from 'brepjs/sketching';
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
|
-
//#endregion
|
|
14
13
|
export { BaseSketcher2d, BlueprintSketcher, CompoundSketch, Drawing, DrawingPen, FaceSketcher, Sketch, Sketcher, Sketches, compoundSketchExtrude, compoundSketchFace, compoundSketchLoft, compoundSketchRevolve, deserializeDrawing, draw, drawCircle, drawEllipse, drawFaceOutline, drawParametricFunction, drawPointsInterpolation, drawPolysides, drawProjection, drawRectangle, drawRoundedRectangle, drawSingleCircle, drawSingleEllipse, drawText, drawingChamfer, drawingCut, drawingFillet, drawingFuse, drawingIntersect, drawingToSketchOnPlane, makeBaseBox, mirrorDrawing, polysideInnerRadius, rotateDrawing, scaleDrawing, sketchCircle, sketchEllipse, sketchExtrude, sketchFace, sketchFaceOffset, sketchHelix, sketchLoft, sketchParametricFunction, sketchPolysides, sketchRectangle, sketchRevolve, sketchRoundedRectangle, sketchSweep, sketchWires, translateDrawing };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_constants = require("./constants-
|
|
5
|
-
const require_vecOps = require("./vecOps-
|
|
6
|
-
const require_planeOps = require("./planeOps-
|
|
7
|
-
const require_faceFns = require("./faceFns-
|
|
8
|
-
const require_originTrackingFns = require("./originTrackingFns-
|
|
9
|
-
const require_faceRoleFns = require("./faceRoleFns-
|
|
10
|
-
const require_arrayAccess = require("./arrayAccess-
|
|
11
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
12
|
-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D_anqiRe.cjs");
|
|
2
|
+
const require_errors = require("./errors-GVyCnpi0.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-ENxs8uu2.cjs");
|
|
4
|
+
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
|
+
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
+
const require_planeOps = require("./planeOps-C9d2Y56B.cjs");
|
|
7
|
+
const require_faceFns = require("./faceFns-DSRREV5G.cjs");
|
|
8
|
+
const require_originTrackingFns = require("./originTrackingFns-DJDTRJh3.cjs");
|
|
9
|
+
const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
|
|
10
|
+
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
11
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DOn2jWkh.cjs");
|
|
12
|
+
// src/topology/metadata/faceTagFns.ts
|
|
13
13
|
var shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
14
14
|
var tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
15
15
|
/** O(1) check whether a shape has any face tags attached. */
|
|
@@ -132,8 +132,7 @@ function propagateFaceTagsFromEvolution(evolution, inputs, result) {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
//#region src/topology/metadata/colorFns.ts
|
|
135
|
+
// src/topology/metadata/colorFns.ts
|
|
137
136
|
var shapeColorStore = /* @__PURE__ */ new WeakMap();
|
|
138
137
|
var faceColorStore = /* @__PURE__ */ new WeakMap();
|
|
139
138
|
/** O(1) check whether a shape has any color metadata (shape or face level). */
|
|
@@ -230,8 +229,7 @@ function propagateColorsFromEvolution(evolution, inputs, result) {
|
|
|
230
229
|
}
|
|
231
230
|
}
|
|
232
231
|
}
|
|
233
|
-
|
|
234
|
-
//#region src/topology/metadata/metadataPropagation.ts
|
|
232
|
+
// src/topology/metadata/metadataPropagation.ts
|
|
235
233
|
/**
|
|
236
234
|
* Collect ALL face hashes from input shapes for WithHistory kernel methods.
|
|
237
235
|
*
|
|
@@ -340,8 +338,7 @@ function propagateMetadataThroughRelocation(source, moved) {
|
|
|
340
338
|
_usingCtx$2.d();
|
|
341
339
|
}
|
|
342
340
|
}
|
|
343
|
-
|
|
344
|
-
//#region src/topology/booleanFns.ts
|
|
341
|
+
// src/topology/booleanFns.ts
|
|
345
342
|
/**
|
|
346
343
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
347
344
|
* All functions are immutable: they return new shapes without disposing inputs.
|
|
@@ -866,8 +863,7 @@ function booleanPipelineFallback(base, steps, options) {
|
|
|
866
863
|
}
|
|
867
864
|
return require_errors.ok(current);
|
|
868
865
|
}
|
|
869
|
-
|
|
870
|
-
//#region src/topology/shapeUtils.ts
|
|
866
|
+
// src/topology/shapeUtils.ts
|
|
871
867
|
/**
|
|
872
868
|
* Shape assembly utilities — welding and sewing operations.
|
|
873
869
|
*/
|
|
@@ -888,8 +884,7 @@ function weldShellsAndFaces(facesOrShells, ignoreType = false) {
|
|
|
888
884
|
if (!ignoreType && !require_shapeTypes.isShell(shell)) return require_errors.err(require_errors.typeCastError("WELD_NOT_SHELL", "Could not make a shell from faces and shells"));
|
|
889
885
|
return require_errors.ok(shell);
|
|
890
886
|
}
|
|
891
|
-
|
|
892
|
-
//#region src/topology/solidBuilders.ts
|
|
887
|
+
// src/topology/solidBuilders.ts
|
|
893
888
|
/**
|
|
894
889
|
* Solid and primitive construction helpers — boxes, cylinders, spheres, cones,
|
|
895
890
|
* tori, ellipsoids, vertices, compounds, and offsets.
|
|
@@ -1013,7 +1008,6 @@ function makeSolid(facesOrShells) {
|
|
|
1013
1008
|
_usingCtx$1.d();
|
|
1014
1009
|
}
|
|
1015
1010
|
}
|
|
1016
|
-
//#endregion
|
|
1017
1011
|
Object.defineProperty(exports, "booleanPipeline", {
|
|
1018
1012
|
enumerable: true,
|
|
1019
1013
|
get: function() {
|
|
@@ -1,15 +1,15 @@
|
|
|
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-
|
|
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-
|
|
3
|
-
import { C as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
4
|
-
import { n as HASH_CODE_MAX } from "./constants-
|
|
5
|
-
import { a as vecDot, g as vecSub, h as vecScale, t as vecAdd } from "./vecOps-
|
|
6
|
-
import { o as resolvePlane } from "./planeOps-
|
|
7
|
-
import { _ as cast, y as downcast } from "./faceFns-
|
|
8
|
-
import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-
|
|
9
|
-
import { n as hasFaceRoles, r as propagateFaceRolesFromEvolution } from "./faceRoleFns-
|
|
10
|
-
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-
|
|
11
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
12
|
-
|
|
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-CgbUTASh.js";
|
|
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-vxP5FT8B.js";
|
|
3
|
+
import { C as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-6M_dbT1R.js";
|
|
4
|
+
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
5
|
+
import { a as vecDot, g as vecSub, h as vecScale, t as vecAdd } from "./vecOps-S-m9H_fe.js";
|
|
6
|
+
import { o as resolvePlane } from "./planeOps-Dp0YvuFE.js";
|
|
7
|
+
import { _ as cast, y as downcast } from "./faceFns-BBk6XKJO.js";
|
|
8
|
+
import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-D8SNCDKj.js";
|
|
9
|
+
import { n as hasFaceRoles, r as propagateFaceRolesFromEvolution } from "./faceRoleFns-BPxzQF-n.js";
|
|
10
|
+
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
11
|
+
import { r as makeFace } from "./surfaceBuilders-wdGNiImD.js";
|
|
12
|
+
// src/topology/metadata/faceTagFns.ts
|
|
13
13
|
var shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
14
14
|
var tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
15
15
|
/** O(1) check whether a shape has any face tags attached. */
|
|
@@ -132,8 +132,7 @@ function propagateFaceTagsFromEvolution(evolution, inputs, result) {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
//#region src/topology/metadata/colorFns.ts
|
|
135
|
+
// src/topology/metadata/colorFns.ts
|
|
137
136
|
var shapeColorStore = /* @__PURE__ */ new WeakMap();
|
|
138
137
|
var faceColorStore = /* @__PURE__ */ new WeakMap();
|
|
139
138
|
/** O(1) check whether a shape has any color metadata (shape or face level). */
|
|
@@ -230,8 +229,7 @@ function propagateColorsFromEvolution(evolution, inputs, result) {
|
|
|
230
229
|
}
|
|
231
230
|
}
|
|
232
231
|
}
|
|
233
|
-
|
|
234
|
-
//#region src/topology/metadata/metadataPropagation.ts
|
|
232
|
+
// src/topology/metadata/metadataPropagation.ts
|
|
235
233
|
/**
|
|
236
234
|
* Collect ALL face hashes from input shapes for WithHistory kernel methods.
|
|
237
235
|
*
|
|
@@ -340,8 +338,7 @@ function propagateMetadataThroughRelocation(source, moved) {
|
|
|
340
338
|
_usingCtx$2.d();
|
|
341
339
|
}
|
|
342
340
|
}
|
|
343
|
-
|
|
344
|
-
//#region src/topology/booleanFns.ts
|
|
341
|
+
// src/topology/booleanFns.ts
|
|
345
342
|
/**
|
|
346
343
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
347
344
|
* All functions are immutable: they return new shapes without disposing inputs.
|
|
@@ -866,8 +863,7 @@ function booleanPipelineFallback(base, steps, options) {
|
|
|
866
863
|
}
|
|
867
864
|
return ok(current);
|
|
868
865
|
}
|
|
869
|
-
|
|
870
|
-
//#region src/topology/shapeUtils.ts
|
|
866
|
+
// src/topology/shapeUtils.ts
|
|
871
867
|
/**
|
|
872
868
|
* Shape assembly utilities — welding and sewing operations.
|
|
873
869
|
*/
|
|
@@ -888,8 +884,7 @@ function weldShellsAndFaces(facesOrShells, ignoreType = false) {
|
|
|
888
884
|
if (!ignoreType && !isShell(shell)) return err(typeCastError("WELD_NOT_SHELL", "Could not make a shell from faces and shells"));
|
|
889
885
|
return ok(shell);
|
|
890
886
|
}
|
|
891
|
-
|
|
892
|
-
//#region src/topology/solidBuilders.ts
|
|
887
|
+
// src/topology/solidBuilders.ts
|
|
893
888
|
/**
|
|
894
889
|
* Solid and primitive construction helpers — boxes, cylinders, spheres, cones,
|
|
895
890
|
* tori, ellipsoids, vertices, compounds, and offsets.
|
|
@@ -1013,5 +1008,4 @@ function makeSolid(facesOrShells) {
|
|
|
1013
1008
|
_usingCtx$1.d();
|
|
1014
1009
|
}
|
|
1015
1010
|
}
|
|
1016
|
-
//#endregion
|
|
1017
1011
|
export { parseColor as A, propagateAllMetadata as C, colorShape as D, colorFaces as E, tagFaces as F, getFaceTags as M, getTagMetadata as N, getFaceColor as O, setTagMetadata as P, hasAnyMetadata as S, propagateMetadataThroughRelocation as T, section as _, makeOffset as a, split as b, makeTorus as c, booleanPipeline as d, cut as f, intersect as g, fuseAll as h, makeEllipsoid as i, findFacesByTag as j, getShapeColor as k, makeVertex as l, fuse as m, makeCone as n, makeSolid as o, cutAll as p, makeCylinder as r, makeSphere as s, makeCompound as t, weldShellsAndFaces as u, sectionToFace as v, propagateMetadataByHash as w, collectInputFaceHashes as x, slice as y };
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
5
|
-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D_anqiRe.cjs");
|
|
2
|
+
const require_errors = require("./errors-GVyCnpi0.cjs");
|
|
3
|
+
const require_validityTypes = require("./validityTypes-BPamqRZ8.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-DSRREV5G.cjs");
|
|
5
|
+
// src/utils/range.ts
|
|
6
6
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
7
7
|
function range(len) {
|
|
8
8
|
return Array.from(Array(len).keys());
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
//#region src/utils/zip.ts
|
|
10
|
+
// src/utils/zip.ts
|
|
12
11
|
/** Zip multiple arrays together, truncating to the shortest length. */
|
|
13
12
|
function zip(arrays) {
|
|
14
13
|
return range(Math.min(...arrays.map((arr) => arr.length))).map((i) => arrays.map((arr) => arr[i]));
|
|
15
14
|
}
|
|
16
|
-
|
|
17
|
-
//#region src/topology/curveBuilders.ts
|
|
15
|
+
// src/topology/curveBuilders.ts
|
|
18
16
|
/**
|
|
19
17
|
* Curve construction helpers — lines, arcs, circles, ellipses, splines, and wire assembly.
|
|
20
18
|
*/
|
|
@@ -164,8 +162,7 @@ function assembleWire(listOfEdges) {
|
|
|
164
162
|
return require_errors.err(require_errors.kernelError("WIRE_BUILD_FAILED", `Failed to build the wire: ${e instanceof Error ? e.message : "unknown error"}`));
|
|
165
163
|
}
|
|
166
164
|
}
|
|
167
|
-
|
|
168
|
-
//#region src/topology/surfaceBuilders.ts
|
|
165
|
+
// src/topology/surfaceBuilders.ts
|
|
169
166
|
/**
|
|
170
167
|
* Surface / face construction helpers — planar faces, non-planar fills, holes, and polygons.
|
|
171
168
|
*/
|
|
@@ -245,7 +242,6 @@ function makePolygon(points) {
|
|
|
245
242
|
_usingCtx$1.d();
|
|
246
243
|
}
|
|
247
244
|
}
|
|
248
|
-
//#endregion
|
|
249
245
|
Object.defineProperty(exports, "addHolesInFace", {
|
|
250
246
|
enumerable: true,
|
|
251
247
|
get: function() {
|
|
@@ -1,20 +1,18 @@
|
|
|
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-
|
|
2
|
-
import { E as ok, d as validationError, g as err, i as kernelError, m as andThen } from "./errors-
|
|
3
|
-
import { a as isPlanarFace } from "./validityTypes-
|
|
4
|
-
import { _ as cast, u as outerWire } from "./faceFns-
|
|
5
|
-
|
|
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-CgbUTASh.js";
|
|
2
|
+
import { E as ok, d as validationError, g as err, i as kernelError, m as andThen } from "./errors-vxP5FT8B.js";
|
|
3
|
+
import { a as isPlanarFace } from "./validityTypes-BTuI0vcR.js";
|
|
4
|
+
import { _ as cast, u as outerWire } from "./faceFns-BBk6XKJO.js";
|
|
5
|
+
// src/utils/range.ts
|
|
6
6
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
7
7
|
function range(len) {
|
|
8
8
|
return Array.from(Array(len).keys());
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
//#region src/utils/zip.ts
|
|
10
|
+
// src/utils/zip.ts
|
|
12
11
|
/** Zip multiple arrays together, truncating to the shortest length. */
|
|
13
12
|
function zip(arrays) {
|
|
14
13
|
return range(Math.min(...arrays.map((arr) => arr.length))).map((i) => arrays.map((arr) => arr[i]));
|
|
15
14
|
}
|
|
16
|
-
|
|
17
|
-
//#region src/topology/curveBuilders.ts
|
|
15
|
+
// src/topology/curveBuilders.ts
|
|
18
16
|
/**
|
|
19
17
|
* Curve construction helpers — lines, arcs, circles, ellipses, splines, and wire assembly.
|
|
20
18
|
*/
|
|
@@ -164,8 +162,7 @@ function assembleWire(listOfEdges) {
|
|
|
164
162
|
return err(kernelError("WIRE_BUILD_FAILED", `Failed to build the wire: ${e instanceof Error ? e.message : "unknown error"}`));
|
|
165
163
|
}
|
|
166
164
|
}
|
|
167
|
-
|
|
168
|
-
//#region src/topology/surfaceBuilders.ts
|
|
165
|
+
// src/topology/surfaceBuilders.ts
|
|
169
166
|
/**
|
|
170
167
|
* Surface / face construction helpers — planar faces, non-planar fills, holes, and polygons.
|
|
171
168
|
*/
|
|
@@ -245,5 +242,4 @@ function makePolygon(points) {
|
|
|
245
242
|
_usingCtx$1.d();
|
|
246
243
|
}
|
|
247
244
|
}
|
|
248
|
-
//#endregion
|
|
249
245
|
export { makeThreePointArc as _, makeNonPlanarFace as a, makeBSplineApproximation as c, makeCircle as d, makeEllipse as f, makeTangentArc as g, makeLine as h, makeNewFaceWithinFace as i, makeBSplineInterpolation as l, makeHelix as m, fill as n, makePolygon as o, makeEllipseArc as p, makeFace as r, assembleWire as s, addHolesInFace as t, makeBezierCurve as u, zip as v };
|
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-BQ60Rc96.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-Bm0a4kh7.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 { 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 { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-B_jwMuej.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-Dj3yfZNQ.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
3
|
-
const require_bug = require("./bug-
|
|
4
|
-
const require_errors = require("./errors-
|
|
5
|
-
const require_constants = require("./constants-
|
|
6
|
-
const require_types = require("./types-
|
|
7
|
-
const require_vecOps = require("./vecOps-
|
|
8
|
-
const require_planeOps = require("./planeOps-
|
|
9
|
-
const require_faceFns = require("./faceFns-
|
|
10
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
11
|
-
const require_faceRoleFns = require("./faceRoleFns-
|
|
12
|
-
const require_curveFns = require("./curveFns-
|
|
13
|
-
const require_arrayAccess = require("./arrayAccess-
|
|
14
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
15
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
16
|
-
const require_loftFns = require("./loftFns-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-D_anqiRe.cjs");
|
|
3
|
+
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
4
|
+
const require_errors = require("./errors-GVyCnpi0.cjs");
|
|
5
|
+
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
6
|
+
const require_types = require("./types-CjF9Rofr.cjs");
|
|
7
|
+
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
8
|
+
const require_planeOps = require("./planeOps-C9d2Y56B.cjs");
|
|
9
|
+
const require_faceFns = require("./faceFns-DSRREV5G.cjs");
|
|
10
|
+
const require_solidBuilders = require("./solidBuilders-CUd-korS.cjs");
|
|
11
|
+
const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
|
|
12
|
+
const require_curveFns = require("./curveFns-U7srQ3ZA.cjs");
|
|
13
|
+
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
14
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DOn2jWkh.cjs");
|
|
15
|
+
const require_blueprintSketcher = require("./blueprintSketcher-CSDqr27-.cjs");
|
|
16
|
+
const require_loftFns = require("./loftFns-mkJeOaII.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
|
|
20
20
|
/** Match tolerance as a fraction of the extrusion's size. */
|
|
21
21
|
var RELATIVE_TOLERANCE = 1e-6;
|
|
22
22
|
function centerOf({ min, max }) {
|
|
@@ -167,8 +167,7 @@ function recordExtrudeRoles(solid, profile, vector) {
|
|
|
167
167
|
const roles = matchAnchors(anchorsFor(profile.wrapped, centerOf(profileBox), vector), locateFaces(solid.wrapped), RELATIVE_TOLERANCE * size);
|
|
168
168
|
if (roles) require_faceRoleFns.setFaceRoles(solid, roles);
|
|
169
169
|
}
|
|
170
|
-
|
|
171
|
-
//#region src/operations/extrudeFns.ts
|
|
170
|
+
// src/operations/extrudeFns.ts
|
|
172
171
|
/**
|
|
173
172
|
* Basic extrusion operations — extrude and revolve.
|
|
174
173
|
*
|
|
@@ -281,8 +280,7 @@ function extrudeAll(entries) {
|
|
|
281
280
|
return require_errors.err(require_errors.kernelError("EXTRUDE_ALL_FAILED", "Batch extrusion operation failed", e));
|
|
282
281
|
}
|
|
283
282
|
}
|
|
284
|
-
|
|
285
|
-
//#region src/sketching/compoundSketch.ts
|
|
283
|
+
// src/sketching/compoundSketch.ts
|
|
286
284
|
/**
|
|
287
285
|
* Represent a face with holes as a group of sketches (one outer + zero or more inner).
|
|
288
286
|
*
|
|
@@ -363,8 +361,7 @@ var CompoundSketch = class CompoundSketch {
|
|
|
363
361
|
return require_bug.bug("CompoundSketch.sweepSketch", "Sweeping a compound (face-with-holes) profile is not supported — sweep its outer Sketch instead.");
|
|
364
362
|
}
|
|
365
363
|
};
|
|
366
|
-
|
|
367
|
-
//#region src/sketching/sketchFns.ts
|
|
364
|
+
// src/sketching/sketchFns.ts
|
|
368
365
|
/** Wrap SketchData into a Sketch instance. */
|
|
369
366
|
function wrapSketchData(data) {
|
|
370
367
|
const opts = {};
|
|
@@ -571,8 +568,7 @@ function compoundSketchLoft(sketch, other, loftConfig = {}) {
|
|
|
571
568
|
for (const sh of shells) sh[Symbol.dispose]();
|
|
572
569
|
return solid;
|
|
573
570
|
}
|
|
574
|
-
|
|
575
|
-
//#region src/sketching/sketch.ts
|
|
571
|
+
// src/sketching/sketch.ts
|
|
576
572
|
/**
|
|
577
573
|
* Represent a closed or open wire profile with a default extrusion origin and direction.
|
|
578
574
|
*
|
|
@@ -720,8 +716,7 @@ var Sketch = class Sketch {
|
|
|
720
716
|
return sketchLoft(this, otherSketches, loftConfig, returnShell);
|
|
721
717
|
}
|
|
722
718
|
};
|
|
723
|
-
|
|
724
|
-
//#region src/sketching/sketches.ts
|
|
719
|
+
// src/sketching/sketches.ts
|
|
725
720
|
/**
|
|
726
721
|
* Batch wrapper around multiple {@link Sketch} or {@link CompoundSketch} instances.
|
|
727
722
|
*
|
|
@@ -802,8 +797,7 @@ var Sketches = class {
|
|
|
802
797
|
return require_solidBuilders.makeCompound(this.sketches.map((s) => s.revolve(revolutionAxis, config)));
|
|
803
798
|
}
|
|
804
799
|
};
|
|
805
|
-
|
|
806
|
-
//#region src/text/fontRegistry.ts
|
|
800
|
+
// src/text/fontRegistry.ts
|
|
807
801
|
var FONT_REGISTER = {};
|
|
808
802
|
/**
|
|
809
803
|
* Load and register an OpenType/TrueType font for use with text drawing functions.
|
|
@@ -850,8 +844,7 @@ async function loadFont(fontPath, fontFamily = "default", force = false) {
|
|
|
850
844
|
var getFont = (fontFamily = "default") => {
|
|
851
845
|
return FONT_REGISTER[fontFamily];
|
|
852
846
|
};
|
|
853
|
-
|
|
854
|
-
//#region src/text/textBlueprints.ts
|
|
847
|
+
// src/text/textBlueprints.ts
|
|
855
848
|
var sketchFontCommands = function* (commands) {
|
|
856
849
|
let sk = null;
|
|
857
850
|
let lastPoint = null;
|
|
@@ -895,7 +888,6 @@ function textBlueprints(text, { startX = 0, startY = 0, fontSize = 16, fontFamil
|
|
|
895
888
|
const blueprints = Array.from(sketchFontCommands(writtenText.commands));
|
|
896
889
|
return require_blueprintSketcher.organiseBlueprints(blueprints).mirror([0, 0]);
|
|
897
890
|
}
|
|
898
|
-
//#endregion
|
|
899
891
|
Object.defineProperty(exports, "CompoundSketch", {
|
|
900
892
|
enumerable: true,
|
|
901
893
|
get: function() {
|
|
@@ -1,20 +1,20 @@
|
|
|
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-
|
|
2
|
-
import { n as bug } from "./bug-
|
|
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-
|
|
4
|
-
import { n as HASH_CODE_MAX } from "./constants-
|
|
5
|
-
import { r as toVec3 } from "./types-
|
|
6
|
-
import { c as vecLength, d as vecNormalize, h as vecScale, i as vecDistance, r as vecCross, t as vecAdd } from "./vecOps-
|
|
7
|
-
import { n as createPlane } from "./planeOps-
|
|
8
|
-
import { v as copyShape } from "./faceFns-
|
|
9
|
-
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-
|
|
10
|
-
import { i as setFaceRoles } from "./faceRoleFns-
|
|
11
|
-
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-
|
|
12
|
-
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-
|
|
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-
|
|
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-CgbUTASh.js";
|
|
2
|
+
import { n as bug } from "./bug-ClMTAJhe.js";
|
|
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-vxP5FT8B.js";
|
|
4
|
+
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
5
|
+
import { r as toVec3 } from "./types-CKXsIm9-.js";
|
|
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
|
+
import { n as createPlane } from "./planeOps-Dp0YvuFE.js";
|
|
8
|
+
import { v as copyShape } from "./faceFns-BBk6XKJO.js";
|
|
9
|
+
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-DE_na4G3.js";
|
|
10
|
+
import { i as setFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
|
|
11
|
+
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-CkA2WJP2.js";
|
|
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-wdGNiImD.js";
|
|
14
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-DNp87aQZ.js";
|
|
15
|
+
import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-B8DSoG-F.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. */
|
|
19
19
|
var RELATIVE_TOLERANCE = 1e-6;
|
|
20
20
|
function centerOf({ min, max }) {
|
|
@@ -165,8 +165,7 @@ function recordExtrudeRoles(solid, profile, vector) {
|
|
|
165
165
|
const roles = matchAnchors(anchorsFor(profile.wrapped, centerOf(profileBox), vector), locateFaces(solid.wrapped), RELATIVE_TOLERANCE * size);
|
|
166
166
|
if (roles) setFaceRoles(solid, roles);
|
|
167
167
|
}
|
|
168
|
-
|
|
169
|
-
//#region src/operations/extrudeFns.ts
|
|
168
|
+
// src/operations/extrudeFns.ts
|
|
170
169
|
/**
|
|
171
170
|
* Basic extrusion operations — extrude and revolve.
|
|
172
171
|
*
|
|
@@ -279,8 +278,7 @@ function extrudeAll(entries) {
|
|
|
279
278
|
return err(kernelError("EXTRUDE_ALL_FAILED", "Batch extrusion operation failed", e));
|
|
280
279
|
}
|
|
281
280
|
}
|
|
282
|
-
|
|
283
|
-
//#region src/sketching/compoundSketch.ts
|
|
281
|
+
// src/sketching/compoundSketch.ts
|
|
284
282
|
/**
|
|
285
283
|
* Represent a face with holes as a group of sketches (one outer + zero or more inner).
|
|
286
284
|
*
|
|
@@ -361,8 +359,7 @@ var CompoundSketch = class CompoundSketch {
|
|
|
361
359
|
return bug("CompoundSketch.sweepSketch", "Sweeping a compound (face-with-holes) profile is not supported — sweep its outer Sketch instead.");
|
|
362
360
|
}
|
|
363
361
|
};
|
|
364
|
-
|
|
365
|
-
//#region src/sketching/sketchFns.ts
|
|
362
|
+
// src/sketching/sketchFns.ts
|
|
366
363
|
/** Wrap SketchData into a Sketch instance. */
|
|
367
364
|
function wrapSketchData(data) {
|
|
368
365
|
const opts = {};
|
|
@@ -569,8 +566,7 @@ function compoundSketchLoft(sketch, other, loftConfig = {}) {
|
|
|
569
566
|
for (const sh of shells) sh[Symbol.dispose]();
|
|
570
567
|
return solid;
|
|
571
568
|
}
|
|
572
|
-
|
|
573
|
-
//#region src/sketching/sketch.ts
|
|
569
|
+
// src/sketching/sketch.ts
|
|
574
570
|
/**
|
|
575
571
|
* Represent a closed or open wire profile with a default extrusion origin and direction.
|
|
576
572
|
*
|
|
@@ -718,8 +714,7 @@ var Sketch = class Sketch {
|
|
|
718
714
|
return sketchLoft(this, otherSketches, loftConfig, returnShell);
|
|
719
715
|
}
|
|
720
716
|
};
|
|
721
|
-
|
|
722
|
-
//#region src/sketching/sketches.ts
|
|
717
|
+
// src/sketching/sketches.ts
|
|
723
718
|
/**
|
|
724
719
|
* Batch wrapper around multiple {@link Sketch} or {@link CompoundSketch} instances.
|
|
725
720
|
*
|
|
@@ -800,8 +795,7 @@ var Sketches = class {
|
|
|
800
795
|
return makeCompound(this.sketches.map((s) => s.revolve(revolutionAxis, config)));
|
|
801
796
|
}
|
|
802
797
|
};
|
|
803
|
-
|
|
804
|
-
//#region src/text/fontRegistry.ts
|
|
798
|
+
// src/text/fontRegistry.ts
|
|
805
799
|
var FONT_REGISTER = {};
|
|
806
800
|
/**
|
|
807
801
|
* Load and register an OpenType/TrueType font for use with text drawing functions.
|
|
@@ -848,8 +842,7 @@ async function loadFont(fontPath, fontFamily = "default", force = false) {
|
|
|
848
842
|
var getFont = (fontFamily = "default") => {
|
|
849
843
|
return FONT_REGISTER[fontFamily];
|
|
850
844
|
};
|
|
851
|
-
|
|
852
|
-
//#region src/text/textBlueprints.ts
|
|
845
|
+
// src/text/textBlueprints.ts
|
|
853
846
|
var sketchFontCommands = function* (commands) {
|
|
854
847
|
let sk = null;
|
|
855
848
|
let lastPoint = null;
|
|
@@ -893,5 +886,4 @@ function textBlueprints(text, { startX = 0, startY = 0, fontSize = 16, fontFamil
|
|
|
893
886
|
const blueprints = Array.from(sketchFontCommands(writtenText.commands));
|
|
894
887
|
return organiseBlueprints(blueprints).mirror([0, 0]);
|
|
895
888
|
}
|
|
896
|
-
//#endregion
|
|
897
889
|
export { wrapSketchDataArray as _, Sketch as a, extrudeAll as b, compoundSketchLoft as c, sketchFace as d, sketchLoft as f, wrapSketchData as g, sketchWires as h, Sketches as i, compoundSketchRevolve as l, sketchSweep as m, getFont as n, compoundSketchExtrude as o, sketchRevolve as p, loadFont as r, compoundSketchFace as s, textBlueprints as t, sketchExtrude as u, CompoundSketch as v, revolve as x, extrude as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_errors = require("./errors-
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
|
|
1
|
+
const require_errors = require("./errors-GVyCnpi0.cjs");
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-BQ60Rc96.cjs");
|
|
3
|
+
// src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
6
6
|
*
|
|
@@ -24,8 +24,7 @@ function sketchText(text, textConfig, planeConfig = {}) {
|
|
|
24
24
|
const results = typeof planeConfig.plane === "string" || planeConfig.plane === void 0 ? textBp.sketchOnPlane(planeConfig.plane, planeConfig.origin) : textBp.sketchOnPlane(planeConfig.plane);
|
|
25
25
|
return new require_textBlueprints.Sketches(results.map((item) => Array.isArray(item) ? new require_textBlueprints.CompoundSketch(item.map(require_textBlueprints.wrapSketchData)) : require_textBlueprints.wrapSketchData(item)));
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
//#region src/text/textMetrics.ts
|
|
27
|
+
// src/text/textMetrics.ts
|
|
29
28
|
/**
|
|
30
29
|
* Measure the dimensions of a text string without generating geometry.
|
|
31
30
|
*
|
|
@@ -66,7 +65,6 @@ function fontMetrics(options) {
|
|
|
66
65
|
lineHeight: ascender - descender + lineGap
|
|
67
66
|
});
|
|
68
67
|
}
|
|
69
|
-
//#endregion
|
|
70
68
|
Object.defineProperty(exports, "fontMetrics", {
|
|
71
69
|
enumerable: true,
|
|
72
70
|
get: function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-
|
|
2
|
-
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-
|
|
3
|
-
|
|
1
|
+
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-vxP5FT8B.js";
|
|
2
|
+
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-B_jwMuej.js";
|
|
3
|
+
// src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
6
6
|
*
|
|
@@ -24,8 +24,7 @@ function sketchText(text, textConfig, planeConfig = {}) {
|
|
|
24
24
|
const results = typeof planeConfig.plane === "string" || planeConfig.plane === void 0 ? textBp.sketchOnPlane(planeConfig.plane, planeConfig.origin) : textBp.sketchOnPlane(planeConfig.plane);
|
|
25
25
|
return new Sketches(results.map((item) => Array.isArray(item) ? new CompoundSketch(item.map(wrapSketchData)) : wrapSketchData(item)));
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
//#region src/text/textMetrics.ts
|
|
27
|
+
// src/text/textMetrics.ts
|
|
29
28
|
/**
|
|
30
29
|
* Measure the dimensions of a text string without generating geometry.
|
|
31
30
|
*
|
|
@@ -66,5 +65,4 @@ function fontMetrics(options) {
|
|
|
66
65
|
lineHeight: ascender - descender + lineGap
|
|
67
66
|
});
|
|
68
67
|
}
|
|
69
|
-
//#endregion
|
|
70
68
|
export { textMetrics as n, sketchText as r, fontMetrics as t };
|