fix intersection point computation

This commit is contained in:
Sébastien Loriot 2023-03-06 14:03:24 +01:00
parent 2fade29214
commit f3e4a60f96
1 changed files with 5 additions and 5 deletions

View File

@ -141,7 +141,7 @@ struct Point_on_triangle
if (t1_t2_ids.second==-1)
return point_from_id(p1,q1,r1,t1_t2_ids.first);
return k.construct_barycenter_3_object()(point_from_id(p2,q2,r2,(t1_t2_ids.second+1)%3), alpha, point_from_id(p2,q2,r2,t1_t2_ids.second)) ;
return k.construct_barycenter_3_object()(point_from_id(p1,q1,r1,(t1_t2_ids.first+1)%3), alpha, point_from_id(p1,q1,r1,t1_t2_ids.first)) ;
}
};
@ -354,8 +354,8 @@ intersection_coplanar_triangles(const typename K::Triangle_3& t1,
};
std::cout << "intersection_coplanar_triangles\n";
std::ofstream("/tmp/t1.polylines.txt") << to_string(t1) << "\n";
std::ofstream("/tmp/t2.polylines.txt") << to_string(t2) << "\n";
std::ofstream("/tmp/t1.polylines.txt") << std::setprecision(17) << to_string(t1) << "\n";
std::ofstream("/tmp/t2.polylines.txt") << std::setprecision(17) << to_string(t2) << "\n";
#endif
const typename K::Point_3& p1 = t1.vertex(0),
q1 = t1.vertex(1),