mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 08:50:35 +05:00
PAL10515. Check shape type before calling TopoDS::Face()
This commit is contained in:
parent
9dbbb779fa
commit
a5e3cc49d7
@ -131,8 +131,8 @@ CORBA::Boolean SMESH_Pattern_i::LoadFromFace(SMESH::SMESH_Mesh_ptr theMesh,
|
|||||||
if ( !aMesh )
|
if ( !aMesh )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
TopoDS_Face aFace = TopoDS::Face( myGen->GeomObjectToShape( theFace ));
|
TopoDS_Shape aFace = myGen->GeomObjectToShape( theFace );
|
||||||
if ( aFace.IsNull() )
|
if ( aFace.IsNull() || aFace.ShapeType() != TopAbs_FACE )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Update Python script
|
// Update Python script
|
||||||
@ -143,7 +143,7 @@ CORBA::Boolean SMESH_Pattern_i::LoadFromFace(SMESH::SMESH_Mesh_ptr theMesh,
|
|||||||
SMESH_Gen_i::AddToCurrentPyScript( str );
|
SMESH_Gen_i::AddToCurrentPyScript( str );
|
||||||
addErrorCode( "LoadFromFace" );
|
addErrorCode( "LoadFromFace" );
|
||||||
|
|
||||||
return myPattern.Load( aMesh, aFace, theProject );
|
return myPattern.Load( aMesh, TopoDS::Face( aFace ), theProject );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user