mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-14 09:38:33 +05:00
23028: EDF 10508 SMESH: GroupOnFilter returns an empty group when the geometry is not published
This commit is contained in:
parent
5b4a1f8a3a
commit
588493c920
@ -756,7 +756,8 @@ void BelongToGeom_i::SetGeom( const TopoDS_Shape& theShape )
|
|||||||
myBelongToGeomPtr->SetGeom( theShape );
|
myBelongToGeomPtr->SetGeom( theShape );
|
||||||
}
|
}
|
||||||
|
|
||||||
void BelongToGeom_i::SetElementType(ElementType theType){
|
void BelongToGeom_i::SetElementType(ElementType theType)
|
||||||
|
{
|
||||||
myBelongToGeomPtr->SetType(SMDSAbs_ElementType(theType));
|
myBelongToGeomPtr->SetType(SMDSAbs_ElementType(theType));
|
||||||
TPythonDump()<<this<<".SetElementType("<<theType<<")";
|
TPythonDump()<<this<<".SetElementType("<<theType<<")";
|
||||||
}
|
}
|
||||||
@ -777,17 +778,24 @@ void BelongToGeom_i::SetShapeName( const char* theName )
|
|||||||
void BelongToGeom_i::SetShape( const char* theID, const char* theName )
|
void BelongToGeom_i::SetShape( const char* theID, const char* theName )
|
||||||
{
|
{
|
||||||
delete myShapeName;
|
delete myShapeName;
|
||||||
myShapeName = strdup( theName );
|
|
||||||
delete myShapeID;
|
delete myShapeID;
|
||||||
if ( theID )
|
myShapeName = strdup( theName );
|
||||||
myShapeID = strdup( theID );
|
myShapeID = strdup( theID );
|
||||||
else
|
bool hasName = ( theName && theName[0] );
|
||||||
myShapeID = 0;
|
bool hasID = ( theID && theID[0] );
|
||||||
|
|
||||||
if ( myShapeID && myShapeName == getShapeNameByID(myShapeID))
|
TopoDS_Shape S;
|
||||||
myBelongToGeomPtr->SetGeom( getShapeByID(myShapeID) );
|
if ( hasName && hasID )
|
||||||
|
{
|
||||||
|
S = getShapeByID( myShapeID );
|
||||||
|
if ( S.IsNull() )
|
||||||
|
S = getShapeByName( myShapeName );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
myBelongToGeomPtr->SetGeom( getShapeByName( myShapeName ) );
|
{
|
||||||
|
S = hasID ? getShapeByID( myShapeID ) : getShapeByName( myShapeName );
|
||||||
|
}
|
||||||
|
myBelongToGeomPtr->SetGeom( S );
|
||||||
}
|
}
|
||||||
|
|
||||||
char* BelongToGeom_i::GetShapeName()
|
char* BelongToGeom_i::GetShapeName()
|
||||||
@ -862,17 +870,24 @@ void BelongToSurface_i::SetShapeName( const char* theName, ElementType theType )
|
|||||||
void BelongToSurface_i::SetShape( const char* theID, const char* theName, ElementType theType )
|
void BelongToSurface_i::SetShape( const char* theID, const char* theName, ElementType theType )
|
||||||
{
|
{
|
||||||
delete myShapeName;
|
delete myShapeName;
|
||||||
myShapeName = strdup( theName );
|
|
||||||
delete myShapeID;
|
delete myShapeID;
|
||||||
if ( theID )
|
myShapeName = strdup( theName );
|
||||||
myShapeID = strdup( theID );
|
myShapeID = strdup( theID );
|
||||||
else
|
bool hasName = ( theName && theName[0] );
|
||||||
myShapeID = 0;
|
bool hasID = ( theID && theID[0] );
|
||||||
|
|
||||||
if ( myShapeID && myShapeName == getShapeNameByID(myShapeID))
|
TopoDS_Shape S;
|
||||||
myElementsOnSurfacePtr->SetSurface( getShapeByID(myShapeID), (SMDSAbs_ElementType)theType );
|
if ( hasName && hasID )
|
||||||
|
{
|
||||||
|
S = getShapeByID( myShapeID );
|
||||||
|
if ( S.IsNull() )
|
||||||
|
S = getShapeByName( myShapeName );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
myElementsOnSurfacePtr->SetSurface( getShapeByName( myShapeName ), (SMDSAbs_ElementType)theType );
|
{
|
||||||
|
S = hasID ? getShapeByID( myShapeID ) : getShapeByName( myShapeName );
|
||||||
|
}
|
||||||
|
myElementsOnSurfacePtr->SetSurface( S, (SMDSAbs_ElementType)theType );
|
||||||
}
|
}
|
||||||
|
|
||||||
char* BelongToSurface_i::GetShapeName()
|
char* BelongToSurface_i::GetShapeName()
|
||||||
@ -1032,17 +1047,24 @@ void LyingOnGeom_i::SetShapeName( const char* theName )
|
|||||||
void LyingOnGeom_i::SetShape( const char* theID, const char* theName )
|
void LyingOnGeom_i::SetShape( const char* theID, const char* theName )
|
||||||
{
|
{
|
||||||
delete myShapeName;
|
delete myShapeName;
|
||||||
myShapeName = strdup( theName );
|
|
||||||
delete myShapeID;
|
delete myShapeID;
|
||||||
if ( theID )
|
myShapeName = strdup( theName );
|
||||||
myShapeID = strdup( theID );
|
myShapeID = strdup( theID );
|
||||||
else
|
bool hasName = ( theName && theName[0] );
|
||||||
myShapeID = 0;
|
bool hasID = ( theID && theID[0] );
|
||||||
|
|
||||||
if ( myShapeID && myShapeName == getShapeNameByID(myShapeID))
|
TopoDS_Shape S;
|
||||||
myLyingOnGeomPtr->SetGeom( getShapeByID(myShapeID) );
|
if ( hasName && hasID )
|
||||||
|
{
|
||||||
|
S = getShapeByID( myShapeID );
|
||||||
|
if ( S.IsNull() )
|
||||||
|
S = getShapeByName( myShapeName );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
myLyingOnGeomPtr->SetGeom( getShapeByName( myShapeName ) );
|
{
|
||||||
|
S = hasID ? getShapeByID( myShapeID ) : getShapeByName( myShapeName );
|
||||||
|
}
|
||||||
|
myLyingOnGeomPtr->SetGeom( S );
|
||||||
}
|
}
|
||||||
|
|
||||||
char* LyingOnGeom_i::GetShapeName()
|
char* LyingOnGeom_i::GetShapeName()
|
||||||
|
Loading…
Reference in New Issue
Block a user