An update will be applied December 9th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit d46a6ab1 authored by David Thompson's avatar David Thompson
Browse files

Progress debugging face creation.

parent d074dc0f
......@@ -898,6 +898,15 @@ struct Neighborhood
}
#endif // 0
// III. Remove active edges going out of scope after the neighborhood
// has been visited.
while (!this->m_fragmentsToDeactivate.empty())
{
std::set<FragmentId>::iterator fragIt = this->m_fragmentsToDeactivate.begin();
this->m_activeEdges->erase(*fragIt);
this->m_fragmentsToDeactivate.erase(fragIt);
}
// II. We are done processing the ring; if any incident edges are outgoing,
// add their SEGMENT_END events to the event queue.
std::vector<FragmentId>::iterator it;
......@@ -910,15 +919,6 @@ struct Neighborhood
}
this->m_fragmentsToQueue.clear();
this->m_ring.clear();
// III. Remove active edges going out of scope after the neighborhood
// has been visited.
while (!this->m_fragmentsToDeactivate.empty())
{
std::set<FragmentId>::iterator fragIt = this->m_fragmentsToDeactivate.begin();
this->m_activeEdges->erase(*fragIt);
this->m_fragmentsToDeactivate.erase(fragIt);
}
}
/**\brief Advance the sweepline to the next event's point.
......@@ -1331,6 +1331,13 @@ smtk::model::OperatorResult CreateFaces::operateInternal()
{
neighborhood.processQueue();
}
if (fragments.size() > 14)
{
EdgeFragment& f13(fragments[13]);
EdgeFragment& f14(fragments[14]);
std::cout << "f13 lo " << &(f13.lo()) << " hi " << &(f13.hi()) << " (" << f13.lo().x() << " " << f13.lo().y() << " -- " << f13.hi().x() << " " << f13.hi().y() << ")\n";
std::cout << "f14 lo " << &(f14.lo()) << " hi " << &(f14.hi()) << " (" << f14.lo().x() << " " << f14.lo().y() << " -- " << f14.hi().x() << " " << f14.hi().y() << ")\n";
}
}
// Now we have a single loop for each region, obtainable by
......
......@@ -143,11 +143,12 @@ class TestPolygonCreation(smtk.testing.TestCase):
innerLoopVerts = [ \
[1.25,3.35], [1.65,3.75], [1.25,3.75], [1.25,3.35], \
[1.35,3.25], [1.75,3.25], [1.75,3.65], [1.35,3.25], \
#[0.25,4.25], [0.75,4.25], [0.75,4.75], [0.25,4.25], \
#[0.25,4.25], [0.25,4.75], [0.75,4.75], \
[0.25,4.25], [0.75,4.75], \
[0.25,4.25], [0.75,4.25], [0.75,4.75], \
[0.25,4.25], [0.25,4.75], [0.75,4.75], \
]
innerLoopOffsets = [0, 4];
#innerLoopOffsets = [0, 4, 8, 12];
innerLoopOffsets = [0, 4, 8, 10, 13];
elist = CreateEdge(innerLoopVerts, offsets=innerLoopOffsets, model=mod)
smtk.io.ExportJSON.fromModelManagerToFile(self.mgr, '/tmp/poly.json')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment