brepjs 9.6.5 → 11.0.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/Blueprint.d.ts +3 -3
- package/dist/2d/blueprints/Blueprint.d.ts.map +1 -1
- package/dist/2d/blueprints/Blueprints.d.ts +3 -3
- package/dist/2d/blueprints/Blueprints.d.ts.map +1 -1
- package/dist/2d/blueprints/CompoundBlueprint.d.ts +3 -3
- package/dist/2d/blueprints/CompoundBlueprint.d.ts.map +1 -1
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +3 -3
- package/dist/{Blueprint-D73qryz7.cjs → Blueprint-BbgdNjMG.cjs} +5 -5
- package/dist/{Blueprint-DebTNazC.js → Blueprint-CFUlMh67.js} +5 -5
- package/dist/{boolean2D-Dg9wSxP6.js → boolean2D-DNKu6gA7.js} +10 -9
- package/dist/{boolean2D-Die5sMjA.cjs → boolean2D-Y4yATWl7.cjs} +10 -9
- package/dist/{booleanFns-uwsn5G2P.cjs → booleanFns-BaMEij5u.cjs} +7 -4
- package/dist/{booleanFns-D3QHXA3L.js → booleanFns-DOonidp8.js} +7 -4
- package/dist/brepjs.cjs +43 -17
- package/dist/brepjs.js +92 -66
- package/dist/core/shapeTypes.d.ts +190 -33
- package/dist/core/shapeTypes.d.ts.map +1 -1
- package/dist/core/typeErrors.d.ts +17 -0
- package/dist/core/typeErrors.d.ts.map +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-BcA7Chiv.cjs → cornerFinder-CDkc5qfD.cjs} +1 -1
- package/dist/{cornerFinder-DvYYBvKj.js → cornerFinder-CcNE4HxW.js} +1 -1
- package/dist/{curveFns-DY55OAr3.js → curveFns-BMXtgX1x.js} +1 -1
- package/dist/{curveFns-BAXBhYiR.cjs → curveFns-Dtaf2CvG.cjs} +1 -1
- package/dist/{drawFns-a74YTSws.cjs → drawFns-B-r3aaqa.cjs} +10 -10
- package/dist/{drawFns-Diysw_m4.js → drawFns-c8p_xTP0.js} +10 -10
- package/dist/{faceFns-BQ26A_zd.js → faceFns-Cz71BDro.js} +1 -1
- package/dist/{faceFns-CjRZGka6.cjs → faceFns-DVo4NiOl.cjs} +1 -1
- package/dist/{helpers-D2N1HNiK.cjs → helpers-BOPjTzbq.cjs} +4 -4
- package/dist/{helpers-TF7WTmKB.js → helpers-Cg_I5KyH.js} +4 -4
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/io/importFns.d.ts +4 -4
- package/dist/io/importFns.d.ts.map +1 -1
- package/dist/io/objImportFns.d.ts +2 -2
- package/dist/io/objImportFns.d.ts.map +1 -1
- package/dist/io/threemfImportFns.d.ts +2 -2
- package/dist/io/threemfImportFns.d.ts.map +1 -1
- package/dist/io.cjs +3 -3
- package/dist/io.js +3 -3
- package/dist/{loft-DK0_xi5M.js → loft-Cg7rdMf1.js} +9 -5
- package/dist/{loft-C55d1XrF.cjs → loft-DCPqcyZE.cjs} +9 -5
- package/dist/measurement/interferenceFns.d.ts +3 -3
- package/dist/measurement/interferenceFns.d.ts.map +1 -1
- package/dist/measurement/measureFns.d.ts +10 -10
- package/dist/measurement/measureFns.d.ts.map +1 -1
- package/dist/{measurement-DQWf2-IP.js → measurement-BN6FiFD4.js} +2 -2
- package/dist/{measurement-BF_JvjuA.cjs → measurement-Crexq3aQ.cjs} +2 -2
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-DYdC0ztK.cjs → meshFns-d6Ta_uov.cjs} +2 -2
- package/dist/{meshFns-CmZM1bAd.js → meshFns-kdGtj-un.js} +2 -2
- package/dist/operations/api.d.ts +4 -4
- package/dist/operations/api.d.ts.map +1 -1
- package/dist/operations/exporterFns.d.ts +2 -2
- package/dist/operations/exporterFns.d.ts.map +1 -1
- package/dist/operations/exporters.d.ts +2 -2
- package/dist/operations/exporters.d.ts.map +1 -1
- package/dist/operations/extrude.d.ts +3 -3
- package/dist/operations/extrude.d.ts.map +1 -1
- package/dist/operations/extrudeFns.d.ts +7 -7
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/guidedSweepFns.d.ts +2 -2
- package/dist/operations/guidedSweepFns.d.ts.map +1 -1
- package/dist/operations/historyFns.d.ts +6 -6
- package/dist/operations/historyFns.d.ts.map +1 -1
- package/dist/operations/loftFns.d.ts +2 -2
- package/dist/operations/loftFns.d.ts.map +1 -1
- package/dist/operations/multiSweepFns.d.ts +3 -3
- 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-DhgY338f.js → operations-BaSVJrqt.js} +5 -5
- package/dist/{operations-CMcb2KJ3.cjs → operations-C9rwsqkO.cjs} +5 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/query/finderCore.d.ts +5 -5
- package/dist/query/finderCore.d.ts.map +1 -1
- package/dist/query/helpers.d.ts +2 -2
- package/dist/query/helpers.d.ts.map +1 -1
- package/dist/query/shapeDistanceFilter.d.ts +2 -2
- package/dist/query/shapeDistanceFilter.d.ts.map +1 -1
- package/dist/query/vertexFinder.d.ts.map +1 -1
- package/dist/query.cjs +4 -4
- package/dist/query.js +5 -5
- package/dist/{shapeFns-DBSqO7QJ.js → shapeFns-BbnD8E_4.js} +2 -2
- package/dist/{shapeFns-D6qzq_Cu.cjs → shapeFns-vrqpeRIf.cjs} +2 -2
- package/dist/{shapeTypes-1WVcBBn_.js → shapeTypes-BkPK8XIl.js} +77 -5
- package/dist/{shapeTypes-BHy5rqqk.cjs → shapeTypes-CHvr4HNj.cjs} +73 -1
- package/dist/sketching/CompoundSketch.d.ts +2 -2
- package/dist/sketching/CompoundSketch.d.ts.map +1 -1
- package/dist/sketching/Sketch.d.ts.map +1 -1
- package/dist/sketching/draw.d.ts +3 -3
- package/dist/sketching/draw.d.ts.map +1 -1
- package/dist/sketching/sketchFns.d.ts +3 -3
- package/dist/sketching/sketchFns.d.ts.map +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{surfaceBuilders-C_UpU97c.js → surfaceBuilders-DCThAtoQ.js} +5 -3
- package/dist/{surfaceBuilders-DU6Pq2ju.cjs → surfaceBuilders-DIPPckQg.cjs} +5 -3
- package/dist/topology/adjacencyFns.d.ts +8 -7
- package/dist/topology/adjacencyFns.d.ts.map +1 -1
- package/dist/topology/api.d.ts +24 -24
- package/dist/topology/api.d.ts.map +1 -1
- package/dist/topology/apiTypes.d.ts +7 -7
- package/dist/topology/apiTypes.d.ts.map +1 -1
- package/dist/topology/booleanFns.d.ts +8 -8
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/cast.d.ts +6 -6
- package/dist/topology/cast.d.ts.map +1 -1
- package/dist/topology/colorFns.d.ts +7 -7
- package/dist/topology/colorFns.d.ts.map +1 -1
- package/dist/topology/compoundOpsFns.d.ts.map +1 -1
- package/dist/topology/curveFns.d.ts +14 -14
- package/dist/topology/curveFns.d.ts.map +1 -1
- package/dist/topology/faceFns.d.ts +5 -5
- package/dist/topology/faceFns.d.ts.map +1 -1
- package/dist/topology/faceTagFns.d.ts +8 -8
- package/dist/topology/faceTagFns.d.ts.map +1 -1
- package/dist/topology/healingFns.d.ts +8 -8
- package/dist/topology/healingFns.d.ts.map +1 -1
- package/dist/topology/hullFns.d.ts +2 -2
- package/dist/topology/hullFns.d.ts.map +1 -1
- package/dist/topology/meshFns.d.ts +6 -6
- package/dist/topology/meshFns.d.ts.map +1 -1
- package/dist/topology/primitiveFns.d.ts +33 -14
- package/dist/topology/primitiveFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts +35 -30
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/shapeUtils.d.ts +2 -2
- package/dist/topology/shapeUtils.d.ts.map +1 -1
- package/dist/topology/solidBuilders.d.ts +9 -9
- package/dist/topology/solidBuilders.d.ts.map +1 -1
- package/dist/topology/surfaceBuilders.d.ts +7 -7
- package/dist/topology/surfaceBuilders.d.ts.map +1 -1
- package/dist/topology/wrapperFns.d.ts.map +1 -1
- package/dist/{topology-BrCU7nI6.cjs → topology-BK5M8FlG.cjs} +11 -6
- package/dist/{topology-B-UCQkll.js → topology-DoSBNUPF.js} +11 -6
- package/dist/topology.cjs +6 -6
- package/dist/topology.js +6 -6
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ScaleMode } from '../curves.js';
|
|
2
2
|
import { Point2D, BoundingBox2d, Curve2D } from '../lib/index.js';
|
|
3
|
-
import { AnyShape, Face } from '../../core/shapeTypes.js';
|
|
3
|
+
import { AnyShape, Dimension, Face } from '../../core/shapeTypes.js';
|
|
4
4
|
import { Plane, PlaneName } from '../../core/planeTypes.js';
|
|
5
5
|
import { PointInput } from '../../core/types.js';
|
|
6
6
|
import { DrawingInterface, SketchData } from './lib.js';
|
|
@@ -135,11 +135,11 @@ export default class Blueprint implements DrawingInterface {
|
|
|
135
135
|
* @param options.draftAngle - Taper angle in degrees (0 = straight hole).
|
|
136
136
|
* @returns The modified shape with the hole removed.
|
|
137
137
|
*/
|
|
138
|
-
punchHole(shape: AnyShape
|
|
138
|
+
punchHole(shape: AnyShape<Dimension>, face: SingleFace, { height, origin, draftAngle, }?: {
|
|
139
139
|
height?: number | null;
|
|
140
140
|
origin?: PointInput | null;
|
|
141
141
|
draftAngle?: number;
|
|
142
|
-
}): AnyShape
|
|
142
|
+
}): AnyShape<Dimension>;
|
|
143
143
|
/** Convert the blueprint to an SVG path `d` attribute string. */
|
|
144
144
|
toSVGPathD(): string;
|
|
145
145
|
/** Wrap the SVG path data in a `<path>` element string. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blueprint.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/Blueprint.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAA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M,CAAC;KAChB;IAgBR,iEAAiE;IACjE,UAAU;IAcV,2DAA2D;IAC3D,SAAS;IAIT;;;;OAIG;IACH,YAAY,CAAC,MAAM,SAAI;IAIvB,sEAAsE;IACtE,UAAU;IAIV;;;;OAIG;IACH,KAAK,CAAC,MAAM,SAAI;IAIhB,8CAA8C;IAC9C,IAAI,UAAU,IAAI,OAAO,CAGxB;IAED,2CAA2C;IAC3C,IAAI,SAAS,IAAI,OAAO,CAGvB;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAmBjC,gFAAgF;IAChF,QAAQ;IAIR;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,SAAS;CAc5B"}
|
|
@@ -2,7 +2,7 @@ import { Point2D, BoundingBox2d } from '../lib/index.js';
|
|
|
2
2
|
import { default as Blueprint } from './Blueprint.js';
|
|
3
3
|
import { default as CompoundBlueprint } from './CompoundBlueprint.js';
|
|
4
4
|
import { DrawingInterface, SketchData } from './lib.js';
|
|
5
|
-
import { AnyShape, Face } from '../../core/shapeTypes.js';
|
|
5
|
+
import { AnyShape, Dimension, Face } from '../../core/shapeTypes.js';
|
|
6
6
|
import { Plane, PlaneName } from '../../core/planeTypes.js';
|
|
7
7
|
import { PointInput } from '../../core/types.js';
|
|
8
8
|
import { ScaleMode } from '../curves.js';
|
|
@@ -49,11 +49,11 @@ export default class Blueprints implements DrawingInterface {
|
|
|
49
49
|
*
|
|
50
50
|
* @returns The shape with all holes applied.
|
|
51
51
|
*/
|
|
52
|
-
punchHole(shape: AnyShape
|
|
52
|
+
punchHole(shape: AnyShape<Dimension>, face: SingleFace, options?: {
|
|
53
53
|
height?: number;
|
|
54
54
|
origin?: PointInput;
|
|
55
55
|
draftAngle?: number;
|
|
56
|
-
}): AnyShape
|
|
56
|
+
}): AnyShape<Dimension>;
|
|
57
57
|
/** Compute the SVG `viewBox` attribute for this collection. */
|
|
58
58
|
toSVGViewBox(margin?: number): string;
|
|
59
59
|
/** Return nested SVG path `d` string arrays -- one sub-array per child. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blueprints.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/Blueprints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG7D,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Blueprints.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/Blueprints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG7D,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAE1E,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,YAAW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H,SAAS,CACP,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAC1B,IAAI,EAAE,UAAU,EAChB,OAAO,GAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,UAAU,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KAChB;IASR,+DAA+D;IAC/D,YAAY,CAAC,MAAM,SAAI;IAIvB,2EAA2E;IAC3E,UAAU;IAIV,sEAAsE;IACtE,KAAK,CAAC,MAAM,SAAI;CAQjB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Point2D, BoundingBox2d } from '../lib/index.js';
|
|
2
2
|
import { default as Blueprint } from './Blueprint.js';
|
|
3
3
|
import { DrawingInterface, SketchData } from './lib.js';
|
|
4
|
-
import { AnyShape, Face } from '../../core/shapeTypes.js';
|
|
4
|
+
import { AnyShape, Dimension, Face } from '../../core/shapeTypes.js';
|
|
5
5
|
import { Plane, PlaneName } from '../../core/planeTypes.js';
|
|
6
6
|
import { PointInput } from '../../core/types.js';
|
|
7
7
|
import { ScaleMode } from '../curves.js';
|
|
@@ -64,11 +64,11 @@ export default class CompoundBlueprint implements DrawingInterface {
|
|
|
64
64
|
*
|
|
65
65
|
* @remarks Only the outer boundary (`blueprints[0]`) is used for the hole.
|
|
66
66
|
*/
|
|
67
|
-
punchHole(shape: AnyShape
|
|
67
|
+
punchHole(shape: AnyShape<Dimension>, face: SingleFace, options?: {
|
|
68
68
|
height?: number;
|
|
69
69
|
origin?: PointInput;
|
|
70
70
|
draftAngle?: number;
|
|
71
|
-
}): AnyShape
|
|
71
|
+
}): AnyShape<Dimension>;
|
|
72
72
|
/** Compute the SVG `viewBox` attribute for this compound blueprint. */
|
|
73
73
|
toSVGViewBox(margin?: number): string;
|
|
74
74
|
/** Return SVG path `d` strings for every child blueprint. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompoundBlueprint.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/CompoundBlueprint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG7D,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"CompoundBlueprint.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/CompoundBlueprint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG7D,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAE1E,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,YAAW,gBAAgB;IAChE;;;OAGG;IACH,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,SAAS,CAAC,YAAY,EAAE,aAAa,GAAG,IAAI,CAAC;IAE7C;;;;;;OAMG;gBACS,UAAU,EAAE,SAAS,EAAE;IAQnC,0EAA0E;IAC1E,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AAI;IAIvB,6DAA6D;IAC7D,UAAU;IAIV,gEAAgE;IAChE,UAAU;IAIV,yEAAyE;IACzE,KAAK,CAAC,MAAM,SAAI;CAGjB"}
|
package/dist/2d.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const Blueprint = require("./Blueprint-
|
|
4
|
-
const boolean2D = require("./boolean2D-
|
|
3
|
+
const Blueprint = require("./Blueprint-BbgdNjMG.cjs");
|
|
4
|
+
const boolean2D = require("./boolean2D-Y4yATWl7.cjs");
|
|
5
5
|
function reverseCurve(curve) {
|
|
6
6
|
const cloned = curve.clone();
|
|
7
7
|
cloned.reverse();
|
package/dist/2d.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as Blueprint } from "./Blueprint-
|
|
2
|
-
import { d, C } from "./Blueprint-
|
|
3
|
-
import { e, C as C2, f, l, g, n, k, q, o, p, r } from "./boolean2D-
|
|
1
|
+
import { B as Blueprint } from "./Blueprint-CFUlMh67.js";
|
|
2
|
+
import { d, C } from "./Blueprint-CFUlMh67.js";
|
|
3
|
+
import { e, C as C2, f, l, g, n, k, q, o, p, r } from "./boolean2D-DNKu6gA7.js";
|
|
4
4
|
function reverseCurve(curve) {
|
|
5
5
|
const cloned = curve.clone();
|
|
6
6
|
cloned.reverse();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vectors = require("./vectors-DqQXtR8s.cjs");
|
|
3
3
|
const types = require("./types-CA_xrgDq.cjs");
|
|
4
|
-
const shapeTypes = require("./shapeTypes-
|
|
5
|
-
const faceFns = require("./faceFns-
|
|
6
|
-
const curveFns = require("./curveFns-
|
|
4
|
+
const shapeTypes = require("./shapeTypes-CHvr4HNj.cjs");
|
|
5
|
+
const faceFns = require("./faceFns-DVo4NiOl.cjs");
|
|
6
|
+
const curveFns = require("./curveFns-Dtaf2CvG.cjs");
|
|
7
7
|
const errors = require("./errors-DiTn5EoC.cjs");
|
|
8
|
-
const helpers = require("./helpers-
|
|
8
|
+
const helpers = require("./helpers-BOPjTzbq.cjs");
|
|
9
9
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
10
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
10
|
+
const surfaceBuilders = require("./surfaceBuilders-DIPPckQg.cjs");
|
|
11
11
|
const result = require("./result.cjs");
|
|
12
12
|
function makePlane(plane, origin) {
|
|
13
13
|
if (plane && typeof plane !== "string") {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as resolvePlane } from "./vectors-B8RRTytu.js";
|
|
2
2
|
import { a as toVec3 } from "./types-CWDdqcrq.js";
|
|
3
|
-
import { q as getKernel, y as getKernel2D, z as registerForCleanup, A as unregisterFromCleanup, s as createEdge, r as createWire } from "./shapeTypes-
|
|
4
|
-
import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-
|
|
5
|
-
import { g as getOrientation } from "./curveFns-
|
|
3
|
+
import { q as getKernel, y as getKernel2D, z as registerForCleanup, A as unregisterFromCleanup, s as createEdge, r as createWire } from "./shapeTypes-BkPK8XIl.js";
|
|
4
|
+
import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-Cz71BDro.js";
|
|
5
|
+
import { g as getOrientation } from "./curveFns-BMXtgX1x.js";
|
|
6
6
|
import { o as ok, e as err, b as computationError, u as unwrap, x as validationError } from "./errors-lBwyc8YG.js";
|
|
7
|
-
import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-
|
|
7
|
+
import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-Cg_I5KyH.js";
|
|
8
8
|
import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
9
|
-
import { m as makeFace } from "./surfaceBuilders-
|
|
9
|
+
import { m as makeFace } from "./surfaceBuilders-DCThAtoQ.js";
|
|
10
10
|
import { bug } from "./result.js";
|
|
11
11
|
function makePlane(plane, origin) {
|
|
12
12
|
if (plane && typeof plane !== "string") {
|
|
@@ -45,16 +45,16 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
45
45
|
};
|
|
46
46
|
import { a as createPlane } from "./vectors-B8RRTytu.js";
|
|
47
47
|
import { o as ok, e as err, b as computationError, u as unwrap, g as isOk } from "./errors-lBwyc8YG.js";
|
|
48
|
-
import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-
|
|
48
|
+
import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-Cz71BDro.js";
|
|
49
49
|
import { a as toVec3 } from "./types-CWDdqcrq.js";
|
|
50
50
|
import { n as vecScale, j as vecNormalize, b as vecCross, D as DEG2RAD, R as RAD2DEG } from "./vecOps-ZDdZWbwT.js";
|
|
51
|
-
import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-
|
|
52
|
-
import { y as getKernel2D, t as createFace, r as createWire, q as getKernel, s as createEdge, D as DisposalScope } from "./shapeTypes-
|
|
53
|
-
import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-
|
|
54
|
-
import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-
|
|
51
|
+
import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-Cg7rdMf1.js";
|
|
52
|
+
import { y as getKernel2D, t as createFace, r as createWire, q as getKernel, s as createEdge, D as DisposalScope } from "./shapeTypes-BkPK8XIl.js";
|
|
53
|
+
import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-BMXtgX1x.js";
|
|
54
|
+
import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-DCThAtoQ.js";
|
|
55
55
|
import { bug } from "./result.js";
|
|
56
|
-
import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-
|
|
57
|
-
import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as removeDuplicatePoints } from "./Blueprint-
|
|
56
|
+
import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-Cg_I5KyH.js";
|
|
57
|
+
import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as removeDuplicatePoints } from "./Blueprint-CFUlMh67.js";
|
|
58
58
|
const intersectCurves = (first, second, precision = 1e-9) => {
|
|
59
59
|
if (first.boundingBox.isOut(second.boundingBox))
|
|
60
60
|
return ok({ intersections: [], commonSegments: [], commonSegmentsPoints: [] });
|
|
@@ -1009,10 +1009,11 @@ class Sketch {
|
|
|
1009
1009
|
*/
|
|
1010
1010
|
face() {
|
|
1011
1011
|
let face;
|
|
1012
|
+
const closedWire = this.wire;
|
|
1012
1013
|
if (!this.baseFace) {
|
|
1013
|
-
face = unwrap(makeFace(
|
|
1014
|
+
face = unwrap(makeFace(closedWire));
|
|
1014
1015
|
} else {
|
|
1015
|
-
face = makeNewFaceWithinFace(this.baseFace,
|
|
1016
|
+
face = makeNewFaceWithinFace(this.baseFace, closedWire);
|
|
1016
1017
|
}
|
|
1017
1018
|
return face;
|
|
1018
1019
|
}
|
|
@@ -46,16 +46,16 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
46
46
|
};
|
|
47
47
|
const vectors = require("./vectors-DqQXtR8s.cjs");
|
|
48
48
|
const errors = require("./errors-DiTn5EoC.cjs");
|
|
49
|
-
const faceFns = require("./faceFns-
|
|
49
|
+
const faceFns = require("./faceFns-DVo4NiOl.cjs");
|
|
50
50
|
const types = require("./types-CA_xrgDq.cjs");
|
|
51
51
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
52
|
-
const loft = require("./loft-
|
|
53
|
-
const shapeTypes = require("./shapeTypes-
|
|
54
|
-
const curveFns = require("./curveFns-
|
|
55
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
52
|
+
const loft = require("./loft-DCPqcyZE.cjs");
|
|
53
|
+
const shapeTypes = require("./shapeTypes-CHvr4HNj.cjs");
|
|
54
|
+
const curveFns = require("./curveFns-Dtaf2CvG.cjs");
|
|
55
|
+
const surfaceBuilders = require("./surfaceBuilders-DIPPckQg.cjs");
|
|
56
56
|
const result = require("./result.cjs");
|
|
57
|
-
const helpers = require("./helpers-
|
|
58
|
-
const Blueprint = require("./Blueprint-
|
|
57
|
+
const helpers = require("./helpers-BOPjTzbq.cjs");
|
|
58
|
+
const Blueprint = require("./Blueprint-BbgdNjMG.cjs");
|
|
59
59
|
const intersectCurves = (first, second, precision = 1e-9) => {
|
|
60
60
|
if (first.boundingBox.isOut(second.boundingBox))
|
|
61
61
|
return errors.ok({ intersections: [], commonSegments: [], commonSegmentsPoints: [] });
|
|
@@ -1010,10 +1010,11 @@ class Sketch {
|
|
|
1010
1010
|
*/
|
|
1011
1011
|
face() {
|
|
1012
1012
|
let face;
|
|
1013
|
+
const closedWire = this.wire;
|
|
1013
1014
|
if (!this.baseFace) {
|
|
1014
|
-
face = errors.unwrap(surfaceBuilders.makeFace(
|
|
1015
|
+
face = errors.unwrap(surfaceBuilders.makeFace(closedWire));
|
|
1015
1016
|
} else {
|
|
1016
|
-
face = surfaceBuilders.makeNewFaceWithinFace(this.baseFace,
|
|
1017
|
+
face = surfaceBuilders.makeNewFaceWithinFace(this.baseFace, closedWire);
|
|
1017
1018
|
}
|
|
1018
1019
|
return face;
|
|
1019
1020
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const shapeTypes = require("./shapeTypes-
|
|
2
|
+
const shapeTypes = require("./shapeTypes-CHvr4HNj.cjs");
|
|
3
3
|
const errors = require("./errors-DiTn5EoC.cjs");
|
|
4
4
|
const vectors = require("./vectors-DqQXtR8s.cjs");
|
|
5
5
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
6
|
-
const shapeFns = require("./shapeFns-
|
|
7
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
6
|
+
const shapeFns = require("./shapeFns-vrqpeRIf.cjs");
|
|
7
|
+
const surfaceBuilders = require("./surfaceBuilders-DIPPckQg.cjs");
|
|
8
8
|
const shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
9
9
|
const tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
10
10
|
function hasFaceTags(shape) {
|
|
@@ -551,7 +551,10 @@ function sectionToFace(shape, plane, options = {}) {
|
|
|
551
551
|
}
|
|
552
552
|
const outer = wires[outerIdx];
|
|
553
553
|
const holes = wires.filter((_, i) => i !== outerIdx);
|
|
554
|
-
return surfaceBuilders.makeFace(
|
|
554
|
+
return surfaceBuilders.makeFace(
|
|
555
|
+
outer,
|
|
556
|
+
holes.length > 0 ? holes : void 0
|
|
557
|
+
);
|
|
555
558
|
}
|
|
556
559
|
function split(shape, tools) {
|
|
557
560
|
if (tools.length === 0) return errors.ok(shape);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { q as getKernel, c as castShape, j as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel, c as castShape, j as isShape3D } from "./shapeTypes-BkPK8XIl.js";
|
|
2
2
|
import { o as ok, d as isErr, e as err, x as validationError, B as BrepErrorCode, p as typeCastError, k as kernelError } from "./errors-lBwyc8YG.js";
|
|
3
3
|
import { r as resolvePlane } from "./vectors-B8RRTytu.js";
|
|
4
4
|
import { H as HASH_CODE_MAX, n as vecScale, v as vecAdd } from "./vecOps-ZDdZWbwT.js";
|
|
5
|
-
import { a as getFaces, p as propagateOriginsFromEvolution, b as propagateOriginsByHash, g as getFaceOrigins, c as getWires, d as getEdges, e as getVertices } from "./shapeFns-
|
|
6
|
-
import { m as makeFace } from "./surfaceBuilders-
|
|
5
|
+
import { a as getFaces, p as propagateOriginsFromEvolution, b as propagateOriginsByHash, g as getFaceOrigins, c as getWires, d as getEdges, e as getVertices } from "./shapeFns-BbnD8E_4.js";
|
|
6
|
+
import { m as makeFace } from "./surfaceBuilders-DCThAtoQ.js";
|
|
7
7
|
const shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
8
8
|
const tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
9
9
|
function hasFaceTags(shape) {
|
|
@@ -550,7 +550,10 @@ function sectionToFace(shape, plane, options = {}) {
|
|
|
550
550
|
}
|
|
551
551
|
const outer = wires[outerIdx];
|
|
552
552
|
const holes = wires.filter((_, i) => i !== outerIdx);
|
|
553
|
-
return makeFace(
|
|
553
|
+
return makeFace(
|
|
554
|
+
outer,
|
|
555
|
+
holes.length > 0 ? holes : void 0
|
|
556
|
+
);
|
|
554
557
|
}
|
|
555
558
|
function split(shape, tools) {
|
|
556
559
|
if (tools.length === 0) return ok(shape);
|
package/dist/brepjs.cjs
CHANGED
|
@@ -45,30 +45,30 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
45
45
|
return next();
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
48
|
-
const shapeTypes = require("./shapeTypes-
|
|
48
|
+
const shapeTypes = require("./shapeTypes-CHvr4HNj.cjs");
|
|
49
49
|
const errors = require("./errors-DiTn5EoC.cjs");
|
|
50
50
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
51
|
-
const Blueprint = require("./Blueprint-
|
|
52
|
-
const loft$2 = require("./loft-
|
|
53
|
-
const operations = require("./operations-
|
|
54
|
-
const boolean2D = require("./boolean2D-
|
|
51
|
+
const Blueprint = require("./Blueprint-BbgdNjMG.cjs");
|
|
52
|
+
const loft$2 = require("./loft-DCPqcyZE.cjs");
|
|
53
|
+
const operations = require("./operations-C9rwsqkO.cjs");
|
|
54
|
+
const boolean2D = require("./boolean2D-Y4yATWl7.cjs");
|
|
55
55
|
const _2d = require("./2d.cjs");
|
|
56
|
-
const helpers = require("./helpers-
|
|
56
|
+
const helpers = require("./helpers-BOPjTzbq.cjs");
|
|
57
57
|
const io = require("./io.cjs");
|
|
58
|
-
const drawFns = require("./drawFns-
|
|
58
|
+
const drawFns = require("./drawFns-B-r3aaqa.cjs");
|
|
59
59
|
const types = require("./types-CA_xrgDq.cjs");
|
|
60
60
|
const vectors = require("./vectors-DqQXtR8s.cjs");
|
|
61
|
-
const shapeFns = require("./shapeFns-
|
|
62
|
-
const booleanFns = require("./booleanFns-
|
|
63
|
-
const topology = require("./topology-
|
|
64
|
-
const curveFns = require("./curveFns-
|
|
65
|
-
const faceFns = require("./faceFns-
|
|
66
|
-
const meshFns = require("./meshFns-
|
|
67
|
-
const measurement = require("./measurement-
|
|
68
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
61
|
+
const shapeFns = require("./shapeFns-vrqpeRIf.cjs");
|
|
62
|
+
const booleanFns = require("./booleanFns-BaMEij5u.cjs");
|
|
63
|
+
const topology = require("./topology-BK5M8FlG.cjs");
|
|
64
|
+
const curveFns = require("./curveFns-Dtaf2CvG.cjs");
|
|
65
|
+
const faceFns = require("./faceFns-DVo4NiOl.cjs");
|
|
66
|
+
const meshFns = require("./meshFns-d6Ta_uov.cjs");
|
|
67
|
+
const measurement = require("./measurement-Crexq3aQ.cjs");
|
|
68
|
+
const surfaceBuilders = require("./surfaceBuilders-DIPPckQg.cjs");
|
|
69
69
|
const query = require("./query.cjs");
|
|
70
70
|
const result = require("./result.cjs");
|
|
71
|
-
const cornerFinder = require("./cornerFinder-
|
|
71
|
+
const cornerFinder = require("./cornerFinder-CDkc5qfD.cjs");
|
|
72
72
|
const worker = require("./worker.cjs");
|
|
73
73
|
function supportsProjection(kernel) {
|
|
74
74
|
return "projectShape" in kernel;
|
|
@@ -1876,6 +1876,17 @@ function tangentArc(startPoint, startTgt, endPoint) {
|
|
|
1876
1876
|
function wire(listOfEdges) {
|
|
1877
1877
|
return surfaceBuilders.assembleWire(listOfEdges);
|
|
1878
1878
|
}
|
|
1879
|
+
function wireLoop(listOfEdges) {
|
|
1880
|
+
return errors.andThen(surfaceBuilders.assembleWire(listOfEdges), (w) => {
|
|
1881
|
+
if (shapeTypes.isClosedWire(w)) return errors.ok(w);
|
|
1882
|
+
return errors.err(
|
|
1883
|
+
errors.validationError(
|
|
1884
|
+
"WIRE_NOT_CLOSED",
|
|
1885
|
+
"Assembled wire is not closed: start and end points do not coincide"
|
|
1886
|
+
)
|
|
1887
|
+
);
|
|
1888
|
+
});
|
|
1889
|
+
}
|
|
1879
1890
|
function face(w, holes) {
|
|
1880
1891
|
return surfaceBuilders.makeFace(w, holes);
|
|
1881
1892
|
}
|
|
@@ -2627,7 +2638,7 @@ function createWrapped3D(val) {
|
|
|
2627
2638
|
// Batch booleans
|
|
2628
2639
|
fuseAll: (tools, opts) => wrap3D(unwrapOrThrow(booleanFns.fuseAll([val, ...tools.map(resolve)], opts))),
|
|
2629
2640
|
cutAll: (tools, opts) => wrap3D(unwrapOrThrow(booleanFns.cutAll(val, tools, opts))),
|
|
2630
|
-
// Boolean variants
|
|
2641
|
+
// Boolean variants — wrappers are always 3D context, safe to narrow
|
|
2631
2642
|
section: (plane, opts) => wrapAny(unwrapOrThrow(section(val, plane, opts))),
|
|
2632
2643
|
split: (tools) => wrapAny(unwrapOrThrow(split(val, tools))),
|
|
2633
2644
|
slice: (planes, opts) => unwrapOrThrow(slice(val, planes, opts)),
|
|
@@ -2697,6 +2708,7 @@ function createWrappedFace(val) {
|
|
|
2697
2708
|
surfaceType: () => unwrapOrThrow(faceFns.getSurfaceType(val)),
|
|
2698
2709
|
outerWire: () => faceFns.outerWire(val),
|
|
2699
2710
|
innerWires: () => faceFns.innerWires(val),
|
|
2711
|
+
// Wrapped faces from the fluent API are always oriented
|
|
2700
2712
|
extrude: (height) => wrap3D(unwrapOrThrow(extrude(val, height))),
|
|
2701
2713
|
revolve: (opts) => wrap3D(unwrapOrThrow(revolve(val, opts)))
|
|
2702
2714
|
};
|
|
@@ -2723,7 +2735,11 @@ function shape(s) {
|
|
|
2723
2735
|
throw new Error("shape() requires a Sketch or branded shape type");
|
|
2724
2736
|
}
|
|
2725
2737
|
exports.DisposalScope = shapeTypes.DisposalScope;
|
|
2738
|
+
exports.as2D = shapeTypes.as2D;
|
|
2739
|
+
exports.as3D = shapeTypes.as3D;
|
|
2726
2740
|
exports.castShape = shapeTypes.castShape;
|
|
2741
|
+
exports.castShape3D = shapeTypes.castShape3D;
|
|
2742
|
+
exports.closedWire = shapeTypes.closedWire;
|
|
2727
2743
|
exports.createCompound = shapeTypes.createCompound;
|
|
2728
2744
|
exports.createEdge = shapeTypes.createEdge;
|
|
2729
2745
|
exports.createFace = shapeTypes.createFace;
|
|
@@ -2736,17 +2752,26 @@ exports.createWire = shapeTypes.createWire;
|
|
|
2736
2752
|
exports.getKernel = shapeTypes.getKernel;
|
|
2737
2753
|
exports.getShapeKind = shapeTypes.getShapeKind;
|
|
2738
2754
|
exports.initFromOC = shapeTypes.initFromOC;
|
|
2755
|
+
exports.is2D = shapeTypes.is2D;
|
|
2756
|
+
exports.is3D = shapeTypes.is3D;
|
|
2757
|
+
exports.isClosedWire = shapeTypes.isClosedWire;
|
|
2739
2758
|
exports.isCompound = shapeTypes.isCompound;
|
|
2740
2759
|
exports.isEdge = shapeTypes.isEdge;
|
|
2741
2760
|
exports.isFace = shapeTypes.isFace;
|
|
2742
2761
|
exports.isLive = shapeTypes.isLive;
|
|
2762
|
+
exports.isManifoldShell = shapeTypes.isManifoldShell;
|
|
2763
|
+
exports.isOrientedFace = shapeTypes.isOrientedFace;
|
|
2743
2764
|
exports.isShape1D = shapeTypes.isShape1D;
|
|
2744
2765
|
exports.isShape3D = shapeTypes.isShape3D;
|
|
2745
2766
|
exports.isShell = shapeTypes.isShell;
|
|
2746
2767
|
exports.isSolid = shapeTypes.isSolid;
|
|
2768
|
+
exports.isValidSolid = shapeTypes.isValidSolid;
|
|
2747
2769
|
exports.isVertex = shapeTypes.isVertex;
|
|
2748
2770
|
exports.isWire = shapeTypes.isWire;
|
|
2771
|
+
exports.manifoldShell = shapeTypes.manifoldShell;
|
|
2772
|
+
exports.orientedFace = shapeTypes.orientedFace;
|
|
2749
2773
|
exports.registerKernel = shapeTypes.registerKernel;
|
|
2774
|
+
exports.validSolid = shapeTypes.validSolid;
|
|
2750
2775
|
exports.withKernel = shapeTypes.withKernel;
|
|
2751
2776
|
exports.withScope = shapeTypes.withScope;
|
|
2752
2777
|
exports.withScopeResult = shapeTypes.withScopeResult;
|
|
@@ -3168,6 +3193,7 @@ exports.vertex = vertex;
|
|
|
3168
3193
|
exports.vertexFinder = vertexFinder;
|
|
3169
3194
|
exports.wire = wire;
|
|
3170
3195
|
exports.wireFinder = wireFinder;
|
|
3196
|
+
exports.wireLoop = wireLoop;
|
|
3171
3197
|
exports.withKernelDir = withKernelDir;
|
|
3172
3198
|
exports.withKernelPnt = withKernelPnt;
|
|
3173
3199
|
exports.withKernelVec = withKernelVec;
|