mirror of https://github.com/CGAL/cgal
update incorrectly handled coplanar intersection computation
This commit is contained in:
parent
9240f29ff8
commit
6bb6f470c4
|
|
@ -79,7 +79,7 @@ struct Intersect_coplanar_faces_3{
|
|||
//constructor for intersection of edges. prev and curr are two points on an edge of the first facet (preserving the
|
||||
//orientation of the facet). This edge is intersected by h2 from the second facet.
|
||||
//
|
||||
//The rational is the following: we first check whether curr and prev are on the same edge. I so we create
|
||||
//The rational is the following: we first check whether curr and prev are on the same edge. If so we create
|
||||
//an intersection point between two edges. Otherwise, the point is a vertex of the second facet included into
|
||||
//the first facet.
|
||||
//
|
||||
|
|
@ -102,9 +102,25 @@ struct Intersect_coplanar_faces_3{
|
|||
res.info_2=h2;
|
||||
|
||||
if (ipt_prev.type_1==ON_VERTEX && next(ipt_prev.info_1, tm1) == ipt_curr.info_1){
|
||||
CGAL_assertion(ipt_curr.type_1!=ON_FACE);
|
||||
res.type_1=ON_EDGE;
|
||||
res.info_1=ipt_curr.info_1;
|
||||
if(ipt_curr.type_1!=ON_FACE)
|
||||
{
|
||||
res.type_1=ON_EDGE;
|
||||
res.info_1=ipt_curr.info_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
CGAL_assertion( ipt_curr.type_2==ON_VERTEX);
|
||||
res.type_1=ON_FACE;
|
||||
res.info_1=h1;
|
||||
res.type_2=ON_VERTEX;
|
||||
typename Exact_kernel::Collinear_3 is_collinear = Exact_kernel().collinear_3_object();
|
||||
if ( !is_collinear(ipt_prev.point,ipt_curr.point,to_exact(get(vpm2,target(res.info_2,tm2)) ) ) ){
|
||||
res.info_2=prev(res.info_2,tm2);
|
||||
CGAL_assertion( is_collinear(ipt_prev.point,ipt_curr.point,to_exact(get(vpm2,target(res.info_2,tm2))) ) );
|
||||
}
|
||||
res.point = to_exact( get(vpm2, target(res.info_2,tm2)) );
|
||||
return res;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(ipt_curr.type_1==ON_VERTEX && ipt_prev.info_1 == ipt_curr.info_1){
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
OFF
|
||||
3 1 0
|
||||
0 5310 100
|
||||
0 5400 100
|
||||
0 5310 150
|
||||
3 0 2 1
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
OFF
|
||||
3 1 0
|
||||
0 5375 105
|
||||
0 5350 110
|
||||
0 5375 110
|
||||
3 1 2 0
|
||||
|
|
@ -64,6 +64,7 @@ data-coref/coplanar_triangles/all_cases/deg/tr15-1.off data-coref/coplanar_trian
|
|||
data-coref/coplanar_triangles/all_cases/deg/tr16-1.off data-coref/coplanar_triangles/all_cases/deg/tr16-2.off
|
||||
data-coref/coplanar_triangles/all_cases/deg/tr17-1.off data-coref/coplanar_triangles/all_cases/deg/tr17-2.off
|
||||
data-coref/coplanar_triangles/all_cases/bugreport/tr1-1.off data-coref/coplanar_triangles/all_cases/bugreport/tr1-2.off
|
||||
data-coref/coplanar_triangles/all_cases/bugreport/tr2-1.off data-coref/coplanar_triangles/all_cases/bugreport/tr2-2.off
|
||||
data-coref/coplanar_triangles/all_cases/tr1-1.off data-coref/coplanar_triangles/all_cases/tr1-2.off
|
||||
data-coref/coplanar_triangles/all_cases/tr2-1.off data-coref/coplanar_triangles/all_cases/tr2-2.off
|
||||
data-coref/coplanar_triangles/all_cases/tr3-1.off data-coref/coplanar_triangles/all_cases/tr3-2.off
|
||||
|
|
|
|||
Loading…
Reference in New Issue