@procore/bim-webviewer-sdk 15.5.0 → 16.0.0-BIM-4575.1
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/CHANGELOG.md +24 -0
- package/dist/Procore.Bim.Webviewer.d.ts +2047 -22
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/Webviewer.d.ts +5 -3
- package/dist/types/src/components/Markup/SvgRenderer.d.ts +2 -0
- package/dist/types/src/components/ShortestDistanceComponent.d.ts +1 -1
- package/dist/types/src/controllers/PubSubController.d.ts +5 -0
- package/dist/types/src/controllers/RenderController.d.ts +17 -9
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +9 -1
- package/dist/types/src/controllers/RenderControllerWorker.d.ts +3 -0
- package/dist/types/src/controllers/ShortestDistanceController.d.ts +16 -0
- package/dist/types/src/controllers/__tests__/ShortestDistanceController.test.d.ts +1 -0
- package/dist/types/src/measuring/PointToPointController.d.ts +55 -0
- package/dist/types/src/measuring/PointToPointManager.d.ts +42 -0
- package/dist/types/src/measuring/__tests__/PointToPointController.test.d.ts +1 -0
- package/dist/types/src/measuring/__tests__/PointToPointFixtures.d.ts +4 -0
- package/dist/types/src/measuring/__tests__/PointToPointManager.test.d.ts +1 -0
- package/dist/types/src/measuring/createPointToPointControllerDebugGui.d.ts +2 -0
- package/dist/types/src/measuring/createPointToPointManagerDebugGui.d.ts +2 -0
- package/dist/types/src/measuring/index.d.ts +2 -0
- package/dist/types/src/navigation/DefaultControl.d.ts +4 -0
- package/dist/types/src/navigation/NavigationManager.d.ts +5 -0
- package/dist/types/src/picking/PickingController.d.ts +1 -0
- package/dist/types/src/procoregl/ColorServices/ColorServices.d.ts +17 -13
- package/dist/types/src/procoregl/GetNextRenderingStage.d.ts +1 -1
- package/dist/types/src/procoregl/HiddenNodeServices/HiddenNodeServices.d.ts +21 -21
- package/dist/types/src/procoregl/MeshTopology/Centroid.d.ts +12 -0
- package/dist/types/src/procoregl/MeshTopology/HalfEdge.d.ts +26 -0
- package/dist/types/src/procoregl/MeshTopology/MeshTopology.d.ts +23 -0
- package/dist/types/src/procoregl/MeshTopology/Position.d.ts +18 -0
- package/dist/types/src/procoregl/MeshTopology/SpatialNode.d.ts +11 -0
- package/dist/types/src/procoregl/MeshTopology/SpatialObject.d.ts +5 -0
- package/dist/types/src/procoregl/MeshTopology/SpatialTree.d.ts +10 -0
- package/dist/types/src/procoregl/MeshTopology/__tests__/HalfEdge.test.d.ts +1 -0
- package/dist/types/src/procoregl/MeshTopology/__tests__/MeshTopology.test.d.ts +1 -0
- package/dist/types/src/procoregl/MeshTopology/__tests__/PWFMeshMock.d.ts +17 -0
- package/dist/types/src/procoregl/MeshTopology/__tests__/Position.test.d.ts +1 -0
- package/dist/types/src/procoregl/MeshTopology/__tests__/TopologyFixtures.d.ts +9 -0
- package/dist/types/src/procoregl/MeshTopology/index.d.ts +5 -0
- package/dist/types/src/procoregl/Models/Models.d.ts +13 -13
- package/dist/types/src/procoregl/ObjectTree/ObjectTree.d.ts +2 -0
- package/dist/types/src/procoregl/PartitionsRenderer.d.ts +1 -1
- package/dist/types/src/procoregl/PartitionsRendererImpl.d.ts +2 -1
- package/dist/types/src/procoregl/SelectedNodeServices/SelectedNodeServices.d.ts +23 -22
- package/dist/types/src/procoregl/ViewerRenderer.d.ts +2 -1
- package/dist/types/src/pwfreader/PWF.d.ts +3 -9
- package/dist/types/src/pwfreader/shared/Meshnode.d.ts +3 -6
- package/dist/types/src/sdk.d.ts +0 -1
- package/dist/types/src/types/WebviewerOptions.d.ts +4 -1
- package/dist/types/src/utils/GlobalBoundingBox/globalBoundingBox.d.ts +26 -21
- package/dist/types/src/utils/GlobalBoundingBox/index.d.ts +1 -1
- package/dist/types/src/utils/LRUCache.d.ts +5 -5
- package/dist/types/src/utils/ZoomExtents/computeRefinedBbox.d.ts +11 -5
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import { SectionDataAutodeskFormat, SectionDataProcoreFormat } from './sectionin
|
|
|
9
9
|
import type { Viewpoint, Visibility } from './api/types/Viewpoint';
|
|
10
10
|
import type { CssColor } from './components/Markup/SvgRenderer';
|
|
11
11
|
import { RenderMode } from './utils/constants';
|
|
12
|
+
import { PointToPointManager } from './measuring/PointToPointManager';
|
|
12
13
|
export type ResourceDiscriminator = {
|
|
13
14
|
fileExtractionId: number;
|
|
14
15
|
} | {
|
|
@@ -16,6 +17,7 @@ export type ResourceDiscriminator = {
|
|
|
16
17
|
};
|
|
17
18
|
export declare class Webviewer {
|
|
18
19
|
options: Options;
|
|
20
|
+
pointToPointManager: PointToPointManager;
|
|
19
21
|
static readonly tools: {
|
|
20
22
|
readonly ALL: 0;
|
|
21
23
|
readonly BOTTOMTOOL: 1;
|
|
@@ -216,13 +218,13 @@ export declare class Webviewer {
|
|
|
216
218
|
getSelectedObjects: () => Promise<number[]>;
|
|
217
219
|
setMeasurement: (enable: boolean) => void;
|
|
218
220
|
setObjectColor: (palettes: PaletteParams[], options?: {
|
|
219
|
-
|
|
221
|
+
resourceId?: number;
|
|
220
222
|
}) => void;
|
|
221
223
|
clearObjectColor: (objectIds: number[], options?: {
|
|
222
|
-
|
|
224
|
+
resourceId?: number;
|
|
223
225
|
}) => Promise<void> | void;
|
|
224
226
|
clearAllObjectColor: (options?: {
|
|
225
|
-
|
|
227
|
+
resourceId?: number;
|
|
226
228
|
}) => Promise<void> | void;
|
|
227
229
|
filterObjectTree: (objectIds: number[]) => Promise<void>;
|
|
228
230
|
clearObjectTreeFilter: () => Promise<void>;
|
|
@@ -48,9 +48,14 @@ export namespace PubSubController {
|
|
|
48
48
|
markupDismissed: "markupDismissed";
|
|
49
49
|
markupDisplayed: "markupDisplayed";
|
|
50
50
|
measured: "measured";
|
|
51
|
+
measurementObjectEnter: "measurementObjectEnter";
|
|
52
|
+
measurementObjectLeave: "measurementObjectLeave";
|
|
53
|
+
measurementObjectMove: "measurementObjectMove";
|
|
54
|
+
measurementObjectClick: "measurementObjectClick";
|
|
51
55
|
messages: "messages";
|
|
52
56
|
modelTreeParentInteracted: "modelTreeParentInteracted";
|
|
53
57
|
modelTypeDetermined: "modelTypeDetermined";
|
|
58
|
+
mouseMove: "mouseMove";
|
|
54
59
|
navigationChanged: "navigationChanged";
|
|
55
60
|
navigationMouseDown: "navigationMouseDown";
|
|
56
61
|
navigationMouseUp: "navigationMouseUp";
|
|
@@ -80,11 +80,11 @@ export class RenderController {
|
|
|
80
80
|
isComplete: boolean;
|
|
81
81
|
};
|
|
82
82
|
initGlobalOffset(): void;
|
|
83
|
+
pointToPointController: PointToPointController | undefined;
|
|
83
84
|
initGeometryFactory(): void;
|
|
84
85
|
initTreeServices(): {
|
|
85
86
|
isComplete: boolean;
|
|
86
87
|
};
|
|
87
|
-
colorServices: import("../procoregl/ColorServices").ColorServices | undefined;
|
|
88
88
|
initViewerRenderer(): void;
|
|
89
89
|
initGeometry(): {
|
|
90
90
|
isComplete: boolean;
|
|
@@ -99,6 +99,7 @@ export class RenderController {
|
|
|
99
99
|
} | null | undefined;
|
|
100
100
|
getInitEventPayload(params: any): import("../api/analytic_events/analyticKeys").ModelInitializationPayload;
|
|
101
101
|
launchAnimationLoop(): void;
|
|
102
|
+
waitTillRenderStage(params: any): Promise<any>;
|
|
102
103
|
captureModelStats(): void;
|
|
103
104
|
init(modelDescriptors: any, downloadMetaData: any): Promise<void>;
|
|
104
105
|
meshnodeAB: any;
|
|
@@ -113,6 +114,8 @@ export class RenderController {
|
|
|
113
114
|
locale: any;
|
|
114
115
|
models: Models | undefined;
|
|
115
116
|
firstModelResourceId: number | undefined;
|
|
117
|
+
shortestDistanceController: ShortestDistanceController | undefined;
|
|
118
|
+
colorServices: ColorServices | undefined;
|
|
116
119
|
onUpdateWithState(data: any): void;
|
|
117
120
|
close(): boolean;
|
|
118
121
|
renderer: any;
|
|
@@ -190,6 +193,7 @@ export class RenderController {
|
|
|
190
193
|
getContextMenuData(evt: any): {
|
|
191
194
|
intersection: import("../sdk").Vector3 | null;
|
|
192
195
|
meshnodeIndex: number;
|
|
196
|
+
faceNormal: import("../sdk").Vector3 | null;
|
|
193
197
|
} | {
|
|
194
198
|
meshnodeIndex: number;
|
|
195
199
|
};
|
|
@@ -198,14 +202,15 @@ export class RenderController {
|
|
|
198
202
|
getIntersectionAndMeshnodeIndex(evt: any): {
|
|
199
203
|
intersection: import("../sdk").Vector3 | null;
|
|
200
204
|
meshnodeIndex: number;
|
|
205
|
+
faceNormal: import("../sdk").Vector3 | null;
|
|
201
206
|
};
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
clickedOnUnselectedObject(meshnodeIndex: any, rightClick: any): void;
|
|
207
|
+
isMeshnodeSelected(virtualMeshnodeIndex: any): boolean;
|
|
208
|
+
clickedOnSelectedObject(virtualMeshnodeIndex: any, rightClick: any): void;
|
|
209
|
+
clickedOnUnselectedObject(virtualMeshnodeIndex: any, rightClick: any): void;
|
|
206
210
|
handleObjectSelection(meshnodeIndex: any, rightClick: any): void;
|
|
207
211
|
handleEmptySpaceClick(): void;
|
|
208
212
|
onSingleClick(evt: any, rightClick?: boolean): void;
|
|
213
|
+
onMouseMove(evt: any): void;
|
|
209
214
|
setCanvasSelectionEnabled(enabled: any): void;
|
|
210
215
|
getSelectedSubtree(meshnodeIndex: any): {
|
|
211
216
|
objectId: number;
|
|
@@ -333,7 +338,7 @@ export class RenderController {
|
|
|
333
338
|
getSections(format: any): import("../sdk").SectionDataProcoreFormat | import("../sdk").SectionDataAutodeskFormat | null;
|
|
334
339
|
clearSection(): void;
|
|
335
340
|
setOptions(options: any): void;
|
|
336
|
-
findFirstObject(
|
|
341
|
+
findFirstObject(params: any): import("../sdk").PublicNode | undefined;
|
|
337
342
|
getNamedNode(nodeId: any, options?: {}): import("../sdk").PublicNode | undefined;
|
|
338
343
|
setEulerAngles(params: any): void;
|
|
339
344
|
statusChange(type: any): void;
|
|
@@ -353,7 +358,7 @@ export class RenderController {
|
|
|
353
358
|
};
|
|
354
359
|
setMeasureEnabled(enabled: any): void;
|
|
355
360
|
getMeasureEnabled(): boolean;
|
|
356
|
-
getMeasureIds():
|
|
361
|
+
getMeasureIds(): number[];
|
|
357
362
|
removeMeasureIds(measureIds: any): void;
|
|
358
363
|
clearMeasureIds(): void;
|
|
359
364
|
hasHiddenMeshnodeIndices(ids: any, options?: {}): boolean;
|
|
@@ -370,9 +375,8 @@ export class RenderController {
|
|
|
370
375
|
clearSelected(params?: {}): boolean;
|
|
371
376
|
getFieldOfView(): number;
|
|
372
377
|
setFieldOfView(deg: any): void;
|
|
373
|
-
getRefinedGlobalBbox(): import("three").Box3;
|
|
374
378
|
setPose(params: any): void;
|
|
375
|
-
zoomToGlobal(
|
|
379
|
+
zoomToGlobal(): void;
|
|
376
380
|
zoomToBoundingBox(bbox: any): void;
|
|
377
381
|
getBoundingBoxByMeshnodeIndices(params: any): any;
|
|
378
382
|
zoomToSelection(options?: {}): void;
|
|
@@ -389,6 +393,7 @@ export class RenderController {
|
|
|
389
393
|
getRenderMode(): string;
|
|
390
394
|
getSelectedNodeIds(params?: {}): number[];
|
|
391
395
|
toggleSectionBoxDisplay(enable: any): void;
|
|
396
|
+
setPointToPointEnabled(enabled: any): void;
|
|
392
397
|
getSectionBoxDisplayBbox(): import("../sdk").BoundingBox;
|
|
393
398
|
getSectionsAsBox(): import("../sectioning/SectionController").OrientedBox | null;
|
|
394
399
|
zoomToSectionBox(): void;
|
|
@@ -456,6 +461,9 @@ import { ProcoreRenderPass } from "../procoregl/ProcoreRenderPass";
|
|
|
456
461
|
import { SectionRenderPass } from "../procoregl/SectionDisplay";
|
|
457
462
|
import { PWF } from "../pwfreader/PWF";
|
|
458
463
|
import { PickingController } from "../picking/PickingController";
|
|
464
|
+
import { PointToPointController } from "../measuring";
|
|
459
465
|
import { NavigationModel } from "../navigation/NavigationModel";
|
|
460
466
|
import { Models } from "../procoregl/Models";
|
|
467
|
+
import { ShortestDistanceController } from "./ShortestDistanceController";
|
|
468
|
+
import { ColorServices } from "../procoregl/ColorServices";
|
|
461
469
|
import { ObjectTree } from "../procoregl/ObjectTree";
|
|
@@ -56,6 +56,12 @@ export class RenderControllerProxy {
|
|
|
56
56
|
close(): void;
|
|
57
57
|
cameras: any;
|
|
58
58
|
setNavigationMode(...params: any[]): void;
|
|
59
|
+
getNavigationControls(): {
|
|
60
|
+
mouseControls: import("../navigation/types").MouseControl;
|
|
61
|
+
wheelControls: import("../navigation/types").WheelControl;
|
|
62
|
+
keyboardControls: import("../navigation/types").KeyboardControl;
|
|
63
|
+
};
|
|
64
|
+
waitTillRenderStage(...params: any[]): Promise<any>;
|
|
59
65
|
getCameraDirection(...params: any[]): Promise<any> | {
|
|
60
66
|
x: number;
|
|
61
67
|
y: number;
|
|
@@ -129,6 +135,7 @@ export class RenderControllerProxy {
|
|
|
129
135
|
meshnodeIndex: number;
|
|
130
136
|
};
|
|
131
137
|
onSingleClick(...params: any[]): void | Promise<any>;
|
|
138
|
+
onMouseMove(...params: any[]): void | Promise<any>;
|
|
132
139
|
resizeScene(...params: any[]): void;
|
|
133
140
|
onDoubleClick(...params: any[]): void | Promise<any>;
|
|
134
141
|
onRightClick(...params: any[]): void | Promise<any>;
|
|
@@ -249,7 +256,7 @@ export class RenderControllerProxy {
|
|
|
249
256
|
statusChange(...params: any[]): void | Promise<any>;
|
|
250
257
|
onUndo(...params: any[]): void | Promise<any>;
|
|
251
258
|
getMeasureEnabled(...params: any[]): boolean | Promise<any>;
|
|
252
|
-
getMeasureIds(...params: any[]): any
|
|
259
|
+
getMeasureIds(...params: any[]): Promise<any> | number[];
|
|
253
260
|
removeMeasureIds(...params: any[]): void | Promise<any>;
|
|
254
261
|
onRedo(...params: any[]): void | Promise<any>;
|
|
255
262
|
clearMeasureIds(...params: any[]): void | Promise<any>;
|
|
@@ -281,6 +288,7 @@ export class RenderControllerProxy {
|
|
|
281
288
|
getRenderMode(...params: any[]): string | Promise<any>;
|
|
282
289
|
getSelectedNodeIds(...params: any[]): Promise<any> | number[];
|
|
283
290
|
toggleSectionBoxDisplay(...params: any[]): void | Promise<any>;
|
|
291
|
+
setPointToPointEnabled(...params: any[]): void | Promise<any>;
|
|
284
292
|
zoomToSectionBox(...params: any[]): void | Promise<any>;
|
|
285
293
|
setSectionBoxHidden(...params: any[]): void | Promise<any>;
|
|
286
294
|
resetSectionBox(...params: any[]): void | Promise<any>;
|
|
@@ -12,6 +12,7 @@ export class RenderControllerWorker {
|
|
|
12
12
|
postMessage(payload: any): Promise<any>;
|
|
13
13
|
onUpdateWithState(data: any): Promise<any>;
|
|
14
14
|
close(...params: any[]): void;
|
|
15
|
+
waitTillRenderStage(...params: any[]): Promise<any>;
|
|
15
16
|
getCameraDirection(...params: any[]): Promise<any>;
|
|
16
17
|
getPosition(...params: any[]): Promise<any>;
|
|
17
18
|
setNodeColor(...params: any[]): Promise<any>;
|
|
@@ -38,6 +39,7 @@ export class RenderControllerWorker {
|
|
|
38
39
|
onContextMenu(evt: any): Promise<any>;
|
|
39
40
|
getContextMenuData(evt: any): Promise<any>;
|
|
40
41
|
onSingleClick(evt: any): Promise<any>;
|
|
42
|
+
onMouseMove(evt: any): Promise<any>;
|
|
41
43
|
resizeScene(...params: any[]): Promise<any>;
|
|
42
44
|
onDoubleClick(evt: any): Promise<any>;
|
|
43
45
|
onRightClick(evt: any): Promise<any>;
|
|
@@ -107,6 +109,7 @@ export class RenderControllerWorker {
|
|
|
107
109
|
getRenderMode(...params: any[]): Promise<any>;
|
|
108
110
|
getSelectedNodeIds(...params: any[]): Promise<any>;
|
|
109
111
|
toggleSectionBoxDisplay(...params: any[]): Promise<any>;
|
|
112
|
+
setPointToPointEnabled(...params: any[]): Promise<any>;
|
|
110
113
|
zoomToSectionBox(...params: any[]): Promise<any>;
|
|
111
114
|
setSectionBoxHidden(...params: any[]): Promise<any>;
|
|
112
115
|
resetSectionBox(...params: any[]): Promise<any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MeshnodeObject } from '../pwfreader/shared/Meshnode';
|
|
2
|
+
import { Models } from '../procoregl/Models/Models';
|
|
3
|
+
export declare class ShortestDistanceController {
|
|
4
|
+
private measureSet;
|
|
5
|
+
private models;
|
|
6
|
+
constructor(params: {
|
|
7
|
+
models: Models;
|
|
8
|
+
});
|
|
9
|
+
getMeasureIds(): number[];
|
|
10
|
+
addMeasureIds(virtualMeshnodeIndices: number[]): void;
|
|
11
|
+
clearMeasureIds(): void;
|
|
12
|
+
hasMeasureIds(arr: number[]): boolean;
|
|
13
|
+
removeMeasureIds(virtualMeshnodeIndices: number[]): void;
|
|
14
|
+
handleMeasurementClick(virtualMeshnodeIndex: number): void;
|
|
15
|
+
getMeasureObjectMeshes(): MeshnodeObject[];
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { PickingController } from '../picking/PickingController';
|
|
2
|
+
import type { Models } from '../procoregl/Models';
|
|
3
|
+
import { Vector3 } from '../types/Math';
|
|
4
|
+
type SnapType = 'surface' | 'midpoint' | 'edge' | 'endpoint';
|
|
5
|
+
export type IntersectionSnapResult = {
|
|
6
|
+
intersection: Vector3;
|
|
7
|
+
viewProjectionMatrix: number[];
|
|
8
|
+
snapType: SnapType;
|
|
9
|
+
snapPosition: Vector3;
|
|
10
|
+
snapEdge: {
|
|
11
|
+
start: Vector3;
|
|
12
|
+
end: Vector3;
|
|
13
|
+
} | null;
|
|
14
|
+
faceNormal: Vector3;
|
|
15
|
+
boundaryEdges: {
|
|
16
|
+
start: Vector3;
|
|
17
|
+
end: Vector3;
|
|
18
|
+
}[];
|
|
19
|
+
meshnodeIndex: number;
|
|
20
|
+
};
|
|
21
|
+
export declare class PointToPointController {
|
|
22
|
+
private pickingController;
|
|
23
|
+
private models;
|
|
24
|
+
private camera;
|
|
25
|
+
private currentHoverMeshnodeIndex;
|
|
26
|
+
private meshTopolgyCache;
|
|
27
|
+
private enabled;
|
|
28
|
+
private globalOffset;
|
|
29
|
+
private localSnapPosition;
|
|
30
|
+
private viewProjectionMatrixArr;
|
|
31
|
+
private cameraDirection;
|
|
32
|
+
private debugGui;
|
|
33
|
+
constructor(params: {
|
|
34
|
+
pickingController: PickingController;
|
|
35
|
+
models: Models;
|
|
36
|
+
camera: THREE.PerspectiveCamera;
|
|
37
|
+
globalOffset: THREE.Vector3;
|
|
38
|
+
});
|
|
39
|
+
handleMouseClick(payload: Vector3): void;
|
|
40
|
+
handleMouseMove(event: MouseEvent): void;
|
|
41
|
+
cameraUpdated(): void;
|
|
42
|
+
isEnabled(): boolean;
|
|
43
|
+
setIsEnabled(enabled: boolean): void;
|
|
44
|
+
private publishIntersectionSnapResult;
|
|
45
|
+
private getMeshTopology;
|
|
46
|
+
private meshnodeTooComplex;
|
|
47
|
+
private determineHoverState;
|
|
48
|
+
private getIntersectionSnap;
|
|
49
|
+
private detectSnapFeature;
|
|
50
|
+
private getEdgeFaceNormal;
|
|
51
|
+
private isEdgeFacingCamera;
|
|
52
|
+
private isEdgeCoplanarWithFace;
|
|
53
|
+
private isEdgeNormalSameAsFaceNormal;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { SvgRenderer } from '../components/Markup/SvgRenderer';
|
|
2
|
+
import type { Vector3 } from '../types/Math';
|
|
3
|
+
import type { IntersectionSnapResult } from './PointToPointController';
|
|
4
|
+
import type { RenderControllerProxy } from '../controllers/RenderControllerProxy';
|
|
5
|
+
export declare class PointToPointManager {
|
|
6
|
+
private svgRenderer;
|
|
7
|
+
private renderControllerProxy;
|
|
8
|
+
private static pointToPointEnabled;
|
|
9
|
+
private firstMeasurePoint;
|
|
10
|
+
private secondMeasurePoint;
|
|
11
|
+
private intersection;
|
|
12
|
+
private outlineSvgData;
|
|
13
|
+
private temporaryMeasurementLine;
|
|
14
|
+
private dist;
|
|
15
|
+
private xDist;
|
|
16
|
+
private yDist;
|
|
17
|
+
private zDist;
|
|
18
|
+
private gui;
|
|
19
|
+
private _globalOffset;
|
|
20
|
+
constructor(params: {
|
|
21
|
+
renderControllerProxy: RenderControllerProxy;
|
|
22
|
+
svgRenderer: SvgRenderer;
|
|
23
|
+
});
|
|
24
|
+
private set globalOffset(value);
|
|
25
|
+
private get globalOffset();
|
|
26
|
+
onMeasurementObjectMove(payload: IntersectionSnapResult): void;
|
|
27
|
+
onMeasurementObjectLeave(): void;
|
|
28
|
+
onMeasurementObjectClick(payload: {
|
|
29
|
+
snapPosition: Vector3;
|
|
30
|
+
}): void;
|
|
31
|
+
static isEnabled(): boolean;
|
|
32
|
+
togglePointToPoint(params: {
|
|
33
|
+
enable: boolean;
|
|
34
|
+
}): void;
|
|
35
|
+
private setCameraAndNavigationControls;
|
|
36
|
+
private updateMeasurement;
|
|
37
|
+
private setAndUpdateLabel;
|
|
38
|
+
private clearMeasurement;
|
|
39
|
+
private updateSvg;
|
|
40
|
+
private createLine;
|
|
41
|
+
private createEllipse;
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -19,5 +19,9 @@ export declare class DefaultControl implements MouseControl {
|
|
|
19
19
|
dispose(): void;
|
|
20
20
|
private updateSectionHover;
|
|
21
21
|
private onSectionBoxDisplayHoverUpdated;
|
|
22
|
+
private onMeasurementObjectMove;
|
|
23
|
+
private onMeasurementObjectLeave;
|
|
24
|
+
private onMeasurementObjectEnter;
|
|
25
|
+
private updatePointToPointCursor;
|
|
22
26
|
private resetCursor;
|
|
23
27
|
}
|
|
@@ -28,6 +28,11 @@ export declare class NavigationManager {
|
|
|
28
28
|
private setWheelControls;
|
|
29
29
|
private setKeyboardControls;
|
|
30
30
|
setNavigationMode(navigationMode: NavigationMode): void;
|
|
31
|
+
getNavigationControls(): {
|
|
32
|
+
mouseControls: MouseControl;
|
|
33
|
+
wheelControls: WheelControl;
|
|
34
|
+
keyboardControls: KeyboardControl;
|
|
35
|
+
};
|
|
31
36
|
dispose(): void;
|
|
32
37
|
private setMouseControls;
|
|
33
38
|
private updateModifierKeys;
|
|
@@ -1,28 +1,32 @@
|
|
|
1
|
-
import { Meshnode } from '../../pwfreader/shared/Meshnode';
|
|
2
|
-
import { PWF } from '../../pwfreader/PWF';
|
|
3
1
|
import { Palette } from '../../types/Palette';
|
|
4
|
-
import {
|
|
5
|
-
type NodeId = ReturnType<Node['nodeId']>;
|
|
6
|
-
type MeshnodeIndex = ReturnType<Meshnode['index']>;
|
|
2
|
+
import { Models } from '../Models';
|
|
7
3
|
type SetNodeColorParams = {
|
|
8
4
|
palette: Palette;
|
|
9
|
-
nodeIds:
|
|
5
|
+
nodeIds: number[];
|
|
10
6
|
};
|
|
11
7
|
export declare class ColorServices {
|
|
12
8
|
private _palettes;
|
|
13
9
|
private meshnodeToPalette;
|
|
14
|
-
private
|
|
10
|
+
private models;
|
|
11
|
+
private resourceIdToVirtualMeshnodeIndexes;
|
|
15
12
|
constructor(params: {
|
|
16
|
-
|
|
13
|
+
models: Models;
|
|
17
14
|
});
|
|
18
|
-
setNodeColor(params:
|
|
15
|
+
setNodeColor(params: {
|
|
16
|
+
colorPalettes: SetNodeColorParams[];
|
|
17
|
+
resourceId: number;
|
|
18
|
+
}): void;
|
|
19
19
|
setMeshnodeColor(params: {
|
|
20
20
|
palette: Palette;
|
|
21
|
-
|
|
21
|
+
virtualMeshnodeIndex: number;
|
|
22
|
+
resourceId: number;
|
|
23
|
+
}): void;
|
|
24
|
+
clearNodeColor(params: {
|
|
25
|
+
nodeIds: number[];
|
|
26
|
+
resourceId: number;
|
|
22
27
|
}): void;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
getPaletteByMeshnodeIndex(MeshnodeIdx: MeshnodeIndex): Palette | undefined;
|
|
28
|
+
clearAllNodeColor(resourceId: number): void;
|
|
29
|
+
getPaletteByVirtualMeshnodeIndex(virtualMeshnodeIdx: number): Palette | undefined;
|
|
26
30
|
get palettes(): Palette[];
|
|
27
31
|
private addPalette;
|
|
28
32
|
}
|
|
@@ -5,7 +5,7 @@ export declare const RENDER_STAGE: {
|
|
|
5
5
|
readonly renderIdle: "renderIdle";
|
|
6
6
|
readonly renderInvalid: "renderInvalid";
|
|
7
7
|
};
|
|
8
|
-
type RenderStage = (typeof RENDER_STAGE)[keyof typeof RENDER_STAGE];
|
|
8
|
+
export type RenderStage = (typeof RENDER_STAGE)[keyof typeof RENDER_STAGE];
|
|
9
9
|
type GetRenderStageParams = {
|
|
10
10
|
currentRenderStage: RenderStage;
|
|
11
11
|
newFrame: boolean;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import type { PWF } from '../../pwfreader/PWF';
|
|
2
1
|
import type { InternalNode, ObjectTree } from '../ObjectTree';
|
|
3
2
|
import type { Visibility } from '../../api/types/Viewpoint';
|
|
3
|
+
import type { Models } from '../Models';
|
|
4
4
|
export declare class HiddenNodeServices {
|
|
5
|
-
private
|
|
6
|
-
private
|
|
7
|
-
private
|
|
8
|
-
private
|
|
9
|
-
private
|
|
5
|
+
private hiddenObjectCountByResourceId;
|
|
6
|
+
private hiddenMeshnodeIndicesByResourceId;
|
|
7
|
+
private hiddenNodesIdsByResourceId;
|
|
8
|
+
private models;
|
|
9
|
+
private objectTrees;
|
|
10
10
|
constructor(params: {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
models: Models;
|
|
12
|
+
objectTrees: Map<number, ObjectTree>;
|
|
13
13
|
});
|
|
14
|
-
getCount: () => number;
|
|
15
|
-
getHiddenMeshnodeIndices: () => Set<number>;
|
|
16
|
-
getHiddenNodeIds: () => Set<number>;
|
|
17
|
-
setMeshnodeHidden: (
|
|
18
|
-
setNodeHidden: (objectTreeNode: InternalNode, hidden: boolean) => void;
|
|
19
|
-
setMeshnodeHiddenFromSet: (
|
|
20
|
-
setNodeHiddenFromSet: (nodeIds: Set<number>, hidden: boolean) => void;
|
|
21
|
-
clear: () => void;
|
|
22
|
-
hideAll(): void;
|
|
23
|
-
hasMeshnodeIndices: (indexes: Array<number
|
|
14
|
+
getCount: (resourceId: number) => number;
|
|
15
|
+
getHiddenMeshnodeIndices: (resourceId: number) => Set<number>;
|
|
16
|
+
getHiddenNodeIds: (resourceId: number) => Set<number>;
|
|
17
|
+
setMeshnodeHidden: (virtualMeshnodeIndex: number, hidden: boolean) => void;
|
|
18
|
+
setNodeHidden: (objectTreeNode: InternalNode, hidden: boolean, resourceId: number) => void;
|
|
19
|
+
setMeshnodeHiddenFromSet: (virtualMeshnodeIndexes: Set<number>, hidden: boolean) => void;
|
|
20
|
+
setNodeHiddenFromSet: (nodeIds: Set<number>, hidden: boolean, resourceId: number) => void;
|
|
21
|
+
clear: (resourceId: number) => void;
|
|
22
|
+
hideAll(resourceId: number): void;
|
|
23
|
+
hasMeshnodeIndices: (indexes: Array<number>, resourceId: number) => boolean;
|
|
24
24
|
private nodeNeedsUpdating;
|
|
25
|
-
getVisibility: (options?: {
|
|
25
|
+
getVisibility: (resourceId: number, options?: {
|
|
26
26
|
defaultVisibilityAlwaysTrue?: boolean | undefined;
|
|
27
27
|
}) => Visibility;
|
|
28
|
-
setVisibility: (visibility: Visibility) => void;
|
|
28
|
+
setVisibility: (visibility: Visibility, resourceId: number) => void;
|
|
29
29
|
private updateNodeAndChildren;
|
|
30
30
|
private updateNodeAndParentsDF;
|
|
31
31
|
private setNodeHiddenIfChildrenHidden;
|
|
32
32
|
private updateNodesAndParentsByIdBF;
|
|
33
|
-
updateHiddenAncestry: (nodeId: number, hidden: boolean) => void;
|
|
33
|
+
updateHiddenAncestry: (nodeId: number, hidden: boolean, resourceId: number) => void;
|
|
34
34
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Position } from './Position';
|
|
2
|
+
import { HalfEdge } from './HalfEdge';
|
|
3
|
+
import { SpatialObject } from './SpatialObject';
|
|
4
|
+
export declare class Centroid implements SpatialObject {
|
|
5
|
+
positions: Position[];
|
|
6
|
+
position: Position;
|
|
7
|
+
spoke: HalfEdge | null;
|
|
8
|
+
constructor(positions: Position[], position: Position);
|
|
9
|
+
box3(): THREE.Box3;
|
|
10
|
+
intersect(ray: THREE.Ray): THREE.Vector3 | null;
|
|
11
|
+
intersects(ray: THREE.Ray): boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Position } from './Position';
|
|
2
|
+
import type { Centroid } from './Centroid';
|
|
3
|
+
export declare class HalfEdge {
|
|
4
|
+
org: Position;
|
|
5
|
+
dest: Position;
|
|
6
|
+
face: Centroid;
|
|
7
|
+
next?: HalfEdge;
|
|
8
|
+
prev?: HalfEdge;
|
|
9
|
+
sym: HalfEdge | null;
|
|
10
|
+
id: number;
|
|
11
|
+
private static _nextId;
|
|
12
|
+
static epsilon: number;
|
|
13
|
+
static fromFace(face: Centroid): HalfEdge[];
|
|
14
|
+
static makeEdge(org: Position, dest: Position, face: Centroid): HalfEdge;
|
|
15
|
+
static makeNext(edge: HalfEdge, dest: Position, face: Centroid): HalfEdge;
|
|
16
|
+
static connect(edge0: HalfEdge, edge1: HalfEdge, face: Centroid): HalfEdge;
|
|
17
|
+
isBoundary(): boolean;
|
|
18
|
+
isRidge(): boolean;
|
|
19
|
+
isCrease(): boolean;
|
|
20
|
+
isBorder(): boolean;
|
|
21
|
+
isOrphan(): boolean;
|
|
22
|
+
private constructor();
|
|
23
|
+
private compareFaces;
|
|
24
|
+
private signedVolumeOfTetrahedron;
|
|
25
|
+
private static nextId;
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Position } from './Position';
|
|
2
|
+
import { Centroid } from './Centroid';
|
|
3
|
+
import { HalfEdge } from './HalfEdge';
|
|
4
|
+
import { PWFMesh } from '../../pwfreader/pwf/PWFMesh';
|
|
5
|
+
export declare class MeshTopology {
|
|
6
|
+
private positions;
|
|
7
|
+
private edges;
|
|
8
|
+
private faces;
|
|
9
|
+
private facesTree;
|
|
10
|
+
private orphansByOrg;
|
|
11
|
+
private orphansByDest;
|
|
12
|
+
constructor(meshes: PWFMesh[]);
|
|
13
|
+
forEachHalfEdge(callback: (edge: HalfEdge) => void): void;
|
|
14
|
+
forEachPosition(callback: (position: Position) => void): void;
|
|
15
|
+
intersect(ray: THREE.Ray): Centroid | null;
|
|
16
|
+
isManifold(): boolean;
|
|
17
|
+
isEuler(): boolean;
|
|
18
|
+
private forEachFaceInAB;
|
|
19
|
+
private forEachPositionInAB;
|
|
20
|
+
private findOrphan;
|
|
21
|
+
private addOrphan;
|
|
22
|
+
private computeVertexNormalsIfNeeded;
|
|
23
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HalfEdge } from './HalfEdge';
|
|
2
|
+
export declare class Position {
|
|
3
|
+
vertex: THREE.Vector3;
|
|
4
|
+
normal: THREE.Vector3;
|
|
5
|
+
spoke: HalfEdge | null;
|
|
6
|
+
id: number;
|
|
7
|
+
private static _nextId;
|
|
8
|
+
constructor(vertex: THREE.Vector3, normal: THREE.Vector3);
|
|
9
|
+
isPit(): boolean;
|
|
10
|
+
isPeak(): boolean;
|
|
11
|
+
isClosed(): boolean;
|
|
12
|
+
isCorner(): boolean;
|
|
13
|
+
isOrphan(): boolean;
|
|
14
|
+
private sideOfPlane;
|
|
15
|
+
forEachDestInRing(callback: (position: Position) => void): void;
|
|
16
|
+
forEachONext(callback: (edge: HalfEdge) => void): void;
|
|
17
|
+
private static nextId;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SpatialObject } from './SpatialObject';
|
|
2
|
+
export declare class SpatialNode {
|
|
3
|
+
private _spatialObject;
|
|
4
|
+
private _children;
|
|
5
|
+
private _box3;
|
|
6
|
+
constructor(spatialObject: SpatialObject | null);
|
|
7
|
+
box3(): THREE.Box3;
|
|
8
|
+
children(): SpatialNode[];
|
|
9
|
+
addChild(node: SpatialNode): void;
|
|
10
|
+
spatialObject(): SpatialObject | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SpatialObject } from './SpatialObject';
|
|
2
|
+
export declare class SpatialTree {
|
|
3
|
+
private root;
|
|
4
|
+
constructor(spatialObjects: SpatialObject[]);
|
|
5
|
+
intersect(ray: THREE.Ray): SpatialObject[];
|
|
6
|
+
private buildTree;
|
|
7
|
+
private findLongestAxis;
|
|
8
|
+
private addSpatialObjects;
|
|
9
|
+
private sortNodesAlongAxis;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|