opengeometry 2.0.15 → 2.0.17
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 +4 -6
- package/index.js +3721 -3644
- package/index.js.map +1 -1
- package/opengeometry/pkg/opengeometry.d.ts +1247 -1261
- package/opengeometry/pkg/opengeometry.js +3285 -3846
- package/opengeometry/pkg/opengeometry_bg.wasm +0 -0
- package/opengeometry/pkg/opengeometry_bg.wasm.d.ts +400 -428
- package/opengeometry_bg.wasm +0 -0
- package/opengeometry_bg.wasm.d.ts +400 -428
- package/package.json +1 -1
- package/src/world/world-graph.d.ts +112 -0
package/package.json
CHANGED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
import type { AnalyticFrame, AnalyticProjectionCamera, AnalyticProjectionHlr, AnalyticSolid } from "../shapes/analytic-solid.js";
|
|
3
|
+
export interface WorldTransform {
|
|
4
|
+
frame: AnalyticFrame;
|
|
5
|
+
scale: number;
|
|
6
|
+
}
|
|
7
|
+
export interface WorldNodeOptions {
|
|
8
|
+
id: string;
|
|
9
|
+
parent?: string;
|
|
10
|
+
definition?: string;
|
|
11
|
+
local?: THREE.Matrix4;
|
|
12
|
+
kind?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface WorldProjectedLine {
|
|
15
|
+
start: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
};
|
|
19
|
+
end: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
};
|
|
23
|
+
stroke_width: number | null;
|
|
24
|
+
stroke_color: [number, number, number] | null;
|
|
25
|
+
class?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface WorldProjectedLines {
|
|
28
|
+
name: string | null;
|
|
29
|
+
lines: WorldProjectedLine[];
|
|
30
|
+
}
|
|
31
|
+
export interface WorldProjectedSegment {
|
|
32
|
+
geometry: unknown;
|
|
33
|
+
class: string;
|
|
34
|
+
layer?: string | null;
|
|
35
|
+
source_entity_id?: string | null;
|
|
36
|
+
}
|
|
37
|
+
export interface WorldProjectedScene {
|
|
38
|
+
name: string | null;
|
|
39
|
+
segments: WorldProjectedSegment[];
|
|
40
|
+
}
|
|
41
|
+
export interface WorldProjectionView {
|
|
42
|
+
id: string;
|
|
43
|
+
camera: AnalyticProjectionCamera;
|
|
44
|
+
hlr?: AnalyticProjectionHlr;
|
|
45
|
+
}
|
|
46
|
+
export interface WorldExportedMesh {
|
|
47
|
+
bytes: Uint8Array;
|
|
48
|
+
report: unknown;
|
|
49
|
+
}
|
|
50
|
+
export interface WorldExportedFile {
|
|
51
|
+
text: string;
|
|
52
|
+
report: unknown;
|
|
53
|
+
}
|
|
54
|
+
export type WorldClashKind = "hard" | "touch" | "unresolved";
|
|
55
|
+
export interface WorldClash {
|
|
56
|
+
a: string;
|
|
57
|
+
b: string;
|
|
58
|
+
kind: WorldClashKind;
|
|
59
|
+
parts: [string, string];
|
|
60
|
+
detail?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface WorldClashOptions {
|
|
63
|
+
depth?: number;
|
|
64
|
+
}
|
|
65
|
+
export interface WorldProximity {
|
|
66
|
+
a: string;
|
|
67
|
+
b: string;
|
|
68
|
+
distance: number;
|
|
69
|
+
errorBound: number;
|
|
70
|
+
parts: [string, string];
|
|
71
|
+
points: [[number, number, number], [number, number, number]];
|
|
72
|
+
}
|
|
73
|
+
export type WorldGraphErrorCode = "duplicate_node" | "unknown_node" | "duplicate_definition" | "unknown_definition" | "definition_in_use" | "cycle" | "invalid_input" | "export" | "geometry" | "unknown";
|
|
74
|
+
export declare class WorldGraphError extends Error {
|
|
75
|
+
readonly code: WorldGraphErrorCode;
|
|
76
|
+
readonly detail: unknown;
|
|
77
|
+
constructor(code: WorldGraphErrorCode, message: string, detail?: unknown);
|
|
78
|
+
}
|
|
79
|
+
export declare function matrixToWorldTransform(matrix: THREE.Matrix4): WorldTransform;
|
|
80
|
+
export declare class WorldGraph {
|
|
81
|
+
private readonly kernel;
|
|
82
|
+
private readonly bindings;
|
|
83
|
+
private bindingOrder;
|
|
84
|
+
private disposed;
|
|
85
|
+
get nodeCount(): number;
|
|
86
|
+
get definitionCount(): number;
|
|
87
|
+
define(id: string, solid: AnalyticSolid): void;
|
|
88
|
+
defineLegacy(id: string, brepSerialized: string): void;
|
|
89
|
+
hasDefinition(id: string): boolean;
|
|
90
|
+
undefine(id: string): void;
|
|
91
|
+
addNode(options: WorldNodeOptions): void;
|
|
92
|
+
hasNode(id: string): boolean;
|
|
93
|
+
setLocal(id: string, local: THREE.Matrix4): void;
|
|
94
|
+
reparent(id: string, parent?: string): void;
|
|
95
|
+
removeNode(id: string): void;
|
|
96
|
+
getWorldMatrix(id: string): THREE.Matrix4;
|
|
97
|
+
getWorldBounds(id: string): THREE.Box3 | null;
|
|
98
|
+
clash(itemsA: string[], itemsB: string[], options?: WorldClashOptions): WorldClash[];
|
|
99
|
+
clearance(itemsA: string[], itemsB: string[], clearance: number): WorldProximity[];
|
|
100
|
+
distance(itemA: string, itemB: string, tolerance?: number): WorldProximity | null;
|
|
101
|
+
projectLines(items: string[], camera: AnalyticProjectionCamera, hlr?: AnalyticProjectionHlr, deflection?: number): WorldProjectedLines;
|
|
102
|
+
projectViews(items: string[], views: WorldProjectionView[], deflection?: number): Record<string, WorldProjectedScene>;
|
|
103
|
+
exportStl(items: string[], config?: Record<string, unknown>): WorldExportedMesh;
|
|
104
|
+
exportStep(items: string[], config?: Record<string, unknown>): WorldExportedFile;
|
|
105
|
+
exportIfc(items: string[], config?: Record<string, unknown>): WorldExportedFile;
|
|
106
|
+
bind(object: THREE.Object3D, id: string): void;
|
|
107
|
+
unbind(id: string): void;
|
|
108
|
+
sync(): void;
|
|
109
|
+
dispose(): void;
|
|
110
|
+
private syncObject;
|
|
111
|
+
private checkActive;
|
|
112
|
+
}
|