Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix warning and improve code formatting
  • Loading branch information
wwmayer committed Jan 9, 2017
1 parent 61c3f2c commit f5367d7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Mod/Import/App/ImportOCAF.cpp
Expand Up @@ -194,28 +194,28 @@ void ImportOCAF::loadShapes(const TDF_Label& label, const TopLoc_Location& loc,
void ImportOCAF::createShape(const TDF_Label& label, const TopLoc_Location& loc, const std::string& name)
{
const TopoDS_Shape& aShape = aShapeTool->GetShape(label);
BRep_Builder aBuilder;
std::vector<App::DocumentObject*> lValue;

if (!aShape.IsNull() && aShape.ShapeType() == TopAbs_COMPOUND) {
TopExp_Explorer xp;
int ctSolids = 0, ctShells = 0;

Part::Compound *pcCompound = static_cast<Part::Compound*>(doc->addObject
Part::Compound *pcCompound = static_cast<Part::Compound*>(doc->addObject
("Part::Compound",name.c_str() ));
for (xp.Init(aShape, TopAbs_SOLID); xp.More(); xp.Next(), ctSolids++)
createShape(xp.Current(), loc, name, lValue);
for (xp.Init(aShape, TopAbs_SHELL, TopAbs_SOLID); xp.More(); xp.Next(), ctShells++)
createShape(xp.Current(), loc, name, lValue);
pcCompound->Links.setValues(lValue);
pcCompound->Links.setValues(lValue);
if (ctSolids > 0 || ctShells > 0)
return;
}

createShape(aShape, loc, name,lValue);
createShape(aShape, loc, name, lValue);
}

void ImportOCAF::createShape(const TopoDS_Shape& aShape, const TopLoc_Location& loc, const std::string& name,std::vector<App::DocumentObject*>& lvalue)
void ImportOCAF::createShape(const TopoDS_Shape& aShape, const TopLoc_Location& loc, const std::string& name,
std::vector<App::DocumentObject*>& lvalue)
{
Part::Feature* part = static_cast<Part::Feature*>(doc->addObject("Part::Feature"));
if (!loc.IsIdentity())
Expand Down

0 comments on commit f5367d7

Please sign in to comment.