brepjs 20.0.0 → 20.1.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/dist/2d.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{adjacencyFns-DkWknlaR.js → adjacencyFns-Uvm9NynL.js} +3 -3
- package/dist/{adjacencyFns-Cdat1ofi.cjs → adjacencyFns-jii1IFIG.cjs} +3 -3
- package/dist/{blueprint-DOwwe5gw.cjs → blueprint-D9ZlqUeK.cjs} +5 -5
- package/dist/{blueprint-22kW0ICa.js → blueprint-DILaxgJO.js} +5 -5
- package/dist/{blueprintFns-DRTfqZsZ.cjs → blueprintFns-D4TEbdWz.cjs} +2 -2
- package/dist/{blueprintFns-Bwi75Szr.js → blueprintFns-bY8kvY4_.js} +2 -2
- package/dist/{blueprintSketcher-DW3WMfm2.js → blueprintSketcher-DQ8_jTjB.js} +3 -3
- package/dist/{blueprintSketcher-CxxS52ZI.cjs → blueprintSketcher-Dzt1t42w.cjs} +3 -3
- package/dist/{boolean2D-BYHxSbDH.cjs → boolean2D-B1mwRBqn.cjs} +4 -4
- package/dist/{boolean2D-DLe9jy53.js → boolean2D-Ez4nai3v.js} +4 -4
- package/dist/brepjs.cjs +29 -29
- package/dist/brepjs.js +29 -29
- package/dist/{cameraFns-DCUsH23g.cjs → cameraFns-BPPUjCnt.cjs} +3 -3
- package/dist/{cameraFns-DtaivMYa.js → cameraFns-DVsDrWgy.js} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-DIewkspO.cjs → cornerFinder-CbsBCk55.cjs} +1 -1
- package/dist/{cornerFinder-B6L3zTOA.js → cornerFinder-D_9RMx6b.js} +1 -1
- package/dist/{curveFns-1e6j5nXW.cjs → curveFns-0ka_F1Qt.cjs} +1 -1
- package/dist/{curveFns-C0zENjCi.js → curveFns-Ci1fc5gO.js} +1 -1
- package/dist/{drawFns-BUB7YeKu.js → drawFns-ClJ3JEQN.js} +12 -12
- package/dist/{drawFns-Cu61XWtX.cjs → drawFns-D9MEpXRq.cjs} +12 -12
- package/dist/{faceFns-Qo7nIMc6.js → faceFns-DCmUSP5s.js} +2 -2
- package/dist/{faceFns-BinRdCKC.cjs → faceFns-DeJ6KX-t.cjs} +2 -2
- package/dist/{healingFns-K2mKlcGA.cjs → healingFns-DKA7ZP2T.cjs} +4 -4
- package/dist/{healingFns--idy5knW.js → healingFns-DLTUch-a.js} +4 -4
- package/dist/{helpers-CavGK8r0.cjs → helpers-C7Dc2kHH.cjs} +6 -6
- package/dist/{helpers-CT29THg0.js → helpers-DptAa1BD.js} +6 -6
- package/dist/{importFns-rCT3bzrO.js → importFns-BPFSXV6z.js} +2 -2
- package/dist/{importFns-B3-31QaN.cjs → importFns-CFIKCNNb.cjs} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/interfaces/evolutionOps.d.ts +7 -0
- package/dist/kernel/occt/booleanOps.d.ts +9 -1
- package/dist/kernel/occtWasm/booleanOps.d.ts +38 -6
- package/dist/kernel/occtWasm/evolutionOps.d.ts +11 -3
- package/dist/kernel/occtWasm/helpers.d.ts +7 -2
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +4 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +2 -0
- package/dist/{loftFns-BigHFXTf.cjs → loftFns-IB4K_Dzv.cjs} +1 -1
- package/dist/{loftFns-ByrWfSBX.js → loftFns-IzkWwK0P.js} +1 -1
- package/dist/{measureFns-CLsw9fTy.cjs → measureFns-Cxk116Fv.cjs} +3 -3
- package/dist/{measureFns-BfkCmmb-.js → measureFns-HcH4fJJE.js} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-CkvvMsIk.js → meshFns-CvqS6edU.js} +3 -3
- package/dist/{meshFns-1SLb656s.cjs → meshFns-zlx99xbI.cjs} +3 -3
- package/dist/{occtWasmAdapter-CIc9I87_.js → occtWasmAdapter-BYziKlFk.js} +215 -76
- package/dist/{occtWasmAdapter-y21xnRNM.cjs → occtWasmAdapter-D6-CUP2V.cjs} +215 -76
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{originTrackingFns-CLSjfAXP.js → originTrackingFns-B_VM7fiP.js} +2 -2
- package/dist/{originTrackingFns-q7xmSJHd.cjs → originTrackingFns-PUTN7amf.cjs} +2 -2
- package/dist/{primitiveFns-DwuH8FF1.cjs → primitiveFns-C109FiCa.cjs} +4 -4
- package/dist/{primitiveFns-CQy3iiv_.js → primitiveFns-DbZD1Zqf.js} +4 -4
- 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-DjmIp8gz.js → refResolveFns-Cr_obR-4.js} +6 -6
- package/dist/{refResolveFns-C16KmO4z.cjs → refResolveFns-DtU3S0qY.cjs} +6 -6
- package/dist/{shapeFns-KcSNOAAv.cjs → shapeFns-BPBLbDjd.cjs} +2 -2
- package/dist/{shapeFns-C3EC8Fqp.js → shapeFns-Dpa19NyE.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-BTaEiG1y.js → shapeTypes-B_ogF-B7.js} +68 -76
- package/dist/{shapeTypes-DweqaALJ.cjs → shapeTypes-DwrDUQPZ.cjs} +68 -76
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-BeumT5UD.cjs → solidBuilders-BNsIlURc.cjs} +31 -7
- package/dist/{solidBuilders-2Ho4kcPL.js → solidBuilders-pibEpGVS.js} +31 -7
- package/dist/{surfaceBuilders-COaytSqx.js → surfaceBuilders-COXjNT6b.js} +3 -3
- package/dist/{surfaceBuilders-DjhGZZvn.cjs → surfaceBuilders-DZU1ttYY.cjs} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-I09VlWfS.cjs → textBlueprints-CpPDmfyT.cjs} +7 -7
- package/dist/{textBlueprints-Twdvzb1E.js → textBlueprints-CzC9BOgL.js} +7 -7
- package/dist/{textMetrics-B8De13Tj.cjs → textMetrics-Bjm9jybe.cjs} +1 -1
- package/dist/{textMetrics-H5m5OzGy.js → textMetrics-IF9ktcEi.js} +1 -1
- package/dist/{threadFns-CMhXBzUL.cjs → threadFns-BRB6cpKI.cjs} +7 -7
- package/dist/{threadFns-Wqbi-SRj.js → threadFns-nkBUo5vX.js} +7 -7
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-Dsdk7qnz.js → topologyQueryFns-DPrHRCrr.js} +1 -1
- package/dist/{topologyQueryFns-Cqb0bLW1.cjs → topologyQueryFns-YGvGdGCr.cjs} +1 -1
- package/dist/{validityTypes-DzFB9IQW.js → validityTypes-CBK24R8q.js} +1 -1
- package/dist/{validityTypes-9nuI6V2T.cjs → validityTypes-DUed50G5.cjs} +1 -1
- package/package.json +14 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as EXACT_BREP_CAPABILITIES, C as serializeCurve2d$2, D as UnsupportedKernelOperationError, E as quickHull, O as isUnsupportedKernelOperationError, S as scaleCurve2d$2, T as translateCurve2d$2, _ as makeEllipse2d$2, a as buildBinarySTL, b as mirrorAtPoint, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeCircle2d$2, h as makeBezier2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeArc2dThreePoints, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeArc2dTangent, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as makeLine2d$2, w as tangentCurve2d, x as rotateCurve2d$2, y as mirrorAcrossAxis } from "./occtWasmAdapter-
|
|
1
|
+
import { A as EXACT_BREP_CAPABILITIES, C as serializeCurve2d$2, D as UnsupportedKernelOperationError, E as quickHull, O as isUnsupportedKernelOperationError, S as scaleCurve2d$2, T as translateCurve2d$2, _ as makeEllipse2d$2, a as buildBinarySTL, b as mirrorAtPoint, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeCircle2d$2, h as makeBezier2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeArc2dThreePoints, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeArc2dTangent, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as makeLine2d$2, w as tangentCurve2d, x as rotateCurve2d$2, y as mirrorAcrossAxis } from "./occtWasmAdapter-BYziKlFk.js";
|
|
2
2
|
import { i as wasmIndex, r as vec3At } from "./bug-BdOHwn_e.js";
|
|
3
3
|
//#region src/kernel/quality.ts
|
|
4
4
|
/**
|
|
@@ -529,6 +529,33 @@ function makeTopologyOps$2(oc) {
|
|
|
529
529
|
/** Tolerance passed to OCCT SimplifyResult (ShapeUpgrade_UnifySameDomain). */
|
|
530
530
|
var SIMPLIFY_TOLERANCE = .001;
|
|
531
531
|
/**
|
|
532
|
+
* Construct a two-operand boolean with its operands set but not yet built.
|
|
533
|
+
*
|
|
534
|
+
* The `BRepAlgoAPI_*_3(shape, tool, progress)` constructors run the boolean
|
|
535
|
+
* immediately, and `Build()` clears and recomputes it, so building one of those
|
|
536
|
+
* again computed every boolean twice. Apply glue/OBB/fuzzy, then build once.
|
|
537
|
+
*/
|
|
538
|
+
function newTwoOperandBoolean(oc, kind, shape, tool) {
|
|
539
|
+
const op = kind === "Fuse" ? new oc.BRepAlgoAPI_Fuse_1() : kind === "Cut" ? new oc.BRepAlgoAPI_Cut_1() : new oc.BRepAlgoAPI_Common_1();
|
|
540
|
+
let args;
|
|
541
|
+
let tools;
|
|
542
|
+
try {
|
|
543
|
+
args = new oc.TopTools_ListOfShape_1();
|
|
544
|
+
tools = new oc.TopTools_ListOfShape_1();
|
|
545
|
+
args.Append_1(shape);
|
|
546
|
+
tools.Append_1(tool);
|
|
547
|
+
op.SetArguments(args);
|
|
548
|
+
op.SetTools(tools);
|
|
549
|
+
} catch (e) {
|
|
550
|
+
op.delete();
|
|
551
|
+
throw e;
|
|
552
|
+
} finally {
|
|
553
|
+
args?.delete();
|
|
554
|
+
tools?.delete();
|
|
555
|
+
}
|
|
556
|
+
return op;
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
532
559
|
* Applies glue optimization to a boolean operation builder.
|
|
533
560
|
*/
|
|
534
561
|
function applyGlue(oc, op, optimisation) {
|
|
@@ -588,67 +615,44 @@ function buildCompound(oc, shapes) {
|
|
|
588
615
|
return compound;
|
|
589
616
|
}
|
|
590
617
|
/**
|
|
591
|
-
*
|
|
618
|
+
* Runs a two-operand boolean with the given options, releasing the op and its
|
|
619
|
+
* progress range on every path.
|
|
592
620
|
*/
|
|
593
|
-
function
|
|
621
|
+
function runTwoOperandBoolean(oc, kind, shape, tool, options) {
|
|
594
622
|
const end = perfTimer("boolean");
|
|
623
|
+
const { optimisation, simplify = false, fuzzyValue } = options;
|
|
624
|
+
const progress = new oc.Message_ProgressRange_1();
|
|
625
|
+
let op;
|
|
595
626
|
try {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
if (simplify) fuseOp.SimplifyResult(true, true, SIMPLIFY_TOLERANCE);
|
|
603
|
-
const result = fuseOp.Shape();
|
|
604
|
-
fuseOp.delete();
|
|
605
|
-
progress.delete();
|
|
606
|
-
return result;
|
|
627
|
+
op = newTwoOperandBoolean(oc, kind, shape, tool);
|
|
628
|
+
applyGlue(oc, op, optimisation);
|
|
629
|
+
applyBooleanDefaults(op, fuzzyValue);
|
|
630
|
+
op.Build(progress);
|
|
631
|
+
if (simplify) op.SimplifyResult(true, true, SIMPLIFY_TOLERANCE);
|
|
632
|
+
return op.Shape();
|
|
607
633
|
} finally {
|
|
634
|
+
op?.delete();
|
|
635
|
+
progress.delete();
|
|
608
636
|
end();
|
|
609
637
|
}
|
|
610
638
|
}
|
|
611
639
|
/**
|
|
640
|
+
* Fuses two shapes together.
|
|
641
|
+
*/
|
|
642
|
+
function fuse$1(oc, shape, tool, options = {}) {
|
|
643
|
+
return runTwoOperandBoolean(oc, "Fuse", shape, tool, options);
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
612
646
|
* Cuts a tool shape from a base shape.
|
|
613
647
|
*/
|
|
614
648
|
function cut$1(oc, shape, tool, options = {}) {
|
|
615
|
-
|
|
616
|
-
try {
|
|
617
|
-
const { optimisation, simplify = false, fuzzyValue } = options;
|
|
618
|
-
const progress = new oc.Message_ProgressRange_1();
|
|
619
|
-
const cutOp = new oc.BRepAlgoAPI_Cut_3(shape, tool, progress);
|
|
620
|
-
applyGlue(oc, cutOp, optimisation);
|
|
621
|
-
applyBooleanDefaults(cutOp, fuzzyValue);
|
|
622
|
-
cutOp.Build(progress);
|
|
623
|
-
if (simplify) cutOp.SimplifyResult(true, true, SIMPLIFY_TOLERANCE);
|
|
624
|
-
const result = cutOp.Shape();
|
|
625
|
-
cutOp.delete();
|
|
626
|
-
progress.delete();
|
|
627
|
-
return result;
|
|
628
|
-
} finally {
|
|
629
|
-
end();
|
|
630
|
-
}
|
|
649
|
+
return runTwoOperandBoolean(oc, "Cut", shape, tool, options);
|
|
631
650
|
}
|
|
632
651
|
/**
|
|
633
652
|
* Intersects two shapes.
|
|
634
653
|
*/
|
|
635
654
|
function intersect$1(oc, shape, tool, options = {}) {
|
|
636
|
-
|
|
637
|
-
try {
|
|
638
|
-
const { optimisation, simplify = false, fuzzyValue } = options;
|
|
639
|
-
const progress = new oc.Message_ProgressRange_1();
|
|
640
|
-
const commonOp = new oc.BRepAlgoAPI_Common_3(shape, tool, progress);
|
|
641
|
-
applyGlue(oc, commonOp, optimisation);
|
|
642
|
-
applyBooleanDefaults(commonOp, fuzzyValue);
|
|
643
|
-
commonOp.Build(progress);
|
|
644
|
-
if (simplify) commonOp.SimplifyResult(true, true, SIMPLIFY_TOLERANCE);
|
|
645
|
-
const result = commonOp.Shape();
|
|
646
|
-
commonOp.delete();
|
|
647
|
-
progress.delete();
|
|
648
|
-
return result;
|
|
649
|
-
} finally {
|
|
650
|
-
end();
|
|
651
|
-
}
|
|
655
|
+
return runTwoOperandBoolean(oc, "Common", shape, tool, options);
|
|
652
656
|
}
|
|
653
657
|
/**
|
|
654
658
|
* Sections a shape with another shape (typically a planar face), returning
|
|
@@ -3507,41 +3511,29 @@ function extractDiagnostics(op) {
|
|
|
3507
3511
|
messages: []
|
|
3508
3512
|
};
|
|
3509
3513
|
}
|
|
3510
|
-
function
|
|
3514
|
+
function twoOperandBooleanWithHistory(oc, kind, shape, tool, inputFaceHashes, hashUpperBound, options) {
|
|
3511
3515
|
const progress = new oc.Message_ProgressRange_1();
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3516
|
+
let op;
|
|
3517
|
+
try {
|
|
3518
|
+
op = newTwoOperandBoolean(oc, kind, shape, tool);
|
|
3519
|
+
applyGlue(oc, op, options.optimisation);
|
|
3520
|
+
applyBooleanDefaults(op, options.fuzzyValue);
|
|
3521
|
+
op.Build(progress);
|
|
3522
|
+
const diagnostics = extractDiagnostics(op);
|
|
3523
|
+
return booleanWithEvolution(oc, op, [shape, tool], inputFaceHashes, hashUpperBound, options.simplify ?? false, diagnostics);
|
|
3524
|
+
} finally {
|
|
3525
|
+
op?.delete();
|
|
3526
|
+
progress.delete();
|
|
3527
|
+
}
|
|
3528
|
+
}
|
|
3529
|
+
function fuseWithHistory$1(oc, shape, tool, inputFaceHashes, hashUpperBound, options = {}) {
|
|
3530
|
+
return twoOperandBooleanWithHistory(oc, "Fuse", shape, tool, inputFaceHashes, hashUpperBound, options);
|
|
3521
3531
|
}
|
|
3522
3532
|
function cutWithHistory$1(oc, shape, tool, inputFaceHashes, hashUpperBound, options = {}) {
|
|
3523
|
-
|
|
3524
|
-
const cutOp = new oc.BRepAlgoAPI_Cut_3(shape, tool, progress);
|
|
3525
|
-
applyGlue(oc, cutOp, options.optimisation);
|
|
3526
|
-
applyBooleanDefaults(cutOp, options.fuzzyValue);
|
|
3527
|
-
cutOp.Build(progress);
|
|
3528
|
-
const diagnostics = extractDiagnostics(cutOp);
|
|
3529
|
-
const result = booleanWithEvolution(oc, cutOp, [shape, tool], inputFaceHashes, hashUpperBound, options.simplify ?? false, diagnostics);
|
|
3530
|
-
cutOp.delete();
|
|
3531
|
-
progress.delete();
|
|
3532
|
-
return result;
|
|
3533
|
+
return twoOperandBooleanWithHistory(oc, "Cut", shape, tool, inputFaceHashes, hashUpperBound, options);
|
|
3533
3534
|
}
|
|
3534
3535
|
function intersectWithHistory$1(oc, shape, tool, inputFaceHashes, hashUpperBound, options = {}) {
|
|
3535
|
-
|
|
3536
|
-
const intOp = new oc.BRepAlgoAPI_Common_3(shape, tool, progress);
|
|
3537
|
-
applyGlue(oc, intOp, options.optimisation);
|
|
3538
|
-
applyBooleanDefaults(intOp, options.fuzzyValue);
|
|
3539
|
-
intOp.Build(progress);
|
|
3540
|
-
const diagnostics = extractDiagnostics(intOp);
|
|
3541
|
-
const result = booleanWithEvolution(oc, intOp, [shape, tool], inputFaceHashes, hashUpperBound, options.simplify ?? false, diagnostics);
|
|
3542
|
-
intOp.delete();
|
|
3543
|
-
progress.delete();
|
|
3544
|
-
return result;
|
|
3536
|
+
return twoOperandBooleanWithHistory(oc, "Common", shape, tool, inputFaceHashes, hashUpperBound, options);
|
|
3545
3537
|
}
|
|
3546
3538
|
function filletWithHistory$1(oc, shape, edges, radius, inputFaceHashes, hashUpperBound) {
|
|
3547
3539
|
const builder = new oc.BRepFilletAPI_MakeFillet(shape, oc.ChFi3d_FilletShape.ChFi3d_Rational);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_occtWasmAdapter = require("./occtWasmAdapter-
|
|
1
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-D6-CUP2V.cjs");
|
|
2
2
|
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
3
3
|
//#region src/kernel/quality.ts
|
|
4
4
|
/**
|
|
@@ -529,6 +529,33 @@ function makeTopologyOps$2(oc) {
|
|
|
529
529
|
/** Tolerance passed to OCCT SimplifyResult (ShapeUpgrade_UnifySameDomain). */
|
|
530
530
|
var SIMPLIFY_TOLERANCE = .001;
|
|
531
531
|
/**
|
|
532
|
+
* Construct a two-operand boolean with its operands set but not yet built.
|
|
533
|
+
*
|
|
534
|
+
* The `BRepAlgoAPI_*_3(shape, tool, progress)` constructors run the boolean
|
|
535
|
+
* immediately, and `Build()` clears and recomputes it, so building one of those
|
|
536
|
+
* again computed every boolean twice. Apply glue/OBB/fuzzy, then build once.
|
|
537
|
+
*/
|
|
538
|
+
function newTwoOperandBoolean(oc, kind, shape, tool) {
|
|
539
|
+
const op = kind === "Fuse" ? new oc.BRepAlgoAPI_Fuse_1() : kind === "Cut" ? new oc.BRepAlgoAPI_Cut_1() : new oc.BRepAlgoAPI_Common_1();
|
|
540
|
+
let args;
|
|
541
|
+
let tools;
|
|
542
|
+
try {
|
|
543
|
+
args = new oc.TopTools_ListOfShape_1();
|
|
544
|
+
tools = new oc.TopTools_ListOfShape_1();
|
|
545
|
+
args.Append_1(shape);
|
|
546
|
+
tools.Append_1(tool);
|
|
547
|
+
op.SetArguments(args);
|
|
548
|
+
op.SetTools(tools);
|
|
549
|
+
} catch (e) {
|
|
550
|
+
op.delete();
|
|
551
|
+
throw e;
|
|
552
|
+
} finally {
|
|
553
|
+
args?.delete();
|
|
554
|
+
tools?.delete();
|
|
555
|
+
}
|
|
556
|
+
return op;
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
532
559
|
* Applies glue optimization to a boolean operation builder.
|
|
533
560
|
*/
|
|
534
561
|
function applyGlue(oc, op, optimisation) {
|
|
@@ -588,67 +615,44 @@ function buildCompound(oc, shapes) {
|
|
|
588
615
|
return compound;
|
|
589
616
|
}
|
|
590
617
|
/**
|
|
591
|
-
*
|
|
618
|
+
* Runs a two-operand boolean with the given options, releasing the op and its
|
|
619
|
+
* progress range on every path.
|
|
592
620
|
*/
|
|
593
|
-
function
|
|
621
|
+
function runTwoOperandBoolean(oc, kind, shape, tool, options) {
|
|
594
622
|
const end = perfTimer("boolean");
|
|
623
|
+
const { optimisation, simplify = false, fuzzyValue } = options;
|
|
624
|
+
const progress = new oc.Message_ProgressRange_1();
|
|
625
|
+
let op;
|
|
595
626
|
try {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
if (simplify) fuseOp.SimplifyResult(true, true, SIMPLIFY_TOLERANCE);
|
|
603
|
-
const result = fuseOp.Shape();
|
|
604
|
-
fuseOp.delete();
|
|
605
|
-
progress.delete();
|
|
606
|
-
return result;
|
|
627
|
+
op = newTwoOperandBoolean(oc, kind, shape, tool);
|
|
628
|
+
applyGlue(oc, op, optimisation);
|
|
629
|
+
applyBooleanDefaults(op, fuzzyValue);
|
|
630
|
+
op.Build(progress);
|
|
631
|
+
if (simplify) op.SimplifyResult(true, true, SIMPLIFY_TOLERANCE);
|
|
632
|
+
return op.Shape();
|
|
607
633
|
} finally {
|
|
634
|
+
op?.delete();
|
|
635
|
+
progress.delete();
|
|
608
636
|
end();
|
|
609
637
|
}
|
|
610
638
|
}
|
|
611
639
|
/**
|
|
640
|
+
* Fuses two shapes together.
|
|
641
|
+
*/
|
|
642
|
+
function fuse$1(oc, shape, tool, options = {}) {
|
|
643
|
+
return runTwoOperandBoolean(oc, "Fuse", shape, tool, options);
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
612
646
|
* Cuts a tool shape from a base shape.
|
|
613
647
|
*/
|
|
614
648
|
function cut$1(oc, shape, tool, options = {}) {
|
|
615
|
-
|
|
616
|
-
try {
|
|
617
|
-
const { optimisation, simplify = false, fuzzyValue } = options;
|
|
618
|
-
const progress = new oc.Message_ProgressRange_1();
|
|
619
|
-
const cutOp = new oc.BRepAlgoAPI_Cut_3(shape, tool, progress);
|
|
620
|
-
applyGlue(oc, cutOp, optimisation);
|
|
621
|
-
applyBooleanDefaults(cutOp, fuzzyValue);
|
|
622
|
-
cutOp.Build(progress);
|
|
623
|
-
if (simplify) cutOp.SimplifyResult(true, true, SIMPLIFY_TOLERANCE);
|
|
624
|
-
const result = cutOp.Shape();
|
|
625
|
-
cutOp.delete();
|
|
626
|
-
progress.delete();
|
|
627
|
-
return result;
|
|
628
|
-
} finally {
|
|
629
|
-
end();
|
|
630
|
-
}
|
|
649
|
+
return runTwoOperandBoolean(oc, "Cut", shape, tool, options);
|
|
631
650
|
}
|
|
632
651
|
/**
|
|
633
652
|
* Intersects two shapes.
|
|
634
653
|
*/
|
|
635
654
|
function intersect$1(oc, shape, tool, options = {}) {
|
|
636
|
-
|
|
637
|
-
try {
|
|
638
|
-
const { optimisation, simplify = false, fuzzyValue } = options;
|
|
639
|
-
const progress = new oc.Message_ProgressRange_1();
|
|
640
|
-
const commonOp = new oc.BRepAlgoAPI_Common_3(shape, tool, progress);
|
|
641
|
-
applyGlue(oc, commonOp, optimisation);
|
|
642
|
-
applyBooleanDefaults(commonOp, fuzzyValue);
|
|
643
|
-
commonOp.Build(progress);
|
|
644
|
-
if (simplify) commonOp.SimplifyResult(true, true, SIMPLIFY_TOLERANCE);
|
|
645
|
-
const result = commonOp.Shape();
|
|
646
|
-
commonOp.delete();
|
|
647
|
-
progress.delete();
|
|
648
|
-
return result;
|
|
649
|
-
} finally {
|
|
650
|
-
end();
|
|
651
|
-
}
|
|
655
|
+
return runTwoOperandBoolean(oc, "Common", shape, tool, options);
|
|
652
656
|
}
|
|
653
657
|
/**
|
|
654
658
|
* Sections a shape with another shape (typically a planar face), returning
|
|
@@ -3507,41 +3511,29 @@ function extractDiagnostics(op) {
|
|
|
3507
3511
|
messages: []
|
|
3508
3512
|
};
|
|
3509
3513
|
}
|
|
3510
|
-
function
|
|
3514
|
+
function twoOperandBooleanWithHistory(oc, kind, shape, tool, inputFaceHashes, hashUpperBound, options) {
|
|
3511
3515
|
const progress = new oc.Message_ProgressRange_1();
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3516
|
+
let op;
|
|
3517
|
+
try {
|
|
3518
|
+
op = newTwoOperandBoolean(oc, kind, shape, tool);
|
|
3519
|
+
applyGlue(oc, op, options.optimisation);
|
|
3520
|
+
applyBooleanDefaults(op, options.fuzzyValue);
|
|
3521
|
+
op.Build(progress);
|
|
3522
|
+
const diagnostics = extractDiagnostics(op);
|
|
3523
|
+
return booleanWithEvolution(oc, op, [shape, tool], inputFaceHashes, hashUpperBound, options.simplify ?? false, diagnostics);
|
|
3524
|
+
} finally {
|
|
3525
|
+
op?.delete();
|
|
3526
|
+
progress.delete();
|
|
3527
|
+
}
|
|
3528
|
+
}
|
|
3529
|
+
function fuseWithHistory$1(oc, shape, tool, inputFaceHashes, hashUpperBound, options = {}) {
|
|
3530
|
+
return twoOperandBooleanWithHistory(oc, "Fuse", shape, tool, inputFaceHashes, hashUpperBound, options);
|
|
3521
3531
|
}
|
|
3522
3532
|
function cutWithHistory$1(oc, shape, tool, inputFaceHashes, hashUpperBound, options = {}) {
|
|
3523
|
-
|
|
3524
|
-
const cutOp = new oc.BRepAlgoAPI_Cut_3(shape, tool, progress);
|
|
3525
|
-
applyGlue(oc, cutOp, options.optimisation);
|
|
3526
|
-
applyBooleanDefaults(cutOp, options.fuzzyValue);
|
|
3527
|
-
cutOp.Build(progress);
|
|
3528
|
-
const diagnostics = extractDiagnostics(cutOp);
|
|
3529
|
-
const result = booleanWithEvolution(oc, cutOp, [shape, tool], inputFaceHashes, hashUpperBound, options.simplify ?? false, diagnostics);
|
|
3530
|
-
cutOp.delete();
|
|
3531
|
-
progress.delete();
|
|
3532
|
-
return result;
|
|
3533
|
+
return twoOperandBooleanWithHistory(oc, "Cut", shape, tool, inputFaceHashes, hashUpperBound, options);
|
|
3533
3534
|
}
|
|
3534
3535
|
function intersectWithHistory$1(oc, shape, tool, inputFaceHashes, hashUpperBound, options = {}) {
|
|
3535
|
-
|
|
3536
|
-
const intOp = new oc.BRepAlgoAPI_Common_3(shape, tool, progress);
|
|
3537
|
-
applyGlue(oc, intOp, options.optimisation);
|
|
3538
|
-
applyBooleanDefaults(intOp, options.fuzzyValue);
|
|
3539
|
-
intOp.Build(progress);
|
|
3540
|
-
const diagnostics = extractDiagnostics(intOp);
|
|
3541
|
-
const result = booleanWithEvolution(oc, intOp, [shape, tool], inputFaceHashes, hashUpperBound, options.simplify ?? false, diagnostics);
|
|
3542
|
-
intOp.delete();
|
|
3543
|
-
progress.delete();
|
|
3544
|
-
return result;
|
|
3536
|
+
return twoOperandBooleanWithHistory(oc, "Common", shape, tool, inputFaceHashes, hashUpperBound, options);
|
|
3545
3537
|
}
|
|
3546
3538
|
function filletWithHistory$1(oc, shape, edges, radius, inputFaceHashes, hashUpperBound) {
|
|
3547
3539
|
const builder = new oc.BRepFilletAPI_MakeFillet(shape, oc.ChFi3d_FilletShape.ChFi3d_Rational);
|
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-Dzt1t42w.cjs");
|
|
3
|
+
const require_drawFns = require("./drawFns-D9MEpXRq.cjs");
|
|
4
|
+
const require_textBlueprints = require("./textBlueprints-CpPDmfyT.cjs");
|
|
5
5
|
//#region 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 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-
|
|
1
|
+
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-DQ8_jTjB.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-ClJ3JEQN.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-CzC9BOgL.js";
|
|
4
4
|
//#region src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DwrDUQPZ.cjs");
|
|
2
2
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-YGvGdGCr.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
6
6
|
const require_planeOps = require("./planeOps-CpupTCRM.cjs");
|
|
7
|
-
const require_faceFns = require("./faceFns-
|
|
8
|
-
const require_originTrackingFns = require("./originTrackingFns-
|
|
7
|
+
const require_faceFns = require("./faceFns-DeJ6KX-t.cjs");
|
|
8
|
+
const require_originTrackingFns = require("./originTrackingFns-PUTN7amf.cjs");
|
|
9
9
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
10
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
10
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DZU1ttYY.cjs");
|
|
11
11
|
//#region src/topology/metadata/faceTagFns.ts
|
|
12
12
|
var shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
13
13
|
var tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
@@ -515,7 +515,19 @@ function fuseAll(shapes, { optimisation = "none", simplify = false, strategy = "
|
|
|
515
515
|
if (require_errors.isErr(check)) return check;
|
|
516
516
|
}
|
|
517
517
|
if (strategy === "native") {
|
|
518
|
-
const
|
|
518
|
+
const kernel = require_shapeTypes.getKernel();
|
|
519
|
+
const inputFaceHashes = trackEvolution && kernel.fuseAllWithHistory ? collectInputFaceHashes(shapes) : [];
|
|
520
|
+
if (inputFaceHashes.length > 0 && kernel.fuseAllWithHistory) {
|
|
521
|
+
const { shape, evolution, diagnostics } = kernel.fuseAllWithHistory(shapes.map((s) => s.wrapped), inputFaceHashes, require_constants.HASH_CODE_MAX, {
|
|
522
|
+
optimisation,
|
|
523
|
+
simplify,
|
|
524
|
+
fuzzyValue
|
|
525
|
+
});
|
|
526
|
+
const tracked = castToShape3D(shape, "FUSE_ALL_NOT_3D", "fuseAll did not produce a 3D shape", void 0, diagnostics);
|
|
527
|
+
if (tracked.ok) propagateAllMetadata(evolution, shapes, tracked.value);
|
|
528
|
+
return tracked;
|
|
529
|
+
}
|
|
530
|
+
const fuseAllResult = castToShape3D(kernel.fuseAll(shapes.map((s) => s.wrapped), {
|
|
519
531
|
optimisation,
|
|
520
532
|
simplify,
|
|
521
533
|
strategy,
|
|
@@ -539,7 +551,19 @@ function cutAll(base, tools, { optimisation = "none", simplify = false, signal,
|
|
|
539
551
|
if (require_errors.isErr(check)) return check;
|
|
540
552
|
}
|
|
541
553
|
const allInputs = [base, ...tools];
|
|
542
|
-
const
|
|
554
|
+
const kernel = require_shapeTypes.getKernel();
|
|
555
|
+
const inputFaceHashes = trackEvolution && kernel.cutAllWithHistory ? collectInputFaceHashes(allInputs) : [];
|
|
556
|
+
if (inputFaceHashes.length > 0 && kernel.cutAllWithHistory) {
|
|
557
|
+
const { shape, evolution, diagnostics } = kernel.cutAllWithHistory(base.wrapped, tools.map((s) => s.wrapped), inputFaceHashes, require_constants.HASH_CODE_MAX, {
|
|
558
|
+
optimisation,
|
|
559
|
+
simplify,
|
|
560
|
+
fuzzyValue
|
|
561
|
+
});
|
|
562
|
+
const tracked = castToShape3D(shape, "CUT_ALL_NOT_3D", "cutAll did not produce a 3D shape", void 0, diagnostics);
|
|
563
|
+
if (tracked.ok) propagateAllMetadata(evolution, allInputs, tracked.value);
|
|
564
|
+
return tracked;
|
|
565
|
+
}
|
|
566
|
+
const cutAllResult = castToShape3D(kernel.cutAll(base.wrapped, tools.map((s) => s.wrapped), {
|
|
543
567
|
optimisation,
|
|
544
568
|
simplify,
|
|
545
569
|
fuzzyValue
|
|
@@ -1,13 +1,13 @@
|
|
|
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-B_ogF-B7.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-CTn8i3lY.js";
|
|
3
|
-
import { S as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { S as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-DPrHRCrr.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { a as vecDot, g as vecSub, h as vecScale, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
6
6
|
import { o as resolvePlane } from "./planeOps-CkpMeheg.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-DCmUSP5s.js";
|
|
8
|
+
import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-B_VM7fiP.js";
|
|
9
9
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
10
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
10
|
+
import { r as makeFace } from "./surfaceBuilders-COXjNT6b.js";
|
|
11
11
|
//#region src/topology/metadata/faceTagFns.ts
|
|
12
12
|
var shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
13
13
|
var tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
@@ -515,7 +515,19 @@ function fuseAll(shapes, { optimisation = "none", simplify = false, strategy = "
|
|
|
515
515
|
if (isErr(check)) return check;
|
|
516
516
|
}
|
|
517
517
|
if (strategy === "native") {
|
|
518
|
-
const
|
|
518
|
+
const kernel = getKernel();
|
|
519
|
+
const inputFaceHashes = trackEvolution && kernel.fuseAllWithHistory ? collectInputFaceHashes(shapes) : [];
|
|
520
|
+
if (inputFaceHashes.length > 0 && kernel.fuseAllWithHistory) {
|
|
521
|
+
const { shape, evolution, diagnostics } = kernel.fuseAllWithHistory(shapes.map((s) => s.wrapped), inputFaceHashes, HASH_CODE_MAX, {
|
|
522
|
+
optimisation,
|
|
523
|
+
simplify,
|
|
524
|
+
fuzzyValue
|
|
525
|
+
});
|
|
526
|
+
const tracked = castToShape3D(shape, "FUSE_ALL_NOT_3D", "fuseAll did not produce a 3D shape", void 0, diagnostics);
|
|
527
|
+
if (tracked.ok) propagateAllMetadata(evolution, shapes, tracked.value);
|
|
528
|
+
return tracked;
|
|
529
|
+
}
|
|
530
|
+
const fuseAllResult = castToShape3D(kernel.fuseAll(shapes.map((s) => s.wrapped), {
|
|
519
531
|
optimisation,
|
|
520
532
|
simplify,
|
|
521
533
|
strategy,
|
|
@@ -539,7 +551,19 @@ function cutAll(base, tools, { optimisation = "none", simplify = false, signal,
|
|
|
539
551
|
if (isErr(check)) return check;
|
|
540
552
|
}
|
|
541
553
|
const allInputs = [base, ...tools];
|
|
542
|
-
const
|
|
554
|
+
const kernel = getKernel();
|
|
555
|
+
const inputFaceHashes = trackEvolution && kernel.cutAllWithHistory ? collectInputFaceHashes(allInputs) : [];
|
|
556
|
+
if (inputFaceHashes.length > 0 && kernel.cutAllWithHistory) {
|
|
557
|
+
const { shape, evolution, diagnostics } = kernel.cutAllWithHistory(base.wrapped, tools.map((s) => s.wrapped), inputFaceHashes, HASH_CODE_MAX, {
|
|
558
|
+
optimisation,
|
|
559
|
+
simplify,
|
|
560
|
+
fuzzyValue
|
|
561
|
+
});
|
|
562
|
+
const tracked = castToShape3D(shape, "CUT_ALL_NOT_3D", "cutAll did not produce a 3D shape", void 0, diagnostics);
|
|
563
|
+
if (tracked.ok) propagateAllMetadata(evolution, allInputs, tracked.value);
|
|
564
|
+
return tracked;
|
|
565
|
+
}
|
|
566
|
+
const cutAllResult = castToShape3D(kernel.cutAll(base.wrapped, tools.map((s) => s.wrapped), {
|
|
543
567
|
optimisation,
|
|
544
568
|
simplify,
|
|
545
569
|
fuzzyValue
|
|
@@ -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-B_ogF-B7.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, i as kernelError, m as andThen } from "./errors-CTn8i3lY.js";
|
|
3
|
-
import { a as isPlanarFace } from "./validityTypes-
|
|
4
|
-
import { _ as cast, u as outerWire } from "./faceFns-
|
|
3
|
+
import { a as isPlanarFace } from "./validityTypes-CBK24R8q.js";
|
|
4
|
+
import { _ as cast, u as outerWire } from "./faceFns-DCmUSP5s.js";
|
|
5
5
|
//#region 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-DwrDUQPZ.cjs");
|
|
2
2
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_validityTypes = require("./validityTypes-DUed50G5.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-DeJ6KX-t.cjs");
|
|
5
5
|
//#region 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-CpPDmfyT.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-Bjm9jybe.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-CzC9BOgL.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-IF9ktcEi.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-DwrDUQPZ.cjs");
|
|
3
3
|
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
4
4
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
5
5
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
6
6
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
7
7
|
const require_planeOps = require("./planeOps-CpupTCRM.cjs");
|
|
8
|
-
const require_faceFns = require("./faceFns-
|
|
9
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
10
|
-
const require_curveFns = require("./curveFns-
|
|
8
|
+
const require_faceFns = require("./faceFns-DeJ6KX-t.cjs");
|
|
9
|
+
const require_solidBuilders = require("./solidBuilders-BNsIlURc.cjs");
|
|
10
|
+
const require_curveFns = require("./curveFns-0ka_F1Qt.cjs");
|
|
11
11
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
12
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
13
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
14
|
-
const require_loftFns = require("./loftFns-
|
|
12
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DZU1ttYY.cjs");
|
|
13
|
+
const require_blueprintSketcher = require("./blueprintSketcher-Dzt1t42w.cjs");
|
|
14
|
+
const require_loftFns = require("./loftFns-IB4K_Dzv.cjs");
|
|
15
15
|
let opentype_js = require("opentype.js");
|
|
16
16
|
opentype_js = require_rolldown_runtime.__toESM(opentype_js, 1);
|
|
17
17
|
//#region src/operations/extrudeFns.ts
|
|
@@ -1,16 +1,16 @@
|
|
|
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-B_ogF-B7.js";
|
|
2
2
|
import { n as bug } from "./bug-BdOHwn_e.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-CTn8i3lY.js";
|
|
4
4
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
5
5
|
import { c as vecLength, d as vecNormalize, h as vecScale, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
6
6
|
import { n as createPlane } from "./planeOps-CkpMeheg.js";
|
|
7
|
-
import { v as copyShape } from "./faceFns-
|
|
8
|
-
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-
|
|
9
|
-
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-
|
|
7
|
+
import { v as copyShape } from "./faceFns-DCmUSP5s.js";
|
|
8
|
+
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-pibEpGVS.js";
|
|
9
|
+
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-Ci1fc5gO.js";
|
|
10
10
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
11
|
-
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-
|
|
12
|
-
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
13
|
-
import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-
|
|
11
|
+
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-COXjNT6b.js";
|
|
12
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-DQ8_jTjB.js";
|
|
13
|
+
import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-IzkWwK0P.js";
|
|
14
14
|
import opentype from "opentype.js";
|
|
15
15
|
//#region src/operations/extrudeFns.ts
|
|
16
16
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-CpPDmfyT.cjs");
|
|
3
3
|
//#region src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
|
|
2
|
-
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-
|
|
2
|
+
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-CzC9BOgL.js";
|
|
3
3
|
//#region src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|