MeshBuilder

Builder for constructing immutable meshes from one or more surfaces

Meshes are immutable. Their setup is completely defined by this builder object, which can be built up incrementally.

Signature

// Builder for constructing immutable meshes from one or more surfaces
class MeshBuilder:
    fun addSurface(surface: Surface)
    fun allowSurfaceIntersections()
    fun allowNestedComponents()
    fun allowNonSupersolid()

// constructors
class Context:
    fun createMeshBuilder() -> MeshBuilder
    fun createMeshBuilderFromSurface(surface: Surface) -> MeshBuilder
    fun createMeshBuilderFromSurfaces(surfaces: [Surface]) -> MeshBuilder

Constructors

NameDescription
createMeshBuilderCreates an empty mesh builder for adding surfaces incrementally
createMeshBuilderFromSurfaceInitializes a mesh builder with a single surface
createMeshBuilderFromSurfacesInitializes a mesh builder with multiple surfaces

Methods

NameTypeDescription
addSurfaceAdds another surface to the current mesh builder
allowSurfaceIntersectionsMarks that different surfaces of the mesh may intersect each other
allowNestedComponentsMarks that the mesh may contain nested components with winding numbers greater than one
allowNonSupersolidMarks that the mesh may be non-supersolid, e.g. with holes or non-manifold configurations