brepjs 20.12.13 → 20.12.15

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 (106) hide show
  1. package/dist/2d/blueprints/blueprintFns.d.ts +2 -0
  2. package/dist/2d.cjs +6 -6
  3. package/dist/2d.js +6 -6
  4. package/dist/{adjacencyFns-Djv832MP.cjs → adjacencyFns-BHdJW5pd.cjs} +3 -3
  5. package/dist/{adjacencyFns-DBN26xm_.js → adjacencyFns-C4yjxKu4.js} +3 -3
  6. package/dist/{blueprint-nVQsEilp.cjs → blueprint-D4juQWXs.cjs} +5 -5
  7. package/dist/{blueprint-BTccTqFy.js → blueprint-ku_wYIZl.js} +5 -5
  8. package/dist/{blueprintFns-DFDOgqqe.cjs → blueprintFns-8obtvMEn.cjs} +4 -5
  9. package/dist/{blueprintFns-DX7yLZpR.js → blueprintFns-B0cqtoFB.js} +4 -5
  10. package/dist/{blueprintSketcher-CoGp1dM9.cjs → blueprintSketcher-CRFpnZAS.cjs} +3 -3
  11. package/dist/{blueprintSketcher-rk64lh8e.js → blueprintSketcher-Dpdgf5aR.js} +3 -3
  12. package/dist/{boolean2D-Dv-57m9d.js → boolean2D-CnCDsRJ4.js} +4 -4
  13. package/dist/{boolean2D-DP2DiMfT.cjs → boolean2D-D3jxohLZ.cjs} +4 -4
  14. package/dist/{booleanFns-CjIZaNBh.js → booleanFns-CItcObM_.js} +5 -5
  15. package/dist/{booleanFns-ewBwy7V_.cjs → booleanFns-GBPAGQ5g.cjs} +5 -5
  16. package/dist/brepjs.cjs +59 -61
  17. package/dist/brepjs.js +59 -61
  18. package/dist/{cameraFns-D0JDXxwO.js → cameraFns-B6ujpyKy.js} +3 -3
  19. package/dist/{cameraFns-DmIQsPIr.cjs → cameraFns-C2XhSqrr.cjs} +3 -3
  20. package/dist/core/shapeTypes.d.ts +8 -4
  21. package/dist/core.cjs +2 -2
  22. package/dist/core.js +2 -2
  23. package/dist/{cornerFinder-CZ1XbVx7.cjs → cornerFinder-CqHx_Itj.cjs} +1 -1
  24. package/dist/{cornerFinder-Df7ajnlz.js → cornerFinder-D3nBhdfi.js} +1 -1
  25. package/dist/{curveFns-DK5eG57I.cjs → curveFns-BQjw0VBB.cjs} +1 -1
  26. package/dist/{curveFns-CUrIF9LG.js → curveFns-nAwtilbz.js} +1 -1
  27. package/dist/{drawFns-BKKWQ4JW.js → drawFns-D9q4Hxc_.js} +12 -12
  28. package/dist/{drawFns-B2CPxqd1.cjs → drawFns-hFjTvdw4.cjs} +12 -12
  29. package/dist/{faceFns-C1Ii1MJ-.cjs → faceFns-DdMpocg9.cjs} +2 -2
  30. package/dist/{faceFns-B3vblI_s.js → faceFns-Dodcduw8.js} +2 -2
  31. package/dist/{healingFns-sfguIlrW.cjs → healingFns-Cdpu44d0.cjs} +5 -5
  32. package/dist/{healingFns-CqiHrJcx.js → healingFns-GNF1rFuw.js} +5 -5
  33. package/dist/{helpers-Dy1moMMd.js → helpers-CoVtL5c9.js} +6 -6
  34. package/dist/{helpers-CTxyRIoE.cjs → helpers-TWIfnyto.cjs} +6 -6
  35. package/dist/{importFns-BXiAHbyn.js → importFns-C9TUFscx.js} +479 -57
  36. package/dist/{importFns-C3ILnGTv.cjs → importFns-P-TcOJ1G.cjs} +479 -57
  37. package/dist/io/importFns.d.ts +6 -4
  38. package/dist/io/ioUtils.d.ts +23 -5
  39. package/dist/io/meshNesting.d.ts +25 -4
  40. package/dist/io/meshTopology.d.ts +33 -0
  41. package/dist/io/stlTriangles.d.ts +10 -0
  42. package/dist/io/threemfImportFns.d.ts +9 -6
  43. package/dist/io.cjs +2 -2
  44. package/dist/io.js +2 -2
  45. package/dist/kernel/capabilities.d.ts +9 -1
  46. package/dist/kernel/interfaces/evolutionOps.d.ts +1 -0
  47. package/dist/kernel/interfaces/transformOps.d.ts +7 -2
  48. package/dist/kernel/occt/transformOps.d.ts +1 -1
  49. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  50. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  51. package/dist/{loftFns-BJqF1p_f.js → loftFns-DVsWk-9v.js} +19 -52
  52. package/dist/{loftFns-CzERU_TY.cjs → loftFns-Uq6BhPVL.cjs} +19 -52
  53. package/dist/{measureFns-DN5YMfKZ.cjs → measureFns-B0Cy7GcQ.cjs} +3 -3
  54. package/dist/{measureFns-CT2TRojo.js → measureFns-DoUWDfAP.js} +3 -3
  55. package/dist/measurement.cjs +2 -2
  56. package/dist/measurement.js +2 -2
  57. package/dist/{meshFns-Cp8uEpVt.js → meshFns-BpBgKIIE.js} +4 -4
  58. package/dist/{meshFns-BDn_nIVv.cjs → meshFns-Bz9PPZWP.cjs} +4 -4
  59. package/dist/{occtWasmAdapter-C-Qi-jxS.js → occtWasmAdapter-DeVQrL5n.js} +4 -3
  60. package/dist/{occtWasmAdapter-BK--kx4R.cjs → occtWasmAdapter-DzxyXpLG.cjs} +4 -3
  61. package/dist/operations/instanceFns.d.ts +3 -2
  62. package/dist/operations/sweepFns.d.ts +15 -3
  63. package/dist/operations.cjs +2 -2
  64. package/dist/operations.js +2 -2
  65. package/dist/{primitiveFns-BzJi89Y6.js → primitiveFns-Crqsdby_.js} +5 -5
  66. package/dist/{primitiveFns-1FcmvZ6Y.cjs → primitiveFns-DE1RROq-.cjs} +5 -5
  67. package/dist/{principalBoxFns-DT4ngNuy.cjs → principalBoxFns-CzEBI6tC.cjs} +3 -3
  68. package/dist/{principalBoxFns-farY7tvh.js → principalBoxFns-DwitCsif.js} +3 -3
  69. package/dist/projection.cjs +1 -1
  70. package/dist/projection.js +1 -1
  71. package/dist/query.cjs +2 -2
  72. package/dist/query.js +2 -2
  73. package/dist/{refResolveFns-dNAt7W9t.js → refResolveFns-BJz9UvXM.js} +6 -6
  74. package/dist/{refResolveFns-By31fyEv.cjs → refResolveFns-DgM_B9WU.cjs} +6 -6
  75. package/dist/{shapeFns-DhTfkxbN.cjs → shapeFns-B9LB54_t.cjs} +2 -2
  76. package/dist/{shapeFns-381QqZ8n.js → shapeFns-Ddh0M4Iz.js} +2 -2
  77. package/dist/shapeRef.cjs +1 -1
  78. package/dist/shapeRef.js +1 -1
  79. package/dist/{shapeTypes-C0NcoN5g.cjs → shapeTypes-C1Ljs72p.cjs} +20 -18
  80. package/dist/{shapeTypes-DfBx__EF.js → shapeTypes-DiCMRU6Z.js} +20 -18
  81. package/dist/sketching/compoundSketch.d.ts +3 -2
  82. package/dist/sketching/sketch.d.ts +5 -4
  83. package/dist/sketching/sketches.d.ts +3 -2
  84. package/dist/sketching.cjs +3 -3
  85. package/dist/sketching.js +3 -3
  86. package/dist/{solidBuilders-VPkj5ChQ.cjs → solidBuilders-C6_6tZXG.cjs} +3 -3
  87. package/dist/{solidBuilders-BZ1qXlFZ.js → solidBuilders-Dzhk5L6w.js} +3 -3
  88. package/dist/{surfaceBuilders-DQre19g8.cjs → surfaceBuilders-CU_vd71e.cjs} +3 -3
  89. package/dist/{surfaceBuilders-sBre5aYy.js → surfaceBuilders-Idshk6C3.js} +3 -3
  90. package/dist/text.cjs +2 -2
  91. package/dist/text.js +2 -2
  92. package/dist/{textBlueprints-ChDNr0L4.cjs → textBlueprints-BmIxy1fi.cjs} +8 -8
  93. package/dist/{textBlueprints-DCorV4gM.js → textBlueprints-DyT-kfxc.js} +8 -8
  94. package/dist/{textMetrics-C0qTX3sH.cjs → textMetrics-CbDASt0r.cjs} +1 -1
  95. package/dist/{textMetrics-ByzyMC1I.js → textMetrics-DuzBLY9z.js} +1 -1
  96. package/dist/{threadFns-AJP69FU6.js → threadFns-CN1R3YKa.js} +7 -7
  97. package/dist/{threadFns-CzWqzDN_.cjs → threadFns-YPn7KF9u.cjs} +7 -7
  98. package/dist/topology/apiTypes.d.ts +3 -3
  99. package/dist/topology/wrapperFns.d.ts +11 -2
  100. package/dist/topology.cjs +9 -9
  101. package/dist/topology.js +9 -9
  102. package/dist/{topologyQueryFns-svM8Yfsk.cjs → topologyQueryFns-0Ycw298Y.cjs} +1 -1
  103. package/dist/{topologyQueryFns-CTCsQIH_.js → topologyQueryFns-CNOqc1rB.js} +1 -1
  104. package/dist/{validityTypes-BCUWXQNA.cjs → validityTypes-CXnc46WG.cjs} +1 -1
  105. package/dist/{validityTypes-DrWg6_qM.js → validityTypes-rUpnumpL.js} +1 -1
  106. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
