]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
23023: [CEA 1445] missing ExtrusionAlongPathObject function
authoreap <eap@opencascade.com>
Thu, 19 Mar 2015 14:08:42 +0000 (17:08 +0300)
committereap <eap@opencascade.com>
Thu, 19 Mar 2015 14:08:42 +0000 (17:08 +0300)
+class meshEditor(SMESH._objref_SMESH_MeshEditor):

idl/SMESH_MeshEditor.idl
src/SMESH_I/SMESH_2smeshpy.cxx
src/SMESH_I/SMESH_MeshEditor_i.cxx
src/SMESH_I/SMESH_MeshEditor_i.hxx
src/SMESH_SWIG/smeshBuilder.py

index 699f635873441c7ccc1adc6a57f5c880bca9957e..cc6dc0874ad21c60651b543a717594d087340f4b 100644 (file)
@@ -38,6 +38,11 @@ module SMESH
 
   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()
index 572413800b1a6f6229fb30578f855c8162f0e9b6..a2d70b88bbca6d15740ea7c75114a5c670190e58 100644 (file)
@@ -2102,8 +2102,8 @@ bool _pyMesh::NeedMeshAccess( const Handle(_pyCommand)& theCommand )
   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",
index accbde280d862c0bc9f5f7cab49070c776f81fb1..7b0ba25b873e150d6cf01d338c1f62f9fe5fb3a8 100644 (file)
@@ -439,6 +439,17 @@ SMESH_MeshEditor_i::~SMESH_MeshEditor_i()
   delete myPreviewEditor; myPreviewEditor = 0;
 }
 
+//================================================================================
+/*!
+ * \brief Returns the mesh
+ */
+//================================================================================
+
+SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::GetMesh()
+{
+  return myMesh_i->_this();
+}
+
 //================================================================================
 /*!
  * \brief Clear members
index bd914f3c3119c1bafca205f37133d28258d1eb2d..ec9ae9861f1a0766608eb4d3e9d18de23355b4f1 100644 (file)
@@ -57,6 +57,8 @@ public:
    */
   int GetMeshId() const { return myMesh->GetId(); }
 
+  SMESH::SMESH_Mesh_ptr GetMesh();
+
   // --- CORBA
 
   /*!
index d1887b5977be3b1f8191dbc86198efdbefaaf243..0433e460213d0c0bb8c893e12f69989443a34611 100644 (file)
@@ -1247,7 +1247,6 @@ class Mesh:
         for attrName in dir(self):
             attr = getattr( self, attrName )
             if isinstance( attr, algoCreator ):
-                #print "algoCreator ", attrName
                 setattr( self, attrName, attr.copy( self ))
                 pass
             pass
@@ -4735,6 +4734,22 @@ class Mesh:
 
     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):