* Improve documentation for meshing plug-ins (in particular, dynamically added methods)
guidocdir = $(docdir)/gui/GHS3DPLUGIN
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=GHS3DPlugin
-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/GHS3DPlugin/GHS3DPluginDC.py
+ @PYTHONPATH=$(DOC_PYTHONPATH):${PYTHONPATH} SMESH_MeshersList=$(DOC_SMESH_MeshersList) $(PYTHON) $(SMESH_ROOT_DIR)/bin/salome/collect_mesh_methods.py -d -o $@ GHS3DPlugin
+
+usr_docs: doxyfile_py doxyfile smesh.py
+ @$(DOXYGEN) doxyfile_py ; \
+ $(DOXYGEN) doxyfile
docs: usr_docs
#---------------------------------------------------------------------------
#Input related options
#---------------------------------------------------------------------------
-INPUT = @top_srcdir@/src/GHS3DPlugin/GHS3DPluginDC.py
+INPUT = @top_srcdir@/src/GHS3DPlugin/GHS3DPluginDC.py smesh.py
FILE_PATTERNS =
IMAGE_PATH = @srcdir@/images
RECURSIVE = NO
#External reference options
#---------------------------------------------------------------------------
GENERATE_TAGFILE = ghs3dpluginpy_doc.tag
-SEARCHENGINE = YES
\ No newline at end of file
+SEARCHENGINE = YES
\page ghs3d_hypo_page GHS3D Parameters hypothesis
\anchor ghs3d_top
-\n GHS3D Parameters hypothesis works only with <b>Tetrahedron (GHS3D)</b>
+GHS3D Parameters hypothesis works only with <b>Tetrahedron (GHS3D)</b>
algorithm. This algorithm is a commercial software.
-\n To get a licence, visit http://www.distene.com/corp/eval-distene.html
--# \ref ghs3d_general_parameters
--# \ref ghs3d_advanced_parameters
--# \ref ghs3d_enforced_vertices
--# \ref ghs3d_enforced_meshes
+To get a licence, visit http://www.distene.com/corp/eval-distene.html
+
+\tableofcontents
\section ghs3d_general_parameters General parameters
\image html ghs3d_parameters_basic.png
-<ul>
-<li><b>Name</b> - allows to define the name of the hypothesis (GHS3D
-Parameters by default).</li>
+- <b>Name</b> - allows to define the name of the hypothesis (GHS3D
+Parameters by default).
-<li><b>To mesh holes</b> - if checked, the algorithm will
+- <b>To mesh holes</b> - if checked, the algorithm will
create mesh in the holes inside a solid shape, else only the outermost
shape will be meshed. Volumic elements created within holes are bound
-to the solid.</li>
-
-<li><b>Optimization level</b> - allows choosing the required
-optimization level:
-<ul>
-<li>none,</li>
-<li>light,</li>
-<li>medium (standard),</li>
-<li>standard+,</li>
-<li>strong.</li>
-</ul>
-Higher level of
-optimisation provides better mesh, but can be time-consuming.
-</li>
-</ul>
+to the solid.
+
+- <b>Optimization level</b> - allows choosing the required
+optimization level (higher level of optimisation provides better mesh,
+but can be time-consuming):
+
+ - none
+
+ - light
+
+ - medium (standard)
+
+ - standard+
+
+ - strong
\ref ghs3d_top "Back to top"
\image html ghs3d_parameters_advanced.png
-<li><b>Maximum memory size</b> - launches ghs3d software with
+- <b>Maximum memory size</b> - launches ghs3d software with
work space limited to the specified amount of RAM, in Mbytes. If this option is
-checked off, the software will be launched with 7O% of the total RAM space. </li>
+checked off, the software will be launched with 7O% of the total RAM space.
-<li><b>Initial memory size</b> - starts ghs3d software with
+- <b>Initial memory size</b> - starts ghs3d software with
the specified amount of work space, in Mbytes. If this option is checked off, the
-software will be started with 100 Megabytes of working space. </li>
+software will be started with 100 Megabytes of working space.
-<li><b>Working directory</b> - allows defining the folder for input and output
-files of ghs3d software, which are the files starting with "GHS3D_" prefix. </li>
+- <b>Working directory</b> - allows defining the folder for input and output
+files of ghs3d software, which are the files starting with "GHS3D_" prefix.
-<li><b>Keep working files</b> - allows checking input and output files
+- <b>Keep working files</b> - allows checking input and output files
of ghs3d software, while usually these files are removed after the
-launch of the mesher.</li>
+launch of the mesher.
-<li><b>Verbose level</b> - to choose verbosity level in the range from
+- <b>Verbose level</b> - to choose verbosity level in the range from
0 to 10.
-<ul> <li>0, no standard output,
-</li><li>2, prints the data, quality statistics of the skin and final
-meshes and indicates when the final mesh is being saved. In addition
-the software gives indication regarding the CPU time.
-</li><li>10, same as 2 plus the main steps in the computation, quality
-statistics histogram of the skin mesh, quality statistics histogram
-together with the characteristics of the final mesh.
-</li></ul></li>
-
-<li><b>To create new nodes</b> - if this option is checked off, ghs3d
-tries to create tetrahedrons using only the nodes of the 2D mesh.</li>
-
-<li><b>To remove the initial central point</b> TetMesh-GHS3D adds an internal point
+
+ - 0, no standard output,
+
+ - 2, prints the data, quality statistics of the skin and final
+ meshes and indicates when the final mesh is being saved. In addition
+ the software gives indication regarding the CPU time.
+
+ - 10, same as 2 plus the main steps in the computation, quality
+ statistics histogram of the skin mesh, quality statistics histogram
+ together with the characteristics of the final mesh.
+
+- <b>To create new nodes</b> - if this option is checked off, ghs3d
+tries to create tetrahedrons using only the nodes of the 2D mesh.
+
+- <b>To remove the initial central point</b> TetMesh-GHS3D adds an internal point
at the gravity centre of the bounding box to speed up and to simplify
the meshing process. However, it is possible to refrain from creating
this point by using the command line option -no initial central point. This can be
the recovery version (command line option -C).
Note: when using this option, the speed of the meshing process may
decrease, and the quality may change.
-Note: the boundary regeneration may fail with this option, in some rare cases.</li>
+Note: the boundary regeneration may fail with this option, in some rare cases.
-<li><b>To use boundary recovery version</b> - enables using a
+- <b>To use boundary recovery version</b> - enables using a
boundary recovery module which tries to
create volume meshes starting from very poor quality surface meshes
(almost flat triangles on the surface, high density propagation,
extreme aspect ratios, etc.) which fails with the standard version. The
resulting volume mesh will however most likely have a very poor
quality (poor aspect ratio of elements, tetrahedra with a very small
-positive volume).</li>
+positive volume).
-<li><b>To use FEM correction</b> - Applies finite-element correction by
+- <b>To use FEM correction</b> - Applies finite-element correction by
replacing overconstrained elements where it is possible. At first the process
slices the overconstrained edges and at second the overconstrained
facets. This ensures that there are no edges with two boundary
which have three edges on the boundary.
Note: when using this option, the speed of the meshing process may
decrease, quality may change, and the smallest volume may be smaller.
-By default, the FEM correction is not used.</li>
+By default, the FEM correction is not used.
-<li><b>Option as text</b> - allows to input in the command line any text
-for ghs3d, for example, advanced options. </li>
-
-</ul>
+- <b>Option as text</b> - allows to input in the command line any text
+for ghs3d, for example, advanced options.
\ref ghs3d_top "Back to top"
\note This feature is currently partially available only on meshes with no
geometry attached. Such meshes can be obtained by
-<ul>
-<li>Copying an existing mesh</li>
-<li>Importing a mesh from file</li>
-<li>Applying a transformation to a mesh a get result in a new mesh</li>
-</ul>
+- Copying an existing mesh
+- Importing a mesh from file
+- Applying a transformation to a mesh a get result in a new mesh
+.
See below for more details.
\image html ghs3d_enforced_vertices.png
A node will be created at the enforced vertex coordinates.
An enforced vertex is defined by:
-<ul>
-<li>A vertex</li>
-<ul>
-<li>from GEOM (Vertex, Compound) - only avaible on meshes with no
-geometry attached</li>
-<li>or from (x,y,z) cartesian coordinates</li>
-</ul>
-<li>A constant physical size</li>
-<li>If a group name is given, the created node will be added to the
-group. If the group does not exist, it is created.</li>
-</ul>
+- A vertex
+ - from GEOM (Vertex, Compound) - only avaible on meshes with no
+ geometry attached
+ - or from (x,y,z) cartesian coordinates
+- A constant physical size
+- If a group name is given, the created node will be added to the
+group. If the group does not exist, it is created.
+
\ref ghs3d_top "Back to top"
\section ghs3d_enforced_meshes Enforced Meshes
\note This feature is currently only available on 2D meshes with no
geometry attached. Such meshes can be obtained by
-<ul>
-<li>Copying an existing 2D mesh</li>
-<li>Importing a 2D mesh from file</li>
-<li>Applying a transformation to a 2D mesh a get result in a new mesh</li>
-</ul>
+- Copying an existing 2D mesh
+- Importing a 2D mesh from file
+- Applying a transformation to a 2D mesh a get result in a new mesh
\image html ghs3d_enforced_meshes.png
GHS3D algorithm can be forced by other meshes, sub-meshes or
groups. The constraint elements should be contained
entirely into the solid mesh.
-<ul>
-<li>The constraint element types are:
-<ul>
-<li>NODE</li>
-<li>EDGE</li>
-<li>FACE</li>
-</ul></li>
-<li>If a size is given, the mesh will be refined around the enforced
-elements given the size (not available yet)</li>
-<li>If a group name is given, the enforced elements will be added to
-the group. If the group does not exist, it is created.</li>
-</ul>
+- The constraint element types are:
+ - NODE
+ - EDGE
+ - FACE
+- If a size is given, the mesh will be refined around the enforced
+elements given the size (not available yet)
+- If a group name is given, the enforced elements will be added to
+the group. If the group does not exist, it is created.
<br><b>See Also</b> a sample TUI Script of the \ref tui_ghs3d "creation of a Ghs3D hypothesis", including enforced vertices and meshes.
\ref ghs3d_top "Back to top"
-
*/
\page ghs3dplugin_python_interface_page Python Interface
-Python package \ref GHS3DPluginDC "GHS3DPlugin" defines several classes, destined for creation of the 3D meshes.
+Python package GHS3DPluginDC defines several classes, destined for creation of the 3D meshes.
-Documentation for GHS3DPlugin package is available in linear form grouped by classes, declared in the GHS3DPluginDC.py file.
+BLSURF meshing plugin dynamically adds several methods to the smesh.Mesh class to create meshing algorithms.
-Below you can see an example of usage of the GHS3DPlugin package for mesh generation:
+Below you can see an example of usage of the GHS3DPlugin Python API for mesh generation:
\anchor tui_ghs3d
-<ol>
-<li>\ref tui_ghs3d_basic "Construction of Mesh using Ghs3D algorithm"</li>
-<li>\ref tui_ghs3d_enforced_vertices "Adding enforced vertices"</li>
-<li>\ref tui_ghs3d_enforced_meshes "Adding enforced mesh"</li>
-</ol>
+-# \ref tui_ghs3d_basic "Construction of Mesh using Ghs3D algorithm"
+-# \ref tui_ghs3d_enforced_vertices "Adding enforced vertices"
+-# \ref tui_ghs3d_enforced_meshes "Adding enforced mesh"
-\anchor tui_ghs3d_basic
-<h2>Construction of Mesh using Ghs3D algorithm</h2>
+\section tui_ghs3d_basic Construction of Mesh using Ghs3D algorithm
\code
import geompy
\ref tui_ghs3d "Back to top"
-\anchor tui_ghs3d_enforced_vertices
-<h2>Adding enforced vertices</h2>
+\section tui_ghs3d_enforced_vertices Adding enforced vertices
\code
\ref tui_ghs3d "Back to top"
-\anchor tui_ghs3d_enforced_meshes
-<h2>Adding enforced mesh</h2>
+\section tui_ghs3d_enforced_meshes Adding enforced mesh
\code
\mainpage Introduction to GHS3DPLUGIN
+\b GHS3DPLUGIN 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 GHS3DPLUGIN plugin used GHS3D commercial mesher and require a
license to be used within the Mesh module.
-\n \b GHS3DPLUGIN 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 GHS3DPLUGIN use \subpage ghs3d_hypo_page and \subpage additional_hypo_page
Also all GHS3DPLUGIN functionalities are accessible via
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+##
+# @package GHS3DPluginDC
+# Python API for the GHS3D meshing plug-in module.
+
+##
+# @package smesh
+# Documentation of the methods dynamically added by the GHS3D meshing plug-in to the
+# smesh.Mesh class.
+
from smesh import Mesh_Algorithm, AssureGeomPublished
# import GHS3DPlugin module if possible
# 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: GHS3D tetrahedron 3D algorithm, see GHS3D_Algorithm
GHS3D = "GHS3D_3D"
## Tetrahedron GHS3D 3D algorithm
-# It is created by calling Mesh.Tetrahedron( GHS3D, geom=0 )
-#
+#
+# It can be created by calling smesh.Mesh.Tetrahedron( smesh.GHS3D, geom=0 )
class GHS3D_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 = GHS3D
+ ## 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 noGHS3DPlugin: print "Warning: GHS3DPlugin module unavailable"
self.Create(mesh, geom, self.algoType, "libGHS3DEngine.so")
self.params = None
+ pass
## Defines hypothesis having several parameters
- #
+ # @return hypothesis object
def Parameters(self):
if not self.params:
self.params = self.Hypothesis("GHS3D_Parameters", [],
"libGHS3DEngine.so", UseExisting=0)
+ pass
return self.params
## 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
## Set Optimization level:
- # None_Optimization, Light_Optimization, Standard_Optimization, StandardPlus_Optimization,
- # Strong_Optimization.
- # Default is Standard_Optimization
+ # @param level optimization level, one of the following values
+ # - None_Optimization
+ # - Light_Optimization
+ # - Standard_Optimization
+ # - StandardPlus_Optimization
+ # - Strong_Optimization.
+ # .
+ # Default is Standard_Optimization
def SetOptimizationLevel(self, level):
self.Parameters().SetOptimizationLevel(level)
+ pass
- ## Maximal size of memory to be used by the algorithm (in Megabytes).
- #
+ ## Set maximal size of memory to be used by the algorithm (in Megabytes).
+ # @param MB maximal size of memory
def SetMaximumMemory(self, MB):
self.Parameters().SetMaximumMemory(MB)
+ pass
- ## Initial size of memory to be used by the algorithm (in Megabytes) in
+ ## Set initial size of memory to be used by the algorithm (in Megabytes) in
# automatic memory adjustment mode.
+ # @param MB initial size of memory
def SetInitialMemory(self, MB):
self.Parameters().SetInitialMemory(MB)
+ pass
- ## Path to working directory.
- #
+ ## Set path to working directory.
+ # @param path working directory
def SetWorkingDirectory(self, path):
self.Parameters().SetWorkingDirectory(path)
+ pass
## 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)
-
- ## To set verbose level [0-10]. <ul>
- #<li> 0 - no standard output,
- #<li> 2 - prints the data, quality statistics of the skin and final meshes and
- # indicates when the final mesh is being saved. In addition the software
- # gives indication regarding the CPU time.
- #<li>10 - same as 2 plus the main steps in the computation, quality statistics
- # histogram of the skin mesh, quality statistics histogram together with
- # the characteristics of the final mesh.</ul>
+ pass
+
+ ## Set verbosity level [0-10].
+ # @param level verbosity level
+ # - 0 - no standard output,
+ # - 2 - prints the data, quality statistics of the skin and final meshes and
+ # indicates when the final mesh is being saved. In addition the software
+ # gives indication regarding the CPU time.
+ # - 10 - same as 2 plus the main steps in the computation, quality statistics
+ # histogram of the skin mesh, quality statistics histogram together with
+ # the characteristics of the final mesh.
def SetVerboseLevel(self, level):
self.Parameters().SetVerboseLevel(level)
+ pass
## To create new nodes.
+ # @param toCreate "create new nodes" flag value
def SetToCreateNewNodes(self, toCreate):
self.Parameters().SetToCreateNewNodes(toCreate)
+ pass
## To use boundary recovery version which tries to create mesh on a very poor
# quality surface mesh.
+ # @param toUse "use boundary recovery version" flag value
def SetToUseBoundaryRecoveryVersion(self, toUse):
self.Parameters().SetToUseBoundaryRecoveryVersion(toUse)
+ pass
## Applies finite-element correction by replacing overconstrained elements where
# it is possible. The process is cutting first the overconstrained edges and
# second the overconstrained facets. This insure that no edges have two boundary
# vertices and that no facets have three boundary vertices.
+ # @param toUseFem "apply finite-element correction" flag value
def SetFEMCorrection(self, toUseFem):
self.Parameters().SetFEMCorrection(toUseFem)
+ pass
- ## To removes initial central point.
+ ## To remove initial central point.
+ # @param toRemove "remove initial central point" flag value
def SetToRemoveCentralPoint(self, toRemove):
self.Parameters().SetToRemoveCentralPoint(toRemove)
+ pass
## To set an enforced vertex.
# @param x : x coordinate
return self.Parameters().SetEnforcedVertex(x, y, z, size)
else:
return self.Parameters().SetEnforcedVertexWithGroup(x, y, z, size, groupName)
+ pass
else:
if groupName == "":
return self.Parameters().SetEnforcedVertexNamed(x, y, z, size, vertexName)
else:
return self.Parameters().SetEnforcedVertexNamedWithGroup(x, y, z, size, vertexName, groupName)
+ pass
+ pass
## To set an enforced vertex given a GEOM vertex, group or compound.
# @param theVertex : GEOM vertex (or group, compound) to be projected on theFace.
return self.Parameters().SetEnforcedVertexGeom(theVertex, size)
else:
return self.Parameters().SetEnforcedVertexGeomWithGroup(theVertex, size, groupName)
+ pass
## To remove an enforced vertex.
# @param x : x coordinate
return self.Parameters().SetEnforcedMesh(theSource, elementType)
else:
return self.Parameters().SetEnforcedMeshWithGroup(theSource, elementType, groupName)
+ pass
else:
if groupName == "":
return self.Parameters().SetEnforcedMeshSize(theSource, elementType, size)
else:
return self.Parameters().SetEnforcedMeshSizeWithGroup(theSource, elementType, size, groupName)
+ pass
+ pass
## Sets command line option as text.
+ # @param option command line option
def SetTextOption(self, option):
self.Parameters().SetTextOption(option)
+ pass
+ pass # end of GHS3D_Algorithm class