1
  import { KernelShape } from '../kernel/types.js';
2
2
  import { UnknownDimShape } from '../core/shapeTypes.js';
3
3
  import { Result } from '../core/result.js';
4
+ import { MeshTopology } from './meshTopology.js';
5
+ type Vec3 = [number, number, number];
4
6
  /**
5
7
  * Sew faces into one solid per closed body.
6
8
  *
@@ -10,18 +12,34 @@ import { Result } from '../core/result.js';
10
12
  * inward-facing closed shell inside another body is a cavity, cut from that
11
13
  * body. The caller keeps ownership of `faces`.
12
14
  *
15
+ * Pass `mesh`, the {@link sewableTopology} of the triangles `faces` were built
16
+ * from (face `i` from triangle `i`), to skip the kernel's orientation
17
+ * repair, which is nearly all of the time: when the sewn faces have exactly the
18
+ * vertices, edges, and shells it predicts, each closed body becomes a solid
19
+ * straight from its shell.
20
+ *
13
21
  * @throws When the kernel cannot sew the faces at all.
14
22
  */
15
- export declare function sewFacesIntoSolids(faces: KernelShape[], tolerance: number): UnknownDimShape;
23
+ export declare function sewFacesIntoSolids(faces: KernelShape[], tolerance: number, mesh?: MeshTopology | null): UnknownDimShape;
24
+ /**
25
+ * The {@link analyzeMesh} topology of the triangles in `positions` (nine
26
+ * coordinates per triangle) for {@link sewFacesIntoSolids}, or `null` when the
27
+ * mesh fails the analysis or the kernel's sewing may reorient faces.
28
+ */
29
+ export declare function sewableTopology(positions: ArrayLike<number> | null): MeshTopology | null;
16
30
  /**
17
- * Build triangular B-Rep faces from vertex data and sew them into solids.
31
+ * Build triangular B-Rep faces from vertex data and sew them into solids with
32
+ * {@link sewFacesIntoSolids}.
18
33
  *
19
- * For each triple of vertex coordinates, calls `kernel.buildTriFace` to create
20
- * a planar triangular face, then sews them with {@link sewFacesIntoSolids}.
34
+ * A mesh with a {@link sewableTopology} gets its faces from the kernel's STL
35
+ * reader, already sharing edges, when the kernel reads an STL into faces.
36
+ * Otherwise `kernel.buildTriFace` builds a planar face per triangle.
21
37
  *
22
38
  * @param triangles - Array of vertex triples, each triple being three [x,y,z] tuples.
23
39
  * @param errorCode - The error code to use in any returned errors.
24
40
  * @param tolerance - Sewing tolerance (default 1e-6).
41
+ * @param mesh - The triangles' {@link sewableTopology}, when the caller already has it.
25
42
  * @returns A `Result` wrapping the sewn shape, or an error.
26
43
  */
