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§
Sourcefn initialize(&mut self) -> KernelResult<()>
fn initialize(&mut self) -> KernelResult<()>
Called once before any geometry work happens.
Provided Methods§
Sourcefn rebuild(
&mut self,
_request: &RebuildRequest,
) -> KernelResult<RebuildResponse>
👎Deprecated since 0.1.6: never called; removed in 0.2
fn rebuild( &mut self, _request: &RebuildRequest, ) -> KernelResult<RebuildResponse>
never called; removed in 0.2
Recompute dirty features/bodies and return the affected handles.
Sourcefn tessellate(
&self,
_body: BodyHandle,
_detail: &TessellationSettings,
) -> KernelResult<TriMesh>
👎Deprecated since 0.1.6: never called; removed in 0.2
fn tessellate( &self, _body: BodyHandle, _detail: &TessellationSettings, ) -> KernelResult<TriMesh>
never called; removed in 0.2
Produce a triangular mesh for the provided body handle.
Sourcefn import_step(
&mut self,
_path: &Path,
_detail: &TessellationSettings,
) -> KernelResult<ImportedModel>
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".