brepjs 20.12.7 → 20.12.8

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.
Files changed (94) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-mMmTBUBY.cjs → adjacencyFns-BfgFo-Rh.cjs} +3 -3
  4. package/dist/{adjacencyFns-hMihivxC.js → adjacencyFns-Bl109A3Z.js} +3 -3
  5. package/dist/{blueprint-17RUHsoP.cjs → blueprint-DTDSztfd.cjs} +5 -5
  6. package/dist/{blueprint-BS50D3J_.js → blueprint-RqemOtg5.js} +5 -5
  7. package/dist/{blueprintFns-zy5lo2IF.js → blueprintFns-B9_PhTr8.js} +2 -2
  8. package/dist/{blueprintFns-Dw5_4_Bk.cjs → blueprintFns-C7E5R89N.cjs} +2 -2
  9. package/dist/{blueprintSketcher-C1WCI6E0.js → blueprintSketcher-B15522Kr.js} +3 -3
  10. package/dist/{blueprintSketcher-BG--DxWB.cjs → blueprintSketcher-Brj4lXjj.cjs} +3 -3
  11. package/dist/{boolean2D-7SQ3B0pC.cjs → boolean2D-DZ8aJbI-.cjs} +4 -4
  12. package/dist/{boolean2D-CsdyfjFE.js → boolean2D-_eiIiNw1.js} +4 -4
  13. package/dist/{solidBuilders-DdG4NPHM.cjs → booleanFns-D5nQ1nWS.cjs} +11 -217
  14. package/dist/{solidBuilders-Bmr59cGp.js → booleanFns-cNfXGqMX.js} +10 -156
  15. package/dist/brepjs.cjs +325 -168
  16. package/dist/brepjs.js +282 -125
  17. package/dist/{cameraFns-BAtzhCYM.cjs → cameraFns-6Er2lhp5.cjs} +3 -3
  18. package/dist/{cameraFns-BVWyAscu.js → cameraFns-YhB7A_Zc.js} +3 -3
  19. package/dist/core.cjs +2 -2
  20. package/dist/core.js +2 -2
  21. package/dist/{cornerFinder-e4Wc7_yp.cjs → cornerFinder-D9Wx3DWu.cjs} +1 -1
  22. package/dist/{cornerFinder-Dv_2rmaY.js → cornerFinder-G1WkSkVl.js} +1 -1
  23. package/dist/{curveFns-BAM7QHrP.cjs → curveFns-B5_N-gMj.cjs} +1 -1
  24. package/dist/{curveFns-CEI-rouh.js → curveFns-C4CqthJp.js} +1 -1
  25. package/dist/{drawFns-Cl1i8B_B.js → drawFns-DU5fewKl.js} +12 -12
  26. package/dist/{drawFns-d-RvC6u6.cjs → drawFns-UPbO2heB.cjs} +12 -12
  27. package/dist/{faceFns-Q87HCJrp.js → faceFns-BgRNa5vx.js} +2 -2
  28. package/dist/{faceFns-C-2ttg8X.cjs → faceFns-C4NOGZBg.cjs} +2 -2
  29. package/dist/{healingFns-Cm4NkKD8.js → healingFns-BzOo0yyz.js} +5 -5
  30. package/dist/{healingFns-DZkO5okn.cjs → healingFns-i5gV3BMG.cjs} +29 -29
  31. package/dist/{helpers-BdGGaLhF.cjs → helpers-DJQeDf_5.cjs} +6 -6
  32. package/dist/{helpers-DpGcM2qZ.js → helpers-DPHQt2Kr.js} +6 -6
  33. package/dist/{importFns-DLiP26NW.cjs → importFns-BiRpt227.cjs} +319 -14
  34. package/dist/{importFns-Bp-p0jiP.js → importFns-CwrJsNvg.js} +314 -15
  35. package/dist/io/igesSupport.d.ts +6 -0
  36. package/dist/io/importFns.d.ts +15 -5
  37. package/dist/io/ioUtils.d.ts +15 -3
  38. package/dist/io/meshNesting.d.ts +11 -0
  39. package/dist/io/threemfImportFns.d.ts +6 -3
  40. package/dist/io.cjs +2 -2
  41. package/dist/io.js +2 -2
  42. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  43. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  44. package/dist/kernel/occtWasm/occtWasmTypes.d.ts +4 -2
  45. package/dist/{loftFns-DGV1z2NJ.cjs → loftFns-DgkK4Kj_.cjs} +1 -1
  46. package/dist/{loftFns-DQ7Z29n3.js → loftFns-lwzTh1fI.js} +1 -1
  47. package/dist/{measureFns-BdSjw5fr.cjs → measureFns-D_RRjCZg.cjs} +3 -3
  48. package/dist/{measureFns-BrdCH4cH.js → measureFns-Q3K25IfN.js} +3 -3
  49. package/dist/measurement.cjs +2 -2
  50. package/dist/measurement.js +2 -2
  51. package/dist/{meshFns-UE8tByyw.js → meshFns-BGoJU6_P.js} +20 -6
  52. package/dist/{meshFns-BeubBqEI.cjs → meshFns-Djbb4PUC.cjs} +25 -5
  53. package/dist/{occtWasmAdapter-DA7oMgcQ.js → occtWasmAdapter-BCCwaYkq.js} +7 -5
  54. package/dist/{occtWasmAdapter-D3qerQTq.cjs → occtWasmAdapter-UcYZRi-w.cjs} +7 -5
  55. package/dist/operations.cjs +2 -2
  56. package/dist/operations.js +2 -2
  57. package/dist/{primitiveFns-CLGVLwG8.cjs → primitiveFns-CfSnex9P.cjs} +19 -18
  58. package/dist/{primitiveFns-3-gs-FUX.js → primitiveFns-D-aYcwt2.js} +5 -4
  59. package/dist/{principalBoxFns-RMZItjfR.js → principalBoxFns-Dcp9gg5e.js} +3 -3
  60. package/dist/{principalBoxFns-CiXzjOkr.cjs → principalBoxFns-IY8FfPVj.cjs} +3 -3
  61. package/dist/projection.cjs +1 -1
  62. package/dist/projection.js +1 -1
  63. package/dist/query.cjs +2 -2
  64. package/dist/query.js +2 -2
  65. package/dist/{refResolveFns-kJg2iCad.js → refResolveFns-BPge7T5w.js} +6 -6
  66. package/dist/{refResolveFns-DNX0bCrP.cjs → refResolveFns-gZQ1o5XK.cjs} +6 -6
  67. package/dist/{shapeFns-SgIrOjN4.cjs → shapeFns-Bs92VrZh.cjs} +2 -2
  68. package/dist/{shapeFns-CZ6VF1yd.js → shapeFns-TWdr4Dv4.js} +2 -2
  69. package/dist/shapeRef.cjs +1 -1
  70. package/dist/shapeRef.js +1 -1
  71. package/dist/{shapeTypes-BNGu103j.js → shapeTypes-CIH-8d_a.js} +1 -1
  72. package/dist/{shapeTypes-MUEH4XuH.cjs → shapeTypes-DmThK_oa.cjs} +1 -1
  73. package/dist/sketching.cjs +3 -3
  74. package/dist/sketching.js +3 -3
  75. package/dist/{originTrackingFns-rEKOAP65.cjs → solidBuilders-DGskMugU.cjs} +209 -2
  76. package/dist/{originTrackingFns-c2qgRZ_9.js → solidBuilders-q_hwYsdo.js} +150 -3
  77. package/dist/{surfaceBuilders-DI376ai0.js → surfaceBuilders-DXo4N7wQ.js} +3 -3
  78. package/dist/{surfaceBuilders-DOmDVuMs.cjs → surfaceBuilders-DeSLKg73.cjs} +3 -3
  79. package/dist/text.cjs +2 -2
  80. package/dist/text.js +2 -2
  81. package/dist/{textBlueprints-CE0oxB43.js → textBlueprints-BYWZho_c.js} +8 -7
  82. package/dist/{textBlueprints-B7Vhr0xu.cjs → textBlueprints-Dz6wNgve.cjs} +9 -8
  83. package/dist/{textMetrics-C6_kSht6.cjs → textMetrics-bKoFTj3m.cjs} +1 -1
  84. package/dist/{textMetrics-_VGqdewQ.js → textMetrics-k_rGqib2.js} +1 -1
  85. package/dist/{threadFns-CHdY-4Cz.js → threadFns-BeB8s0tA.js} +7 -7
  86. package/dist/{threadFns-1H60LrFX.cjs → threadFns-CoGAFHHt.cjs} +9 -9
  87. package/dist/topology/meshFns.d.ts +3 -0
  88. package/dist/topology.cjs +11 -11
  89. package/dist/topology.js +9 -9
  90. package/dist/{topologyQueryFns-C_fXO6xL.cjs → topologyQueryFns-CXbCFaU2.cjs} +1 -1
  91. package/dist/{topologyQueryFns-CltEv7Pi.js → topologyQueryFns-Cp0yekBh.js} +1 -1
  92. package/dist/{validityTypes-GanLrmvY.js → validityTypes-DlrWkrSR.js} +1 -1
  93. package/dist/{validityTypes-CGX2ES81.cjs → validityTypes-m6eLRTYE.cjs} +1 -1
  94. package/package.json +1 -1
