import { VecN } from '@holotope/core'; import { type SupportFeatureId, type SupportShapeN, type SupportVertexN } from './support-shape.js'; export interface ConvexPolytopeTopologyOptionsN { /** Supporting-facet classification band. Default 1e-10. */ readonly facetTolerance?: number; /** Affine-rank band. Default 1e-10. */ readonly rankTolerance?: number; /** Maximum candidate hyperplanes examined. Default 250000. */ readonly maxFacetCandidates?: number; } export interface CompiledPolytopeFacetN { readonly key: string; readonly vertexFeatureIds: readonly SupportFeatureId[]; /** Unit outward normal in the frame in which compilation occurred. */ readonly referenceNormal: readonly number[]; readonly referenceOffset: number; readonly conditionEstimate: number; } export interface ConvexPolytopeTopologyDiagnosticsN { readonly dim: number; readonly sourceVertices: number; readonly facetCandidates: number; readonly supportingCandidates: number; readonly facets: number; } /** * Pose-independent convex-polytope incidence compiled from stable source IDs. * Reference planes are retained for audit; live planes are reconstructed and * validated from the shape's current vertex positions. */ export interface ConvexPolytopeTopologyN { readonly schema: 'holotope-convex-polytope-topology-v1'; readonly dim: number; readonly vertexFeatureIds: readonly SupportFeatureId[]; readonly facets: readonly CompiledPolytopeFacetN[]; readonly diagnostics: ConvexPolytopeTopologyDiagnosticsN; } export type ConvexPolytopeTopologyReasonN = 'complete' | 'shape-not-vertex-enumerable' | 'facet-candidate-limit' | 'degenerate-polytope' | 'facet-enumeration-failed'; export interface ConvexPolytopeTopologyResultN { readonly status: 'complete' | 'unsupported' | 'indeterminate'; readonly reason: ConvexPolytopeTopologyReasonN; readonly topology: ConvexPolytopeTopologyN | null; readonly facetCandidates: number; } export interface InstantiatedPolytopeFacetN { readonly key: string; readonly normal: VecN; readonly offset: number; readonly vertexFeatureIds: readonly SupportFeatureId[]; readonly conditionEstimate: number; } export type PolytopeTopologyInstantiationReasonN = 'complete' | 'invalid-schema' | 'dimension-mismatch' | 'vertex-feature-mismatch' | 'facet-geometry-mismatch'; export interface PolytopeTopologyInstantiationResultN { readonly status: 'complete' | 'invalid'; readonly reason: PolytopeTopologyInstantiationReasonN; readonly facets: readonly InstantiatedPolytopeFacetN[] | null; } export type ConvexPolytopeResolutionReasonN = ConvexPolytopeTopologyReasonN | 'compiled-topology-invalid'; export interface ConvexPolytopeResolutionResultN { readonly status: 'complete' | 'unsupported' | 'indeterminate'; readonly reason: ConvexPolytopeResolutionReasonN; readonly topology: ConvexPolytopeTopologyN | null; readonly vertices: readonly SupportVertexN[] | null; readonly facets: readonly InstantiatedPolytopeFacetN[] | null; readonly topologySource: 'compiled' | 'enumerated' | null; readonly queryFacetCandidates: number; } /** Compile the complete boundary-facet incidence of a full-dimensional hull. */ export declare function compileConvexPolytopeTopologyN(shape: SupportShapeN, options?: ConvexPolytopeTopologyOptionsN): ConvexPolytopeTopologyResultN; /** * Reconstruct and validate current facet planes from a compiled incidence. * This is O(facets × vertices), rather than the compiler's O(choose(vertices,n)). */ export declare function instantiateConvexPolytopeTopologyN(topology: ConvexPolytopeTopologyN, vertices: readonly SupportVertexN[], options?: Omit): PolytopeTopologyInstantiationResultN; /** Resolve an attached topology, or compile the exhaustive golden product. */ export declare function resolveConvexPolytopeTopologyN(shape: SupportShapeN, options?: ConvexPolytopeTopologyOptionsN): ConvexPolytopeResolutionResultN; /** Attach a compiled topology to any compatible support shape without copying it. */ export declare class CompiledPolytopeSupportShapeN implements SupportShapeN { readonly source: SupportShapeN; readonly polytopeTopology: ConvexPolytopeTopologyN; constructor(source: SupportShapeN, topology: ConvexPolytopeTopologyN); get dim(): number; get center(): VecN; support(direction: VecN): SupportVertexN; resolveFeature(featureId: SupportFeatureId): SupportVertexN | undefined; enumerateVertices(): readonly SupportVertexN[] | undefined; } export declare function polytopeFaceKeyN(featureIds: readonly SupportFeatureId[]): string; //# sourceMappingURL=polytope-topology.d.ts.map