pub struct Manifold(/* private fields */);
Expand description
Manifold rust wrapper for C++ manifold object.
Implementations§
Source§impl Manifold
impl Manifold
Sourcepub fn project(&self) -> Polygons
pub fn project(&self) -> Polygons
Project the manifold onto a plane and return the resulting polygons.
Sourcepub fn tetrahedron() -> Manifold
pub fn tetrahedron() -> Manifold
Create tetrahedron manifold.
Sourcepub fn cylinder(
radius_low: f64,
radius_high: f64,
height: f64,
segments: u32,
) -> Manifold
pub fn cylinder( radius_low: f64, radius_high: f64, height: f64, segments: u32, ) -> Manifold
Create a cylinder manifold.
Sourcepub fn intersection(&self, b: &Manifold) -> Manifold
pub fn intersection(&self, b: &Manifold) -> Manifold
Get the intersection of two manifolds.
Sourcepub fn difference(&self, b: &Manifold) -> Manifold
pub fn difference(&self, b: &Manifold) -> Manifold
Get the difference of two manifolds.
Sourcepub fn boolean_op(&self, b: &Manifold, op: BooleanOp) -> Manifold
pub fn boolean_op(&self, b: &Manifold, op: BooleanOp) -> Manifold
Boolean operation on manifolds.
Sourcepub fn extrude(
multi_polygon_data: &[&[f64]],
height: f64,
n_divisions: u32,
twist_degrees: f64,
scale_top_x: f64,
scale_top_y: f64,
) -> Manifold
pub fn extrude( multi_polygon_data: &[&[f64]], height: f64, n_divisions: u32, twist_degrees: f64, scale_top_x: f64, scale_top_y: f64, ) -> Manifold
Extrude a polygon to create a manifold.
Sourcepub fn revolve(
multi_polygon_data: &[&[f64]],
circular_segments: u32,
revolve_degrees: f64,
) -> Manifold
pub fn revolve( multi_polygon_data: &[&[f64]], circular_segments: u32, revolve_degrees: f64, ) -> Manifold
Revolve a polygon to create a manifold.
Sourcepub fn refine_to_length(&self, t: f64) -> Manifold
pub fn refine_to_length(&self, t: f64) -> Manifold
Refine manifold to Length.
Sourcepub fn refine_to_tolerance(&self, t: f64) -> Manifold
pub fn refine_to_tolerance(&self, t: f64) -> Manifold
Refine to tolerance.
Sourcepub fn smooth_by_normals(&self, normal_idx: i32) -> Manifold
pub fn smooth_by_normals(&self, normal_idx: i32) -> Manifold
Smooth by normals.
Sourcepub fn smooth_out(&self, min_sharp_angle: f64, min_smoothness: f64) -> Manifold
pub fn smooth_out(&self, min_sharp_angle: f64, min_smoothness: f64) -> Manifold
Smooth out.
Sourcepub fn calculate_normals(
&self,
normal_idx: i32,
min_sharp_angle: f64,
) -> Manifold
pub fn calculate_normals( &self, normal_idx: i32, min_sharp_angle: f64, ) -> Manifold
Calculate normals for the manifold and return a new one.
Trait Implementations§
Source§impl From<Manifold> for TriangleMesh
impl From<Manifold> for TriangleMesh
Auto Trait Implementations§
impl Freeze for Manifold
impl RefUnwindSafe for Manifold
impl !Send for Manifold
impl !Sync for Manifold
impl Unpin for Manifold
impl UnwindSafe for Manifold
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 more