fn insert_new_arc(
        &mut self,
        site_arc1: VSE::SiteEvent<I, F>,
        site_arc2: VSE::SiteEvent<I, F>,
        site_event: VSE::SiteEvent<I, F>,
        position: usize,
        output: &mut VD::Diagram<I, F>,
    ) -> Result<VB::BeachLineIndex, BvError> {
        tln!(
            "->insert_new_arc(\n  site_arc1:{:?}\n  ,site_arc2:{:?}\n  ,site_event:{:?}",
            site_arc1,
            site_arc2,
            site_event
        );
        // Create two new bisectors with opposite directions.
        let new_left_node = VB::BeachLineNodeKey::<I, F>::new_2(site_arc1, site_event);
        let new_right_node =
            // Set correct orientation for the first site of the second node.
            if site_event.is_segment() {
                VB::BeachLineNodeKey::<I, F>::new_2(*site_event.clone().inverse(), site_arc2)
            } else {
                VB::BeachLineNodeKey::<I, F>::new_2(site_event, site_arc2)
            };

        tln!("new bl key:{:?}", new_right_node);
        // Update the output.
        let edges = output._insert_new_edge_2(site_arc2, site_event);

        #[cfg(not(feature = "console_debug"))]
        let _ = self.beach_line_.insert(
            position,
            new_right_node,
            Some(VB::BeachLineNodeData::new_1(edges.1)),
        );
        #[cfg(feature = "console_debug")]
        let _ = self.beach_line_.insert(
            position,
            new_right_node,
            VB::BeachLineNodeData::new_1(edges.1),
            &self.circle_events_,
        )?;

        #[cfg(feature = "console_debug")]
        {
            self.beach_line_.dbgpa_compat_(&self.circle_events_)?;
            self.beach_line_.dbgp_all_cmp_();
            println!();
        }
        if site_event.is_segment() {
            // Update the beach line with temporary bisector, that will
            // disappear after processing site event corresponding to the
            // second endpoint of the segment site.
            let new_node =
                VB::BeachLineNodeKey::<I, F>::new_2(site_event, *site_event.clone().inverse());

            #[cfg(feature = "console_debug")]
            let (_, index) = self.beach_line_.insert_2(new_node, &self.circle_events_)?;
            #[cfg(not(feature = "console_debug"))]
            let (_, index) = self.beach_line_.insert_2(new_node)?;

            #[cfg(feature = "console_debug")]
            {
                self.beach_line_.dbgpa_compat_(&self.circle_events_)?;
                self.beach_line_.dbgp_all_cmp_();
                println!();
            }
            // Update the data structure that holds temporary bisectors.
            self.end_points_
                .push(VEP::EndPointPair::new(*site_event.point1(), index));
        }
        let new_node_data = VB::BeachLineNodeData::new_1(edges.0);

        #[cfg(not(feature = "console_debug"))]
        {
            Ok(self
                .beach_line_
                .insert(position, new_left_node, Some(new_node_data))?
                .1)
        }
        #[cfg(feature = "console_debug")]
        {
            let rv = Ok(self
                .beach_line_
                .insert(position, new_left_node, new_node_data, &self.circle_events_)?
                .1);
            self.beach_line_.dbgpa_compat_(&self.circle_events_)?;
            self.beach_line_.dbgp_all_cmp_();
            println!();
            rv
        }
    }
/// Insert new nodes into the beach line. Update the output.
Insert new nodes into the beach line. Update the output.
Insert new nodes into the beach line . Update the output .
fn insert_new_arc(
        &mut self,
        site_arc1: VSE::SiteEvent<I, F>,
        site_arc2: VSE::SiteEvent<I, F>,
        site_event: VSE::SiteEvent<I, F>,
        position: usize,
        output: &mut VD::Diagram<I, F>,
    ) -> Result<VB::BeachLineIndex, BvError> {
        tln!(
            "->insert_new_arc(\n  site_arc1:{:?}\n  ,site_arc2:{:?}\n  ,site_event:{:?}",
            site_arc1,
            site_arc2,
            site_event
        );
        // Create two new bisectors with opposite directions.
        let new_left_node = VB::BeachLineNodeKey::<I, F>::new_2(site_arc1, site_event);
        let new_right_node =
            // Set correct orientation for the first site of the second node.
            if site_event.is_segment() {
                VB::BeachLineNodeKey::<I, F>::new_2(*site_event.clone().inverse(), site_arc2)
            } else {
                VB::BeachLineNodeKey::<I, F>::new_2(site_event, site_arc2)
            };
        tln!("new bl key:{:?}", new_right_node);
        // Update the output.
        let edges = output._insert_new_edge_2(site_arc2, site_event);
        #[cfg(not(feature = "console_debug"))]
        let _ = self.beach_line_.insert(
            position,
            new_right_node,
            Some(VB::BeachLineNodeData::new_1(edges.1)),
        );
        #[cfg(feature = "console_debug")]
        let _ = self.beach_line_.insert(
            position,
            new_right_node,
            VB::BeachLineNodeData::new_1(edges.1),
            &self.circle_events_,
        )?;
        #[cfg(feature = "console_debug")]
        {
            self.beach_line_.dbgpa_compat_(&self.circle_events_)?;
            self.beach_line_.dbgp_all_cmp_();
            println!();
        }
        if site_event.is_segment() {
            // Update the beach line with temporary bisector, that will
            // disappear after processing site event corresponding to the
            // second endpoint of the segment site.
            let new_node =
                VB::BeachLineNodeKey::<I, F>::new_2(site_event, *site_event.clone().inverse());
            #[cfg(feature = "console_debug")]
            let (_, index) = self.beach_line_.insert_2(new_node, &self.circle_events_)?;
            #[cfg(not(feature = "console_debug"))]
            let (_, index) = self.beach_line_.insert_2(new_node)?;
            #[cfg(feature = "console_debug")]
            {
                self.beach_line_.dbgpa_compat_(&self.circle_events_)?;
                self.beach_line_.dbgp_all_cmp_();
                println!();
            }
            // Update the data structure that holds temporary bisectors.
            self.end_points_
                .push(VEP::EndPointPair::new(*site_event.point1(), index));
        }
        let new_node_data = VB::BeachLineNodeData::new_1(edges.0);
        #[cfg(not(feature = "console_debug"))]
        {
            Ok(self
                .beach_line_
                .insert(position, new_left_node, Some(new_node_data))?
                .1)
        }
        #[cfg(feature = "console_debug")]
        {
            let rv = Ok(self
                .beach_line_
                .insert(position, new_left_node, new_node_data, &self.circle_events_)?
                .1);
            self.beach_line_.dbgpa_compat_(&self.circle_events_)?;
            self.beach_line_.dbgp_all_cmp_();
            println!();
            rv
        }
    }
