brepjs 12.8.2 → 12.10.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/blueprints/{approximations.d.ts → blueprintApproximations.d.ts} +1 -1
- package/dist/2d/blueprints/blueprintApproximations.d.ts.map +1 -0
- package/dist/2d/blueprints/{customCorners.d.ts → blueprintCustomCorners.d.ts} +1 -1
- package/dist/2d/blueprints/blueprintCustomCorners.d.ts.map +1 -0
- package/dist/2d/blueprints/blueprintFns.d.ts +17 -3
- package/dist/2d/blueprints/blueprintFns.d.ts.map +1 -1
- package/dist/2d/blueprints/{offset.d.ts → blueprintOffset.d.ts} +1 -1
- package/dist/2d/blueprints/blueprintOffset.d.ts.map +1 -0
- package/dist/2d/blueprints/index.d.ts +4 -4
- package/dist/2d/blueprints/index.d.ts.map +1 -1
- package/dist/2d/lib/Curve2D.d.ts +1 -1
- package/dist/2d/lib/Curve2D.d.ts.map +1 -1
- package/dist/2d/lib/svgPath.d.ts.map +1 -1
- package/dist/2d/lib/vectorOperations.d.ts +4 -1
- package/dist/2d/lib/vectorOperations.d.ts.map +1 -1
- package/dist/2d-CzEysb7A.js +108 -0
- package/dist/2d-DCxS_sb_.cjs +107 -0
- package/dist/2d.cjs +24 -88
- package/dist/2d.d.ts +1 -1
- package/dist/2d.js +34 -99
- package/dist/{Blueprint-CQ28WJhz.cjs → Blueprint-BoC0DsDm.cjs} +15 -45
- package/dist/{Blueprint-DbVaf6k7.js → Blueprint-CQNRtmYG.js} +33 -63
- package/dist/{boolean2D-y3E92F0u.js → boolean2D-DXAt4GAK.js} +132 -62
- package/dist/{boolean2D-0blbVtJ8.cjs → boolean2D-N9Pgumgg.cjs} +112 -42
- package/dist/{booleanFns-BCTjYZAg.js → booleanFns-BXV7Oh0h.js} +53 -50
- package/dist/{booleanFns-gmsX3Cv2.cjs → booleanFns-CxArUj_q.cjs} +43 -40
- package/dist/brepjs.cjs +448 -379
- package/dist/brepjs.js +1634 -1563
- package/dist/core/dimensionTypes.d.ts +52 -0
- package/dist/core/dimensionTypes.d.ts.map +1 -0
- package/dist/core/disposal.d.ts +18 -0
- package/dist/core/disposal.d.ts.map +1 -1
- package/dist/core/errors.d.ts +7 -8
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/kernelErrorTranslation.d.ts +15 -0
- package/dist/core/kernelErrorTranslation.d.ts.map +1 -0
- package/dist/core/planeOps.d.ts +14 -0
- package/dist/core/planeOps.d.ts.map +1 -1
- package/dist/core/result.d.ts +4 -0
- package/dist/core/result.d.ts.map +1 -1
- package/dist/core/shapeTypes.d.ts +14 -146
- package/dist/core/shapeTypes.d.ts.map +1 -1
- package/dist/core/{definitionMaps.d.ts → typeDiscriminants.d.ts} +5 -1
- package/dist/core/typeDiscriminants.d.ts.map +1 -0
- package/dist/core/validityTypes.d.ts +100 -0
- package/dist/core/validityTypes.d.ts.map +1 -0
- package/dist/core.cjs +52 -11
- package/dist/core.d.ts +1 -1
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +119 -76
- package/dist/{curveFns-BZngcnQ1.cjs → curveFns-CWZRuXQ3.cjs} +2 -2
- package/dist/{curveFns-mROFhiuG.js → curveFns-OmbtFSG8.js} +14 -14
- package/dist/{drawFns-Bwakrq7w.js → drawFns-8S0ULGRj.js} +146 -118
- package/dist/{drawFns-CjRc1NfQ.cjs → drawFns-voV2wEp8.cjs} +153 -125
- package/dist/{faceFns-B8GnxjdY.js → faceFns-Bn2seBfp.js} +16 -24
- package/dist/{faceFns-DB1Fc5gy.cjs → faceFns-CmIrjdt1.cjs} +2 -10
- package/dist/{helpers-X0juxnwj.js → helpers-CEn618MW.js} +89 -21
- package/dist/{helpers-C8NoT0Wu.cjs → helpers-mipaxDTy.cjs} +77 -9
- package/dist/index.d.ts +20 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/io/gltfImportFns.d.ts +18 -0
- package/dist/io/gltfImportFns.d.ts.map +1 -0
- package/dist/io/ioUtils.d.ts +16 -0
- package/dist/io/ioUtils.d.ts.map +1 -0
- package/dist/io/objImportFns.d.ts.map +1 -1
- package/dist/io/threemfImportFns.d.ts.map +1 -1
- package/dist/io.cjs +4 -4
- package/dist/io.js +4 -4
- package/dist/kernel/brepkit/booleanOps.d.ts +23 -0
- package/dist/kernel/brepkit/booleanOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/constructionOps.d.ts +51 -0
- package/dist/kernel/brepkit/constructionOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/evolutionOps.d.ts +31 -0
- package/dist/kernel/brepkit/evolutionOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/geometryOps.d.ts +56 -0
- package/dist/kernel/brepkit/geometryOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/helpers.d.ts +84 -0
- package/dist/kernel/brepkit/helpers.d.ts.map +1 -0
- package/dist/kernel/brepkit/internalOps.d.ts +28 -0
- package/dist/kernel/brepkit/internalOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/ioOps.d.ts +43 -0
- package/dist/kernel/brepkit/ioOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/measureOps.d.ts +30 -0
- package/dist/kernel/brepkit/measureOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/meshOps.d.ts +7 -0
- package/dist/kernel/brepkit/meshOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/modifierOps.d.ts +15 -0
- package/dist/kernel/brepkit/modifierOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/repairOps.d.ts +14 -0
- package/dist/kernel/brepkit/repairOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/sweepOps.d.ts +27 -0
- package/dist/kernel/brepkit/sweepOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/topologyOps.d.ts +16 -0
- package/dist/kernel/brepkit/topologyOps.d.ts.map +1 -0
- package/dist/kernel/brepkit/transformOps.d.ts +14 -0
- package/dist/kernel/brepkit/transformOps.d.ts.map +1 -0
- package/dist/kernel/brepkitAdapter.d.ts +1 -1
- package/dist/kernel/brepkitAdapter.d.ts.map +1 -1
- package/dist/kernel/brepkitWasmTypes.d.ts +8 -0
- package/dist/kernel/brepkitWasmTypes.d.ts.map +1 -1
- package/dist/kernel/defaultAdapter.d.ts.map +1 -1
- package/dist/kernel/extendedConstructorOps.d.ts +9 -1
- package/dist/kernel/extendedConstructorOps.d.ts.map +1 -1
- package/dist/kernel/index.d.ts +1 -0
- package/dist/kernel/index.d.ts.map +1 -1
- package/dist/kernel/interfaces/boolean-ops.d.ts +25 -0
- package/dist/kernel/interfaces/boolean-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/builder-ops.d.ts +57 -0
- package/dist/kernel/interfaces/builder-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/core.d.ts +30 -0
- package/dist/kernel/interfaces/core.d.ts.map +1 -0
- package/dist/kernel/interfaces/curve-ops.d.ts +41 -0
- package/dist/kernel/interfaces/curve-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/evolution-ops.d.ts +19 -0
- package/dist/kernel/interfaces/evolution-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/index.d.ts +37 -0
- package/dist/kernel/interfaces/index.d.ts.map +1 -0
- package/dist/kernel/interfaces/io-ops.d.ts +66 -0
- package/dist/kernel/interfaces/io-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/measure-ops.d.ts +35 -0
- package/dist/kernel/interfaces/measure-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/mesh-ops.d.ts +21 -0
- package/dist/kernel/interfaces/mesh-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/modifier-ops.d.ts +22 -0
- package/dist/kernel/interfaces/modifier-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/primitive-ops.d.ts +13 -0
- package/dist/kernel/interfaces/primitive-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/repair-ops.d.ts +36 -0
- package/dist/kernel/interfaces/repair-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/surface-ops.d.ts +50 -0
- package/dist/kernel/interfaces/surface-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/sweep-ops.d.ts +49 -0
- package/dist/kernel/interfaces/sweep-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/topology-ops.d.ts +30 -0
- package/dist/kernel/interfaces/topology-ops.d.ts.map +1 -0
- package/dist/kernel/interfaces/transform-ops.d.ts +35 -0
- package/dist/kernel/interfaces/transform-ops.d.ts.map +1 -0
- package/dist/kernel/modifierOps.d.ts +2 -2
- package/dist/kernel/modifierOps.d.ts.map +1 -1
- package/dist/kernel/types.d.ts +2 -446
- package/dist/kernel/types.d.ts.map +1 -1
- package/dist/measurement/measureCache.d.ts +11 -9
- package/dist/measurement/measureCache.d.ts.map +1 -1
- package/dist/measurement/measureFns.d.ts +24 -71
- package/dist/measurement/measureFns.d.ts.map +1 -1
- package/dist/measurement/measureTypes.d.ts +30 -0
- package/dist/measurement/measureTypes.d.ts.map +1 -0
- package/dist/{measurement-D8EJ694A.js → measurement-fJWDEpz0.js} +53 -34
- package/dist/measurement-ph-kanQ7.cjs +154 -0
- package/dist/measurement.cjs +2 -1
- package/dist/measurement.d.ts +1 -1
- package/dist/measurement.d.ts.map +1 -1
- package/dist/measurement.js +4 -3
- package/dist/{meshFns-BnV0ZR8w.cjs → meshFns-B9p4EVV8.cjs} +4 -4
- package/dist/{meshFns-nQjK38EC.js → meshFns-D0qIoxm-.js} +3 -3
- package/dist/operations/compoundOpsFns.d.ts +38 -0
- package/dist/operations/compoundOpsFns.d.ts.map +1 -0
- package/dist/operations/convexHullFns.d.ts +21 -0
- package/dist/operations/convexHullFns.d.ts.map +1 -0
- package/dist/operations/extrudeFns.d.ts +2 -93
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/guidedSweepFns.d.ts +3 -22
- package/dist/operations/guidedSweepFns.d.ts.map +1 -1
- package/dist/operations/multiSweepFns.d.ts +3 -29
- package/dist/operations/multiSweepFns.d.ts.map +1 -1
- package/dist/operations/roofFns.d.ts +2 -2
- package/dist/operations/roofFns.d.ts.map +1 -1
- package/dist/operations/straightSkeleton.d.ts.map +1 -1
- package/dist/operations/sweepFns.d.ts +121 -0
- package/dist/operations/sweepFns.d.ts.map +1 -0
- package/dist/{operations-BfbkK6DU.js → operations-DX_qy_TB.js} +29 -177
- package/dist/{operations-CYpmLSC4.cjs → operations-Ds4xoyxR.cjs} +6 -154
- package/dist/operations.cjs +6 -10
- package/dist/operations.d.ts +0 -2
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +26 -30
- package/dist/originTrackingFns-BOCAMfd0.js +137 -0
- package/dist/originTrackingFns-SPU7ly3_.cjs +136 -0
- package/dist/query/edgeFinder.d.ts +4 -14
- package/dist/query/edgeFinder.d.ts.map +1 -1
- package/dist/query/faceFinder.d.ts +4 -14
- package/dist/query/faceFinder.d.ts.map +1 -1
- package/dist/query/finderCore.d.ts +6 -0
- package/dist/query/finderCore.d.ts.map +1 -1
- package/dist/query/shapeFinders.d.ts +32 -0
- package/dist/query/shapeFinders.d.ts.map +1 -0
- package/dist/query/wireFinder.d.ts +4 -9
- package/dist/query/wireFinder.d.ts.map +1 -1
- package/dist/query.cjs +54 -32
- package/dist/query.js +56 -34
- package/dist/{result-BaSD1fqR.js → result-CoDaWsvc.js} +48 -90
- package/dist/{result-fAX0OZzI.cjs → result-DULetAht.cjs} +17 -59
- package/dist/result.cjs +1 -1
- package/dist/result.js +23 -23
- package/dist/shapeFns-BZ6zk7nd.js +34 -0
- package/dist/shapeFns-bRkrwI8R.cjs +33 -0
- package/dist/{shapeTypes-7xEam9Ri.cjs → shapeTypes-T0n6mRmt.cjs} +170 -137
- package/dist/{shapeTypes-CpSaBLDv.js → shapeTypes-dhhm-T5A.js} +205 -172
- package/dist/sketching/CompoundSketch.d.ts +4 -4
- package/dist/sketching/CompoundSketch.d.ts.map +1 -1
- package/dist/sketching/Sketch.d.ts +3 -3
- package/dist/sketching/Sketch.d.ts.map +1 -1
- package/dist/sketching/Sketcher.d.ts.map +1 -1
- package/dist/sketching/Sketches.d.ts +1 -1
- package/dist/sketching/Sketches.d.ts.map +1 -1
- package/dist/sketching/draw.d.ts +1 -20
- package/dist/sketching/draw.d.ts.map +1 -1
- package/dist/sketching/draw3d.d.ts +22 -0
- package/dist/sketching/draw3d.d.ts.map +1 -0
- package/dist/sketching/sketchFns.d.ts +3 -3
- package/dist/sketching/sketchFns.d.ts.map +1 -1
- package/dist/sketching/sketchLib.d.ts +2 -2
- package/dist/sketching/sketchLib.d.ts.map +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.d.ts +2 -1
- package/dist/sketching.d.ts.map +1 -1
- package/dist/sketching.js +2 -2
- package/dist/{solidBuilders-994_MQwB.cjs → solidBuilders-BEAoLYvr.cjs} +3 -3
- package/dist/{solidBuilders-DmwhTCCd.js → solidBuilders-tVmD3R7Z.js} +12 -12
- package/dist/{surfaceBuilders-5VA34a3_.cjs → surfaceBuilders-DYS8AMSS.cjs} +3 -3
- package/dist/{surfaceBuilders-nQdJ56fe.js → surfaceBuilders-Dl0ATFbO.js} +15 -15
- package/dist/sweepFns-BKnQs59A.js +215 -0
- package/dist/sweepFns-COqeYIUp.cjs +214 -0
- package/dist/text/textBlueprints.d.ts +4 -3
- package/dist/text/textBlueprints.d.ts.map +1 -1
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/cast.d.ts +1 -5
- package/dist/topology/cast.d.ts.map +1 -1
- package/dist/topology/compoundOpsFns.d.ts +3 -35
- package/dist/topology/compoundOpsFns.d.ts.map +1 -1
- package/dist/topology/curveFns.d.ts +1 -1
- package/dist/topology/curveFns.d.ts.map +1 -1
- package/dist/topology/index.d.ts +2 -3
- package/dist/topology/index.d.ts.map +1 -1
- package/dist/topology/{colorFns.d.ts → metadata/colorFns.d.ts} +2 -2
- package/dist/topology/metadata/colorFns.d.ts.map +1 -0
- package/dist/topology/{faceTagFns.d.ts → metadata/faceTagFns.d.ts} +2 -2
- package/dist/topology/metadata/faceTagFns.d.ts.map +1 -0
- package/dist/topology/metadata/metadataPropagation.d.ts +30 -0
- package/dist/topology/metadata/metadataPropagation.d.ts.map +1 -0
- package/dist/topology/metadata/originTrackingFns.d.ts +23 -0
- package/dist/topology/metadata/originTrackingFns.d.ts.map +1 -0
- package/dist/topology/modifierFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts +6 -120
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/topologyQueryFns.d.ts +67 -0
- package/dist/topology/topologyQueryFns.d.ts.map +1 -0
- package/dist/topology/transformFns.d.ts +49 -0
- package/dist/topology/transformFns.d.ts.map +1 -0
- package/dist/topology/wrapperFns.d.ts.map +1 -1
- package/dist/{topology-C7x98OVn.js → topology-C1oUQXZS.js} +235 -50
- package/dist/{topology-ANwCzGL8.cjs → topology-xyDYbkHW.cjs} +205 -20
- package/dist/topology.cjs +18 -17
- package/dist/topology.js +97 -96
- package/dist/topologyQueryFns-0IptTUCo.cjs +118 -0
- package/dist/topologyQueryFns-Dj4Xd5kx.js +119 -0
- package/dist/{types-CWDdqcrq.js → types-CcKqsmd0.js} +2 -2
- package/dist/utils/precisionRound.d.ts +4 -0
- package/dist/utils/precisionRound.d.ts.map +1 -1
- package/dist/utils/vec2d.d.ts +5 -0
- package/dist/utils/vec2d.d.ts.map +1 -1
- package/dist/{vecOps-ZDdZWbwT.js → vecOps-LTN--A58.js} +15 -15
- package/dist/{vectors-Bx8wkNui.js → vectors-B8juLsQB.js} +15 -7
- package/dist/{vectors-D_IiZx0q.cjs → vectors-I_0zdD3O.cjs} +9 -1
- package/dist/vectors.cjs +1 -1
- package/dist/vectors.js +23 -23
- package/package.json +9 -9
- package/dist/2d/blueprints/approximations.d.ts.map +0 -1
- package/dist/2d/blueprints/customCorners.d.ts.map +0 -1
- package/dist/2d/blueprints/offset.d.ts.map +0 -1
- package/dist/core/definitionMaps.d.ts.map +0 -1
- package/dist/core/geometryHelpers.d.ts +0 -30
- package/dist/core/geometryHelpers.d.ts.map +0 -1
- package/dist/core/memory.d.ts +0 -6
- package/dist/core/memory.d.ts.map +0 -1
- package/dist/core/typeErrors.d.ts +0 -17
- package/dist/core/typeErrors.d.ts.map +0 -1
- package/dist/cornerFinder-Ckz-mPHE.js +0 -59
- package/dist/cornerFinder-ZmOyOOsh.cjs +0 -58
- package/dist/loft-Bhw-FMoL.js +0 -228
- package/dist/loft-hp3pc1M7.cjs +0 -227
- package/dist/measurement-BoNTUBAp.cjs +0 -135
- package/dist/operations/extrude.d.ts +0 -72
- package/dist/operations/extrude.d.ts.map +0 -1
- package/dist/operations/loft.d.ts +0 -33
- package/dist/operations/loft.d.ts.map +0 -1
- package/dist/shapeFns-C2SnNvdH.cjs +0 -468
- package/dist/shapeFns-FDuKkrDR.js +0 -469
- package/dist/topology/colorFns.d.ts.map +0 -1
- package/dist/topology/faceTagFns.d.ts.map +0 -1
- package/dist/utils/round2.d.ts +0 -3
- package/dist/utils/round2.d.ts.map +0 -1
- package/dist/utils/round5.d.ts +0 -3
- package/dist/utils/round5.d.ts.map +0 -1
|
@@ -1081,7 +1081,17 @@ function chamferDistAngle(oc, shape, edges, distance2, angleDeg) {
|
|
|
1081
1081
|
return result;
|
|
1082
1082
|
}
|
|
1083
1083
|
function offsetWire2D(oc, wire, offsetVal, joinType) {
|
|
1084
|
-
|
|
1084
|
+
let jt;
|
|
1085
|
+
if (typeof joinType === "string") {
|
|
1086
|
+
const map = {
|
|
1087
|
+
arc: oc.GeomAbs_JoinType.GeomAbs_Arc,
|
|
1088
|
+
intersection: oc.GeomAbs_JoinType.GeomAbs_Intersection,
|
|
1089
|
+
tangent: oc.GeomAbs_JoinType.GeomAbs_Tangent
|
|
1090
|
+
};
|
|
1091
|
+
jt = map[joinType] ?? oc.GeomAbs_JoinType.GeomAbs_Arc;
|
|
1092
|
+
} else {
|
|
1093
|
+
jt = joinType ?? oc.GeomAbs_JoinType.GeomAbs_Arc;
|
|
1094
|
+
}
|
|
1085
1095
|
const offsetter = new oc.BRepOffsetAPI_MakeOffset_3(wire, jt, false);
|
|
1086
1096
|
offsetter.Perform(offsetVal, 0);
|
|
1087
1097
|
const result = offsetter.Shape();
|
|
@@ -2207,6 +2217,74 @@ function dispose(_oc, handle) {
|
|
|
2207
2217
|
} catch {
|
|
2208
2218
|
}
|
|
2209
2219
|
}
|
|
2220
|
+
function makeRectangle(oc, width, height) {
|
|
2221
|
+
const e1 = makeLineEdge(oc, [0, 0, 0], [width, 0, 0]);
|
|
2222
|
+
const e2 = makeLineEdge(oc, [width, 0, 0], [width, height, 0]);
|
|
2223
|
+
const e3 = makeLineEdge(oc, [width, height, 0], [0, height, 0]);
|
|
2224
|
+
const e4 = makeLineEdge(oc, [0, height, 0], [0, 0, 0]);
|
|
2225
|
+
const bw = new oc.BRepBuilderAPI_MakeWire_1();
|
|
2226
|
+
bw.Add_1(e1);
|
|
2227
|
+
bw.Add_1(e2);
|
|
2228
|
+
bw.Add_1(e3);
|
|
2229
|
+
bw.Add_1(e4);
|
|
2230
|
+
const wire = bw.Wire();
|
|
2231
|
+
bw.delete();
|
|
2232
|
+
e1.delete();
|
|
2233
|
+
e2.delete();
|
|
2234
|
+
e3.delete();
|
|
2235
|
+
e4.delete();
|
|
2236
|
+
const bf = new oc.BRepBuilderAPI_MakeFace_15(wire, false);
|
|
2237
|
+
const face = bf.Face();
|
|
2238
|
+
bf.delete();
|
|
2239
|
+
return face;
|
|
2240
|
+
}
|
|
2241
|
+
function createPoint3d(oc, x, y, z) {
|
|
2242
|
+
return new oc.gp_Pnt_3(x, y, z);
|
|
2243
|
+
}
|
|
2244
|
+
function createDirection3d(oc, x, y, z) {
|
|
2245
|
+
return new oc.gp_Dir_4(x, y, z);
|
|
2246
|
+
}
|
|
2247
|
+
function createVector3d(oc, x, y, z) {
|
|
2248
|
+
return new oc.gp_Vec_4(x, y, z);
|
|
2249
|
+
}
|
|
2250
|
+
function createAxis1(oc, cx, cy, cz, dx, dy, dz) {
|
|
2251
|
+
const pnt = new oc.gp_Pnt_3(cx, cy, cz);
|
|
2252
|
+
const dir = new oc.gp_Dir_4(dx, dy, dz);
|
|
2253
|
+
const ax = new oc.gp_Ax1_2(pnt, dir);
|
|
2254
|
+
pnt.delete();
|
|
2255
|
+
dir.delete();
|
|
2256
|
+
return ax;
|
|
2257
|
+
}
|
|
2258
|
+
function createAxis2(oc, ox, oy, oz, zx, zy, zz, xx, xy, xz) {
|
|
2259
|
+
const pnt = new oc.gp_Pnt_3(ox, oy, oz);
|
|
2260
|
+
const z = new oc.gp_Dir_4(zx, zy, zz);
|
|
2261
|
+
let ax;
|
|
2262
|
+
if (xx !== void 0 && xy !== void 0 && xz !== void 0) {
|
|
2263
|
+
const x = new oc.gp_Dir_4(xx, xy, xz);
|
|
2264
|
+
ax = new oc.gp_Ax2_2(pnt, z, x);
|
|
2265
|
+
x.delete();
|
|
2266
|
+
} else {
|
|
2267
|
+
ax = new oc.gp_Ax2_3(pnt, z);
|
|
2268
|
+
}
|
|
2269
|
+
pnt.delete();
|
|
2270
|
+
z.delete();
|
|
2271
|
+
return ax;
|
|
2272
|
+
}
|
|
2273
|
+
function createAxis3(oc, ox, oy, oz, zx, zy, zz, xx, xy, xz) {
|
|
2274
|
+
const pnt = new oc.gp_Pnt_3(ox, oy, oz);
|
|
2275
|
+
const z = new oc.gp_Dir_4(zx, zy, zz);
|
|
2276
|
+
let ax;
|
|
2277
|
+
if (xx !== void 0 && xy !== void 0 && xz !== void 0) {
|
|
2278
|
+
const x = new oc.gp_Dir_4(xx, xy, xz);
|
|
2279
|
+
ax = new oc.gp_Ax3_3(pnt, z, x);
|
|
2280
|
+
x.delete();
|
|
2281
|
+
} else {
|
|
2282
|
+
ax = new oc.gp_Ax3_4(pnt, z);
|
|
2283
|
+
}
|
|
2284
|
+
pnt.delete();
|
|
2285
|
+
z.delete();
|
|
2286
|
+
return ax;
|
|
2287
|
+
}
|
|
2210
2288
|
function mapContinuity(oc, continuity) {
|
|
2211
2289
|
switch (continuity) {
|
|
2212
2290
|
case "C0":
|
|
@@ -4110,12 +4188,7 @@ class DefaultAdapter {
|
|
|
4110
4188
|
return makeBoxFromCorners(this.oc, p1, p2);
|
|
4111
4189
|
}
|
|
4112
4190
|
makeRectangle(width, height) {
|
|
4113
|
-
|
|
4114
|
-
const e2 = this.makeLineEdge([width, 0, 0], [width, height, 0]);
|
|
4115
|
-
const e3 = this.makeLineEdge([width, height, 0], [0, height, 0]);
|
|
4116
|
-
const e4 = this.makeLineEdge([0, height, 0], [0, 0, 0]);
|
|
4117
|
-
const wire = this.makeWire([e1, e2, e3, e4]);
|
|
4118
|
-
return this.makeFace(wire);
|
|
4191
|
+
return makeRectangle(this.oc, width, height);
|
|
4119
4192
|
}
|
|
4120
4193
|
solidFromShell(shell2) {
|
|
4121
4194
|
return solidFromShell(this.oc, shell2);
|
|
@@ -4332,17 +4405,7 @@ class DefaultAdapter {
|
|
|
4332
4405
|
}
|
|
4333
4406
|
// --- 2D offset ---
|
|
4334
4407
|
offsetWire2D(wire, offset2, joinType) {
|
|
4335
|
-
|
|
4336
|
-
if (typeof joinType === "string") {
|
|
4337
|
-
const oc = this.oc;
|
|
4338
|
-
const map = {
|
|
4339
|
-
arc: oc.GeomAbs_JoinType.GeomAbs_Arc,
|
|
4340
|
-
intersection: oc.GeomAbs_JoinType.GeomAbs_Intersection,
|
|
4341
|
-
tangent: oc.GeomAbs_JoinType.GeomAbs_Tangent
|
|
4342
|
-
};
|
|
4343
|
-
jt = map[joinType];
|
|
4344
|
-
}
|
|
4345
|
-
return offsetWire2D(this.oc, wire, offset2, jt);
|
|
4408
|
+
return offsetWire2D(this.oc, wire, offset2, joinType);
|
|
4346
4409
|
}
|
|
4347
4410
|
// --- Distance ---
|
|
4348
4411
|
distance(shape1, shape2) {
|
|
@@ -4778,51 +4841,22 @@ class DefaultAdapter {
|
|
|
4778
4841
|
}
|
|
4779
4842
|
// --- 3D Geometry primitive factories ---
|
|
4780
4843
|
createPoint3d(x, y, z) {
|
|
4781
|
-
return
|
|
4844
|
+
return createPoint3d(this.oc, x, y, z);
|
|
4782
4845
|
}
|
|
4783
4846
|
createDirection3d(x, y, z) {
|
|
4784
|
-
return
|
|
4847
|
+
return createDirection3d(this.oc, x, y, z);
|
|
4785
4848
|
}
|
|
4786
4849
|
createVector3d(x, y, z) {
|
|
4787
|
-
return
|
|
4850
|
+
return createVector3d(this.oc, x, y, z);
|
|
4788
4851
|
}
|
|
4789
4852
|
createAxis1(cx, cy, cz, dx, dy, dz) {
|
|
4790
|
-
|
|
4791
|
-
const dir = new this.oc.gp_Dir_4(dx, dy, dz);
|
|
4792
|
-
const ax = new this.oc.gp_Ax1_2(pnt, dir);
|
|
4793
|
-
pnt.delete();
|
|
4794
|
-
dir.delete();
|
|
4795
|
-
return ax;
|
|
4853
|
+
return createAxis1(this.oc, cx, cy, cz, dx, dy, dz);
|
|
4796
4854
|
}
|
|
4797
4855
|
createAxis2(ox, oy, oz, zx, zy, zz, xx, xy, xz) {
|
|
4798
|
-
|
|
4799
|
-
const z = new this.oc.gp_Dir_4(zx, zy, zz);
|
|
4800
|
-
let ax;
|
|
4801
|
-
if (xx !== void 0 && xy !== void 0 && xz !== void 0) {
|
|
4802
|
-
const x = new this.oc.gp_Dir_4(xx, xy, xz);
|
|
4803
|
-
ax = new this.oc.gp_Ax2_2(pnt, z, x);
|
|
4804
|
-
x.delete();
|
|
4805
|
-
} else {
|
|
4806
|
-
ax = new this.oc.gp_Ax2_3(pnt, z);
|
|
4807
|
-
}
|
|
4808
|
-
pnt.delete();
|
|
4809
|
-
z.delete();
|
|
4810
|
-
return ax;
|
|
4856
|
+
return createAxis2(this.oc, ox, oy, oz, zx, zy, zz, xx, xy, xz);
|
|
4811
4857
|
}
|
|
4812
4858
|
createAxis3(ox, oy, oz, zx, zy, zz, xx, xy, xz) {
|
|
4813
|
-
|
|
4814
|
-
const z = new this.oc.gp_Dir_4(zx, zy, zz);
|
|
4815
|
-
let ax;
|
|
4816
|
-
if (xx !== void 0 && xy !== void 0 && xz !== void 0) {
|
|
4817
|
-
const x = new this.oc.gp_Dir_4(xx, xy, xz);
|
|
4818
|
-
ax = new this.oc.gp_Ax3_3(pnt, z, x);
|
|
4819
|
-
x.delete();
|
|
4820
|
-
} else {
|
|
4821
|
-
ax = new this.oc.gp_Ax3_4(pnt, z);
|
|
4822
|
-
}
|
|
4823
|
-
pnt.delete();
|
|
4824
|
-
z.delete();
|
|
4825
|
-
return ax;
|
|
4859
|
+
return createAxis3(this.oc, ox, oy, oz, zx, zy, zz, xx, xy, xz);
|
|
4826
4860
|
}
|
|
4827
4861
|
// --- Unsupported brepkit-only methods ---
|
|
4828
4862
|
export3MF(_shape, _tolerance) {
|
|
@@ -4966,7 +5000,13 @@ function withKernel(id, fn) {
|
|
|
4966
5000
|
_defaultKernelId = id;
|
|
4967
5001
|
_cachedDefault = _kernels.get(id) ?? null;
|
|
4968
5002
|
try {
|
|
4969
|
-
|
|
5003
|
+
const result = fn();
|
|
5004
|
+
if (result instanceof Promise) {
|
|
5005
|
+
throw new Error(
|
|
5006
|
+
"withKernel() callback returned a Promise. Async code must use getKernel(id) directly — the kernel override is restored synchronously in finally."
|
|
5007
|
+
);
|
|
5008
|
+
}
|
|
5009
|
+
return result;
|
|
4970
5010
|
} finally {
|
|
4971
5011
|
_defaultKernelId = prev;
|
|
4972
5012
|
_cachedDefault = prev ? _kernels.get(prev) ?? null : null;
|
|
@@ -4992,7 +5032,38 @@ if (!globalWithRegistry.FinalizationRegistry) {
|
|
|
4992
5032
|
}
|
|
4993
5033
|
};
|
|
4994
5034
|
}
|
|
5035
|
+
const _stats = {
|
|
5036
|
+
liveHandles: 0,
|
|
5037
|
+
peakHandles: 0,
|
|
5038
|
+
gcCollected: 0,
|
|
5039
|
+
scopeEnters: 0,
|
|
5040
|
+
scopeExits: 0
|
|
5041
|
+
};
|
|
5042
|
+
function getDisposalStats() {
|
|
5043
|
+
return { ..._stats };
|
|
5044
|
+
}
|
|
5045
|
+
function resetDisposalStats() {
|
|
5046
|
+
_stats.liveHandles = 0;
|
|
5047
|
+
_stats.peakHandles = 0;
|
|
5048
|
+
_stats.gcCollected = 0;
|
|
5049
|
+
_stats.scopeEnters = 0;
|
|
5050
|
+
_stats.scopeExits = 0;
|
|
5051
|
+
}
|
|
5052
|
+
function trackHandleCreated() {
|
|
5053
|
+
_stats.liveHandles++;
|
|
5054
|
+
if (_stats.liveHandles > _stats.peakHandles) {
|
|
5055
|
+
_stats.peakHandles = _stats.liveHandles;
|
|
5056
|
+
}
|
|
5057
|
+
}
|
|
5058
|
+
function trackHandleDisposed() {
|
|
5059
|
+
_stats.liveHandles--;
|
|
5060
|
+
}
|
|
5061
|
+
function trackGcCollected() {
|
|
5062
|
+
_stats.gcCollected++;
|
|
5063
|
+
_stats.liveHandles--;
|
|
5064
|
+
}
|
|
4995
5065
|
const registry = new FinalizationRegistry((heldValue) => {
|
|
5066
|
+
trackGcCollected();
|
|
4996
5067
|
try {
|
|
4997
5068
|
heldValue.delete();
|
|
4998
5069
|
} catch {
|
|
@@ -5003,6 +5074,7 @@ function createHandle(ocShape) {
|
|
|
5003
5074
|
const dispose2 = () => {
|
|
5004
5075
|
if (!disposed) {
|
|
5005
5076
|
disposed = true;
|
|
5077
|
+
trackHandleDisposed();
|
|
5006
5078
|
registry.unregister(handle);
|
|
5007
5079
|
try {
|
|
5008
5080
|
ocShape.delete();
|
|
@@ -5025,6 +5097,7 @@ function createHandle(ocShape) {
|
|
|
5025
5097
|
dispose2();
|
|
5026
5098
|
}
|
|
5027
5099
|
};
|
|
5100
|
+
trackHandleCreated();
|
|
5028
5101
|
registry.register(handle, ocShape, handle);
|
|
5029
5102
|
return handle;
|
|
5030
5103
|
}
|
|
@@ -5041,6 +5114,7 @@ function createKernelHandle(ocObj) {
|
|
|
5041
5114
|
[Symbol.dispose]() {
|
|
5042
5115
|
if (!disposed) {
|
|
5043
5116
|
disposed = true;
|
|
5117
|
+
trackHandleDisposed();
|
|
5044
5118
|
registry.unregister(handle);
|
|
5045
5119
|
try {
|
|
5046
5120
|
ocObj.delete();
|
|
@@ -5049,11 +5123,15 @@ function createKernelHandle(ocObj) {
|
|
|
5049
5123
|
}
|
|
5050
5124
|
}
|
|
5051
5125
|
};
|
|
5126
|
+
trackHandleCreated();
|
|
5052
5127
|
registry.register(handle, ocObj, handle);
|
|
5053
5128
|
return handle;
|
|
5054
5129
|
}
|
|
5055
5130
|
class DisposalScope {
|
|
5056
5131
|
handles = [];
|
|
5132
|
+
constructor() {
|
|
5133
|
+
_stats.scopeEnters++;
|
|
5134
|
+
}
|
|
5057
5135
|
/** Register a resource for disposal when scope ends. */
|
|
5058
5136
|
register(resource) {
|
|
5059
5137
|
this.handles.push(() => {
|
|
@@ -5075,6 +5153,7 @@ class DisposalScope {
|
|
|
5075
5153
|
return disposable;
|
|
5076
5154
|
}
|
|
5077
5155
|
[Symbol.dispose]() {
|
|
5156
|
+
_stats.scopeExits++;
|
|
5078
5157
|
for (let i = this.handles.length - 1; i >= 0; i--) {
|
|
5079
5158
|
this.handles[i]?.();
|
|
5080
5159
|
}
|
|
@@ -5123,20 +5202,38 @@ async function withScopeResultAsync(fn) {
|
|
|
5123
5202
|
function isLive(handle) {
|
|
5124
5203
|
return !handle.disposed;
|
|
5125
5204
|
}
|
|
5126
|
-
function
|
|
5205
|
+
function is3D(s) {
|
|
5206
|
+
return s.__is2D !== true;
|
|
5207
|
+
}
|
|
5208
|
+
function is2D(s) {
|
|
5209
|
+
return s.__is2D === true;
|
|
5210
|
+
}
|
|
5211
|
+
function as3D(s) {
|
|
5212
|
+
if (!is3D(s)) throw new Error("Expected 3D shape, got 2D");
|
|
5213
|
+
return s;
|
|
5214
|
+
}
|
|
5215
|
+
function as2D(s) {
|
|
5216
|
+
if (!is2D(s)) throw new Error("Expected 2D shape, got 3D");
|
|
5217
|
+
return s;
|
|
5218
|
+
}
|
|
5219
|
+
function getShapeKind(shape) {
|
|
5220
|
+
return getKernel().shapeType(shape.wrapped);
|
|
5221
|
+
}
|
|
5222
|
+
function brandHandle(handle, dim) {
|
|
5223
|
+
if (dim === "2D") handle.__is2D = true;
|
|
5127
5224
|
return handle;
|
|
5128
5225
|
}
|
|
5129
|
-
function createVertex(ocShape) {
|
|
5130
|
-
return brandHandle(createHandle(ocShape));
|
|
5226
|
+
function createVertex(ocShape, dim) {
|
|
5227
|
+
return brandHandle(createHandle(ocShape), dim);
|
|
5131
5228
|
}
|
|
5132
|
-
function createEdge(ocShape) {
|
|
5133
|
-
return brandHandle(createHandle(ocShape));
|
|
5229
|
+
function createEdge(ocShape, dim) {
|
|
5230
|
+
return brandHandle(createHandle(ocShape), dim);
|
|
5134
5231
|
}
|
|
5135
|
-
function createWire(ocShape) {
|
|
5136
|
-
return brandHandle(createHandle(ocShape));
|
|
5232
|
+
function createWire(ocShape, dim) {
|
|
5233
|
+
return brandHandle(createHandle(ocShape), dim);
|
|
5137
5234
|
}
|
|
5138
|
-
function createFace(ocShape) {
|
|
5139
|
-
return brandHandle(createHandle(ocShape));
|
|
5235
|
+
function createFace(ocShape, dim) {
|
|
5236
|
+
return brandHandle(createHandle(ocShape), dim);
|
|
5140
5237
|
}
|
|
5141
5238
|
function createShell(ocShape) {
|
|
5142
5239
|
return brandHandle(createHandle(ocShape));
|
|
@@ -5147,11 +5244,8 @@ function createSolid(ocShape) {
|
|
|
5147
5244
|
function createCompSolid(ocShape) {
|
|
5148
5245
|
return brandHandle(createHandle(ocShape));
|
|
5149
5246
|
}
|
|
5150
|
-
function createCompound(ocShape) {
|
|
5151
|
-
return brandHandle(createHandle(ocShape));
|
|
5152
|
-
}
|
|
5153
|
-
function getShapeKind(shape) {
|
|
5154
|
-
return getKernel().shapeType(shape.wrapped);
|
|
5247
|
+
function createCompound(ocShape, dim) {
|
|
5248
|
+
return brandHandle(createHandle(ocShape), dim);
|
|
5155
5249
|
}
|
|
5156
5250
|
function isVertex(s) {
|
|
5157
5251
|
return getShapeKind(s) === "vertex";
|
|
@@ -5184,121 +5278,60 @@ function isShape1D(s) {
|
|
|
5184
5278
|
const kind = getShapeKind(s);
|
|
5185
5279
|
return kind === "edge" || kind === "wire";
|
|
5186
5280
|
}
|
|
5187
|
-
function
|
|
5188
|
-
return s.__is2D !== true;
|
|
5189
|
-
}
|
|
5190
|
-
function is2D(s) {
|
|
5191
|
-
return s.__is2D === true;
|
|
5192
|
-
}
|
|
5193
|
-
function as3D(s) {
|
|
5194
|
-
if (!is3D(s)) throw new Error("Expected 3D shape, got 2D");
|
|
5195
|
-
return s;
|
|
5196
|
-
}
|
|
5197
|
-
function as2D(s) {
|
|
5198
|
-
if (!is2D(s)) throw new Error("Expected 2D shape, got 3D");
|
|
5199
|
-
return s;
|
|
5200
|
-
}
|
|
5201
|
-
function isClosedWire(wire) {
|
|
5202
|
-
return getKernel().curveIsClosed(wire.wrapped);
|
|
5203
|
-
}
|
|
5204
|
-
function isOrientedFace(face) {
|
|
5205
|
-
return getKernel().isValid(face.wrapped);
|
|
5206
|
-
}
|
|
5207
|
-
function isManifoldShell(shell2) {
|
|
5208
|
-
const kernel = getKernel();
|
|
5209
|
-
if (!kernel.isValid(shell2.wrapped)) return false;
|
|
5210
|
-
const validate = kernel.isValidStrict?.bind(kernel) ?? kernel.isValid.bind(kernel);
|
|
5211
|
-
try {
|
|
5212
|
-
const solid = kernel.solidFromShell(shell2.wrapped);
|
|
5213
|
-
const valid = validate(solid);
|
|
5214
|
-
try {
|
|
5215
|
-
kernel.dispose(solid);
|
|
5216
|
-
} catch {
|
|
5217
|
-
}
|
|
5218
|
-
return valid;
|
|
5219
|
-
} catch {
|
|
5220
|
-
return false;
|
|
5221
|
-
}
|
|
5222
|
-
}
|
|
5223
|
-
function isValidSolid(solid) {
|
|
5224
|
-
return getKernel().isValid(solid.wrapped);
|
|
5225
|
-
}
|
|
5226
|
-
function closedWire(wire) {
|
|
5227
|
-
if (isClosedWire(wire)) return { valid: true, shape: wire };
|
|
5228
|
-
return { valid: false, reason: "Wire is not closed: start and end points do not coincide" };
|
|
5229
|
-
}
|
|
5230
|
-
function orientedFace(face) {
|
|
5231
|
-
if (isOrientedFace(face)) return { valid: true, shape: face };
|
|
5232
|
-
return { valid: false, reason: "Face orientation is inconsistent or face is invalid" };
|
|
5233
|
-
}
|
|
5234
|
-
function manifoldShell(shell2) {
|
|
5235
|
-
if (isManifoldShell(shell2)) return { valid: true, shape: shell2 };
|
|
5236
|
-
return { valid: false, reason: "Shell is not manifold: has free edges or is invalid" };
|
|
5237
|
-
}
|
|
5238
|
-
function validSolid(solid) {
|
|
5239
|
-
if (isValidSolid(solid)) return { valid: true, shape: solid };
|
|
5240
|
-
return { valid: false, reason: "Solid failed BRepCheck validation" };
|
|
5241
|
-
}
|
|
5242
|
-
function castShape(ocShape) {
|
|
5281
|
+
function castShape(ocShape, dim) {
|
|
5243
5282
|
const kernel = getKernel();
|
|
5244
5283
|
const st = kernel.shapeType(ocShape);
|
|
5245
5284
|
const dc = kernel.downcast(ocShape, st);
|
|
5246
|
-
if (st === "vertex") return createVertex(dc);
|
|
5247
|
-
if (st === "edge") return createEdge(dc);
|
|
5248
|
-
if (st === "wire") return createWire(dc);
|
|
5249
|
-
if (st === "face") return createFace(dc);
|
|
5285
|
+
if (st === "vertex") return createVertex(dc, dim);
|
|
5286
|
+
if (st === "edge") return createEdge(dc, dim);
|
|
5287
|
+
if (st === "wire") return createWire(dc, dim);
|
|
5288
|
+
if (st === "face") return createFace(dc, dim);
|
|
5250
5289
|
if (st === "shell") return createShell(dc);
|
|
5251
5290
|
if (st === "solid") return createSolid(dc);
|
|
5252
5291
|
if (st === "compsolid") return createCompSolid(dc);
|
|
5253
|
-
return createCompound(dc);
|
|
5292
|
+
return createCompound(dc, dim);
|
|
5254
5293
|
}
|
|
5255
5294
|
function castShape3D(ocShape) {
|
|
5256
5295
|
return castShape(ocShape);
|
|
5257
5296
|
}
|
|
5258
5297
|
export {
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5298
|
+
is2D as A,
|
|
5299
|
+
is3D as B,
|
|
5300
|
+
isCompound as C,
|
|
5262
5301
|
DisposalScope as D,
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
createShell as P,
|
|
5275
|
-
initFromOC as Q,
|
|
5276
|
-
registerKernel as R,
|
|
5277
|
-
withKernel as S,
|
|
5278
|
-
closedWire as a,
|
|
5279
|
-
createHandle as b,
|
|
5302
|
+
isLive as E,
|
|
5303
|
+
isShape1D as F,
|
|
5304
|
+
isVertex as G,
|
|
5305
|
+
registerKernel as H,
|
|
5306
|
+
resetDisposalStats as I,
|
|
5307
|
+
withKernel as J,
|
|
5308
|
+
withScope as K,
|
|
5309
|
+
withScopeResult as L,
|
|
5310
|
+
withScopeResultAsync as M,
|
|
5311
|
+
getShapeKind as a,
|
|
5312
|
+
isWire as b,
|
|
5280
5313
|
castShape as c,
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5314
|
+
isShell as d,
|
|
5315
|
+
createCompound as e,
|
|
5316
|
+
createSolid as f,
|
|
5317
|
+
getKernel as g,
|
|
5318
|
+
isShape3D as h,
|
|
5319
|
+
isEdge as i,
|
|
5320
|
+
createVertex as j,
|
|
5321
|
+
isSolid as k,
|
|
5322
|
+
createWire as l,
|
|
5323
|
+
createEdge as m,
|
|
5324
|
+
createFace as n,
|
|
5325
|
+
isFace as o,
|
|
5326
|
+
getKernel2D as p,
|
|
5327
|
+
as2D as q,
|
|
5328
|
+
registerForCleanup as r,
|
|
5329
|
+
as3D as s,
|
|
5330
|
+
castShape3D as t,
|
|
5331
|
+
unregisterFromCleanup as u,
|
|
5332
|
+
createHandle as v,
|
|
5333
|
+
createKernelHandle as w,
|
|
5334
|
+
createShell as x,
|
|
5335
|
+
getDisposalStats as y,
|
|
5336
|
+
initFromOC as z
|
|
5304
5337
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as Sketch } from './Sketch.js';
|
|
2
2
|
import { PointInput } from '../core/types.js';
|
|
3
|
-
import { ExtrusionProfile } from '../operations/
|
|
4
|
-
import { LoftOptions } from '../operations/
|
|
3
|
+
import { ExtrusionProfile } from '../operations/extrudeUtils.js';
|
|
4
|
+
import { LoftOptions } from '../operations/loftFns.js';
|
|
5
5
|
import { SketchInterface } from './sketchLib.js';
|
|
6
|
-
import { Shape3D } from '../core/shapeTypes.js';
|
|
6
|
+
import { OrientedFace, Shape3D } from '../core/shapeTypes.js';
|
|
7
7
|
/**
|
|
8
8
|
* Represent a face with holes as a group of sketches (one outer + zero or more inner).
|
|
9
9
|
*
|
|
@@ -27,7 +27,7 @@ export default class CompoundSketch implements SketchInterface {
|
|
|
27
27
|
/** Return all wires (outer + holes) combined into a compound shape. */
|
|
28
28
|
get wires(): import('../index.js').Compound;
|
|
29
29
|
/** Build a face from the outer boundary with inner wires subtracted as holes. */
|
|
30
|
-
face():
|
|
30
|
+
face(): OrientedFace<"3D">;
|
|
31
31
|
/**
|
|
32
32
|
* Extrude the compound face (with holes) along the default or given direction.
|
|
33
33
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompoundSketch.d.ts","sourceRoot":"","sources":["../../src/sketching/CompoundSketch.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,KAAK,EAAQ,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"CompoundSketch.d.ts","sourceRoot":"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|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Plane } from '../core/planeTypes.js';
|
|
2
2
|
import { Vec3, PointInput } from '../core/types.js';
|
|
3
|
-
import { ExtrusionProfile,
|
|
4
|
-
import { LoftOptions } from '../operations/
|
|
3
|
+
import { ExtrusionProfile, SweepOptions } from '../operations/extrudeUtils.js';
|
|
4
|
+
import { LoftOptions } from '../operations/loftFns.js';
|
|
5
5
|
import { Face, Wire, Shape3D } from '../core/shapeTypes.js';
|
|
6
6
|
import { SketchInterface } from './sketchLib.js';
|
|
7
7
|
/**
|
|
@@ -82,7 +82,7 @@ export default class Sketch implements SketchInterface {
|
|
|
82
82
|
* Sweep along this sketch another sketch defined in the function
|
|
83
83
|
* `sketchOnPlane`.
|
|
84
84
|
*/
|
|
85
|
-
sweepSketch(sketchOnPlane: (plane: Plane, origin: Vec3) => this, sweepConfig?:
|
|
85
|
+
sweepSketch(sketchOnPlane: (plane: Plane, origin: Vec3) => this, sweepConfig?: SweepOptions): Shape3D;
|
|
86
86
|
/** Loft between this sketch and another sketch (or an array of them)
|
|
87
87
|
*
|
|
88
88
|
* You can also define a `startPoint` for the loft (that will be placed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sketch.d.ts","sourceRoot":"","sources":["../../src/sketching/Sketch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAKnD,OAAO,EAAU,KAAK,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Sketch.d.ts","sourceRoot":"","sources":["../../src/sketching/Sketch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAKnD,OAAO,EAAU,KAAK,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAItE,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM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U,EAAE,EAAE,MAAM,EAAE,GAAE;QAAE,MAAM,CAAC,EAAE,UAAU,CAAA;KAAO,GAAG,OAAO;IAUvF;;;;;;;;;OASG;IACH,OAAO,CACL,iBAAiB,EAAE,MAAM,EACzB,EACE,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,EACV,MAAM,GACP,GAAE;QACD,kBAAkB,CAAC,EAAE,UAAU,CAAC;QAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;QACpC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,UAAU,CAAC;KAChB,GACL,OAAO;IAmCV;;;OAGG;IACH,WAAW,CACT,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,KAAK,IAAI,EACnD,WAAW,GAAE,YAAiB,GAC7B,OAAO;IAwBV;;;;;;;;OAQG;IACH,QAAQ,CACN,aAAa,EAAE,IAAI,GAAG,IAAI,EAAE,EAC5B,UAAU,GAAE,WAAgB,EAC5B,WAAW,UAAQ,GAClB,OAAO;CAiBX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sketcher.d.ts","sourceRoot":"","sources":["../../src/sketching/Sketcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAc,MAAM,uBAAuB,CAAC;AAQ1E,OAAO,EAAa,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"Sketcher.d.ts","sourceRoot":"","sources":["../../src/sketching/Sketcher.ts"],"names":[],"mappings":"AAAA,OAAO,KA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|
import { PointInput } from '../core/types.js';
|
|
2
|
-
import { ExtrusionProfile } from '../operations/
|
|
2
|
+
import { ExtrusionProfile } from '../operations/extrudeUtils.js';
|
|
3
3
|
import { AnyShape } from '../core/shapeTypes.js';
|
|
4
4
|
import { default as CompoundSketch } from './CompoundSketch.js';
|
|
5
5
|
import { default as Sketch } from './Sketch.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sketches.d.ts","sourceRoot":"","sources":["../../src/sketching/Sketches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Sketches.d.ts","sourceRoot":"","sources":["../../src/sketching/Sketches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,QAAQ;IAC3B,QAAQ,EAAE,KAAK,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC;gBAE7B,QAAQ,EAAE,KAAK,CAAC,MAAM,GAAG,cAAc,CAAC;IAIpD,8DAA8D;IAC9D,KAAK,IAAI,QAAQ;IAKjB,qEAAqE;IACrE,KAAK,IAAI,QAAQ;IAKjB;;;;;;;;;OASG;IACH,OAAO,CACL,iBAAiB,EAAE,MAAM,EACzB,eAAe,GAAE;QACf,kBAAkB,CAAC,EAAE,UAAU,CAAC;QAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;QACpC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,UAAU,CAAC;KAChB,GACL,QAAQ;IAMX;;;OAGG;IACH,OAAO,CAAC,cAAc,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,UAAU,CAAA;KAAE,GAAG,QAAQ;CAGjF"}
|
package/dist/sketching/draw.d.ts
CHANGED
|
@@ -7,9 +7,7 @@ import { BaseSketcher2d } from './Sketcher2d.js';
|
|
|
7
7
|
import { SketchInterface } from './sketchLib.js';
|
|
8
8
|
import { default as Sketches } from './Sketches.js';
|
|
9
9
|
import { GenericSketcher } from './sketcherlib.js';
|
|
10
|
-
import {
|
|
11
|
-
import { Camera } from '../projection/cameraFns.js';
|
|
12
|
-
import { Offset2DConfig } from '../2d/blueprints/offset.js';
|
|
10
|
+
import { Offset2DConfig } from '../2d/blueprints/blueprintOffset.js';
|
|
13
11
|
import { CornerFinderFn } from '../query/finderFns.js';
|
|
14
12
|
import { BSplineApproximationOptions } from '../topology/shapeHelpers.js';
|
|
15
13
|
import { SingleFace } from '../query/helpers.js';
|
|
@@ -242,21 +240,4 @@ export declare const drawParametricFunction: (func: (t: number) => Point2D, { po
|
|
|
242
240
|
stop?: number | undefined;
|
|
243
241
|
closeShape?: boolean | undefined;
|
|
244
242
|
}, approximationConfig?: BSplineApproximationOptions) => Drawing;
|
|
245
|
-
/**
|
|
246
|
-
* Creates the `Drawing` of a projection of a shape on a plane.
|
|
247
|
-
*
|
|
248
|
-
* The projection is done by projecting the edges of the shape on the plane.
|
|
249
|
-
*
|
|
250
|
-
* @category Drawing
|
|
251
|
-
*/
|
|
252
|
-
export declare function drawProjection(shape: AnyShape, projectionCamera?: ProjectionPlane | Camera): {
|
|
253
|
-
visible: Drawing;
|
|
254
|
-
hidden: Drawing;
|
|
255
|
-
};
|
|
256
|
-
/**
|
|
257
|
-
* Creates the `Drawing` out of a face
|
|
258
|
-
*
|
|
259
|
-
* @category Drawing
|
|
260
|
-
*/
|
|
261
|
-
export declare function drawFaceOutline(face: Face): Drawing;
|
|
262
243
|
//# sourceMappingURL=draw.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draw.d.ts","sourceRoot":"","sources":["../../src/sketching/draw.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"draw.d.ts","sourceRoot":"","sources":["../../src/sketching/draw.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EACL,aAAa,EAMb,KAAK,OAAO,EAEb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,SAAS,EAMT,KAAK,SAAS,EACd,KAAK,OAAO,EAGb,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIxD,OAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE1E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAoBtD;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAU;gBAEzB,UA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,EAAE,UAAsB,EAAE;;;;;CAAK,GACrE,OAAO,CAET;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAClC,QAAQ,OAAO,EAAE,EACjB,sBAAqB,2BAAgC,EACrD,UAAS;IACP,UAAU,CAAC,EAAE,OAAO,CAAC;CACjB,KACL,OAeF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,EAC5B;;;;;CAAmE,EACnE,sBAAqB,2BAAgC,KACpD,OAOF,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AnyShape, Face } from '../core/shapeTypes.js';
|
|
2
|
+
import { ProjectionPlane } from '../projection/projectionPlanes.js';
|
|
3
|
+
import { Camera } from '../projection/cameraFns.js';
|
|
4
|
+
import { Drawing } from './draw.js';
|
|
5
|
+
/**
|
|
6
|
+
* Creates the `Drawing` of a projection of a shape on a plane.
|
|
7
|
+
*
|
|
8
|
+
* The projection is done by projecting the edges of the shape on the plane.
|
|
9
|
+
*
|
|
10
|
+
* @category Drawing
|
|
11
|
+
*/
|
|
12
|
+
export declare function drawProjection(shape: AnyShape, projectionCamera?: ProjectionPlane | Camera): {
|
|
13
|
+
visible: Drawing;
|
|
14
|
+
hidden: Drawing;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Creates the `Drawing` out of a face
|
|
18
|
+
*
|
|
19
|
+
* @category Drawing
|
|
20
|
+
*/
|
|
21
|
+
export declare function drawFaceOutline(face: Face): Drawing;
|
|
22
|
+
//# sourceMappingURL=draw3d.d.ts.map
|