diff --git a/Straight_skeleton_extrusion_2/include/CGAL/extrude_skeleton.h b/Straight_skeleton_extrusion_2/include/CGAL/extrude_skeleton.h index bbde62446be..1baf7ec1bad 100644 --- a/Straight_skeleton_extrusion_2/include/CGAL/extrude_skeleton.h +++ b/Straight_skeleton_extrusion_2/include/CGAL/extrude_skeleton.h @@ -86,8 +86,8 @@ inline constexpr FT default_extrusion_height() } // @todo Maybe this postprocessing is not really necessary? Do users really care if the point -// is not perfectly above the input contour edge (it generally cannot be anyway if the kernel is not exact except for some -// specific cases)? +// is not perfectly above the input contour edge (it generally cannot be anyway if the kernel +// is not exact except for some specific cases)? #define CGAL_SLS_SNAP_TO_VERTICAL_SLABS #ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS @@ -205,17 +205,19 @@ public: } // can't modify the position yet because we need arrange_polygons() to still work properly + // + // @fixme on paper one could create a polygon thin-enough w.r.t. the max weight value + // such thatthere is a skeleton vertex that wants to be snapped to two different sides... void on_offset_point(const Point_2& op, SS_Halfedge_const_handle hook) const { - CGAL_assertion(hook->is_bisector()); - -#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS - // @fixme on paper one could create a polygon thin-enough w.r.t. the max weight value such that - // there is a skeleton vertex that wants to be snapped to two different sides... - CGAL_assertion(m_snapped_positions.count(op) == 0); + CGAL_precondition(hook->is_bisector()); HDS_Halfedge_const_handle canonical_hook = (hook < hook->opposite()) ? hook : hook->opposite(); + m_offset_points[canonical_hook] = op; + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + CGAL_precondition(m_snapped_positions.count(op) == 0); SS_Halfedge_const_handle contour_h1 = hook->defining_contour_edge(); CGAL_assertion(contour_h1->opposite()->is_border()); @@ -225,9 +227,6 @@ public: const bool is_h1_vertical = (contour_h1->weight() == m_vertical_weight); const bool is_h2_vertical = (contour_h2->weight() == m_vertical_weight); - // this can happen when the offset is passing through vertices - m_offset_points[canonical_hook] = op; - // if both are vertical, it's the common vertex (which has to exist) if(is_h1_vertical && is_h2_vertical) {