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() -> Self
pub fn tetrahedron() -> Self
Create tetrahedron manifold.
Sourcepub fn cylinder(
radius_low: f64,
radius_high: f64,
height: f64,
segments: u32,
) -> Self
pub fn cylinder( radius_low: f64, radius_high: f64, height: f64, segments: u32, ) -> Self
Create a cylinder manifold.
Sourcepub fn intersection(&self, b: &Self) -> Self
pub fn intersection(&self, b: &Self) -> Self
Get the intersection of two manifolds.
Sourcepub fn difference(&self, b: &Self) -> Self
pub fn difference(&self, b: &Self) -> Self
Get the difference of two manifolds.
Sourcepub fn boolean_op(&self, b: &Self, op: BooleanOp) -> Self
pub fn boolean_op(&self, b: &Self, op: BooleanOp) -> Self
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,
) -> Self
pub fn extrude( multi_polygon_data: &[&[f64]], height: f64, n_divisions: u32, twist_degrees: f64, scale_top_x: f64, scale_top_y: f64, ) -> Self
Extrude a polygon to create a manifold.
Sourcepub fn revolve(
multi_polygon_data: &[&[f64]],
circular_segments: u32,
revolve_degrees: f64,
) -> Self
pub fn revolve( multi_polygon_data: &[&[f64]], circular_segments: u32, revolve_degrees: f64, ) -> Self
Revolve a polygon to create a manifold.
Sourcepub fn refine_to_length(self: &Manifold, t: f64) -> Self
pub fn refine_to_length(self: &Manifold, t: f64) -> Self
Refine manifold to Length.
Sourcepub fn refine_to_tolerance(self: &Manifold, t: f64) -> Self
pub fn refine_to_tolerance(self: &Manifold, t: f64) -> Self
Refine to tolerance.
Sourcepub fn smooth_by_normals(self: &Manifold, normal_idx: i32) -> Self
pub fn smooth_by_normals(self: &Manifold, normal_idx: i32) -> Self
Smooth by normals.
Sourcepub fn smooth_out(
self: &Manifold,
min_sharp_angle: f64,
min_smoothness: f64,
) -> Self
pub fn smooth_out( self: &Manifold, min_sharp_angle: f64, min_smoothness: f64, ) -> Self
Smooth out.
Sourcepub fn calculate_normals(
self: &Manifold,
normal_idx: i32,
min_sharp_angle: f64,
) -> Self
pub fn calculate_normals( self: &Manifold, normal_idx: i32, min_sharp_angle: f64, ) -> Self
Calculate normals for the manifold and return a new one.
Trait Implementations§
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