opengeometry 2.0.17 → 3.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.
Files changed (156) hide show
  1. package/LICENSE.md +373 -0
  2. package/README.md +187 -128
  3. package/body-registry-MbAD6Hyq.js +3159 -0
  4. package/body-registry-MbAD6Hyq.js.map +1 -0
  5. package/index.d.ts +18 -115
  6. package/index.js +1170 -11687
  7. package/index.js.map +1 -1
  8. package/opengeometry/pkg/opengeometry.d.ts +144 -1304
  9. package/opengeometry/pkg/opengeometry.js +1316 -5803
  10. package/opengeometry/pkg/opengeometry_bg.wasm +0 -0
  11. package/opengeometry/pkg/opengeometry_bg.wasm.d.ts +62 -458
  12. package/opengeometry_bg.wasm +0 -0
  13. package/opengeometry_bg.wasm.d.ts +62 -458
  14. package/package.json +54 -34
  15. package/src/bodies/body-factory.d.ts +3 -0
  16. package/src/bodies/body-options.d.ts +19 -0
  17. package/src/bodies/body-placement.d.ts +10 -0
  18. package/src/bodies/body-registry.d.ts +3 -0
  19. package/src/bodies/body.d.ts +71 -0
  20. package/src/bodies/display-clone.d.ts +10 -0
  21. package/src/bodies/node-methods.d.ts +30 -0
  22. package/src/bodies/sheet.d.ts +14 -0
  23. package/src/bodies/solid.d.ts +23 -0
  24. package/src/bodies/system-assembly.d.ts +26 -0
  25. package/src/bodies/wire.d.ts +14 -0
  26. package/src/constants/index.d.ts +4 -0
  27. package/src/constants/operations.d.ts +58 -0
  28. package/src/constants/primitives.d.ts +69 -0
  29. package/src/constants/regions.d.ts +1 -0
  30. package/src/constants/transforms.d.ts +4 -0
  31. package/src/dto/boolean-report.d.ts +24 -0
  32. package/src/dto/bounds.d.ts +1 -0
  33. package/src/dto/brep.d.ts +99 -0
  34. package/src/dto/change-set.d.ts +13 -0
  35. package/src/dto/creation.d.ts +3 -0
  36. package/src/dto/display-buffers.d.ts +14 -0
  37. package/src/dto/events.d.ts +2 -0
  38. package/src/{export/analytic-ifc.d.ts → dto/ifc-body.d.ts} +16 -18
  39. package/src/dto/mark-stats.d.ts +4 -0
  40. package/src/dto/measure.d.ts +16 -0
  41. package/src/dto/mirror.d.ts +4 -0
  42. package/src/dto/node-info.d.ts +11 -0
  43. package/src/dto/pick-result.d.ts +6 -0
  44. package/src/dto/placement.d.ts +6 -0
  45. package/src/dto/primitives.d.ts +77 -0
  46. package/src/dto/regions.d.ts +42 -0
  47. package/src/dto/step-export.d.ts +42 -0
  48. package/src/errors.d.ts +20 -0
  49. package/src/export/export-step.d.ts +10 -0
  50. package/src/export/ifc-body.d.ts +4 -0
  51. package/src/kernel/kernel-errors.d.ts +5 -0
  52. package/src/kernel/kernel-loader.d.ts +5 -0
  53. package/src/kernel/kernel-session.d.ts +2 -0
  54. package/src/limits.d.ts +12 -0
  55. package/src/marks/limbo.d.ts +6 -0
  56. package/src/marks/og-mark.d.ts +10 -0
  57. package/src/marks/transaction.d.ts +3 -0
  58. package/src/opengeometry.d.ts +69 -0
  59. package/src/operations/offsets.d.ts +5 -0
  60. package/src/operations/regions.d.ts +4 -0
  61. package/src/picking/pick-targets.d.ts +6 -0
  62. package/src/picking/resolve-hit.d.ts +3 -0
  63. package/src/rendering/deferred.d.ts +7 -0
  64. package/src/rendering/geometry/geometry-scheduler.d.ts +12 -0
  65. package/src/rendering/geometry/host-group.d.ts +10 -0
  66. package/src/rendering/geometry/render-pass.d.ts +8 -0
  67. package/src/rendering/geometry/settle.d.ts +10 -0
  68. package/src/rendering/inline-backend.d.ts +14 -0
  69. package/src/rendering/lod/body-size.d.ts +11 -0
  70. package/src/rendering/lod/camera-observer.d.ts +2 -0
  71. package/src/rendering/lod/deflection.d.ts +2 -0
  72. package/src/rendering/lod/display-bounds.d.ts +4 -0
  73. package/src/rendering/lod/displayed.d.ts +7 -0
  74. package/src/rendering/lod/host-drawn.d.ts +5 -0
  75. package/src/rendering/lod/host-groups.d.ts +28 -0
  76. package/src/rendering/lod/lod-controller.d.ts +75 -0
  77. package/src/rendering/lod/screen-metrics.d.ts +2 -0
  78. package/src/rendering/materials/material-pool.d.ts +12 -0
  79. package/src/rendering/materials/ref-counted-pool.d.ts +12 -0
  80. package/src/rendering/provider.d.ts +19 -0
  81. package/src/rendering/records/geometry-record.d.ts +21 -0
  82. package/src/rendering/records/record-pool.d.ts +29 -0
  83. package/src/rendering/records/validate-display-buffers.d.ts +2 -0
  84. package/src/rendering/tessellation-worker.d.ts +1 -0
  85. package/src/rendering/worker/job-queue.d.ts +8 -0
  86. package/src/rendering/worker/message-guards.d.ts +9 -0
  87. package/src/rendering/worker/snapshot-cache.d.ts +10 -0
  88. package/src/rendering/worker-backend.d.ts +44 -0
  89. package/src/rendering/worker-protocol.d.ts +52 -0
  90. package/src/runtime/create-runtime.d.ts +7 -0
  91. package/src/runtime/event-bus.d.ts +3 -0
  92. package/src/runtime/reset.d.ts +1 -0
  93. package/src/runtime/runtime-state.d.ts +68 -0
  94. package/src/testing/internals.d.ts +18 -0
  95. package/src/world-graph/codec.d.ts +45 -0
  96. package/src/world-graph/world-graph-client.d.ts +13 -0
  97. package/tessellation-worker.js +634 -0
  98. package/tessellation-worker.js.map +1 -0
  99. package/testing.d.ts +1 -0
  100. package/testing.js +87 -0
  101. package/testing.js.map +1 -0
  102. package/analytic-worker.js +0 -90
  103. package/src/base-types.d.ts +0 -13
  104. package/src/editor/freeform.d.ts +0 -91
  105. package/src/editor/index.d.ts +0 -6
  106. package/src/editor/parametric.d.ts +0 -15
  107. package/src/editor/types.d.ts +0 -223
  108. package/src/examples/booleans.d.ts +0 -24
  109. package/src/examples/editor-modes.d.ts +0 -20
  110. package/src/examples/index.d.ts +0 -11
  111. package/src/examples/offset-ring-variable.d.ts +0 -13
  112. package/src/examples/offset.d.ts +0 -18
  113. package/src/examples/primitives.d.ts +0 -16
  114. package/src/examples/ribbon-from-offsets.d.ts +0 -33
  115. package/src/examples/shapes.d.ts +0 -20
  116. package/src/examples/sweep.d.ts +0 -9
  117. package/src/freeform/geometry.d.ts +0 -82
  118. package/src/freeform/index.d.ts +0 -5
  119. package/src/freeform/types.d.ts +0 -36
  120. package/src/markup/spotMarker.d.ts +0 -4
  121. package/src/operations/analytic-errors.d.ts +0 -8
  122. package/src/operations/boolean-regions.d.ts +0 -20
  123. package/src/operations/boolean.d.ts +0 -16
  124. package/src/operations/editor/freeform.d.ts +0 -1
  125. package/src/operations/editor/index.d.ts +0 -1
  126. package/src/operations/editor/parametric.d.ts +0 -1
  127. package/src/operations/editor/types.d.ts +0 -1
  128. package/src/operations/extrude.d.ts +0 -9
  129. package/src/operations/index.d.ts +0 -9
  130. package/src/operations/loft.d.ts +0 -13
  131. package/src/operations/offset-regions.d.ts +0 -76
  132. package/src/primitives/analytic-curve.d.ts +0 -42
  133. package/src/primitives/arc.d.ts +0 -36
  134. package/src/primitives/curve.d.ts +0 -64
  135. package/src/primitives/elliptical_arc.d.ts +0 -38
  136. package/src/primitives/index.d.ts +0 -9
  137. package/src/primitives/line.d.ts +0 -77
  138. package/src/primitives/polyline.d.ts +0 -78
  139. package/src/primitives/rectangle.d.ts +0 -72
  140. package/src/rendering/analytic-lod.d.ts +0 -32
  141. package/src/rendering/analytic-tessellation.d.ts +0 -32
  142. package/src/shapes/analytic-pattern.d.ts +0 -36
  143. package/src/shapes/analytic-solid.d.ts +0 -304
  144. package/src/shapes/cuboid.d.ts +0 -62
  145. package/src/shapes/cylinder.d.ts +0 -36
  146. package/src/shapes/index.d.ts +0 -11
  147. package/src/shapes/opening.d.ts +0 -31
  148. package/src/shapes/outline-utils.d.ts +0 -35
  149. package/src/shapes/polygon.d.ts +0 -102
  150. package/src/shapes/solid.d.ts +0 -108
  151. package/src/shapes/sphere.d.ts +0 -27
  152. package/src/shapes/sweep.d.ts +0 -76
  153. package/src/shapes/wedge.d.ts +0 -75
  154. package/src/utils/event.d.ts +0 -29
  155. package/src/utils/randomizer.d.ts +0 -1
  156. package/src/world/world-graph.d.ts +0 -112
