]> SALOME platform Git repositories - plugins/ghs3dprlplugin.git/commitdiff
Salome HOME
Merge from V6_main (04/10/2012) V7_0_0 V7_0_0rc1
authorvsr <vsr@opencascade.com>
Mon, 8 Oct 2012 13:13:20 +0000 (13:13 +0000)
committervsr <vsr@opencascade.com>
Mon, 8 Oct 2012 13:13:20 +0000 (13:13 +0000)
doc/salome/gui/GHS3DPRLPLUGIN/Makefile.am
doc/salome/gui/GHS3DPRLPLUGIN/doxyfile_py.in
doc/salome/gui/GHS3DPRLPLUGIN/input/ghs3dprlplugin_python_interface.doc
doc/salome/gui/GHS3DPRLPLUGIN/input/index.doc
src/GHS3DPRLPlugin/GHS3DPRLPluginDC.py
src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx
src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.hxx

index ef5f90db9ab834055fb362f58197f7632d9b3b39..8001ed3c92fe083ef62a2b10027f2f8e4939ee00 100755 (executable)
@@ -23,16 +23,15 @@ EXTRA_DIST += images input static/footer.html static/doxygen.css
 guidocdir = $(docdir)/gui/GHS3DPRLPLUGIN
 guidoc_DATA = images/head.png
 
