@procore/bim-webviewer-sdk 17.6.0-rc.0 → 17.6.0-rc.2

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.
@@ -40,10 +40,5 @@ export declare function detectSnapFeature(intersectPoint: THREE.Vector3, line: T
40
40
  detectedSnapType: SnapType;
41
41
  detectedSnapPosition: THREE.Vector3;
42
42
  };
43
- export declare function getNormalFromPoints(point1: THREE.Vector3, point2: THREE.Vector3, point3: THREE.Vector3): THREE.Vector3;
44
- export declare function isNormalFacingCamera(normal: THREE.Vector3, cameraDirection: THREE.Vector3): boolean;
45
- export declare function arePlanesCoplanar(normal1: THREE.Vector3, point1: THREE.Vector3, normal2: THREE.Vector3, point2: THREE.Vector3): boolean;
46
- export declare function areNormalsSimilar(normal1: THREE.Vector3, normal2: THREE.Vector3): boolean;
47
43
  export declare function getSurfaceCursorAngle(camera: THREE.PerspectiveCamera, faceNormal: THREE.Vector3, intersection: THREE.Vector3, canvasWidth: number, canvasHeight: number): Vector3;
48
44
  export declare function getEdgeCursorAngle(start: Vector3, end: Vector3, camera: THREE.PerspectiveCamera, canvasWidth: number, canvasHeight: number): number;
