fn write_el_counts(&mut self) {
        let rank = self.rank();
        debug_assert!(rank >= 2);

        // # Vertices, Faces, Edges, ...
        if self.comments() {
            self.push_str("\n# Vertices");

            if rank == 3 {
                self.push_str(", Components");
            } else {
                self.push_str(", Faces, Edges");

                for r in 4..rank {
                    self.push_str(", ");
                    self.push_str(element_name(r));
                }
            }

            self.push('\n');
        }

        self.push_to_str(self.el_count(1));

        match rank {
            2 => {}
            3 => {
                self.push(' ');
                self.push_to_str(
                    CycleList::from_edges(self.poly[2].iter().map(|edge| &edge.subs)).len(),
                );
            }
            _ => {
                // Swaps edges and faces because OFF format bad.
                self.push(' ');
                self.push_to_str(self.el_count(3));
                self.push(' ');
                self.push_to_str(self.el_count(2));

                for r in 4..rank {
                    self.push(' ');
                    self.push_to_str(self.el_count(r));
                }
            }
        }

        self.push('\n');
    }
/// Writes the polytope's element counts into an OFF file.
///
/// This method should only be called on polytopes of rank at least 2.
Writes the polytope's element counts into an OFF file.
This method should only be called on polytopes of rank at least 2.
Writes the polytope ' s element counts into an OFF file . This method should only be called on polytopes of rank at least 2 .
fn write_el_counts(&mut self) {
        let rank = self.rank();
        debug_assert!(rank >= 2);
        // # Vertices, Faces, Edges, ...
        if self.comments() {
            self.push_str("\n# Vertices");
            if rank == 3 {
                self.push_str(", Components");
            } else {
                self.push_str(", Faces, Edges");
                for r in 4..rank {
                    self.push_str(", ");
                    self.push_str(element_name(r));
                }
            }
            self.push('\n');
        }
        self.push_to_str(self.el_count(1));
        match rank {
            2 => {}
            3 => {
                self.push(' ');
                self.push_to_str(
                    CycleList::from_edges(self.poly[2].iter().map(|edge| &edge.subs)).len(),
                );
            }
            _ => {
                // Swaps edges and faces because OFF format bad.
                self.push(' ');
                self.push_to_str(self.el_count(3));
                self.push(' ');
                self.push_to_str(self.el_count(2));
                for r in 4..rank {
                    self.push(' ');
                    self.push_to_str(self.el_count(r));
                }
            }
        }
        self.push('\n');
    }
fn write_el_counts ( & mut self ) { let rank = self . rank ( ) ; debug_assert ! ( rank 2 ) ; // # Vertices, Faces, Edges, ... if self . comments ( ) { self . push_str ( " \n " ) ; if rank == 3 { self . push_str ( " " ) ; } else { self . push_str ( " " ) ; for r in 4 .. rank { self . push_str ( " " ) ; self . push_str ( element_name ( r ) ) ; } } self . push ( '\n' ) ; } self . push_to_str ( self . el_count ( 1 ) ) ; match rank { 2 => { } 3 => { self . push ( ' ' ) ; self . push_to_str ( CycleList :: from_edges ( self . poly [ 2 ] . iter ( ) . map ( | edge | & edge . subs ) ) . len ( ) , ) ; } _ => { // Swaps edges and faces because OFF format bad. self . push ( ' ' ) ; self . push_to_str ( self . el_count ( 3 ) ) ; self . push ( ' ' ) ; self . push_to_str ( self . el_count ( 2 ) ) ; for r in 4 .. rank { self . push ( ' ' ) ; self . push_to_str ( self . el_count ( r ) ) ; } } } self . push ( '\n' ) ; }
Writes the polytope's element counts into an OFF file.
Writes the polytope ' s element counts into an OFF file .
&mut self
&mut self