pub struct Packer3D { /* private fields */ }Expand description
3D bin packing solver.
Implementations§
Source§impl Packer3D
impl Packer3D
Sourcepub fn default_config() -> Self
pub fn default_config() -> Self
Creates a packer with default configuration.
Sourcepub fn validate_stability(
&self,
result: &SolveResult<f64>,
geometries: &[Geometry3D],
_boundary: &Boundary3D,
constraint: StabilityConstraint,
) -> StabilityReport
pub fn validate_stability( &self, result: &SolveResult<f64>, geometries: &[Geometry3D], _boundary: &Boundary3D, constraint: StabilityConstraint, ) -> StabilityReport
Validates the stability of a packing result.
Analyzes each placement to ensure boxes are properly supported.
Sourcepub fn validate_stability_physics(
&self,
result: &SolveResult<f64>,
geometries: &[Geometry3D],
boundary: &Boundary3D,
) -> StabilityReport
pub fn validate_stability_physics( &self, result: &SolveResult<f64>, geometries: &[Geometry3D], boundary: &Boundary3D, ) -> StabilityReport
Validates stability using physics simulation.
Runs a physics simulation to detect boxes that would fall or tip.
Trait Implementations§
Source§impl Solver for Packer3D
impl Solver for Packer3D
Source§type Geometry = Geometry3D
type Geometry = Geometry3D
The geometry type this solver handles.
Source§type Boundary = Boundary3D
type Boundary = Boundary3D
The boundary type this solver handles.
Source§fn solve(
&self,
geometries: &[Self::Geometry],
boundary: &Self::Boundary,
) -> Result<SolveResult<f64>>
fn solve( &self, geometries: &[Self::Geometry], boundary: &Self::Boundary, ) -> Result<SolveResult<f64>>
Solves the nesting/packing problem.
Source§fn solve_with_progress(
&self,
geometries: &[Self::Geometry],
boundary: &Self::Boundary,
callback: ProgressCallback,
) -> Result<SolveResult<f64>>
fn solve_with_progress( &self, geometries: &[Self::Geometry], boundary: &Self::Boundary, callback: ProgressCallback, ) -> Result<SolveResult<f64>>
Solves with a progress callback.
Auto Trait Implementations§
impl Freeze for Packer3D
impl RefUnwindSafe for Packer3D
impl Send for Packer3D
impl Sync for Packer3D
impl Unpin for Packer3D
impl UnwindSafe for Packer3D
Blanket Implementations§
Source§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
Mutably borrows from an owned value. Read more
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>
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 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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.