NETGENPLUGIN_version.h \
doc/Makefile \
doc/salome/Makefile \
+ doc/salome/examples/Makefile \
doc/salome/gui/Makefile \
doc/salome/gui/NETGENPLUGIN/Makefile \
doc/salome/gui/NETGENPLUGIN/doxyfile \
# Modified by : Alexander BORODIN (OCN) - autotools usage
# $Header:
#
-SUBDIRS = gui
+SUBDIRS = examples gui
SUBDIRSGUI = gui
usr_docs:
--- /dev/null
+# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# File : Makefile
+# Author : Alexander KOVALEV (Open Cascade NN)
+# Modified by :
+# Module : doc
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+pyexamplesdir = $(docdir)/examples/NETGENPLUGIN
+
+pyexamples_SCRIPTS = netgendemo.py
+
+EXTRA_DIST += $(pyexamples_SCRIPTS)
--- /dev/null
+# 2d and 3d mesh generation with NETGEN
+
+import salome
+salome.salome_init()
+import GEOM
+from salome.geom import geomBuilder
+geompy = geomBuilder.New(salome.myStudy)
+
+import SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+smesh = smeshBuilder.New(salome.myStudy)
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
+geompy.addToStudy(box, "Box")
+
+
+# 1. Create a triangular 2D mesh on the box with NETGEN_1D2D algorithm
+triaN = smesh.Mesh(box, "Box : triangular mesh by NETGEN_1D2D")
+
+# create a Netgen_1D2D algorithm for solids
+algo2D = triaN.Triangle(smeshBuilder.NETGEN_1D2D)
+
+# define hypotheses
+n12_params = algo2D.Parameters()
+
+# define number of segments
+n12_params.SetNbSegPerEdge(19)
+
+# define max element
+n12_params.SetMaxSize(300)
+
+# 2. Create a tetrahedral mesh on the box with NETGEN_1D2D3D algorithm (full netgen)
+tetraN = smesh.Mesh(box, "Box : tetrahedrical mesh by NETGEN_1D2D3D")
+
+# create a Netgen_1D2D3D algorithm for solids
+algo3D = tetraN.Tetrahedron(smeshBuilder.FULL_NETGEN)
+
+# define hypotheses
+n123_params = algo3D.Parameters()
+
+# define number of segments
+n123_params.SetNbSegPerEdge(11)
+
+# define max element size
+n123_params.SetMaxSize(300)
+
+# compute the meshes
+triaN.Compute()
+tetraN.Compute()
DOC_LD_LIBRARY_PATH=$(prefix)/lib/salome:${SMESH_ROOT_DIR}/lib/salome:${MED_ROOT_DIR}/lib/salome:${GEOM_ROOT_DIR}/lib/salome:${KERNEL_ROOT_DIR}/lib/salome
DOC_SMESH_MeshersList=NETGENPlugin
-smesh.py: $(top_srcdir)/src/NETGENPlugin/NETGENPluginDC.py
- @PYTHONPATH=$(DOC_PYTHONPATH):${PYTHONPATH} LD_LIBRARY_PATH=$(DOC_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} SMESH_MeshersList=$(DOC_SMESH_MeshersList) $(PYTHON) $(SMESH_ROOT_DIR)/bin/salome/collect_mesh_methods.py -d -o $@ NETGENPlugin
-
-usr_docs: doxyfile_py doxyfile smesh.py
+usr_docs: doxyfile_py doxyfile
@$(DOXYGEN) doxyfile_py ; \
$(DOXYGEN) doxyfile
FILE_PATTERNS = *.doc
EXCLUDE =
IMAGE_PATH = @srcdir@/images
-EXAMPLE_PATH =
+EXAMPLE_PATH = @top_srcdir@/doc/salome/examples
#---------------------------------------------------------------------------
#HTML related options
#because it wrongly defines location of the html files for search.
TAGFILES = netgenpluginpy_doc.tag=../NETGENPLUGIN/netgenpluginpy_doc
SEARCHENGINE = YES
+
+#---------------------------------------------------------------------------
+#Custom commands
+#---------------------------------------------------------------------------
+ALIASES += tui_script{1}="\include \1 <a href=\"../../examples/NETGENPLUGIN/\1\">Download this script</a>"
#---------------------------------------------------------------------------
#Input related options
#---------------------------------------------------------------------------
-INPUT = @top_srcdir@/src/NETGENPlugin/NETGENPluginDC.py \
- smesh.py \
- @SMESH_ROOT_DIR@/bin/salome/smesh_algorithm.py
+INPUT = @top_srcdir@/src/NETGENPlugin/NETGENPluginBuilder.py \
+ @SMESH_ROOT_DIR@/lib/python@PYTHON_VERSION@/site-packages/salome/salome/smesh/smeshBuilder.py \
+ @SMESH_ROOT_DIR@/lib/python@PYTHON_VERSION@/site-packages/salome/salome/smesh/smesh_algorithm.py
FILE_PATTERNS =
IMAGE_PATH = @srcdir@/images
RECURSIVE = NO
\page netgenplugin_python_interface_page Python Interface
-Python package NETGENPluginDC defines several classes, destined for
+Python package NETGENPlugin defines several classes, destined for
creation of the 2D and 3D meshes.
NETGEN meshing plugin dynamically adds several methods to the
-smesh.Mesh class to create meshing algorithms.
+ \ref SMESH_SWIG.smeshBuilder.Mesh "class Mesh" to create meshing algorithms.
Below you can see an example of usage of the NETGENPlugin package for mesh generation:
-\code
-
-import geompy
-import smesh
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
-geompy.addToStudy(box, "Box")
-
-
-# 1. Create a triangular 2D mesh on the box with NETGEN_1D2D algorithm
-triaN = smesh.Mesh(box, "Box : triangular mesh by NETGEN_1D2D")
-
-# create a Netgen_1D2D algorithm for solids
-algo2D = triaN.Triangle(smesh.NETGEN_1D2D)
-
-# define hypotheses
-n12_params = algo2D.Parameters()
-
-# define number of segments
-n12_params.SetNbSegPerEdge(19)
-
-# define max element
-n12_params.SetMaxSize(300)
-
-# 2. Create a tetrahedral mesh on the box with NETGEN_1D2D3D algorithm (full netgen)
-tetraN = smesh.Mesh(box, "Box : tetrahedrical mesh by NETGEN_1D2D3D")
-
-# create a Netgen_1D2D3D algorithm for solids
-algo3D = tetraN.Tetrahedron(smesh.FULL_NETGEN)
-
-# define hypotheses
-n123_params = algo3D.Parameters()
-
-# define number of segments
-n123_params.SetNbSegPerEdge(11)
-
-# define max element size
-n123_params.SetMaxSize(300)
-
-# compute the meshes
-triaN.Compute()
-tetraN.Compute()
-
-\endcode
+\anchor example_NETGENPlugin
+<h2>Example of 2d and 3d mesh generation with NETGEN:</h2>
+\tui_script{netgendemo.py}
*/
output="TRIA,QUAD"
dim="2">
<python-wrap>
- <algo>NETGEN_2D_ONLY=Triangle(algo=smesh.NETGEN_2D)</algo>
+ <algo>NETGEN_2D_ONLY=Triangle(algo=smeshBuilder.NETGEN_2D)</algo>
<hypo>LengthFromEdges=LengthFromEdges()</hypo>
<hypo>MaxElementArea=MaxElementArea(SetMaxElementArea())</hypo>
<hypo>NETGEN_Parameters_2D_ONLY=Parameters()</hypo>
dim="2"
support-submeshes="true">
<python-wrap>
- <algo>NETGEN_2D=Triangle(algo=smesh.NETGEN_1D2D)</algo>
+ <algo>NETGEN_2D=Triangle(algo=smeshBuilder.NETGEN_1D2D)</algo>
<hypo>NETGEN_Parameters_2D=Parameters()</hypo>
<hypo>NETGEN_SimpleParameters_2D=Parameters(smesh.SIMPLE)</hypo>
<hypo>ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreEdges())</hypo>
dim="3"
support-submeshes="true">
<python-wrap>
- <algo>NETGEN_2D3D=Tetrahedron(algo=smesh.NETGEN_1D2D3D)</algo>
+ <algo>NETGEN_2D3D=Tetrahedron(algo=smeshBuilder.NETGEN_1D2D3D)</algo>
<hypo>NETGEN_Parameters=Parameters()</hypo>
<hypo>NETGEN_SimpleParameters_3D=Parameters(smesh.SIMPLE)</hypo>
</python-wrap>
$(KERNEL_LDFLAGS) -lSalomeGenericObj -lSalomeNS -lSALOMELocalTrace -lOpUtil
# Scripts to be installed.
-dist_salomescript_DATA= NETGENPluginDC.py
+#dist_salomescript_DATA= NETGENPluginDC.py
+mypkgpythondir = $(salomepythondir)/salome/NETGENPlugin
+mypkgpython_PYTHON = \
+ __init__.py \
+ NETGENPluginBuilder.py
--- /dev/null
+# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+##
+# @package NETGENPluginBuilder
+# Python API for the NETGEN meshing plug-in module.
+
+from salome.smesh.smesh_algorithm import Mesh_Algorithm
+from salome.smesh.smeshBuilder import AssureGeomPublished, ParseParameters, IsEqual
+
+# import NETGENPlugin module if possible
+noNETGENPlugin = 0
+try:
+ import NETGENPlugin
+except ImportError:
+ noNETGENPlugin = 1
+ pass
+
+#----------------------------
+# Mesh algo type identifiers
+#----------------------------
+
+## Algorithm type: Netgen tetrahedron 3D algorithm, see NETGEN_3D_Algorithm
+NETGEN_3D = "NETGEN_3D"
+## Algorithm type: Netgen tetrahedron 1D-2D-3D algorithm, see NETGEN_1D2D3D_Algorithm
+NETGEN_1D2D3D = "NETGEN_2D3D"
+## Algorithm type: Netgen triangle 1D-2D algorithm, see NETGEN_1D2D_Algorithm
+NETGEN_1D2D = "NETGEN_2D"
+## Algorithm type: Netgen triangle 2D algorithm, see NETGEN_2D_Only_Algorithm
+NETGEN_2D = "NETGEN_2D_ONLY"
+## Algorithm type: Synonim of NETGEN_1D2D3D, see NETGEN_1D2D3D_Algorithm
+NETGEN_FULL = NETGEN_1D2D3D
+## Algorithm type: Synonim of NETGEN_3D, see NETGEN_3D_Algorithm
+NETGEN = NETGEN_3D
+## Algorithm type: Synonim of NETGEN_1D2D3D, see NETGEN_1D2D3D_Algorithm
+FULL_NETGEN = NETGEN_FULL
+
+#----------------------------
+# Hypothesis type enumeration
+#----------------------------
+
+## Hypothesis type enumeration: complex hypothesis
+# (full set of parameters can be specified),
+# see NETGEN_Algorithm.Parameters()
+SOLE = 0
+## Hypothesis type enumeration: simple hypothesis
+# (only major parameters are specified),
+# see NETGEN_Algorithm.Parameters()
+SIMPLE = 1
+
+#----------------------
+# Fineness enumeration
+#----------------------
+
+## Fineness enumeration: very coarse quality of mesh,
+# see NETGEN_Algorithm.SetFineness()
+VeryCoarse = 0
+## Fineness enumeration: coarse quality of mesh,
+# see NETGEN_Algorithm.SetFineness()
+Coarse = 1
+## Fineness enumeration: moderate quality of mesh,
+# see NETGEN_Algorithm.SetFineness()
+Moderate = 2
+## Fineness enumeration: fine quality of mesh,
+# see NETGEN_Algorithm.SetFineness()
+Fine = 3
+## Fineness enumeration: very fine quality of mesh,
+# see NETGEN_Algorithm.SetFineness()
+VeryFine = 4
+## Fineness enumeration: custom quality of mesh specified by other parameters),
+# see NETGEN_Algorithm.SetFineness()
+Custom = 5
+
+#----------------------
+# Algorithms
+#----------------------
+
+## Base of all NETGEN algorithms.
+#
+# This class provides common methods for all algorithms implemented by NETGEN plugin.
+# @note This class must not be instantiated directly.
+class NETGEN_Algorithm(Mesh_Algorithm):
+
+ ## 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 noNETGENPlugin: print "Warning: NETGENPlugin module unavailable"
+ self.Create(mesh, geom, self.algoType, "libNETGENEngine.so")
+ self.params = None
+ pass
+
+ ## Sets @c MaxSize parameter
+ # @param theSize new value of the @c MaxSize parameter
+ def SetMaxSize(self, theSize):
+ if self.Parameters(): self.params.SetMaxSize(theSize)
+ pass
+
+ ## Sets @c MinSize parameter
+ # @param theSize new value of the @c MinSize parameter
+ def SetMinSize(self, theSize):
+ if self.Parameters(): self.params.SetMinSize(theSize)
+ pass
+
+ ## Sets @c Optimize flag
+ # @param theVal new value of the @c Optimize parameter
+ def SetOptimize(self, theVal):
+ if self.Parameters(): self.params.SetOptimize(theVal)
+ pass
+
+ ## Sets @c Fineness parameter
+ # @param theFineness new value of the @c Fineness parameter; it can be:
+ # @ref VeryCoarse, @ref Coarse, @ref Moderate, @ref Fine, @ref VeryFine or @ref Custom
+ def SetFineness(self, theFineness):
+ if self.Parameters(): self.params.SetFineness(theFineness)
+ pass
+
+ ## Sets @c GrowthRate parameter
+ # @param theRate new value of the @c GrowthRate parameter
+ def SetGrowthRate(self, theRate):
+ if self.Parameters(): self.params.SetGrowthRate(theRate)
+ pass
+
+ ## Creates meshing hypothesis according to the chosen algorithm type
+ # and initializes it with default parameters
+ # @param which hypothesis type; can be either @ref SOLE (default) or @ref SIMPLE
+ # @return hypothesis object
+ def Parameters(self, which=SOLE):
+ if self.algoType == NETGEN_1D2D:
+ if which == SIMPLE:
+ hypType = "NETGEN_SimpleParameters_2D"
+ else:
+ hypType = "NETGEN_Parameters_2D"
+ elif self.algoType == NETGEN_1D2D3D:
+ if which == SIMPLE:
+ hypType = "NETGEN_SimpleParameters_3D"
+ else:
+ hypType = "NETGEN_Parameters"
+ elif self.algoType == NETGEN_2D:
+ hypType = "NETGEN_Parameters_2D_ONLY"
+ else:
+ hypType = "NETGEN_Parameters_3D"
+
+ if self.params and self.params.GetName() != hypType:
+ self.mesh.RemoveHypothesis( self.params, self.geom )
+ self.params = None
+ if not self.params:
+ self.params = self.Hypothesis(hypType, [],"libNETGENEngine.so",UseExisting=0)
+
+ return self.params
+
+ pass # end of NETGEN_Algorithm class
+
+
+## Tetrahedron 1D-2D-3D algorithm.
+#
+# It can be created by calling smesh.Mesh.Tetrahedron( smesh.NETGEN_1D2D3D, geom=0 ).
+# This algorithm generates all 1D (edges), 2D (faces) and 3D (volumes) elements
+# for given geometrical shape.
+class NETGEN_1D2D3D_Algorithm(NETGEN_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 = NETGEN_1D2D3D
+ ## doc string of the method
+ # @internal
+ docHelper = "Creates tetrahedron 3D algorithm for solids"
+
+ ## 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):
+ NETGEN_Algorithm.__init__(self, mesh, geom)
+ pass
+
+ ## Sets @c SecondOrder flag
+ # @param theVal new value of the @c SecondOrder parameter
+ def SetSecondOrder(self, theVal):
+ if self.Parameters(): self.params.SetSecondOrder(theVal)
+ pass
+
+ ## Sets @c NbSegPerEdge parameter
+ # @param theVal new value of the @c NbSegPerEdge parameter
+ def SetNbSegPerEdge(self, theVal):
+ if self.Parameters(): self.params.SetNbSegPerEdge(theVal)
+ pass
+
+ ## Sets @c NbSegPerRadius parameter
+ # @param theVal new value of the @c NbSegPerRadius parameter
+ def SetNbSegPerRadius(self, theVal):
+ if self.Parameters(): self.params.SetNbSegPerRadius(theVal)
+ pass
+
+ ## Sets @c QuadAllowed flag
+ # @param toAllow new value of the @c QuadAllowed parameter (@c True by default)
+ def SetQuadAllowed(self, toAllow=True):
+ if self.Parameters(): self.params.SetQuadAllowed(toAllow)
+ pass
+
+ ## Sets number of segments overriding the value set by SetLocalLength()
+ # @param theVal new value of number of segments parameter
+ def SetNumberOfSegments(self, theVal):
+ self.Parameters(SIMPLE).SetNumberOfSegments(theVal)
+ pass
+
+ ## Sets number of segments overriding the value set by SetNumberOfSegments()
+ # @param theVal new value of local length parameter
+ def SetLocalLength(self, theVal):
+ self.Parameters(SIMPLE).SetLocalLength(theVal)
+ pass
+
+ ## Defines @c MaxElementArea parameter of @c NETGEN_SimpleParameters_3D hypothesis.
+ # Overrides value set by LengthFromEdges()
+ # @param area new value of @c MaxElementArea parameter
+ def MaxElementArea(self, area):
+ self.Parameters(SIMPLE).SetMaxElementArea(area)
+ pass
+
+ ## Defines @c LengthFromEdges parameter of @c NETGEN_SimpleParameters_3D hypothesis.
+ # Overrides value set by MaxElementArea()
+ def LengthFromEdges(self):
+ self.Parameters(SIMPLE).LengthFromEdges()
+ pass
+
+ ## Defines @c LengthFromFaces parameter of @c NETGEN_SimpleParameters_3D hypothesis.
+ # Overrides value set by MaxElementVolume()
+ def LengthFromFaces(self):
+ self.Parameters(SIMPLE).LengthFromFaces()
+ pass
+
+ ## Defines @c MaxElementVolume parameter of @c NETGEN_SimpleParameters_3D hypothesis.
+ # Overrides value set by LengthFromFaces()
+ # @param vol new value of @c MaxElementVolume parameter
+ def MaxElementVolume(self, vol):
+ self.Parameters(SIMPLE).SetMaxElementVolume(vol)
+ pass
+
+ pass # end of NETGEN_1D2D3D_Algorithm class
+
+
+## Triangle NETGEN 1D-2D algorithm.
+#
+# It can be created by calling smesh.Mesh.Triangle( smesh.NETGEN_1D2D, geom=0 )
+#
+# This algorithm generates 1D (edges) and 2D (faces) elements
+# for given geometrical shape.
+class NETGEN_1D2D_Algorithm(NETGEN_1D2D3D_Algorithm):
+
+ ## name of the dynamic method in smesh.Mesh class
+ # @internal
+ meshMethod = "Triangle"
+ ## type of algorithm used with helper function in smesh.Mesh class
+ # @internal
+ algoType = NETGEN_1D2D
+ ## doc string of the method
+ # @internal
+ docHelper = "Creates triangle 2D algorithm for faces"
+
+ ## 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):
+ NETGEN_1D2D3D_Algorithm.__init__(self, mesh, geom)
+ pass
+
+ pass # end of NETGEN_1D2D_Algorithm class
+
+
+## Triangle NETGEN 2D algorithm
+#
+# It can be created by calling smesh.Mesh.Triangle( smesh.NETGEN_2D, geom=0 )
+#
+# This algorithm generates only 2D (faces) elements for given geometrical shape
+# and, in contrast to NETGEN_1D2D_Algorithm class, should be used in conjunction
+# with other 1D meshing algorithm.
+class NETGEN_2D_Only_Algorithm(NETGEN_Algorithm):
+
+ ## name of the dynamic method in smesh.Mesh class
+ # @internal
+ meshMethod = "Triangle"
+ ## type of algorithm used with helper function in smesh.Mesh class
+ # @internal
+ algoType = NETGEN_2D
+ ## doc string of the method
+ # @internal
+ docHelper = "Creates triangle 2D algorithm for faces"
+
+ ## 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):
+ NETGEN_Algorithm.__init__(self, mesh, geom)
+ pass
+
+ ## Defines @c MaxElementArea parameter of hypothesis basing on the definition of the
+ # maximum area of each triangle
+ # @param area maximum area value of each triangle
+ # @param UseExisting if \c True - searches for an existing hypothesis created with the
+ # same parameters, else (default) - creates a new one
+ # @return hypothesis object
+ def MaxElementArea(self, area, UseExisting=0):
+ compFun = lambda hyp, args: IsEqual(hyp.GetMaxElementArea(), args[0])
+ hyp = self.Hypothesis("MaxElementArea", [area], UseExisting=UseExisting,
+ CompareMethod=compFun)
+ hyp.SetMaxElementArea(area)
+ return hyp
+
+ ## Defines @c LengthFromEdges hypothesis to build triangles
+ # based on the length of the edges taken from the wire
+ # @return hypothesis object
+ def LengthFromEdges(self):
+ hyp = self.Hypothesis("LengthFromEdges", UseExisting=1, CompareMethod=self.CompareEqualHyp)
+ return hyp
+
+ ## Sets @c QuadAllowed flag.
+ # @param toAllow new value of the @c QuadAllowed parameter (@c True by default)
+ # @return hypothesis object
+ def SetQuadAllowed(self, toAllow=True):
+ if not self.params:
+ # use simple hyps
+ hasSimpleHyps = False
+ simpleHyps = ["QuadranglePreference","LengthFromEdges","MaxElementArea"]
+ for hyp in self.mesh.GetHypothesisList( self.geom ):
+ if hyp.GetName() in simpleHyps:
+ hasSimpleHyps = True
+ if hyp.GetName() == "QuadranglePreference":
+ if not toAllow: # remove QuadranglePreference
+ self.mesh.RemoveHypothesis( self.geom, hyp )
+ else:
+ return hyp
+ return None
+ pass
+ pass
+ if hasSimpleHyps:
+ if toAllow: # add QuadranglePreference
+ return self.Hypothesis("QuadranglePreference", UseExisting=1, CompareMethod=self.CompareEqualHyp)
+ return None
+ pass
+ self.Parameters().SetQuadAllowed( toAllow )
+ return self.params
+
+ pass # end of NETGEN_2D_Only_Algorithm class
+
+
+## Tetrahedron 3D algorithm
+#
+# It can be created by calling smesh.Mesh.Tetrahedron() or smesh.Mesh.Tetrahedron( smesh.NETGEN, geom=0 )
+#
+# This algorithm generates only 3D (volumes) elements for given geometrical shape
+# and, in contrast to NETGEN_1D2D3D_Algorithm class, should be used in conjunction
+# with other 1D and 2D meshing algorithms.
+class NETGEN_3D_Algorithm(NETGEN_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 = NETGEN
+ ## flag pointing either this algorithm should be used by default in dynamic method
+ # of smesh.Mesh class
+ # @internal
+ isDefault = True
+ ## doc string of the method
+ # @internal
+ docHelper = "Creates tetrahedron 3D algorithm for solids"
+
+ ## 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):
+ NETGEN_Algorithm.__init__(self, mesh, geom)
+ pass
+
+ ## Defines @c MaxElementVolume hypothesis to specify the maximum volume value of each tetrahedron
+ # @param vol maximum volume value of each tetrahedron
+ # @param UseExisting if \c True - searches for the existing hypothesis created with
+ # the same parameters, else (default) - creates a new one
+ # @return hypothesis object
+ def MaxElementVolume(self, vol, UseExisting=0):
+ compFun = lambda hyp, args: IsEqual(hyp.GetMaxElementVolume(), args[0])
+ hyp = self.Hypothesis("MaxElementVolume", [vol], UseExisting=UseExisting,
+ CompareMethod=compFun)
+ hyp.SetMaxElementVolume(vol)
+ return hyp
+
+ pass # end of NETGEN_3D_Algorithm class
+
+
+## Triangle (helper) 1D-2D algorithm
+#
+# This is the helper class that is used just to allow creating of create NETGEN_1D2D algorithm
+# by calling smesh.Mesh.Triangle( smesh.NETGEN, geom=0 ); this is required for backward compatibility
+# with old Python scripts.
+#
+# @note This class (and corresponding smesh.Mesh function) is obsolete;
+# use smesh.Mesh.Triangle( smesh.NETGEN_1D2D, geom=0 ) instead.
+class NETGEN_1D2D_Algorithm_2(NETGEN_1D2D_Algorithm):
+
+ ## name of the dynamic method in smesh.Mesh class
+ # @internal
+ algoType = NETGEN
+
+ ## 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):
+ self.algoType = NETGEN_1D2D
+ NETGEN_1D2D_Algorithm.__init__(self,mesh, geom)
+ pass
+
+ pass # end of NETGEN_1D2D_Algorithm_2 class
+
+
+## Tetrahedron (helper) 1D-2D-3D algorithm.
+#
+# This is the helper class that is used just to allow creating of create NETGEN_1D2D3D
+# by calling smesh.Mesh.Netgen(); this is required for backward compatibility with old Python scripts.
+#
+# @note This class (and corresponding smesh.Mesh function) is obsolete;
+# use smesh.Mesh.Tetrahedron( smesh.NETGEN_1D2D3D, geom=0 ) instead.
+class NETGEN_1D2D3D_Algorithm_2(NETGEN_1D2D3D_Algorithm):
+
+ ## name of the dynamic method in smesh.Mesh class
+ # @internal
+ meshMethod = "Netgen"
+ ## doc string of the method
+ # @internal
+ docHelper = "Deprecated, used only for compatibility! See Tetrahedron() method."
+
+ ## 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):
+ NETGEN_1D2D3D_Algorithm.__init__(self,mesh, geom)
+ pass
+
+ pass # end of NETGEN_1D2D3D_Algorithm_2 class
+++ /dev/null
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-##
-# @package NETGENPluginDC
-# Python API for the NETGEN meshing plug-in module.
-
-from smesh_algorithm import Mesh_Algorithm
-from smesh import AssureGeomPublished, ParseParameters, IsEqual
-
-# import NETGENPlugin module if possible
-noNETGENPlugin = 0
-try:
- import NETGENPlugin
-except ImportError:
- noNETGENPlugin = 1
- pass
-
-#----------------------------
-# Mesh algo type identifiers
-#----------------------------
-
-## Algorithm type: Netgen tetrahedron 3D algorithm, see NETGEN_3D_Algorithm
-NETGEN_3D = "NETGEN_3D"
-## Algorithm type: Netgen tetrahedron 1D-2D-3D algorithm, see NETGEN_1D2D3D_Algorithm
-NETGEN_1D2D3D = "NETGEN_2D3D"
-## Algorithm type: Netgen triangle 1D-2D algorithm, see NETGEN_1D2D_Algorithm
-NETGEN_1D2D = "NETGEN_2D"
-## Algorithm type: Netgen triangle 2D algorithm, see NETGEN_2D_Only_Algorithm
-NETGEN_2D = "NETGEN_2D_ONLY"
-## Algorithm type: Synonim of NETGEN_1D2D3D, see NETGEN_1D2D3D_Algorithm
-NETGEN_FULL = NETGEN_1D2D3D
-## Algorithm type: Synonim of NETGEN_3D, see NETGEN_3D_Algorithm
-NETGEN = NETGEN_3D
-## Algorithm type: Synonim of NETGEN_1D2D3D, see NETGEN_1D2D3D_Algorithm
-FULL_NETGEN = NETGEN_FULL
-
-#----------------------------
-# Hypothesis type enumeration
-#----------------------------
-
-## Hypothesis type enumeration: complex hypothesis
-# (full set of parameters can be specified),
-# see NETGEN_Algorithm.Parameters()
-SOLE = 0
-## Hypothesis type enumeration: simple hypothesis
-# (only major parameters are specified),
-# see NETGEN_Algorithm.Parameters()
-SIMPLE = 1
-
-#----------------------
-# Fineness enumeration
-#----------------------
-
-## Fineness enumeration: very coarse quality of mesh,
-# see NETGEN_Algorithm.SetFineness()
-VeryCoarse = 0
-## Fineness enumeration: coarse quality of mesh,
-# see NETGEN_Algorithm.SetFineness()
-Coarse = 1
-## Fineness enumeration: moderate quality of mesh,
-# see NETGEN_Algorithm.SetFineness()
-Moderate = 2
-## Fineness enumeration: fine quality of mesh,
-# see NETGEN_Algorithm.SetFineness()
-Fine = 3
-## Fineness enumeration: very fine quality of mesh,
-# see NETGEN_Algorithm.SetFineness()
-VeryFine = 4
-## Fineness enumeration: custom quality of mesh specified by other parameters),
-# see NETGEN_Algorithm.SetFineness()
-Custom = 5
-
-#----------------------
-# Algorithms
-#----------------------
-
-## Base of all NETGEN algorithms.
-#
-# This class provides common methods for all algorithms implemented by NETGEN plugin.
-# @note This class must not be instantiated directly.
-class NETGEN_Algorithm(Mesh_Algorithm):
-
- ## 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 noNETGENPlugin: print "Warning: NETGENPlugin module unavailable"
- self.Create(mesh, geom, self.algoType, "libNETGENEngine.so")
- self.params = None
- pass
-
- ## Sets @c MaxSize parameter
- # @param theSize new value of the @c MaxSize parameter
- def SetMaxSize(self, theSize):
- if self.Parameters(): self.params.SetMaxSize(theSize)
- pass
-
- ## Sets @c MinSize parameter
- # @param theSize new value of the @c MinSize parameter
- def SetMinSize(self, theSize):
- if self.Parameters(): self.params.SetMinSize(theSize)
- pass
-
- ## Sets @c Optimize flag
- # @param theVal new value of the @c Optimize parameter
- def SetOptimize(self, theVal):
- if self.Parameters(): self.params.SetOptimize(theVal)
- pass
-
- ## Sets @c Fineness parameter
- # @param theFineness new value of the @c Fineness parameter; it can be:
- # @ref VeryCoarse, @ref Coarse, @ref Moderate, @ref Fine, @ref VeryFine or @ref Custom
- def SetFineness(self, theFineness):
- if self.Parameters(): self.params.SetFineness(theFineness)
- pass
-
- ## Sets @c GrowthRate parameter
- # @param theRate new value of the @c GrowthRate parameter
- def SetGrowthRate(self, theRate):
- if self.Parameters(): self.params.SetGrowthRate(theRate)
- pass
-
- ## Creates meshing hypothesis according to the chosen algorithm type
- # and initializes it with default parameters
- # @param which hypothesis type; can be either @ref SOLE (default) or @ref SIMPLE
- # @return hypothesis object
- def Parameters(self, which=SOLE):
- if self.algoType == NETGEN_1D2D:
- if which == SIMPLE:
- hypType = "NETGEN_SimpleParameters_2D"
- else:
- hypType = "NETGEN_Parameters_2D"
- elif self.algoType == NETGEN_1D2D3D:
- if which == SIMPLE:
- hypType = "NETGEN_SimpleParameters_3D"
- else:
- hypType = "NETGEN_Parameters"
- elif self.algoType == NETGEN_2D:
- hypType = "NETGEN_Parameters_2D_ONLY"
- else:
- hypType = "NETGEN_Parameters_3D"
-
- if self.params and self.params.GetName() != hypType:
- self.mesh.RemoveHypothesis( self.params, self.geom )
- self.params = None
- if not self.params:
- self.params = self.Hypothesis(hypType, [],"libNETGENEngine.so",UseExisting=0)
-
- return self.params
-
- pass # end of NETGEN_Algorithm class
-
-
-## Tetrahedron 1D-2D-3D algorithm.
-#
-# It can be created by calling smesh.Mesh.Tetrahedron( smesh.NETGEN_1D2D3D, geom=0 ).
-# This algorithm generates all 1D (edges), 2D (faces) and 3D (volumes) elements
-# for given geometrical shape.
-class NETGEN_1D2D3D_Algorithm(NETGEN_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 = NETGEN_1D2D3D
- ## doc string of the method
- # @internal
- docHelper = "Creates tetrahedron 3D algorithm for solids"
-
- ## 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):
- NETGEN_Algorithm.__init__(self, mesh, geom)
- pass
-
- ## Sets @c SecondOrder flag
- # @param theVal new value of the @c SecondOrder parameter
- def SetSecondOrder(self, theVal):
- if self.Parameters(): self.params.SetSecondOrder(theVal)
- pass
-
- ## Sets @c NbSegPerEdge parameter
- # @param theVal new value of the @c NbSegPerEdge parameter
- def SetNbSegPerEdge(self, theVal):
- if self.Parameters(): self.params.SetNbSegPerEdge(theVal)
- pass
-
- ## Sets @c NbSegPerRadius parameter
- # @param theVal new value of the @c NbSegPerRadius parameter
- def SetNbSegPerRadius(self, theVal):
- if self.Parameters(): self.params.SetNbSegPerRadius(theVal)
- pass
-
- ## Sets @c QuadAllowed flag
- # @param toAllow new value of the @c QuadAllowed parameter (@c True by default)
- def SetQuadAllowed(self, toAllow=True):
- if self.Parameters(): self.params.SetQuadAllowed(toAllow)
- pass
-
- ## Sets number of segments overriding the value set by SetLocalLength()
- # @param theVal new value of number of segments parameter
- def SetNumberOfSegments(self, theVal):
- self.Parameters(SIMPLE).SetNumberOfSegments(theVal)
- pass
-
- ## Sets number of segments overriding the value set by SetNumberOfSegments()
- # @param theVal new value of local length parameter
- def SetLocalLength(self, theVal):
- self.Parameters(SIMPLE).SetLocalLength(theVal)
- pass
-
- ## Defines @c MaxElementArea parameter of @c NETGEN_SimpleParameters_3D hypothesis.
- # Overrides value set by LengthFromEdges()
- # @param area new value of @c MaxElementArea parameter
- def MaxElementArea(self, area):
- self.Parameters(SIMPLE).SetMaxElementArea(area)
- pass
-
- ## Defines @c LengthFromEdges parameter of @c NETGEN_SimpleParameters_3D hypothesis.
- # Overrides value set by MaxElementArea()
- def LengthFromEdges(self):
- self.Parameters(SIMPLE).LengthFromEdges()
- pass
-
- ## Defines @c LengthFromFaces parameter of @c NETGEN_SimpleParameters_3D hypothesis.
- # Overrides value set by MaxElementVolume()
- def LengthFromFaces(self):
- self.Parameters(SIMPLE).LengthFromFaces()
- pass
-
- ## Defines @c MaxElementVolume parameter of @c NETGEN_SimpleParameters_3D hypothesis.
- # Overrides value set by LengthFromFaces()
- # @param vol new value of @c MaxElementVolume parameter
- def MaxElementVolume(self, vol):
- self.Parameters(SIMPLE).SetMaxElementVolume(vol)
- pass
-
- pass # end of NETGEN_1D2D3D_Algorithm class
-
-
-## Triangle NETGEN 1D-2D algorithm.
-#
-# It can be created by calling smesh.Mesh.Triangle( smesh.NETGEN_1D2D, geom=0 )
-#
-# This algorithm generates 1D (edges) and 2D (faces) elements
-# for given geometrical shape.
-class NETGEN_1D2D_Algorithm(NETGEN_1D2D3D_Algorithm):
-
- ## name of the dynamic method in smesh.Mesh class
- # @internal
- meshMethod = "Triangle"
- ## type of algorithm used with helper function in smesh.Mesh class
- # @internal
- algoType = NETGEN_1D2D
- ## doc string of the method
- # @internal
- docHelper = "Creates triangle 2D algorithm for faces"
-
- ## 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):
- NETGEN_1D2D3D_Algorithm.__init__(self, mesh, geom)
- pass
-
- pass # end of NETGEN_1D2D_Algorithm class
-
-
-## Triangle NETGEN 2D algorithm
-#
-# It can be created by calling smesh.Mesh.Triangle( smesh.NETGEN_2D, geom=0 )
-#
-# This algorithm generates only 2D (faces) elements for given geometrical shape
-# and, in contrast to NETGEN_1D2D_Algorithm class, should be used in conjunction
-# with other 1D meshing algorithm.
-class NETGEN_2D_Only_Algorithm(NETGEN_Algorithm):
-
- ## name of the dynamic method in smesh.Mesh class
- # @internal
- meshMethod = "Triangle"
- ## type of algorithm used with helper function in smesh.Mesh class
- # @internal
- algoType = NETGEN_2D
- ## doc string of the method
- # @internal
- docHelper = "Creates triangle 2D algorithm for faces"
-
- ## 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):
- NETGEN_Algorithm.__init__(self, mesh, geom)
- pass
-
- ## Defines @c MaxElementArea parameter of hypothesis basing on the definition of the
- # maximum area of each triangle
- # @param area maximum area value of each triangle
- # @param UseExisting if \c True - searches for an existing hypothesis created with the
- # same parameters, else (default) - creates a new one
- # @return hypothesis object
- def MaxElementArea(self, area, UseExisting=0):
- compFun = lambda hyp, args: IsEqual(hyp.GetMaxElementArea(), args[0])
- hyp = self.Hypothesis("MaxElementArea", [area], UseExisting=UseExisting,
- CompareMethod=compFun)
- hyp.SetMaxElementArea(area)
- return hyp
-
- ## Defines @c LengthFromEdges hypothesis to build triangles
- # based on the length of the edges taken from the wire
- # @return hypothesis object
- def LengthFromEdges(self):
- hyp = self.Hypothesis("LengthFromEdges", UseExisting=1, CompareMethod=self.CompareEqualHyp)
- return hyp
-
- ## Sets @c QuadAllowed flag.
- # @param toAllow new value of the @c QuadAllowed parameter (@c True by default)
- # @return hypothesis object
- def SetQuadAllowed(self, toAllow=True):
- if not self.params:
- # use simple hyps
- hasSimpleHyps = False
- simpleHyps = ["QuadranglePreference","LengthFromEdges","MaxElementArea"]
- for hyp in self.mesh.GetHypothesisList( self.geom ):
- if hyp.GetName() in simpleHyps:
- hasSimpleHyps = True
- if hyp.GetName() == "QuadranglePreference":
- if not toAllow: # remove QuadranglePreference
- self.mesh.RemoveHypothesis( self.geom, hyp )
- else:
- return hyp
- return None
- pass
- pass
- if hasSimpleHyps:
- if toAllow: # add QuadranglePreference
- return self.Hypothesis("QuadranglePreference", UseExisting=1, CompareMethod=self.CompareEqualHyp)
- return None
- pass
- self.Parameters().SetQuadAllowed( toAllow )
- return self.params
-
- pass # end of NETGEN_2D_Only_Algorithm class
-
-
-## Tetrahedron 3D algorithm
-#
-# It can be created by calling smesh.Mesh.Tetrahedron() or smesh.Mesh.Tetrahedron( smesh.NETGEN, geom=0 )
-#
-# This algorithm generates only 3D (volumes) elements for given geometrical shape
-# and, in contrast to NETGEN_1D2D3D_Algorithm class, should be used in conjunction
-# with other 1D and 2D meshing algorithms.
-class NETGEN_3D_Algorithm(NETGEN_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 = NETGEN
- ## flag pointing either this algorithm should be used by default in dynamic method
- # of smesh.Mesh class
- # @internal
- isDefault = True
- ## doc string of the method
- # @internal
- docHelper = "Creates tetrahedron 3D algorithm for solids"
-
- ## 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):
- NETGEN_Algorithm.__init__(self, mesh, geom)
- pass
-
- ## Defines @c MaxElementVolume hypothesis to specify the maximum volume value of each tetrahedron
- # @param vol maximum volume value of each tetrahedron
- # @param UseExisting if \c True - searches for the existing hypothesis created with
- # the same parameters, else (default) - creates a new one
- # @return hypothesis object
- def MaxElementVolume(self, vol, UseExisting=0):
- compFun = lambda hyp, args: IsEqual(hyp.GetMaxElementVolume(), args[0])
- hyp = self.Hypothesis("MaxElementVolume", [vol], UseExisting=UseExisting,
- CompareMethod=compFun)
- hyp.SetMaxElementVolume(vol)
- return hyp
-
- pass # end of NETGEN_3D_Algorithm class
-
-
-## Triangle (helper) 1D-2D algorithm
-#
-# This is the helper class that is used just to allow creating of create NETGEN_1D2D algorithm
-# by calling smesh.Mesh.Triangle( smesh.NETGEN, geom=0 ); this is required for backward compatibility
-# with old Python scripts.
-#
-# @note This class (and corresponding smesh.Mesh function) is obsolete;
-# use smesh.Mesh.Triangle( smesh.NETGEN_1D2D, geom=0 ) instead.
-class NETGEN_1D2D_Algorithm_2(NETGEN_1D2D_Algorithm):
-
- ## name of the dynamic method in smesh.Mesh class
- # @internal
- algoType = NETGEN
-
- ## 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):
- self.algoType = NETGEN_1D2D
- NETGEN_1D2D_Algorithm.__init__(self,mesh, geom)
- pass
-
- pass # end of NETGEN_1D2D_Algorithm_2 class
-
-
-## Tetrahedron (helper) 1D-2D-3D algorithm.
-#
-# This is the helper class that is used just to allow creating of create NETGEN_1D2D3D
-# by calling smesh.Mesh.Netgen(); this is required for backward compatibility with old Python scripts.
-#
-# @note This class (and corresponding smesh.Mesh function) is obsolete;
-# use smesh.Mesh.Tetrahedron( smesh.NETGEN_1D2D3D, geom=0 ) instead.
-class NETGEN_1D2D3D_Algorithm_2(NETGEN_1D2D3D_Algorithm):
-
- ## name of the dynamic method in smesh.Mesh class
- # @internal
- meshMethod = "Netgen"
- ## doc string of the method
- # @internal
- docHelper = "Deprecated, used only for compatibility! See Tetrahedron() method."
-
- ## 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):
- NETGEN_1D2D3D_Algorithm.__init__(self,mesh, geom)
- pass
-
- pass # end of NETGEN_1D2D3D_Algorithm_2 class
--- /dev/null
+# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+##
+# @package NETGENPluginBuilder
+# Python API for the NETGEN meshing plug-in module.