pub fn with_parts(mut patches: Vec<Patch>) -> Self {
        for patch in patches.iter_mut() {
            match patch {
                Patch::TriangleStrip(_) => {}
                Patch::TriangleFan(_) => {}
                Patch::OuterRing(points) => close_points_if_not_already(points),
                Patch::InnerRing(points) => close_points_if_not_already(points),
                Patch::FirstRing(points) => close_points_if_not_already(points),
                Patch::Ring(points) => close_points_if_not_already(points),
            }
        }
        let mut bbox = GenericBBox::<PointZ>::from_points(patches[0].points());
        for patch in &patches[1..] {
            bbox.grow_from_points(patch.points());
        }

        Self { bbox, patches }
    }
/// Creates a Multipatch with multiple patches
///
/// Closes any patch part that is a ring
///
/// # Example
///
/// ```
/// use shapefile::{PointZ, Multipatch, NO_DATA, Patch};
/// let multipatch = Multipatch::with_parts(vec![
///     Patch::OuterRing(vec![
///         PointZ::new(0.0, 0.0, 0.0, NO_DATA),
///         PointZ::new(0.0, 4.0, 0.0, NO_DATA),
///         PointZ::new(4.0, 4.0, 0.0, NO_DATA),
///         PointZ::new(4.0, 0.0, 0.0, NO_DATA),
///     ]),
///     Patch::InnerRing(vec![
///         PointZ::new(0.0, 0.0, 0.0, NO_DATA),
///         PointZ::new(0.0, 2.0, 0.0, NO_DATA),
///         PointZ::new(2.0, 2.0, 0.0, NO_DATA),
///         PointZ::new(2.0, 0.0, 0.0, NO_DATA),
///     ])
/// ]);
/// ```
Creates a Multipatch with multiple patches
Closes any patch part that is a ring
Creates a Multipatch with multiple patches Closes any patch part that is a ring
pub fn with_parts(mut patches: Vec<Patch>) -> Self {
        for patch in patches.iter_mut() {
            match patch {
                Patch::TriangleStrip(_) => {}
                Patch::TriangleFan(_) => {}
                Patch::OuterRing(points) => close_points_if_not_already(points),
                Patch::InnerRing(points) => close_points_if_not_already(points),
                Patch::FirstRing(points) => close_points_if_not_already(points),
                Patch::Ring(points) => close_points_if_not_already(points),
            }
        }
        let mut bbox = GenericBBox::<PointZ>::from_points(patches[0].points());
        for patch in &patches[1..] {
            bbox.grow_from_points(patch.points());
        }
        Self { bbox, patches }
    }
pub fn with_parts ( mut patches : Vec < Patch > ) -> Self { for patch in patches . iter_mut ( ) { match patch { Patch :: TriangleStrip ( _ ) => { } Patch :: TriangleFan ( _ ) => { } Patch :: OuterRing ( points ) => close_points_if_not_already ( points ) , Patch :: InnerRing ( points ) => close_points_if_not_already ( points ) , Patch :: FirstRing ( points ) => close_points_if_not_already ( points ) , Patch :: Ring ( points ) => close_points_if_not_already ( points ) , } } let mut bbox = GenericBBox :: < PointZ > :: from_points ( patches [ 0 ] . points ( ) ) ; for patch in & patches [ 1 .. ] { bbox . grow_from_points ( patch . points ( ) ) ; } Self { bbox , patches } }
Creates a Multipatch with multiple patches
Closes any patch part that is a ring
Creates a Multipatch with multiple patches Closes any patch part that is a ring
patches
Vec<Patch>
example
None