@procore/bim-webviewer-sdk 17.2.1 → 17.3.0-BM-1142.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.
- package/CHANGELOG.md +50 -0
- package/dist/Procore.Bim.Webviewer.d.ts +84 -41
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/EscapeOperationsManager/EscapeOperationsManager.d.ts +21 -0
- package/dist/types/src/EscapeOperationsManager/__tests__/EscapeOperationsManager.test.d.ts +1 -0
- package/dist/types/src/EscapeOperationsManager/index.d.ts +1 -0
- package/dist/types/src/Webviewer.d.ts +1 -0
- package/dist/types/src/api/analytic_events/analyticKeys.d.ts +1 -0
- package/dist/types/src/api/bim_viewpoints.d.ts +5 -0
- package/dist/types/src/api/types/FileExtraction.d.ts +3 -9
- package/dist/types/src/api/types/GeometryFileBundle.d.ts +10 -0
- package/dist/types/src/api/types/ModelRevision.d.ts +2 -0
- package/dist/types/src/components/ContextMenuComponent/ContextMenuComponent.d.ts +9 -5
- package/dist/types/src/components/ContextMenuComponent/__tests__/ContextMenuComponent.test.d.ts +1 -0
- package/dist/types/src/components/ShortestDistanceComponent.d.ts +1 -0
- package/dist/types/src/components/ToolBarComponent/ToolBarComponent.d.ts +0 -1
- package/dist/types/src/controllers/RenderController.d.ts +2 -10
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +6 -8
- package/dist/types/src/controllers/RenderControllerWorker.d.ts +1 -3
- package/dist/types/src/controllers/ShortestDistanceController.d.ts +0 -1
- package/dist/types/src/{navigation → hotkeys}/Hotkeys.d.ts +8 -5
- package/dist/types/src/hotkeys/__tests__/Hotkeys.test.d.ts +1 -0
- package/dist/types/src/measuring/DistanceLabel.d.ts +7 -0
- package/dist/types/src/measuring/FeatureTooltip/FeatureTooltip.d.ts +4 -0
- package/dist/types/src/measuring/MeasureToolUtils.d.ts +11 -8
- package/dist/types/src/measuring/MeasurementInterface.d.ts +1 -0
- package/dist/types/src/measuring/MeasurementManager.d.ts +5 -0
- package/dist/types/src/measuring/MeasurementRenderer.d.ts +0 -1
- package/dist/types/src/measuring/PointToPointController.d.ts +11 -11
- package/dist/types/src/measuring/PointToPointManager.d.ts +5 -0
- package/dist/types/src/measuring/__tests__/PointToPointFixtures.d.ts +30 -50
- package/dist/types/src/measuring/__tests__/fixtures.d.ts +17 -0
- package/dist/types/src/navigation/DefaultControl.d.ts +1 -0
- package/dist/types/src/navigation/__tests__/DefaultControl.test.d.ts +1 -0
- package/dist/types/src/picking/PickingController.d.ts +9 -1
- package/dist/types/src/procoregl/MeshTopology/MeshTopology.d.ts +1 -0
- package/dist/types/src/procoregl/MeshTopology/__tests__/TopologyFixtures.d.ts +5 -1
- package/dist/types/src/procoregl/Models/__tests__/Models.test.d.ts +2 -2
- package/dist/types/src/pwfreader/PWF.d.ts +1 -2
- package/dist/types/src/pwfreader/PWFProxy.d.ts +1 -2
- package/dist/types/src/pwfreader/v1/PWFV1.d.ts +0 -2
- package/dist/types/src/pwfreader/v1/streaming/StreamedMeshServices.d.ts +2 -0
- package/dist/types/src/pwfreader/v2/PWFV2.d.ts +7 -2
- package/dist/types/src/pwfreader/v2/streaming/MeshData.d.ts +1 -0
- package/dist/types/src/pwfreader/v2/streaming/PartitionProxy.d.ts +7 -2
- package/dist/types/src/pwfreader/v2/streaming/StreamedMeshServices.d.ts +24 -3
- package/dist/types/src/sdk.d.ts +3 -2
- package/dist/types/src/types/WebviewerOptions.d.ts +31 -31
- package/dist/types/src/types/setMeasurementSchema.d.ts +21 -0
- package/dist/types/src/utils/ApiMetaData/ApiMetaData.d.ts +5 -0
- package/dist/types/src/utils/ApiMetaData/__tests__/mocks.d.ts +13 -9
- package/dist/types/src/utils/ApiMetaData/index.d.ts +1 -0
- package/dist/types/src/utils/CameraHelper/CameraHelper.d.ts +8 -0
- package/dist/types/src/utils/CameraHelper/index.d.ts +1 -0
- package/dist/types/src/utils/Enums.d.ts +1 -0
- package/dist/types/src/{pwfreader/v1/streaming → utils}/OPFSFile/MainThreadSyncAccessHandleFallback.d.ts +2 -1
- package/dist/types/src/{pwfreader/v1/streaming → utils}/OPFSFile/OPFSFile.d.ts +3 -2
- package/dist/types/src/utils/OPFSFile/__tests__/OPFSFile.test.d.ts +1 -0
- package/dist/types/src/utils/OPFSFile/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/src/pwfreader/v1/streaming/OPFSFile/index.d.ts +0 -1
- /package/dist/types/src/{navigation/Orbit → utils}/log.d.ts +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RenderControllerProxy } from '../controllers/RenderControllerProxy';
|
|
2
|
+
import { MeasurementManager } from '../measuring/MeasurementManager';
|
|
3
|
+
import { FloorPlanComponent } from '../components/FloorPlanComponent';
|
|
4
|
+
import { WindowComponent } from '../components/WindowComponent';
|
|
5
|
+
export declare class EscapeOperationsManager {
|
|
6
|
+
private readonly renderControllerProxy;
|
|
7
|
+
private readonly measurementManager;
|
|
8
|
+
private readonly floorPlanComponent;
|
|
9
|
+
private readonly windowComponents;
|
|
10
|
+
constructor(params: {
|
|
11
|
+
renderControllerProxy: RenderControllerProxy;
|
|
12
|
+
measurementManager: MeasurementManager;
|
|
13
|
+
floorPlanComponent: FloorPlanComponent | undefined;
|
|
14
|
+
windowComponents: WindowComponent[];
|
|
15
|
+
});
|
|
16
|
+
private handleEscapeKeyPress;
|
|
17
|
+
private handleFloorPlanEscape;
|
|
18
|
+
private handleMeasurementEscape;
|
|
19
|
+
private handleWindowEscape;
|
|
20
|
+
private handleDeselectObjects;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EscapeOperationsManager } from './EscapeOperationsManager';
|
|
@@ -147,6 +147,7 @@ export declare const MEASUREMENT_ORIGIN: {
|
|
|
147
147
|
readonly FLYOUT_MENU: "flyout_menu";
|
|
148
148
|
readonly ESC: "esc";
|
|
149
149
|
readonly HOTKEY: "hotkey";
|
|
150
|
+
readonly NAVIGATION_CHANGE: "navigation_change";
|
|
150
151
|
};
|
|
151
152
|
export type MeasurementOrigin = (typeof MEASUREMENT_ORIGIN)[keyof typeof MEASUREMENT_ORIGIN];
|
|
152
153
|
export declare const measurements: {
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
url: string;
|
|
3
|
-
};
|
|
1
|
+
import { GeometryFileBundle } from './GeometryFileBundle';
|
|
4
2
|
export type WebFormatExtractionItem = {
|
|
5
3
|
item_type: 'WebFormat';
|
|
6
4
|
artifact: {
|
|
7
|
-
web_format:
|
|
8
|
-
node_file: GeometryFile;
|
|
9
|
-
mesh_node_file: GeometryFile;
|
|
10
|
-
mesh_file: GeometryFile;
|
|
11
|
-
manifest_file?: GeometryFile;
|
|
12
|
-
};
|
|
5
|
+
web_format: GeometryFileBundle;
|
|
13
6
|
};
|
|
14
7
|
};
|
|
15
8
|
export type PropertiesFile = {
|
|
@@ -44,5 +37,6 @@ export type FileExtraction = {
|
|
|
44
37
|
id: number;
|
|
45
38
|
extraction_items: FileExtractionItem[];
|
|
46
39
|
bim_file_upload: BimFileUpload;
|
|
40
|
+
viewpoint_id?: number | null;
|
|
47
41
|
};
|
|
48
42
|
export type HolderType = 'FileVersion' | 'BimModelRevision';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Viewpoint } from './Viewpoint';
|
|
2
|
+
import { GeometryFileBundle } from './GeometryFileBundle';
|
|
2
3
|
export type ModelRevisionViewpoint = Viewpoint & {
|
|
3
4
|
primary: boolean;
|
|
4
5
|
};
|
|
@@ -6,4 +7,5 @@ export type ModelRevision = {
|
|
|
6
7
|
id: number;
|
|
7
8
|
revision: number;
|
|
8
9
|
viewpoints: ModelRevisionViewpoint[];
|
|
10
|
+
geometry_file_bundle: GeometryFileBundle;
|
|
9
11
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export function ContextMenuComponent(id: any, options: any, render: any, sectionBoxDisplayManager: any): void;
|
|
1
|
+
export function ContextMenuComponent(id: any, options: any, render: any, sectionBoxDisplayManager: any, measurementManager: any): void;
|
|
2
2
|
export class ContextMenuComponent {
|
|
3
|
-
constructor(id: any, options: any, render: any, sectionBoxDisplayManager: any);
|
|
3
|
+
constructor(id: any, options: any, render: any, sectionBoxDisplayManager: any, measurementManager: any);
|
|
4
4
|
id: any;
|
|
5
5
|
options: any;
|
|
6
6
|
render: any;
|
|
7
7
|
sectionBoxDisplayManager: any;
|
|
8
|
+
measurementManager: any;
|
|
8
9
|
dom: any;
|
|
9
10
|
contextMenu: HTMLDivElement | null;
|
|
10
11
|
objectNameHeader: HTMLDivElement | null;
|
|
@@ -18,14 +19,17 @@ export class ContextMenuComponent {
|
|
|
18
19
|
tooltipDuration: number;
|
|
19
20
|
currentSimilarName: any;
|
|
20
21
|
contextMenuOrigin: CONTEXT_MENU_ORIGIN;
|
|
22
|
+
currentCameraPosition: any;
|
|
21
23
|
namedNodeId: number;
|
|
22
24
|
similarNodeId: number;
|
|
25
|
+
globalOffset: any;
|
|
23
26
|
objectCount: number;
|
|
24
27
|
contextMenuMeshnodeIndex: number;
|
|
28
|
+
isContextMenuBlocked(): Promise<any>;
|
|
25
29
|
OnSelectedUpdated(): void;
|
|
26
30
|
OnGetPropertyName(response: any): void;
|
|
27
|
-
HandleCameraUpdated(): void;
|
|
28
|
-
onContextMenu(event: any): void
|
|
31
|
+
HandleCameraUpdated(payload: any): void;
|
|
32
|
+
onContextMenu(event: any): Promise<void>;
|
|
29
33
|
setContextMenuContents(): void;
|
|
30
34
|
OnHideObject(): void;
|
|
31
35
|
OnHideSimilar(): Promise<void>;
|
|
@@ -33,7 +37,7 @@ export class ContextMenuComponent {
|
|
|
33
37
|
OnIsolate(): Promise<void>;
|
|
34
38
|
OnViewProperties(): void;
|
|
35
39
|
ClearContextMenu(): void;
|
|
36
|
-
OnRenderReady(): void
|
|
40
|
+
OnRenderReady(): Promise<void>;
|
|
37
41
|
CreateComponent(): void;
|
|
38
42
|
onZoomToSelection(): Promise<void>;
|
|
39
43
|
onXRayMode(): Promise<void>;
|
package/dist/types/src/components/ContextMenuComponent/__tests__/ContextMenuComponent.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13,6 +13,7 @@ export class ShortestDistanceComponent {
|
|
|
13
13
|
pivot: import("three").Vector3;
|
|
14
14
|
onHideUpdated(): Promise<void>;
|
|
15
15
|
toggle(params: any): void;
|
|
16
|
+
setActive(active: any): void;
|
|
16
17
|
clearDisplayElements(): void;
|
|
17
18
|
removeCursors(): void;
|
|
18
19
|
setGlobalOffset(params: any): void;
|
|
@@ -68,7 +68,6 @@ export class ToolBarComponent {
|
|
|
68
68
|
onSectionBoxDisplayToggled(data: any): void;
|
|
69
69
|
onRenderModeChanged(data: any): void;
|
|
70
70
|
onSelectTool(data: any): void;
|
|
71
|
-
selectMeasurementTool(data: any): void;
|
|
72
71
|
selectSectionBoxTool(): Promise<void>;
|
|
73
72
|
ResetNavSelection(): void;
|
|
74
73
|
createToolTipContent(elem: any, name: any): string | HTMLDivElement;
|
|
@@ -165,19 +165,13 @@ export class RenderController {
|
|
|
165
165
|
getCamera(): import("three").PerspectiveCamera;
|
|
166
166
|
getRenderer(): import("../procoregl/ViewerRenderer").ViewerRenderer | undefined;
|
|
167
167
|
resizeScene(params: any): void;
|
|
168
|
-
getContextMenuData(evt: any): {
|
|
169
|
-
intersection: import("../sdk").Vector3 | null;
|
|
170
|
-
meshnodeIndex: number;
|
|
171
|
-
faceNormal: import("../sdk").Vector3 | null;
|
|
172
|
-
} | {
|
|
173
|
-
meshnodeIndex: number;
|
|
174
|
-
};
|
|
175
168
|
onContextMenu(evt: any): void;
|
|
176
169
|
isSectionBlockingClick(): boolean;
|
|
177
|
-
|
|
170
|
+
getRayIntersectPoint(evt: any, returnOnEdgeHitFailure?: string): {
|
|
178
171
|
intersection: import("../sdk").Vector3 | null;
|
|
179
172
|
meshnodeIndex: number;
|
|
180
173
|
faceNormal: import("../sdk").Vector3 | null;
|
|
174
|
+
nearestMeshnodeIndex?: number;
|
|
181
175
|
};
|
|
182
176
|
isMeshnodeSelected(virtualMeshnodeIndex: any): boolean;
|
|
183
177
|
clickedOnSelectedObject(virtualMeshnodeIndex: any, rightClick: any): void;
|
|
@@ -378,7 +372,6 @@ export class RenderController {
|
|
|
378
372
|
destinationObjectTreeName: any;
|
|
379
373
|
}): void;
|
|
380
374
|
validateObjectTree(resourceId: any, objectTreeName: any): boolean;
|
|
381
|
-
isPartitionedModel(): boolean;
|
|
382
375
|
setPwfFileCacheState(states: any): void;
|
|
383
376
|
getPwfFileCacheState(): {
|
|
384
377
|
meshnodeABCached: boolean;
|
|
@@ -389,7 +382,6 @@ export class RenderController {
|
|
|
389
382
|
getNumMeshes(params?: {}): number;
|
|
390
383
|
getNumMeshnodes(params?: {}): number;
|
|
391
384
|
getNumNodes(params?: {}): number;
|
|
392
|
-
getMeasureObjectMeshesPartition(): Promise<import("../pwfreader/PWFTypes").MeshnodeObject[]>;
|
|
393
385
|
}
|
|
394
386
|
export namespace RenderController {
|
|
395
387
|
namespace NullSelectedSubtree {
|
|
@@ -7,7 +7,6 @@ export class RenderControllerProxy {
|
|
|
7
7
|
worker: any;
|
|
8
8
|
enableWebWorker: any;
|
|
9
9
|
navigationManager: NavigationManager;
|
|
10
|
-
hotkeys: Hotkeys;
|
|
11
10
|
renderController: RenderController | RenderControllerWorker | null;
|
|
12
11
|
pwfCache: PWFCache | null;
|
|
13
12
|
renderControllerParams: {
|
|
@@ -123,9 +122,6 @@ export class RenderControllerProxy {
|
|
|
123
122
|
getMeshnodeFromIndex(...params: any[]): Promise<any> | import("../pwfreader/PWFTypes").Meshnode | null;
|
|
124
123
|
getMeasureObjectMeshes(...params: any[]): Promise<any> | import("../pwfreader/PWFTypes").MeshnodeObject[];
|
|
125
124
|
onContextMenu(...params: any[]): void | Promise<any>;
|
|
126
|
-
getContextMenuData(...params: any[]): Promise<any> | {
|
|
127
|
-
meshnodeIndex: number;
|
|
128
|
-
};
|
|
129
125
|
onSingleClick(...params: any[]): void | Promise<any>;
|
|
130
126
|
onMouseMove(...params: any[]): void | Promise<any>;
|
|
131
127
|
onWheel(...params: any[]): void | Promise<any>;
|
|
@@ -277,9 +273,12 @@ export class RenderControllerProxy {
|
|
|
277
273
|
clearFilteredObjectTree(...params: any[]): void | Promise<any>;
|
|
278
274
|
getSectionBoxDisplayBbox(...params: any[]): Promise<any> | import("../sdk").BoundingBox;
|
|
279
275
|
getSectionsAsBox(...params: any[]): Promise<any> | import("../sectioning/SectionController").OrientedBox | null;
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
276
|
+
getRayIntersectPoint(...params: any[]): Promise<any> | {
|
|
277
|
+
intersection: import("../sdk").Vector3 | null;
|
|
278
|
+
meshnodeIndex: number;
|
|
279
|
+
faceNormal: import("../sdk").Vector3 | null;
|
|
280
|
+
nearestMeshnodeIndex?: number;
|
|
281
|
+
};
|
|
283
282
|
}
|
|
284
283
|
export namespace RenderControllerProxy {
|
|
285
284
|
namespace NAVIGATION_MODE {
|
|
@@ -292,7 +291,6 @@ export namespace RenderControllerProxy {
|
|
|
292
291
|
}
|
|
293
292
|
import { PubSubController } from './PubSubController';
|
|
294
293
|
import { NavigationManager } from '../navigation/NavigationManager';
|
|
295
|
-
import { Hotkeys } from '../navigation/Hotkeys';
|
|
296
294
|
import { RenderController } from './RenderController';
|
|
297
295
|
import { RenderControllerWorker } from './RenderControllerWorker';
|
|
298
296
|
import { PWFCache } from '../pwfreader/PWFCache';
|
|
@@ -37,7 +37,6 @@ export class RenderControllerWorker {
|
|
|
37
37
|
offsetY: any;
|
|
38
38
|
};
|
|
39
39
|
onContextMenu(evt: any): Promise<any>;
|
|
40
|
-
getContextMenuData(evt: any): Promise<any>;
|
|
41
40
|
onSingleClick(evt: any): Promise<any>;
|
|
42
41
|
onMouseMove(evt: any): Promise<any>;
|
|
43
42
|
onWheel(evt: any): Promise<any>;
|
|
@@ -120,6 +119,5 @@ export class RenderControllerWorker {
|
|
|
120
119
|
getSectionsAsBox(...params: any[]): Promise<any>;
|
|
121
120
|
setPwfFileCacheState(...params: any[]): Promise<any>;
|
|
122
121
|
partitionUrlsFromMeshnodeIndices(...params: any[]): Promise<any>;
|
|
123
|
-
|
|
124
|
-
getMeasureObjectMeshesPartition(...params: any[]): Promise<any>;
|
|
122
|
+
getRayIntersectPoint(evt: any, returnOnEdgeHitFailure: any): Promise<any>;
|
|
125
123
|
}
|
|
@@ -13,5 +13,4 @@ export declare class ShortestDistanceController {
|
|
|
13
13
|
removeMeasureIds(virtualMeshnodeIndices: number[]): void;
|
|
14
14
|
handleMeasurementClick(virtualMeshnodeIndex: number): void;
|
|
15
15
|
getMeasureObjectMeshes(): MeshnodeObject[];
|
|
16
|
-
getMeasureObjectMeshesPartition(): Promise<MeshnodeObject[]>;
|
|
17
16
|
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import type { NavigationManager } from '
|
|
1
|
+
import type { NavigationManager } from '../navigation/NavigationManager';
|
|
2
2
|
import type { RenderControllerProxy } from '../controllers/RenderControllerProxy';
|
|
3
|
-
import { KeyboardControl } from '
|
|
3
|
+
import { KeyboardControl } from '../navigation/types';
|
|
4
|
+
import type { MeasurementManager } from '../measuring';
|
|
4
5
|
export declare class Hotkeys implements KeyboardControl {
|
|
5
|
-
private renderControllerProxy;
|
|
6
|
-
private navigationManager;
|
|
6
|
+
private readonly renderControllerProxy;
|
|
7
|
+
private readonly navigationManager;
|
|
8
|
+
private readonly measurementManager;
|
|
7
9
|
private _enabled;
|
|
8
10
|
constructor(params: {
|
|
9
11
|
renderControllerProxy: RenderControllerProxy;
|
|
10
12
|
navigationManager: NavigationManager;
|
|
13
|
+
measurementManager: MeasurementManager;
|
|
11
14
|
});
|
|
12
15
|
get enabled(): boolean;
|
|
13
16
|
set enabled(value: boolean);
|
|
14
|
-
onKeyDown: (event: KeyboardEvent) => void
|
|
17
|
+
onKeyDown: (event: KeyboardEvent) => Promise<void>;
|
|
15
18
|
onKeyUp: () => void;
|
|
16
19
|
private publishSelectedToolEvent;
|
|
17
20
|
dispose(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,12 +8,16 @@ export type DistanceLine = {
|
|
|
8
8
|
};
|
|
9
9
|
export declare class DistanceLabel {
|
|
10
10
|
element: HTMLElement;
|
|
11
|
+
canvas: HTMLElement;
|
|
11
12
|
midpoint: THREE.Vector3;
|
|
12
13
|
private readonly line;
|
|
13
14
|
private readonly settingsController;
|
|
14
15
|
private readonly bimMeasureLabel;
|
|
15
16
|
private readonly labelElement;
|
|
16
17
|
private readonly prependLabel;
|
|
18
|
+
hiddenBehindCamera: boolean;
|
|
19
|
+
forcedToBeHidden: boolean;
|
|
20
|
+
private globalOffset;
|
|
17
21
|
constructor(params: {
|
|
18
22
|
line: DistanceLine;
|
|
19
23
|
settingsController: SettingsController;
|
|
@@ -21,9 +25,11 @@ export declare class DistanceLabel {
|
|
|
21
25
|
prependLabel?: string;
|
|
22
26
|
backgroundColor?: CssColor;
|
|
23
27
|
textColor?: CssColor;
|
|
28
|
+
globalOffset: THREE.Vector3 | null;
|
|
24
29
|
});
|
|
25
30
|
show(): void;
|
|
26
31
|
hide(): void;
|
|
32
|
+
update(camera: THREE.PerspectiveCamera | null): void;
|
|
27
33
|
remove(): void;
|
|
28
34
|
calculateRectFromPosition(params: {
|
|
29
35
|
x: number;
|
|
@@ -40,4 +46,5 @@ export declare class DistanceLabel {
|
|
|
40
46
|
x: number;
|
|
41
47
|
y: number;
|
|
42
48
|
}): void;
|
|
49
|
+
setGlobalOffset(params: Vector3): void;
|
|
43
50
|
}
|
|
@@ -2,12 +2,16 @@ import './styles.css';
|
|
|
2
2
|
export declare class FeatureTooltip {
|
|
3
3
|
element: HTMLElement;
|
|
4
4
|
private readonly bimMain;
|
|
5
|
+
private readonly canvas;
|
|
5
6
|
private timerId;
|
|
7
|
+
private delay;
|
|
6
8
|
private readonly locale;
|
|
7
9
|
constructor(params: {
|
|
8
10
|
locale: string;
|
|
11
|
+
delay?: number;
|
|
9
12
|
});
|
|
10
13
|
private onMouseMove;
|
|
14
|
+
private onWheel;
|
|
11
15
|
private onMeasurementObjectLeave;
|
|
12
16
|
private onMeasurementObjectMove;
|
|
13
17
|
private showTooltip;
|
|
@@ -5,8 +5,14 @@ export declare const SNAP_TYPE: {
|
|
|
5
5
|
readonly midpoint: "midpoint";
|
|
6
6
|
readonly edge: "edge";
|
|
7
7
|
readonly endpoint: "endpoint";
|
|
8
|
+
readonly intersection: "intersection";
|
|
8
9
|
};
|
|
9
10
|
export type SnapType = (typeof SNAP_TYPE)[keyof typeof SNAP_TYPE];
|
|
11
|
+
export type ExtendedLine3 = THREE.Line3 & {
|
|
12
|
+
userData?: {
|
|
13
|
+
connectingEdge?: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
10
16
|
export declare function getIntersectionSnapAndOutline(params: {
|
|
11
17
|
intersection: THREE.Vector3;
|
|
12
18
|
matrixWorld: THREE.Matrix4;
|
|
@@ -19,17 +25,14 @@ export declare function getIntersectionSnapAndOutline(params: {
|
|
|
19
25
|
hideDifferentFaceNormal: boolean;
|
|
20
26
|
hideNonCoplanar: boolean;
|
|
21
27
|
};
|
|
28
|
+
clippingPlanes: THREE.Plane[];
|
|
29
|
+
globalOffset: Vector3;
|
|
30
|
+
nearestObjectIntersectionLines: THREE.Line3[];
|
|
22
31
|
}): {
|
|
23
32
|
snapType: SnapType;
|
|
24
33
|
snapPosition: THREE.Vector3;
|
|
25
|
-
snapEdge:
|
|
26
|
-
|
|
27
|
-
end: THREE.Vector3;
|
|
28
|
-
} | null;
|
|
29
|
-
boundaryEdges: {
|
|
30
|
-
start: THREE.Vector3;
|
|
31
|
-
end: THREE.Vector3;
|
|
32
|
-
}[];
|
|
34
|
+
snapEdge: ExtendedLine3 | null;
|
|
35
|
+
boundaryEdges: ExtendedLine3[];
|
|
33
36
|
cursorRotation: Vector3;
|
|
34
37
|
snapScreenPosition: Vector3;
|
|
35
38
|
};
|
|
@@ -12,13 +12,18 @@ export declare class MeasurementManager {
|
|
|
12
12
|
private readonly apiController;
|
|
13
13
|
private currentMode;
|
|
14
14
|
private readonly measureModeToImplementationMap;
|
|
15
|
+
private readonly toolEnabled;
|
|
15
16
|
constructor(params: {
|
|
16
17
|
apiController: ApiController;
|
|
17
18
|
measurements: {
|
|
18
19
|
measurementMode: MeasureMode;
|
|
19
20
|
implementation: MeasurementInterface;
|
|
20
21
|
}[];
|
|
22
|
+
toolEnabled: boolean;
|
|
21
23
|
});
|
|
24
|
+
private onSectionBoxDisplayToggled;
|
|
25
|
+
private onSectionBoxDisplayHoverUpdated;
|
|
26
|
+
private onNavigationChanged;
|
|
22
27
|
setGlobalOffset(params: Vector3): void;
|
|
23
28
|
setMeasurementEnabled(params: {
|
|
24
29
|
measurementMode?: MeasureMode;
|
|
@@ -53,7 +53,6 @@ export declare class MeasurementRenderer {
|
|
|
53
53
|
private onResize;
|
|
54
54
|
private onCameraUpdated;
|
|
55
55
|
private updateDistanceLabelPosition;
|
|
56
|
-
private isDistanceLabelHidden;
|
|
57
56
|
private areRectsOverlapping;
|
|
58
57
|
private isOverlapping;
|
|
59
58
|
private stackElementsVerticallyToFirst;
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
import type { PickingController } from '../picking/PickingController';
|
|
2
2
|
import type { Models } from '../procoregl/Models';
|
|
3
|
-
import type { SnapType } from './MeasureToolUtils';
|
|
3
|
+
import type { SnapType, ExtendedLine3 } from './MeasureToolUtils';
|
|
4
4
|
import type { ViewerRenderer } from '../procoregl/ViewerRenderer';
|
|
5
|
+
import { MeshTopology } from '../procoregl/MeshTopology';
|
|
5
6
|
import type { RenderController } from '../controllers/RenderController';
|
|
6
7
|
import { Vector3 } from '../types/Math';
|
|
8
|
+
import { Meshnode } from '../pwfreader/PWFTypes';
|
|
7
9
|
export type WorldIntersectionSnapResult = {
|
|
8
10
|
intersection: Vector3;
|
|
9
11
|
snapType: SnapType;
|
|
10
12
|
snapPosition: Vector3;
|
|
11
|
-
snapEdge:
|
|
12
|
-
|
|
13
|
-
end: Vector3;
|
|
14
|
-
} | null;
|
|
15
|
-
boundaryEdges: {
|
|
16
|
-
start: Vector3;
|
|
17
|
-
end: Vector3;
|
|
18
|
-
}[];
|
|
13
|
+
snapEdge: ExtendedLine3 | null;
|
|
14
|
+
boundaryEdges: ExtendedLine3[];
|
|
19
15
|
meshnodeIndex: number;
|
|
20
16
|
cursorRotation: Vector3;
|
|
21
17
|
snapScreenPosition: Vector3;
|
|
@@ -26,6 +22,8 @@ export declare class PointToPointController {
|
|
|
26
22
|
private readonly models;
|
|
27
23
|
private readonly camera;
|
|
28
24
|
private currentHoverMeshnodeIndex;
|
|
25
|
+
private nearestMeshnodeIndex;
|
|
26
|
+
nonManifoldMeshnodeIndices: Set<number>;
|
|
29
27
|
private readonly meshTopologyCache;
|
|
30
28
|
private _enabled;
|
|
31
29
|
private readonly globalOffset;
|
|
@@ -33,7 +31,7 @@ export declare class PointToPointController {
|
|
|
33
31
|
private lastWorldIntersectionSnapResult;
|
|
34
32
|
private readonly debugGui;
|
|
35
33
|
private readonly viewerRenderer;
|
|
36
|
-
private renderController;
|
|
34
|
+
private readonly renderController;
|
|
37
35
|
constructor(params: {
|
|
38
36
|
pickingController: PickingController;
|
|
39
37
|
renderController: RenderController;
|
|
@@ -49,8 +47,10 @@ export declare class PointToPointController {
|
|
|
49
47
|
handleWheel(event: WheelEvent): Promise<void>;
|
|
50
48
|
private computeIntersectionSnapResult;
|
|
51
49
|
private getWorldIntersectionSnapResult;
|
|
50
|
+
private getNearestMeshnodeIntersectionLines;
|
|
52
51
|
private publishIntersectionSnapResult;
|
|
53
|
-
|
|
52
|
+
getMeshTopology(meshnode: Meshnode): MeshTopology | null;
|
|
53
|
+
private getFaceCount;
|
|
54
54
|
private meshnodeTooComplex;
|
|
55
55
|
private determineHoverState;
|
|
56
56
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SvgRenderer } from '../components/Markup/SvgRenderer';
|
|
2
2
|
import type { Vector3 } from '../types/Math';
|
|
3
3
|
import type { MeasurementRenderer } from './MeasurementRenderer';
|
|
4
|
+
import { DistanceLabel } from './DistanceLabel';
|
|
4
5
|
import type { SettingsController } from '../controllers/SettingsController';
|
|
5
6
|
import type { RenderControllerProxy } from '../controllers/RenderControllerProxy';
|
|
6
7
|
import { type MeasurementInterface, type MeasurementState } from './MeasurementInterface';
|
|
@@ -26,9 +27,11 @@ export declare class PointToPointManager implements MeasurementInterface {
|
|
|
26
27
|
private featureTooltip;
|
|
27
28
|
private surfaceCursor;
|
|
28
29
|
private edgeCursor;
|
|
30
|
+
private intersectionCursor;
|
|
29
31
|
private midPointCursor;
|
|
30
32
|
private endPointCursor;
|
|
31
33
|
private dom;
|
|
34
|
+
private active;
|
|
32
35
|
constructor(params: {
|
|
33
36
|
apiController: ApiController;
|
|
34
37
|
renderControllerProxy: RenderControllerProxy;
|
|
@@ -37,8 +40,10 @@ export declare class PointToPointManager implements MeasurementInterface {
|
|
|
37
40
|
measurementRenderer: MeasurementRenderer;
|
|
38
41
|
locale: string;
|
|
39
42
|
});
|
|
43
|
+
setActive(active: boolean): void;
|
|
40
44
|
setGlobalOffset(params: Vector3): void;
|
|
41
45
|
getGlobalOffset(): THREE.Vector3;
|
|
46
|
+
getTemporaryDistanceLabel(): DistanceLabel | null;
|
|
42
47
|
private onMouseMove;
|
|
43
48
|
private onWheel;
|
|
44
49
|
getMeasurementProgress(): MeasurementState;
|
|
@@ -9,56 +9,52 @@ export declare const measurementObjectLeaveMoveIntoEmptySpace: {
|
|
|
9
9
|
relatedMeshnodeIndex: null;
|
|
10
10
|
};
|
|
11
11
|
export declare const measurementObjectClickPayloadFirstAnchor: {
|
|
12
|
-
snapPosition:
|
|
13
|
-
x: number;
|
|
14
|
-
y: number;
|
|
15
|
-
z: number;
|
|
16
|
-
};
|
|
12
|
+
snapPosition: import("three").Vector3;
|
|
17
13
|
};
|
|
18
14
|
export declare const measurementObjectClickPayloadSecondAnchor: {
|
|
19
|
-
snapPosition:
|
|
20
|
-
x: number;
|
|
21
|
-
y: number;
|
|
22
|
-
z: number;
|
|
23
|
-
};
|
|
15
|
+
snapPosition: import("three").Vector3;
|
|
24
16
|
};
|
|
25
17
|
export declare const measurementObjectEnterObject1Payload: WorldIntersectionSnapResult;
|
|
26
18
|
export declare const measurementObjectEnterTooComplexPayload: WorldIntersectionSnapResult;
|
|
27
19
|
export declare const measurementObjectEnterObject2Payload: WorldIntersectionSnapResult;
|
|
28
20
|
export declare const measurementObjectMoveMidpointPayload: WorldIntersectionSnapResult;
|
|
21
|
+
export declare const measurementObjectEnterIntersectionPayload: WorldIntersectionSnapResult;
|
|
29
22
|
export declare const measurementObjectMovePayload: WorldIntersectionSnapResult;
|
|
23
|
+
export declare const measurementClippedObjectMovePayload: WorldIntersectionSnapResult;
|
|
30
24
|
export declare const measurementObjectMoveComplexMeshPayload: WorldIntersectionSnapResult;
|
|
31
25
|
export declare const svgDataObjectOutline: {
|
|
32
26
|
lines: {
|
|
33
27
|
stroke: string;
|
|
34
|
-
anchorStart:
|
|
35
|
-
|
|
36
|
-
y: number;
|
|
37
|
-
z: number;
|
|
38
|
-
};
|
|
39
|
-
anchorEnd: {
|
|
40
|
-
x: number;
|
|
41
|
-
y: number;
|
|
42
|
-
z: number;
|
|
43
|
-
};
|
|
28
|
+
anchorStart: import("three").Vector3;
|
|
29
|
+
anchorEnd: import("three").Vector3;
|
|
44
30
|
strokeWidth: number;
|
|
45
31
|
opacity: number;
|
|
46
32
|
}[];
|
|
47
33
|
ellipses: never[];
|
|
48
34
|
};
|
|
35
|
+
export declare const svgDataObjectClippedOutline: {
|
|
36
|
+
lines: ({
|
|
37
|
+
stroke: string;
|
|
38
|
+
anchorStart: import("three").Vector3;
|
|
39
|
+
anchorEnd: import("three").Vector3;
|
|
40
|
+
strokeWidth: number;
|
|
41
|
+
opacity: number;
|
|
42
|
+
strokeDasharray: string;
|
|
43
|
+
} | {
|
|
44
|
+
stroke: string;
|
|
45
|
+
anchorStart: import("three").Vector3;
|
|
46
|
+
anchorEnd: import("three").Vector3;
|
|
47
|
+
strokeWidth: number;
|
|
48
|
+
opacity: number;
|
|
49
|
+
strokeDasharray?: undefined;
|
|
50
|
+
})[];
|
|
51
|
+
ellipses: never[];
|
|
52
|
+
};
|
|
49
53
|
export declare const svgDataFirstAnchorOutlineTempMeasurement: {
|
|
50
54
|
lines: ({
|
|
51
55
|
stroke: string;
|
|
52
|
-
anchorStart:
|
|
53
|
-
|
|
54
|
-
y: number;
|
|
55
|
-
z: number;
|
|
56
|
-
};
|
|
57
|
-
anchorEnd: {
|
|
58
|
-
x: number;
|
|
59
|
-
y: number;
|
|
60
|
-
z: number;
|
|
61
|
-
};
|
|
56
|
+
anchorStart: import("three").Vector3;
|
|
57
|
+
anchorEnd: import("three").Vector3;
|
|
62
58
|
strokeWidth: number;
|
|
63
59
|
opacity: number;
|
|
64
60
|
strokeDasharray?: undefined;
|
|
@@ -97,31 +93,15 @@ export declare const svgDataFirstAnchorOutlineTempMeasurement: {
|
|
|
97
93
|
export declare const svgDataFinalMeasurement: {
|
|
98
94
|
lines: ({
|
|
99
95
|
stroke: string;
|
|
100
|
-
anchorStart:
|
|
101
|
-
|
|
102
|
-
y: number;
|
|
103
|
-
z: number;
|
|
104
|
-
};
|
|
105
|
-
anchorEnd: {
|
|
106
|
-
x: number;
|
|
107
|
-
y: number;
|
|
108
|
-
z: number;
|
|
109
|
-
};
|
|
96
|
+
anchorStart: import("three").Vector3;
|
|
97
|
+
anchorEnd: import("three").Vector3;
|
|
110
98
|
strokeWidth: number;
|
|
111
99
|
opacity: number;
|
|
112
100
|
strokeDasharray?: undefined;
|
|
113
101
|
} | {
|
|
114
102
|
stroke: string;
|
|
115
|
-
anchorStart:
|
|
116
|
-
|
|
117
|
-
y: number;
|
|
118
|
-
z: number;
|
|
119
|
-
};
|
|
120
|
-
anchorEnd: {
|
|
121
|
-
x: number;
|
|
122
|
-
y: number;
|
|
123
|
-
z: number;
|
|
124
|
-
};
|
|
103
|
+
anchorStart: import("three").Vector3;
|
|
104
|
+
anchorEnd: import("three").Vector3;
|
|
125
105
|
strokeWidth: number;
|
|
126
106
|
opacity: number;
|
|
127
107
|
strokeDasharray: string;
|
|
@@ -32,3 +32,20 @@ export declare const CAMERA_BEHIND_OF_DISTANCE_LABELS: {
|
|
|
32
32
|
z: number;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
+
export declare const CAMERA_FAR_FROM_DISTANCE_LABELS: {
|
|
36
|
+
fov: number;
|
|
37
|
+
aspect: number;
|
|
38
|
+
near: number;
|
|
39
|
+
far: number;
|
|
40
|
+
position: {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
z: number;
|
|
44
|
+
};
|
|
45
|
+
quaternion: {
|
|
46
|
+
w: number;
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
z: number;
|
|
50
|
+
};
|
|
51
|
+
};
|