pub fn build(mut self) -> OffWriteResult<String> {
        let rank = self.poly.rank();

        // Serialized name.
        /* self.off.push_str("# ");
        self.off
            .push_str(&ron::to_string(&self.polytope.name).unwrap_or_default());
        self.off.push('\n'); */

        // Blatant advertising.
        if self.comments() {
            self.push_str("# ");
            self.push_str(HEADER);
            self.push('\n');
        }

        // Writes header.
        self.write_rank();

        // If we have a nullitope or point on our hands, that is all.
        if rank < 2 {
            return Ok(self.off);
        }

        // Checks that no two edges coincide.
        self.check_edges()?;

        // Adds the element counts.
        self.write_el_counts();

        // Adds vertex coordinates.
        self.write_vertices();

        // Adds faces.
        if rank >= 3 {
            self.write_faces()?;
        }

        // Adds the rest of the elements.
        for r in 4..rank {
            self.write_els(r);
        }

        Ok(self.off)
    }
/// Consumes the OFF writer, returns the actual OFF file as a `String`.
Consumes the OFF writer, returns the actual OFF file as a `String`.
Consumes the OFF writer returns the actual OFF file as a ` String ` .
pub fn build(mut self) -> OffWriteResult<String> {
        let rank = self.poly.rank();
        // Serialized name.
        /* self.off.push_str("# ");
        self.off
            .push_str(&ron::to_string(&self.polytope.name).unwrap_or_default());
        self.off.push('\n'); */
        // Blatant advertising.
        if self.comments() {
            self.push_str("# ");
            self.push_str(HEADER);
            self.push('\n');
        }
        // Writes header.
        self.write_rank();
        // If we have a nullitope or point on our hands, that is all.
        if rank < 2 {
            return Ok(self.off);
        }
        // Checks that no two edges coincide.
        self.check_edges()?;
        // Adds the element counts.
        self.write_el_counts();
        // Adds vertex coordinates.
        self.write_vertices();
        // Adds faces.
        if rank >= 3 {
            self.write_faces()?;
        }
        // Adds the rest of the elements.
        for r in 4..rank {
            self.write_els(r);
        }
        Ok(self.off)
    }
pub fn build ( mut self ) -> OffWriteResult < String > { let rank = self . poly . rank ( ) ; // Serialized name. /* self.off.push_str("# ");
        self.off
            .push_str(&ron::to_string(&self.polytope.name).unwrap_or_default());
        self.off.push('\n'); */ // Blatant advertising. if self . comments ( ) { self . push_str ( " " ) ; self . push_str ( HEADER ) ; self . push ( '\n' ) ; } // Writes header. self . write_rank ( ) ; // If we have a nullitope or point on our hands, that is all. if rank < 2 { return Ok ( self . off ) ; } // Checks that no two edges coincide. self . check_edges ( ) ? ; // Adds the element counts. self . write_el_counts ( ) ; // Adds vertex coordinates. self . write_vertices ( ) ; // Adds faces. if rank >= 3 { self . write_faces ( ) ? ; } // Adds the rest of the elements. for r in 4 .. rank { self . write_els ( r ) ; } Ok ( self . off ) }
Consumes the OFF writer, returns the actual OFF file as a `String`.
Consumes the OFF writer returns the actual OFF file as a ` String ` .
mut self
mut self