@procore/bim-webviewer-sdk 16.0.0 → 16.1.0-BIM-4505.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 +22 -0
- package/dist/Procore.Bim.Webviewer.d.ts +1998 -13
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/Webviewer.d.ts +10 -0
- package/dist/types/src/components/CoachmarkManagerComponent/CoachmarkComponent.d.ts +2 -0
- package/dist/types/src/components/CoachmarkManagerComponent/CoachmarkManagerComponent.d.ts +9 -0
- package/dist/types/src/components/CoachmarkManagerComponent/Coachmarks.d.ts +2 -0
- package/dist/types/src/components/Markup/SvgRenderer.d.ts +5 -2
- package/dist/types/src/components/Markup/__tests__/fixtures.d.ts +1 -1
- package/dist/types/src/components/ShortestDistanceComponent.d.ts +2 -1
- package/dist/types/src/components/Tooltip/Tooltip.d.ts +22 -0
- package/dist/types/src/components/Tooltip/__tests__/Tooltip.test.d.ts +1 -0
- package/dist/types/src/components/Tooltip/index.d.ts +1 -0
- package/dist/types/src/controllers/PubSubController.d.ts +5 -0
- package/dist/types/src/controllers/RenderController.d.ts +12 -23
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +4 -18
- package/dist/types/src/controllers/RenderControllerWorker.d.ts +2 -0
- package/dist/types/src/measuring/MeasureToolUtils.d.ts +45 -0
- package/dist/types/src/measuring/PointToPointController.d.ts +50 -0
- package/dist/types/src/measuring/PointToPointManager.d.ts +42 -0
- package/dist/types/src/measuring/__tests__/MeasureToolUtils.test.d.ts +1 -0
- package/dist/types/src/measuring/__tests__/PointToPointController.test.d.ts +1 -0
- package/dist/types/src/measuring/__tests__/PointToPointFixtures.d.ts +184 -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 +7 -0
- package/dist/types/src/measuring/index.d.ts +2 -0
- package/dist/types/src/navigation/DefaultControl.d.ts +11 -0
- package/dist/types/src/picking/PickingController.d.ts +1 -0
- package/dist/types/src/procoregl/GeometryFactory.d.ts +1 -0
- package/dist/types/src/procoregl/MeshGeometry.d.ts +6 -2
- package/dist/types/src/procoregl/MeshTopology/MeshTopology.d.ts +1 -2
- package/dist/types/src/procoregl/MeshTopology/__tests__/TopologyFixtures.d.ts +9 -7
- package/dist/types/src/procoregl/Models/Models.d.ts +7 -5
- package/dist/types/src/procoregl/PartitionsRenderer.d.ts +1 -0
- package/dist/types/src/procoregl/PartitionsRendererImpl.d.ts +2 -0
- package/dist/types/src/procoregl/SelectedNodeServices/SelectedNodeServices.d.ts +23 -22
- package/dist/types/src/procoregl/StreamedMeshGeometry.d.ts +1 -2
- package/dist/types/src/procoregl/ViewerRenderer.d.ts +2 -0
- package/dist/types/src/pwfreader/PWF.d.ts +1 -1
- package/dist/types/src/pwfreader/pwf/impl/pwfNoCache/PWFMeshNoCache.d.ts +1 -0
- package/dist/types/src/pwfreader/pwf/impl/recordReader/PWFMeshDataReader.d.ts +1 -0
- package/dist/types/src/pwfreader/pwf/impl/recordReader/PWFMeshReader.d.ts +1 -0
- package/dist/types/src/pwfreader/shared/Meshnode.d.ts +4 -6
- package/dist/types/src/utils/LRUCache.d.ts +5 -5
- package/dist/types/src/utils/MathHelper/MathHelper.d.ts +17 -0
- package/dist/types/src/utils/MathHelper/__tests__/MathHelper.test.d.ts +1 -0
- package/dist/types/src/utils/MathHelper/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/src/procoregl/__tests__/MockMeshnode.d.ts +0 -13
|
@@ -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;
|
|
@@ -250,6 +252,14 @@ export declare class Webviewer {
|
|
|
250
252
|
removeContextMenuItems: ({ contextMenuItemIds, }: {
|
|
251
253
|
contextMenuItemIds: string[];
|
|
252
254
|
}) => void;
|
|
255
|
+
showCoachmark: (params: {
|
|
256
|
+
id: string;
|
|
257
|
+
label: string;
|
|
258
|
+
buttonLabel: string;
|
|
259
|
+
buttonOnClick: () => void;
|
|
260
|
+
tooltipMessage?: string;
|
|
261
|
+
}) => void;
|
|
262
|
+
hideCoachmark: (coachmarkId: string) => void;
|
|
253
263
|
getSettings: () => {
|
|
254
264
|
displayUnits: string;
|
|
255
265
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { MenuOptionTooltip } from '../DropdownComponent/MenuOptions/MenuOptionTooltip';
|
|
1
2
|
import { CoachmarkProps } from './Coachmarks';
|
|
2
3
|
export declare class CoachmarkComponent {
|
|
3
4
|
element: HTMLElement;
|
|
4
5
|
buttonLabel: HTMLElement;
|
|
5
6
|
button: HTMLElement;
|
|
6
7
|
label: HTMLElement;
|
|
8
|
+
tooltip?: MenuOptionTooltip;
|
|
7
9
|
private id;
|
|
8
10
|
constructor(props: CoachmarkProps);
|
|
9
11
|
setVisible(visible: boolean): void;
|
|
@@ -2,5 +2,14 @@ import { CoachmarkManagerProps } from './Coachmarks';
|
|
|
2
2
|
import './styles.css';
|
|
3
3
|
export declare class CoachmarkManagerComponent {
|
|
4
4
|
element: HTMLElement;
|
|
5
|
+
private customCoachmarks;
|
|
5
6
|
constructor(props: CoachmarkManagerProps);
|
|
7
|
+
showCustomCoachmark(params: {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
buttonLabel: string;
|
|
11
|
+
buttonOnClick?: () => void;
|
|
12
|
+
tooltipMessage?: string;
|
|
13
|
+
}): void;
|
|
14
|
+
hideCustomCoachmark(id: string): void;
|
|
6
15
|
}
|
|
@@ -34,6 +34,8 @@ export type Line = {
|
|
|
34
34
|
end: Vector2;
|
|
35
35
|
stroke: CssColor;
|
|
36
36
|
strokeWidth: number;
|
|
37
|
+
strokeDasharray?: string;
|
|
38
|
+
opacity?: number;
|
|
37
39
|
zIndex?: number;
|
|
38
40
|
};
|
|
39
41
|
export type Arrow = {
|
|
@@ -69,8 +71,8 @@ export type SvgData = {
|
|
|
69
71
|
rects?: Rect[];
|
|
70
72
|
};
|
|
71
73
|
type AnchoredBoxEllipse = BoxEllipse & Anchorable;
|
|
72
|
-
type AnchoredRadiusEllipse = Omit<RadiusEllipse, 'center'> & Anchorable;
|
|
73
|
-
type AnchoredLine = Omit<Line, 'start' | 'end'> & AnchorableLine;
|
|
74
|
+
export type AnchoredRadiusEllipse = Omit<RadiusEllipse, 'center'> & Anchorable;
|
|
75
|
+
export type AnchoredLine = Omit<Line, 'start' | 'end'> & AnchorableLine;
|
|
74
76
|
type AnchoredArrow = Omit<Arrow, 'start' | 'end'> & AnchorableLine;
|
|
75
77
|
type AnchoredText = Omit<Text, 'origin'> & Anchorable;
|
|
76
78
|
type AnchoredRect = Omit<Rect, 'x' | 'y'> & Anchorable;
|
|
@@ -109,6 +111,7 @@ export declare class SvgRenderer {
|
|
|
109
111
|
drawArrow(arrow: Arrow): void;
|
|
110
112
|
drawText(text: Text): void;
|
|
111
113
|
drawRect(rect: Rect): void;
|
|
114
|
+
private clipLine;
|
|
112
115
|
private _clear;
|
|
113
116
|
clear(): void;
|
|
114
117
|
hasContent(): boolean;
|
|
@@ -2,7 +2,7 @@ import type { RedlinesData } from '../../../viewpoint/types';
|
|
|
2
2
|
import type { SvgData, AnchoredSvgData } from '../SvgRenderer';
|
|
3
3
|
export declare const MARKUP_DRAW_SNAPSHOT = "\n<defs>\n <marker id=\"arrowhead-0\" viewBox=\"0 0 10 10\" refX=\"7\" refY=\"5\" markerWidth=\"6\" markerHeight=\"3\" orient=\" auto-start-reverse\" fill=\"rgb(0, 0, 255)\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\"></path>\n </marker>\n</defs>\n<ellipse stroke=\"rgb(255, 0, 0)\" stroke-width=\"3\" fill=\"none\" cx=\"288.7389312236744\" cy=\"271.2610687763 256\" rx=\"31.26106877632563\" ry=\"31.26106877632563\"></ellipse>\n<ellipse stroke=\"rgb(255, 255, 127.5)\" stroke-width=\"3\" fill=\"none\" cx=\"194.95572489469748\" cy=\"396.3053438816281\" rx=\"62.522137552651245\" ry=\"93.78320632897683\"></ellipse>\n<line stroke=\"rgb(0, 255, 0)\" stroke-width=\"3\" x1=\"320\" y1=\"240\" x2=\"632.6106877632562\" y2=\"302.52213755265126\"></line>\n<line stroke=\"rgb(0, 0, 255)\" stroke-width=\"3\" x1=\"320\" y1=\"240\" x2=\"632.6106877632562\" y2=\"177.47786244734877\" marker-end=\"url(#arrowhead-0)\"></line>\n<text fill=\"rgb(255, 255, 0)\" x=\"632.6106877632562\" y=\"240\" style=\"font: 21px tahoma;\">text</text>\n";
|
|
4
4
|
export declare const MARKUP_DATA: RedlinesData;
|
|
5
|
-
export declare const SVG_DRAW_SNAPSHOT = "\n<defs>\n <marker id=\"arrowhead-0\" viewBox=\"0 0 10 10\" refX=\"7\" refY=\"5\" markerWidth=\"6\" markerHeight=\"3\" orient=\"auto-start-reverse\" fill=\"rgba(0, 0, 255, 0.5)\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\"></path>\n </marker>\n</defs>\n<ellipse stroke=\"rgba(255, 0, 0, 0.5)\" stroke-width=\"3\" fill=\"none\" cx=\"288.7389312236744\" cy=\"261.2610687763256\" rx=\"31.26106877632563\" ry=\"41.26106877632563\"></ellipse>\n<ellipse stroke=\"rgba(255, 0, 255, 1)\" stroke-width=\"3\" fill=\"rgba(0, 255, 255, 0.5)\" cx=\"288.7389312236744\" cy=\"331.2610687763256\" rx=\"31.26106877632563\" ry=\"31.26106877632563\"></ellipse>\n<ellipse stroke=\"chartreuse\" stroke-width=\"5\" fill=\"dodgerblue\" cx=\"50\" cy=\"50\" rx=\"50\" ry=\"50\"></ellipse>\n<line stroke=\"rgba(0, 255, 0, 0.5)\" stroke-width=\"3\" x1=\"320\" y1=\"240\" x2=\"632.6106877632562\" y2=\"302.52213755265126\"></line>\n<line stroke=\"rgba(0, 0, 255, 0.5)\" stroke-width=\"3\" x1=\"320\" y1=\"240\" x2=\"632.6106877632562\" y2=\"177.47786244734877\" marker-end=\"url(#arrowhead-0)\"></line>\n<text fill=\"rgba(255, 255, 0, 0.5)\" x=\"632.6106877632562\" y=\"240\" style=\"font: 9px verdana;\">text</text>\n<rect width=\"50\" height=\"100\" x=\"250\" y=\"300\" rx=\"10\" ry=\"10\" fill=\"rgba(255, 0, 0, 0.5)\" stroke=\"rgba(0, 255, 0, 0.5)\" stroke-width=\"1\"></rect>\n";
|
|
5
|
+
export declare const SVG_DRAW_SNAPSHOT = "\n<defs>\n <marker id=\"arrowhead-0\" viewBox=\"0 0 10 10\" refX=\"7\" refY=\"5\" markerWidth=\"6\" markerHeight=\"3\" orient=\"auto-start-reverse\" fill=\"rgba(0, 0, 255, 0.5)\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\"></path>\n </marker>\n</defs>\n<ellipse stroke=\"rgba(255, 0, 0, 0.5)\" stroke-width=\"3\" fill=\"none\" cx=\"288.7389312236744\" cy=\"261.2610687763256\" rx=\"31.26106877632563\" ry=\"41.26106877632563\"></ellipse>\n<ellipse stroke=\"rgba(255, 0, 255, 1)\" stroke-width=\"3\" fill=\"rgba(0, 255, 255, 0.5)\" cx=\"288.7389312236744\" cy=\"331.2610687763256\" rx=\"31.26106877632563\" ry=\"31.26106877632563\"></ellipse>\n<ellipse stroke=\"chartreuse\" stroke-width=\"5\" fill=\"dodgerblue\" cx=\"50\" cy=\"50\" rx=\"50\" ry=\"50\"></ellipse>\n<line stroke=\"rgba(0, 255, 0, 0.5)\" stroke-width=\"3\" x1=\"320\" y1=\"240\" x2=\"632.6106877632562\" y2=\"302.52213755265126\"></line>\n<line stroke=\"olive\" stroke-width=\"3\" x1=\"220\" y1=\"140\" x2=\"532\" y2=\"202\" stroke-dasharray=\"5 5\"></line>\n<line stroke=\"peru\" stroke-width=\"3\" x1=\"120\" y1=\"40\" x2=\"432\" y2=\"102\" opacity=\"0.5\"></line>\n<line stroke=\"rgba(0, 0, 255, 0.5)\" stroke-width=\"3\" x1=\"320\" y1=\"240\" x2=\"632.6106877632562\" y2=\"177.47786244734877\" marker-end=\"url(#arrowhead-0)\"></line>\n<text fill=\"rgba(255, 255, 0, 0.5)\" x=\"632.6106877632562\" y=\"240\" style=\"font: 9px verdana;\">text</text>\n<rect width=\"50\" height=\"100\" x=\"250\" y=\"300\" rx=\"10\" ry=\"10\" fill=\"rgba(255, 0, 0, 0.5)\" stroke=\"rgba(0, 255, 0, 0.5)\" stroke-width=\"1\"></rect>\n";
|
|
6
6
|
export declare const SVG_DATA: SvgData;
|
|
7
7
|
export declare const ANCHORED_SVG_DRAW_SNAPSHOT = "\n<defs>\n <marker id=\"arrowhead-0\" viewBox=\"0 0 10 10\" refX=\"7\" refY=\"5\" markerWidth=\"6\" markerHeight=\"3\" orient=\"auto-start-reverse\" fill=\"rgba(0, 0, 255, 0.5)\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\"></path>\n </marker>\n</defs>\n<ellipse stroke=\"rgba(255, 0, 0, 0.5)\" stroke-width=\"3\" fill=\"none\" cx=\"373.4940062926364\" cy=\"137.2646118814776\" rx=\"25\" ry=\"25\"></ellipse>\n<ellipse stroke=\"rgba(255, 0, 255, 1)\" stroke-width=\"3\" fill=\"rgba(0, 255, 255, 0.5)\" cx=\"377.4935131017527\" cy=\"113.49240793561125\" rx=\"25\" ry=\"25\"></ellipse>\n<ellipse stroke=\"chartreuse\" stroke-width=\"5\" fill=\"dodgerblue\" cx=\"382.13939697834473\" cy=\"85.87827842058752\" rx=\"25\" ry=\"25\"></ellipse>\n<line stroke=\"rgba(0, 255, 0, 0.5)\" stroke-width=\"3\" x1=\"330.83673841037177\" y1=\"97.63705324816502\" x2=\"429.20274232219333\" y2=\"75.09117116380412\"></line>\n<line stroke=\"rgba(0, 0, 255, 0.5)\" stroke-width=\"3\" x1=\"348.3202682243527\" y1=\"68.77844857614542\" x2=\"421.05630132055813\" y2=\"105.55567600126108\" marker-end=\"url(#arrowhead-0)\"></line>\n<text fill=\"rgba(255, 255, 0, 0.5)\" x=\"397.6021287367146\" y=\"63.40898166491502\" style=\"font: 9px verdana;\">text</text>\n<rect width=\"40\" height=\"25\" x=\"374.1179019239718\" y=\"2.180634279826336\" rx=\"10\" ry=\"10\" fill=\"rgba(255, 0, 0, 0.5)\" stroke=\"rgba(0, 255, 0, 0.5)\" stroke-width=\"1\"></rect>\n<ellipse stroke=\"yellow\" stroke-width=\"5\" fill=\"red\" cx=\"392.02368438075905\" cy=\"-42.30962774098606\" rx=\"25\" ry=\"25\"></ellipse>\n<rect width=\"40\" height=\"25\" x=\"382.02368438075905\" y=\"-44.80962774098606\" rx=\"10\" ry=\"10\" fill=\"green\" stroke=\"cyan\" stroke-width=\"5\"></rect>\n<ellipse stroke=\"magenta\" stroke-width=\"5\" fill=\"blue\" cx=\"412.02368438075905\" cy=\"-22.30962774098606\" rx=\"25\" ry=\"25\"></ellipse>\n";
|
|
8
8
|
export declare const ANCHORED_SVG_CAMERA_PARAMS: {
|
|
@@ -6,7 +6,7 @@ export class ShortestDistanceComponent {
|
|
|
6
6
|
render: any;
|
|
7
7
|
center_lock: any;
|
|
8
8
|
pwfCache: PWFCache;
|
|
9
|
-
partitionsCache: LRUCache
|
|
9
|
+
partitionsCache: LRUCache<any, any>;
|
|
10
10
|
dom: any;
|
|
11
11
|
measureSvgLayer: any;
|
|
12
12
|
measureSvgContent: any;
|
|
@@ -25,6 +25,7 @@ export class ShortestDistanceComponent {
|
|
|
25
25
|
displayUnit: "ftin";
|
|
26
26
|
pivot: import("three").Vector3;
|
|
27
27
|
mouseMove: (event: any) => void;
|
|
28
|
+
onNavigationChanged(data: any): Promise<void>;
|
|
28
29
|
DrawLine(start: any, end: any): void;
|
|
29
30
|
DrawDashedLine(start: any, end: any): void;
|
|
30
31
|
DrawEndpoint(endpoint: any): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './styles.css';
|
|
2
|
+
type Position = 'top' | 'right' | 'bottom' | 'left';
|
|
3
|
+
export declare class Tooltip {
|
|
4
|
+
element: HTMLElement;
|
|
5
|
+
private arrowElement;
|
|
6
|
+
private target;
|
|
7
|
+
private bimMain;
|
|
8
|
+
private positionHorizontal;
|
|
9
|
+
private positionVertical;
|
|
10
|
+
private offsetFromTarget;
|
|
11
|
+
constructor(props: {
|
|
12
|
+
target: HTMLElement;
|
|
13
|
+
label: string;
|
|
14
|
+
position: Position;
|
|
15
|
+
maxWidth?: number;
|
|
16
|
+
offset?: number;
|
|
17
|
+
});
|
|
18
|
+
private onTargetMouseOver;
|
|
19
|
+
private onTargetMouseOut;
|
|
20
|
+
private positionAt;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tooltip } from './Tooltip';
|
|
@@ -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,6 +80,7 @@ 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;
|
|
@@ -192,6 +193,7 @@ export class RenderController {
|
|
|
192
193
|
getContextMenuData(evt: any): {
|
|
193
194
|
intersection: import("../sdk").Vector3 | null;
|
|
194
195
|
meshnodeIndex: number;
|
|
196
|
+
faceNormal: import("../sdk").Vector3 | null;
|
|
195
197
|
} | {
|
|
196
198
|
meshnodeIndex: number;
|
|
197
199
|
};
|
|
@@ -200,13 +202,15 @@ export class RenderController {
|
|
|
200
202
|
getIntersectionAndMeshnodeIndex(evt: any): {
|
|
201
203
|
intersection: import("../sdk").Vector3 | null;
|
|
202
204
|
meshnodeIndex: number;
|
|
205
|
+
faceNormal: import("../sdk").Vector3 | null;
|
|
203
206
|
};
|
|
204
|
-
isMeshnodeSelected(
|
|
205
|
-
clickedOnSelectedObject(
|
|
206
|
-
clickedOnUnselectedObject(
|
|
207
|
+
isMeshnodeSelected(virtualMeshnodeIndex: any): boolean;
|
|
208
|
+
clickedOnSelectedObject(virtualMeshnodeIndex: any, rightClick: any): void;
|
|
209
|
+
clickedOnUnselectedObject(virtualMeshnodeIndex: any, rightClick: any): void;
|
|
207
210
|
handleObjectSelection(meshnodeIndex: any, rightClick: any): void;
|
|
208
211
|
handleEmptySpaceClick(): void;
|
|
209
212
|
onSingleClick(evt: any, rightClick?: boolean): void;
|
|
213
|
+
onMouseMove(evt: any): void;
|
|
210
214
|
setCanvasSelectionEnabled(enabled: any): void;
|
|
211
215
|
getSelectedSubtree(meshnodeIndex: any): {
|
|
212
216
|
objectId: number;
|
|
@@ -238,15 +242,7 @@ export class RenderController {
|
|
|
238
242
|
y: number;
|
|
239
243
|
z: number;
|
|
240
244
|
};
|
|
241
|
-
ToScreenPosition(params: any):
|
|
242
|
-
x: any;
|
|
243
|
-
y: any;
|
|
244
|
-
z: any;
|
|
245
|
-
} | {
|
|
246
|
-
x: any;
|
|
247
|
-
y: any;
|
|
248
|
-
z: any;
|
|
249
|
-
}[];
|
|
245
|
+
ToScreenPosition(params: any): import("../sdk").Vector3 | import("../sdk").Vector3[];
|
|
250
246
|
ConvertScreenPosition(vector: any): {
|
|
251
247
|
x: any;
|
|
252
248
|
y: any;
|
|
@@ -322,7 +318,6 @@ export class RenderController {
|
|
|
322
318
|
unit: string;
|
|
323
319
|
};
|
|
324
320
|
};
|
|
325
|
-
applyGlobalOffset(vector: any): any;
|
|
326
321
|
refreshScene(): void;
|
|
327
322
|
setHiddenSet(params: any): void;
|
|
328
323
|
refreshLighting(): void;
|
|
@@ -334,22 +329,14 @@ export class RenderController {
|
|
|
334
329
|
getSections(format: any): import("../sdk").SectionDataProcoreFormat | import("../sdk").SectionDataAutodeskFormat | null;
|
|
335
330
|
clearSection(): void;
|
|
336
331
|
setOptions(options: any): void;
|
|
337
|
-
findFirstObject(
|
|
332
|
+
findFirstObject(params: any): import("../sdk").PublicNode | undefined;
|
|
338
333
|
getNamedNode(nodeId: any, options?: {}): import("../sdk").PublicNode | undefined;
|
|
339
334
|
setEulerAngles(params: any): void;
|
|
340
335
|
statusChange(type: any): void;
|
|
341
336
|
onUndo(): void;
|
|
342
337
|
onRedo(): void;
|
|
343
338
|
getOrbitTranslate(event: any): {
|
|
344
|
-
translate:
|
|
345
|
-
x: any;
|
|
346
|
-
y: any;
|
|
347
|
-
z: any;
|
|
348
|
-
} | {
|
|
349
|
-
x: any;
|
|
350
|
-
y: any;
|
|
351
|
-
z: any;
|
|
352
|
-
}[];
|
|
339
|
+
translate: import("../sdk").Vector3 | import("../sdk").Vector3[];
|
|
353
340
|
orbitPoint: import("../sdk").Vector3;
|
|
354
341
|
};
|
|
355
342
|
setMeasureEnabled(enabled: any): void;
|
|
@@ -389,6 +376,7 @@ export class RenderController {
|
|
|
389
376
|
getRenderMode(): string;
|
|
390
377
|
getSelectedNodeIds(params?: {}): number[];
|
|
391
378
|
toggleSectionBoxDisplay(enable: any): void;
|
|
379
|
+
togglePointToPoint(enabled: any): void;
|
|
392
380
|
getSectionBoxDisplayBbox(): import("../sdk").BoundingBox;
|
|
393
381
|
getSectionsAsBox(): import("../sectioning/SectionController").OrientedBox | null;
|
|
394
382
|
zoomToSectionBox(): void;
|
|
@@ -456,6 +444,7 @@ import { ProcoreRenderPass } from "../procoregl/ProcoreRenderPass";
|
|
|
456
444
|
import { SectionRenderPass } from "../procoregl/SectionDisplay";
|
|
457
445
|
import { PWF } from "../pwfreader/PWF";
|
|
458
446
|
import { PickingController } from "../picking/PickingController";
|
|
447
|
+
import { PointToPointController } from "../measuring";
|
|
459
448
|
import { NavigationModel } from "../navigation/NavigationModel";
|
|
460
449
|
import { Models } from "../procoregl/Models";
|
|
461
450
|
import { ShortestDistanceController } from "./ShortestDistanceController";
|
|
@@ -130,6 +130,7 @@ export class RenderControllerProxy {
|
|
|
130
130
|
meshnodeIndex: number;
|
|
131
131
|
};
|
|
132
132
|
onSingleClick(...params: any[]): void | Promise<any>;
|
|
133
|
+
onMouseMove(...params: any[]): void | Promise<any>;
|
|
133
134
|
resizeScene(...params: any[]): void;
|
|
134
135
|
onDoubleClick(...params: any[]): void | Promise<any>;
|
|
135
136
|
onRightClick(...params: any[]): void | Promise<any>;
|
|
@@ -146,26 +147,10 @@ export class RenderControllerProxy {
|
|
|
146
147
|
setVisibility(...params: any[]): void | Promise<any>;
|
|
147
148
|
getVisibility(...params: any[]): Promise<any> | import("../sdk").Visibility;
|
|
148
149
|
getOrbitTranslate(...params: any[]): Promise<any> | {
|
|
149
|
-
translate:
|
|
150
|
-
x: any;
|
|
151
|
-
y: any;
|
|
152
|
-
z: any;
|
|
153
|
-
} | {
|
|
154
|
-
x: any;
|
|
155
|
-
y: any;
|
|
156
|
-
z: any;
|
|
157
|
-
}[];
|
|
150
|
+
translate: import("../sdk").Vector3 | import("../sdk").Vector3[];
|
|
158
151
|
orbitPoint: import("../sdk").Vector3;
|
|
159
152
|
};
|
|
160
|
-
ToScreenPosition(...params: any[]): Promise<any> |
|
|
161
|
-
x: any;
|
|
162
|
-
y: any;
|
|
163
|
-
z: any;
|
|
164
|
-
} | {
|
|
165
|
-
x: any;
|
|
166
|
-
y: any;
|
|
167
|
-
z: any;
|
|
168
|
-
}[];
|
|
153
|
+
ToScreenPosition(...params: any[]): Promise<any> | import("../sdk").Vector3 | import("../sdk").Vector3[];
|
|
169
154
|
ModelToMapSpace(...params: any[]): Promise<any> | {
|
|
170
155
|
x?: undefined;
|
|
171
156
|
y?: undefined;
|
|
@@ -282,6 +267,7 @@ export class RenderControllerProxy {
|
|
|
282
267
|
getRenderMode(...params: any[]): string | Promise<any>;
|
|
283
268
|
getSelectedNodeIds(...params: any[]): Promise<any> | number[];
|
|
284
269
|
toggleSectionBoxDisplay(...params: any[]): void | Promise<any>;
|
|
270
|
+
togglePointToPoint(...params: any[]): void | Promise<any>;
|
|
285
271
|
zoomToSectionBox(...params: any[]): void | Promise<any>;
|
|
286
272
|
setSectionBoxHidden(...params: any[]): void | Promise<any>;
|
|
287
273
|
resetSectionBox(...params: any[]): void | Promise<any>;
|
|
@@ -39,6 +39,7 @@ export class RenderControllerWorker {
|
|
|
39
39
|
onContextMenu(evt: any): Promise<any>;
|
|
40
40
|
getContextMenuData(evt: any): Promise<any>;
|
|
41
41
|
onSingleClick(evt: any): Promise<any>;
|
|
42
|
+
onMouseMove(evt: any): Promise<any>;
|
|
42
43
|
resizeScene(...params: any[]): Promise<any>;
|
|
43
44
|
onDoubleClick(evt: any): Promise<any>;
|
|
44
45
|
onRightClick(evt: any): Promise<any>;
|
|
@@ -108,6 +109,7 @@ export class RenderControllerWorker {
|
|
|
108
109
|
getRenderMode(...params: any[]): Promise<any>;
|
|
109
110
|
getSelectedNodeIds(...params: any[]): Promise<any>;
|
|
110
111
|
toggleSectionBoxDisplay(...params: any[]): Promise<any>;
|
|
112
|
+
togglePointToPoint(...params: any[]): Promise<any>;
|
|
111
113
|
zoomToSectionBox(...params: any[]): Promise<any>;
|
|
112
114
|
setSectionBoxHidden(...params: any[]): Promise<any>;
|
|
113
115
|
resetSectionBox(...params: any[]): Promise<any>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { MeshTopology } from '../procoregl/MeshTopology/MeshTopology';
|
|
2
|
+
import { Vector3 } from '../types/Math';
|
|
3
|
+
export declare const SNAP_TYPE: {
|
|
4
|
+
readonly surface: "surface";
|
|
5
|
+
readonly midpoint: "midpoint";
|
|
6
|
+
readonly edge: "edge";
|
|
7
|
+
readonly endpoint: "endpoint";
|
|
8
|
+
};
|
|
9
|
+
export type SnapType = (typeof SNAP_TYPE)[keyof typeof SNAP_TYPE];
|
|
10
|
+
export declare function getIntersectionSnapAndOutline(params: {
|
|
11
|
+
intersection: THREE.Vector3;
|
|
12
|
+
matrixWorld: THREE.Matrix4;
|
|
13
|
+
meshTopology: MeshTopology;
|
|
14
|
+
intersectionFaceNormal: THREE.Vector3;
|
|
15
|
+
camera: THREE.PerspectiveCamera;
|
|
16
|
+
canvasWidth: number;
|
|
17
|
+
canvasHeight: number;
|
|
18
|
+
outlineOptions: {
|
|
19
|
+
hideDifferentFaceNormal: boolean;
|
|
20
|
+
hideNonCoplanar: boolean;
|
|
21
|
+
};
|
|
22
|
+
}): {
|
|
23
|
+
snapType: SnapType;
|
|
24
|
+
snapPosition: THREE.Vector3;
|
|
25
|
+
snapEdge: {
|
|
26
|
+
start: THREE.Vector3;
|
|
27
|
+
end: THREE.Vector3;
|
|
28
|
+
} | null;
|
|
29
|
+
boundaryEdges: {
|
|
30
|
+
start: THREE.Vector3;
|
|
31
|
+
end: THREE.Vector3;
|
|
32
|
+
}[];
|
|
33
|
+
cursorRotation: Vector3;
|
|
34
|
+
snapScreenPosition: Vector3 | null;
|
|
35
|
+
};
|
|
36
|
+
export declare function detectSnapFeature(intersectPoint: THREE.Vector3, line: THREE.Line3, cameraPosition: THREE.Vector3): {
|
|
37
|
+
detectedSnapType: SnapType;
|
|
38
|
+
detectedSnapPosition: THREE.Vector3;
|
|
39
|
+
};
|
|
40
|
+
export declare function getNormalFromPoints(point1: THREE.Vector3, point2: THREE.Vector3, point3: THREE.Vector3): THREE.Vector3;
|
|
41
|
+
export declare function isNormalFacingCamera(normal: THREE.Vector3, cameraDirection: THREE.Vector3): boolean;
|
|
42
|
+
export declare function arePlanesCoplanar(normal1: THREE.Vector3, point1: THREE.Vector3, normal2: THREE.Vector3, point2: THREE.Vector3): boolean;
|
|
43
|
+
export declare function areNormalsSimilar(normal1: THREE.Vector3, normal2: THREE.Vector3): boolean;
|
|
44
|
+
export declare function getSurfaceCursorAngle(camera: THREE.PerspectiveCamera, faceNormal: THREE.Vector3, intersection: THREE.Vector3, canvasWidth: number, canvasHeight: number): Vector3;
|
|
45
|
+
export declare function getEdgeCursorAngle(start: Vector3, end: Vector3, camera: THREE.PerspectiveCamera, canvasWidth: number, canvasHeight: number): number;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { PickingController } from '../picking/PickingController';
|
|
2
|
+
import type { Models } from '../procoregl/Models';
|
|
3
|
+
import { Vector3 } from '../types/Math';
|
|
4
|
+
import type { SnapType } from './MeasureToolUtils';
|
|
5
|
+
import type { ViewerRenderer } from '../procoregl/ViewerRenderer';
|
|
6
|
+
export type WorldIntersectionSnapResult = {
|
|
7
|
+
intersection: Vector3;
|
|
8
|
+
snapType: SnapType;
|
|
9
|
+
snapPosition: Vector3;
|
|
10
|
+
snapEdge: {
|
|
11
|
+
start: Vector3;
|
|
12
|
+
end: Vector3;
|
|
13
|
+
} | null;
|
|
14
|
+
boundaryEdges: {
|
|
15
|
+
start: Vector3;
|
|
16
|
+
end: Vector3;
|
|
17
|
+
}[];
|
|
18
|
+
meshnodeIndex: number;
|
|
19
|
+
cursorRotation: Vector3;
|
|
20
|
+
snapScreenPosition: Vector3 | null;
|
|
21
|
+
};
|
|
22
|
+
export declare class PointToPointController {
|
|
23
|
+
private pickingController;
|
|
24
|
+
private models;
|
|
25
|
+
private camera;
|
|
26
|
+
private currentHoverMeshnodeIndex;
|
|
27
|
+
private meshTopologyCache;
|
|
28
|
+
private _enabled;
|
|
29
|
+
private globalOffset;
|
|
30
|
+
private prevLastWorldIntersectionSnapResult;
|
|
31
|
+
private lastWorldIntersectionSnapResult;
|
|
32
|
+
private debugGui;
|
|
33
|
+
private viewerRenderer;
|
|
34
|
+
constructor(params: {
|
|
35
|
+
pickingController: PickingController;
|
|
36
|
+
models: Models;
|
|
37
|
+
camera: THREE.PerspectiveCamera;
|
|
38
|
+
globalOffset: THREE.Vector3;
|
|
39
|
+
viewerRenderer: ViewerRenderer;
|
|
40
|
+
});
|
|
41
|
+
get enabled(): boolean;
|
|
42
|
+
set enabled(value: boolean);
|
|
43
|
+
handleMouseClick(): void;
|
|
44
|
+
handleMouseMove(event: MouseEvent): void;
|
|
45
|
+
private getWorldIntersectionSnapResult;
|
|
46
|
+
private publishIntersectionSnapResult;
|
|
47
|
+
private getMeshTopology;
|
|
48
|
+
private meshnodeTooComplex;
|
|
49
|
+
private determineHoverState;
|
|
50
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { SvgRenderer } from '../components/Markup/SvgRenderer';
|
|
2
|
+
import type { RenderControllerProxy } from '../controllers/RenderControllerProxy';
|
|
3
|
+
export declare class PointToPointManager {
|
|
4
|
+
private svgRenderer;
|
|
5
|
+
private renderControllerProxy;
|
|
6
|
+
private static pointToPointEnabled;
|
|
7
|
+
private firstMeasurePoint;
|
|
8
|
+
private secondMeasurePoint;
|
|
9
|
+
private outlines;
|
|
10
|
+
private intersection;
|
|
11
|
+
private pivot;
|
|
12
|
+
private dist;
|
|
13
|
+
private xDist;
|
|
14
|
+
private yDist;
|
|
15
|
+
private zDist;
|
|
16
|
+
private gui;
|
|
17
|
+
private globalOffset;
|
|
18
|
+
constructor(params: {
|
|
19
|
+
renderControllerProxy: RenderControllerProxy;
|
|
20
|
+
svgRenderer: SvgRenderer;
|
|
21
|
+
globalOffset: {
|
|
22
|
+
offsetX: number;
|
|
23
|
+
offsetY: number;
|
|
24
|
+
offsetZ: number;
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
private onSelectTool;
|
|
28
|
+
private onNavigationChanged;
|
|
29
|
+
private onMeasurementObjectMove;
|
|
30
|
+
private onMeasurementObjectLeave;
|
|
31
|
+
private onMeasurementObjectClick;
|
|
32
|
+
private resetMeasurement;
|
|
33
|
+
private calculateDistances;
|
|
34
|
+
static isEnabled(): boolean;
|
|
35
|
+
togglePointToPoint(params: {
|
|
36
|
+
enable: boolean;
|
|
37
|
+
}): void;
|
|
38
|
+
private setCameraAndNavigationControls;
|
|
39
|
+
private updateSvg;
|
|
40
|
+
private createLine;
|
|
41
|
+
private createEllipse;
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|