pub(crate) fn _insert_new_edge_2(
        &mut self,
        site1: VSE::SiteEvent<I, F>,
        site2: VSE::SiteEvent<I, F>,
    ) -> (EdgeIndex, EdgeIndex) {
        //tln!("-> insert_new_edge_2()");
        //tln!("site1:{:?}\nsite2:{:?}", &site1, &site2);
        // Get sites' indexes.
        let site1_index = site1.sorted_index();
        let site2_index = site2.sorted_index();

        let is_linear = VSE::SiteEvent::is_linear_edge(&site1, &site2);
        let is_primary = VSE::SiteEvent::is_primary_edge(&site1, &site2);

        // Create a new half-edge that belongs to the first site.
        let edge1_id = self.create_and_insert_edge(CellIndex(site1_index), is_linear, is_primary);

        // Create a new half-edge that belongs to the second site.
        let edge2_id = self.create_and_insert_edge(CellIndex(site2_index), is_linear, is_primary);

        // Add the initial cell during the first edge insertion.
        if self.cells_.is_empty() {
            let _ = self.make_new_cell_with_category_(
                CellIndex(site1_index),
                site1.initial_index(),
                site1.source_category(),
            );
        }

        // The second site represents a new site during site event
        // processing. Add a new cell to the cell records.
        let _ = self.make_new_cell_with_category_(
            CellIndex(site2_index),
            site2.initial_index(),
            site2.source_category(),
        );

        // Set up pointers to cells. Todo! is this needed? Didn't we do this already?
        self.edge_set_cell_(Some(edge1_id), Some(CellIndex(site1_index)));
        self.edge_set_cell_(Some(edge2_id), Some(CellIndex(site2_index)));

        // Set up twin pointers.
        self.edge_set_twin_(Some(edge1_id), Some(edge2_id));
        self.edge_set_twin_(Some(edge2_id), Some(edge1_id));

        //tln!("edge1: {:?}", self.get_edge_(edge1_id).get());
        //tln!("edge2: {:?}", self.get_edge_(edge2_id).get());
        //tln!("edges.len():{}", self.edges_.len());
        (edge1_id, edge2_id)
    }
/// Insert a new half-edge into the output data structure.
/// Takes as input left and right sites that form a new bisector.
/// Returns a pair of pointers to new half-edges.
Insert a new half-edge into the output data structure.
Takes as input left and right sites that form a new bisector.
Returns a pair of pointers to new half-edges.
Insert a new half - edge into the output data structure . Takes as input left and right sites that form a new bisector . Returns a pair of pointers to new half - edges .
pub(crate) fn _insert_new_edge_2(
        &mut self,
        site1: VSE::SiteEvent<I, F>,
        site2: VSE::SiteEvent<I, F>,
    ) -> (EdgeIndex, EdgeIndex) {
        //tln!("-> insert_new_edge_2()");
        //tln!("site1:{:?}\nsite2:{:?}", &site1, &site2);
        // Get sites' indexes.
        let site1_index = site1.sorted_index();
        let site2_index = site2.sorted_index();
        let is_linear = VSE::SiteEvent::is_linear_edge(&site1, &site2);
        let is_primary = VSE::SiteEvent::is_primary_edge(&site1, &site2);
        // Create a new half-edge that belongs to the first site.
        let edge1_id = self.create_and_insert_edge(CellIndex(site1_index), is_linear, is_primary);
        // Create a new half-edge that belongs to the second site.
        let edge2_id = self.create_and_insert_edge(CellIndex(site2_index), is_linear, is_primary);
        // Add the initial cell during the first edge insertion.
        if self.cells_.is_empty() {
            let _ = self.make_new_cell_with_category_(
                CellIndex(site1_index),
                site1.initial_index(),
                site1.source_category(),
            );
        }
        // The second site represents a new site during site event
        // processing. Add a new cell to the cell records.
        let _ = self.make_new_cell_with_category_(
            CellIndex(site2_index),
            site2.initial_index(),
            site2.source_category(),
        );
        // Set up pointers to cells. Todo! is this needed? Didn't we do this already?
        self.edge_set_cell_(Some(edge1_id), Some(CellIndex(site1_index)));
        self.edge_set_cell_(Some(edge2_id), Some(CellIndex(site2_index)));
        // Set up twin pointers.
        self.edge_set_twin_(Some(edge1_id), Some(edge2_id));
        self.edge_set_twin_(Some(edge2_id), Some(edge1_id));
        //tln!("edge1: {:?}", self.get_edge_(edge1_id).get());
        //tln!("edge2: {:?}", self.get_edge_(edge2_id).get());
        //tln!("edges.len():{}", self.edges_.len());
        (edge1_id, edge2_id)
    }
pub ( crate ) fn _insert_new_edge_2 ( & mut self , site1 : VSE :: SiteEvent < I , F > , site2 : VSE :: SiteEvent < I , F > , ) -> ( EdgeIndex , EdgeIndex ) { //tln!("-> insert_new_edge_2()"); //tln!("site1:{:?}\nsite2:{:?}", &site1, &site2); // Get sites' indexes. let site1_index = site1 . sorted_index ( ) ; let site2_index = site2 . sorted_index ( ) ; let is_linear = VSE :: SiteEvent :: is_linear_edge ( & site1 , & site2 ) ; let is_primary = VSE :: SiteEvent :: is_primary_edge ( & site1 , & site2 ) ; // Create a new half-edge that belongs to the first site. let edge1_id = self . create_and_insert_edge ( CellIndex ( site1_index ) , is_linear , is_primary ) ; // Create a new half-edge that belongs to the second site. let edge2_id = self . create_and_insert_edge ( CellIndex ( site2_index ) , is_linear , is_primary ) ; // Add the initial cell during the first edge insertion. if self . cells_ . is_empty ( ) { let _ = self . make_new_cell_with_category_ ( CellIndex ( site1_index ) , site1 . initial_index ( ) , site1 . source_category ( ) , ) ; } // The second site represents a new site during site event // processing. Add a new cell to the cell records. let _ = self . make_new_cell_with_category_ ( CellIndex ( site2_index ) , site2 . initial_index ( ) , site2 . source_category ( ) , ) ; // Set up pointers to cells. Todo! is this needed? Didn't we do this already? self . edge_set_cell_ ( Some ( edge1_id ) , Some ( CellIndex ( site1_index ) ) ) ; self . edge_set_cell_ ( Some ( edge2_id ) , Some ( CellIndex ( site2_index ) ) ) ; // Set up twin pointers. self . edge_set_twin_ ( Some ( edge1_id ) , Some ( edge2_id ) ) ; self . edge_set_twin_ ( Some ( edge2_id ) , Some ( edge1_id ) ) ; //tln!("edge1: {:?}", self.get_edge_(edge1_id).get()); //tln!("edge2: {:?}", self.get_edge_(edge2_id).get()); //tln!("edges.len():{}", self.edges_.len()); ( edge1_id , edge2_id ) }
Insert a new half-edge into the output data structure.
Insert a new half - edge into the output data structure .
&mut self
site1
VSE::SiteEvent<I, F>
site2
VSE::SiteEvent<I, F>