Mesh
Half-edge polygon mesh arena (handle). Not TriangleMesh (indexed soup). Planar face UV is a 16-float matrix (uvMatrix on the face wire): Mesh.uvPlanar / Mesh.uvFromOrigin build it, Mesh.uvApply maps a world point → [u,v]. Layout: [ux,uy,uz,uOffset, vx,vy,vz,vOffset, 0,0,0,0, 0,0,0,1]. Tessellation bakes UVs into the triangle soup.
import { Mesh } from '@huukhanhnguyen/geometry'API reference
Mesh.bevel
Mesh.bevel(id: number, edges: Uint32Array, radius: number, segments: number, radius2?: number | null): voidWasm: mesh_bevel
Mesh.bevelVertices
Mesh.bevelVertices(id: number, vertices: Uint32Array, radius: number, segments: number): voidWasm: mesh_bevel_vertices
Mesh.boundingBox
Mesh.boundingBox(id: number): Float64ArrayWasm: mesh_bounding_box
Mesh.box
Mesh.box(width: number, depth: number, height: number): numberWasm: mesh_box
Mesh.chamfer
Mesh.chamfer(id: number, edges: Uint32Array, distance1: number, distance2: number): voidWasm: mesh_chamfer
Mesh.clone
Mesh.clone(id: number): numberWasm: mesh_clone
Mesh.cone
Mesh.cone(radius_bottom: number, radius_top: number, height: number, sides: number): numberWasm: mesh_cone
Mesh.containsPoint
Mesh.containsPoint(id: number, x: number, y: number, z: number): booleanWasm: mesh_contains
Mesh.cornerCount
Mesh.cornerCount(id: number): numberWasm: mesh_corner_count
Mesh.deleteVertices
Mesh.deleteVertices(id: number, vertices: Uint32Array): voidWasm: mesh_delete_vertices
Mesh.dissolveEdges
Mesh.dissolveEdges(id: number, edges: Uint32Array): voidWasm: mesh_dissolve_edges
Mesh.dump
Mesh.dump(id: number): stringWasm: mesh_dump
Mesh.edgeCount
Mesh.edgeCount(id: number): numberWasm: mesh_edge_count
Mesh.edgesWithBothEndpointsInBox
Mesh.edgesWithBothEndpointsInBox(id: number, min: Float64Array, max: Float64Array): Uint32ArrayWasm: mesh_edges_with_both_endpoints_in_box
Mesh.edgeVertices
Mesh.edgeVertices(id: number): Uint32ArrayWasm: mesh_edge_vertices
Mesh.extrude
Mesh.extrude(id: number, faces: Uint32Array, thickness: number): voidWasm: mesh_extrude
Mesh.extrudeEdges
Mesh.extrudeEdges(id: number, edges: Uint32Array, dx: number, dy: number, dz: number, distance: number): voidWasm: mesh_extrude_edges
Mesh.faceCount
Mesh.faceCount(id: number): numberWasm: mesh_face_count
Mesh.faceOffsets
Mesh.faceOffsets(id: number): Uint32ArrayWasm: mesh_face_offsets
Mesh.faceVertices
Mesh.faceVertices(id: number): Uint32ArrayWasm: mesh_face_vertices
Mesh.free
Mesh.free(id: number): booleanWasm: mesh_free
Mesh.fromBrep
Mesh.fromBrep(json: string): numberWasm: mesh_from_brep
Mesh.fromTriangleMesh
Mesh.fromTriangleMesh(positions: Float64Array, indices: Uint32Array, uvs: Float64Array): numberWasm: mesh_from_triangle_mesh
Mesh.intersect
Mesh.intersect(id: number, positions: Float64Array, indices: Uint32Array): numberWasm: mesh_intersect
Mesh.isSolid
Mesh.isSolid(id: number): booleanWasm: mesh_is_solid
Mesh.lattice
Mesh.lattice(id: number, options_json: string): voidWasm: mesh_lattice
Mesh.load
Mesh.load(json: string): numberWasm: mesh_load
Mesh.positions
Mesh.positions(id: number): Float64ArrayWasm: mesh_positions
Mesh.reverse
Mesh.reverse(id: number): numberWasm: mesh_reverse
Mesh.splitByPlane
Mesh.splitByPlane(id: number, plane: Float64Array): stringWasm: mesh_split_by_plane
Mesh.subdivide
Mesh.subdivide(id: number, options_json: string): voidWasm: mesh_subdivide
Mesh.subtract
Mesh.subtract(id: number, positions: Float64Array, indices: Uint32Array): numberWasm: mesh_subtract
Mesh.surfaceArea
Mesh.surfaceArea(id: number): numberWasm: mesh_surface_area
Mesh.sweep
Mesh.sweep(path: Float64Array, profile: Float64Array, caps: boolean): numberWasm: mesh_sweep
Mesh.tessellate
Mesh.tessellate(id: number): Float64ArrayWasm: mesh_tessellate
Mesh.tessellateJson
Mesh.tessellateJson(id: number): stringWasm: mesh_tessellate_json
Mesh.thicken
Mesh.thicken(id: number, thickness: number, options_json: string): voidWasm: mesh_thicken
Mesh.toBrep
Mesh.toBrep(id: number): stringWasm: mesh_to_brep
Mesh.transform
Mesh.transform(id: number, matrix: Float64Array): numberWasm: mesh_transform
Mesh.transformVertices
Mesh.transformVertices(id: number, vertices: Uint32Array, matrix: Float64Array): voidWasm: mesh_transform_vertices
Mesh.union
Mesh.union(id: number, positions: Float64Array, indices: Uint32Array): numberWasm: mesh_union
Mesh.uvApply
Mesh.uvApply(matrix: Float64Array, x: number, y: number, z: number): Float64ArrayWasm: mesh_uv_apply
Mesh.uvFromOrigin
Mesh.uvFromOrigin(origin_x: number, origin_y: number, origin_z: number, u_axis_x: number, u_axis_y: number, u_axis_z: number, v_axis_x: number, v_axis_y: number, v_axis_z: number): Float64ArrayWasm: mesh_uv_from_origin
Mesh.uvPlanar
Mesh.uvPlanar(u_axis_x: number, u_axis_y: number, u_axis_z: number, v_axis_x: number, v_axis_y: number, v_axis_z: number, u_offset: number, v_offset: number): Float64ArrayWasm: mesh_uv_planar
Mesh.vertexCount
Mesh.vertexCount(id: number): numberWasm: mesh_vertex_count
Mesh.verticesInBox
Mesh.verticesInBox(id: number, min: Float64Array, max: Float64Array): Uint32ArrayWasm: mesh_vertices_in_box
Mesh.volume
Mesh.volume(id: number): numberWasm: mesh_volume
See GEOMETRY_CATALOG.md for catalog ownership.