27
- export declare function sewMeshToSolid(triangles: Array<[[number, number, number], [number, number, number], [number, number, number]]>, errorCode: string, tolerance?: number): Result<UnknownDimShape>;
44
+ export declare function sewMeshToSolid(triangles: Array<[Vec3, Vec3, Vec3]>, errorCode: string, tolerance?: number, mesh?: MeshTopology | null): Result<UnknownDimShape>;
45
+ export {};
@@ -1,11 +1,32 @@
1
1
  import { AnyShape, Dimension, Shell } from '../core/shapeTypes.js';
2
2
  type Body = AnyShape<Dimension>;
3
+ type Vec3 = [number, number, number];
4
+ export interface Box {
5
+ min: Vec3;
6
+ max: Vec3;
7
+ }
8
+ /** Triangles as vertex coordinates (three per vertex) and vertex indices (three per triangle). */
9
+ interface Triangles {
10
+ vertices: ArrayLike<number>;
11
+ triangles: ArrayLike<number>;
12
+ }
13
+ /** What nesting needs to know about a closed body. */
14
+ export interface BodyOutline {
15
+ box(): Box;
16
+ /** The body's boundary as triangles. */
17
+ mesh(): Triangles;
18
+ /** Whether the body's triangles faced inward before it was solidified. */
19
+ facesInward(): boolean;
20
+ }
21
+ /** The outline of `body`, read from the kernel; `shell` is the sewn shell it was built from. */
22
+ export declare function shellOutline(body: Body, shell: Shell): BodyOutline;
3
23
  /**
4
- * The parts to keep: `bodies` (each built from the same-index shell of `shells`)
5
- * with every cavity cut from the body around it and left out. Cut results are
6
- * pushed to `owned` for the caller to dispose; no input is disposed here.
24
+ * The parts to keep: `bodies` (each described by the same-index entry of
25
+ * `outlines`) with every cavity cut from the body around it and left out. Cut
26
+ * results are pushed to `owned` for the caller to dispose; no input is disposed
27
+ * here.
7
28
  *
8
29
  * @throws When meshing or a cut fails, rather than leave a cavity filled.
9
30
  */
10
- export declare function carveCavities(bodies: Body[], shells: Shell[], owned: Body[]): Body[];
31
+ export declare function carveCavities(bodies: Body[], outlines: Array<BodyOutline | undefined>, owned: Body[]): Body[];
11
32
  export {};