fn insert_new_arc ( & mut self , site_arc1 : VSE :: SiteEvent < I , F > , site_arc2 : VSE :: SiteEvent < I , F > , site_event : VSE :: SiteEvent < I , F > , position : usize , output : & mut VD :: Diagram < I , F > , ) -> Result < VB :: BeachLineIndex , BvError > { tln ! ( " \n \n \n " site_arc1 site_arc2 site_event ) ; // Create two new bisectors with opposite directions. let new_left_node = VB :: BeachLineNodeKey :: < I , F > :: new_2 ( site_arc1 , site_event ) ; let new_right_node = // Set correct orientation for the first site of the second node. if site_event . is_segment ( ) { VB :: BeachLineNodeKey :: < I , F > :: new_2 ( * site_event . clone ( ) . inverse ( ) , site_arc2 ) } else { VB :: BeachLineNodeKey :: < I , F > :: new_2 ( site_event , site_arc2 ) } ; tln ! ( " " new_right_node ) ; // Update the output. let edges = output . _insert_new_edge_2 ( site_arc2 , site_event ) ; # [ cfg ( not ( feature " " ) ) ] let _ = self . beach_line_ . insert ( position , new_right_node , Some ( VB :: BeachLineNodeData :: new_1 ( edges . 1 ) ) , ) ; # [ cfg ( feature " " ) ] let _ = self . beach_line_ . insert ( position , new_right_node , VB :: BeachLineNodeData :: new_1 ( edges . 1 ) , & self . circle_events_ , ) ? ; # [ cfg ( feature " " ) ] { self . beach_line_ . dbgpa_compat_ ( & self . circle_events_ ) ? ; self . beach_line_ . dbgp_all_cmp_ ( ) ; println ! ( ) ; } if site_event . is_segment ( ) { // Update the beach line with temporary bisector, that will // disappear after processing site event corresponding to the // second endpoint of the segment site. let new_node = VB :: BeachLineNodeKey :: < I , F > :: new_2 ( site_event , * site_event . clone ( ) . inverse ( ) ) ; # [ cfg ( feature " " ) ] let ( _ , index ) = self . beach_line_ . insert_2 ( new_node , & self . circle_events_ ) ? ; # [ cfg ( not ( feature " " ) ) ] let ( _ , index ) = self . beach_line_ . insert_2 ( new_node ) ? ; # [ cfg ( feature " " ) ] { self . beach_line_ . dbgpa_compat_ ( & self . circle_events_ ) ? ; self . beach_line_ . dbgp_all_cmp_ ( ) ; println ! ( ) ; } // Update the data structure that holds temporary bisectors. self . end_points_ . push ( VEP :: EndPointPair :: new ( * site_event . point1 ( ) , index ) ) ; } let new_node_data = VB :: BeachLineNodeData :: new_1 ( edges . 0 ) ; # [ cfg ( not ( feature " " ) ) ] { Ok ( self . beach_line_ . insert ( position , new_left_node , Some ( new_node_data ) ) ? . 1 ) } # [ cfg ( feature " " ) ] { let rv = Ok ( self . beach_line_ . insert ( position , new_left_node , new_node_data , & self . circle_events_ ) ? . 1 ) ; self . beach_line_ . dbgpa_compat_ ( & self . circle_events_ ) ? ; self . beach_line_ . dbgp_all_cmp_ ( ) ; println ! ( ) ; rv } }
Insert new nodes into the beach line.
Insert new nodes into the beach line .
&mut self
site_arc1
VSE::SiteEvent<I, F>
site_arc2
VSE::SiteEvent<I, F>
site_event
VSE::SiteEvent<I, F>
position
usize
output
&mut VD::Diagram<I, F>