mirror of https://github.com/CGAL/cgal
Debug code cleaning
This commit is contained in:
parent
d212269196
commit
d609a64b0f
|
|
@ -304,7 +304,7 @@ void Straight_skeleton_builder_2<Gt,Ss,V>::CollectSplitEvents( Vertex_handle aNo
|
|||
}
|
||||
}
|
||||
|
||||
CGAL_STSKEL_BUILDER_TRACE(4, GetVertexData(aNode).mSplitEvents.size());
|
||||
CGAL_STSKEL_BUILDER_TRACE(4, "#Split Events=" << GetVertexData(aNode).mSplitEvents.size());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,28 +19,6 @@
|
|||
# include <CGAL/CORE_BigFloat.h>
|
||||
#endif
|
||||
|
||||
#if defined(CGAL_STRAIGHT_SKELETON_ENABLE_TRACE) \
|
||||
|| defined(CGAL_POLYGON_OFFSET_ENABLE_TRACE) \
|
||||
|| defined(CGAL_STRAIGHT_SKELETON_TRAITS_ENABLE_TRACE) \
|
||||
|| defined(CGAL_STRAIGHT_SKELETON_VALIDITY_ENABLE_TRACE)
|
||||
#
|
||||
# define CGAL_STSKEL_TRACE_ON
|
||||
bool sEnableTrace = true ;
|
||||
# define CGAL_STSKEL_ENABLE_TRACE sEnableTrace = true ;
|
||||
# define CGAL_STSKEL_DISABLE_TRACE sEnableTrace = false ;
|
||||
# include<string>
|
||||
# include<iostream>
|
||||
# include<sstream>
|
||||
# include<iomanip>
|
||||
# define CGAL_STSKEL_TRACE(m) \
|
||||
if ( sEnableTrace ) \
|
||||
{ \
|
||||
std::ostringstream ss ; \
|
||||
ss << std::setprecision(17) << m ; \
|
||||
std::string s = ss.str(); \
|
||||
Straight_skeleton_external_trace(s); \
|
||||
}
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
template<class T>
|
||||
|
|
@ -250,6 +228,28 @@ inline std::string newn2str( char const* name, VH const& v, Triedge const& aTrie
|
|||
return ss.str();
|
||||
}
|
||||
|
||||
#if defined(CGAL_STRAIGHT_SKELETON_ENABLE_TRACE) \
|
||||
|| defined(CGAL_POLYGON_OFFSET_ENABLE_TRACE) \
|
||||
|| defined(CGAL_STRAIGHT_SKELETON_TRAITS_ENABLE_TRACE) \
|
||||
|| defined(CGAL_STRAIGHT_SKELETON_VALIDITY_ENABLE_TRACE)
|
||||
#
|
||||
# define CGAL_STSKEL_TRACE_ON
|
||||
bool sEnableTrace = true ;
|
||||
# define CGAL_STSKEL_ENABLE_TRACE sEnableTrace = true ;
|
||||
# define CGAL_STSKEL_DISABLE_TRACE sEnableTrace = false ;
|
||||
# include<string>
|
||||
# include<iostream>
|
||||
# include<sstream>
|
||||
# include<iomanip>
|
||||
# define CGAL_STSKEL_TRACE(m) \
|
||||
if ( sEnableTrace ) \
|
||||
{ \
|
||||
std::ostringstream ss ; \
|
||||
ss << std::setprecision(17) << m ; \
|
||||
std::string s = ss.str(); \
|
||||
Straight_skeleton_external_trace(s); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CGAL_STRAIGHT_SKELETON_ENABLE_TRACE
|
||||
|
|
|
|||
|
|
@ -713,7 +713,7 @@ private :
|
|||
CreateSegment<Traits>(aTriedge.e2()),
|
||||
aTriedge.e2()->weight() );
|
||||
|
||||
CGAL_STSKEL_BUILDER_TRACE(5,"Trisegment for " << aTriedge << ":" << r ) ;
|
||||
CGAL_STSKEL_BUILDER_TRACE(5,"Trisegment for " << aTriedge << ":\n" << r ) ;
|
||||
|
||||
// Consecutive collinear segments must not have the same weight
|
||||
CGAL_assertion_code(if(r->collinearity() == TRISEGMENT_COLLINEARITY_01))
|
||||
|
|
|
|||
|
|
@ -695,6 +695,8 @@ public:
|
|||
|
||||
if ( lOptTime && lOptTime->to_nt() > *mApproximate_traits.mFilteringBound )
|
||||
{
|
||||
CGAL_STSKEL_TRAITS_TRACE("Ignoring potential split event");
|
||||
|
||||
// avoid filling the cache vectors with times of trisegments that will be removed
|
||||
reset_trisegment(tri->id());
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include <CGAL/license/Straight_skeleton_2.h>
|
||||
|
||||
#include <CGAL/Straight_skeleton_2/Straight_skeleton_aux.h>
|
||||
#include <CGAL/Straight_skeleton_2/debug.h>
|
||||
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ construct_offset_pointC2 ( typename K::FT const& t,
|
|||
CGAL_STSKEL_TRAITS_TRACE("Constructing offset point for t=" << t ) ;
|
||||
CGAL_STSKEL_TRAITS_TRACE("Edges e0=" << s2str(e0) << "w = " << w0 ) ;
|
||||
CGAL_STSKEL_TRAITS_TRACE(" e1=" << s2str(e1) << "w = " << w1 ) ;
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:" << tri ) ;
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri);
|
||||
|
||||
Optional_line_2 l0 = compute_normalized_line_coeffC2(e0, aCaches) ;
|
||||
Optional_line_2 l1 = compute_normalized_line_coeffC2(e1, aCaches) ;
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@ inexact_sqrt(const Lazy_exact_nt<NT>& lz)
|
|||
return inexact_sqrt(exact(lz));
|
||||
}
|
||||
|
||||
// Currently the norm can be inexact even when we are in the exact pipeline of the traits
|
||||
// if we use something like K = EPICK because there is no exact sqrt.
|
||||
// Currently the norm can be inexact even if we are in the exact pipeline of the traits.
|
||||
// For example, if we use something like K = EPICK, there is no exact sqrt in K::Exact_K.
|
||||
//
|
||||
// @todo Ideally, we could compute how much precision is required for the sqrt
|
||||
// given all possible operations that are performed in the SLS and the input values
|
||||
|
|
@ -412,7 +412,7 @@ compute_normal_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2<K, Segm
|
|||
typedef boost::optional<Line_2> Optional_line_2 ;
|
||||
|
||||
CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing normal offset lines isec time [" << typeid(FT).name() << "]") ;
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:" << tri );
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri);
|
||||
|
||||
FT num(0), den(0) ;
|
||||
|
||||
|
|
@ -609,7 +609,7 @@ compute_artifical_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2<K, Segment_2_with
|
|||
typedef boost::optional<Line_2> Optional_line_2 ;
|
||||
|
||||
CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing artificial isec time [" << typeid(FT).name() << "]");
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:" << tri ) ;
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri);
|
||||
|
||||
CGAL_precondition(tri->e0() == tri->e1());
|
||||
CGAL_precondition(bool(tri->child_l()));
|
||||
|
|
@ -682,7 +682,7 @@ compute_degenerate_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2<K,
|
|||
return compute_artifical_isec_timeC2(tri, aCaches) ;
|
||||
|
||||
CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing degenerate offset lines isec time [" << typeid(FT).name() << "]");
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:" << tri ) ;
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri);
|
||||
|
||||
// DETAILS:
|
||||
//
|
||||
|
|
@ -851,10 +851,7 @@ compute_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2<K, Segment_2_w
|
|||
CGAL_STSKEL_TRAITS_TRACE("compute_offset_lines_isec_timeC2(" << tri->id() << ") [" << typeid(FT).name() << "]" );
|
||||
|
||||
if ( aCaches.mTime_cache.IsCached(tri->id()) )
|
||||
{
|
||||
CGAL_STSKEL_TRAITS_TRACE("cached");
|
||||
return aCaches.mTime_cache.Get(tri->id()) ;
|
||||
}
|
||||
|
||||
CGAL_precondition ( tri->collinearity() != TRISEGMENT_COLLINEARITY_ALL ) ;
|
||||
|
||||
|
|
@ -890,7 +887,7 @@ construct_normal_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2<K, Segment
|
|||
typedef boost::optional<Line_2> Optional_line_2 ;
|
||||
|
||||
CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing normal offset lines isec point [" << typeid(FT).name() << "]");
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:" << tri ) ;
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri);
|
||||
|
||||
FT x(0), y(0) ;
|
||||
|
||||
|
|
@ -945,7 +942,7 @@ construct_artifical_isecC2 ( Trisegment_2_ptr< Trisegment_2<K, Segment_2_with_ID
|
|||
typedef typename K::Direction_2 Direction_2 ;
|
||||
|
||||
CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing artificial isec point [" << typeid(FT).name() << "]");
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:" << tri ) ;
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri);
|
||||
|
||||
CGAL_precondition(tri->e0() == tri->e1());
|
||||
CGAL_precondition(bool(tri->child_l()));
|
||||
|
|
@ -1011,7 +1008,7 @@ construct_degenerate_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2<K, Seg
|
|||
return construct_artifical_isecC2(tri, aCaches) ;
|
||||
|
||||
CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing degenerate offset lines isec point [" << typeid(FT).name() << "]");
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:" << tri ) ;
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri);
|
||||
|
||||
FT x(0),y(0) ;
|
||||
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ Uncertain<bool> exist_offset_lines_isec2 ( Trisegment_2_ptr< Trisegment_2<K, Seg
|
|||
Uncertain<bool> rResult = Uncertain<bool>::indeterminate();
|
||||
|
||||
CGAL_STSKEL_TRAITS_TRACE( "\n~~ Checking existence of an event [" << typeid(FT).name() << "]");
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:" << tri ) ;
|
||||
CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri);
|
||||
|
||||
if ( tri->collinearity() != TRISEGMENT_COLLINEARITY_ALL )
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue