brepjs 18.34.0 → 18.35.1
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 +7 -7
- package/dist/2d.js +7 -7
- package/dist/{blueprint-Ctq3YI2J.cjs → blueprint-BF0DcVwE.cjs} +7 -7
- package/dist/{blueprint-Dgn4HasF.js → blueprint-KwH2JNPU.js} +7 -7
- package/dist/{blueprintFns-BSc5kM0e.cjs → blueprintFns-CbPsMijw.cjs} +3 -3
- package/dist/{blueprintFns-CJ8_2wwd.js → blueprintFns-X7jVGGUE.js} +3 -3
- package/dist/{blueprintSketcher-DfN5LL45.js → blueprintSketcher-BwFpbp0B.js} +4 -4
- package/dist/{blueprintSketcher-DHzyZSgL.cjs → blueprintSketcher-m18T1U1T.cjs} +4 -4
- package/dist/{boolean2D-DRlzu7K9.cjs → boolean2D-BzlbvCIH.cjs} +5 -5
- package/dist/{boolean2D-BDVlp701.js → boolean2D-DAq015PP.js} +5 -5
- package/dist/{booleanFns-BZEfiLXh.cjs → booleanFns-D19tR8Gn.cjs} +6 -6
- package/dist/{booleanFns-CE3u1eIK.js → booleanFns-nHsLqZ7Y.js} +6 -6
- package/dist/brepjs.cjs +32 -26
- package/dist/brepjs.js +27 -27
- package/dist/{cameraFns-CFnPg5-H.js → cameraFns-Bhjy2SuC.js} +3 -3
- package/dist/{cameraFns-D8o9TUpN.cjs → cameraFns-D_8-JO0p.cjs} +3 -3
- package/dist/core/errors.d.ts +4 -0
- package/dist/core.cjs +3 -3
- package/dist/core.js +3 -3
- package/dist/{cornerFinder-B3DEv78h.cjs → cornerFinder-Bmp3Vm5g.cjs} +1 -1
- package/dist/{cornerFinder-B1DivYhK.js → cornerFinder-U6kzoCXY.js} +1 -1
- package/dist/{curveFns-ZXCrxKal.cjs → curveFns-p1YEnmZu.cjs} +2 -2
- package/dist/{curveFns-CwBnLSGs.js → curveFns-rUkX4tEm.js} +2 -2
- package/dist/{drawFns-B3xmKGqo.cjs → drawFns-BGIQ1IeV.cjs} +14 -14
- package/dist/{drawFns-DmDtAGJ3.js → drawFns-ZhKR7xa0.js} +14 -14
- package/dist/{errors-DxoD7zgx.cjs → errors-CXJtc4I7.cjs} +4 -0
- package/dist/{errors-BJSTLaDI.js → errors-DNWJsfVU.js} +4 -0
- package/dist/{extrudeFns-B2Jh4xdE.js → extrudeFns-Cl_azGgy.js} +2 -2
- package/dist/{extrudeFns-BCHwL5Rz.cjs → extrudeFns-DpRGUaxD.cjs} +2 -2
- package/dist/{faceFns-dIScXlyz.cjs → faceFns-C6qUr_gw.cjs} +3 -3
- package/dist/{faceFns-43zWb-uD.js → faceFns-eVWgSIzt.js} +3 -3
- package/dist/{helpers-BcvfYBlZ.js → helpers-BhJOo535.js} +7 -7
- package/dist/{helpers-WD_MY4EK.cjs → helpers-DNVILwHA.cjs} +7 -7
- package/dist/{historyFns-CesKJg-g.js → historyFns-ByJG4mBP.js} +5 -5
- package/dist/{historyFns-D0-tL5u2.cjs → historyFns-C2glA6vu.cjs} +5 -5
- package/dist/{importFns-CfXF57GK.cjs → importFns-CJc5NYJp.cjs} +3 -3
- package/dist/{importFns-nh6XUS6V.js → importFns-DuAmdf0Q.js} +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/manifold/replay.d.ts +7 -0
- package/dist/{measureFns-CZPHU8Fq.js → measureFns-BiflqrZ_.js} +4 -4
- package/dist/{measureFns-BlNPRAt1.cjs → measureFns-D7lxkIjt.cjs} +4 -4
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-44MzVWmw.js → meshFns-Bbm7_5wS.js} +43 -7
- package/dist/{meshFns-thnWU79u.cjs → meshFns-D66okPxP.cjs} +43 -7
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{planeOps-C6wxugvC.cjs → planeOps-BA4HfgQu.cjs} +1 -1
- package/dist/{planeOps-CblVcWbn.js → planeOps-DSjjtrjg.js} +1 -1
- package/dist/{primitiveFns-wcHq2Dpc.cjs → primitiveFns-CXn9Jl4q.cjs} +8 -8
- package/dist/{primitiveFns-7-BpVEfR.js → primitiveFns-vQh7Lz7B.js} +8 -8
- 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/result.cjs +1 -1
- package/dist/result.js +1 -1
- package/dist/{shapeFns-DpurOSYX.cjs → shapeFns-B3v9_keQ.cjs} +3 -3
- package/dist/{shapeFns-tYJBM_yH.js → shapeFns-BbHQjI5-.js} +3 -3
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-DhkB2xrl.js → shapeRefFns-BOsX8Tim.js} +4 -4
- package/dist/{shapeRefFns-DNlnIVGa.cjs → shapeRefFns-CkafUjdM.cjs} +4 -4
- package/dist/{shapeTypes-C16Am1Cu.cjs → shapeTypes-Bbh2doYh.cjs} +24 -10
- package/dist/{shapeTypes-DgIDUXrS.js → shapeTypes-C-MpR5-e.js} +24 -10
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-oYCo3H_H.js → solidBuilders-C44fKbQQ.js} +3 -3
- package/dist/{solidBuilders-BRd294hA.cjs → solidBuilders-Ck6gpdQR.cjs} +3 -3
- package/dist/{surfaceBuilders-BuNn7mbE.js → surfaceBuilders-D4p1YPCz.js} +3 -3
- package/dist/{surfaceBuilders-C-MXZeRY.cjs → surfaceBuilders-DsISMCwj.cjs} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-4DfEJMBH.js → textBlueprints-BKdQqBn8.js} +9 -9
- package/dist/{textBlueprints-ihVTYQz7.cjs → textBlueprints-C93RophN.cjs} +9 -9
- package/dist/{textMetrics-KvDcXO5Z.cjs → textMetrics-2vq4PFfz.cjs} +2 -2
- package/dist/{textMetrics-CgtxG_bI.js → textMetrics-DEmVsP5C.js} +2 -2
- package/dist/topology/meshFns.d.ts +0 -5
- package/dist/topology/shapeFns.d.ts +1 -1
- package/dist/topology/topologyQueryFns.d.ts +22 -1
- package/dist/topology.cjs +7 -7
- package/dist/topology.js +7 -7
- package/dist/{topologyQueryFns-DNs19Af_.js → topologyQueryFns-B81GSST_.js} +45 -3
- package/dist/{topologyQueryFns-DTvwHQnu.cjs → topologyQueryFns-C0kAqcn5.cjs} +80 -2
- package/dist/vectors.cjs +1 -1
- package/dist/vectors.js +1 -1
- package/package.json +10 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
|
|
2
|
+
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
//#region src/core/kernelCall.ts
|
|
4
4
|
function buildError(kind, code, message, cause, suggestion) {
|
|
5
5
|
const base = {
|
|
@@ -164,6 +164,36 @@ function getVertices(shape) {
|
|
|
164
164
|
cache.vertices = vertices;
|
|
165
165
|
return vertices;
|
|
166
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* Get all solids of a shape as branded Solid handles. Results are cached per shape.
|
|
169
|
+
*
|
|
170
|
+
* Booleans (`cut`/`fuse`/`fuseAll`), `chamfer`/`fillet`, and some sweeps return a
|
|
171
|
+
* `Compound` wrapping the solid(s); use this to unwrap them without reaching into
|
|
172
|
+
* the kernel. Returns `[]` for shapes with no solids (wires, bare faces, shells).
|
|
173
|
+
*/
|
|
174
|
+
function getSolids(shape) {
|
|
175
|
+
const cache = getOrCreateCache(shape);
|
|
176
|
+
if (cache.solids) return cache.solids;
|
|
177
|
+
const solids = castSubShapes(shape.wrapped, "solid");
|
|
178
|
+
cache.solids = solids;
|
|
179
|
+
return solids;
|
|
180
|
+
}
|
|
181
|
+
/** Get all shells of a shape as branded Shell handles. Results are cached per shape. */
|
|
182
|
+
function getShells(shape) {
|
|
183
|
+
const cache = getOrCreateCache(shape);
|
|
184
|
+
if (cache.shells) return cache.shells;
|
|
185
|
+
const shells = castSubShapes(shape.wrapped, "shell");
|
|
186
|
+
cache.shells = shells;
|
|
187
|
+
return shells;
|
|
188
|
+
}
|
|
189
|
+
/** Get all compsolids of a shape as branded CompSolid handles. Results are cached per shape. */
|
|
190
|
+
function getCompSolids(shape) {
|
|
191
|
+
const cache = getOrCreateCache(shape);
|
|
192
|
+
if (cache.compSolids) return cache.compSolids;
|
|
193
|
+
const compSolids = castSubShapes(shape.wrapped, "compsolid");
|
|
194
|
+
cache.compSolids = compSolids;
|
|
195
|
+
return compSolids;
|
|
196
|
+
}
|
|
167
197
|
/** Lazily iterate edges of a shape, yielding branded Edge handles one at a time. */
|
|
168
198
|
function* iterEdges(shape) {
|
|
169
199
|
for (const e of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "edge")) yield require_shapeTypes.castShapeWithKnownType(e, "edge");
|
|
@@ -180,6 +210,18 @@ function* iterWires(shape) {
|
|
|
180
210
|
function* iterVertices(shape) {
|
|
181
211
|
for (const v of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "vertex")) yield require_shapeTypes.castShapeWithKnownType(v, "vertex");
|
|
182
212
|
}
|
|
213
|
+
/** Lazily iterate solids of a shape, yielding branded Solid handles one at a time. */
|
|
214
|
+
function* iterSolids(shape) {
|
|
215
|
+
for (const s of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "solid")) yield require_shapeTypes.castShapeWithKnownType(s, "solid");
|
|
216
|
+
}
|
|
217
|
+
/** Lazily iterate shells of a shape, yielding branded Shell handles one at a time. */
|
|
218
|
+
function* iterShells(shape) {
|
|
219
|
+
for (const s of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "shell")) yield require_shapeTypes.castShapeWithKnownType(s, "shell");
|
|
220
|
+
}
|
|
221
|
+
/** Lazily iterate compsolids of a shape, yielding branded CompSolid handles one at a time. */
|
|
222
|
+
function* iterCompSolids(shape) {
|
|
223
|
+
for (const s of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "compsolid")) yield require_shapeTypes.castShapeWithKnownType(s, "compsolid");
|
|
224
|
+
}
|
|
183
225
|
/** Get the axis-aligned bounding box of a shape. Cached per shape. */
|
|
184
226
|
function getBounds(shape) {
|
|
185
227
|
const cache = getOrCreateCache(shape);
|
|
@@ -263,6 +305,12 @@ Object.defineProperty(exports, "getCachedSurfaceType", {
|
|
|
263
305
|
return getCachedSurfaceType;
|
|
264
306
|
}
|
|
265
307
|
});
|
|
308
|
+
Object.defineProperty(exports, "getCompSolids", {
|
|
309
|
+
enumerable: true,
|
|
310
|
+
get: function() {
|
|
311
|
+
return getCompSolids;
|
|
312
|
+
}
|
|
313
|
+
});
|
|
266
314
|
Object.defineProperty(exports, "getEdges", {
|
|
267
315
|
enumerable: true,
|
|
268
316
|
get: function() {
|
|
@@ -281,6 +329,18 @@ Object.defineProperty(exports, "getOrCreateCache", {
|
|
|
281
329
|
return getOrCreateCache;
|
|
282
330
|
}
|
|
283
331
|
});
|
|
332
|
+
Object.defineProperty(exports, "getShells", {
|
|
333
|
+
enumerable: true,
|
|
334
|
+
get: function() {
|
|
335
|
+
return getShells;
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
Object.defineProperty(exports, "getSolids", {
|
|
339
|
+
enumerable: true,
|
|
340
|
+
get: function() {
|
|
341
|
+
return getSolids;
|
|
342
|
+
}
|
|
343
|
+
});
|
|
284
344
|
Object.defineProperty(exports, "getVertices", {
|
|
285
345
|
enumerable: true,
|
|
286
346
|
get: function() {
|
|
@@ -299,6 +359,12 @@ Object.defineProperty(exports, "invalidateShapeCache", {
|
|
|
299
359
|
return invalidateShapeCache;
|
|
300
360
|
}
|
|
301
361
|
});
|
|
362
|
+
Object.defineProperty(exports, "iterCompSolids", {
|
|
363
|
+
enumerable: true,
|
|
364
|
+
get: function() {
|
|
365
|
+
return iterCompSolids;
|
|
366
|
+
}
|
|
367
|
+
});
|
|
302
368
|
Object.defineProperty(exports, "iterEdges", {
|
|
303
369
|
enumerable: true,
|
|
304
370
|
get: function() {
|
|
@@ -311,6 +377,18 @@ Object.defineProperty(exports, "iterFaces", {
|
|
|
311
377
|
return iterFaces;
|
|
312
378
|
}
|
|
313
379
|
});
|
|
380
|
+
Object.defineProperty(exports, "iterShells", {
|
|
381
|
+
enumerable: true,
|
|
382
|
+
get: function() {
|
|
383
|
+
return iterShells;
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
Object.defineProperty(exports, "iterSolids", {
|
|
387
|
+
enumerable: true,
|
|
388
|
+
get: function() {
|
|
389
|
+
return iterSolids;
|
|
390
|
+
}
|
|
391
|
+
});
|
|
314
392
|
Object.defineProperty(exports, "iterVertices", {
|
|
315
393
|
enumerable: true,
|
|
316
394
|
get: function() {
|
package/dist/vectors.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
3
3
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
5
|
-
const require_planeOps = require("./planeOps-
|
|
5
|
+
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
6
6
|
exports.DEG2RAD = require_constants.DEG2RAD;
|
|
7
7
|
exports.RAD2DEG = require_constants.RAD2DEG;
|
|
8
8
|
exports.createNamedPlane = require_planeOps.createNamedPlane;
|
package/dist/vectors.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
2
2
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
3
3
|
import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-SKPRvPH-.js";
|
|
4
|
-
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-
|
|
4
|
+
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-DSjjtrjg.js";
|
|
5
5
|
export { DEG2RAD, RAD2DEG, createNamedPlane, createPlane, pivotPlane, resolveDirection, resolvePlane, toVec2, toVec3, translatePlane, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brepjs",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.35.1",
|
|
4
4
|
"description": "Web CAD library with pluggable geometry kernel",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cad",
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
"packages/brepjs-opencascade",
|
|
26
26
|
"packages/brepjs-bim",
|
|
27
27
|
"packages/brepjs-manifold",
|
|
28
|
+
"packages/brepjs-agent",
|
|
29
|
+
"packages/brepjs-viewer",
|
|
28
30
|
"apps/playground",
|
|
29
31
|
"apps/docs"
|
|
30
32
|
],
|
|
@@ -248,26 +250,27 @@
|
|
|
248
250
|
"@eslint/js": "10.0.1",
|
|
249
251
|
"@size-limit/file": "12.1.0",
|
|
250
252
|
"@types/opentype.js": "1.3.9",
|
|
251
|
-
"@
|
|
253
|
+
"@types/react": "19.2.15",
|
|
254
|
+
"@vitest/coverage-v8": "4.1.7",
|
|
252
255
|
"brepjs-opencascade": "*",
|
|
253
256
|
"brepkit-wasm": "2.101.2",
|
|
254
257
|
"eslint": "10.4.0",
|
|
255
258
|
"fast-check": "4.8.0",
|
|
256
259
|
"husky": "9.1.7",
|
|
257
|
-
"knip": "6.14.
|
|
260
|
+
"knip": "6.14.2",
|
|
258
261
|
"lint-staged": "17.0.5",
|
|
259
262
|
"lz-string": "1.5.0",
|
|
260
263
|
"occt-wasm": "3.1.0",
|
|
261
264
|
"prettier": "3.8.3",
|
|
262
|
-
"puppeteer": "25.0.
|
|
265
|
+
"puppeteer": "25.0.4",
|
|
263
266
|
"size-limit": "12.1.0",
|
|
264
267
|
"sucrase": "3.35.1",
|
|
265
268
|
"typedoc": "0.28.19",
|
|
266
269
|
"typescript": "6.0.3",
|
|
267
|
-
"typescript-eslint": "8.59.
|
|
270
|
+
"typescript-eslint": "8.59.4",
|
|
268
271
|
"vite": "8.0.14",
|
|
269
|
-
"vite-plugin-dts": "5.0.
|
|
270
|
-
"vitest": "4.1.
|
|
272
|
+
"vite-plugin-dts": "5.0.1",
|
|
273
|
+
"vitest": "4.1.7"
|
|
271
274
|
},
|
|
272
275
|
"peerDependencies": {
|
|
273
276
|
"brepjs-manifold": "^0.1.0",
|