interface SMESH_MeshEditor
{
+ /*!
+ * Returns a mesh subject to edition
+ */
+ SMESH_Mesh GetMesh();
+
/*!
* Return data of mesh edition preview which is computed provided
* that the editor was obtained through SMESH_Mesh::GetMeshEditPreviewer()
if ( sameMethods.empty() ) {
const char * names[] =
{ "ExportDAT","ExportUNV","ExportSTL","ExportSAUV", "RemoveGroup","RemoveGroupWithContents",
- "GetGroups","UnionGroups","IntersectGroups","CutGroups","GetLog","GetId","ClearLog",
- "GetStudyId","HasDuplicatedGroupNamesMED","GetMEDMesh","NbNodes","NbElements",
+ "GetGroups","UnionGroups","IntersectGroups","CutGroups","CreateDimGroup","GetLog","GetId",
+ "ClearLog","GetStudyId","HasDuplicatedGroupNamesMED","GetMEDMesh","NbNodes","NbElements",
"NbEdges","NbEdgesOfOrder","NbFaces","NbFacesOfOrder","NbTriangles",
"NbTrianglesOfOrder","NbQuadrangles","NbQuadranglesOfOrder","NbPolygons","NbVolumes",
"NbVolumesOfOrder","NbTetras","NbTetrasOfOrder","NbHexas","NbHexasOfOrder",
delete myPreviewEditor; myPreviewEditor = 0;
}
+//================================================================================
+/*!
+ * \brief Returns the mesh
+ */
+//================================================================================
+
+SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::GetMesh()
+{
+ return myMesh_i->_this();
+}
+
//================================================================================
/*!
* \brief Clear members
*/
int GetMeshId() const { return myMesh->GetId(); }
+ SMESH::SMESH_Mesh_ptr GetMesh();
+
// --- CORBA
/*!
for attrName in dir(self):
attr = getattr( self, attrName )
if isinstance( attr, algoCreator ):
- #print "algoCreator ", attrName
setattr( self, attrName, attr.copy( self ))
pass
pass
pass # end of Mesh class
+## class used to add to SMESH_MeshEditor methods removed from its CORBA API
+#
+class meshEditor(SMESH._objref_SMESH_MeshEditor):
+ def __init__(self):
+ self.mesh = None
+ def __getattr__(self, name ): # method called if an attribute not found
+ if not self.mesh:
+ self.mesh = Mesh( None, None, SMESH._objref_SMESH_MeshEditor.GetMesh(self))
+ if hasattr( self.mesh, name ):
+ return getattr( self.mesh, name )
+ if name == "ExtrusionAlongPathObjX":
+ return getattr( self.mesh, "ExtrusionAlongPathX" )
+ return None
+ pass
+omniORB.registerObjref(SMESH._objref_SMESH_MeshEditor._NP_RepositoryId, meshEditor)
+
## Helper class for wrapping of SMESH.SMESH_Pattern CORBA class
#
class Pattern(SMESH._objref_SMESH_Pattern):