Skip to content

Commit

Permalink
add missing file to core-geometry barrel (#5412)
Browse files Browse the repository at this point in the history
  • Loading branch information
dassaf4 authored Apr 18, 2023
1 parent 6c35932 commit 8340cf1
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 0 deletions.
101 changes: 101 additions & 0 deletions common/api/core-geometry.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1439,6 +1439,19 @@ export class ConvexClipPlaneSet implements Clipper, PolygonClipper {
// @public
export type ConvexClipPlaneSetProps = ClipPlaneProps[];

// @public
export class ConvexFacetLocationDetail extends NonConvexFacetLocationDetail {
clone(): ConvexFacetLocationDetail;
copyContentsFrom(other: ConvexFacetLocationDetail): void;
static create(facetIndex: number, edgeCount: number, detail?: PolygonLocationDetail, result?: ConvexFacetLocationDetail): ConvexFacetLocationDetail;
getBarycentricCoordinates(facetVertices?: IndexedXYZCollection, distanceTolerance?: number): number[] | undefined;
getColor(facetColors?: number[], facetVertices?: IndexedXYZCollection, distanceTolerance?: number): number | undefined;
getNormal(facetNormals?: IndexedXYZCollection, facetVertices?: IndexedXYZCollection, distanceTolerance?: number): Vector3d | undefined;
getParam(facetParams?: IndexedXYCollection, facetVertices?: IndexedXYZCollection, distanceTolerance?: number): Point2d | undefined;
invalidate(deep?: boolean): void;
get isConvex(): boolean;
}

// @internal
export class ConvexPolygon2d {
constructor(points: Point2d[] | undefined);
Expand Down Expand Up @@ -2003,6 +2016,43 @@ export class FacetFaceData {
setParamDistanceRangeFromNewFaceData(polyface: IndexedPolyface, facetStart: number, facetEnd: number): boolean;
}

// @public
export type FacetIntersectCallback = (detail: FacetLocationDetail, visitor: PolyfaceVisitor) => boolean;

// @public
export class FacetIntersectOptions {
constructor();
acceptIntersection?: FacetIntersectCallback;
distanceTolerance: number;
needBarycentricCoordinates?: boolean;
needColor?: boolean;
needNormal?: boolean;
needParam?: boolean;
parameterTolerance: number;
}

// @public
export interface FacetLocationDetail {
get a(): number;
get classify(): PolygonLocation;
clone(): FacetLocationDetail;
get closestEdge(): {
startVertexIndex: number;
edgeParam: number;
};
copyContentsFrom(other: FacetLocationDetail): void;
get edgeCount(): number;
get facetIndex(): number;
getBarycentricCoordinates(facetVertices?: IndexedXYZCollection, distanceTolerance?: number): number[] | undefined;
getColor(facetColors?: number[], facetVertices?: IndexedXYZCollection, distanceTolerance?: number): number | undefined;
getNormal(facetNormals?: IndexedXYZCollection, facetVertices?: IndexedXYZCollection, distanceTolerance?: number): Vector3d | undefined;
getParam(facetParams?: IndexedXYCollection, facetVertices?: IndexedXYZCollection, distanceTolerance?: number): Point2d | undefined;
get isConvex(): boolean;
get isInsideOrOn(): boolean;
get isValid(): boolean;
get point(): Point3d;
}

// @public
export interface FacetProjectedVolumeSums {
negativeProjectedFacetAreaMoments?: MomentData;
Expand Down Expand Up @@ -3804,6 +3854,33 @@ export type NodeFunction = (node: HalfEdge) => any;
// @internal
export type NodeToNumberFunction = (node: HalfEdge) => number;

// @public
export class NonConvexFacetLocationDetail implements FacetLocationDetail {
protected constructor(facetIndex?: number, edgeCount?: number, detail?: PolygonLocationDetail);
get a(): number;
get classify(): PolygonLocation;
clone(): NonConvexFacetLocationDetail;
get closestEdge(): {
startVertexIndex: number;
edgeParam: number;
};
copyContentsFrom(other: NonConvexFacetLocationDetail): void;
static create(facetIndex: number, edgeCount: number, detail?: PolygonLocationDetail, result?: NonConvexFacetLocationDetail): NonConvexFacetLocationDetail;
// (undocumented)
protected _detail: PolygonLocationDetail;
get edgeCount(): number;
get facetIndex(): number;
getBarycentricCoordinates(): number[] | undefined;
getColor(): number | undefined;
getNormal(): Vector3d | undefined;
getParam(): Point2d | undefined;
invalidate(deep?: boolean): void;
get isConvex(): boolean;
get isInsideOrOn(): boolean;
get isValid(): boolean;
get point(): Point3d;
}

// @public
export class NullGeometryHandler extends GeometryHandler {
handleAkimaCurve3d(_g: AkimaCurve3d): any;
Expand Down Expand Up @@ -5955,6 +6032,30 @@ export class TriangleLocationDetail {
world: Point3d;
}

// @public
export class TriangularFacetLocationDetail implements FacetLocationDetail {
get a(): number;
get classify(): PolygonLocation;
clone(): TriangularFacetLocationDetail;
get closestEdge(): {
startVertexIndex: number;
edgeParam: number;
};
copyContentsFrom(other: TriangularFacetLocationDetail): void;
static create(facetIndex: number, detail?: TriangleLocationDetail, result?: TriangularFacetLocationDetail): TriangularFacetLocationDetail;
get edgeCount(): number;
get facetIndex(): number;
getBarycentricCoordinates(): number[];
getColor(facetColors?: number[]): number | undefined;
getNormal(facetNormals?: IndexedXYZCollection): Vector3d | undefined;
getParam(facetParams?: IndexedXYCollection): Point2d | undefined;
invalidate(deep?: boolean): void;
get isConvex(): boolean;
get isInsideOrOn(): boolean;
get isValid(): boolean;
get point(): Point3d;
}

// @internal
export class Triangulator {
static claimDebugGraph(): HalfEdgeGraph | undefined;
Expand Down
6 changes: 6 additions & 0 deletions common/api/summary/core-geometry.exports.csv
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ alpha;Constant
public;ConstructCurveBetweenCurves
public;ConvexClipPlaneSet
public;ConvexClipPlaneSetProps = ClipPlaneProps[]
public;ConvexFacetLocationDetail
internal;ConvexPolygon2d
public;CoordinateXYZ
public;class CurveChain
Expand Down Expand Up @@ -117,6 +118,9 @@ public;DuplicateFacetClusterSelector
public;Ellipsoid
public;EllipsoidPatch
public;FacetFaceData
public;FacetIntersectCallback = (detail: FacetLocationDetail, visitor: PolyfaceVisitor) => boolean
public;FacetIntersectOptions
public;FacetLocationDetail
public;FacetProjectedVolumeSums
public;FrameBuilder
internal;GaussMapper
Expand Down Expand Up @@ -185,6 +189,7 @@ internal;class NewtonEvaluatorRtoR
internal;class NewtonEvaluatorRtoRD
internal;NodeFunction = (node: HalfEdge) => any
internal;NodeToNumberFunction = (node: HalfEdge) => number
public;NonConvexFacetLocationDetail
public;NullGeometryHandler
public;NumberArray
public;OffsetMeshOptions
Expand Down Expand Up @@ -281,6 +286,7 @@ public;Transform
public;TransformProps = number[][] | number[] |
public;class TransitionSpiral3d
public;TriangleLocationDetail
public;TriangularFacetLocationDetail
internal;Triangulator
internal;TriDiagonalSystem
internal;TrigPolynomial
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-geometry",
"comment": "missing types in core-geometry barrel file",
"type": "none"
}
],
"packageName": "@itwin/core-geometry"
}
1 change: 1 addition & 0 deletions core/geometry/src/core-geometry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ export * from "./polyface/AuxData";
export * from "./polyface/BoxTopology";
export * from "./polyface/FacetFaceData";
export * from "./polyface/Polyface";
export * from "./polyface/FacetLocationDetail";
export * from "./polyface/IndexedPolyfaceVisitor";
export * from "./polyface/PolyfaceBuilder";
export * from "./polyface/PolyfaceData";
Expand Down
2 changes: 2 additions & 0 deletions core/geometry/src/polyface/FacetLocationDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ import { NumberArray } from "../geometry3d/PointHelpers";
* @param detail reference to the intersection data, with `detail.IsInsideOn === true`. Note that `detail` is owned by the caller; to persist, use `detail.clone`.
* @param visitor at currently intersected facet
* @returns true to accept this intersection and stop processing; false to continue to the next facet
* @public
*/
export type FacetIntersectCallback = (detail: FacetLocationDetail, visitor: PolyfaceVisitor) => boolean;

/** Options for computing and processing facet intersection methods.
* @see PolyfaceQuery.intersectRay3d
* @public
*/
export class FacetIntersectOptions {
/** distance tolerance for testing coincidence with facet boundary */
Expand Down

0 comments on commit 8340cf1

Please sign in to comment.