Skip to content

Conversation

@LeoValque
Copy link
Contributor

@LeoValque LeoValque commented Mar 24, 2025

Summary of Changes

Add two functions that given a range of segments, rounds their coordinates to double while preserving the topology "up to collapse". These functions differ from the actual snap rounding by rounding on double or any irregular grid instead of integer or any regular grid.

OutputContainer::iterator double_snap_rounding_2(InputIterator begin, InputIterator end, OutputContainer& outputs a range of polylines, each polyline corresponding to snapped version of an input segment.

OutputContainer::iterator compute_snapped_subcurves_2(InputIterator begin, InputIterator end, OutputContainer& outputs all the segments resulting from the snap rounding of the input.

TODO

New files are currently in package Snap rounding 2 but the copyrights of this package is not GF. Possibility: A new package? (THe feature seems to small for that) or move in Polygon_repair (owned by GF and quite link to the subject, be careful to not bring Arrangement_2 as dependancies).

Release Management

  • Affected package(s): Snap rounding 2 ***
  • Feature/Small Feature (if any):
  • Link to compiled documentation (obligatory for small feature) wrong link name to be changed
  • License and copyright ownership: GF

@sloriot
Copy link
Member

sloriot commented Apr 1, 2025

Also, I think the user will be interested in having a correspondence between input and output segments

@afabri
Copy link
Member

afabri commented Jun 30, 2025

What is the status of this pull request ?

@sloriot sloriot changed the base branch from master to main September 18, 2025 15:19
@MaelRL MaelRL added Not yet approved The feature or pull-request has not yet been approved. Small feature labels Oct 30, 2025
@LeoValque

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@LeoValque

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@sloriot

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@albert-github
Copy link
Contributor

Looks like there are still errors in the documentation.
From https://cgal.geometryfactory.com/CGAL/Manual_doxygen_test/CGAL-6.2-Ic-35/logs_master/Snap_rounding_2.log:

/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-35/doc/Snap_rounding_2/Concepts/FloatSnapRoundingTraits_2.h:7: warning: unable to resolve reference to 'CGAL::snap_rounding_' for \ref command
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-35/doc/Snap_rounding_2/Concepts/FloatSnapRoundingTraits_2.h:149: warning: unable to resolve link to 'FloatSnapRoundingTraits_2::ConstructRoundPoint_2' for \link command
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-35/doc/Snap_rounding_2/Concepts/FloatSnapRoundingTraits_2.h:166: warning: unable to resolve link to 'FloatSnapRoundingTraits_2::SquaredRoundBound_2' for \link command
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-35/doc/Snap_rounding_2/Concepts/FloatSnapRoundingTraits_2.h:183: warning: unable to resolve link to 'FloatSnapRoundingTraits_2::ConverterToExact' for \link command
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-35/doc/Snap_rounding_2/Concepts/FloatSnapRoundingTraits_2.h:202: warning: unable to resolve link to 'FloatSnapRoundingTraits_2::ConverterToExact' for \link command

Maybe: FloatSnapRoundingTraits_2 -> FSRTraits_2

@albert-github
Copy link
Contributor

From https://cgal.geometryfactory.com/CGAL/Manual_doxygen_test/CGAL-6.2-Ic-35/logs_master/Box_intersection_d.log (though file is changed in this PR):

/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-35/doc/Box_intersection_d/Box_intersection_d.txt:174: warning: unable to resolve reference to 'Box_intersection_d/boxes_with_different_types.cpp' for \ref command

Probably something with the EXAMPLE_PATH settings

@LeoValque

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@LeoValque

This comment was marked as outdated.

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/8797/v0/Manual/index.html

@afabri
Copy link
Member

afabri commented Nov 12, 2025

Failure in the VC2017 testsuite CGAL-6.2-Ic-39

* \cgalParamNEnd
*/
template <class InputIterator , class OutputIterator, class NamedParameters = parameters::Default_named_parameters>
OutputIterator compute_snapped_subcurves_2(InputIterator begin,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 2 versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One function takes an input segment and returns a polyline of points that correspond to that segment, ensuring a clear mapping between the input and the output. The other function simply outputs a range of segments that it is easier to use.

@albert-github
Copy link
Contributor

From the overnight documentation build (https://cgal.geometryfactory.com/CGAL/Manual_doxygen_test/CGAL-6.2-Ic-63/logs_master/Snap_rounding_2.log):

/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:797: warning: unable to resolve reference to 'bgl_namedparameters' for \ref command
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:800: warning: unable to resolve reference to 'bgl_namedparameters' for \ref command
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:814: warning: expected <tr> or </table> tag but found token TK_COMMAND_AT instead!
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:815: warning: unexpected end of comment while inside <dl> block
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:680: warning: unable to resolve reference to 'bgl_namedparameters' for \ref command
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:683: warning: unable to resolve reference to 'bgl_namedparameters' for \ref command
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:703: warning: expected <tr> or </table> tag but found token TK_COMMAND_AT instead!
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:704: warning: unexpected end of comment while inside <dl> block
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:546: warning: unable to resolve reference to 'bgl_namedparameters' for \ref command
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:549: warning: unable to resolve reference to 'bgl_namedparameters' for \ref command
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:563: warning: expected <tr> or </table> tag but found token TK_EOF instead!
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:563: warning: unexpected end of comment while inside <dl> block
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:421: warning: unable to resolve reference to 'bgl_namedparameters' for \ref command
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:424: warning: unable to resolve reference to 'bgl_namedparameters' for \ref command
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:438: warning: expected <tr> or </table> tag but found token TK_EOF instead!
/home/cgal-testsuite/cgal_doc_build/CGAL-6.2-Ic-63/include/CGAL/Float_snap_rounding_2.h:438: warning: unexpected end of comment while inside <dl> block
  • warning: unable to resolve reference to 'bgl_namedparameters' for \ref command
    missing dependency in documentation dependencies file
  • warning: expected <tr> or </table> tag but found token TK_EOF instead!
    missing command \cgalNamedParamsEnd
  • warning: unexpected end of comment while inside <dl> block
    collateral damage due to previous error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Not yet approved The feature or pull-request has not yet been approved. Pkg::Snap_rounding_2 Small feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants