-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
return false;
// Get GEOM engine
- Engines::EngineComponent_var comp =
- SalomeApp_Application::lcc()->FindOrLoad_Component( "FactoryServer", "GEOM" );
- GEOM::GEOM_Gen_var geomEngine = GEOM::GEOM_Gen::_narrow( comp );
- if ( CORBA::is_nil( geomEngine ) )
+ GEOM::GEOM_Gen_var geomEngine = aGeomObj->GetGen();
+ if ( CORBA::is_nil( geomEngine ))
return false;
// Get shape from geom object and verify its parameters
GEOM_Client aGeomClient;
TopoDS_Shape aShape = aGeomClient.GetShape(geomEngine.in(), aGeomObj);
- if (aShape.IsNull() ||
- !myShapeTypes.Contains(aShape.ShapeType()))
+ if (aShape.IsNull() || !myShapeTypes.Contains(aShape.ShapeType()))
return false;
if (myIsClosedOnly && aShape.ShapeType() == TopAbs_SHELL && !aShape.Closed())
if (aMainShape.IsNull())
return false;
- bool isFound = false;
- TopAbs_ShapeEnum aShapeType = aShape.ShapeType();
- TopExp_Explorer anExp (aMainShape, aShapeType);
- for (; anExp.More(); anExp.Next()) {
- if (anExp.Current() == aShape) {
- isFound = true;
+ TopExp_Explorer anExp (aMainShape, aShape.ShapeType());
+ for (; anExp.More(); anExp.Next())
+ if (anExp.Current() == aShape)
break;
- }
- }
- if (!isFound)
+ if (!anExp.More())
return false;
}
// Verify number of sub-shapes
- if (mySubShapeType == TopAbs_SHAPE);
+ if (mySubShapeType == TopAbs_SHAPE)
return true;
TopTools_IndexedMapOfShape aMap;