mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 17:30:35 +05:00
task "Dump Python". Puslish submesh when assigning a local hypothesis
This commit is contained in:
parent
3370f352f9
commit
3c2674a6d9
@ -772,8 +772,20 @@ bool SMESH_Gen_i::AddHypothesisToShape(SALOMEDS::Study_ptr theStudy,
|
||||
// Find a mesh or submesh refering to theShape
|
||||
SALOMEDS::SObject_var aMeshOrSubMesh =
|
||||
GetMeshOrSubmeshByShape( theStudy, theMesh, theShape );
|
||||
if ( aMeshOrSubMesh->_is_nil() )
|
||||
{
|
||||
// publish submesh
|
||||
TopoDS_Shape aShape = GeomObjectToShape( theShape );
|
||||
SMESH_Mesh_i* mesh_i = objectToServant<SMESH_Mesh_i>( theMesh );
|
||||
if ( !aShape.IsNull() && mesh_i && mesh_i->GetImpl().GetMeshDS() ) {
|
||||
SMESHDS_Mesh* meshDS = mesh_i->GetImpl().GetMeshDS();
|
||||
int shapeID = meshDS->ShapeToIndex( aShape );
|
||||
SMESH::SMESH_subMesh_var aSubMesh = mesh_i->getSubMesh(shapeID);
|
||||
aMeshOrSubMesh = PublishSubMesh( theStudy, theMesh, aSubMesh, theShape );
|
||||
}
|
||||
if ( aMeshOrSubMesh->_is_nil() )
|
||||
return false;
|
||||
}
|
||||
|
||||
//Find or Create Applied Hypothesis root
|
||||
bool aIsAlgo = !SMESH::SMESH_Algo::_narrow( theHyp )->_is_nil();
|
||||
|
Loading…
Reference in New Issue
Block a user