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
impl SmlibWorker
Sourcepub fn tessellate(
&mut self,
solid: BrepHandle,
chord_metres: f64,
angle_degrees: f64,
limits: MeshLimits,
) -> Result<TessellatedMesh, WorkerError>
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
impl SmlibWorker
Sourcepub fn is_empty(&mut self, solid: BrepHandle) -> Result<bool, WorkerError>
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
impl SmlibWorker
Sourcepub fn qualify_ordered_regions(
&mut self,
) -> Result<RegionQualificationReport, WorkerError>
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
impl SmlibWorker
Sourcepub fn qualify_rational_disks(&mut self) -> Result<Vec<f64>, WorkerError>
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
impl SmlibWorker
Sourcepub fn qualify_face_sets(&mut self) -> Result<f64, WorkerError>
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
impl SmlibWorker
Sourcepub fn retained_owner(&self) -> RuntimeOwner
pub fn retained_owner(&self) -> RuntimeOwner
Independently captured liveness/retirement for this exact process.
Sourcepub fn evaluate_retained(
&mut self,
request: RetainedRequest,
chord_metres: f64,
angle_degrees: f64,
limits: MeshLimits,
) -> Result<RetainedRealization, WorkerError>
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
impl SmlibWorker
Sourcepub fn flush_releases(&mut self) -> Result<(), WorkerError>
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.
Sourcepub fn release(&mut self, solid: BrepHandle) -> Result<(), WorkerError>
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
impl SmlibWorker
Sourcepub fn evaluate_retained_boolean(
&mut self,
left: RetainedDependency<'_>,
right: RetainedDependency<'_>,
operation: BooleanOperation,
chord_metres: f64,
angle_degrees: f64,
limits: MeshLimits,
) -> Result<RetainedDependencyResult, WorkerError>
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
impl SmlibWorker
Sourcepub fn copy_retained_affine(
&mut self,
input: RetainedTransformInput<'_>,
column_major: [f64; 16],
) -> Result<RetainedAffineCopy, WorkerError>
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
impl SmlibWorker
pub fn spawn(executable: impl AsRef<OsStr>) -> Result<Self, WorkerError>
Sourcepub fn incarnation(&self) -> u64
pub fn incarnation(&self) -> u64
Host-local incarnation: nonzero while this exact process is live.
Sourcepub fn process_id(&self) -> u32
pub fn process_id(&self) -> u32
OS process identity for supervisor diagnostics. Handles remain private.
Sourcepub fn terminate(&mut self) -> Result<(), WorkerError>
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.
Sourcepub fn create_box(
&mut self,
origin: [f64; 3],
size: [f64; 3],
) -> Result<BrepHandle, WorkerError>
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.
Sourcepub fn create_cylinder(
&mut self,
origin: [f64; 3],
radius: f64,
height: f64,
) -> Result<BrepHandle, WorkerError>
pub fn create_cylinder( &mut self, origin: [f64; 3], radius: f64, height: f64, ) -> Result<BrepHandle, WorkerError>
Create a positive-Z cylinder in evaluation metres.
Sourcepub fn boolean(
&mut self,
left: BrepHandle,
right: BrepHandle,
operation: BooleanOperation,
) -> Result<BrepHandle, WorkerError>
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.
pub fn volume( &mut self, solid: BrepHandle, relative_accuracy: f64, ) -> Result<f64, WorkerError>
pub fn is_manifold(&mut self, solid: BrepHandle) -> Result<bool, WorkerError>
Sourcepub fn copy_transform(
&mut self,
solid: BrepHandle,
column_major: [f64; 16],
) -> Result<BrepHandle, WorkerError>
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§
Auto Trait Implementations§
impl Freeze for SmlibWorker
impl RefUnwindSafe for SmlibWorker
impl Send for SmlibWorker
impl Sync for SmlibWorker
impl Unpin for SmlibWorker
impl UnwindSafe for SmlibWorker
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
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 moreSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.