mirror of https://github.com/CGAL/cgal
extra run of the script to remove tabs and trailing whitespaces
This commit is contained in:
parent
38789af55d
commit
fdb17cb3f1
|
|
@ -136,19 +136,19 @@ public:
|
|||
: public CGAL::cpp98::unary_function<Coefficient,Bigfloat_interval> {
|
||||
|
||||
Convert_to_bfi(Algebraic_kernel_d_1* kernel,
|
||||
Algebraic_real_1 alpha)
|
||||
: _m_kernel(kernel), _m_alpha(alpha) {}
|
||||
Algebraic_real_1 alpha)
|
||||
: _m_kernel(kernel), _m_alpha(alpha) {}
|
||||
|
||||
Bigfloat_interval operator() (Coefficient f) const {
|
||||
typename CGAL::Polynomial_traits_d<Coefficient>
|
||||
::template Rebind<Bigfloat_interval,1>::Other::Type f_bfi;
|
||||
|
||||
typename Algebraic_kernel_d_1::Approximate_relative_1 approx_alpha
|
||||
=_m_kernel->approximate_relative_1_object();
|
||||
typename Algebraic_kernel_d_1::Approximate_relative_1 approx_alpha
|
||||
=_m_kernel->approximate_relative_1_object();
|
||||
|
||||
typedef typename Algebraic_kernel_d_1::Bound Bound;
|
||||
typedef typename Algebraic_kernel_d_1::Bound Bound;
|
||||
|
||||
Bigfloat_interval alpha_bfi, f_alpha_bfi;
|
||||
Bigfloat_interval alpha_bfi, f_alpha_bfi;
|
||||
|
||||
long p = CGAL::get_precision(Bigfloat_interval());
|
||||
|
||||
|
|
@ -156,19 +156,19 @@ public:
|
|||
|
||||
long wbit = 0;
|
||||
|
||||
while(true) {
|
||||
while(true) {
|
||||
CGAL::set_precision(Bigfloat_interval(),prec);
|
||||
|
||||
f_bfi = this->_convert_polynomial_to_bfi(f);
|
||||
|
||||
std::pair<Bound,Bound> alpha_bounds
|
||||
= approx_alpha(_m_alpha,prec);
|
||||
std::pair<Bound,Bound> alpha_bounds
|
||||
= approx_alpha(_m_alpha,prec);
|
||||
|
||||
alpha_bfi = CGAL::hull
|
||||
(CGAL::convert_to_bfi(alpha_bounds.first),
|
||||
CGAL::convert_to_bfi(alpha_bounds.second));
|
||||
alpha_bfi = CGAL::hull
|
||||
(CGAL::convert_to_bfi(alpha_bounds.first),
|
||||
CGAL::convert_to_bfi(alpha_bounds.second));
|
||||
|
||||
f_alpha_bfi = f_bfi.evaluate(alpha_bfi);
|
||||
f_alpha_bfi = f_bfi.evaluate(alpha_bfi);
|
||||
|
||||
if(!CGAL::singleton(f_alpha_bfi)) {
|
||||
long ceil = CGAL::internal::ceil_log2_abs(f_alpha_bfi);
|
||||
|
|
|
|||
|
|
@ -229,8 +229,8 @@ template < class FT >
|
|||
CGAL_KERNEL_INLINE
|
||||
void
|
||||
bisector_of_pointsC2(const FT &px, const FT &py,
|
||||
const FT &qx, const FT &qy,
|
||||
FT &a, FT &b, FT& c )
|
||||
const FT &qx, const FT &qy,
|
||||
FT &a, FT &b, FT& c )
|
||||
{
|
||||
a = 2 * (px - qx);
|
||||
b = 2 * (py - qy);
|
||||
|
|
@ -242,8 +242,8 @@ template < class FT >
|
|||
CGAL_KERNEL_INLINE
|
||||
void
|
||||
bisector_of_linesC2(const FT &pa, const FT &pb, const FT &pc,
|
||||
const FT &qa, const FT &qb, const FT &qc,
|
||||
FT &a, FT &b, FT &c)
|
||||
const FT &qa, const FT &qb, const FT &qc,
|
||||
FT &a, FT &b, FT &c)
|
||||
{
|
||||
// We normalize the equations of the 2 lines, and we then add them.
|
||||
FT n1 = CGAL_NTS sqrt(CGAL_NTS square(pa) + CGAL_NTS square(pb));
|
||||
|
|
@ -296,8 +296,8 @@ template < class FT >
|
|||
inline
|
||||
void
|
||||
perpendicular_through_pointC2(const FT &la, const FT &lb,
|
||||
const FT &px, const FT &py,
|
||||
FT &a, FT &b, FT &c)
|
||||
const FT &px, const FT &py,
|
||||
FT &a, FT &b, FT &c)
|
||||
{
|
||||
a = -lb;
|
||||
b = la;
|
||||
|
|
@ -308,8 +308,8 @@ template < class FT >
|
|||
CGAL_KERNEL_MEDIUM_INLINE
|
||||
void
|
||||
line_project_pointC2(const FT &la, const FT &lb, const FT &lc,
|
||||
const FT &px, const FT &py,
|
||||
FT &x, FT &y)
|
||||
const FT &px, const FT &py,
|
||||
FT &x, FT &y)
|
||||
{
|
||||
if (certainly(is_zero(la))) // horizontal line
|
||||
{
|
||||
|
|
|
|||
|
|
@ -174,9 +174,9 @@ Vertex_handle new_vertex(const Point& p)
|
|||
|
||||
void link_as_target_and_append(Vertex_handle v, Halfedge_handle e)
|
||||
{ CGAL_NEF_TRACEN(" link as target and append "
|
||||
<< e->source()->point() << "->"
|
||||
<< v->point());
|
||||
G.link_as_target_and_append(v,e); }
|
||||
<< e->source()->point() << "->"
|
||||
<< v->point());
|
||||
G.link_as_target_and_append(v,e); }
|
||||
|
||||
Halfedge_handle new_halfedge_pair_at_source(Vertex_handle v)
|
||||
{ CGAL_NEF_TRACEN(" new halfedge pair at source " << v->point());
|
||||
|
|
@ -235,13 +235,13 @@ void starting_segment(Vertex_handle v, IT it) const
|
|||
if(se->source()->point() != v->point()) {
|
||||
se = se->twin();
|
||||
if(se->source()->point() != v->point()) {
|
||||
G.supp_object(v,si._from) = si._o;
|
||||
return;
|
||||
G.supp_object(v,si._from) = si._o;
|
||||
return;
|
||||
}
|
||||
}
|
||||
G.supp_object(v,si._from) = make_object(se->source());
|
||||
CGAL_NEF_TRACEN("starting_segment " << si._from << ":"<<
|
||||
v->point() << " " << se->source()->point());
|
||||
v->point() << " " << se->source()->point());
|
||||
} else if(CGAL::assign(sl, si._o)) {
|
||||
G.supp_object(v,si._from) = si._o;
|
||||
} else
|
||||
|
|
@ -258,15 +258,15 @@ void ending_segment(Vertex_handle v, IT it) const
|
|||
if(se->source()->point() != v->point()) {
|
||||
se = se->twin();
|
||||
if(se->source()->point() != v->point()) {
|
||||
G.supp_object(v,si._from) = si._o;
|
||||
return;
|
||||
G.supp_object(v,si._from) = si._o;
|
||||
return;
|
||||
}
|
||||
}
|
||||
G.supp_object(v,si._from) = make_object(se->source());
|
||||
CGAL_NEF_TRACEN("ending_segment " << si._from << ":"<<
|
||||
v->point() << ":" <<
|
||||
se->source()->point() << "->" <<
|
||||
se->twin()->source()->point());
|
||||
v->point() << ":" <<
|
||||
se->source()->point() << "->" <<
|
||||
se->twin()->source()->point());
|
||||
} else if(CGAL::assign(sl, si._o)) {
|
||||
G.supp_object(v,si._from) = si._o;
|
||||
} else
|
||||
|
|
@ -292,7 +292,7 @@ void assert_equal_marks(Vertex_handle v1, Vertex_handle v2) const
|
|||
CGAL_NEF_TRACEV(G.mark(v1,0));CGAL_NEF_TRACEV(G.mark(v1,1));
|
||||
CGAL_NEF_TRACEV(G.mark(v2,0));CGAL_NEF_TRACEV(G.mark(v2,1));
|
||||
CGAL_assertion(G.mark(v1,0)==G.mark(v2,0)&&
|
||||
G.mark(v1,1)==G.mark(v2,1)); }
|
||||
G.mark(v1,1)==G.mark(v2,1)); }
|
||||
void discard_info(Vertex_handle v) const
|
||||
{ G.discard_info(v); }
|
||||
|
||||
|
|
@ -301,7 +301,7 @@ void assert_equal_marks(Halfedge_handle e1, Halfedge_handle e2) const
|
|||
CGAL_USE(e1);
|
||||
CGAL_USE(e2);
|
||||
CGAL_assertion(G.mark(e1,0)==G.mark(e2,0) &&
|
||||
G.mark(e1,1)==G.mark(e2,1));
|
||||
G.mark(e1,1)==G.mark(e2,1));
|
||||
}
|
||||
|
||||
void discard_info(Halfedge_handle e) const
|
||||
|
|
@ -713,8 +713,8 @@ public:
|
|||
Sphere_segment segment(SM_const_decorator ,
|
||||
SHalfedge_const_handle e) const
|
||||
{ return K.construct_segment(e->source()->point(),
|
||||
e->target()->point(),
|
||||
e->circle()); }
|
||||
e->target()->point(),
|
||||
e->circle()); }
|
||||
|
||||
Sphere_segment trivial_segment(SM_const_decorator ,
|
||||
SVertex_const_handle v) const
|
||||
|
|
@ -762,12 +762,12 @@ public:
|
|||
and the two halfspheres incident to it.}*/
|
||||
|
||||
void subdivide(const Map* M0, const Map* M1,
|
||||
bool with_trivial_segments = false);
|
||||
bool with_trivial_segments = false);
|
||||
|
||||
template <typename Association>
|
||||
void subdivide(const Map* M0, const Map* M1,
|
||||
Association& A,
|
||||
bool with_trivial_segments = false);
|
||||
Association& A,
|
||||
bool with_trivial_segments = false);
|
||||
/*{\Mop constructs the overlay of the sphere maps |M0| and |M1| in
|
||||
|M|, where all objects (vertices, halfedges, faces) of |M| are
|
||||
\emph{enriched} by the marks of the supporting objects of the two
|
||||
|
|
@ -815,9 +815,9 @@ public:
|
|||
|
||||
template <typename Below_accessor, typename Halfsphere_geometry>
|
||||
void create_face_objects(SHalfedge_iterator e_start, SHalfedge_iterator e_end,
|
||||
SVertex_iterator v_start, SVertex_iterator v_end,
|
||||
const Below_accessor& D,
|
||||
const Halfsphere_geometry& SG);
|
||||
SVertex_iterator v_start, SVertex_iterator v_end,
|
||||
const Below_accessor& D,
|
||||
const Halfsphere_geometry& SG);
|
||||
|
||||
template <typename Below_accessor>
|
||||
void complete_face_support(SVertex_iterator v_start, SVertex_iterator v_end,
|
||||
|
|
@ -847,9 +847,9 @@ create_from_segments(Forward_iterator start, Forward_iterator end)
|
|||
CGAL_forall_iterators(it,L) From_input[it]=true;
|
||||
Seg_list L_pos,L_neg;
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From_input,
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From_input,
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
|
||||
typedef SMO_from_segs<Self,Seg_iterator> SM_output;
|
||||
typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
|
||||
|
|
@ -920,9 +920,9 @@ create_from_circles(Forward_iterator start, Forward_iterator end)
|
|||
CGAL_forall_iterators(it,L) From_input[it]=true;
|
||||
Seg_list L_pos,L_neg;
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From_input,
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From_input,
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
|
||||
typedef SMO_from_segs<Self,Seg_iterator> SM_output;
|
||||
typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
|
||||
|
|
@ -1082,15 +1082,15 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if((chsp&48)!=48)
|
||||
if(i.z() > 0) chsp|=16;
|
||||
else if(i.z() < 0) chsp|=32;
|
||||
} else if((chsp&51)!=51 && it->source().y()!=0) {
|
||||
} else if((chsp&51)!=51 && it->source().y()!=0) {
|
||||
Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(0,1,0));
|
||||
CGAL_NEF_TRACEN("intersection " << i);
|
||||
if(!it->has_on_after_intersection(i)) i=i.antipode();
|
||||
if((chsp&3)!=3)
|
||||
if(i.x() > 0) chsp|=1;
|
||||
else if(i.x() < 0) chsp|=2;
|
||||
if((chsp&48)!=48)
|
||||
if(i.z() > 0) chsp|=16;
|
||||
if((chsp&48)!=48)
|
||||
if(i.z() > 0) chsp|=16;
|
||||
else if(i.z() < 0) chsp|=32;
|
||||
} else if((chsp&15)!=15 && it->source().z()!=0) {
|
||||
Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(0,0,1));
|
||||
|
|
@ -1099,7 +1099,7 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if((chsp&3)!=3)
|
||||
if(i.x() > 0) chsp|=1;
|
||||
else if(i.x() < 0) chsp|=2;
|
||||
if((chsp&12)!=12)
|
||||
if((chsp&12)!=12)
|
||||
if(i.y() > 0) chsp|=4;
|
||||
else if(i.y() < 0) chsp|=8;
|
||||
}
|
||||
|
|
@ -1159,22 +1159,22 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
CGAL_forall_iterators(it,L) {
|
||||
if(!compute_halfsphere[0][0])
|
||||
if(it->source().hx()>0 || it->target().hx()>0)
|
||||
compute_halfsphere[0][0] = true;
|
||||
compute_halfsphere[0][0] = true;
|
||||
if(!compute_halfsphere[0][1])
|
||||
if(it->source().hx()<0 || it->target().hx()<0)
|
||||
compute_halfsphere[0][1] = true;
|
||||
compute_halfsphere[0][1] = true;
|
||||
if(!compute_halfsphere[1][0])
|
||||
if(it->source().hy()>0 || it->target().hy()>0)
|
||||
compute_halfsphere[1][0] = true;
|
||||
compute_halfsphere[1][0] = true;
|
||||
if(!compute_halfsphere[1][1])
|
||||
if(it->source().hy()<0 || it->target().hy()<0)
|
||||
compute_halfsphere[1][1] = true;
|
||||
compute_halfsphere[1][1] = true;
|
||||
if(!compute_halfsphere[2][0])
|
||||
if(it->source().hz()>0 || it->target().hz()>0)
|
||||
compute_halfsphere[2][0] = true;
|
||||
compute_halfsphere[2][0] = true;
|
||||
if(!compute_halfsphere[2][1])
|
||||
if(it->source().hz()<0 || it->target().hz()<0)
|
||||
compute_halfsphere[2][1] = true;
|
||||
compute_halfsphere[2][1] = true;
|
||||
}
|
||||
|
||||
CGAL_NEF_TRACEN("compute_halfsphere (after vertices)");
|
||||
|
|
@ -1186,8 +1186,8 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
CGAL_forall_iterators(it,L) {
|
||||
if((it->source().hz()==0 && it->target().hz()==0)
|
||||
|| it->is_long()) {
|
||||
compute_halfsphere[2][0] = true;
|
||||
break;
|
||||
compute_halfsphere[2][0] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1200,8 +1200,8 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if(!compute_halfsphere[2][1]) {
|
||||
CGAL_forall_iterators(it,L) {
|
||||
if(it->is_long() || (it->source().hz()==0 && it->target().hz()==0)) {
|
||||
compute_halfsphere[2][1] = true;
|
||||
break;
|
||||
compute_halfsphere[2][1] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1212,8 +1212,8 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if(!compute_halfsphere[0][0]) {
|
||||
CGAL_forall_iterators(it,L) {
|
||||
if((it->source().hx()==0 && it->target().hx()==0) || it->is_long()) {
|
||||
compute_halfsphere[0][0] = true;
|
||||
break;
|
||||
compute_halfsphere[0][0] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1226,8 +1226,8 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if(!compute_halfsphere[0][1]) {
|
||||
CGAL_forall_iterators(it,L) {
|
||||
if((it->source().hx()==0 && it->target().hx()==0) || it->is_long()) {
|
||||
compute_halfsphere[0][1] = true;
|
||||
break;
|
||||
compute_halfsphere[0][1] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1239,8 +1239,8 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if(!compute_halfsphere[1][0]) {
|
||||
CGAL_forall_iterators(it,L) {
|
||||
if((it->source().hy()==0 && it->target().hy()==0) || it->is_long()) {
|
||||
compute_halfsphere[1][0] = true;
|
||||
break;
|
||||
compute_halfsphere[1][0] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1253,8 +1253,8 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if(!compute_halfsphere[1][1]) {
|
||||
CGAL_forall_iterators(it,L) {
|
||||
if((it->source().hy()==0 && it->target().hy()==0) || it->is_long()) {
|
||||
compute_halfsphere[1][1] = true;
|
||||
break;
|
||||
compute_halfsphere[1][1] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1280,7 +1280,7 @@ create(const Sphere_circle& c)
|
|||
template <typename Map>
|
||||
void SM_overlayer<Map>::
|
||||
subdivide(const Map* M0, const Map* M1,
|
||||
bool with_trivial_segments) {
|
||||
bool with_trivial_segments) {
|
||||
PI[0] = SM_const_decorator(M0);
|
||||
PI[1] = SM_const_decorator(M1);
|
||||
bool compute_halfsphere[3][2];
|
||||
|
|
@ -1301,20 +1301,20 @@ subdivide(const Map* M0, const Map* M1,
|
|||
CGAL_forall_sedges(e,PI[i]) {
|
||||
if ( e->source() == e->target() ) {
|
||||
if(with_trivial_segments) {
|
||||
CGAL_NEF_TRACEN("trivial segment " << e->source()->point());
|
||||
CGAL_NEF_TRACEN("trivial segment " << e->source()->point());
|
||||
v = e->source();
|
||||
L.push_back(trivial_segment(PI[i],v));
|
||||
From[--L.end()] = Seg_info(v,i);
|
||||
} else {
|
||||
CGAL_NEF_TRACEN("once around " << e->source()->point());
|
||||
CGAL_NEF_TRACEN("once around " << e->source()->point());
|
||||
Seg_pair p = two_segments(PI[i],e);
|
||||
L.push_back(p.first);
|
||||
L.push_back(p.second);
|
||||
From[--L.end()] = From[--(--L.end())] = Seg_info(e,i);
|
||||
}
|
||||
} else {
|
||||
CGAL_NEF_TRACEN("normal segment " << e->source()->point()
|
||||
<< "->" << e->twin()->source()->point());
|
||||
CGAL_NEF_TRACEN("normal segment " << e->source()->point()
|
||||
<< "->" << e->twin()->source()->point());
|
||||
L.push_back(segment(PI[i],e));
|
||||
From[--L.end()] = Seg_info(e,i);
|
||||
}
|
||||
|
|
@ -1350,39 +1350,39 @@ subdivide(const Map* M0, const Map* M1,
|
|||
switch(cs) {
|
||||
case 1:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][1]);
|
||||
Sphere_circle(1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][1]);
|
||||
break;
|
||||
case 0:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(-1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][0]);
|
||||
Sphere_circle(-1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][0]);
|
||||
break;
|
||||
case 3:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(0,1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][1]);
|
||||
Sphere_circle(0,1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][1]);
|
||||
break;
|
||||
case 2:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(0,-1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][0]);
|
||||
Sphere_circle(0,-1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][0]);
|
||||
break;
|
||||
case 5:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][1]);
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][1]);
|
||||
break;
|
||||
case 4:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][0]);
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][0]);
|
||||
break;
|
||||
case -1:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
break;
|
||||
default: CGAL_error_msg( "wrong value");
|
||||
}
|
||||
|
|
@ -1414,7 +1414,7 @@ subdivide(const Map* M0, const Map* M1,
|
|||
if(compute_halfsphere[cs][0]) {
|
||||
PH_geometry phg(cs);
|
||||
Positive_halfsphere_sweep SP(
|
||||
Input_range(L_pos.begin(),L_pos.end()),O,phg);
|
||||
Input_range(L_pos.begin(),L_pos.end()),O,phg);
|
||||
SP.sweep();
|
||||
v=--this->svertices_end(); e=--this->shalfedges_end();
|
||||
#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
|
||||
|
|
@ -1451,7 +1451,7 @@ subdivide(const Map* M0, const Map* M1,
|
|||
PH_geometry(cs));
|
||||
if(compute_halfsphere[cs][1])
|
||||
create_face_objects(e, this->shalfedges_end(), v, this->svertices_end(), O,
|
||||
NH_geometry(cs));
|
||||
NH_geometry(cs));
|
||||
|
||||
CGAL_forall_sedges(e,*this) {
|
||||
e->circle() = Sphere_circle(e->source()->point(), e->twin()->source()->point());
|
||||
|
|
@ -1472,8 +1472,8 @@ subdivide(const Map* M0, const Map* M1,
|
|||
CGAL_NEF_TRACEN("mohs[3]=" << mohs[3]);
|
||||
|
||||
CGAL_NEF_TRACEN("compute_halfsphrere\n cs = " << cs <<
|
||||
"\n [cs][0] = " << compute_halfsphere[cs][0] <<
|
||||
"\n [cs][1] = " << compute_halfsphere[cs][1]);
|
||||
"\n [cs][0] = " << compute_halfsphere[cs][0] <<
|
||||
"\n [cs][1] = " << compute_halfsphere[cs][1]);
|
||||
/*
|
||||
SVertex_iterator svii;
|
||||
CGAL_forall_svertices(svii, *this) {
|
||||
|
|
@ -1495,10 +1495,10 @@ subdivide(const Map* M0, const Map* M1,
|
|||
*/
|
||||
if(compute_halfsphere[cs][0])
|
||||
complete_face_support(this->svertices_begin(), v, O, mohs, 0,
|
||||
compute_halfsphere[cs][1]);
|
||||
compute_halfsphere[cs][1]);
|
||||
if(compute_halfsphere[cs][1])
|
||||
complete_face_support(v, this->svertices_end(), O, mohs, 1,
|
||||
compute_halfsphere[cs][0]);
|
||||
compute_halfsphere[cs][0]);
|
||||
|
||||
complete_sface_marks();
|
||||
|
||||
|
|
@ -1533,8 +1533,8 @@ template <typename Map>
|
|||
template <typename Association>
|
||||
void SM_overlayer<Map>::
|
||||
subdivide(const Map* M0, const Map* M1,
|
||||
Association& A,
|
||||
bool with_trivial_segments)
|
||||
Association& A,
|
||||
bool with_trivial_segments)
|
||||
{
|
||||
PI[0] = SM_const_decorator(M0);
|
||||
PI[1] = SM_const_decorator(M1);
|
||||
|
|
@ -1557,19 +1557,19 @@ subdivide(const Map* M0, const Map* M1,
|
|||
CGAL_forall_sedges(e,PI[i]) {
|
||||
if ( e->source() == e->target() ) {
|
||||
if(with_trivial_segments) {
|
||||
CGAL_NEF_TRACEN("trivial segment " << e->source()->point());
|
||||
CGAL_NEF_TRACEN("trivial segment " << e->source()->point());
|
||||
v = e->source();
|
||||
L.push_back(trivial_segment(PI[i],v));
|
||||
From[--L.end()] = Seg_info(v,i);
|
||||
} else {
|
||||
CGAL_NEF_TRACEN("once around " << e->source()->point());
|
||||
CGAL_NEF_TRACEN("once around " << e->source()->point());
|
||||
Seg_pair p = two_segments(PI[i],e);
|
||||
L.push_back(p.first);
|
||||
L.push_back(p.second);
|
||||
From[--L.end()] = From[--(--L.end())] = Seg_info(e,i);
|
||||
}
|
||||
} else {
|
||||
CGAL_NEF_TRACEN("normal segment " << e->source()->point());
|
||||
CGAL_NEF_TRACEN("normal segment " << e->source()->point());
|
||||
L.push_back(segment(PI[i],e));
|
||||
From[--L.end()] = Seg_info(e,i);
|
||||
}
|
||||
|
|
@ -1607,39 +1607,39 @@ subdivide(const Map* M0, const Map* M1,
|
|||
switch(cs) {
|
||||
case 1:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][1]);
|
||||
Sphere_circle(1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][1]);
|
||||
break;
|
||||
case 0:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(-1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][0]);
|
||||
Sphere_circle(-1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][0]);
|
||||
break;
|
||||
case 3:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(0,1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][1]);
|
||||
Sphere_circle(0,1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][1]);
|
||||
break;
|
||||
case 2:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(0,-1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][0]);
|
||||
Sphere_circle(0,-1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][0]);
|
||||
break;
|
||||
case 5:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][1]);
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][1]);
|
||||
break;
|
||||
case 4:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][0]);
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][0]);
|
||||
break;
|
||||
case -1:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
break;
|
||||
default: CGAL_error_msg( "wrong value");
|
||||
}
|
||||
|
|
@ -1678,20 +1678,20 @@ subdivide(const Map* M0, const Map* M1,
|
|||
for(Seg_iterator it=L_pos.begin(); it!=L_pos.end();++it) {
|
||||
CGAL_NEF_TRACEN("pos " << *it);
|
||||
if(phg.compare_xy(it->target(),it->source())<0) {
|
||||
Object_handle o = From[it]._o;
|
||||
if(CGAL::assign(se, o)) {
|
||||
if(it->sphere_circle() == se->circle())
|
||||
From[it] = Seg_info(se->twin(), From[it]._from);
|
||||
} else if(CGAL::assign(sl, o)) {
|
||||
if(it->sphere_circle() == sl->circle())
|
||||
From[it] = Seg_info(sl->twin(), From[it]._from);
|
||||
}
|
||||
Object_handle o = From[it]._o;
|
||||
if(CGAL::assign(se, o)) {
|
||||
if(it->sphere_circle() == se->circle())
|
||||
From[it] = Seg_info(se->twin(), From[it]._from);
|
||||
} else if(CGAL::assign(sl, o)) {
|
||||
if(it->sphere_circle() == sl->circle())
|
||||
From[it] = Seg_info(sl->twin(), From[it]._from);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
Positive_halfsphere_sweep SP(
|
||||
Input_range(L_pos.begin(),L_pos.end()),O,phg);
|
||||
Input_range(L_pos.begin(),L_pos.end()),O,phg);
|
||||
SP.sweep();
|
||||
v=--this->svertices_end(); e=--this->shalfedges_end();
|
||||
#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
|
||||
|
|
@ -1708,14 +1708,14 @@ subdivide(const Map* M0, const Map* M1,
|
|||
for(Seg_iterator it=L_neg.begin(); it!=L_neg.end();++it) {
|
||||
CGAL_NEF_TRACEN("neg " << *it);
|
||||
if(nhg.compare_xy(it->target(),it->source())<0) {
|
||||
Object_handle o = From[it]._o;
|
||||
if(CGAL::assign(se, o)) {
|
||||
if(it->sphere_circle() == se->circle())
|
||||
From[it] = Seg_info(se->twin(), From[it]._from);
|
||||
} else if(CGAL::assign(sl, o)) {
|
||||
if(it->sphere_circle() == sl->circle())
|
||||
From[it] = Seg_info(sl->twin(), From[it]._from);
|
||||
}
|
||||
Object_handle o = From[it]._o;
|
||||
if(CGAL::assign(se, o)) {
|
||||
if(it->sphere_circle() == se->circle())
|
||||
From[it] = Seg_info(se->twin(), From[it]._from);
|
||||
} else if(CGAL::assign(sl, o)) {
|
||||
if(it->sphere_circle() == sl->circle())
|
||||
From[it] = Seg_info(sl->twin(), From[it]._from);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
@ -1747,7 +1747,7 @@ subdivide(const Map* M0, const Map* M1,
|
|||
PH_geometry(cs));
|
||||
if(compute_halfsphere[cs][1])
|
||||
create_face_objects(e, this->shalfedges_end(), v, this->svertices_end(), O,
|
||||
NH_geometry(cs));
|
||||
NH_geometry(cs));
|
||||
|
||||
CGAL_forall_sedges(e,*this) {
|
||||
e->circle() = Sphere_circle(e->source()->point(), e->twin()->source()->point());
|
||||
|
|
@ -1768,8 +1768,8 @@ subdivide(const Map* M0, const Map* M1,
|
|||
CGAL_NEF_TRACEN("mohs[3]=" << mohs[3]);
|
||||
|
||||
CGAL_NEF_TRACEN("compute_halfsphrere\n cs = " << cs <<
|
||||
"\n [cs][0] = " << compute_halfsphere[cs][0] <<
|
||||
"\n [cs][1] = " << compute_halfsphere[cs][1]);
|
||||
"\n [cs][0] = " << compute_halfsphere[cs][0] <<
|
||||
"\n [cs][1] = " << compute_halfsphere[cs][1]);
|
||||
/*
|
||||
SVertex_iterator svii;
|
||||
CGAL_forall_svertices(svii, *this) {
|
||||
|
|
@ -1791,10 +1791,10 @@ subdivide(const Map* M0, const Map* M1,
|
|||
*/
|
||||
if(compute_halfsphere[cs][0])
|
||||
complete_face_support(this->svertices_begin(), v, O, mohs, 0,
|
||||
compute_halfsphere[cs][1]);
|
||||
compute_halfsphere[cs][1]);
|
||||
if(compute_halfsphere[cs][1])
|
||||
complete_face_support(v, this->svertices_end(), O, mohs, 1,
|
||||
compute_halfsphere[cs][0]);
|
||||
compute_halfsphere[cs][0]);
|
||||
|
||||
complete_sface_marks();
|
||||
|
||||
|
|
@ -1845,40 +1845,40 @@ transfer_data(Association& A) {
|
|||
Object_handle o0 = supp_object(sv,0), o1 = supp_object(sv,1);
|
||||
if(o0.empty()) {
|
||||
if(CGAL::assign(sv1, o1))
|
||||
A.handle_support(sv, sv1);
|
||||
A.handle_support(sv, sv1);
|
||||
else
|
||||
continue;
|
||||
continue;
|
||||
} else if(CGAL::assign(se0, o0)) {
|
||||
if(o1.empty())
|
||||
continue;
|
||||
continue;
|
||||
else if(assign(se1, o1))
|
||||
A.handle_support(sv, se0, se1);
|
||||
A.handle_support(sv, se0, se1);
|
||||
else if(CGAL::assign(sv1, o1))
|
||||
A.handle_support(sv, se0, sv1);
|
||||
A.handle_support(sv, se0, sv1);
|
||||
else if(CGAL::assign(sl1, o1))
|
||||
A.handle_support(sv, se0, sl1);
|
||||
A.handle_support(sv, se0, sl1);
|
||||
else
|
||||
CGAL_error_msg( "wrong handle");
|
||||
CGAL_error_msg( "wrong handle");
|
||||
} else if(CGAL::assign(sv0, o0)) {
|
||||
if(o1.empty())
|
||||
A.handle_support(sv, sv0);
|
||||
A.handle_support(sv, sv0);
|
||||
else if(CGAL::assign(se1, o1))
|
||||
A.handle_support(sv, sv0, se1);
|
||||
A.handle_support(sv, sv0, se1);
|
||||
else if(CGAL::assign(sv1, o1))
|
||||
A.handle_support(sv, sv0, sv1);
|
||||
A.handle_support(sv, sv0, sv1);
|
||||
else if(CGAL::assign(sl1, o1))
|
||||
A.handle_support(sv, sv0, sl1);
|
||||
A.handle_support(sv, sv0, sl1);
|
||||
else
|
||||
CGAL_error_msg( "wrong handle");
|
||||
CGAL_error_msg( "wrong handle");
|
||||
} else if(CGAL::assign(sl0, o0)) {
|
||||
if(o1.empty())
|
||||
continue;
|
||||
continue;
|
||||
else if(CGAL::assign(sv1, o1))
|
||||
A.handle_support(sv, sl0, sv1);
|
||||
A.handle_support(sv, sl0, sv1);
|
||||
else if(CGAL::assign(se1, o1))
|
||||
A.handle_support(sv, sl0, se1);
|
||||
A.handle_support(sv, sl0, se1);
|
||||
else if(CGAL::assign(sl1, o1))
|
||||
A.handle_support(sv, sl0, sl1);
|
||||
A.handle_support(sv, sl0, sl1);
|
||||
} else
|
||||
CGAL_error_msg( "wrong handle");
|
||||
}
|
||||
|
|
@ -1888,29 +1888,29 @@ transfer_data(Association& A) {
|
|||
Object_handle o0 = supp_object(se,0), o1 = supp_object(se,1);
|
||||
if(o0.empty()) {
|
||||
if(assign(se1, o1))
|
||||
A.handle_support(se, se1);
|
||||
A.handle_support(se, se1);
|
||||
else if(assign(sl1, o1))
|
||||
A.handle_support(se, sl1);
|
||||
A.handle_support(se, sl1);
|
||||
else
|
||||
continue; // CGAL_error_msg( "wrong handle");
|
||||
continue; // CGAL_error_msg( "wrong handle");
|
||||
} else if(assign(se0, o0)) {
|
||||
if(o1.empty())
|
||||
A.handle_support(se, se0);
|
||||
A.handle_support(se, se0);
|
||||
else if(assign(se1, o1))
|
||||
A.handle_support(se, se0, se1);
|
||||
A.handle_support(se, se0, se1);
|
||||
else if(assign(sl1, o1))
|
||||
A.handle_support(se, se0, sl1);
|
||||
A.handle_support(se, se0, sl1);
|
||||
else
|
||||
CGAL_error_msg( "wrong handle");
|
||||
CGAL_error_msg( "wrong handle");
|
||||
} else if(assign(sl0, o0)) {
|
||||
if(o1.empty())
|
||||
A.handle_support(se, sl0);
|
||||
A.handle_support(se, sl0);
|
||||
else if(assign(se1, o1))
|
||||
A.handle_support(se, sl0, se1);
|
||||
A.handle_support(se, sl0, se1);
|
||||
else if(assign(sl1, o1))
|
||||
A.handle_support(se, sl0, sl1);
|
||||
A.handle_support(se, sl0, sl1);
|
||||
else
|
||||
CGAL_error_msg( "wrong handle");
|
||||
CGAL_error_msg( "wrong handle");
|
||||
} else
|
||||
CGAL_error_msg( "wrong handle");
|
||||
}
|
||||
|
|
@ -1942,9 +1942,9 @@ template <typename Map>
|
|||
template <typename Iterator, typename T>
|
||||
void SM_overlayer<Map>::
|
||||
partition_to_halfsphere(Iterator start, Iterator beyond, Seg_list& L,
|
||||
CGAL::Unique_hash_map<Iterator,T>& M,
|
||||
Sphere_circle xycircle, Sphere_circle yzcircle,
|
||||
bool include_equator) const
|
||||
CGAL::Unique_hash_map<Iterator,T>& M,
|
||||
Sphere_circle xycircle, Sphere_circle yzcircle,
|
||||
bool include_equator) const
|
||||
{ CGAL_NEF_TRACEN("partition_to_halfsphere ");
|
||||
// CGAL_assertion(pos!=0);
|
||||
Sphere_segment s1,s2;
|
||||
|
|
@ -1954,12 +1954,12 @@ partition_to_halfsphere(Iterator start, Iterator beyond, Seg_list& L,
|
|||
int i = start->intersection(xycircle,s1,s2);
|
||||
CGAL_NEF_TRACEN("segment " << start->source() << " " << start->target());
|
||||
if (i>1) {
|
||||
L.push_back(s2); M[--L.end()] = M[start];
|
||||
CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target());
|
||||
L.push_back(s2); M[--L.end()] = M[start];
|
||||
CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target());
|
||||
}
|
||||
if (i>0) {
|
||||
L.push_back(s1); M[--L.end()] = M[start];
|
||||
CGAL_NEF_TRACEN(">0 " << s1.source() << " " << s1.target());
|
||||
L.push_back(s1); M[--L.end()] = M[start];
|
||||
CGAL_NEF_TRACEN(">0 " << s1.source() << " " << s1.target());
|
||||
}
|
||||
++start;
|
||||
}
|
||||
|
|
@ -1987,28 +1987,28 @@ partition_to_halfsphere(Iterator start, Iterator beyond, Seg_list& L,
|
|||
bool added=false;
|
||||
int n1 = it->intersection(yzcircle,s1,s2);
|
||||
if (n1 > 1 && !s2.is_degenerate()) {
|
||||
M[ L.insert(it,s2) ] = M[it];
|
||||
added=true;
|
||||
CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target());
|
||||
M[ L.insert(it,s2) ] = M[it];
|
||||
added=true;
|
||||
CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target());
|
||||
}
|
||||
if (n1 > 0 && !s1.is_degenerate()) {
|
||||
M[ L.insert(it,s1) ] = M[it];
|
||||
added = true;
|
||||
CGAL_NEF_TRACEN(">1 " << s1.source() << " " << s1.target());
|
||||
M[ L.insert(it,s1) ] = M[it];
|
||||
added = true;
|
||||
CGAL_NEF_TRACEN(">1 " << s1.source() << " " << s1.target());
|
||||
}
|
||||
int n2 = it->intersection(yzcircle.opposite(),s1,s2);
|
||||
if (n2 > 1 && !s2.is_degenerate()) {
|
||||
M[ L.insert(it,s2) ] = M[it];
|
||||
added=true;
|
||||
CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target());
|
||||
M[ L.insert(it,s2) ] = M[it];
|
||||
added=true;
|
||||
CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target());
|
||||
}
|
||||
if (n2 > 0 && !s1.is_degenerate()) {
|
||||
M[ L.insert(it,s1) ] = M[it];
|
||||
added=true;
|
||||
CGAL_NEF_TRACEN(">1 " << s1.source() << " " << s1.target());
|
||||
M[ L.insert(it,s1) ] = M[it];
|
||||
added=true;
|
||||
CGAL_NEF_TRACEN(">1 " << s1.source() << " " << s1.target());
|
||||
}
|
||||
if(added) {
|
||||
itl = it; --it; M[itl] = T(); L.erase(itl);
|
||||
itl = it; --it; M[itl] = T(); L.erase(itl);
|
||||
}
|
||||
// at least one item was appended
|
||||
}
|
||||
|
|
@ -2062,16 +2062,16 @@ create_face_objects(SHalfedge_iterator e_start, SHalfedge_iterator e_end,
|
|||
CGAL_NEF_TRACEN("");
|
||||
CGAL_NEF_TRACEN(" face cycle numbering "<<i);
|
||||
CGAL_For_all(hfc,hend) {
|
||||
SFaceCycle[hfc]=i; // assign face cycle number
|
||||
if (hfc->twin()->source() == e_min->twin()->source()) {
|
||||
Sphere_point p1 = hfc->source()->point(),
|
||||
p2 = hfc->twin()->source()->point(),
|
||||
p3 = hfc->snext()->twin()->source()->point();
|
||||
if ( SG.orientation(p1,p2,p3) <= 0 )
|
||||
e_min = hfc;
|
||||
} else if ( SG.compare_xy(hfc->twin()->source()->point(), e_min->twin()->source()->point()) < 0 )
|
||||
e_min = hfc;
|
||||
CGAL_NEF_TRACEN(PH(hfc));
|
||||
SFaceCycle[hfc]=i; // assign face cycle number
|
||||
if (hfc->twin()->source() == e_min->twin()->source()) {
|
||||
Sphere_point p1 = hfc->source()->point(),
|
||||
p2 = hfc->twin()->source()->point(),
|
||||
p3 = hfc->snext()->twin()->source()->point();
|
||||
if ( SG.orientation(p1,p2,p3) <= 0 )
|
||||
e_min = hfc;
|
||||
} else if ( SG.compare_xy(hfc->twin()->source()->point(), e_min->twin()->source()->point()) < 0 )
|
||||
e_min = hfc;
|
||||
CGAL_NEF_TRACEN(PH(hfc));
|
||||
} CGAL_NEF_TRACEN("");
|
||||
MinimalSHalfedge.push_back(e_min);
|
||||
++i;
|
||||
|
|
@ -2081,12 +2081,12 @@ create_face_objects(SHalfedge_iterator e_start, SHalfedge_iterator e_end,
|
|||
SHalfedge_handle e = MinimalSHalfedge[j];
|
||||
CGAL_NEF_TRACEN(" face cycle "<<j<<" minimal halfedge "<<PH(e));
|
||||
Sphere_point p1 = e->source()->point(),
|
||||
p2 = e->twin()->source()->point(),
|
||||
p3 = e->snext()->twin()->source()->point();
|
||||
p2 = e->twin()->source()->point(),
|
||||
p3 = e->snext()->twin()->source()->point();
|
||||
if ( SG.orientation(p1,p2,p3) > 0 ) { // left_turn => outer face cycle
|
||||
SFace_handle f = this->new_sface();
|
||||
link_as_face_cycle(e,f);
|
||||
CGAL_NEF_TRACEN(" creating new face object "<<&*f<<" bd "<<&*e);
|
||||
SFace_handle f = this->new_sface();
|
||||
link_as_face_cycle(e,f);
|
||||
CGAL_NEF_TRACEN(" creating new face object "<<&*f<<" bd "<<&*e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2096,7 +2096,7 @@ create_face_objects(SHalfedge_iterator e_start, SHalfedge_iterator e_end,
|
|||
CGAL_NEF_TRACEN("linking hole "<<PH(e));
|
||||
SFace_handle f = determine_face(e,MinimalSHalfedge,SFaceCycle,D);
|
||||
if(f != SFace_handle())
|
||||
link_as_face_cycle(e,f);
|
||||
link_as_face_cycle(e,f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2122,52 +2122,52 @@ complete_face_support(SVertex_iterator v_start, SVertex_iterator v_end,
|
|||
SHalfedge_handle e_below = halfedge_below(v);
|
||||
if ( v == v_start ) {
|
||||
for (int i=0; i<2; ++i){
|
||||
m_buffer[i] = mohs[offset+2*i];
|
||||
m_buffer[i] = mohs[offset+2*i];
|
||||
}
|
||||
} else if ( e_below != SHalfedge_handle() ) {
|
||||
for (int i=0; i<2; ++i) {
|
||||
CGAL_NEF_TRACEN("edge below "<< PH(e_below) << " " << mark(e_below,i));
|
||||
m_buffer[i] = incident_mark(e_below,i);
|
||||
CGAL_NEF_TRACEN("edge below "<< PH(e_below) << " " << mark(e_below,i));
|
||||
m_buffer[i] = incident_mark(e_below,i);
|
||||
}
|
||||
} else { // e_below does not exist
|
||||
// CGAL_assertion( v->point().hz() == 0 &&
|
||||
// ( offset == 0 ? (v->point().hx() >= 0) : (v->point().hx()<=0)) );
|
||||
// ( offset == 0 ? (v->point().hx() >= 0) : (v->point().hx()<=0)) );
|
||||
if(!is_isolated(v)) {
|
||||
if(!both) {
|
||||
for (int i=0; i<2; ++i)
|
||||
m_buffer[i] = mohs[offset+2*i];
|
||||
CGAL_NEF_TRACEN("no edge below ");
|
||||
} else {
|
||||
for (int i=0; i<2; ++i)
|
||||
m_buffer[i] = incident_mark(first_out_edge(v)->sprev(),i);
|
||||
}
|
||||
if(!both) {
|
||||
for (int i=0; i<2; ++i)
|
||||
m_buffer[i] = mohs[offset+2*i];
|
||||
CGAL_NEF_TRACEN("no edge below ");
|
||||
} else {
|
||||
for (int i=0; i<2; ++i)
|
||||
m_buffer[i] = incident_mark(first_out_edge(v)->sprev(),i);
|
||||
}
|
||||
}
|
||||
} CGAL_NEF_TRACEN(" faces right-below "<<m_buffer[0]<<" "<<m_buffer[1]);
|
||||
|
||||
for (int i=0; i<2; ++i) {
|
||||
Object_handle o = supp_object(v,i);
|
||||
if ( o.empty() ) {
|
||||
CGAL_NEF_TRACEN("no vertex support");
|
||||
mark(v,i) = m_buffer[i]; continue;
|
||||
CGAL_NEF_TRACEN("no vertex support");
|
||||
mark(v,i) = m_buffer[i]; continue;
|
||||
}
|
||||
SVertex_const_handle vs;
|
||||
SHalfedge_const_handle es;
|
||||
SHalfloop_const_handle ls;
|
||||
if ( CGAL::assign(vs,o) ) {
|
||||
CGAL_NEF_TRACEN("support by svertex");
|
||||
mark(v,i) = vs->mark(); continue;
|
||||
CGAL_NEF_TRACEN("support by svertex");
|
||||
mark(v,i) = vs->mark(); continue;
|
||||
}
|
||||
if ( CGAL::assign(es,supp_object(v,i)) ) {
|
||||
CGAL_NEF_TRACEN("support by sedge");
|
||||
CGAL_NEF_TRACEN("support by sedge");
|
||||
if ( es->source()->point() == v->point() )
|
||||
{ mark(v,i) = es->source()->mark(); continue; }
|
||||
{ mark(v,i) = es->source()->mark(); continue; }
|
||||
if ( es->target()->point() == v->point() )
|
||||
{ mark(v,i) = es->target()->mark(); continue; }
|
||||
{ mark(v,i) = es->target()->mark(); continue; }
|
||||
mark(v,i) = es->mark(); continue;
|
||||
}
|
||||
if ( CGAL::assign(ls,o) ) {
|
||||
mark(v,i) = ls->mark();
|
||||
CGAL_NEF_TRACEN("loop " << ls->circle()); continue; }
|
||||
mark(v,i) = ls->mark();
|
||||
CGAL_NEF_TRACEN("loop " << ls->circle()); continue; }
|
||||
CGAL_error_msg("wrong handle");
|
||||
} CGAL_NEF_TRACEN(" vertex marks "<<mark(v,0)<<" "<<mark(v,1));
|
||||
|
||||
|
|
@ -2181,7 +2181,7 @@ complete_face_support(SVertex_iterator v_start, SVertex_iterator v_end,
|
|||
SHalfedge_const_handle ei;
|
||||
if ( CGAL::assign(ei,supp_object(e,i)) ) {
|
||||
if (!equal_not_opposite(ei->circle(),e->circle()))
|
||||
ei = ei->twin();
|
||||
ei = ei->twin();
|
||||
CGAL_assertion( ei->circle() == e->circle() );
|
||||
CGAL_NEF_TRACEN(" supporting edge "<<i<<" "<<PH(ei));
|
||||
incident_mark(e->twin(),i) =
|
||||
|
|
@ -2192,18 +2192,18 @@ complete_face_support(SVertex_iterator v_start, SVertex_iterator v_end,
|
|||
}
|
||||
SHalfloop_const_handle li;
|
||||
if ( CGAL::assign(li,supp_object(e,i)) ) {
|
||||
if (!equal_not_opposite(li->circle(),e->circle()))
|
||||
li = li->twin();
|
||||
CGAL_assertion( li->circle() == e->circle() );
|
||||
CGAL_NEF_TRACEN(" supporting loop "<<i<<" "<<PH(li));
|
||||
incident_mark(e->twin(),i) =
|
||||
li->twin()->incident_sface()->mark();
|
||||
mark(e,i) = mark(e->twin(),i) = li->mark();
|
||||
incident_mark(e,i) = m_buffer[i] =
|
||||
li->incident_sface()->mark();
|
||||
if (!equal_not_opposite(li->circle(),e->circle()))
|
||||
li = li->twin();
|
||||
CGAL_assertion( li->circle() == e->circle() );
|
||||
CGAL_NEF_TRACEN(" supporting loop "<<i<<" "<<PH(li));
|
||||
incident_mark(e->twin(),i) =
|
||||
li->twin()->incident_sface()->mark();
|
||||
mark(e,i) = mark(e->twin(),i) = li->mark();
|
||||
incident_mark(e,i) = m_buffer[i] =
|
||||
li->incident_sface()->mark();
|
||||
}
|
||||
} else { CGAL_NEF_TRACEN(" support from face below "<<i);
|
||||
incident_mark(e->twin(),i) = mark(e,i) = mark(e->twin(),i) =
|
||||
incident_mark(e->twin(),i) = mark(e,i) = mark(e->twin(),i) =
|
||||
incident_mark(e,i) = m_buffer[i];
|
||||
}
|
||||
} CGAL_NEF_TRACEN(" face marks "<<m_buffer[0]<<" "<<m_buffer[1]);
|
||||
|
|
@ -2334,27 +2334,27 @@ void SM_overlayer<Map>::simplify()
|
|||
en = e; ++en; if ( en==e->twin() ) ++en;
|
||||
CGAL_NEF_TRACEN("can simplify ? " << PH(e));
|
||||
CGAL_NEF_TRACEN(e->mark() << " " <<
|
||||
e->incident_sface()->mark() << " " <<
|
||||
e->twin()->incident_sface()->mark());
|
||||
e->incident_sface()->mark() << " " <<
|
||||
e->twin()->incident_sface()->mark());
|
||||
if (( e->mark() == e->incident_sface()->mark() &&
|
||||
e->mark() == e->twin()->incident_sface()->mark())){
|
||||
e->mark() == e->twin()->incident_sface()->mark())){
|
||||
CGAL_NEF_TRACEN("deleting "<<PH(e));
|
||||
if ( !UF.same_set(Pitem[e->incident_sface()],
|
||||
Pitem[e->twin()->incident_sface()]) ) {
|
||||
Pitem[e->twin()->incident_sface()]) ) {
|
||||
|
||||
UF.unify_sets( Pitem[e->incident_sface()],
|
||||
Pitem[e->twin()->incident_sface()] );
|
||||
CGAL_NEF_TRACEN("unioning disjoint faces");
|
||||
UF.unify_sets( Pitem[e->incident_sface()],
|
||||
Pitem[e->twin()->incident_sface()] );
|
||||
CGAL_NEF_TRACEN("unioning disjoint faces");
|
||||
}
|
||||
|
||||
CGAL_NEF_TRACEN("is_closed_at_source " << is_closed_at_source(e) <<
|
||||
" " << is_closed_at_source(e->twin()));
|
||||
" " << is_closed_at_source(e->twin()));
|
||||
|
||||
if ( is_closed_at_source(e) )
|
||||
Vitem[e->source()] = Pitem[e->incident_sface()];
|
||||
Vitem[e->source()] = Pitem[e->incident_sface()];
|
||||
|
||||
if ( is_closed_at_source(e->twin()))
|
||||
Vitem[e->target()] = Pitem[e->incident_sface()];
|
||||
Vitem[e->target()] = Pitem[e->incident_sface()];
|
||||
|
||||
delete_edge_pair(e);
|
||||
}
|
||||
|
|
@ -2375,13 +2375,13 @@ void SM_overlayer<Map>::simplify()
|
|||
if ( is_isolated(v) ) {
|
||||
|
||||
if(Vitem[v] != nullptr) {
|
||||
set_face(v,*(UF.find(Vitem[v])));
|
||||
CGAL_NEF_TRACEN("incident face of " << PH(v) << " set to " << &*(v->incident_sface()));
|
||||
set_face(v,*(UF.find(Vitem[v])));
|
||||
CGAL_NEF_TRACEN("incident face of " << PH(v) << " set to " << &*(v->incident_sface()));
|
||||
}
|
||||
else {
|
||||
set_face(v, *(UF.find(Pitem[v->incident_sface()])));
|
||||
CGAL_NEF_TRACEN("isolated svertex " << PH(v) <<
|
||||
" already has incident face " << &*(v->incident_sface()));
|
||||
set_face(v, *(UF.find(Pitem[v->incident_sface()])));
|
||||
CGAL_NEF_TRACEN("isolated svertex " << PH(v) <<
|
||||
" already has incident face " << &*(v->incident_sface()));
|
||||
}
|
||||
|
||||
if ( v->mark() == v->incident_sface()->mark() ) {
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ Polynomial<NT> modular_gcd_utcf_algorithm_M(
|
|||
do{
|
||||
int current_prime = -1;
|
||||
prime_index++;
|
||||
if(prime_index >= 2000){
|
||||
if(prime_index >= 2000){
|
||||
std::cerr<<"primes in the array exhausted"<<std::endl;
|
||||
current_prime = internal::get_next_lower_prime(current_prime);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*********************************************************************
|
||||
* 25 - 02 - 97
|
||||
* gestion des fichiers image ELF
|
||||
* 25 - 02 - 97
|
||||
* gestion des fichiers image ELF
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ for(i=0;i<nb;i++) permuteShort( (char *) &a[i]);
|
|||
|
||||
void permuteFloat(char *a )
|
||||
{
|
||||
char tmp;
|
||||
char tmp;
|
||||
|
||||
#ifdef CGAL_LITTLE_ENDIAN
|
||||
tmp=a[0]; a[0]=a[3]; a[3]=tmp;
|
||||
|
|
@ -79,7 +79,7 @@ tmp=a[1]; a[1]=a[2]; a[2]=tmp;
|
|||
|
||||
void permuteFloatTab(float *a, int nb)
|
||||
{
|
||||
int i;
|
||||
int i;
|
||||
|
||||
#ifdef CGAL_LITTLE_ENDIAN
|
||||
for(i=0;i<nb;i++) permuteFloat((char *) &a[i]);
|
||||
|
|
@ -89,7 +89,7 @@ for(i=0;i<nb;i++) permuteFloat((char *) &a[i]);
|
|||
|
||||
void permuteDouble(char *a )
|
||||
{
|
||||
char tmp;
|
||||
char tmp;
|
||||
|
||||
#ifdef CGAL_LITTLE_ENDIAN
|
||||
tmp=a[0]; a[0]=a[3]; a[3]=tmp;
|
||||
|
|
@ -100,7 +100,7 @@ tmp=a[1]; a[1]=a[2]; a[2]=tmp;
|
|||
|
||||
void permuteDoubleTab(double *a, int nb)
|
||||
{
|
||||
int i;
|
||||
int i;
|
||||
|
||||
#ifdef CGAL_LITTLE_ENDIAN
|
||||
for(i=0;i<nb;i++) permuteDouble((char *) &a[i]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue