Commit ed36b3d5 authored by Julian Marcon's avatar Julian Marcon

Account for combined lines in CFI

parent 49db729e
......@@ -187,7 +187,31 @@ bool CADSystemCFI::LoadCAD()
{
vector<cfi::Oriented<cfi::TopoEntity *>> *edgeList =
face->getChildList();
// unrolling combined edges
vector<cfi::Oriented<cfi::TopoEntity *>> fullEdgeList;
for (it2 = edgeList->begin(); it2 != edgeList->end(); it2++)
{
cfi::Line *edge = static_cast<cfi::Line *>(it2->entity);
if (edge->getTopoSubtype() == cfi::SUBTYPE_COMBINED)
{
vector<cfi::Oriented<cfi::TopoEntity *>> *subEdgeList =
edge->getChildList();
for (it3 = subEdgeList->begin();
it3 != subEdgeList->end(); it3++)
{
fullEdgeList.push_back(*it3);
}
}
else
{
fullEdgeList.push_back(*it2);
}
}
for (it2 = fullEdgeList.begin(); it2 != fullEdgeList.end(); it2++)
{
cfi::Oriented<cfi::TopoEntity *> orientatedEdge = *it2;
cfi::Line *edge =
......@@ -311,6 +335,36 @@ void CADSystemCFI::AddSurf(int i, cfi::Face *in)
vector<cfi::Oriented<cfi::TopoEntity *>> *edgeList = in->getChildList();
// unrolling combined edges
vector<cfi::Oriented<cfi::TopoEntity *>> fullEdgeList;
vector<cfi::Oriented<cfi::TopoEntity *>>::iterator it2, it3;
for (it2 = edgeList->begin(); it2 != edgeList->end(); it2++)
{
cfi::Line *edge = static_cast<cfi::Line *>(it2->entity);
if (edge->getTopoSubtype() == cfi::SUBTYPE_COMBINED)
{
vector<cfi::Oriented<cfi::TopoEntity *>> *subEdgeList =
edge->getChildList();
for (it3 = subEdgeList->begin(); it3 != subEdgeList->end(); it3++)
{
fullEdgeList.push_back(*it3);
}
if (it2->orientation == cfi::ORIENT_NEGATIVE)
{
reverse(fullEdgeList.begin() + fullEdgeList.size() -
subEdgeList->size(),
fullEdgeList.end());
}
}
else
{
fullEdgeList.push_back(*it2);
}
}
vector<EdgeLoopSharedPtr> edgeloops;
int done = 0;
while (done != edgeList->size())
......
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