Skip to main content

compile_product_layer_meshes_with

Function compile_product_layer_meshes_with 

Source
pub fn compile_product_layer_meshes_with<B: MeshCompiler>(
    backend: &B,
    model: &Model,
    product: EntityId,
    cut: &LayerCut,
    body: LayerBody,
    tolerance: Tolerance,
) -> GeometryResult<Option<LayerMeshes>>
Expand description

Mesh each layer of a product’s Body with a caller-supplied backend.

Each part is the Body cut by the inner boundaries of its layer, in the product’s frame; the outermost layers extend, so the parts add up to the Body (see lower_product_layers). The Body is gross, or net on request.

§Return values

Ok(None) when the product has no Body representation.

§Cost

The success path compiles each part once; the backend’s cache shares the Body across them. Only a refusal pays more: the Body is compiled alone, to tell a refusal of the Body from one of a layer.

§Errors

As lower_product_layers. A refusal the Body alone would raise is reported as the gross or net path reports it (for a net Body, GeometryError::OpeningNotSubtracted); otherwise it is GeometryError::LayerNotSplit naming the first layer refused.