Meshes
27 pages
-
mesh.fromFacesA mesh from point positions and faces given as lists of point indices. -
mesh.fromArraysA mesh from the flat layout WasmGeometry uses: corner counts per face and the point index of every corner. -
mesh.boxAn axis-aligned box of eight points and six outward quads. -
mesh.cylinderA closed faceted cylinder standing on a plane: side quads and two flat polygon caps. -
mesh.facePoint indices of one face, in winding order. -
mesh.pointPosition of one point. -
mesh.boundingBoxThe smallest axis-aligned box containing every point. -
mesh.faceNormalUnit normal of one face, outward for a counter-clockwise face. -
mesh.faceAreaArea of one face. -
mesh.areaTotal surface area of the mesh. -
mesh.volumeThe volume the mesh encloses, when it bounds a solid. -
mesh.validateWhether the mesh bounds a valid solid, with the edges and faces at fault when it does not. -
mesh.transformedA copy of the mesh with a transform applied to every point. -
mesh.raycastWhere a ray first meets the mesh, with the face it hits. -
mesh.closestPointThe point of the mesh nearest a query point, with its face and distance. -
mesh.booleanUnionThe union of closed meshes, by the kernel’s exact boolean. -
mesh.booleanDifferenceThe part of one closed mesh outside another, by the kernel’s exact boolean. -
mesh.booleanIntersectionThe part of space inside both closed meshes, by the kernel’s exact boolean. -
mesh.subdivideThe mesh subdivided a number of times, smoothly (Catmull–Clark) or keeping its shape (linear). -
mesh.extrudeFacesThe mesh with chosen faces pushed along their normals and joined to the rest by new side walls. -
mesh.insetFacesThe mesh with chosen faces shrunk so each edge moves a set distance inward, framed by rings of new quads. -
mesh.toGeometryThe engine’s attribute Geometry for this mesh, with polygon topology and f64 positions. -
mesh.toJSONThe mesh as plain JSON arrays. -
geometryKernel.loadGeometryKernelLoad, initialise and register the kernel3d and kernel2d WASM modules once, or register ones the host already loaded. -
geometryKernel.registerGeometryKernelRegister already initialised kernel3d and kernel2d modules for the modelling operations. -
containment.containsPointsWhether each point is inside a triangle mesh by the point-in-solid rule (|winding number| > ½), certified on the GPU or computed on the CPU. -
geometryKernel.geometryKernelReadyWhether the WASM modules the modelling operations need are registered.