nodi-modular 0.0.31 → 0.0.33

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/index.d.ts CHANGED
@@ -1,6 +1,11 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export function do_nothing_just_tell_wasm_bindgen_to_generate_types(): void;
4
+ /**
5
+ * Evaluation item interoperability type.
6
+ */
7
+ export type Item = { variant: "Bool"; data: boolean } | { variant: "String"; data: string } | { variant: "Number"; data: number } | { variant: "Domain"; data: Domain } | { variant: "Vector3"; data: Vector3<number> } | { variant: "Matrix4"; data: Matrix4<number> } | { variant: "Complex"; data: Complex<number> } | { variant: "Point3"; data: Point3<number> } | { variant: "Plane"; data: Plane } | { variant: "GeometryTransform"; data: GeometryTransformInterop } | { variant: "MeshFace"; data: MeshTriangleFace };
8
+
4
9
  export type NodeOutput = (Map<string, Item[]> | undefined)[];
5
10
 
6
11
  export interface GeometryTransformInterop {
@@ -8,11 +13,6 @@ export interface GeometryTransformInterop {
8
13
  transform: TransformInterop;
9
14
  }
10
15
 
11
- /**
12
- * Evaluation item interoperability type.
13
- */
14
- export type Item = { variant: "Bool"; data: boolean } | { variant: "String"; data: string } | { variant: "Number"; data: number } | { variant: "Domain"; data: Domain } | { variant: "Vector3"; data: Vector3<number> } | { variant: "Matrix4"; data: Matrix4<number> } | { variant: "Complex"; data: Complex<number> } | { variant: "Point3"; data: Point3<number> } | { variant: "Plane"; data: Plane } | { variant: "GeometryTransform"; data: GeometryTransformInterop } | { variant: "MeshFace"; data: MeshTriangleFace };
15
-
16
16
  export interface GeometrySpreadsheet {
17
17
  points: Point3<number>[];
18
18
  curves: CurveProxy[];
@@ -20,6 +20,27 @@ export interface GeometrySpreadsheet {
20
20
  meshes: MeshInterop[];
21
21
  }
22
22
 
23
+ export type NodeSectionInterop = { type: "section"; content: NodeFolderInterop } | { type: "item"; content: NodeItemInterop };
24
+
25
+ export interface NodeItemInterop {
26
+ key: string;
27
+ name: string;
28
+ }
29
+
30
+ export type NodeFolderInterop = IndexMap<string, NodeSectionInterop>;
31
+
32
+ export interface NodeMapInterop {
33
+ folder: NodeFolderInterop;
34
+ }
35
+
36
+ export interface IOInterop {
37
+ id: string;
38
+ name: string;
39
+ accessType: AccessTypes;
40
+ hint: TypeHint | undefined;
41
+ connections: string[];
42
+ }
43
+
23
44
  /**
24
45
  * Interop struct for evaluation results
25
46
  */
@@ -34,95 +55,37 @@ export interface EvaluationInterop {
34
55
  geometryIdentifiers: GeometryIdentifier[];
35
56
  }
36
57
 
37
- export type GeometryInteropHandleProxy = { variant: "Mesh"; data: MeshInteropHandle } | { variant: "Curve"; data: CurveInteropHandle } | { variant: "Group"; data: GroupInteropHandle };
38
-
39
- export interface EdgeInterop {
40
- source: EdgeUnitInterop<OutputId>;
41
- destination: EdgeUnitInterop<InputId>;
42
- empty: boolean;
43
- }
44
-
45
- export interface EdgeUnitInterop<IO> {
46
- node: NodeId;
47
- io: IO;
48
- }
49
-
50
- export interface GroupInteropHandle {
51
- objects: GeometryInteropHandleProxy[];
58
+ export interface MeshInteropHandle {
59
+ count: number;
60
+ vertices: number;
61
+ normals: number;
62
+ indices: IndicesInteropHandle | undefined;
63
+ transform: TransformInterop | undefined;
52
64
  }
53
65
 
54
- export interface NodeCreationSetting {
55
- id: NodeId;
56
- variant: string;
57
- name?: string;
58
- label?: string;
59
- inputs?: number;
60
- outputs?: number;
61
- properties: NodePropertyInterop[];
62
- enabled?: boolean;
63
- visible?: boolean;
66
+ export interface PointListHandleUnit {
67
+ count: number;
68
+ points: number;
64
69
  }
65
70
 
66
71
  /**
67
- * Options for adaptive tessellation to create geometry interoperability
72
+ * Point display handle for wasm interop
68
73
  */
69
- export interface AdaptiveTessellationOptions {
70
- /**
71
- * Whether to enable adaptive tessellation
72
- */
73
- enabled: boolean;
74
- /**
75
- * Tolerance for the normal vector: if the L2 norm of the normal vectors is below this value, the edge is considered flat
76
- */
77
- normTolerance: number;
78
- /**
79
- * Minimum number of divisions in u direction
80
- */
81
- minDivsU: number;
82
- /**
83
- * Minimum number of divisions in v direction
84
- */
85
- minDivsV: number;
86
- /**
87
- * Minimum depth for division
88
- */
89
- minDepth: number;
90
- /**
91
- * Maximum depth for division
92
- */
93
- maxDepth: number;
94
- }
95
-
96
- export interface NodeConnectionInterop {
97
- outputNodeId: string;
98
- outputIndex: number;
99
- inputNodeId: string;
100
- inputIndex: number;
101
- inputConnectionIndex: number | undefined;
102
- }
103
-
104
- export interface IndicesInteropHandle {
105
- count: number;
106
- indices: number;
74
+ export interface PointListDisplayHandle {
75
+ list: PointListHandleUnit[];
76
+ pointSize: number;
107
77
  }
108
78
 
109
79
  /**
110
- * Curve interop handle for wasm interop
111
- * stride = 3 (x, y, z)
80
+ * Vector display handle for wasm interop
81
+ * stride = 6 (3 for point, 3 for vector)
112
82
  */
113
- export interface CurveInteropHandle {
83
+ export interface VectorDisplayHandle {
114
84
  count: number;
115
85
  vertices: number;
116
- transform: TransformInterop | undefined;
117
86
  }
118
87
 
119
- export interface IOInterop {
120
- id: string;
121
- name: string;
122
- accessType: AccessTypes;
123
- hint: TypeHint | undefined;
124
- connections: string[];
125
- }
88
+ export type DisplayProxyHandle = { variant: "Vector"; data: VectorDisplayHandle } | { variant: "PointList"; data: PointListDisplayHandle };
126
89
 
127
90
  /**
128
91
  * Interop struct for node
@@ -189,49 +152,39 @@ export interface NodeMetaInterop {
189
152
  hasGeometry: boolean;
190
153
  }
191
154
 
192
- export interface MeshInteropHandle {
193
- count: number;
194
- vertices: number;
195
- normals: number;
196
- indices: IndicesInteropHandle | undefined;
197
- transform: TransformInterop | undefined;
198
- }
155
+ export type GeometryInteropHandleProxy = { variant: "Mesh"; data: MeshInteropHandle } | { variant: "Curve"; data: CurveInteropHandle } | { variant: "Group"; data: GroupInteropHandle };
199
156
 
200
- export interface PointListHandleUnit {
201
- count: number;
202
- points: number;
157
+ export interface EdgeInterop {
158
+ source: EdgeUnitInterop<OutputId>;
159
+ destination: EdgeUnitInterop<InputId>;
160
+ empty: boolean;
203
161
  }
204
162
 
205
- /**
206
- * Point display handle for wasm interop
207
- */
208
- export interface PointListDisplayHandle {
209
- list: PointListHandleUnit[];
210
- pointSize: number;
163
+ export interface EdgeUnitInterop<IO> {
164
+ node: NodeId;
165
+ io: IO;
211
166
  }
212
167
 
213
168
  /**
214
- * Vector display handle for wasm interop
215
- * stride = 6 (3 for point, 3 for vector)
169
+ * Geometry identifier
216
170
  */
217
- export interface VectorDisplayHandle {
218
- count: number;
219
- vertices: number;
220
- }
221
-
222
- export type DisplayProxyHandle = { variant: "Vector"; data: VectorDisplayHandle } | { variant: "PointList"; data: PointListDisplayHandle };
223
-
224
- export type NodeSectionInterop = { type: "section"; content: NodeFolderInterop } | { type: "item"; content: NodeItemInterop };
225
-
226
- export interface NodeItemInterop {
227
- key: string;
228
- name: string;
229
- }
230
-
231
- export type NodeFolderInterop = IndexMap<string, NodeSectionInterop>;
232
-
233
- export interface NodeMapInterop {
234
- folder: NodeFolderInterop;
171
+ export interface GeometryIdentifier {
172
+ /**
173
+ * Parent node ID
174
+ */
175
+ graphNodeSet?: GraphNodeSet;
176
+ /**
177
+ * Output ID that the geometry is belonged to
178
+ */
179
+ outputId: OutputId;
180
+ /**
181
+ * Geometry ID
182
+ */
183
+ geometryId: ID<GeometryProxy>;
184
+ /**
185
+ * Transform matrix in interop format
186
+ */
187
+ transform: TransformInterop;
235
188
  }
236
189
 
237
190
 
@@ -266,28 +219,6 @@ export type Transform3<T = number> = FixedLengthArray<T, 16>;
266
219
  export type Matrix4<T = number> = FixedLengthArray<FixedLengthArray<T, 4>, 4>;
267
220
 
268
221
 
269
- /**
270
- * Geometry identifier
271
- */
272
- export interface GeometryIdentifier {
273
- /**
274
- * Parent node ID
275
- */
276
- graphNodeSet?: GraphNodeSet;
277
- /**
278
- * Output ID that the geometry is belonged to
279
- */
280
- outputId: OutputId;
281
- /**
282
- * Geometry ID
283
- */
284
- geometryId: ID<GeometryProxy>;
285
- /**
286
- * Transform matrix in interop format
287
- */
288
- transform: TransformInterop;
289
- }
290
-
291
222
  export type GeometryInteropVec = GeometryInterop[];
292
223
 
293
224
  export type NodeConnectionInteropVec = NodeConnectionInterop[];
@@ -334,48 +265,117 @@ export interface NodePropertyInterop {
334
265
  */
335
266
  export type TransformInterop = number[];
336
267
 
337
- export interface NodePropertyCategoryValue {
338
- candidates: IndexMap<string, number>;
339
- selected: number;
268
+ export interface GroupInteropHandle {
269
+ objects: GeometryInteropHandleProxy[];
340
270
  }
341
271
 
342
- export interface NodePropertyRangeValue {
343
- value: number;
344
- min: number | undefined;
345
- max: number | undefined;
346
- step: number | undefined;
272
+ export interface NodeCreationSetting {
273
+ id: NodeId;
274
+ variant: string;
275
+ name?: string;
276
+ label?: string;
277
+ inputs?: number;
278
+ outputs?: number;
279
+ properties: NodePropertyInterop[];
280
+ enabled?: boolean;
281
+ visible?: boolean;
347
282
  }
348
283
 
349
- export type NodePropertyValue = { type: "Number"; content: number } | { type: "Range"; content: NodePropertyRangeValue } | { type: "Range2d"; content: [NodePropertyRangeValue, NodePropertyRangeValue] } | { type: "String"; content: string } | { type: "Bool"; content: boolean } | { type: "NumberVector"; content: number[] } | { type: "Category"; content: NodePropertyCategoryValue } | { type: "Vector2d"; content: [number, number] } | { type: "Vector3d"; content: [number, number, number] } | { type: "Point2d"; content: [number, number] } | { type: "Point3d"; content: [number, number, number] } | { type: "Points2d"; content: [number, number][] } | { type: "Buffer"; content: number[] };
350
-
351
- export type TypeHint = Internal;
352
-
353
- export type GraphMappingTypes = "None" | "Bezier" | "Linear" | "Sine";
354
-
355
284
  /**
356
- * A sub graph is a graph that is a part of a larger graph
285
+ * Options for adaptive tessellation to create geometry interoperability
357
286
  */
358
- export interface SubGraph<T, U> {
287
+ export interface AdaptiveTessellationOptions {
359
288
  /**
360
- * The id of the sub graph
289
+ * Whether to enable adaptive tessellation
361
290
  */
362
- id: SubGraphId;
291
+ enabled: boolean;
363
292
  /**
364
- * The graph of the sub graph
293
+ * Tolerance for the normal vector: if the L2 norm of the normal vectors is below this value, the edge is considered flat
365
294
  */
366
- graph: Graph<T, U>;
295
+ normTolerance: number;
367
296
  /**
368
- * The instances of the sub graph
297
+ * Minimum number of divisions in u direction
369
298
  */
370
- instances: SubGraphInstanceId[];
371
- }
372
-
373
- export interface Prune<T, U> {
374
- connectedComponents: ConnectedComponents<T, U>[];
375
- bypass: Connection[] | undefined;
376
- }
377
-
378
- export type GraphVariant = "Root" | { SubGraph: SubGraphId };
299
+ minDivsU: number;
300
+ /**
301
+ * Minimum number of divisions in v direction
302
+ */
303
+ minDivsV: number;
304
+ /**
305
+ * Minimum depth for division
306
+ */
307
+ minDepth: number;
308
+ /**
309
+ * Maximum depth for division
310
+ */
311
+ maxDepth: number;
312
+ }
313
+
314
+ export interface NodeConnectionInterop {
315
+ outputNodeId: string;
316
+ outputIndex: number;
317
+ inputNodeId: string;
318
+ inputIndex: number;
319
+ inputConnectionIndex: number | undefined;
320
+ }
321
+
322
+ export interface IndicesInteropHandle {
323
+ count: number;
324
+ indices: number;
325
+ }
326
+
327
+ /**
328
+ * Curve interop handle for wasm interop
329
+ * stride = 3 (x, y, z)
330
+ */
331
+ export interface CurveInteropHandle {
332
+ count: number;
333
+ vertices: number;
334
+ transform: TransformInterop | undefined;
335
+ }
336
+
337
+ export type GraphMappingTypes = "None" | "Bezier" | "Linear" | "Sine";
338
+
339
+ export interface NodePropertyCategoryValue {
340
+ candidates: IndexMap<string, number>;
341
+ selected: number;
342
+ }
343
+
344
+ export interface NodePropertyRangeValue {
345
+ value: number;
346
+ min: number | undefined;
347
+ max: number | undefined;
348
+ step: number | undefined;
349
+ }
350
+
351
+ export type NodePropertyValue = { type: "Number"; content: number } | { type: "Range"; content: NodePropertyRangeValue } | { type: "Range2d"; content: [NodePropertyRangeValue, NodePropertyRangeValue] } | { type: "String"; content: string } | { type: "Bool"; content: boolean } | { type: "NumberVector"; content: number[] } | { type: "Category"; content: NodePropertyCategoryValue } | { type: "Vector2d"; content: [number, number] } | { type: "Vector3d"; content: [number, number, number] } | { type: "Point2d"; content: [number, number] } | { type: "Point3d"; content: [number, number, number] } | { type: "Points2d"; content: [number, number][] } | { type: "Buffer"; content: number[] };
352
+
353
+ export type TypeHint = Internal;
354
+
355
+ export interface Prune<T, U> {
356
+ connectedComponents: ConnectedComponents<T, U>[];
357
+ bypass: Connection[] | undefined;
358
+ }
359
+
360
+ export type GraphVariant = "Root" | { SubGraph: SubGraphId };
361
+
362
+ /**
363
+ * A sub graph is a graph that is a part of a larger graph
364
+ */
365
+ export interface SubGraph<T, U> {
366
+ /**
367
+ * The id of the sub graph
368
+ */
369
+ id: SubGraphId;
370
+ /**
371
+ * The graph of the sub graph
372
+ */
373
+ graph: Graph<T, U>;
374
+ /**
375
+ * The instances of the sub graph
376
+ */
377
+ instances: SubGraphInstanceId[];
378
+ }
379
379
 
380
380
  /**
381
381
  * A parameter for an input or output of a node.
@@ -402,15 +402,6 @@ export interface Graph<T, U> {
402
402
  sub_graphs?: IndexMap<SubGraphId, SubGraph<T, U>>;
403
403
  }
404
404
 
405
- export interface ConnectedComponentNode {
406
- sources: NodeId[];
407
- destinations: NodeId[];
408
- }
409
-
410
- export interface ConnectedComponents<T, U> {
411
- nodes: IndexMap<NodeId, ConnectedComponentNode<T, U>>;
412
- }
413
-
414
405
  export interface SubGraphIdSet {
415
406
  subGraphId: SubGraphId;
416
407
  instanceId: SubGraphInstanceId;
@@ -437,8 +428,15 @@ export interface GraphNodeSet {
437
428
 
438
429
  export type AccessTypes = "Item" | "List" | "Tree";
439
430
 
440
- export interface IOManager<T, U> {
441
- parameters: IOParameter<T, U>[];
431
+ export interface Connection {
432
+ source: NodeParameter<OutputId>;
433
+ destination: NodeParameter<InputId>;
434
+ }
435
+
436
+ export interface NodeParameter<T> {
437
+ nodeId: NodeId;
438
+ parameterId: T;
439
+ parameterIndex: number;
442
440
  }
443
441
 
444
442
  export interface Node<T> {
@@ -456,74 +454,25 @@ export type OutputIOManager = IOManager<OutputId, InputId>;
456
454
 
457
455
  export type InputIOManager = IOManager<InputId, OutputId>;
458
456
 
459
- export interface Connection {
460
- source: NodeParameter<OutputId>;
461
- destination: NodeParameter<InputId>;
457
+ export interface ConnectedComponentNode {
458
+ sources: NodeId[];
459
+ destinations: NodeId[];
462
460
  }
463
461
 
464
- export interface NodeParameter<T> {
465
- nodeId: NodeId;
466
- parameterId: T;
467
- parameterIndex: number;
462
+ export interface ConnectedComponents<T, U> {
463
+ nodes: IndexMap<NodeId, ConnectedComponentNode<T, U>>;
468
464
  }
469
465
 
470
-
471
- export type PolylineCurve2D = {
472
- points: Point2[];
473
- };
474
- export type PolylineCurve3D = {
475
- points: Point3[];
476
- };
477
-
478
- /**
479
- * An oriented box in 3D space
480
- */
481
- export interface OrientedBox {
482
- /**
483
- * The plane that the box is aligned to
484
- */
485
- plane: Plane;
486
- /**
487
- * The bounding box in the local coordinate system
488
- */
489
- bounds: BoundingBox3D;
466
+ export interface IOManager<T, U> {
467
+ parameters: IOParameter<T, U>[];
490
468
  }
491
469
 
492
- /**
493
- * A collection of geometry objects
494
- */
495
- export type Group = GeometryTransform[];
496
-
497
- /**
498
- * A face of a mesh with three vertices
499
- */
500
- export interface MeshTriangleFace {
501
- a: number;
502
- b: number;
503
- c: number;
504
- }
505
470
 
506
- /**
507
- * An arc curve in 3D space
508
- */
509
- export interface ArcCurve {
510
- /**
511
- * The base plane of the arc
512
- */
513
- plane: Plane;
514
- /**
515
- * The start angle of the arc
516
- */
517
- startAngle: number;
518
- /**
519
- * The end angle of the arc
520
- */
521
- endAngle: number;
522
- /**
523
- * The radius of the arc
524
- */
525
- radius: number;
526
- }
471
+ export type NurbsCurve3D<T = number> = {
472
+ control_points: Point4<T>[];
473
+ knots: T[];
474
+ degree: T;
475
+ };
527
476
 
528
477
  /**
529
478
  * Interop struct for point cloud data
@@ -539,88 +488,19 @@ export interface PointCloudInterop {
539
488
  transform: Transform3<number>;
540
489
  }
541
490
 
542
- /**
543
- * Geometry proxy for various geometry types
544
- */
545
- export type GeometryProxy = { variant: "Curve"; data: CurveProxy } | { variant: "Surface"; data: SurfaceProxy } | { variant: "Brep"; data: Brep } | { variant: "Mesh"; data: Mesh } | { variant: "BBox"; data: OrientedBox } | { variant: "Group"; data: Group };
546
-
547
491
  export type PolyCurve = CompoundCurve<number, U4>;
548
492
 
493
+ export type NurbsCurve = NurbsCurve3D<number>;
494
+
549
495
  /**
550
496
  * Proxy for various curve types
551
497
  */
552
498
  export type CurveProxy = { variant: "Line"; data: LineCurve3D } | { variant: "Arc"; data: ArcCurve } | { variant: "Circle"; data: CircleCurve } | { variant: "Ellipse"; data: EllipseCurve } | { variant: "Rectangle"; data: RectangleCurve } | { variant: "Polyline"; data: PolylineCurve3D } | { variant: "NURBS"; data: NurbsCurve } | { variant: "Poly"; data: PolyCurve };
553
499
 
554
500
  /**
555
- * A circle curve in 3D space
556
- */
557
- export interface CircleCurve {
558
- /**
559
- * The base plane of the circle
560
- */
561
- plane: Plane;
562
- /**
563
- * The radius of the circle
564
- */
565
- radius: number;
566
- }
567
-
568
-
569
- export type NurbsSurface3D<T = number> = {
570
- control_points: Point4<T>[][];
571
- u_knots: T[];
572
- v_knots: T[];
573
- u_degree: T;
574
- v_degree: T;
575
- };
576
-
577
- /**
578
- * A surface defined by three points
579
- */
580
- export type TriangleSurface = Triangle3D;
581
-
582
- /**
583
- * A surface defined by a plane and two domains in x and y directions
584
- */
585
- export interface PlaneSurface {
586
- /**
587
- * The base plane of the surface
588
- */
589
- plane: Plane;
590
- /**
591
- * The domain in x direction
592
- */
593
- x: Domain;
594
- /**
595
- * The domain in y direction
596
- */
597
- y: Domain;
598
- }
599
-
600
- /**
601
- * A NURBS surface container
602
- */
603
- export type NurbsSurface = NurbsSurface3D<number>;
604
-
605
- /**
606
- * A circular surface
501
+ * Proxy for various surface types
607
502
  */
608
- export interface CircularSurface {
609
- /**
610
- * The base plane of the circle
611
- */
612
- plane: Plane;
613
- /**
614
- * The radius of the circle
615
- */
616
- radius: number;
617
- }
618
-
619
-
620
- export type BoundingBox3D = {
621
- min: Vector3;
622
- max: Vector3;
623
- };
503
+ export type SurfaceProxy = { variant: "Circular"; data: CircularSurface } | { variant: "Triangle"; data: TriangleSurface } | { variant: "Plane"; data: PlaneSurface } | { variant: "NURBS"; data: NurbsSurface } | { variant: "Trimmed"; data: TrimmedSurface };
624
504
 
625
505
 
626
506
  export type Triangle3D = {
@@ -655,6 +535,25 @@ export interface MeshInterop {
655
535
  transform?: Transform3<number>;
656
536
  }
657
537
 
538
+ /**
539
+ * Interop proxy for various geometry types
540
+ */
541
+ export type GeometryInterop = { variant: "Mesh"; data: MeshInterop } | { variant: "Curve"; data: CurveInterop } | { variant: "Point"; data: PointCloudInterop } | { variant: "Plane"; data: Plane } | { variant: "Group"; data: GeometryInterop[] };
542
+
543
+ /**
544
+ * Interop struct for curve data
545
+ */
546
+ export interface CurveInterop {
547
+ /**
548
+ * Vertices of the curve
549
+ */
550
+ vertices: [number, number, number][];
551
+ /**
552
+ * Transform matrix of the curve
553
+ */
554
+ transform: Transform3<number> | undefined;
555
+ }
556
+
658
557
  /**
659
558
  * Mesh representation with vertices, normals, uv, and index
660
559
  */
@@ -677,20 +576,6 @@ export interface Mesh {
677
576
  index: [number, number, number][];
678
577
  }
679
578
 
680
- /**
681
- * Interop struct for curve data
682
- */
683
- export interface CurveInterop {
684
- /**
685
- * Vertices of the curve
686
- */
687
- vertices: [number, number, number][];
688
- /**
689
- * Transform matrix of the curve
690
- */
691
- transform: Transform3<number> | undefined;
692
- }
693
-
694
579
 
695
580
  export type LineCurve3D = {
696
581
  a: Point3;
@@ -698,10 +583,12 @@ export type LineCurve3D = {
698
583
  };
699
584
 
700
585
 
701
- export type NurbsCurve3D<T = number> = {
702
- control_points: Point4<T>[];
703
- knots: T[];
704
- degree: T;
586
+ export type NurbsSurface3D<T = number> = {
587
+ control_points: Point4<T>[][];
588
+ u_knots: T[];
589
+ v_knots: T[];
590
+ u_degree: T;
591
+ v_degree: T;
705
592
  };
706
593
 
707
594
  export interface Domain {
@@ -709,11 +596,6 @@ export interface Domain {
709
596
  max: number;
710
597
  }
711
598
 
712
- /**
713
- * Interop proxy for various geometry types
714
- */
715
- export type GeometryInterop = { variant: "Mesh"; data: MeshInterop } | { variant: "Curve"; data: CurveInterop } | { variant: "Point"; data: PointCloudInterop } | { variant: "Plane"; data: Plane } | { variant: "Group"; data: GeometryInterop[] };
716
-
717
599
  /**
718
600
  * Plane representation with origin, normal, x axis, and y axis
719
601
  */
@@ -736,6 +618,20 @@ export interface Plane {
736
618
  yAxis: Vector3<number>;
737
619
  }
738
620
 
621
+ /**
622
+ * An oriented box in 3D space
623
+ */
624
+ export interface OrientedBox {
625
+ /**
626
+ * The plane that the box is aligned to
627
+ */
628
+ plane: Plane;
629
+ /**
630
+ * The bounding box in the local coordinate system
631
+ */
632
+ bounds: BoundingBox3D;
633
+ }
634
+
739
635
  /**
740
636
  * A geometry object with a transformation
741
637
  */
@@ -751,9 +647,19 @@ export interface GeometryTransform {
751
647
  }
752
648
 
753
649
  /**
754
- * Proxy for various surface types
650
+ * Geometry proxy for various geometry types
755
651
  */
756
- export type SurfaceProxy = { variant: "Circular"; data: CircularSurface } | { variant: "Triangle"; data: TriangleSurface } | { variant: "Plane"; data: PlaneSurface } | { variant: "NURBS"; data: NurbsSurface } | { variant: "Trimmed"; data: TrimmedSurface };
652
+ export type GeometryProxy = { variant: "Curve"; data: CurveProxy } | { variant: "Surface"; data: SurfaceProxy } | { variant: "Brep"; data: Brep } | { variant: "Mesh"; data: Mesh } | { variant: "BBox"; data: OrientedBox } | { variant: "Group"; data: Group };
653
+
654
+ /**
655
+ * A surface defined by three points
656
+ */
657
+ export type TriangleSurface = Triangle3D;
658
+
659
+ /**
660
+ * A NURBS surface container
661
+ */
662
+ export type NurbsSurface = NurbsSurface3D<number>;
757
663
 
758
664
  /**
759
665
  * A rectangle curve in 3D space
@@ -773,8 +679,6 @@ export interface RectangleCurve {
773
679
  y: Domain;
774
680
  }
775
681
 
776
- export type NurbsCurve = NurbsCurve3D<number>;
777
-
778
682
  /**
779
683
  * A ellipse curve in 3D space
780
684
  */
@@ -793,6 +697,102 @@ export interface EllipseCurve {
793
697
  yRadius: number;
794
698
  }
795
699
 
700
+ /**
701
+ * An arc curve in 3D space
702
+ */
703
+ export interface ArcCurve {
704
+ /**
705
+ * The base plane of the arc
706
+ */
707
+ plane: Plane;
708
+ /**
709
+ * The start angle of the arc
710
+ */
711
+ startAngle: number;
712
+ /**
713
+ * The end angle of the arc
714
+ */
715
+ endAngle: number;
716
+ /**
717
+ * The radius of the arc
718
+ */
719
+ radius: number;
720
+ }
721
+
722
+ /**
723
+ * A surface defined by a plane and two domains in x and y directions
724
+ */
725
+ export interface PlaneSurface {
726
+ /**
727
+ * The base plane of the surface
728
+ */
729
+ plane: Plane;
730
+ /**
731
+ * The domain in x direction
732
+ */
733
+ x: Domain;
734
+ /**
735
+ * The domain in y direction
736
+ */
737
+ y: Domain;
738
+ }
739
+
740
+ /**
741
+ * A circular surface
742
+ */
743
+ export interface CircularSurface {
744
+ /**
745
+ * The base plane of the circle
746
+ */
747
+ plane: Plane;
748
+ /**
749
+ * The radius of the circle
750
+ */
751
+ radius: number;
752
+ }
753
+
754
+ /**
755
+ * A circle curve in 3D space
756
+ */
757
+ export interface CircleCurve {
758
+ /**
759
+ * The base plane of the circle
760
+ */
761
+ plane: Plane;
762
+ /**
763
+ * The radius of the circle
764
+ */
765
+ radius: number;
766
+ }
767
+
768
+
769
+ export type PolylineCurve2D = {
770
+ points: Point2[];
771
+ };
772
+ export type PolylineCurve3D = {
773
+ points: Point3[];
774
+ };
775
+
776
+
777
+ export type BoundingBox3D = {
778
+ min: Vector3;
779
+ max: Vector3;
780
+ };
781
+
782
+ /**
783
+ * A collection of geometry objects
784
+ */
785
+ export type Group = GeometryTransform[];
786
+
787
+ /**
788
+ * A face of a mesh with three vertices
789
+ */
790
+ export interface MeshTriangleFace {
791
+ a: number;
792
+ b: number;
793
+ c: number;
794
+ }
795
+
796
796
  /**
797
797
  * Modular structure with a graph handle
798
798
  */
@@ -871,8 +871,8 @@ export interface InitOutput {
871
871
  readonly __externref_table_dealloc: (a: number) => void;
872
872
  readonly __externref_drop_slice: (a: number, b: number) => void;
873
873
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
874
- readonly closure893_externref_shim: (a: number, b: number, c: any) => void;
875
- readonly closure3806_externref_shim: (a: number, b: number, c: any, d: any) => void;
874
+ readonly closure901_externref_shim: (a: number, b: number, c: any) => void;
875
+ readonly closure3815_externref_shim: (a: number, b: number, c: any, d: any) => void;
876
876
  readonly __wbindgen_start: () => void;
877
877
  }
878
878
 
package/index.js CHANGED
@@ -225,11 +225,11 @@ export function do_nothing_just_tell_wasm_bindgen_to_generate_types() {
225
225
  }
226
226
 
227
227
  function __wbg_adapter_52(arg0, arg1, arg2) {
228
- wasm.closure893_externref_shim(arg0, arg1, arg2);
228
+ wasm.closure901_externref_shim(arg0, arg1, arg2);
229
229
  }
230
230
 
231
231
  function __wbg_adapter_129(arg0, arg1, arg2, arg3) {
232
- wasm.closure3806_externref_shim(arg0, arg1, arg2, arg3);
232
+ wasm.closure3815_externref_shim(arg0, arg1, arg2, arg3);
233
233
  }
234
234
 
235
235
  const ModularFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -425,10 +425,10 @@ function __wbg_get_imports() {
425
425
  const ret = Object.entries(arg0);
426
426
  return ret;
427
427
  };
428
- imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
428
+ imports.wbg.__wbg_getRandomValues_38a1ff1ea09f6cc7 = function() { return handleError(function (arg0, arg1) {
429
429
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
430
430
  }, arguments) };
431
- imports.wbg.__wbg_getRandomValues_e14bd3de0db61032 = function() { return handleError(function (arg0, arg1) {
431
+ imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
432
432
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
433
433
  }, arguments) };
434
434
  imports.wbg.__wbg_getTime_46267b1c24877e30 = function(arg0) {
@@ -643,8 +643,8 @@ function __wbg_get_imports() {
643
643
  const ret = false;
644
644
  return ret;
645
645
  };
646
- imports.wbg.__wbindgen_closure_wrapper4049 = function(arg0, arg1, arg2) {
647
- const ret = makeMutClosure(arg0, arg1, 894, __wbg_adapter_52);
646
+ imports.wbg.__wbindgen_closure_wrapper4059 = function(arg0, arg1, arg2) {
647
+ const ret = makeMutClosure(arg0, arg1, 902, __wbg_adapter_52);
648
648
  return ret;
649
649
  };
650
650
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
package/index_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Masatatsu Nakamura <masatatsu.nakamura@gmail.com"
6
6
  ],
7
7
  "description": "Modular is a module project designed to import node graphs created in Nodi in JSON format, enabling the extraction of geometric data generated based on the node graph structure.",
8
- "version": "0.0.31",
8
+ "version": "0.0.33",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",