@@ -0,0 +1,33 @@
1
+ import { BodyOutline } from './meshNesting.js';
2
+ /** Triangles joined edge to edge. */
3
+ export interface MeshBody {
4
+ /** Indices of the body's triangles in the mesh. */
5
+ readonly triangles: readonly number[];
6
+ readonly vertexCount: number;
7
+ readonly edgeCount: number;
8
+ /** Every edge joins two of the body's triangles. */
9
+ readonly closed: boolean;
10
+ /** Enclosed volume, negative when the triangles face inward. Zero for an open body. */
11
+ readonly volume: number;
12
+ }
13
+ export interface MeshTopology {
14
+ readonly vertexCount: number;
15
+ readonly edgeCount: number;
16
+ readonly bodies: readonly MeshBody[];
17
+ /** Welded vertex coordinates, three per vertex. */
18
+ readonly vertices: Float64Array;
19
+ /** Welded vertex indices, three per triangle in the mesh's order. */
20
+ readonly corners: Uint32Array;
21
+ }
22
+ /**
23
+ * The topology of the triangles in `positions` (nine coordinates per triangle),
24
+ * welding vertices whose coordinates are identical.
25
+ *
26
+ * Returns `null` for a mesh that sewing might change rather than reproduce: a
27
+ * non-finite coordinate, a triangle with a repeated vertex or no area, an edge
28
+ * shared by more than two triangles, two triangles running the same direction
29
+ * along their shared edge, or a closed body that encloses no volume.
30
+ */
31
+ export declare function analyzeMesh(positions: ArrayLike<number>): MeshTopology | null;
32
+ /** What nesting needs to know about a closed body of `mesh`, read from its triangles. */
33
+ export declare function meshBodyOutline(mesh: MeshTopology, body: MeshBody): BodyOutline;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The triangles of an STL file, read in JavaScript so the importer can check the
3
+ * mesh's topology before the kernel sews it.
4
+ */
5
+ /**
6
+ * The corner coordinates of every facet, nine per triangle in file order, or
7
+ * `null` when the file is malformed. Text versus binary is decided as OCCT's
8
+ * reader decides it: binary when any of the first 134 bytes is above `~`.
9
+ */
10
+ export declare function stlTrianglePositions(data: ArrayBuffer): Float64Array | null;
@@ -3,14 +3,17 @@ import { Result } from '../core/result.js';
3
3
  /**
4
4
  * Import a 3MF file from a Blob.
5
5
  *
6
- * Extracts the model XML from the ZIP archive and builds one solid per placed
7
- * object by sewing its triangles. Build-item and component transforms are
8
- * applied, and coordinates are scaled from the model `unit` to millimeters.
6
+ * Extracts the model XML from the ZIP archive and builds a shape per placed
7
+ * object by sewing its triangles as `importSTL` sews a file: a `Solid` per
8
+ * closed body, a `Shell` per open one, and each sealed cavity cut from the body
9
+ * around it. Build-item and component transforms are applied, and coordinates
10
+ * are scaled from the model `unit` to millimeters.
9
11
  *
10
12
  * @param blob - A Blob or File containing 3MF data (.3mf).
11
- * @returns A `Result` wrapping the imported solid (a `Compound` of solids when the
12
- * build places several objects), or an error if parsing fails or the build
13
- * expands to more than 100,000 placed objects or 2,000,000 triangles.
13
+ * @returns A `Result` wrapping the imported shape (a `Compound` when the build
14
+ * places several objects or an object holds several bodies), or an error if
15
+ * parsing fails or the build expands to more than 100,000 placed objects or
16
+ * 2,000,000 triangles.
14
17
  *
15
18
  * @example
16
19
  * ```ts
package/dist/io.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_meshFns = require("./meshFns-BDn_nIVv.cjs");
3
- const require_importFns = require("./importFns-C3ILnGTv.cjs");
2
+ const require_meshFns = require("./meshFns-Bz9PPZWP.cjs");
3
+ const require_importFns = require("./importFns-P-TcOJ1G.cjs");
4
4
  exports.blueprintToDXF = require_importFns.blueprintToDXF;
5
5
  exports.exportDXF = require_importFns.exportDXF;
6
6
  exports.exportGlb = require_importFns.exportGlb;
package/dist/io.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-Cp8uEpVt.js";
2
- import { a as exportSTEPConfigured, c as exportThreeMF, d as exportGlb, f as exportGltf, l as blueprintToDXF, n as importSTEP, o as importSVG, p as exportOBJ, r as importSTL, s as importSVGPathD, t as importIGES, u as exportDXF } from "./importFns-BXiAHbyn.js";
1
+ import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-BpBgKIIE.js";
2
+ import { a as exportSTEPConfigured, c as exportThreeMF, d as exportGlb, f as exportGltf, l as blueprintToDXF, n as importSTEP, o as importSVG, p as exportOBJ, r as importSTL, s as importSVGPathD, t as importIGES, u as exportDXF } from "./importFns-C9TUFscx.js";
3
3
  export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
@@ -30,10 +30,18 @@ export interface KernelCapabilities {
30
30
  * or fillet. Kernels that rebuild the maps by geometric matching leave it unset.
31
31
  */
32
32
  readonly nativeHistory?: boolean | undefined;
33
+ /**
34
+ * `sew` keeps every face's orientation, so faces wound consistently sew into a
35
+ * consistently oriented shell, and `solidFromShell` bounds the solid by that
36
+ * shell as it is (after `reverseShape`, by its inside-out twin). Mesh import
37
+ * relies on it to build solids without an orientation repair pass. Kernels
38
+ * that reorient while sewing leave it unset.
39
+ */
40
+ readonly sewKeepsOrientation?: boolean | undefined;
33
41
  }
34
42
  /** Default for an exact B-rep kernel (OCCT family, brepkit). */
35
43
  export declare const EXACT_BREP_CAPABILITIES: KernelCapabilities;
36
- /** OCCT-family kernels: exact B-rep with OCCT's own shape history. */
44
+ /** OCCT-family kernels: exact B-rep with OCCT's own shape history and sewing. */
37
45
  export declare const OCCT_CAPABILITIES: KernelCapabilities;
38
46
  /**
39
47
  * Conservative fallback for a kernel that doesn't declare capabilities: assume
@@ -1,6 +1,7 @@
1
1
  import { BooleanOptions, DiagnosticOperationResult, KernelShape, KernelType, OperationResult } from '../types.js';
2
2
  export interface KernelEvolutionOps {
3
3
  translateWithHistory(shape: KernelShape, x: number, y: number, z: number, inputFaceHashes: number[], hashUpperBound: number): OperationResult;
4
+ /** {@link KernelTransformOps.rotate} with face history: `angle` is in radians. */
4
5
  rotateWithHistory(shape: KernelShape, angle: number, inputFaceHashes: number[], hashUpperBound: number, axis?: readonly [number, number, number], center?: readonly [number, number, number]): OperationResult;
5
6
  mirrorWithHistory(shape: KernelShape, origin: readonly [number, number, number], normal: readonly [number, number, number], inputFaceHashes: number[], hashUpperBound: number): OperationResult;
6
7
  scaleWithHistory(shape: KernelShape, center: readonly [number, number, number], factor: number, inputFaceHashes: number[], hashUpperBound: number): OperationResult;
