SmlibWorker

Struct SmlibWorker 

Source
pub struct SmlibWorker { /* private fields */ }
Expand description

Owns one isolated serial SMLib process and session. A mutable receiver serializes requests; handles are rejected across workers even if their wire session IDs happen to coincide. Dropping the client kills/reaps its process.

Operations block. Use SupervisedWorker for bounded deadlines, cancellation and restart. This low-level client remains useful for serial tools.

Implementations§

Source§

impl SmlibWorker

Source

pub fn tessellate( &mut self, solid: BrepHandle, chord_metres: f64, angle_degrees: f64, limits: MeshLimits, ) -> Result<TessellatedMesh, WorkerError>

Tessellate a retained solid without consuming it, then copy the owned result in bounded frames and release the worker’s mesh handle on every reported success/failure path. Strict worker tessellation refuses partial failed faces. Buffers retain f64 positions before display narrowing. A complete mesh is its own nonempty witness; an all-zero one is sealed NumericalOutcome::Empty only if the solid itself is certified empty.

Source§

impl SmlibWorker

Source

pub fn is_empty(&mut self, solid: BrepHandle) -> Result<bool, WorkerError>

Semantic emptiness of the actual retained solid: no boundary topology and only known-void regions. A zero volume or mesh is no such proof.

Source§

impl SmlibWorker

Source

pub fn qualify_ordered_regions( &mut self, ) -> Result<RegionQualificationReport, WorkerError>

Run real SDK uploads, positive volumes, manifold, independent cap bounds and boundary mesh invariants on THIS actual process. No fixture or protocol peer can manufacture the private qualified state. Failure leaves the gate closed. A new process must qualify independently.

Source§

impl SmlibWorker

Source

pub fn qualify_rational_disks(&mut self) -> Result<Vec<f64>, WorkerError>

Explicitly qualify this incarnation’s supported open rational pipe route. Source interpretation, closed/hollow paths and rational regions remain outside this witness. Feature negotiation alone does not open the gate.

Source§

impl SmlibWorker

Source

pub fn qualify_face_sets(&mut self) -> Result<f64, WorkerError>

Explicitly qualify this incarnation’s stitched face-set solids. A capability bit alone does not open the gate; an old worker refuses here.

Source§

impl SmlibWorker

Source

pub fn retained_owner(&self) -> RuntimeOwner

Independently captured liveness/retirement for this exact process.

Source

pub fn evaluate_retained( &mut self, request: RetainedRequest, chord_metres: f64, angle_degrees: f64, limits: MeshLimits, ) -> Result<RetainedRealization, WorkerError>

Execute one retained source request on the incarnation it was prepared for. A stale request, or a curved/disk request this incarnation has not qualified, is refused before anything is uploaded. Only the raw authored solid is evaluated: no opening, enclosing Boolean or style applies.

Source§

impl SmlibWorker

Source

pub fn flush_releases(&mut self) -> Result<(), WorkerError>

Release the objects of dropped receipts now. Every command does this first; failure retires this exact process and is returned before any later command can run.

Source

pub fn release(&mut self, solid: BrepHandle) -> Result<(), WorkerError>

Release one live object, managed or raw. Foreign, stale or unknown handles dispatch nothing. A reported kernel failure retires the process because the object’s state is then unknown.

Source§

impl SmlibWorker

Source

pub fn evaluate_retained_boolean( &mut self, left: RetainedDependency<'_>, right: RetainedDependency<'_>, operation: BooleanOperation, chord_metres: f64, angle_degrees: f64, limits: MeshLimits, ) -> Result<RetainedDependencyResult, WorkerError>

Evaluate two sealed operands. The left operand’s frame is the common local frame, so world coordinates never enter the SDK; the right operand is copied into it and the copy is released. Both inputs stay unchanged. A certified-empty result is sealed as NumericalOutcome::Empty.

Source§

impl SmlibWorker

Source

pub fn copy_retained_affine( &mut self, input: RetainedTransformInput<'_>, column_major: [f64; 16], ) -> Result<RetainedAffineCopy, WorkerError>

Copy a sealed value under a bounded general affine column-major matrix, in that value’s evaluation frame. The input is never modified. A refused matrix or source class leaves the worker and input live; a failure after the copy started (status 8) retires this process and every object in it.

Source§

impl SmlibWorker

Source

pub fn spawn(executable: impl AsRef<OsStr>) -> Result<Self, WorkerError>

Source

pub fn incarnation(&self) -> u64

Host-local incarnation: nonzero while this exact process is live.

Source

pub fn process_id(&self) -> u32

OS process identity for supervisor diagnostics. Handles remain private.

Source

pub fn terminate(&mut self) -> Result<(), WorkerError>

Terminate and reap this worker, invalidating its session and handles. Idempotent after success. This cannot interrupt a concurrent blocking call holding &mut self; a deadline supervisor must own process cancellation.

Source

pub fn create_box( &mut self, origin: [f64; 3], size: [f64; 3], ) -> Result<BrepHandle, WorkerError>

Create a positive-dimension box, with minimum corner in evaluation metres.

Source

pub fn create_cylinder( &mut self, origin: [f64; 3], radius: f64, height: f64, ) -> Result<BrepHandle, WorkerError>

Create a positive-Z cylinder in evaluation metres.

Source

pub fn boolean( &mut self, left: BrepHandle, right: BrepHandle, operation: BooleanOperation, ) -> Result<BrepHandle, WorkerError>

Tolerance-based retained-BRep operation. Exact-polyhedral callers use GeometryDocument::evaluate_exact; this API never substitutes for it.

Source

pub fn volume( &mut self, solid: BrepHandle, relative_accuracy: f64, ) -> Result<f64, WorkerError>

Source

pub fn is_manifold(&mut self, solid: BrepHandle) -> Result<bool, WorkerError>

Source

pub fn copy_transform( &mut self, solid: BrepHandle, column_major: [f64; 16], ) -> Result<BrepHandle, WorkerError>

Copy before transforming; the input is never mutated. Matrices are column-major metres and must be proper rigid (finite, orthonormal).

Trait Implementations§

Source§

impl Drop for SmlibWorker

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more