Fix the initial edge size in the 2D case (#9078)

Workaround for #8902 for 6.1 waiting for a better solution
This commit is contained in:
Sebastien Loriot 2025-09-24 20:10:53 +02:00 committed by GitHub
commit 23e624b0e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 3 deletions

View File

@ -1480,10 +1480,15 @@ protected:
if(!m_scene.empty())
{
auto& bbox=m_scene.bounding_box();
double d=CGAL::sqrt(CGAL::squared_distance
(Local_point(bbox.xmin(), bbox.ymin(), bbox.zmin()),
Local_point(bbox.xmax(), bbox.ymax(), bbox.zmax())));
double d=is_two_dimensional()
?2.5
: CGAL::sqrt(CGAL::squared_distance
(Local_point(bbox.xmin(), bbox.ymin(), bbox.zmin()),
Local_point(bbox.xmax(), bbox.ymax(), bbox.zmax())));
// std::cout<<"Length of the diagonal: "<<d<<std::endl;
// std::cout<<"width: "<< this->width() <<std::endl;
// std::cout<<"height: "<< this->height() <<std::endl;
m_size_vertices=1.5*d;
m_size_edges=d;
m_size_rays=m_size_edges;