@procore/bim-webviewer-sdk 16.2.0-rc.0 → 16.3.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +15 -3
  2. package/dist/Procore.Bim.Webviewer.d.ts +78 -17
  3. package/dist/Procore.Bim.Webviewer.js +1 -1
  4. package/dist/types/src/Webviewer.d.ts +4 -4
  5. package/dist/types/src/components/CoachmarkManagerComponent/CoachmarkManagerComponent.d.ts +12 -1
  6. package/dist/types/src/components/CoachmarkManagerComponent/Coachmarks.d.ts +0 -9
  7. package/dist/types/src/components/RootComponent.d.ts +5 -2
  8. package/dist/types/src/components/ShortestDistanceComponent.d.ts +35 -34
  9. package/dist/types/src/components/ToolBarComponent/ToolBarComponent.d.ts +6 -8
  10. package/dist/types/src/components/Tooltip/Tooltip.d.ts +16 -10
  11. package/dist/types/src/components/Tooltip/TooltipManager.d.ts +16 -0
  12. package/dist/types/src/components/Tooltip/__tests__/Tooltip.test.d.ts +2 -1
  13. package/dist/types/src/components/Tooltip/index.d.ts +1 -0
  14. package/dist/types/src/controllers/SettingsController.d.ts +5 -3
  15. package/dist/types/src/measuring/DistanceLabel.d.ts +41 -0
  16. package/dist/types/src/measuring/MeasureToolUtils.d.ts +2 -1
  17. package/dist/types/src/measuring/MeasurementRenderer.d.ts +66 -0
  18. package/dist/types/src/measuring/PointToPointController.d.ts +2 -2
  19. package/dist/types/src/measuring/PointToPointManager.d.ts +13 -10
  20. package/dist/types/src/measuring/__tests__/DistanceLabel.test.d.ts +1 -0
  21. package/dist/types/src/measuring/__tests__/MeasurementRenderer.test.d.ts +1 -0
  22. package/dist/types/src/measuring/__tests__/MeasurementRendererFixtures.d.ts +3 -0
  23. package/dist/types/src/measuring/__tests__/PointToPointFixtures.d.ts +1 -19
  24. package/dist/types/src/measuring/createMeasureToolDebugGui.d.ts +2 -0
  25. package/dist/types/src/measuring/{createPointToPointManagerDebugGui.d.ts → createPointToPointLineDrawingDebugGui.d.ts} +1 -1
  26. package/dist/types/src/measuring/index.d.ts +2 -0
  27. package/dist/types/src/procoregl/MeshTopology/HalfEdge.d.ts +8 -0
  28. package/dist/types/src/procoregl/MeshTopology/MeshTopology.d.ts +6 -3
  29. package/dist/types/src/procoregl/MeshTopology/Position.d.ts +6 -7
  30. package/dist/types/src/procoregl/Models/Models.d.ts +2 -1
  31. package/dist/types/src/pwfreader/PWF.d.ts +2 -2
  32. package/dist/types/src/sdk.d.ts +1 -0
  33. package/dist/types/src/unit_util.d.ts +20 -6
  34. package/dist/types/src/utils/MathHelper/MathHelper.d.ts +2 -0
  35. package/dist/types/src/utils/MathHelper/index.d.ts +1 -1
  36. package/package.json +1 -1
  37. /package/dist/types/src/{procoregl/MeshTopology/__tests__/Position.test.d.ts → components/Tooltip/__tests__/TooltipManager.test.d.ts} +0 -0
@@ -1,3 +1,4 @@
1
+ import { type ProjectSettings } from './controllers/SettingsController';
1
2
  import { Options } from './types/WebviewerOptions';
2
3
  import { BoundingBox, Vector2, Vector3 } from './types/Math';
3
4
  import { BcfCameraPerspective } from './types/BcfCamera';
@@ -9,7 +10,7 @@ import { SectionDataAutodeskFormat, SectionDataProcoreFormat } from './sectionin
9
10
  import type { Viewpoint, Visibility } from './api/types/Viewpoint';
10
11
  import type { CssColor } from './components/Markup/SvgRenderer';
11
12
  import { RenderMode } from './utils/constants';
12
- import { PointToPointManager } from './measuring/PointToPointManager';
13
+ import { PointToPointManager } from './measuring';
13
14
  import { Uom, DisplayUnit } from './unit_util';
