mirror of https://github.com/CGAL/cgal
Avoid a geometric test
This commit is contained in:
parent
2334ec5f4b
commit
d04b26b0e4
|
|
@ -849,7 +849,24 @@ public:
|
||||||
_CGAL_NEF_TRACEN("found on facet...");
|
_CGAL_NEF_TRACEN("found on facet...");
|
||||||
return make_object(f);
|
return make_object(f);
|
||||||
}
|
}
|
||||||
if( is.does_intersect_internally(s,f,ip)) {
|
|
||||||
|
// We next check if v is a vertex on the face to avoid a geometric test
|
||||||
|
bool v_vertex_of_f = false;
|
||||||
|
Halffacet_cycle_iterator fci;
|
||||||
|
for(fci=f->facet_cycles_begin(); fci!=f->facet_cycles_end(); ++fci) {
|
||||||
|
if(fci.is_shalfedge()) {
|
||||||
|
SHalfedge_around_facet_circulator sfc(fci), send(sfc);
|
||||||
|
CGAL_For_all(sfc,send) {
|
||||||
|
if(sfc->source()->center_vertex() == v){
|
||||||
|
v_vertex_of_f = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if( (! v_vertex_of_f) && is.does_intersect_internally(s,f,ip) ) {
|
||||||
s = Segment_3(p, normalized(ip));
|
s = Segment_3(p, normalized(ip));
|
||||||
result = make_object(f);
|
result = make_object(f);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue