/** * MeshImporter — Unified facade for mesh file import. * * Detects format by file extension (or buffer heuristic), dispatches to the * appropriate parser, and optionally tetrahedralizes surface meshes via * AutoMesher.meshSurface(). * * Supported formats (MVP): * - STL (binary + ASCII) → SurfaceMesh * - OBJ (Wavefront) → SurfaceMesh * - GMSH 2.x ASCII (.msh) → TetMesh (volumetric, no surface step needed) * * @see AutoMesher.meshSurface — surface-to-volume tetrahedralization * @see STLParser, OBJParser, GmshParser — underlying parsers */ import type { SurfaceMesh, TetMesh, SurfaceMeshOptions } from '../AutoMesher'; import { MeshImportError } from './GmshParser'; import type { VTKUnstructuredResult } from './VTKImporter'; export { MeshImportError }; /** Detected or asserted mesh file format. */ export type MeshFormat = 'stl' | 'obj' | 'msh' | 'vtk' | 'unknown'; export interface ImportOptions extends Partial { /** * For surface meshes (STL/OBJ), auto-tetrahedralize via meshSurface(). * Default: true. */ tetrahedralize?: boolean; } /** Result of a mesh import. Exactly one of tetMesh / surfaceMesh is present. */ export interface ImportedMesh { format: MeshFormat; /** Volumetric mesh (from GMSH direct, or STL/OBJ after meshSurface). */ tetMesh?: TetMesh; /** Surface mesh (from STL/OBJ when tetrahedralize=false or meshSurface failed). */ surfaceMesh?: SurfaceMesh; /** Raw unstructured result (from GMSH — carries point/cell data). */ unstructured?: VTKUnstructuredResult; } /** Detect format from a path string or buffer header. */ export declare function detectFormat(source: string | ArrayBuffer): MeshFormat; /** * Synchronous mesh import. * * - STL / OBJ → SurfaceMesh (tetrahedralize=false) * - GMSH → TetMesh (direct volumetric) * * To tetrahedralize a surface mesh, use `importMesh()` (async) or call * `meshSurface(surfaceMesh)` yourself after this step. */ export declare function importMeshSync(source: string | ArrayBuffer, options?: ImportOptions): ImportedMesh; /** * Async mesh import with optional auto-tetrahedralization. * * - STL / OBJ → SurfaceMesh → meshSurface() → TetMesh * - GMSH → TetMesh (direct, no async work) */ export declare function importMesh(source: string | ArrayBuffer, options?: ImportOptions): Promise; //# sourceMappingURL=MeshImporter.d.ts.map