package/index.d.ts CHANGED
@@ -1,115 +1,18 @@
1
- /**
2
- * Public OpenGeometry JavaScript entrypoint.
3
- */
4
- import { OGAnalyticBrep, OGAnalyticTessellation, WorkPlane, exportBrepToIfc, exportBrepToStep, exportBrepToStl, analyzeProfile, extrudeBrepFaceDirectional, validateAnalyticBrep, tessellate_brep, Vector3 } from "./opengeometry/pkg/opengeometry.js";
5
- import { SpotLabel } from "./src/markup/spotMarker.js";
6
- import { OpenGeometryOptions } from "./src/base-types.js";
7
- export type OUTLINE_TYPE = "front" | "side" | "top";
8
- /**
9
- * Binary STL export payload returned by export helpers.
10
- */
11
- export interface OGStlExportResult {
12
- bytes: Uint8Array;
13
- reportJson: string;
14
- }
15
- /**
16
- * STEP text export payload returned by export helpers.
17
- */
18
- export interface OGStepExportResult {
19
- text: string;
20
- reportJson: string;
21
- }
22
- /**
23
- * IFC text export payload returned by export helpers.
24
- */
25
- export interface OGIfcExportResult {
26
- text: string;
27
- reportJson: string;
28
- }
29
- /**
30
- * Shared runtime entrypoint used to initialize the OpenGeometry wasm module.
31
- */
32
- export declare class OpenGeometry {
33
- static version: string;
34
- static instance: OpenGeometry | null;
35
- private _enableDebug;
36
- get enableDebug(): boolean;
37
- /**
38
- * Enables or disables debug mode for OpenGeometry.
39
- * When enabled, it logs debug information to the console.
40
- * Addtionally,
41
- * 1. The geometry will be rendered with a semi-transparent material.
42
- * 2. The faces will be rendered with a random color.
43
- * 3. The normals will be rendered for better visualization.
44
- * @param value - A boolean indicating whether to enable or disable debug mode.
45
- */
46
- set enableDebug(value: boolean);
47
- constructor();
48
- /**
49
- * Asynchronously initializes the OpenGeometry wasm runtime and returns a
50
- * cached singleton instance on subsequent calls.
51
- *
52
- * Call this before constructing `Vector3` or any kernel-backed wrapper.
53
- *
54
- * @param options - Configuration object for initializing OpenGeometry.
55
- * @returns A promise that resolves to a fully initialized OpenGeometry instance.
56
- *
57
- * @example
58
- * ```ts
59
- * await OpenGeometry.create({
60
- * wasmURL: "/opengeometry_bg.wasm",
61
- * });
62
- * ```
63
- */
64
- static create(options: OpenGeometryOptions): Promise<OpenGeometry>;
65
- private setup;
66
- }
67
- export { exportBrepToIfc, exportBrepToStep, exportBrepToStl };
68
- export { OGAnalyticBrep, OGAnalyticTessellation };
69
- export { WorkPlane, analyzeProfile, extrudeBrepFaceDirectional, validateAnalyticBrep };
70
- export { tessellate_brep };
71
- export { AnalyticSolid } from "./src/shapes/analytic-solid.js";
72
- export { WorldGraph, WorldGraphError, matrixToWorldTransform } from "./src/world/world-graph.js";
73
- export type { WorldClash, WorldClashKind, WorldClashOptions, WorldExportedFile, WorldExportedMesh, WorldGraphErrorCode, WorldNodeOptions, WorldProjectedLine, WorldProjectedLines, WorldProjectedScene, WorldProjectedSegment, WorldProjectionView, WorldProximity, WorldTransform, } from "./src/world/world-graph.js";
74
- export { AnalyticPattern, circularPattern, linearPattern, rectangularPattern } from "./src/shapes/analytic-pattern.js";
75
- export type { AnalyticPatternHit, AnalyticPatternInstance } from "./src/shapes/analytic-pattern.js";
76
- export type { AnalyticBooleanOp, AnalyticBooleanReport, AnalyticBrepOptions, AnalyticFrame, AnalyticAccuracy, AnalyticAnnularSectorOpening, AnalyticProfileEdge, AnalyticPolygonLoftAlignment, AnalyticProjectionCamera, AnalyticProjectionHlr, AnalyticPrimitiveOptions, AnalyticTessellationStats, AnalyticTessellationOptions, AnalyticStepExport, AnalyticStlExport, } from "./src/shapes/analytic-solid.js";
77
- /**
78
- * Shared wasm-backed vector type used throughout the public API.
79
- *
80
- * Initialize `OpenGeometry.create(...)` before constructing `Vector3`.
81
- */
82
- export { Vector3 };
83
- export { SpotLabel };
84
- /**
85
- * Primitive wrappers (line/polyline/arc/rectangle/curve).
86
- */
87
- export * from "./src/primitives/index.js";
88
- /**
89
- * Shape wrappers (polygon/cuboid/cylinder/wedge/opening/sweep/sphere).
90
- */
91
- export * from "./src/shapes/index.js";
92
- /**
93
- * Reusable example builders for quickly wiring demo scenes.
94
- */
95
- export * from "./src/examples/index.js";
96
- /**
97
- * First-class freeform geometry wrapper around the kernel OGFreeformGeometry API.
98
- */
99
- export * from "./src/freeform/index.js";
100
- /**
101
- * Editing helpers that operate on parametric entities and freeform geometry.
102
- */
103
- export * from "./src/editor/index.js";
104
- /**
105
- * Kernel-backed modeling operations (incl. analytic polyline offset → regions).
106
- */
107
- export * from "./src/operations/index.js";
108
- export { AnalyticCurve } from "./src/primitives/analytic-curve.js";
109
- export type { AnalyticCurveOptions, AnalyticCurveStats } from "./src/primitives/analytic-curve.js";
110
- export { AnalyticTessellationWorker } from "./src/rendering/analytic-tessellation.js";
111
- export type { AnalyticWorkerOptions, AnalyticTessellationData } from "./src/rendering/analytic-tessellation.js";
112
- export { AnalyticLodController, deflectionBucket, worldUnitsPerPixel, uniformScale } from "./src/rendering/analytic-lod.js";
113
- export type { AnalyticLodOptions } from "./src/rendering/analytic-lod.js";
114
- export { analyticIfcText } from "./src/export/analytic-ifc.js";
115
- export type { AnalyticExchangeBodyV2, IfcPreparedValue } from "./src/export/analytic-ifc.js";
1
+ export { OpenGeometry } from './src/opengeometry.js';
2
+ export { OGMark } from './src/marks/og-mark.js';
3
+ export type { HostGroup } from './src/rendering/geometry/host-group.js';
4
+ export { SystemAssembly } from './src/bodies/system-assembly.js';
5
+ export { Wire } from './src/bodies/wire.js';
6
+ export { Solid } from './src/bodies/solid.js';
7
+ export { Sheet } from './src/bodies/sheet.js';
8
+ export type { BodyEventMap } from './src/bodies/body.js';
9
+ export type { PointClassification } from './src/bodies/node-methods.js';
10
+ export type { Measure, Validity } from './src/dto/measure.js';
11
+ export type { MirrorPlane } from './src/dto/mirror.js';
12
+ export { OGError } from './src/errors.js';
13
+ export type { ErrorDetails } from './src/errors.js';
14
+ export type { OperateErrorDetails } from './src/dto/boolean-report.js';
15
+ export type { AnalyticExchangeBodyV2, IfcPreparedValue } from './src/dto/ifc-body.js';
16
+ export * from './src/constants/index.js';
17
+ export type { ArcParams, ConeParams, CylinderSectorParams, PolyhedronParams, ProfileArc, ProfileParams, ProfileSegment, SphereParams, TorusParams, SlotPrismParams, RoundedBoxParams, PipeSegmentParams, PolysolidParams, RegularPolygonParams, SlotParams, RoundedRectangleParams, } from './src/dto/primitives.js';
18
+ export type { CurvedRegion2D, CurvedRegionEdge, OffsetHole, OffsetPath2D, OffsetPolylineOptions, OffsetRegion, } from './src/dto/regions.js';