a model of ReadWritePropertyMap whose key type is the value type of the InputRange and value type is GeomTraits::Segment_2. The default is CGAL::Identity_property_map<typename GeomTraits::Segment_2>.
Each group of segments is provided as a collection of their indices and only segments within the group are being regularized that is no relationships between segments from different groups are taken into account.
The user must not use this method until he has meaningful groups of segments (see more in the user manual). By default, all segments are inserted as a group.
Template Parameters
IndexRange
a model of ConstRange whose value type is std::size_t
calculates the target value between 2 parallel segments, which are direct neighbors to each other.
The target value is the distance between two parallel segments i and j, where the distance is defined as the distance between the midpoint of the ith segment and the projection of this point onto the supporting line of the jth segment.
returns segments, which best-fit collinear groups.
This method first calls Segments::collinear_groups() and then substitutes each group of collinear segments by an average segment. The number of returned segments is the number of detected collinear groups.
Template Parameters
OutIterator
a model of OutputIterator that accepts segments of type GeomTraits::Segment_2
Number of values in solution equals to the number n of segments being regularized + the number m of neighbor pairs between these segments. Each of n values is an offset that is added to the initial segment position.