brepjs 18.82.4 → 18.82.6

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 (84) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{blueprint-BBUOweQy.cjs → blueprint-C2gkyxYc.cjs} +7 -7
  4. package/dist/{blueprint-DjzevNhB.js → blueprint-yJsyEFn_.js} +7 -7
  5. package/dist/{blueprintFns-CRES_5vP.cjs → blueprintFns-CL4VZzCL.cjs} +2 -2
  6. package/dist/{blueprintFns-CxSMnMfl.js → blueprintFns-DjpRmsbi.js} +2 -2
  7. package/dist/{blueprintSketcher-CFa32JZU.cjs → blueprintSketcher-BLXntEIS.cjs} +140 -86
  8. package/dist/{blueprintSketcher-CIydRzRr.js → blueprintSketcher-BbYPEPMa.js} +140 -86
  9. package/dist/{boolean2D-Z0KE98a4.cjs → boolean2D-BbvyYF-v.cjs} +4 -4
  10. package/dist/{boolean2D-BRWPIJhe.js → boolean2D-C3k4iO92.js} +4 -4
  11. package/dist/brepjs.cjs +50 -50
  12. package/dist/brepjs.js +25 -25
  13. package/dist/{cameraFns-B3Wb4Br9.js → cameraFns-BiQGAnPd.js} +2 -2
  14. package/dist/{cameraFns-Drgka78Q.cjs → cameraFns-BkSHm_Vo.cjs} +2 -2
  15. package/dist/core.cjs +1 -1
  16. package/dist/core.js +1 -1
  17. package/dist/{cornerFinder-BRYZAgdE.js → cornerFinder-C9zvdkpK.js} +1 -1
  18. package/dist/{cornerFinder-BuYpqGO8.cjs → cornerFinder-D3lGL_Td.cjs} +1 -1
  19. package/dist/{curveFns-XSz4F9j3.js → curveFns-B4_om-yp.js} +1 -1
  20. package/dist/{curveFns-BA5zsoce.cjs → curveFns-Dlbfncal.cjs} +1 -1
  21. package/dist/{drawFns-DrlxFhe4.js → drawFns-DaTn2p7M.js} +12 -12
  22. package/dist/{drawFns-CmSMHb12.cjs → drawFns-lls9IuPY.cjs} +12 -12
  23. package/dist/{faceFns-BO8IXhhf.js → faceFns-4JEna8n9.js} +2 -2
  24. package/dist/{faceFns-6AarivqH.cjs → faceFns-Obtamglc.cjs} +2 -2
  25. package/dist/{healingFns-MxlhdTIc.cjs → healingFns-gHxvhsbJ.cjs} +9 -9
  26. package/dist/{healingFns-Ct_-O3yk.js → healingFns-uXLI1vJ7.js} +5 -5
  27. package/dist/{helpers-CTc8ZbY8.js → helpers-CJV31xig.js} +6 -6
  28. package/dist/{helpers-DN6s-TLC.cjs → helpers-rAK5qEBu.cjs} +6 -6
  29. package/dist/{importFns-Cb-cmpGG.cjs → importFns-BJVEly-l.cjs} +2 -2
  30. package/dist/{importFns-D4Xet5aD.js → importFns-Dcc2KviL.js} +2 -2
  31. package/dist/io.cjs +2 -2
  32. package/dist/io.js +2 -2
  33. package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +10 -6
  34. package/dist/kernel/occtWasm/kernel2dOps.d.ts +8 -1
  35. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  36. package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +1 -1
  37. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  38. package/dist/{loftFns-DxhcdpAu.cjs → loftFns-BAM49XJy.cjs} +1 -1
  39. package/dist/{loftFns-BVbzy6gm.js → loftFns-DF3KNz9-.js} +1 -1
  40. package/dist/{measureFns-BNHvjShh.cjs → measureFns-Ym_I522s.cjs} +3 -3
  41. package/dist/{measureFns-7Nz5JklM.js → measureFns-xpevHRLG.js} +3 -3
  42. package/dist/measurement.cjs +1 -1
  43. package/dist/measurement.js +1 -1
  44. package/dist/{meshFns-YXFipjjx.cjs → meshFns-DDhKhVK0.cjs} +3 -3
  45. package/dist/{meshFns-CWwOpBlM.js → meshFns-soCHj3jp.js} +3 -3
  46. package/dist/{occtWasmAdapter-BMV179Ji.js → occtWasmAdapter-BK6h0nKd.js} +29 -5
  47. package/dist/{occtWasmAdapter-5hzzhkME.cjs → occtWasmAdapter-Bfz5Zfmk.cjs} +29 -5
  48. package/dist/operations.cjs +2 -2
  49. package/dist/operations.js +2 -2
  50. package/dist/primitiveFns-BmUIWDC7.js +300 -0
  51. package/dist/primitiveFns-SEyCwNra.cjs +461 -0
  52. package/dist/projection.cjs +1 -1
  53. package/dist/projection.js +1 -1
  54. package/dist/query.cjs +2 -2
  55. package/dist/query.js +2 -2
  56. package/dist/{shapeFns-B6UAiYAx.js → shapeFns-B8REDWBf.js} +2 -2
  57. package/dist/{shapeFns-sF0x5Zhj.cjs → shapeFns-CE6c_4D4.cjs} +2 -2
  58. package/dist/shapeRef.cjs +1 -1
  59. package/dist/shapeRef.js +1 -1
  60. package/dist/{shapeRefFns-Bb0aQZWz.cjs → shapeRefFns-C3tglb5A.cjs} +4 -4
  61. package/dist/{shapeRefFns-NdQvPa5J.js → shapeRefFns-O5h8bOr9.js} +4 -4
  62. package/dist/{shapeTypes-D4Evnmz_.js → shapeTypes-B8d_6R0X.js} +9 -6
  63. package/dist/{shapeTypes-D1eUDuzl.cjs → shapeTypes-nFeOa7gQ.cjs} +9 -6
  64. package/dist/sketching.cjs +3 -3
  65. package/dist/sketching.js +3 -3
  66. package/dist/{primitiveFns-CjL5bygY.js → solidBuilders-BSnsqitN.js} +100 -257
  67. package/dist/{primitiveFns-LWkd7M2f.cjs → solidBuilders-DfGIPlQ2.cjs} +124 -383
  68. package/dist/{surfaceBuilders-R4DKNFkI.cjs → surfaceBuilders-CDX6sDZz.cjs} +2 -2
  69. package/dist/{surfaceBuilders-CLMyFimy.js → surfaceBuilders-D5sQZ6ah.js} +2 -2
  70. package/dist/text.cjs +2 -2
  71. package/dist/text.js +2 -2
  72. package/dist/{textBlueprints-BjSwFtO2.cjs → textBlueprints-BwRqV98S.cjs} +31 -48
  73. package/dist/{textBlueprints-BJ22J1c2.js → textBlueprints-Cqu-mcRD.js} +32 -49
  74. package/dist/{textMetrics-BrSfzuY6.js → textMetrics-Cikow3vH.js} +1 -1
  75. package/dist/{textMetrics-5DyMA99n.cjs → textMetrics-DpCTYcE2.cjs} +1 -1
  76. package/dist/{threadFns-DqMbjyxZ.js → threadFns-BQHEnI7a.js} +6 -5
  77. package/dist/{threadFns-CX9l8sRv.cjs → threadFns-BzFhh87N.cjs} +8 -7
  78. package/dist/topology.cjs +10 -9
  79. package/dist/topology.js +8 -7
  80. package/dist/{topologyQueryFns-5EeBz6_7.js → topologyQueryFns-BcGLEMvc.js} +1 -1
  81. package/dist/{topologyQueryFns-Nnu56Ke2.cjs → topologyQueryFns-Bhey0q1G.cjs} +1 -1
  82. package/package.json +16 -16
  83. package/dist/solidBuilders-CgPOdC3Q.js +0 -140
  84. package/dist/solidBuilders-mxHbGDW6.cjs +0 -199
