Skip to main content

Kernel

Trait Kernel 

Source
pub trait Kernel: Send {
    // Required methods
    fn name(&self) -> &str;
    fn initialize(&mut self) -> KernelResult<()>;

    // Provided methods
    fn rebuild(
        &mut self,
        _request: &RebuildRequest,
    ) -> KernelResult<RebuildResponse> { ... }
    fn tessellate(
        &self,
        _body: BodyHandle,
        _detail: &TessellationSettings,
    ) -> KernelResult<TriMesh> { ... }
    fn import_step(
        &mut self,
        _path: &Path,
        _detail: &TessellationSettings,
    ) -> KernelResult<ImportedModel> { ... }
}
Expand description

Trait implemented by any geometry kernel that can serve the application.

Required Methods§

Source

fn name(&self) -> &str

Human-friendly identifier for logging purposes.

Source

fn initialize(&mut self) -> KernelResult<()>

Called once before any geometry work happens.

Provided Methods§

Source

fn rebuild( &mut self, _request: &RebuildRequest, ) -> KernelResult<RebuildResponse>

👎Deprecated since 0.1.6:

never called; removed in 0.2

Recompute dirty features/bodies and return the affected handles.

Source

fn tessellate( &self, _body: BodyHandle, _detail: &TessellationSettings, ) -> KernelResult<TriMesh>

👎Deprecated since 0.1.6:

never called; removed in 0.2

Produce a triangular mesh for the provided body handle.

Source

fn import_step( &mut self, _path: &Path, _detail: &TessellationSettings, ) -> KernelResult<ImportedModel>

Read a STEP/STP file from disk and return tessellated bodies.

Implementations that do not support STEP import should return KernelError::Unsupported.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§