mirror of https://github.com/CGAL/cgal
Misc minor fixes
This commit is contained in:
parent
114db88652
commit
fd627e141c
|
|
@ -666,7 +666,7 @@ private :
|
|||
return K().construct_segment_2_object()(s,t);
|
||||
}
|
||||
|
||||
template <typename GT> // actually just equal to 'Traits', but gotta template for SFINAE to work
|
||||
template <typename GT> // this is 'Traits', but templating is required for SFINAE
|
||||
Segment_2 CreateSegment ( Halfedge_const_handle aH,
|
||||
std::enable_if_t<
|
||||
! CGAL_SS_i::has_Segment_2_with_ID<GT>::value>* = nullptr ) const
|
||||
|
|
@ -674,7 +674,7 @@ private :
|
|||
return Segment_2(CreateRawSegment(aH)) ;
|
||||
}
|
||||
|
||||
template <typename GT> // actually just equal to 'Traits', but gotta template for SFINAE to work
|
||||
template <typename GT> // this is 'Traits', but templating is required for SFINAE
|
||||
Segment_2 CreateSegment ( Halfedge_const_handle aH,
|
||||
std::enable_if_t<
|
||||
CGAL_SS_i::has_Segment_2_with_ID<GT>::value>* = nullptr ) const
|
||||
|
|
|
|||
|
|
@ -556,7 +556,7 @@ public:
|
|||
Segment_2 s1(lPrev->point(), aNode->point());
|
||||
Segment_2 s2(aNode->point(), lNext->point());
|
||||
|
||||
// @todo? These are not input segments, but it might still worth caching (just gotta assign them an ID)
|
||||
// @todo? These are not input segments, but it might still worth caching (but they need an ID)
|
||||
boost::optional< Line_2 > l1 = CGAL_SS_i::compute_normalized_line_ceoffC2(s1);
|
||||
boost::optional< Line_2 > l2 = CGAL_SS_i::compute_normalized_line_ceoffC2(s2);
|
||||
|
||||
|
|
|
|||
|
|
@ -192,8 +192,10 @@ boost::optional< Line_2<K> > compute_normalized_line_ceoffC2( Segment_2<K> const
|
|||
<< "\na="<< n2str(a) << "\nb=" << n2str(b) << "\nc=" << n2str(c)
|
||||
) ;
|
||||
}
|
||||
else finite = false ;
|
||||
|
||||
else
|
||||
{
|
||||
finite = false ;
|
||||
}
|
||||
}
|
||||
|
||||
if ( finite )
|
||||
|
|
@ -507,11 +509,11 @@ compute_degenerate_offset_lines_isec_timeC2 ( boost::intrusive_ptr< Trisegment_2
|
|||
// B1(t) = [x(t),y(t)]
|
||||
//
|
||||
// (3)
|
||||
// These two bisecting lines B0(t) and B1(t) intersect (if they do) in a single point 'p' whose distance
|
||||
// These two bisecting lines B0(t) and B1(t) intersect (if they do) in a single point 'r' whose distance
|
||||
// to the lines supporting the 3 edges is exactly 't' (since those expressions are precisely parametrized in a distance)
|
||||
// Solving the following vectorial equation:
|
||||
//
|
||||
// [x(y),y(t)] = q + t*[l0.a,l0.b]
|
||||
// [x(y),y(t)] = p + t*[l0.a,l0.b]
|
||||
//
|
||||
// for t gives the result we want.
|
||||
//
|
||||
|
|
@ -750,7 +752,6 @@ construct_degenerate_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2<K,
|
|||
const FT& l2b = l2->b() ;
|
||||
const FT& l2c = l2->c() ;
|
||||
|
||||
// @todo check if the weight is not simply 1
|
||||
// the l0 speed is inverted for the orthogonal line (1 / (l0a^2 + l0b^2))
|
||||
FT sq_l0_norm_den = FT(1) / (square(l0a) + square(l0b));
|
||||
l0a *= sq_l0_norm_den;
|
||||
|
|
@ -806,8 +807,6 @@ construct_degenerate_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2<K,
|
|||
x = ( l0b * (t - l2c) + l2b * lambda ) / den ;
|
||||
y = ( lambda - l0a * x ) / l0b ;
|
||||
|
||||
std::cout << "!!!!!!!!!!!!!!!!!! HERE" << std::endl;
|
||||
|
||||
ok = CGAL_NTS is_finite(x) && CGAL_NTS is_finite(y) ;
|
||||
}
|
||||
}
|
||||
|
|
@ -819,8 +818,6 @@ construct_degenerate_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2<K,
|
|||
y = ( l0a * (t - l2c) + l2a * lambda ) / den ;
|
||||
x = ( lambda - l0b * y ) / l0a ;
|
||||
|
||||
std::cout << "!!!!!!!!!!!!!!!!!! HERE 2222222222" << std::endl;
|
||||
|
||||
ok = CGAL_NTS is_finite(x) && CGAL_NTS is_finite(y) ;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
#include <CGAL/compute_outer_frame_margin.h>
|
||||
#include <CGAL/Straight_skeleton_builder_2.h>
|
||||
#include <CGAL/Polygon_with_holes_2.h>
|
||||
#include <CGAL/Straight_skeleton_2/Polygon_iterators.h>
|
||||
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Kernel_traits.h>
|
||||
|
||||
#include <boost/optional/optional.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
|
|
|||
|
|
@ -45,12 +45,9 @@ create_interior_weighted_straight_skeleton_2(const Polygon& poly_with_holes,
|
|||
k);
|
||||
}
|
||||
|
||||
// create_exterior_straight_skeleton_2() for polygon with holes is simply in create_straight_skeleton_2.h
|
||||
// create_exterior_weightd_straight_skeleton_2() for polygon with holes is simply in create_straight_skeleton_2.h
|
||||
// as the holes do not matter: call create_exterior_straight_skeleton_2 for each boundary (outer & holes).
|
||||
|
||||
// @fixme above should actually be a proper function that calls create_exterior_straight_skeleton_2
|
||||
// for all the boundaries (mind that holes do not need to be reversed).
|
||||
|
||||
} // end namespace CGAL
|
||||
|
||||
#endif // CGAL_STRAIGHT_SKELETON_BUILDER_2_H //
|
||||
|
|
|
|||
Loading…
Reference in New Issue