Skip to main content

MeshPlaneSection

Trait MeshPlaneSection 

Source
pub trait MeshPlaneSection: Backend {
    // Required method
    fn section(
        &self,
        mesh: &TriMesh,
        frame: Frame3,
        limits: SectionLimits,
        options: &ExecutionOptions,
    ) -> GeomResult<SectionOutcome>;

    // Provided methods
    fn scratch_requirement(&self) -> ScratchRequirement { ... }
    fn cancellation_granularity(&self) -> CancellationGranularity { ... }
    fn request_scratch_requirement(&self) -> ScratchRequirement { ... }
    fn section_request(
        &self,
        mesh: &TriMesh,
        request: &SectionRequest,
        options: &ExecutionOptions,
    ) -> GeomResult<PlaneSection> { ... }
}
Expand description

Provider for deterministic sections of closed oriented triangle solids.

Required Methods§

Source

fn section( &self, mesh: &TriMesh, frame: Frame3, limits: SectionLimits, options: &ExecutionOptions, ) -> GeomResult<SectionOutcome>

Intersect one validated closed oriented mesh with frame’s local XY plane. Implementations must enforce limits before growing output.

Provided Methods§

Source

fn scratch_requirement(&self) -> ScratchRequirement

Scratch needed beyond inputs and result.

Source

fn cancellation_granularity(&self) -> CancellationGranularity

How finely the provider polls cancellation.

Source

fn request_scratch_requirement(&self) -> ScratchRequirement

Scratch needed beyond inputs and result by section_request. Defaults to scratch_requirement.

Source

fn section_request( &self, mesh: &TriMesh, request: &SectionRequest, options: &ExecutionOptions, ) -> GeomResult<PlaneSection>

Intersect one validated mesh with the request frame’s local XY plane, reporting faces lying in the plane as regions (ADR 0091). Providers that do not implement it refuse with Unsupported, which lets the registry fall back to the next provider.

A provider may implement SectionRole::Solid only: it then refuses a SectionRole::Sheet request with Unsupported, and the region conformance suite reports sheets_claimed == false instead of failing.

A provider that does not trace cut regions refuses a request that has them with Unsupported; the suite then reports cut_regions_claimed == false. A provider written before cut regions existed ignores the request and answers with cut_regions == None: the registry treats that answer as Unsupported and tries the next provider, and the suite treats it on the first solid case as not claimed. A provider that returns cut regions on one case and drops them on another fails the suite.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§