mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-30 10:10:32 +05:00
Add CreateEmptyMesh()
This commit is contained in:
parent
e018834cab
commit
a6ffc9023c
@ -637,6 +637,37 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMesh( GEOM::GEOM_Object_ptr theShapeObj
|
|||||||
return mesh._retn();
|
return mesh._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* SMESH_Gen_i::CreateEmptyMesh
|
||||||
|
*
|
||||||
|
* Create empty mesh
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
|
||||||
|
SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateEmptyMesh()
|
||||||
|
throw ( SALOME::SALOME_Exception )
|
||||||
|
{
|
||||||
|
Unexpect aCatch(SALOME_SalomeException);
|
||||||
|
if(MYDEBUG) MESSAGE( "SMESH_Gen_i::CreateMesh" );
|
||||||
|
// create mesh
|
||||||
|
SMESH::SMESH_Mesh_var mesh = this->createMesh();
|
||||||
|
|
||||||
|
// publish mesh in the study
|
||||||
|
if ( CanPublishInStudy( mesh ) ) {
|
||||||
|
SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
|
||||||
|
aStudyBuilder->NewCommand(); // There is a transaction
|
||||||
|
SALOMEDS::SObject_var aSO = PublishMesh( myCurrentStudy, mesh.in() );
|
||||||
|
aStudyBuilder->CommitCommand();
|
||||||
|
if ( !aSO->_is_nil() ) {
|
||||||
|
// Update Python script
|
||||||
|
TPythonDump() << aSO << " = " << this << ".CreateEmptyMesh()";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return mesh._retn();
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* SMESH_Gen_i::CreateMeshFromUNV
|
* SMESH_Gen_i::CreateMeshFromUNV
|
||||||
|
@ -192,6 +192,10 @@ public:
|
|||||||
SMESH::SMESH_Mesh_ptr CreateMesh( GEOM::GEOM_Object_ptr theShapeObject )
|
SMESH::SMESH_Mesh_ptr CreateMesh( GEOM::GEOM_Object_ptr theShapeObject )
|
||||||
throw ( SALOME::SALOME_Exception );
|
throw ( SALOME::SALOME_Exception );
|
||||||
|
|
||||||
|
// Create empty mesh
|
||||||
|
SMESH::SMESH_Mesh_ptr CreateEmptyMesh()
|
||||||
|
throw ( SALOME::SALOME_Exception );
|
||||||
|
|
||||||
// Create mesh(es) and import data from UNV file
|
// Create mesh(es) and import data from UNV file
|
||||||
SMESH::SMESH_Mesh_ptr CreateMeshesFromUNV( const char* theFileName )
|
SMESH::SMESH_Mesh_ptr CreateMeshesFromUNV( const char* theFileName )
|
||||||
throw ( SALOME::SALOME_Exception );
|
throw ( SALOME::SALOME_Exception );
|
||||||
|
Loading…
Reference in New Issue
Block a user