mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 17:30:35 +05:00
#29335 [CEA 29224] Cannot graphicaly select geometry to create groups: implement possibility to select whole object (on which mesh was constructed) as a base for Mesh group.
This commit is contained in:
parent
0510c0d369
commit
64547701f8
@ -276,12 +276,15 @@ namespace SMESH
|
|||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
bool ContainsSubShape( GEOM::GEOM_Object_ptr mainGeom,
|
bool ContainsSubShape( GEOM::GEOM_Object_ptr mainGeom,
|
||||||
GEOM::GEOM_Object_ptr subGeom )
|
GEOM::GEOM_Object_ptr subGeom, bool allowMainShape )
|
||||||
{
|
{
|
||||||
if ( CORBA::is_nil( mainGeom ) ||
|
if ( CORBA::is_nil( mainGeom ) ||
|
||||||
CORBA::is_nil( subGeom ))
|
CORBA::is_nil( subGeom ))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (allowMainShape && mainGeom->IsSame(subGeom))
|
||||||
|
return true;
|
||||||
|
|
||||||
GEOM::GEOM_Gen_var geomGen = mainGeom->GetGen();
|
GEOM::GEOM_Gen_var geomGen = mainGeom->GetGen();
|
||||||
if ( geomGen->_is_nil() ) return false;
|
if ( geomGen->_is_nil() ) return false;
|
||||||
|
|
||||||
|
@ -61,7 +61,8 @@ namespace SMESH
|
|||||||
QString& subGeom, QString& meshGeom);
|
QString& subGeom, QString& meshGeom);
|
||||||
|
|
||||||
SMESHGUI_EXPORT bool ContainsSubShape( GEOM::GEOM_Object_ptr mainShape,
|
SMESHGUI_EXPORT bool ContainsSubShape( GEOM::GEOM_Object_ptr mainShape,
|
||||||
GEOM::GEOM_Object_ptr subShape );
|
GEOM::GEOM_Object_ptr subShape,
|
||||||
|
bool allowMainShape = true );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // SMESHGUI_GEOMGENUTILS_H
|
#endif // SMESHGUI_GEOMGENUTILS_H
|
||||||
|
@ -355,7 +355,7 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const
|
|||||||
GEOM::GEOM_Object_var subGeom =
|
GEOM::GEOM_Object_var subGeom =
|
||||||
GEOM::GEOM_Object::_narrow(_CAST(SObject,pSubGeom)->GetObject());
|
GEOM::GEOM_Object::_narrow(_CAST(SObject,pSubGeom)->GetObject());
|
||||||
|
|
||||||
if ( SMESH::ContainsSubShape( mainGeom, subGeom ))
|
if ( SMESH::ContainsSubShape( mainGeom, subGeom, false ))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user