@@ -1,199 +0,0 @@
1
- const require_shapeTypes = require("./shapeTypes-D1eUDuzl.cjs");
2
- const require_errors = require("./errors-CXJtc4I7.cjs");
3
- const require_faceFns = require("./faceFns-6AarivqH.cjs");
4
- //#region src/topology/shapeUtils.ts
5
- /**
6
- * Shape assembly utilities — welding and sewing operations.
7
- */
8
- /** Sew faces/shells into a single shape using the kernel's sewing algorithm. */
9
- function weldShapes(facesOrShells) {
10
- return require_errors.unwrap(require_faceFns.cast(require_errors.unwrap(require_faceFns.downcast(require_shapeTypes.getKernel().sew(facesOrShells.map((s) => s.wrapped))))));
11
- }
12
- /**
13
- * Welds faces and shells into a single shell.
14
- *
15
- * @param facesOrShells - An array of faces and shells to be welded.
16
- * @param ignoreType - If true, the function will not check if the result is a shell.
17
- * @returns A shell that contains all the faces and shells.
18
- */
19
- function weldShellsAndFaces(facesOrShells, ignoreType = false) {
20
- const shell = weldShapes(facesOrShells);
21
- if (!ignoreType && !require_shapeTypes.isShell(shell)) return require_errors.err(require_errors.typeCastError("WELD_NOT_SHELL", "Could not make a shell from faces and shells"));
22
- return require_errors.ok(shell);
23
- }
24
- //#endregion
25
- //#region src/topology/solidBuilders.ts
26
- /**
27
- * Solid and primitive construction helpers — boxes, cylinders, spheres, cones,
28
- * tori, ellipsoids, vertices, compounds, and offsets.
29
- */
30
- /**
31
- * Creates a cylinder with the given radius and height.
32
- *
33
- * @category Solids
34
- */
35
- function makeCylinder(radius, height, location = [
36
- 0,
37
- 0,
38
- 0
39
- ], direction = [
40
- 0,
41
- 0,
42
- 1
43
- ]) {
44
- return require_shapeTypes.createSolid(require_shapeTypes.getKernel().makeCylinder(radius, height, [...location], [...direction]));
45
- }
46
- /**
47
- * Creates a sphere with the given radius.
48
- *
49
- * @category Solids
50
- */
51
- function makeSphere(radius) {
52
- return require_shapeTypes.createSolid(require_shapeTypes.getKernel().makeSphere(radius));
53
- }
54
- /**
55
- * Creates a cone (or frustum) with the given radii and height.
56
- *
57
- * @category Solids
58
- */
59
- function makeCone(radius1, radius2, height, location = [
60
- 0,
61
- 0,
62
- 0
63
- ], direction = [
64
- 0,
65
- 0,
66
- 1
67
- ]) {
68
- return require_shapeTypes.createSolid(require_shapeTypes.getKernel().makeCone(radius1, radius2, height, [...location], [...direction]));
69
- }
70
- /**
71
- * Creates a torus with the given major and minor radii.
72
- *
73
- * @category Solids
74
- */
75
- function makeTorus(majorRadius, minorRadius, location = [
76
- 0,
77
- 0,
78
- 0
79
- ], direction = [
80
- 0,
81
- 0,
82
- 1
83
- ]) {
84
- return require_shapeTypes.createSolid(require_shapeTypes.getKernel().makeTorus(majorRadius, minorRadius, [...location], [...direction]));
85
- }
86
- /**
87
- * Creates an ellipsoid with the given axis lengths.
88
- *
89
- * The algorithm creates a unit BSpline sphere surface, transforms its
90
- * control-point poles with an affinity matrix to match the requested
91
- * axis half-lengths, then sews the result into a solid.
92
- *
93
- * @category Solids
94
- */
95
- function makeEllipsoid(aLength, bLength, cLength) {
96
- return require_shapeTypes.createSolid(require_shapeTypes.getKernel().makeEllipsoid(aLength, bLength, cLength));
97
- }
98
- /** Create a vertex at a 3D point. */
99
- function makeVertex(point) {
100
- return require_shapeTypes.createVertex(require_shapeTypes.getKernel().makeVertex(point[0], point[1], point[2]));
101
- }
102
- /**
103
- * Create an offset shape from a face.
104
- *
105
- * @param offset - Signed offset distance (positive = outward).
106
- * @param tolerance - Geometric tolerance for the offset algorithm.
107
- * @returns An error if the result is not a valid 3D shape.
108
- */
109
- function makeOffset(face, offset, tolerance = 1e-6) {
110
- return require_errors.andThen(require_faceFns.downcast(require_shapeTypes.getKernel().offset(face.wrapped, offset, tolerance)), (downcasted) => require_errors.andThen(require_faceFns.cast(downcasted), (newShape) => {
111
- if (!require_shapeTypes.isShape3D(newShape)) return require_errors.err(require_errors.typeCastError("OFFSET_NOT_3D", "Could not offset to a 3d shape"));
112
- return require_errors.ok(newShape);
113
- }));
114
- }
115
- /**
116
- * Build a compound from multiple shapes.
117
- *
118
- * @param shapeArray - Shapes to group into a single compound.
119
- * @returns A new Compound containing all input shapes.
120
- */
121
- function makeCompound(shapeArray) {
122
- return require_shapeTypes.createCompound(require_shapeTypes.getKernel().makeCompound(shapeArray.map((s) => s.wrapped)));
123
- }
124
- /**
125
- * Welds faces and shells into a single shell and then makes a solid.
126
- *
127
- * @param facesOrShells - An array of faces and shells to be welded.
128
- * @returns A solid that contains all the faces and shells.
129
- *
130
- * @category Solids
131
- */
132
- function makeSolid(facesOrShells) {
133
- const shell = weldShapes(facesOrShells);
134
- return require_errors.andThen(require_faceFns.cast(require_shapeTypes.getKernel().solidFromShell(shell.wrapped)), (solid) => {
135
- if (!require_shapeTypes.isSolid(solid)) return require_errors.err(require_errors.typeCastError("SOLID_BUILD_FAILED", "Could not make a solid of faces and shells"));
136
- return require_errors.ok(solid);
137
- });
138
- }
139
- //#endregion
140
- Object.defineProperty(exports, "makeCompound", {
141
- enumerable: true,
142
- get: function() {
143
- return makeCompound;
144
- }
145
- });
146
- Object.defineProperty(exports, "makeCone", {
147
- enumerable: true,
148
- get: function() {
149
- return makeCone;
150
- }
151
- });
152
- Object.defineProperty(exports, "makeCylinder", {
153
- enumerable: true,
154
- get: function() {
155
- return makeCylinder;
156
- }
157
- });
158
- Object.defineProperty(exports, "makeEllipsoid", {
159
- enumerable: true,
160
- get: function() {
161
- return makeEllipsoid;
162
- }
163
- });
164
- Object.defineProperty(exports, "makeOffset", {
165
- enumerable: true,
166
- get: function() {
167
- return makeOffset;
168
- }
169
- });
170
- Object.defineProperty(exports, "makeSolid", {
171
- enumerable: true,
172
- get: function() {
173
- return makeSolid;
174
- }
175
- });
176
- Object.defineProperty(exports, "makeSphere", {
177
- enumerable: true,
178
- get: function() {
179
- return makeSphere;
180
- }
181
- });
182
- Object.defineProperty(exports, "makeTorus", {
183
- enumerable: true,
184
- get: function() {
185
- return makeTorus;
186
- }
187
- });
188
- Object.defineProperty(exports, "makeVertex", {
189
- enumerable: true,
190
- get: function() {
191
- return makeVertex;
192
- }
193
- });
194
- Object.defineProperty(exports, "weldShellsAndFaces", {
195
- enumerable: true,
196
- get: function() {
197
- return weldShellsAndFaces;
198
- }
199
- });