[TD]remove problematic boost check for planarity

- boost check for planar graph was consuming memory until
  crashing.
- since all our edges have been projected onto a plane, we
  don't require this check
This commit is contained in:
wandererfan
2022-12-16 12:01:20 -05:00
committed by WandererFan
parent 0925d9a47e
commit ea6fb190f1

View File

@@ -163,41 +163,6 @@ bool EdgeWalker::prepare()
}
}
// Test for planarity
using vec_t = std::vector< graph_traits<TechDraw::graph>::edge_descriptor >;
std::vector<vec_t> embedding(num_vertices(m_g));
using kura_edges_t = std::vector< graph_traits<TechDraw::graph>::edge_descriptor >;
kura_edges_t kEdges;
kura_edges_t::iterator ki, ki_end;
graph_traits<TechDraw::graph>::edge_descriptor e1;
#if 0 // Function declared in block and lacking of implementation
// Get the index associated with edge
graph_traits<TechDraw::graph>::edges_size_type
get(boost::edge_index_t,
const TechDraw::graph& m_g,
graph_traits<TechDraw::graph>::edge_descriptor edge);
#endif
bool isPlanar = boyer_myrvold_planarity_test(boyer_myrvold_params::graph = m_g,
boyer_myrvold_params::embedding = &embedding[0], // this is "an" embedding but not one for finding
boyer_myrvold_params::kuratowski_subgraph = // closed regions in an edge pile.
std::back_inserter(kEdges));
if (!isPlanar) {
//TODO: remove kura subgraph to make planar??
Base::Console().Message("EW::prepare - input is NOT planar\n");
ki_end = kEdges.end();
std::stringstream ss;
ss << "EW::prepare - obstructing edges: ";
for(ki = kEdges.begin(); ki != ki_end; ++ki) {
e1 = *ki;
ss << boost::get(edge_index, m_g, e1) << ", ";
}
ss << std::endl;
Base::Console().Message("%s\n", ss.str().c_str());
return false;
}
m_eV.setGraph(m_g);
planar_face_traversal(m_g, &planar_embedding[0], m_eV);