14
15
  export type ResourceDiscriminator = {
15
16
  fileExtractionId: number;
@@ -19,6 +20,7 @@ export type ResourceDiscriminator = {
19
20
  export declare class Webviewer {
20
21
  options: Options;
21
22
  pointToPointManager: PointToPointManager;
23
+ private measurementRenderer;
22
24
  static readonly tools: {
23
25
  readonly ALL: 0;
24
26
  readonly BOTTOMTOOL: 1;
@@ -261,9 +263,7 @@ export declare class Webviewer {
261
263
  tooltipMessage?: string;
262
264
  }) => void;
263
265
  hideCoachmark: (coachmarkId: string) => void;
264
- getSettings: () => {
265
- displayUnits: string;
266
- };
266
+ getSettings: () => ProjectSettings;
267
267
  setToolbarHidden: (hidden: boolean) => void;
268
268
  setHotkeysEnabled: (enabled: boolean) => void;
269
269
  getEquivalentUnitForDisplayUnit: (unit: Uom, displayUnit: DisplayUnit) => Uom;
@@ -1,8 +1,19 @@
1
- import { CoachmarkManagerProps } from './Coachmarks';
1
+ import type { TooltipManager } from '../Tooltip';
2
+ import type { Options } from '../../types/WebviewerOptions';
3
+ import type { RenderController } from '../../controllers/RenderController';
4
+ import type { SectionBoxDisplayManager } from '../../sectioning/SectionBoxDisplayManager';
2
5
  import './styles.css';
6
+ export type CoachmarkManagerProps = {
7
+ tools?: Options['tools'];
8
+ renderController: RenderController;
9
+ sectionBoxDisplayManager: SectionBoxDisplayManager;
10
+ locale: string;
11
+ tooltipManager: TooltipManager;
12
+ };
3
13
  export declare class CoachmarkManagerComponent {
4
14
  element: HTMLElement;
5
15
  private customCoachmarks;
16
+ private tooltipManager;
6
17
  constructor(props: CoachmarkManagerProps);
7
18
  showCustomCoachmark(params: {
8
19
  id: string;
@@ -1,20 +1,11 @@
1
- import type { SectionBoxDisplayManager } from '../../sectioning/SectionBoxDisplayManager';
2
- import type { Options } from '../../types/WebviewerOptions';
3
1
  import type { RenderController } from '../../controllers/RenderController';
4
2
  export type CoachmarkProps = {
5
3
  label: string;
6
4
  buttonLabel: string;
7
5
  buttonOnClick?: () => void;
8
- tooltipMessage?: string;
9
6
  id: string;
10
7
  };
11
8
  export type CoachmarkExtendedProps = {
12
9
  locale: string;
13
10
  renderController: RenderController;
14
11
  };
15
- export type CoachmarkManagerProps = {
16
- tools?: Options['tools'];
17
- renderController: RenderController;
18
- sectionBoxDisplayManager: SectionBoxDisplayManager;
19
- locale: string;
20
- };
@@ -1,11 +1,12 @@
1
- export function RootComponent(options: any, pubsub: any, renderController: any, apiController: any, settingsController: any, sectionBoxDisplayManager: any, viewpointManager: any): void;
1
+ export function RootComponent(options: any, pubsub: any, renderController: any, apiController: any, settingsController: any, sectionBoxDisplayManager: any, viewpointManager: any, measurementRenderer: any): void;
2
2
  export class RootComponent {
3
- constructor(options: any, pubsub: any, renderController: any, apiController: any, settingsController: any, sectionBoxDisplayManager: any, viewpointManager: any);
3
+ constructor(options: any, pubsub: any, renderController: any, apiController: any, settingsController: any, sectionBoxDisplayManager: any, viewpointManager: any, measurementRenderer: any);
4
4
  options: any;
5
5
  pubsub: any;
6
6
  render: any;
7
7
  sectionBoxDisplayManager: any;
8
8
  viewpointManager: any;
9
+ measurementRenderer: any;
9
10
  api: any;
10
11
  settings: any;
11
12
  sub_components: {};
@@ -14,6 +15,7 @@ export class RootComponent {
14
15
  window_components: any[];
15
16
  disabled: any[];
16
17
  statsJS: StatsJS | undefined;
18
+ tooltipManager: TooltipManager;
17
19
  init(): void;
18
20
  addComponent(ComponentType: any): void;
19
21
  close(): void;
@@ -23,3 +25,4 @@ export class RootComponent {
23
25
  }
24
26
  import { SectionToolDropdown } from "./DropdownComponent";
25
27
  import { StatsJS } from "./StatsJS";
28
+ import { TooltipManager } from "./Tooltip";
@@ -1,56 +1,57 @@
1
- export function ShortestDistanceComponent(options: any, pubsub: any, render: any, componentOptions?: null): void;
1
+ export function ShortestDistanceComponent(options: any, renderControllerProxy: any, measurementRenderer: any, componentOptions?: null): void;
2
2
  export class ShortestDistanceComponent {
3
- constructor(options: any, pubsub: any, render: any, componentOptions?: null);
3
+ constructor(options: any, renderControllerProxy: any, measurementRenderer: any, componentOptions?: null);
4
4
  options: any;
5
- pubsub: any;
6
- render: any;
5
+ renderControllerProxy: any;
6
+ measurementRenderer: any;
7
+ bimMain: HTMLElement | null;
8
+ cursorTooltip: HTMLDivElement;
7
9
  center_lock: any;
8
10
  pwfCache: PWFCache;
9
11
  partitionsCache: LRUCache<any, any>;
10
- dom: any;
11
- measureSvgLayer: any;
12
- measureSvgContent: any;
13
- measureLabelLayer: any;
14
- cursorTooltip: any;
15
12
  tooltipPosition: {
16
13
  top: number;
17
14
  left: number;
18
15
  };
19
- zLineHidden: boolean;
20
- xyLineHidden: boolean;
21
- labelHypotenuseHidden: boolean;
22
- labelZHidden: boolean;
23
- labelXYHidden: boolean;
24
16
  showMeasurement: boolean;
25
- displayUnit: "ftin";
26
17
  pivot: import("three").Vector3;
27
- mouseMove: (event: any) => void;
18
+ onHideUpdated(): Promise<void>;
19
+ resetMeasurementCallback(): void;
20
+ onMouseMove(event: any): void;
21
+ onSelectTool(data: any): Promise<void>;
22
+ getGlobalOffset(): Promise<{
23
+ x: any;
24
+ y: any;
25
+ z: any;
26
+ }>;
27
+ globalOffset: {
28
+ x: any;
29
+ y: any;
30
+ z: any;
31
+ } | undefined;
28
32
  onNavigationChanged(data: any): Promise<void>;
29
- DrawLine(start: any, end: any): void;
30
- DrawDashedLine(start: any, end: any): void;
31
- DrawEndpoint(endpoint: any): void;
32
- ClearMeasurement(): void;
33
+ compute(modelItem1: any, modelItem2: any): Promise<void>;
33
34
  result: {
34
35
  method: string;
35
36
  start: import("three").Vector3;
36
37
  end: import("three").Vector3;
37
38
  distance: number;
38
- } | null | undefined;
39
- ClearLabels(): void;
40
- UpdateLabels(): void;
41
- compute(modelItem1: any, modelItem2: any): void;
42
- measureOpposite: import("three").Vector3 | undefined;
43
- dist: number | undefined;
44
- XY_len: number | undefined;
45
- Z_len: number | undefined;
46
- MeasurementDisplayed(): boolean;
39
+ } | undefined;
47
40
  CursorTooltipVisible(visible: any): void;
48
41
  resetMeasurement(): void;
49
- onObjectSelectPartitioned(objectId: any): Promise<void>;
50
- getMeasureObjectMeshes(): Promise<{
51
- meshnode: any;
52
- partitionUrl: any;
53
- meshData: never[];
42
+ onObjectMeasure(data: any): Promise<void>;
43
+ handleMeasureObjectsSelected(measureObjectMeshes: any, data: any): Promise<void>;
44
+ getPartitionedMeasureObjectMeshes(): Promise<{
45
+ bbox: any;
46
+ matrix: any;
47
+ numChild: any;
48
+ childRefs: any;
49
+ meshData: any;
50
+ nodeId: any;
51
+ meshnodeIndex: any;
52
+ hidden: any;
53
+ type: any;
54
+ selected: any;
54
55
  }[]>;
55
56
  getMeshDataForPartitionUrl(meshRef: any, partitionUrl: any): Promise<{
56
57
  meshRef: any;
@@ -1,6 +1,6 @@
1
- export function ToolBarComponent(options: any, pubsub: any, render: any, api: any, sectionBoxDisplayManager: any, viewpointManager: any): void;
1
+ export function ToolBarComponent(options: any, pubsub: any, render: any, api: any, sectionBoxDisplayManager: any, viewpointManager: any, tooltipManager: any): void;
2
2
  export class ToolBarComponent {
3
- constructor(options: any, pubsub: any, render: any, api: any, sectionBoxDisplayManager: any, viewpointManager: any);
3
+ constructor(options: any, pubsub: any, render: any, api: any, sectionBoxDisplayManager: any, viewpointManager: any, tooltipManager: any);
4
4
  options: any;
5
5
  pubsub: any;
6
6
  render: any;
@@ -9,6 +9,8 @@ export class ToolBarComponent {
9
9
  api: any;
10
10
  dom: any;
11
11
  toolbarElement: HTMLDivElement | null;
12
+ tooltipManager: any;
13
+ tooltipIds: {};
12
14
  toolbarMarginTop: number;
13
15
  toolStringMap: Readonly<{
14
16
  9: any;
@@ -45,10 +47,8 @@ export class ToolBarComponent {
45
47
  14: 12;
46
48
  9: 8;
47
49
  }>;
48
- toolTip: HTMLDivElement;
49
- toolTimeout: NodeJS.Timeout | null;
50
+ toolTimeout: any;
50
51
  createTools(): void;
51
- createToolTip(): HTMLDivElement;
52
52
  setEdges(toolbar: any): void;
53
53
  getToolIcon(tool: any): any;
54
54
  getToolText(tool: any): any;
@@ -64,9 +64,7 @@ export class ToolBarComponent {
64
64
  onSelectTool(data: any): void;
65
65
  selectSectionBoxTool(): Promise<void>;
66
66
  ResetNavSelection(): void;
67
- onHoverToolTip(elem: any, name: any): void;
68
- onLeaveToolTip(): void;
69
- setToolTipPosition(elem: any): void;
67
+ createToolTipContent(elem: any, name: any): string | HTMLDivElement;
70
68
  publishSelectedToolEvent(tool: any): void;
71
69
  DisableTool(tool: any): void;
72
70
  setHidden(hidden: any): void;
@@ -1,22 +1,28 @@
1
1
  import './styles.css';
2
2
  type Position = 'top' | 'right' | 'bottom' | 'left';
3
+ export type TooltipProps = {
4
+ target?: HTMLElement;
5
+ content?: string | HTMLElement;
6
+ position?: Position;
7
+ maxWidth?: number;
8
+ offset?: number;
9
+ };
3
10
  export declare class Tooltip {
11
+ static TOOLTIP_ID: string;
4
12
  element: HTMLElement;
13
+ target?: HTMLElement;
5
14
  private arrowElement;
6
- private target;
15
+ private bodyElement;
7
16
  private bimMain;
8
17
  private positionHorizontal;
9
18
  private positionVertical;
10
19
  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
+ constructor(props?: TooltipProps);
21
+ update(props: TooltipProps): void;
22
+ private setContent;
23
+ private derivePosition;
24
+ show(): void;
25
+ hide(): void;
20
26
  private positionAt;
21
27
  }
22
28
  export {};
@@ -0,0 +1,16 @@
1
+ import { type TooltipProps } from './Tooltip';
2
+ export declare class TooltipManager {
3
+ private tooltip;
4
+ private registrants;
5
+ private showTimeoutId?;
6
+ private nextRegistrantId;
7
+ constructor();
8
+ register(props: TooltipProps & {
9
+ target: HTMLElement;
10
+ showDelay?: number;
11
+ }): number;
12
+ private onTargetMouseEnter;
13
+ private onTargetMouseLeave;
14
+ unregister(tooltipId: number): void;
15
+ dispose(): void;
16
+ }
@@ -1 +1,2 @@
1
- export {};
1
+ export declare function setupBimMain(): HTMLElement;
2
+ export declare function tearDownBimMain(): void;
@@ -1 +1,2 @@
1
1
  export { Tooltip } from './Tooltip';
2
+ export { TooltipManager } from './TooltipManager';
@@ -1,11 +1,14 @@
1
- type ProjectSettings = {
2
- displayUnits: string;
1
+ import { type DisplayUnit } from '../unit_util';
2
+ export type ProjectSettings = {
3
+ displayUnits: DisplayUnit;
3
4
  };
4
5
  export declare class SettingsController {
5
6
  private projectId;
6
7
  private projectSettings;
7
8
  private db?;
9
+ private locale;
8
10
  constructor(params: {
11
+ locale?: string;
9
12
  projectId: number;
10
13
  });
11
14
  private onDatabaseOpened;
@@ -15,4 +18,3 @@ export declare class SettingsController {
15
18
  SetValue(key: string, value: number): void;
16
19
  getSettings(): ProjectSettings;
17
20
  }
18
- export {};
@@ -0,0 +1,41 @@
1
+ import { Vector3 } from '../types/Math';
2
+ import type { SettingsController } from '../controllers/SettingsController';
3
+ import { CssColor } from '../components/Markup/SvgRenderer';
4
+ export type DistanceLine = {
5
+ start: Vector3;
6
+ end: Vector3;
7
+ };
8
+ export declare class DistanceLabel {
9
+ element: HTMLElement;
10
+ midpoint: THREE.Vector3;
11
+ private readonly line;
12
+ private readonly settingsController;
13
+ private readonly bimMeasureLabel;
14
+ private readonly labelElement;
15
+ private readonly prependLabel;
16
+ constructor(params: {
17
+ line: DistanceLine;
18
+ settingsController: SettingsController;
19
+ iconCssClass: string | undefined;
20
+ prependLabel?: string;
21
+ backgroundColor?: CssColor;
22
+ textColor?: CssColor;
23
+ });
24
+ show(): void;
25
+ hide(): void;
26
+ calculateRectFromPosition(params: {
27
+ x: number;
28
+ y: number;
29
+ }): {
30
+ top: number;
31
+ left: number;
32
+ right: number;
33
+ bottom: number;
34
+ };
35
+ updateLine(line: DistanceLine): void;
36
+ updateLabel(): void;
37
+ setPosition(params: {
38
+ x: number;
39
+ y: number;
40
+ }): void;
41
+ }
@@ -1,5 +1,5 @@
1
- import type { MeshTopology } from '../procoregl/MeshTopology/MeshTopology';
2
1
  import { Vector3 } from '../types/Math';
2
+ import { MeshTopology } from '../procoregl/MeshTopology';
3
3
  export declare const SNAP_TYPE: {
4
4
  readonly surface: "surface";
5
5
  readonly midpoint: "midpoint";
@@ -43,3 +43,4 @@ export declare function arePlanesCoplanar(normal1: THREE.Vector3, point1: THREE.
43
43
  export declare function areNormalsSimilar(normal1: THREE.Vector3, normal2: THREE.Vector3): boolean;
44
44
  export declare function getSurfaceCursorAngle(camera: THREE.PerspectiveCamera, faceNormal: THREE.Vector3, intersection: THREE.Vector3, canvasWidth: number, canvasHeight: number): Vector3;
45
45
  export declare function getEdgeCursorAngle(start: Vector3, end: Vector3, camera: THREE.PerspectiveCamera, canvasWidth: number, canvasHeight: number): number;
46
+ export declare function arePointsCollinear(p1: THREE.Vector3, p2: THREE.Vector3, p3: THREE.Vector3): boolean;
@@ -0,0 +1,66 @@
1
+ import { DistanceLabel, DistanceLine } from './DistanceLabel';
2
+ import type { AnchoredLine, AnchoredRadiusEllipse, SvgRenderer } from '../components/Markup/SvgRenderer';
3
+ import { Vector3 } from '../types/Math';
4
+ import { SettingsController } from '../controllers/SettingsController';
5
+ export type Measurement = {
6
+ line: DistanceLine;
7
+ svgData: {
8
+ lines: AnchoredLine[];
9
+ ellipses: AnchoredRadiusEllipse[];
10
+ };
11
+ distanceLabels: DistanceLabel[];
12
+ };
13
+ export declare function createLine(params: {
14
+ start: Vector3;
15
+ end: Vector3;
16
+ color?: string;
17
+ width?: number;
18
+ strokeDasharray?: string;
19
+ opacity?: number;
20
+ }): AnchoredLine;
21
+ export declare function createEllipse(params: {
22
+ anchor: Vector3;
23
+ color?: string;
24
+ radius?: {
25
+ x: number;
26
+ y: number;
27
+ };
28
+ }): AnchoredRadiusEllipse;
29
+ export declare class MeasurementRenderer {
30
+ element: HTMLElement;
31
+ private measurements;
32
+ private globalOffset;
33
+ private readonly gui;
34
+ private camera;
35
+ private readonly settingsController;
36
+ private readonly svgRenderer;
37
+ constructor(params: {
38
+ settingsController: SettingsController;
39
+ svgRenderer: SvgRenderer;
40
+ });
41
+ setGlobalOffset(params: {
42
+ offsetX: number;
43
+ offsetY: number;
44
+ offsetZ: number;
45
+ }): void;
46
+ getGlobalOffset(): THREE.Vector3;
47
+ addMeasurement(params: {
48
+ measurePoint1: Vector3;
49
+ measurePoint2: Vector3;
50
+ config?: {
51
+ type: 'colorAxis' | 'greyTriangle';
52
+ };
53
+ }): Promise<void>;
54
+ clearMeasurements(): void;
55
+ private onProjectSettingsUpdated;
56
+ private onRenderReady;
57
+ private onResize;
58
+ private onCameraUpdated;
59
+ private updateDistanceLabelPosition;
60
+ private areRectsOverlapping;
61
+ private isOverlapping;
62
+ private stackElementsVerticallyToFirst;
63
+ private createColorAxis;
64
+ private createGreyTriangle;
65
+ private updateSvgData;
66
+ }
@@ -22,11 +22,11 @@ export type WorldIntersectionSnapResult = {
22
22
  export declare class PointToPointController {
23
23
  private pickingController;
24
24
  private models;
25
- private camera;
25
+ private readonly camera;
26
26
  private currentHoverMeshnodeIndex;
27
27
  private meshTopologyCache;
28
28
  private _enabled;
29
- private globalOffset;
29
+ private readonly globalOffset;
30
30
  private prevLastWorldIntersectionSnapResult;
31
31
  private lastWorldIntersectionSnapResult;
32
32
  private debugGui;
@@ -1,42 +1,45 @@
1
- import { SvgRenderer } from '../components/Markup/SvgRenderer';
1
+ import type { SvgRenderer } from '../components/Markup/SvgRenderer';
2
2
  import type { RenderControllerProxy } from '../controllers/RenderControllerProxy';
3
+ import type { MeasurementRenderer } from './MeasurementRenderer';
4
+ import type { SettingsController } from '../controllers/SettingsController';
3
5
  export declare class PointToPointManager {
4
6
  private svgRenderer;
5
7
  private renderControllerProxy;
6
- private static pointToPointEnabled;
8
+ private settingsController;
9
+ private measurementRenderer;
7
10
  private firstMeasurePoint;
8
11
  private secondMeasurePoint;
12
+ private snapPosition;
13
+ private static pointToPointEnabled;
9
14
  private outlines;
10
- private intersection;
11
15
  private pivot;
12
- private dist;
13
- private xDist;
14
- private yDist;
15
- private zDist;
16
16
  private gui;
17
17
  private globalOffset;
18
+ private temporaryDistanceLabel;
19
+ private camera;
18
20
  constructor(params: {
19
21
  renderControllerProxy: RenderControllerProxy;
22
+ settingsController: SettingsController;
20
23
  svgRenderer: SvgRenderer;
21
24
  globalOffset: {
22
25
  offsetX: number;
23
26
  offsetY: number;
24
27
  offsetZ: number;
25
28
  };
29
+ measurementRenderer: MeasurementRenderer;
26
30
  });
31
+ private onCameraUpdated;
27
32
  private onSelectTool;
28
33
  private onNavigationChanged;
29
34
  private onMeasurementObjectMove;
35
+ private updateTemporaryDistanceLabel;
30
36
  private onMeasurementObjectLeave;
31
37
  private onMeasurementObjectClick;
32
38
  private resetMeasurement;
33
- private calculateDistances;
34
39
  static isEnabled(): boolean;
35
40
  togglePointToPoint(params: {
36
41
  enable: boolean;
37
42
  }): void;
38
43
  private setCameraAndNavigationControls;
39
44
  private updateSvg;
40
- private createLine;
41
- private createEllipse;
42
45
  }
@@ -0,0 +1,3 @@
1
+ export declare const ONE_AXIS_CHANGE_SVG = "\n <line stroke=\"#ffffff\" stroke-width=\"3\" x1=\"333.0082416062478\" y1=\"81.31579636956016\" x2=\"-165.283926604783\" y2=\"40.225335338361816\" opacity=\"1\"></line>\n <ellipse stroke=\"white\" stroke-width=\"1\" fill=\"#ffffff\" cx=\"333.0082416062478\" cy=\"81.31579636956016\" rx=\"7\" ry=\"7\"></ellipse>\n <ellipse stroke=\"white\" stroke-width=\"1\" fill=\"#ffffff\" cx=\"-165.283926604783\" cy=\"40.225335338361816\" rx=\"7\" ry=\"7\"></ellipse>\n";
2
+ export declare const TWO_AXES_CHANGE_SVG = "\n<line stroke=\"#ffffff\" stroke-width=\"3\" x1=\"333.0082416062478\" y1=\"81.31579636956016\" x2=\"100.49430967691478\" y2=\"-46.3413410126613\" opacity=\"1\"></line>\n<line stroke=\"#ff2b2b\" stroke-width=\"3\" x1=\"-165.283926604783\" y1=\"40.225335338361816\" x2=\"333.0082416062478\" y2=\"81.31579636956016\" opacity=\"1\" stroke-dasharray=\"6 6\"></line>\n<line stroke=\"#00cc04\" stroke-width=\"3\" x1=\"-165.283926604783\" y1=\"40.225335338361816\" x2=\"100.49430967691478\" y2=\"-46.3413410126613\" opacity=\"1\" stroke-dasharray=\"6 6\"></line>\n<ellipse stroke=\"white\" stroke-width=\"1\" fill=\"#ffffff\" cx=\"333.0082416062478\" cy=\"81.31579636956016\" rx=\"7\" ry=\"7\"></ellipse>\n<ellipse stroke=\"white\" stroke-width=\"1\" fill=\"#ffffff\" cx=\"100.49430967691478\" cy=\"-46.3413410126613\" rx=\"7\" ry=\"7\"></ellipse>\n";
3
+ export declare const THREE_AXES_CHANGE_SVG = "\n<line stroke=\"#ffffff\" stroke-width=\"3\" x1=\"333.0082416062478\" y1=\"81.31579636956016\" x2=\"-133.89581048857906\" y2=\"-581.9145015227642\" opacity=\"1\"></line>\n<line stroke=\"#ff2b2b\" stroke-width=\"3\" x1=\"-165.283926604783\" y1=\"40.225335338361816\" x2=\"333.0082416062478\" y2=\"81.31579636956016\" opacity=\"1\" stroke-dasharray=\"6 6\"></line>\n<line stroke=\"#00cc04\" stroke-width=\"3\" x1=\"-165.283926604783\" y1=\"40.225335338361816\" x2=\"100.49430967691478\" y2=\"-46.3413410126613\" opacity=\"1\" stroke-dasharray=\"6 6\"></line>\n<line stroke=\"#0071f7\" stroke-width=\"3\" x1=\"100.49430967691478\" y1=\"-46.3413410126613\" x2=\"-133.89581048857906\" y2=\"-581.9145015227642\" opacity=\"1\" stroke-dasharray=\"6 6\"></line>\n<ellipse stroke=\"white\" stroke-width=\"1\" fill=\"#ffffff\" cx=\"333.0082416062478\" cy=\"81.31579636956016\" rx=\"7\" ry=\"7\"></ellipse>\n<ellipse stroke=\"white\" stroke-width=\"1\" fill=\"#ffffff\" cx=\"-133.89581048857906\" cy=\"-581.9145015227642\" rx=\"7\" ry=\"7\"></ellipse>\n";
@@ -26,25 +26,7 @@ export declare const measurementObjectClickPayloadSecondAnchor: {
26
26
  z: number;
27
27
  };
28
28
  };
29
- export declare const measurementObjectMovePartialPayload: {
30
- boundaryEdges: {
31
- start: {
32
- x: number;
33
- y: number;
34
- z: number;
35
- };
36
- end: {
37
- x: number;
38
- y: number;
39
- z: number;
40
- };
41
- }[];
42
- intersection: {
43
- x: number;
44
- y: number;
45
- z: number;
46
- };
47
- };
29
+ export declare const measurementObjectMovePartialPayload: WorldIntersectionSnapResult;
48
30
  export declare const svgDataObjectOutline: {
49
31
  lines: {
50
32
  stroke: string;
@@ -0,0 +1,2 @@
1
+ import { DebugGui } from '../utils/DebugGui';
2
+ export declare const createMeasureToolDebugGui: () => ReturnType<typeof DebugGui.add>;
@@ -4,4 +4,4 @@ export declare const pointToPointCursorSize: {
4
4
  edgeCursorSize: number;
5
5
  endpointCursorSize: number;
6
6
  };
7
- export declare const createPointToPointManagerDebugGui: () => ReturnType<typeof DebugGui.add>;
7
+ export declare const createPointToPointLineDrawingDebugGui: () => ReturnType<typeof DebugGui.add>;
@@ -1,2 +1,4 @@
1
1
  export { PointToPointManager } from './PointToPointManager';
2
2
  export { PointToPointController, WorldIntersectionSnapResult, } from './PointToPointController';
3
+ export { MeasurementRenderer } from './MeasurementRenderer';
4
+ export { SNAP_TYPE } from './MeasureToolUtils';
@@ -19,6 +19,14 @@ export declare class HalfEdge {
19
19
  isCrease(): boolean;
20
20
  isBorder(): boolean;
21
21
  isOrphan(): boolean;
22
+ asObject(): {
23
+ id: number;
24
+ org: number;
25
+ dest: number;
26
+ next: number | undefined;
27
+ prev: number | undefined;
28
+ sym: number | undefined;
29
+ };
22
30
  private constructor();
23
31
  private compareFaces;
24
32
  private signedVolumeOfTetrahedron;
@@ -2,6 +2,9 @@ import { Position } from './Position';
2
2
  import { Centroid } from './Centroid';
3
3
  import { HalfEdge } from './HalfEdge';
4
4
  import { PWFMesh } from '../../pwfreader/pwf/PWFMesh';
5
+ export declare class MeshTopologyError extends Error {
6
+ constructor(message: string);
7
+ }
5
8
  export declare class MeshTopology {
6
9
  private positions;
7
10
  private edges;
@@ -15,9 +18,9 @@ export declare class MeshTopology {
15
18
  intersect(ray: THREE.Ray): Centroid | null;
16
19
  isManifold(): boolean;
17
20
  isEuler(): boolean;
18
- private forEachFaceInAB;
19
- private forEachPositionInAB;
21
+ private extractFaces;
22
+ private extractPositions;
20
23
  private findOrphan;
21
24
  private addOrphan;
22
- private computeVertexNormalsIfNeeded;
25
+ private dedupePositionsAndFaces;
23
26
  }
@@ -6,13 +6,12 @@ export declare class Position {
6
6
  id: number;
7
7
  private static _nextId;
8
8
  constructor(vertex: THREE.Vector3, normal: THREE.Vector3);
9
- isPit(): boolean;
10
- isPeak(): boolean;
11
- isClosed(): boolean;
12
- isCorner(): boolean;
13
9
  isOrphan(): boolean;
14
- private sideOfPlane;
15
- forEachDestInRing(callback: (position: Position) => void): void;
16
- forEachONext(callback: (edge: HalfEdge) => void): void;
10
+ asObject(): {
11
+ id: number;
12
+ x: number;
13
+ y: number;
14
+ z: number;
15
+ };
17
16
  private static nextId;
18
17
  }
@@ -32,7 +32,7 @@ export declare class Models {
32
32
  private pwfs;
33
33
  private currentParsingPwfIndex;
34
34
  private streaming;
35
- private static PREFETCHING_PARTITIONS;
35
+ private prefetchingPartitions;
36
36
  private geometryFactory?;
37
37
  private objectTrees;
38
38
  private readonly selectionOption;
@@ -52,6 +52,7 @@ export declare class Models {
52
52
  selectionOption: SelectMethod;
53
53
  startTimestamp: number;
54
54
  startTime: number;
55
+ prefetchingPartitions?: boolean;
55
56
  });
56
57
  private sceneGraphFactory;
57
58
  getResourceId: (resource: ResourceDiscriminator) => number;