mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-03 09:12:13 +00:00
Bugfix, in get_turns segments in the same source should only be skipped if iterated linearly. If coming from a partition, it might be different. By default don't skipped them.
[SVN r76469]
This commit is contained in:
@@ -158,6 +158,7 @@ public :
|
||||
static inline bool apply(
|
||||
int source_id1, Geometry1 const& geometry1, Section1 const& sec1,
|
||||
int source_id2, Geometry2 const& geometry2, Section2 const& sec2,
|
||||
bool skip_larger,
|
||||
Turns& turns,
|
||||
InterruptPolicy& interrupt_policy)
|
||||
{
|
||||
@@ -229,7 +230,7 @@ public :
|
||||
// Also skip if index1 < index2 to avoid getting all
|
||||
// intersections twice (only do this on same source!)
|
||||
|
||||
skip = index1 >= index2
|
||||
skip = (skip_larger && index1 >= index2)
|
||||
|| ndi2 == ndi1 + 1
|
||||
|| neighbouring<Geometry1>(sec1, index1, index2)
|
||||
;
|
||||
@@ -405,6 +406,7 @@ struct section_visitor
|
||||
>::apply(
|
||||
m_source_id1, m_geometry1, sec1,
|
||||
m_source_id2, m_geometry2, sec2,
|
||||
false,
|
||||
m_turns, m_interrupt_policy);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -87,6 +87,7 @@ struct self_section_visitor
|
||||
>::apply(
|
||||
0, m_geometry, sec1,
|
||||
0, m_geometry, sec2,
|
||||
false,
|
||||
m_turns, m_interrupt_policy);
|
||||
}
|
||||
if (m_interrupt_policy.has_intersections)
|
||||
|
||||
Reference in New Issue
Block a user