+DOC_PYTHONPATH=$(prefix)/bin/salome:$(SMESH_ROOT_DIR)/bin/salome:$(SMESH_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(MED_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(GEOM_ROOT_DIR)/bin/salome:$(GEOM_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages
+DOC_SMESH_MeshersList=GHS3DPRLPlugin
 
-usr_docs: doxyfile
-       echo "===========================================" ;                    \
-       echo "Generating Python interface documentation";                       \
-       echo "===========================================" ;                    \
-       $(DOXYGEN) doxyfile_py                                                  \
-       echo "===========================================" ;                    \
-       echo "Generating GUI documentation" ;                                   \
-       echo "===========================================" ;                    \
-       $(DOXYGEN) doxyfile ;
+smesh.py: $(top_srcdir)/src/GHS3DPRLPlugin/GHS3DPRLPluginDC.py
+       @PYTHONPATH=$(DOC_PYTHONPATH):${PYTHONPATH} SMESH_MeshersList=$(DOC_SMESH_MeshersList) $(PYTHON) $(SMESH_ROOT_DIR)/bin/salome/collect_mesh_methods.py -d -o $@ GHS3DPRLPlugin
+
+usr_docs: doxyfile_py doxyfile smesh.py
+       @$(DOXYGEN) doxyfile_py ; \
+       $(DOXYGEN) doxyfile
 
 docs: usr_docs
 
index a0853212c0ab3ac2b980b64e7801fe783d4a9100..e776a1fa52b57485f6d95259b7f876065dfc7640 100755 (executable)
@@ -96,7 +96,9 @@ EXAMPLE_RECURSIVE      = NO
 #---------------------------------------------------------------------------
 #Input related options
 #---------------------------------------------------------------------------
-INPUT             = @top_srcdir@/src/GHS3DPRLPlugin/GHS3DPRLPluginDC.py
+INPUT             = @top_srcdir@/src/GHS3DPRLPlugin/GHS3DPRLPluginDC.py \
+                    smesh.py \
+                   @SMESH_ROOT_DIR@/bin/salome/smesh_algorithm.py
 FILE_PATTERNS     = 
 IMAGE_PATH        = @srcdir@/images
 RECURSIVE         = NO
@@ -129,24 +131,24 @@ GENERATE_RTF      = NO
 #---------------------------------------------------------------------------
 CLASS_DIAGRAMS         = NO
 HIDE_UNDOC_RELATIONS   = NO
-HAVE_DOT               = NO
-CLASS_GRAPH            = NO
+HAVE_DOT               = YES
+CLASS_GRAPH            = YES
 COLLABORATION_GRAPH    = NO
 GROUP_GRAPHS           = NO
 UML_LOOK               = NO
-TEMPLATE_RELATIONS     = NO
-INCLUDE_GRAPH          = NO
-INCLUDED_BY_GRAPH      = NO
+TEMPLATE_RELATIONS     = YES
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
 CALL_GRAPH             = NO
-GRAPHICAL_HIERARCHY    = NO
-DIRECTORY_GRAPH        = NO
-DOT_IMAGE_FORMAT       = jpg
+GRAPHICAL_HIERARCHY    = YES
+DIRECTORY_GRAPH        = YES
+DOT_IMAGE_FORMAT       = png
 DOT_FONTNAME           = Arial
 DOT_PATH               = 
 DOTFILE_DIRS           = 
 MAX_DOT_GRAPH_WIDTH    = 1024
-MAX_DOT_GRAPH_HEIGHT   = 1200
-MAX_DOT_GRAPH_DEPTH    = 0
+MAX_DOT_GRAPH_HEIGHT   = 1024
+MAX_DOT_GRAPH_DEPTH    = 1000
 DOT_TRANSPARENT        = NO
 DOT_MULTI_TARGETS      = NO
 GENERATE_LEGEND        = NO
@@ -156,4 +158,4 @@ DOT_CLEANUP            = YES
 #External reference options
 #---------------------------------------------------------------------------
 GENERATE_TAGFILE  = ghs3dprlpluginpy_doc.tag
-SEARCHENGINE           = YES
\ No newline at end of file
+SEARCHENGINE           = YES
index d1591e18a372aa62ab801859d5aa036004545f3f..8ef266e27c927ae7a604e5a7a66f608c9ea60283 100644 (file)
@@ -2,8 +2,8 @@
 
 \page ghs3dprlplugin_python_interface_page Python Interface
 
-Python package \ref GHS3DPRLPluginDC "GHS3DPRLPlugin" defines several classes, destined for creation of the 3D meshes.
+Python package GHS3DPRLPluginDC defines several classes, destined for creation of the 3D meshes.
 
-Documentation for GHS3DPRLPlugin package is available in linear form grouped by classes, declared in the GHS3DPRLPluginDC.py file.
+GHS3DPRL meshing plugin dynamically adds several methods to the smesh.Mesh class to create meshing algorithms.
 
 */
index 9f0df8ac1e88f4eef9add724278bdf69bdea8a42..e743708e4c2bb3124ddf8c8c55348fbbbed03000 100644 (file)
@@ -2,17 +2,13 @@
 
 \mainpage Introduction to GHS3DPRLPLUGIN
 
+\b GHS3DPRLPLUGIN plugin is destined for:
+- Meshing 3D geometric entities: volumes are split into tetrahedral (pyramidal) elements.
+- Generating 3D meshes from 2D meshes, working without geometrical objects.
+
 \note GHS3DPRLPLUGIN plugin used GHS3D commercial mesher and require a
 license to be used within the Mesh module.
 
-\n \b GHS3DPRLPLUGIN plugin is destined for:
-
-<ul>
-<li>Meshing 3D geometric entities.</li>
-    - Volumes are split into tetrahedral (pyramidal) elements.
-<li>Generating 3D meshes from 2D meshes, working without geometrical objects.</li>
-</ul>
-
 To manage parameters of the GHS3DPRLPLUGIN use \subpage ghs3dprl_hypo_page.
 
 Also all GHS3DPRLPLUGIN functionalities are accessible via
index b9bb2a34e04db8a31b4f4a1fc71d572462f99326..f72035d4fddaac59e7dc03d5f2ffc2054853996f 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-from smesh import Mesh_Algorithm, AssureGeomPublished
+##
+# @package GHS3DPRLPluginDC
+# Python API for the GHS3DPRL meshing plug-in module.
+
+from smesh_algorithm import Mesh_Algorithm
+from smesh import AssureGeomPublished
 
 # import GHS3DPRLPlugin module if possible
 noGHS3DPRLPlugin = 0
@@ -33,47 +38,79 @@ None_Optimization, Light_Optimization, Medium_Optimization, Strong_Optimization
 # V4.1 (partialy redefines V3.1). Issue 0020574
 None_Optimization, Light_Optimization, Standard_Optimization, StandardPlus_Optimization, Strong_Optimization = 0,1,2,3,4
 
+#----------------------------
+# Mesh algo type identifiers
+#----------------------------
+
+## Algorithm type: GHS3DPRL tetrahedron 3D algorithm, see GHS3DPRL_Algorithm
 GHS3DPRL = "GHS3DPRL_3D"
 
+#----------------------------
+# Algorithms
+#----------------------------
 
 ## Tetrahedron GHS3DPRL 3D algorithm
-#  It is created by calling Mesh.Tetrahedron( GHS3DPRL, geom=0 )
 #
+#  It is created by calling smesh.Mesh.Tetrahedron( smesh.GHS3DPRL, geom=0 )
 class GHS3DPRL_Algorithm(Mesh_Algorithm):
 
+    ## name of the dynamic method in smesh.Mesh class
+    #  @internal
     meshMethod = "Tetrahedron"
+    ## type of algorithm used with helper function in smesh.Mesh class
+    #  @internal
     algoType   = GHS3DPRL
+    ## doc string of the method in smesh.Mesh class
+    #  @internal
+    docHelper  = "Creates tetrahedron 3D algorithm for volumes"
 
     ## Private constructor.
+    #  @param mesh parent mesh object algorithm is assigned to
+    #  @param geom geometry (shape/sub-shape) algorithm is assigned to;
+    #              if it is @c 0 (default), the algorithm is assigned to the main shape
     def __init__(self, mesh, geom=0):
         Mesh_Algorithm.__init__(self)
-        if none_optimization: print "Warning: GHS3DPRLPlugin module unavailable"
+        if noGHS3DPRLPlugin: print "Warning: GHS3DPRLPlugin module unavailable"
         self.Create(mesh, geom, self.algoType, "libGHS3DPRLEngine.so")
+        pass
 
     ## Defines hypothesis having several parameters
-    #
+    #  @return hypothesis object
     def Parameters(self):
         if not self.params:
             self.params = self.Hypothesis("GHS3DPRL_Parameters", [],
                                           "libGHS3DPRLEngine.so", UseExisting=0)
+            pass
         return self.params
 
     ## To keep working files or remove them. Log file remains in case of errors anyway.
+    #  @param toKeep "keep working files" flag value
     def SetKeepFiles(self, toKeep):
         self.Parameters().SetKeepFiles(toKeep)
+        pass
     
     ## Sets MED files name and path.
+    #  @param value MED file name
     def SetMEDName(self, value):
         self.Parameters().SetMEDName(value)
+        pass
 
     ## Sets the number of partition of the initial mesh
+    #  @param value number of partition value
     def SetNbPart(self, value):
         self.Parameters().SetNbPart(value)
+        pass
 
     ## When big mesh, start tepal in background
+    #  @param value "background mode" flag value
     def SetBackground(self, value):
         self.Parameters().SetBackground(value)
+        pass
 
     ## To mesh "holes" in a solid or not. Default is to mesh.
+    #  @param toMesh "mesh holes" flag value
     def SetToMeshHoles(self, toMesh):
         self.Parameters().SetToMeshHoles(toMesh)
+        pass
+    
+    pass # end of GHS3DPRL_Algorithm class
index cb93731912bed4d270d9656eeb64d97f15efede5..15bc027fba457057a3288f9e0cac4915f45e9af9 100755 (executable)
@@ -25,8 +25,9 @@
 #include "GHS3DPRLPlugin_GHS3DPRL.hxx"
 #include "GHS3DPRLPlugin_Hypothesis.hxx"
 
-#include "SMDS_MeshElement.hxx"
-#include "SMDS_MeshNode.hxx"
+#include <SMDS_MeshElement.hxx>
+#include <SMDS_MeshNode.hxx>
+#include <SMESH_subMesh.hxx>
 
 #include <TopExp_Explorer.hxx>
 #include <OSD_File.hxx>
@@ -646,8 +647,8 @@ istream & operator >> (istream & load, GHS3DPRLPlugin_GHS3DPRL & hyp)
  */
 //=============================================================================
 bool GHS3DPRLPlugin_GHS3DPRL::Evaluate(SMESH_Mesh& aMesh,
-                                      const TopoDS_Shape& aShape,
-                                      MapShapeNbElems& aResMap)
+                                       const TopoDS_Shape& aShape,
+                                       MapShapeNbElems& aResMap)
 {
   int nbtri = 0, nbqua = 0;
   double fullArea = 0.0;
@@ -658,7 +659,7 @@ bool GHS3DPRLPlugin_GHS3DPRL::Evaluate(SMESH_Mesh& aMesh,
     if( anIt==aResMap.end() ) {
       SMESH_ComputeErrorPtr& smError = sm->GetComputeError();
       smError.reset( new SMESH_ComputeError(COMPERR_ALGO_FAILED,
-                                           "Submesh can not be evaluated",this));
+                                            "Submesh can not be evaluated",this));
       return false;
     }
     std::vector<int> aVec = (*anIt).second;
index 2ed2f90465b57d2f17e56a5b7dc499edd5448791..733cfc21588de38b7321be8aad198509e9bcc981 100755 (executable)
@@ -27,7 +27,7 @@
 
 #include "GHS3DPRLPlugin_Defs.hxx"
 
-#include "SMESH_3D_Algo.hxx"
+#include "SMESH_Algo.hxx"
 #include "SMESH_Mesh.hxx"
 #include "Utils_SALOME_Exception.hxx"