Extrude

Trait Extrude 

Source
pub trait Extrude {
    // Required method
    fn extrude_slice(&self, m_a: &Mat4, m_b: &Mat4) -> TriangleMesh;

    // Provided methods
    fn extrude(&self, extrusion: Extrusion) -> WithBounds3D<TriangleMesh> { ... }
    fn cap(&self, _m: &Mat4, _bottom: bool) -> TriangleMesh { ... }
    fn linear_extrude(
        &self,
        height: Length,
        scale_x: Scalar,
        scale_y: Scalar,
        twist: Angle,
    ) -> WithBounds3D<TriangleMesh> { ... }
    fn revolve_extrude(
        &self,
        angle: Angle,
        segments: usize,
    ) -> WithBounds3D<TriangleMesh> { ... }
    fn spiralize(
        &self,
        height: Scalar,
        inner_radius: Scalar,
        outer_radius: Scalar,
        turns: Scalar,
        segments_per_turn: usize,
    ) -> WithBounds3D<TriangleMesh> { ... }
}
Expand description

Extrude.

Required Methods§

Source

fn extrude_slice(&self, m_a: &Mat4, m_b: &Mat4) -> TriangleMesh

Extrude a single slice of the geometry with top and bottom plane.

Provided Methods§

Source

fn extrude(&self, extrusion: Extrusion) -> WithBounds3D<TriangleMesh>

Perform an extrusion.

Source

fn cap(&self, _m: &Mat4, _bottom: bool) -> TriangleMesh

Generate the cap geometry.

Source

fn linear_extrude( &self, height: Length, scale_x: Scalar, scale_y: Scalar, twist: Angle, ) -> WithBounds3D<TriangleMesh>

Perform a linear extrusion with a certain height.

Source

fn revolve_extrude( &self, angle: Angle, segments: usize, ) -> WithBounds3D<TriangleMesh>

Perform a revolve extrusion with a certain angle.

Source

fn spiralize( &self, height: Scalar, inner_radius: Scalar, outer_radius: Scalar, turns: Scalar, segments_per_turn: usize, ) -> WithBounds3D<TriangleMesh>

Perform a helix/spiral‐extrusion: rotate profile while translating upward, with varying radius from inner_radius to outer_radius and a given number of full turns. height = total vertical height of the helix. inner_radius = radius at the start (bottom) of the helix. outer_radius = radius at the end (top) of the helix. turns = number of full revolutions (2π each) over the height. segments_per_turn = subdivisions per turn.

Implementors§