mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-09 11:12:21 +00:00
[buffer] For clusters (occuption), avoid using turns as starting point
This enables the "get_occupation" again, but skips the get_left_turns function
This commit is contained in:
@@ -314,23 +314,15 @@ struct buffered_piece_collection
|
||||
}
|
||||
}
|
||||
|
||||
// 4: From these vectors, get the left turns
|
||||
// and mark all other turns as to-skip
|
||||
// 4: Mark all turns as not selectable as a starting point for traversing
|
||||
// rings. They still can be used to continue already started rings.
|
||||
for (typename occupation_map_type::iterator it = occupation_map.begin();
|
||||
it != occupation_map.end(); ++it)
|
||||
{
|
||||
buffer_occupation_info& info = it->second;
|
||||
|
||||
std::vector<detail::left_turns::left_turn> turns_to_keep;
|
||||
info.get_left_turns(it->first, turns_to_keep);
|
||||
|
||||
if (turns_to_keep.empty())
|
||||
typename buffer_occupation_info::turn_vector_type const& turns = it->second.turns;
|
||||
for (int i = 0; i < turns.size(); i++)
|
||||
{
|
||||
typename buffer_occupation_info::turn_vector_type const& turns = it->second.turns;
|
||||
for (int i = 0; i < turns.size(); i++)
|
||||
{
|
||||
m_turns[turns[i].turn_index].count_on_occupied++;
|
||||
}
|
||||
m_turns[turns[i].turn_index].selectable_start = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -551,7 +543,7 @@ struct buffered_piece_collection
|
||||
}
|
||||
|
||||
|
||||
//get_occupation(); // Temporarily disabled, all tests passing...
|
||||
get_occupation();
|
||||
|
||||
classify_turns();
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ inline bool check_graph(TurnPoints& turn_points, operation_type for_operation)
|
||||
it != boost::end(meta_turns);
|
||||
++it)
|
||||
{
|
||||
if (! (it->turn->blocked() || it->turn->is_discarded()))
|
||||
if (! (it->turn->blocked() || it->turn->discarded))
|
||||
{
|
||||
for (int i = 0 ; i < 2; i++)
|
||||
{
|
||||
|
||||
@@ -268,7 +268,7 @@ public :
|
||||
++it)
|
||||
{
|
||||
// Skip discarded ones
|
||||
if (! (it->is_discarded() || it->blocked()))
|
||||
if (! (it->discarded || ! it->selectable_start || it->blocked()))
|
||||
{
|
||||
for (turn_operation_iterator_type iit = boost::begin(it->operations);
|
||||
state.good() && iit != boost::end(it->operations);
|
||||
|
||||
@@ -93,6 +93,7 @@ struct turn_info
|
||||
Point point;
|
||||
method_type method;
|
||||
bool discarded;
|
||||
bool selectable_start; // Can be used as starting-turn in traverse
|
||||
|
||||
|
||||
Container operations;
|
||||
@@ -100,6 +101,7 @@ struct turn_info
|
||||
inline turn_info()
|
||||
: method(method_none)
|
||||
, discarded(false)
|
||||
, selectable_start(true)
|
||||
{}
|
||||
|
||||
inline bool both(operation_type type) const
|
||||
|
||||
Reference in New Issue
Block a user