@@ -9,6 +9,7 @@ export type TransformEntry = {
9
9
  } | {
10
10
  readonly type: 'rotate';
11
11
  readonly shape: KernelShape;
12
+ /** Degrees, unlike {@link KernelTransformOps.rotate}, which takes radians. */
12
13
  readonly angle: number;
13
14
  readonly axis: readonly [number, number, number];
14
15
  readonly center: readonly [number, number, number];
@@ -24,7 +25,10 @@ export type TransformEntry = {
24
25
  readonly normal: readonly [number, number, number];
25
26
  };
26
27
  export interface KernelTransformOps {
27
- /** Create a composed transform from a sequence of translate/rotate operations. Returns an opaque handle. */
28
+ /**
29
+ * Create a composed transform from a sequence of translate/rotate operations. Returns an
30
+ * opaque handle. Rotate angles here are in degrees.
31
+ */
28
32
  composeTransform(ops: Array<{
29
33
  type: 'translate';
30
34
  x: number;
@@ -51,6 +55,7 @@ export interface KernelTransformOps {
51
55
  */
52
56
  locate(shape: KernelShape, trsf: KernelType): KernelShape;
53
57
  translate(shape: KernelShape, x: number, y: number, z: number): KernelShape;
58
+ /** Rotate by `angle` radians about `axis` (default +Z) through `center` (default origin). */
54
59
  rotate(shape: KernelShape, angle: number, axis?: readonly [number, number, number], center?: readonly [number, number, number]): KernelShape;
55
60
  mirror(shape: KernelShape, origin: readonly [number, number, number], normal: readonly [number, number, number]): KernelShape;
56
61
  scale(shape: KernelShape, center: readonly [number, number, number], factor: number): KernelShape;
@@ -61,7 +66,7 @@ export interface KernelTransformOps {
61
66
  positionOnCurve(shape: KernelShape, spine: KernelShape, param: number): KernelShape;
62
67
  /** Generate a linear pattern of shapes with pooled transforms for performance. */
63
68
  linearPattern(shape: KernelShape, direction: [number, number, number], spacing: number, count: number): KernelShape[];
64
- /** Generate a circular pattern of shapes. */
69
+ /** Generate a circular pattern of shapes, `angleStep` degrees apart. */
65
70
  circularPattern(shape: KernelShape, center: [number, number, number], axis: [number, number, number], angleStep: number, count: number): KernelShape[];
66
71
  /** Generate a 2D grid pattern (brepkit-native). Returns a compound. */
67
72
  gridPattern?(shape: KernelShape, directionX: [number, number, number], directionY: [number, number, number], spacingX: number, spacingY: number, countX: number, countY: number): KernelShape;
@@ -24,7 +24,7 @@ export declare function locate(oc: KernelInstance, shape: KernelShape, trsf: Ker
24
24
  */
25
25
  export declare function translate(oc: KernelInstance, shape: KernelShape, x: number, y: number, z: number): KernelShape;
26
26
  /**
27
- * Rotates a shape around an axis.
27
+ * Rotates a shape by `angle` radians around an axis.
28
28
  */
29
29
  export declare function rotate(oc: KernelInstance, shape: KernelShape, angle: number, axis?: readonly [number, number, number], center?: readonly [number, number, number]): KernelShape;
30
30
  /**
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_occtWasmAdapter = require("../../occtWasmAdapter-BK--kx4R.cjs");
2
+ const require_occtWasmAdapter = require("../../occtWasmAdapter-DzxyXpLG.cjs");
3
3
  exports.OcctWasmAdapter = require_occtWasmAdapter.OcctWasmAdapter;
@@ -1 +1 @@
1
- export { t as OcctWasmAdapter } from "../../occtWasmAdapter-C-Qi-jxS.js";
1
+ export { t as OcctWasmAdapter } from "../../occtWasmAdapter-DeVQrL5n.js";
@@ -1,4 +1,4 @@
1
- import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-DfBx__EF.js";
1
+ import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-DiCMRU6Z.js";
2
2
  import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode } from "./errors-BTccWbtE.js";
3
3
  import { r as toVec3 } from "./types-CKXsIm9-.js";
4
4
  import { c as vecLength, t as vecAdd } from "./vecOps-S-m9H_fe.js";
@@ -81,18 +81,6 @@ function castSweepShellTuple(result) {
81
81
  endWire
82
82
  ]);
83
83
  }
84
- /**
85
- * Sweep a wire profile along a spine wire to create a 3D shape.
86
- *
87
- * Supports Frenet framing, auxiliary spine twist, scaling laws, contact
88
- * detection, and configurable corner transition modes.
89
- *
90
- * @param wire - The profile wire to sweep (must be closed for solid output).
91
- * @param spine - The path wire to sweep along.
92
- * @param config - Sweep configuration (frenet, transition mode, scaling law, etc.).
93
- * @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
94
- * @returns `Result` containing either a solid or a `[Shape3D, Wire, Wire]` tuple in shell mode.
95
- */
96
84
  function sweep(wire, spine, config = {}, shellMode = false) {
97
85
  if (config.mode === "simple" && !shellMode) {
98
86
  const kernel = getKernel();
@@ -149,29 +137,23 @@ function sweep(wire, spine, config = {}, shellMode = false) {
149
137
  * @returns `Result` containing the swept 3D shape.
150
138
  */
151
139
  function supportExtrude(wire, center, normal, support) {
152
- return sweep(wire, makeSpineWire(center, vecAdd(center, normal)), { support });
140
+ try {
141
+ var _usingCtx$1 = _usingCtx();
142
+ const endPoint = vecAdd(center, normal);
143
+ return sweep(wire, _usingCtx$1.u(makeSpineWire(center, endPoint)), { support });
144
+ } catch (_) {
145
+ _usingCtx$1.e = _;
146
+ } finally {
147
+ _usingCtx$1.d();
148
+ }
153
149
  }
154
- /**
155
- * Extrude a wire along a normal with optional profile scaling.
156
- *
157
- * Builds a linear spine from `center` to `center + normal` and sweeps the
158
- * profile wire. When `profileShape` is provided, a scaling law (s-curve or
159
- * linear) modulates the cross-section size along the path.
160
- *
161
- * @param wire - The profile wire to sweep (must be closed).
162
- * @param center - Start point of the extrusion spine.
163
- * @param normal - Direction and length of the extrusion. Must be non-zero.
164
- * @param profileShape - Optional scaling profile applied along the extrusion.
165
- * @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
166
- * @returns `Result` containing the extruded shape or a shell tuple.
167
- */
168
150
  function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
169
151
  try {
170
- var _usingCtx$1 = _usingCtx();
152
+ var _usingCtx3 = _usingCtx();
171
153
  const extrusionLength = vecLength(normal);
172
154
  if (extrusionLength < 1e-10) return err(validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length"));
173
155
  const endPoint = vecAdd(center, normal);
174
- const spine = _usingCtx$1.u(makeSpineWire(center, endPoint));
156
+ const spine = _usingCtx3.u(makeSpineWire(center, endPoint));
175
157
  let law = null;
176
158
  if (profileShape) {
177
159
  const lawResult = buildLawFromProfile(extrusionLength, profileShape);
@@ -180,37 +162,22 @@ function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
180
162
  }
181
163
  return sweep(wire, spine, { law }, shellMode);
182
164
  } catch (_) {
183
- _usingCtx$1.e = _;
165
+ _usingCtx3.e = _;
184
166
  } finally {
185
- _usingCtx$1.d();
167
+ _usingCtx3.d();
186
168
  }
187
169
  }
188
- /**
189
- * Extrude a wire along a normal with helical twist and optional profile scaling.
190
- *
191
- * Constructs a helical auxiliary spine that rotates the profile by
192
- * `angleDegrees` over the extrusion length. Combines twist with optional
193
- * s-curve or linear scaling when `profileShape` is provided.
194
- *
195
- * @param wire - The profile wire to sweep (must be closed).
196
- * @param angleDegrees - Total twist rotation in degrees. Must be non-zero.
197
- * @param center - Start point of the extrusion spine.
198
- * @param normal - Direction and length of the extrusion. Must be non-zero.
199
- * @param profileShape - Optional scaling profile applied along the extrusion.
200
- * @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
201
- * @returns `Result` containing the twisted extruded shape or a shell tuple.
202
- */
203
170
  function twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMode = false) {
204
171
  try {
205
- var _usingCtx3 = _usingCtx();
172
+ var _usingCtx4 = _usingCtx();
206
173
  if (Math.abs(angleDegrees) < 1e-10) return err(validationError("ZERO_TWIST_ANGLE", "Twist angle cannot be zero"));
207
174
  const extrusionLength = vecLength(normal);
208
175
  if (extrusionLength < 1e-10) return err(validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length"));
209
176
  const endPoint = vecAdd(center, normal);
210
- const spine = _usingCtx3.u(makeSpineWire(center, endPoint));
177
+ const spine = _usingCtx4.u(makeSpineWire(center, endPoint));
211
178
  const leftHanded = angleDegrees < 0;
212
179
  const pitch = 360 / Math.abs(angleDegrees) * extrusionLength;
213
- const auxiliarySpine = _usingCtx3.u(makeHelixWire(pitch, extrusionLength, 1, center, normal, leftHanded));
180
+ const auxiliarySpine = _usingCtx4.u(makeHelixWire(pitch, extrusionLength, 1, center, normal, leftHanded));
214
181
  let law = null;
215
182
  if (profileShape) {
216
183
  const lawResult = buildLawFromProfile(extrusionLength, profileShape);
@@ -222,9 +189,9 @@ function twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMod
222
189
  law
223
190
  }, shellMode);
224
191
  } catch (_) {
225
- _usingCtx3.e = _;
192
+ _usingCtx4.e = _;
226
193
  } finally {
227
- _usingCtx3.d();
194
+ _usingCtx4.d();
228
195
  }
229
196
  }
230
197
  /** Validate that explicit section locations are in [0,1] and strictly increasing. */
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
3
  const require_types = require("./types-CjF9Rofr.cjs");
4
4
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
@@ -81,18 +81,6 @@ function castSweepShellTuple(result) {
81
81
  endWire
82
82
  ]);
83
83
  }
84
- /**
85
- * Sweep a wire profile along a spine wire to create a 3D shape.
86
- *
87
- * Supports Frenet framing, auxiliary spine twist, scaling laws, contact
88
- * detection, and configurable corner transition modes.
89
- *
90
- * @param wire - The profile wire to sweep (must be closed for solid output).
91
- * @param spine - The path wire to sweep along.
92
- * @param config - Sweep configuration (frenet, transition mode, scaling law, etc.).
93
- * @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
94
- * @returns `Result` containing either a solid or a `[Shape3D, Wire, Wire]` tuple in shell mode.
95
- */
96
84
  function sweep(wire, spine, config = {}, shellMode = false) {
97
85
  if (config.mode === "simple" && !shellMode) {
98
86
  const kernel = require_shapeTypes.getKernel();
@@ -149,29 +137,23 @@ function sweep(wire, spine, config = {}, shellMode = false) {
149
137
  * @returns `Result` containing the swept 3D shape.
150
138
  */
151
139
  function supportExtrude(wire, center, normal, support) {
152
- return sweep(wire, makeSpineWire(center, require_vecOps.vecAdd(center, normal)), { support });
140
+ try {
141
+ var _usingCtx$1 = require_shapeTypes._usingCtx();
142
+ const endPoint = require_vecOps.vecAdd(center, normal);
143
+ return sweep(wire, _usingCtx$1.u(makeSpineWire(center, endPoint)), { support });
144
+ } catch (_) {
145
+ _usingCtx$1.e = _;
146
+ } finally {
147
+ _usingCtx$1.d();
148
+ }
153
149
  }
154
- /**
155
- * Extrude a wire along a normal with optional profile scaling.
156
- *
157
- * Builds a linear spine from `center` to `center + normal` and sweeps the
158
- * profile wire. When `profileShape` is provided, a scaling law (s-curve or
159
- * linear) modulates the cross-section size along the path.
160
- *
161
- * @param wire - The profile wire to sweep (must be closed).
162
- * @param center - Start point of the extrusion spine.
163
- * @param normal - Direction and length of the extrusion. Must be non-zero.
164
- * @param profileShape - Optional scaling profile applied along the extrusion.
165
- * @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
166
- * @returns `Result` containing the extruded shape or a shell tuple.
167
- */
168
150
  function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
169
151
  try {
170
- var _usingCtx$1 = require_shapeTypes._usingCtx();
152
+ var _usingCtx3 = require_shapeTypes._usingCtx();
171
153
  const extrusionLength = require_vecOps.vecLength(normal);
172
154
  if (extrusionLength < 1e-10) return require_errors.err(require_errors.validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length"));
173
155
  const endPoint = require_vecOps.vecAdd(center, normal);
174
- const spine = _usingCtx$1.u(makeSpineWire(center, endPoint));
156
+ const spine = _usingCtx3.u(makeSpineWire(center, endPoint));
175
157
  let law = null;
176
158
  if (profileShape) {
177
159
  const lawResult = buildLawFromProfile(extrusionLength, profileShape);
@@ -180,37 +162,22 @@ function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
180
162
  }
181
163
  return sweep(wire, spine, { law }, shellMode);
182
164
  } catch (_) {
183
- _usingCtx$1.e = _;
165
+ _usingCtx3.e = _;
184
166
  } finally {
185
- _usingCtx$1.d();
167
+ _usingCtx3.d();
186
168
  }
187
169
  }
188
- /**
189
- * Extrude a wire along a normal with helical twist and optional profile scaling.
190
- *
191
- * Constructs a helical auxiliary spine that rotates the profile by
192
- * `angleDegrees` over the extrusion length. Combines twist with optional
193
- * s-curve or linear scaling when `profileShape` is provided.
194
- *
195
- * @param wire - The profile wire to sweep (must be closed).
196
- * @param angleDegrees - Total twist rotation in degrees. Must be non-zero.
197
- * @param center - Start point of the extrusion spine.
198
- * @param normal - Direction and length of the extrusion. Must be non-zero.
199
- * @param profileShape - Optional scaling profile applied along the extrusion.
200
- * @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
201
- * @returns `Result` containing the twisted extruded shape or a shell tuple.
202
- */
203
170
  function twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMode = false) {
204
171
  try {
205
- var _usingCtx3 = require_shapeTypes._usingCtx();
172
+ var _usingCtx4 = require_shapeTypes._usingCtx();
206
173
  if (Math.abs(angleDegrees) < 1e-10) return require_errors.err(require_errors.validationError("ZERO_TWIST_ANGLE", "Twist angle cannot be zero"));
207
174
  const extrusionLength = require_vecOps.vecLength(normal);
208
175
  if (extrusionLength < 1e-10) return require_errors.err(require_errors.validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length"));
209
176
  const endPoint = require_vecOps.vecAdd(center, normal);
210
- const spine = _usingCtx3.u(makeSpineWire(center, endPoint));
177
+ const spine = _usingCtx4.u(makeSpineWire(center, endPoint));
211
178
  const leftHanded = angleDegrees < 0;
212
179
  const pitch = 360 / Math.abs(angleDegrees) * extrusionLength;
213
- const auxiliarySpine = _usingCtx3.u(makeHelixWire(pitch, extrusionLength, 1, center, normal, leftHanded));
180
+ const auxiliarySpine = _usingCtx4.u(makeHelixWire(pitch, extrusionLength, 1, center, normal, leftHanded));
214
181
  let law = null;
215
182
  if (profileShape) {
216
183
  const lawResult = buildLawFromProfile(extrusionLength, profileShape);
@@ -222,9 +189,9 @@ function twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMod
222
189
  law
223
190
  }, shellMode);
224
191
  } catch (_) {
225
- _usingCtx3.e = _;
192
+ _usingCtx4.e = _;
226
193
  } finally {
227
- _usingCtx3.d();
194
+ _usingCtx4.d();
228
195
  }
229
196
  }
230
197
  /** Validate that explicit section locations are in [0,1] and strictly increasing. */
@@ -1,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-svM8Yfsk.cjs");
4
- const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-0Ycw298Y.cjs");
4
+ const require_faceFns = require("./faceFns-DdMpocg9.cjs");
5
5
  // src/measurement/measureCache.ts
6
6
  var cache = /* @__PURE__ */ new WeakMap();
7
7
  function getCachedMeasurement(shape, key) {
@@ -1,7 +1,7 @@
1
- import { q as getKernel } from "./shapeTypes-DfBx__EF.js";
1
+ import { q as getKernel } from "./shapeTypes-DiCMRU6Z.js";
2
2
  import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-BTccWbtE.js";
3
- import { E as kernelCallRaw } from "./topologyQueryFns-CTCsQIH_.js";
4
- import { m as uvBounds } from "./faceFns-B3vblI_s.js";
3
+ import { E as kernelCallRaw } from "./topologyQueryFns-CNOqc1rB.js";
4
+ import { m as uvBounds } from "./faceFns-Dodcduw8.js";
5
5
  // src/measurement/measureCache.ts
6
6
  var cache = /* @__PURE__ */ new WeakMap();
7
7
  function getCachedMeasurement(shape, key) {
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_measureFns = require("./measureFns-DN5YMfKZ.cjs");
3
- const require_principalBoxFns = require("./principalBoxFns-DT4ngNuy.cjs");
2
+ const require_measureFns = require("./measureFns-B0Cy7GcQ.cjs");
3
+ const require_principalBoxFns = require("./principalBoxFns-CzEBI6tC.cjs");
4
4
  exports.createDistanceQuery = require_measureFns.createDistanceQuery;
5
5
  exports.measureArea = require_measureFns.measureArea;
6
6
  exports.measureDistance = require_measureFns.measureDistance;
@@ -1,3 +1,3 @@
1
- import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-CT2TRojo.js";
2
- import { t as principalBoundingBox } from "./principalBoxFns-farY7tvh.js";
1
+ import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-DoUWDfAP.js";
2
+ import { t as principalBoundingBox } from "./principalBoxFns-DwitCsif.js";
3
3
  export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, principalBoundingBox };
@@ -1,8 +1,8 @@
1
- import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-DfBx__EF.js";
2
- import { j as isUnsupportedKernelOperationError } from "./occtWasmAdapter-C-Qi-jxS.js";
1
+ import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-DiCMRU6Z.js";
2
+ import { j as isUnsupportedKernelOperationError } from "./occtWasmAdapter-DeVQrL5n.js";
3
3
  import { E as ok, g as err, r as ioError, t as BrepErrorCode, u as unsupportedError } from "./errors-BTccWbtE.js";
4
- import { d as getSolids, n as getBounds } from "./topologyQueryFns-CTCsQIH_.js";
5
- import { d as getFaceOrigins } from "./solidBuilders-BZ1qXlFZ.js";
4
+ import { d as getSolids, n as getBounds } from "./topologyQueryFns-CNOqc1rB.js";
5
+ import { d as getFaceOrigins } from "./solidBuilders-Dzhk5L6w.js";
6
6
  // src/topology/meshCache.ts
7
7
  /**
8
8
  * Build a parameter key for the inner cache map (excludes shape identity).
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
2
- const require_occtWasmAdapter = require("./occtWasmAdapter-BK--kx4R.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
2
+ const require_occtWasmAdapter = require("./occtWasmAdapter-DzxyXpLG.cjs");
3
3
  const require_errors = require("./errors-O_blYTWT.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-svM8Yfsk.cjs");
5
- const require_solidBuilders = require("./solidBuilders-VPkj5ChQ.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-0Ycw298Y.cjs");
5
+ const require_solidBuilders = require("./solidBuilders-C6_6tZXG.cjs");
6
6
  // src/topology/meshCache.ts
7
7
  /**
8
8
  * Build a parameter key for the inner cache map (excludes shape identity).
@@ -7,10 +7,11 @@ var EXACT_BREP_CAPABILITIES = {
7
7
  exactMeasurement: true,
8
8
  tessellationModel: "extract-time"
9
9
  };
10
- /** OCCT-family kernels: exact B-rep with OCCT's own shape history. */
10
+ /** OCCT-family kernels: exact B-rep with OCCT's own shape history and sewing. */
11
11
  var OCCT_CAPABILITIES = {
12
12
  ...EXACT_BREP_CAPABILITIES,
13
- nativeHistory: true
13
+ nativeHistory: true,
14
+ sewKeepsOrientation: true
14
15
  };
15
16
  /**
16
17
  * Conservative fallback for a kernel that doesn't declare capabilities: assume
@@ -4465,7 +4466,7 @@ function transformBatch(k, entries) {
4465
4466
  return entries.map((entry) => {
4466
4467
  switch (entry.type) {
4467
4468
  case "translate": return translate(k, entry.shape, entry.x, entry.y, entry.z);
4468
- case "rotate": return rotate(k, entry.shape, entry.angle, entry.axis, entry.center);
4469
+ case "rotate": return rotate(k, entry.shape, entry.angle * Math.PI / 180, entry.axis, entry.center);
4469
4470
  case "scale": return scale(k, entry.shape, entry.center, entry.factor);
4470
4471
  case "mirror": return mirror(k, entry.shape, entry.origin, entry.normal);
4471
4472
  default: throw new Error("occt-wasm: transformBatch unknown type");
@@ -7,10 +7,11 @@ var EXACT_BREP_CAPABILITIES = {
7
7
  exactMeasurement: true,
8
8
  tessellationModel: "extract-time"
9
9
  };
10
- /** OCCT-family kernels: exact B-rep with OCCT's own shape history. */
10
+ /** OCCT-family kernels: exact B-rep with OCCT's own shape history and sewing. */
11
11
  var OCCT_CAPABILITIES = {
12
12
  ...EXACT_BREP_CAPABILITIES,
13
- nativeHistory: true
13
+ nativeHistory: true,
14
+ sewKeepsOrientation: true
14
15
  };
15
16
  /**
16
17
  * Conservative fallback for a kernel that doesn't declare capabilities: assume
@@ -4465,7 +4466,7 @@ function transformBatch(k, entries) {
4465
4466
  return entries.map((entry) => {
4466
4467
  switch (entry.type) {
4467
4468
  case "translate": return translate(k, entry.shape, entry.x, entry.y, entry.z);
4468
- case "rotate": return rotate(k, entry.shape, entry.angle, entry.axis, entry.center);
4469
+ case "rotate": return rotate(k, entry.shape, entry.angle * Math.PI / 180, entry.axis, entry.center);
4469
4470
  case "scale": return scale(k, entry.shape, entry.center, entry.factor);
4470
4471
  case "mirror": return mirror(k, entry.shape, entry.origin, entry.normal);
4471
4472
  default: throw new Error("occt-wasm: transformBatch unknown type");