-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020 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
myDlg->selectedObject(SMESHGUI_MeshDlg::Geom, aGEOMs);
if (aGEOMs.count() > 0) {
- GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
+ GEOM::GEOM_Gen_var geomGen = mainGeom->GetGen();
if (geomGen->_is_nil()) return false;
GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations();
bool isApplicable = false;
if ( myGeomEntry == myLastGeomEntry && !myGeomEntry.isEmpty() ) {
- THypLabelIsAppMap::const_iterator lab2isApp = myHypMapIsApplicable.find( theAlgoData->Label );
+ THypLabelIsAppMap::const_iterator lab2isApp = myHypMapIsApplicable.find( theAlgoData->TypeName );
if ( lab2isApp != myHypMapIsApplicable.end() ) {
isApplicable = lab2isApp.value();
return isApplicable;
toCheckIsApplicableToAll = ( myGeom->GetType() == GEOM_GROUP );
isApplicable = SMESH::IsApplicable( theAlgoData->TypeName, myGeom, toCheckIsApplicableToAll );
- myHypMapIsApplicable.insert( theAlgoData->Label, isApplicable );
+ myHypMapIsApplicable.insert( theAlgoData->TypeName, isApplicable );
return isApplicable;
}
for ( size_t i = 0; i < internalEdges.size(); ++i )
intIDSet.insert( shapeIDs.FindIndex( internalEdges[ i ]));
- GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
+ GEOM::GEOM_Gen_var geomGen = theMainShape->GetGen();
if (geomGen->_is_nil()) return;
GEOM::GEOM_Object_var edgeGroup;
{
// Create groups on all geom groups
- GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
+ GEOM::GEOM_Gen_var geomGen = aGeomVar->GetGen();
GEOM::GEOM_IShapesOperations_wrap op = geomGen->GetIShapesOperations();
GEOM::ListOfGO_var geomGroups = op->GetExistingSubObjects( aGeomVar,
/*groupsOnly=*/false );
else if (aGEOMs.count() > 1)
{
// create a GEOM group
- GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
- if (!geomGen->_is_nil()) {
- GEOM::GEOM_IGroupOperations_wrap op =
- geomGen->GetIGroupOperations();
- if (!op->_is_nil()) {
+ GEOM::GEOM_Gen_var geomGen = mainGeom->GetGen();
+ if ( !geomGen->_is_nil() ) {
+ GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations();
+ if ( !op->_is_nil() )
+ {
// check and add all selected GEOM objects: they must be
// a sub-shapes of the main GEOM and must be of one type
int iSubSh = 0;