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::SMESH_Mesh_ptr CreateMesh( GEOM::GEOM_Object_ptr theShapeObject )
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
SMESH::SMESH_Mesh_ptr CreateMeshesFromUNV( const char* theFileName )
throw ( SALOME::SALOME_Exception );