Skip to main content

compile_product_mesh_for_with

Function compile_product_mesh_for_with 

Source
pub fn compile_product_mesh_for_with<B: MeshCompiler>(
    backend: &B,
    model: &Model,
    product: EntityId,
    purpose: RepresentationPurpose,
    tolerance: Tolerance,
) -> GeometryResult<Option<CompiledMesh>>
Expand description

The surfaces and solids of one product’s representation for purpose as one mesh, reporting its closure, with a caller-supplied backend.

Every leaf that is not a curve is compiled together, so a Body with no curves compiles from the same root, to the same mesh, as super::compile_product_mesh_reported_with. A surface – a surface model, a face, a rectangular trimmed surface, a B-rep of loose faces – is MeshClosure::Surface. Ok(None) when the product has no representation for purpose, or one with curves only (an Axis): compile_product_polylines_with returns those.

§Errors

Any lowering error, and GeometryError::CompilationRefused when the backend refuses the mesh.