From 31901d0197076f45e52d5c1a8c399907b250d307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 22 Sep 2025 16:53:02 +0200 Subject: [PATCH 1/2] fix the initial edge size in the 2D case --- Basic_viewer/include/CGAL/Qt/Basic_viewer.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Basic_viewer/include/CGAL/Qt/Basic_viewer.h b/Basic_viewer/include/CGAL/Qt/Basic_viewer.h index b26ecdd479b..2d3eb6f5792 100644 --- a/Basic_viewer/include/CGAL/Qt/Basic_viewer.h +++ b/Basic_viewer/include/CGAL/Qt/Basic_viewer.h @@ -1484,8 +1484,11 @@ protected: (Local_point(bbox.xmin(), bbox.ymin(), bbox.zmin()), Local_point(bbox.xmax(), bbox.ymax(), bbox.zmax()))); // std::cout<<"Length of the diagonal: "<width() <height() < Date: Tue, 23 Sep 2025 19:53:23 +0200 Subject: [PATCH 2/2] suggestion from @gdamiand --- Basic_viewer/include/CGAL/Qt/Basic_viewer.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Basic_viewer/include/CGAL/Qt/Basic_viewer.h b/Basic_viewer/include/CGAL/Qt/Basic_viewer.h index 2d3eb6f5792..d7e3dcd48cc 100644 --- a/Basic_viewer/include/CGAL/Qt/Basic_viewer.h +++ b/Basic_viewer/include/CGAL/Qt/Basic_viewer.h @@ -1480,15 +1480,17 @@ 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: "<width() <height() <