49
- export declare function arePointsCollinear(p1: THREE.Vector3, p2: THREE.Vector3, p3: THREE.Vector3): boolean;
@@ -22,9 +22,8 @@ export declare class PointToPointController {
22
22
  private readonly models;
23
23
  private readonly camera;
24
24
  private currentHoverMeshnodeIndex;
25
- private nearestMeshnodeIndex;
26
- nonManifoldMeshnodeIndices: Set<number>;
27
25
  private readonly meshTopologyCache;
26
+ private nearestMeshnodeIndex;
28
27
  private _enabled;
29
28
  private readonly globalOffset;
30
29
  private prevLastWorldIntersectionSnapResult;
@@ -1,10 +1,10 @@
1
1
  import { Position } from './Position';
2
- import { HalfEdge } from './HalfEdge';
2
+ import { Edge } from './Edge';
3
3
  import { SpatialObject } from './SpatialObject';
4
4
  export declare class Centroid implements SpatialObject {
5
5
  positions: Position[];
6
6
  position: Position;
7
- spoke: HalfEdge | null;
7
+ spoke: Edge | null;
8
8
  constructor(positions: Position[], position: Position);
9
9
  box3(): THREE.Box3;
10
10
  intersect(ray: THREE.Ray): THREE.Vector3 | null;
@@ -1,19 +1,20 @@
1
1
  import type { Position } from './Position';
2
2
  import type { Centroid } from './Centroid';
3
- export declare class HalfEdge {
3
+ export declare class Edge {
4
4
  org: Position;
5
5
  dest: Position;
6
6
  face: Centroid;
7
- next?: HalfEdge;
8
- prev?: HalfEdge;
9
- sym: HalfEdge | null;
7
+ next?: Edge;
8
+ prev?: Edge;
9
+ sym: Edge | null;
10
10
  id: number;
11
- private static _nextId;
11
+ vertexBasedID?: string;
12
+ protected static _nextId: number;
12
13
  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;
14
+ static fromFace(face: Centroid): Edge[];
15
+ static makeEdge(org: Position, dest: Position, face: Centroid): Edge;
16
+ static makeNext(edge: Edge, dest: Position, face: Centroid): Edge;
17
+ static connect(edge0: Edge, edge1: Edge, face: Centroid): Edge;
17
18
  isBoundary(): boolean;
18
19
  isRidge(): boolean;
19
20
  isCrease(): boolean;
@@ -29,6 +30,7 @@ export declare class HalfEdge {
29
30
  };
30
31
  private constructor();
31
32
  private compareFaces;
33
+ protected idByVertices(): string;
32
34
  private signedVolumeOfTetrahedron;
33
- private static nextId;
35
+ protected static nextId(): number;
34
36
  }
@@ -1,27 +1,41 @@
1
1
  import { Position } from './Position';
2
2
  import { Centroid } from './Centroid';
3
- import { HalfEdge } from './HalfEdge';
3
+ import { Edge } from './Edge';
4
4
  import { Mesh } from '../../pwfreader/PWFTypes';
5
5
  export declare class MeshTopologyError extends Error {
6
6
  constructor(message: string);
7
7
  }
8
8
  export declare class MeshTopology {
9
- private positions;
10
9
  private edges;
10
+ private positions;
11
11
  private faces;
12
12
  private facesTree;
13
13
  private orphansByOrg;
14
14
  private orphansByDest;
15
- constructor(meshes: Mesh[]);
16
- forEachHalfEdge(callback: (edge: HalfEdge) => void): void;
15
+ private lastSurfaceDirection;
16
+ private lastSurfaceConstant;
17
+ private currentBoundaryLines;
18
+ constructor(meshes: Mesh[], handleNonManifold?: boolean);
19
+ clearCachedBoundaryLines(): void;
20
+ forEachEdge(callback: (edge: Edge) => void): void;
17
21
  forEachPosition(callback: (position: Position) => void): void;
18
22
  intersect(ray: THREE.Ray): Centroid | null;
19
- isManifold(): boolean;
20
23
  isEuler(): boolean;
21
- private extractFaces;
22
- private extractPositions;
24
+ creaseEdgesWithCameraForwardAndFaceNormal(cameraForward: THREE.Vector3, intersectionFaceNormal: THREE.Vector3, intersection: THREE.Vector3, matrixWorld: THREE.Matrix4, options: {
25
+ hideDifferentFaceNormal: boolean;
26
+ hideNonCoplanar: boolean;
27
+ faceNormalTolerance: number;
28
+ coplanarTolerance: number;
29
+ pointCollinearSQR: number;
30
+ }): {
31
+ start: THREE.Vector3;
32
+ end: THREE.Vector3;
33
+ }[];
34
+ isManifold(): boolean;
23
35
  private findOrphan;
24
36
  private addOrphan;
37
+ private extractPositions;
25
38
  private dedupePositionsAndFaces;
26
- orderFaceIndices(arr: [number, number, number]): [number, number, number];
39
+ private orderFaceIndices;
40
+ private extractFaces;
27
41
  }
@@ -1,8 +1,8 @@
1
- import { HalfEdge } from './HalfEdge';
1
+ import { Edge } from './Edge';
2
2
  export declare class Position {
3
3
  vertex: THREE.Vector3;
4
4
  normal: THREE.Vector3;
5
- spoke: HalfEdge | null;
5
+ spoke: Edge | null;
6
6
  id: number;
7
7
  private static _nextId;
8
8
  constructor(vertex: THREE.Vector3, normal: THREE.Vector3);
@@ -0,0 +1,18 @@
1
+ export declare class Segment {
2
+ l1: Segment | null;
3
+ l2: Segment | null;
4
+ private readonly line;
5
+ constructor(line: {
6
+ start: THREE.Vector3;
7
+ end: THREE.Vector3;
8
+ });
9
+ private like;
10
+ link(other: Segment, pointCollinearSQR?: number): void;
11
+ match(segments: Segment[], pointCollinearSQR?: number): void;
12
+ connectStart(): THREE.Vector3;
13
+ connectEnd(): THREE.Vector3;
14
+ connect(): {
15
+ start: THREE.Vector3;
16
+ end: THREE.Vector3;
17
+ };
18
+ }
@@ -1,5 +1,6 @@
1
1
  export { MeshTopology } from './MeshTopology';
2
2
  export { SpatialObject } from './SpatialObject';
3
- export { HalfEdge } from './HalfEdge';
4
3
  export { Position } from './Position';
5
4
  export { Centroid } from './Centroid';
5
+ export { Segment } from './Segment';
6
+ export { Edge } from './Edge';
@@ -17,3 +17,16 @@ export declare function toScreenPosition(params: {
17
17
  }): Vector3;
18
18
  export declare function serializeVector(vector: THREE.Vector3): string;
19
19
  export declare function normalizeLine(line: THREE.Line3): string;
20
+ export declare function isNormalFacingCamera(normal: THREE.Vector3, cameraDirection: THREE.Vector3): boolean;
21
+ export declare function areNormalsSimilar(normal1: THREE.Vector3, normal2: THREE.Vector3, FACE_NORMAL_TOLERANCE?: number): boolean;
22
+ export declare function arePlanesCoplanar(normal1: THREE.Vector3, point1: THREE.Vector3, normal2: THREE.Vector3, point2: THREE.Vector3, COPLANAR_TOLERANCE?: number): boolean;
23
+ export declare function getNormalFromPoints(point1: THREE.Vector3, point2: THREE.Vector3, point3: THREE.Vector3): THREE.Vector3;
24
+ export declare function vector3FuzzyEqual(a: THREE.Vector3, b: THREE.Vector3, epsilon: number): boolean;
25
+ export declare function areLinesParallel(line1: {
26
+ start: THREE.Vector3;
27
+ end: THREE.Vector3;
28
+ }, line2: {
29
+ start: THREE.Vector3;
30
+ end: THREE.Vector3;
31
+ }): boolean;
32
+ export declare function arePointsCollinear(p1: THREE.Vector3, p2: THREE.Vector3, p3: THREE.Vector3, POINT_COLLINEAR_SQR?: number): boolean;
@@ -1 +1 @@
1
- export { normalizeLine, serializeVector, toScreenPosition, translateToLocalCoord, translateToWorldCoord, } from './MathHelper';
1
+ export { normalizeLine, serializeVector, toScreenPosition, translateToLocalCoord, translateToWorldCoord, isNormalFacingCamera, areNormalsSimilar, arePlanesCoplanar, getNormalFromPoints, vector3FuzzyEqual, areLinesParallel, arePointsCollinear, } from './MathHelper';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procore/bim-webviewer-sdk",
3
- "version": "17.6.0-rc.0",
3
+ "version": "17.6.0-rc.2",
4
4
  "description": "Procore BIM Webviewer SDK",
5
5
  "main": "dist/Procore.Bim.Webviewer.js",
6
6
  "types": "dist/Procore.Bim.Webviewer.d.ts",