@@ -1,14 +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-BNGu103j.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-BTccWbtE.js";
3
- import { C as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-CltEv7Pi.js";
1
+ import { D as getShapeKind, E as GeometryCleanupError, G as _usingCtx, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-CIH-8d_a.js";
2
+ import { E as ok, P as unwrap, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode } from "./errors-BTccWbtE.js";
3
+ import { C as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-Cp0yekBh.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
5
  import { a as vecDot, g as vecSub, h as vecScale, t as vecAdd } from "./vecOps-S-m9H_fe.js";
6
6
  import { o as resolvePlane } from "./planeOps-D3yDuMux.js";
7
- import { _ as cast, y as downcast } from "./faceFns-Q87HCJrp.js";
8
- import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-c2qgRZ_9.js";
7
+ import { d as getFaceOrigins, f as propagateOriginsByHash, p as propagateOriginsFromEvolution } from "./solidBuilders-q_hwYsdo.js";
9
8
  import { n as hasFaceRoles, r as propagateFaceRolesFromEvolution } from "./faceRoleFns-BPxzQF-n.js";
10
9
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
11
- import { r as makeFace } from "./surfaceBuilders-DI376ai0.js";
10
+ import { r as makeFace } from "./surfaceBuilders-DXo4N7wQ.js";
12
11
  // src/topology/metadata/faceTagFns.ts
13
12
  var shapeTagStore = /* @__PURE__ */ new WeakMap();
14
13
  var tagMetadataStore = /* @__PURE__ */ new WeakMap();
@@ -293,10 +292,10 @@ function propagateMetadataByHash(inputs, result) {
293
292
  */
294
293
  function propagateMetadataThroughRelocation(source, moved) {
295
294
  try {
296
- var _usingCtx$2 = _usingCtx();
295
+ var _usingCtx$1 = _usingCtx();
297
296
  const kernel = getKernel();
298
297
  const faces = [];
299
- _usingCtx$2.u({ [Symbol.dispose]() {
298
+ _usingCtx$1.u({ [Symbol.dispose]() {
300
299
  const failures = [];
301
300
  for (const face of faces) try {
302
301
  kernel.dispose(face);
@@ -333,9 +332,9 @@ function propagateMetadataThroughRelocation(source, moved) {
333
332
  deleted: /* @__PURE__ */ new Set()
334
333
  }, [source], moved);
335
334
  } catch (_) {
336
- _usingCtx$2.e = _;
335
+ _usingCtx$1.e = _;
337
336
  } finally {
338
- _usingCtx$2.d();
337
+ _usingCtx$1.d();
339
338
  }
340
339
  }
341
340
  // src/topology/booleanFns.ts
@@ -863,149 +862,4 @@ function booleanPipelineFallback(base, steps, options) {
863
862
  }
864
863
  return ok(current);
865
864
  }
866
- // src/topology/shapeUtils.ts
867
- /**
868
- * Shape assembly utilities — welding and sewing operations.
869
- */
870
- /** Sew faces/shells into a single shape using the kernel's sewing algorithm. */
871
- function weldShapes(facesOrShells) {
872
- const sewn = getKernel().sew(facesOrShells.map((s) => s.wrapped));
873
- return castResultShape(sewn);
874
- }
875
- /**
876
- * Welds faces and shells into a single shell.
877
- *
878
- * @param facesOrShells - An array of faces and shells to be welded.
879
- * @param ignoreType - If true, the function will not check if the result is a shell.
880
- * @returns A shell that contains all the faces and shells.
881
- */
882
- function weldShellsAndFaces(facesOrShells, ignoreType = false) {
883
- const shell = weldShapes(facesOrShells);
884
- if (!ignoreType && !isShell(shell)) return err(typeCastError("WELD_NOT_SHELL", "Could not make a shell from faces and shells"));
885
- return ok(shell);
886
- }
887
- // src/topology/solidBuilders.ts
888
- /**
889
- * Solid and primitive construction helpers — boxes, cylinders, spheres, cones,
890
- * tori, ellipsoids, vertices, compounds, and offsets.
891
- */
892
- /**
893
- * Creates a cylinder with the given radius and height.
894
- *
895
- * @category Solids
896
- */
897
- function makeCylinder(radius, height, location = [
898
- 0,
899
- 0,
900
- 0
901
- ], direction = [
902
- 0,
903
- 0,
904
- 1
905
- ]) {
906
- return createSolid(getKernel().makeCylinder(radius, height, [...location], [...direction]));
907
- }
908
- /**
909
- * Creates a sphere with the given radius.
910
- *
911
- * @category Solids
912
- */
913
- function makeSphere(radius) {
914
- return createSolid(getKernel().makeSphere(radius));
915
- }
916
- /**
917
- * Creates a cone (or frustum) with the given radii and height.
918
- *
919
- * @category Solids
920
- */
921
- function makeCone(radius1, radius2, height, location = [
922
- 0,
923
- 0,
924
- 0
925
- ], direction = [
926
- 0,
927
- 0,
928
- 1
929
- ]) {
930
- return createSolid(getKernel().makeCone(radius1, radius2, height, [...location], [...direction]));
931
- }
932
- /**
933
- * Creates a torus with the given major and minor radii.
934
- *
935
- * @category Solids
936
- */
937
- function makeTorus(majorRadius, minorRadius, location = [
938
- 0,
939
- 0,
940
- 0
941
- ], direction = [
942
- 0,
943
- 0,
944
- 1
945
- ]) {
946
- return createSolid(getKernel().makeTorus(majorRadius, minorRadius, [...location], [...direction]));
947
- }
948
- /**
949
- * Creates an ellipsoid with the given axis lengths.
950
- *
951
- * The algorithm creates a unit BSpline sphere surface, transforms its
952
- * control-point poles with an affinity matrix to match the requested
953
- * axis half-lengths, then sews the result into a solid.
954
- *
955
- * @category Solids
956
- */
957
- function makeEllipsoid(aLength, bLength, cLength) {
958
- return createSolid(getKernel().makeEllipsoid(aLength, bLength, cLength));
959
- }
960
- /** Create a vertex at a 3D point. */
961
- function makeVertex(point) {
962
- return createVertex(getKernel().makeVertex(point[0], point[1], point[2]));
963
- }
964
- /**
965
- * Create an offset shape from a face.
966
- *
967
- * @param offset - Signed offset distance (positive = outward).
968
- * @param tolerance - Geometric tolerance for the offset algorithm.
969
- * @returns An error if the result is not a valid 3D shape.
970
- */
971
- function makeOffset(face, offset, tolerance = 1e-6) {
972
- const resultShape = getKernel().offset(face.wrapped, offset, tolerance);
973
- return andThen(downcast(resultShape), (downcasted) => andThen(cast(downcasted), (newShape) => {
974
- if (!isShape3D(newShape)) return err(typeCastError("OFFSET_NOT_3D", "Could not offset to a 3d shape"));
975
- return ok(newShape);
976
- }));
977
- }
978
- /**
979
- * Build a compound from multiple shapes.
980
- *
981
- * @param shapeArray - Shapes to group into a single compound.
982
- * @returns A new Compound containing all input shapes.
983
- */
984
- function makeCompound(shapeArray) {
985
- return createCompound(getKernel().makeCompound(shapeArray.map((s) => s.wrapped)));
986
- }
987
- /**
988
- * Welds faces and shells into a single shell and then makes a solid.
989
- *
990
- * @param facesOrShells - An array of faces and shells to be welded.
991
- * @returns A solid that contains all the faces and shells.
992
- *
993
- * @category Solids
994
- */
995
- function makeSolid(facesOrShells) {
996
- try {
997
- var _usingCtx$1 = _usingCtx();
998
- const shell = _usingCtx$1.u(weldShapes(facesOrShells));
999
- const solid = castResultShape(getKernel().solidFromShell(shell.wrapped));
1000
- if (!isSolid(solid)) {
1001
- disposeResultShape(solid);
1002
- return err(typeCastError("SOLID_BUILD_FAILED", "Could not make a solid of faces and shells"));
1003
- }
1004
- return ok(solid);
1005
- } catch (_) {
1006
- _usingCtx$1.e = _;
1007
- } finally {
1008
- _usingCtx$1.d();
1009
- }
1010
- }
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 };
865
+ export { getTagMetadata as C, getFaceTags as S, tagFaces as T, colorShape as _, fuseAll as a, parseColor as b, sectionToFace as c, collectInputFaceHashes as d, hasAnyMetadata as f, colorFaces as g, propagateMetadataThroughRelocation as h, fuse as i, slice as l, propagateMetadataByHash as m, cut as n, intersect as o, propagateAllMetadata as p, cutAll as r, section as s, booleanPipeline as t, split as u, getFaceColor as v, setTagMetadata as w, findFacesByTag as x, getShapeColor as y };