HexoticPLUGIN_version.h \
doc/Makefile \
doc/salome/Makefile \
+ doc/salome/examples/Makefile \
doc/salome/gui/Makefile \
doc/salome/gui/HexoticPLUGIN/Makefile \
doc/salome/gui/HexoticPLUGIN/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/HexoticPLUGIN
+
+pyexamples_SCRIPTS = hexoticdemo.py \
+ hexoticsubdom1.py \
+ hexoticsubdom2.py \
+ hexoticsubdom3.py \
+ hexoticsubdom4.py
+
+EXTRA_DIST += $(pyexamples_SCRIPTS)
--- /dev/null
+
+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 sphere
+sphere = geompy.MakeSphereR(100.)
+geompy.addToStudy(sphere, "sphere")
+
+# create a mesh on the sphere
+hexoticMesh = smesh.Mesh(sphere,"sphere: BLSurf and Hexotic mesh")
+
+# create a BLSurf algorithm for faces
+BLSURF = hexoticMesh.Triangle(algo=smeshBuilder.BLSURF)
+BLSURF.SetGeometricMesh( 1 )
+
+# create a Hexotic algorithm for volumes
+HEXOTIC = hexoticMesh.Hexahedron(algo=smeshBuilder.Hexotic)
+
+# compute the mesh
+hexoticMesh.Compute()
+
+# Change the level of subdivision
+HEXOTIC.SetMinMaxHexes(4, 8)
+
+# End of script
--- /dev/null
+
+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 geometry: a box cut by a holed sphere
+Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+Sphere_1 = geompy.MakeSphereR(75)
+Sphere_2 = geompy.MakeSphereR(25)
+geompy.TranslateDXDYDZ(Box_1, -100, -100, -100)
+Cut_1 = geompy.MakeCut(Sphere_1, Sphere_2)
+Cut_2 = geompy.MakeCut(Box_1, Cut_1)
+geompy.addToStudy( Box_1, 'Box_1' )
+geompy.addToStudy( Sphere_1, 'Sphere_1' )
+geompy.addToStudy( Sphere_2, 'Sphere_2' )
+geompy.addToStudy( Cut_1, 'Cut_1' )
+geompy.addToStudy( Cut_2, 'Cut_2' )
+
+# Create filters
+# aFilter1: elements inside small sphere
+aFilter1 = smesh.GetFilterFromCriteria([smesh.GetCriterion(SMESH.VOLUME,SMESH.FT_BelongToGeom,SMESH.FT_Undefined,Sphere_2)])
+# aFilter2: elements inside big sphere and not inside small sphere
+aFilter2 = smesh.GetFilterFromCriteria([smesh.GetCriterion(SMESH.VOLUME,SMESH.FT_BelongToGeom,SMESH.FT_Undefined,Sphere_1, SMESH.FT_LogicalAND),
+ smesh.GetCriterion(SMESH.VOLUME,SMESH.FT_BelongToGeom,SMESH.FT_Undefined,Sphere_2, SMESH.FT_LogicalNOT)])
+# aFilter3: elements not inside big sphere
+aFilter3 = smesh.GetFilterFromCriteria([smesh.GetCriterion(SMESH.VOLUME,SMESH.FT_BelongToGeom,SMESH.FT_Undefined,Sphere_1, SMESH.FT_LogicalNOT)])
+
+# Create mesh of Cut_2 with sd mode 1
+print "Create mesh of Cut_2 with sd mode 1"
+Mesh_hexotic_sd1 = smesh.Mesh(Cut_2, "Mesh_hexotic_sd1")
+
+# Create the 2D algo: BlSurf with geometrical mesh
+Mesh_hexotic_sd1.Triangle(algo=smeshBuilder.BLSURF).Parameters().SetGeometricMesh( 1 )
+
+# Create the 3D algo: Hexotic with:
+# - minl = 4
+# - maxl = 8
+# - sd = 1
+Mesh_hexotic_sd1.Hexahedron(algo=smeshBuilder.Hexotic).SetMinMaxHexes(4, 8).SetHexoticSdMode( 1 )
+
+# Create the groups on filters
+g1 = Mesh_hexotic_sd1.GroupOnFilter(SMESH.VOLUME, 'small sphere', aFilter1 )
+g1.SetColor( SALOMEDS.Color( 1, 0, 0 ))
+g2 = Mesh_hexotic_sd1.GroupOnFilter(SMESH.VOLUME, 'big sphere - small sphere', aFilter2 )
+g2.SetColor( SALOMEDS.Color( 0, 1, 0 ))
+g3 = Mesh_hexotic_sd1.GroupOnFilter(SMESH.VOLUME, 'box - big sphere', aFilter3 )
+g3.SetColor( SALOMEDS.Color( 0, 0, 1 ))
+
+# Compute
+Mesh_hexotic_sd1.Compute()
+
+# End of script
--- /dev/null
+
+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 geometry: a box cut by a holed sphere
+Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+Sphere_1 = geompy.MakeSphereR(75)
+Sphere_2 = geompy.MakeSphereR(25)
+geompy.TranslateDXDYDZ(Box_1, -100, -100, -100)
+Cut_1 = geompy.MakeCut(Sphere_1, Sphere_2)
+Cut_2 = geompy.MakeCut(Box_1, Cut_1)
+geompy.addToStudy( Box_1, 'Box_1' )
+geompy.addToStudy( Sphere_1, 'Sphere_1' )
+geompy.addToStudy( Sphere_2, 'Sphere_2' )
+geompy.addToStudy( Cut_1, 'Cut_1' )
+geompy.addToStudy( Cut_2, 'Cut_2' )
+
+# Create filters
+# aFilter1: elements inside small sphere
+aFilter1 = smesh.GetFilterFromCriteria([smesh.GetCriterion(SMESH.VOLUME,SMESH.FT_BelongToGeom,SMESH.FT_Undefined,Sphere_2)])
+# aFilter2: elements inside big sphere and not inside small sphere
+aFilter2 = smesh.GetFilterFromCriteria([smesh.GetCriterion(SMESH.VOLUME,SMESH.FT_BelongToGeom,SMESH.FT_Undefined,Sphere_1, SMESH.FT_LogicalAND),
+ smesh.GetCriterion(SMESH.VOLUME,SMESH.FT_BelongToGeom,SMESH.FT_Undefined,Sphere_2, SMESH.FT_LogicalNOT)])
+# aFilter3: elements not inside big sphere
+aFilter3 = smesh.GetFilterFromCriteria([smesh.GetCriterion(SMESH.VOLUME,SMESH.FT_BelongToGeom,SMESH.FT_Undefined,Sphere_1, SMESH.FT_LogicalNOT)])
+
+# Create mesh of Cut_2 with sd mode 2
+print "Create mesh of Cut_2 with sd mode 2"
+Mesh_hexotic_sd2 = smesh.Mesh(Cut_2, "Mesh_hexotic_sd2")
+
+# Create the 2D algo: BlSurf with geometrical mesh
+Mesh_hexotic_sd2.Triangle(algo=smeshBuilder.BLSURF).Parameters().SetGeometricMesh( 1 )
+
+# Create the 3D algo: Hexotic with:
+# - minl = 4
+# - maxl = 8
+# - sd = 2
+Mesh_hexotic_sd2.Hexahedron(algo=smeshBuilder.Hexotic).SetMinMaxHexes(4, 8).SetHexoticSdMode( 2 )
+
+# Create the groups on filters
+g1 = Mesh_hexotic_sd2.GroupOnFilter(SMESH.VOLUME, 'small sphere', aFilter1 )
+g1.SetColor( SALOMEDS.Color( 1, 0, 0 ))
+g2 = Mesh_hexotic_sd2.GroupOnFilter(SMESH.VOLUME, 'big sphere - small sphere', aFilter2 )
+g2.SetColor( SALOMEDS.Color( 0, 1, 0 ))
+g3 = Mesh_hexotic_sd2.GroupOnFilter(SMESH.VOLUME, 'box - big sphere', aFilter3 )
+g3.SetColor( SALOMEDS.Color( 0, 0, 1 ))
+
+# Compute
+Mesh_hexotic_sd2.Compute()
+
+# End of script
+
--- /dev/null
+
+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 geometry: a box cut by a holed sphere
+Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+Sphere_1 = geompy.MakeSphereR(75)
+Sphere_2 = geompy.MakeSphereR(25)
+geompy.TranslateDXDYDZ(Box_1, -100, -100, -100)
+Cut_1 = geompy.MakeCut(Sphere_1, Sphere_2)
+Cut_2 = geompy.MakeCut(Box_1, Cut_1)
+geompy.addToStudy( Box_1, 'Box_1' )
+geompy.addToStudy( Sphere_1, 'Sphere_1' )
+geompy.addToStudy( Sphere_2, 'Sphere_2' )
+geompy.addToStudy( Cut_1, 'Cut_1' )
+geompy.addToStudy( Cut_2, 'Cut_2' )
+
+# Create filters
+# aFilter1: elements inside small sphere
+aFilter1 = smesh.GetFilterFromCriteria([smesh.GetCriterion(SMESH.VOLUME,SMESH.FT_BelongToGeom,SMESH.FT_Undefined,Sphere_2)])
+# aFilter2: elements inside big sphere and not inside small sphere
+aFilter2 = smesh.GetFilterFromCriteria([smesh.GetCriterion(SMESH.VOLUME,SMESH.FT_BelongToGeom,SMESH.FT_Undefined,Sphere_1, SMESH.FT_LogicalAND),
+ smesh.GetCriterion(SMESH.VOLUME,SMESH.FT_BelongToGeom,SMESH.FT_Undefined,Sphere_2, SMESH.FT_LogicalNOT)])
+# aFilter3: elements not inside big sphere
+aFilter3 = smesh.GetFilterFromCriteria([smesh.GetCriterion(SMESH.VOLUME,SMESH.FT_BelongToGeom,SMESH.FT_Undefined,Sphere_1, SMESH.FT_LogicalNOT)])
+
+# Create mesh of Cut_2 with sd mode 3
+print "Create mesh of Cut_2 with sd mode 3"
+Mesh_hexotic_sd3 = smesh.Mesh(Cut_2, "Mesh_hexotic_sd3")
+
+# Create the 2D algo: BlSurf with geometrical mesh
+Mesh_hexotic_sd3.Triangle(algo=smeshBuilder.BLSURF).Parameters().SetGeometricMesh( 1 )
+
+# Create the 3D algo: Hexotic with:
+# - minl = 4
+# - maxl = 8
+# - sd = 3
+Mesh_hexotic_sd3.Hexahedron(algo=smeshBuilder.Hexotic).SetMinMaxHexes(4, 8).SetHexoticSdMode( 3 )
+
+# Create the groups on filters
+g1 = Mesh_hexotic_sd3.GroupOnFilter(SMESH.VOLUME, 'small sphere', aFilter1 )
+g1.SetColor( SALOMEDS.Color( 1, 0, 0 ))
+g2 = Mesh_hexotic_sd3.GroupOnFilter(SMESH.VOLUME, 'big sphere - small sphere', aFilter2 )
+g2.SetColor( SALOMEDS.Color( 0, 1, 0 ))
+g3 = Mesh_hexotic_sd3.GroupOnFilter(SMESH.VOLUME, 'box - big sphere', aFilter3 )
+g3.SetColor( SALOMEDS.Color( 0, 0, 1 ))
+
+# Compute
+Mesh_hexotic_sd3.Compute()
+
+# End of script
+
--- /dev/null
+
+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 geometry: a box cut by a plane
+Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+Translation_1 = geompy.MakeTranslation(Box_1, 0, 200, 0)
+Partition_1 = geompy.MakePartition([Box_1, Translation_1], [], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+geompy.addToStudy( Box_1, 'Box_1' )
+geompy.addToStudy( Translation_1, 'Translation_1' )
+geompy.addToStudy( Partition_1, 'Partition_1' )
+
+# Create mesh of Partition_1 with sd mode 4 (default sd mode in SALOME)
+Mesh_hexotic_sd4 = smesh.Mesh(Partition_1, "Mesh_hexotic_sd4")
+Mesh_hexotic_sd4.Triangle(algo=smeshBuilder.BLSURF)
+Mesh_hexotic_sd4.Hexahedron(algo=smeshBuilder.Hexotic).SetMinMaxHexes(4, 8).SetHexoticSdMode( 4 )
+
+# Compute
+Mesh_hexotic_sd4.Compute()
+
+# End of script
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=HexoticPLUGIN
-smesh.py: $(top_srcdir)/src/HexoticPlugin/HexoticPLUGINDC.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 $@ HexoticPLUGIN
-
-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
#rnv: 07.04.2011 Workaround for the doxygen 1.7.3:
#because it wrongly defines location of the html files for search.
TAGFILES = hexoticpluginpy_doc.tag=../HexoticPLUGIN/hexoticpluginpy_doc
-SEARCHENGINE = YES
\ No newline at end of file
+SEARCHENGINE = YES
+
+#---------------------------------------------------------------------------
+#Custom commands
+#---------------------------------------------------------------------------
+ALIASES += tui_script{1}="\include \1 <a href=\"../../examples/HexoticPLUGIN/\1\">Download this script</a>"
#---------------------------------------------------------------------------
#Input related options
#---------------------------------------------------------------------------
-INPUT = @top_srcdir@/src/HexoticPlugin/HexoticPLUGINDC.py \
- smesh.py \
- @SMESH_ROOT_DIR@/bin/salome/smesh_algorithm.py
+INPUT = @top_srcdir@/src/HexoticPlugin/HexoticPLUGINBuilder.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 hexoticplugin_python_interface_page Python Interface
-Python package HexoticPLUGINDC defines several classes, destined for creation of the 3D meshes.
+Python package HexoticPLUGIN defines several classes, destined for creation of the 3D meshes.
Hexotic meshing plugin dynamically adds several methods to the smesh.Mesh class to create meshing algorithms.
\section tui_hexotic_basic Construction of Mesh using Hexotic algorithm
-\code
-import geompy
-import smesh
-
-# create a sphere
-sphere = geompy.MakeSphereR(100.)
-geompy.addToStudy(sphere, "sphere")
-
-# create a mesh on the sphere
-hexoticMesh = smesh.Mesh(sphere,"sphere: BLSurf and Hexotic mesh")
-
-# create a BLSurf algorithm for faces
-BLSURF = hexoticMesh.Triangle(algo=smesh.BLSURF)
-BLSURF.SetGeometricMesh( 1 )
-
-# create a Hexotic algorithm for volumes
-HEXOTIC = hexoticMesh.Hexahedron(algo=smesh.Hexotic)
-
-# compute the mesh
-hexoticMesh.Compute()
-
-# Change the level of subdivision
-HEXOTIC.SetMinMaxHexes(4, 8)
-
-# End of script
-\endcode
+<h2>Example of mesh generation with Hexotic algorithm:</h2>
+\tui_script{hexoticdemo.py}
\image html hexotic_basic_subdivisions_4_8.png Left: Hexotic mesh without hypothesis, right: Hexotic mesh with an hypothesis defined by minl=4 and maxl=8
\subsection tui_hexotic_sd_mode1 Sub-domain mode = 1
-\code
-import SALOMEDS
-import geompy
-import smesh
-
-# Create geometry: a box cut by a holed sphere
-Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
-Sphere_1 = geompy.MakeSphereR(75)
-Sphere_2 = geompy.MakeSphereR(25)
-geompy.TranslateDXDYDZ(Box_1, -100, -100, -100)
-Cut_1 = geompy.MakeCut(Sphere_1, Sphere_2)
-Cut_2 = geompy.MakeCut(Box_1, Cut_1)
-geompy.addToStudy( Box_1, 'Box_1' )
-geompy.addToStudy( Sphere_1, 'Sphere_1' )
-geompy.addToStudy( Sphere_2, 'Sphere_2' )
-geompy.addToStudy( Cut_1, 'Cut_1' )
-geompy.addToStudy( Cut_2, 'Cut_2' )
-
-# Create filters
-# aFilter1: elements inside small sphere
-aFilter1 = smesh.GetFilterFromCriteria([smesh.GetCriterion(smesh.VOLUME,smesh.FT_BelongToGeom,smesh.FT_Undefined,Sphere_2)])
-# aFilter2: elements inside big sphere and not inside small sphere
-aFilter2 = smesh.GetFilterFromCriteria([smesh.GetCriterion(smesh.VOLUME,smesh.FT_BelongToGeom,smesh.FT_Undefined,Sphere_1, smesh.FT_LogicalAND),
- smesh.GetCriterion(smesh.VOLUME,smesh.FT_BelongToGeom,smesh.FT_Undefined,Sphere_2, smesh.FT_LogicalNOT)])
-# aFilter3: elements not inside big sphere
-aFilter3 = smesh.GetFilterFromCriteria([smesh.GetCriterion(smesh.VOLUME,smesh.FT_BelongToGeom,smesh.FT_Undefined,Sphere_1, smesh.FT_LogicalNOT)])
-
-# Create mesh of Cut_2 with sd mode 1
-print "Create mesh of Cut_2 with sd mode 1"
-Mesh_hexotic_sd1 = smesh.Mesh(Cut_2, "Mesh_hexotic_sd1")
-
-# Create the 2D algo: BlSurf with geometrical mesh
-Mesh_hexotic_sd1.Triangle(algo=smesh.BLSURF).Parameters().SetGeometricMesh( 1 )
-
-# Create the 3D algo: Hexotic with:
-# - minl = 4
-# - maxl = 8
-# - sd = 1
-Mesh_hexotic_sd1.Hexahedron(algo=smesh.Hexotic).SetMinMaxHexes(4, 8).SetHexoticSdMode( 1 )
-
-# Create the groups on filters
-g1 = Mesh_hexotic_sd1.GroupOnFilter(smesh.VOLUME, 'small sphere', aFilter1 )
-g1.SetColor( SALOMEDS.Color( 1, 0, 0 ))
-g2 = Mesh_hexotic_sd1.GroupOnFilter(smesh.VOLUME, 'big sphere - small sphere', aFilter2 )
-g2.SetColor( SALOMEDS.Color( 0, 1, 0 ))
-g3 = Mesh_hexotic_sd1.GroupOnFilter(smesh.VOLUME, 'box - big sphere', aFilter3 )
-g3.SetColor( SALOMEDS.Color( 0, 0, 1 ))
-
-# Compute
-Mesh_hexotic_sd1.Compute()
-
-# End of script
-\endcode
+<h2>Example of sub-domain mode 1 with Hexotic algorithm:</h2>
+\tui_script{hexoticsubdom1.py}
\image html hexotic_sd_mode_1.png Hexotic mesh of a box cut by a holed sphere ( sd = 1 )
\subsection tui_hexotic_sd_mode2 Sub-domain mode = 2
-\code
-
-# Create mesh of Cut_2 with sd mode 2
-print "Create mesh of Cut_2 with sd mode 2"
-Mesh_hexotic_sd2 = smesh.Mesh(Cut_2, "Mesh_hexotic_sd2")
-
-# Create the 2D algo: BlSurf with geometrical mesh
-Mesh_hexotic_sd2.Triangle(algo=smesh.BLSURF).Parameters().SetGeometricMesh( 1 )
-
-# Create the 3D algo: Hexotic with:
-# - minl = 4
-# - maxl = 8
-# - sd = 2
-Mesh_hexotic_sd2.Hexahedron(algo=smesh.Hexotic).SetMinMaxHexes(4, 8).SetHexoticSdMode( 2 )
-
-# Create the groups on filters
-g1 = Mesh_hexotic_sd2.GroupOnFilter(smesh.VOLUME, 'small sphere', aFilter1 )
-g1.SetColor( SALOMEDS.Color( 1, 0, 0 ))
-g2 = Mesh_hexotic_sd2.GroupOnFilter(smesh.VOLUME, 'big sphere - small sphere', aFilter2 )
-g2.SetColor( SALOMEDS.Color( 0, 1, 0 ))
-g3 = Mesh_hexotic_sd2.GroupOnFilter(smesh.VOLUME, 'box - big sphere', aFilter3 )
-g3.SetColor( SALOMEDS.Color( 0, 0, 1 ))
-
-# Compute
-Mesh_hexotic_sd2.Compute()
-
-# End of script
-\endcode
+<h2>Example of sub-domain mode 2 with Hexotic algorithm:</h2>
+\tui_script{hexoticsubdom2.py}
\image html hexotic_sd_mode_2.png Hexotic mesh of a box cut by a holed sphere ( sd = 2 )
\subsection tui_hexotic_sd_mode3 Sub-domain mode = 3
-\code
-
-# Create mesh of Cut_2 with sd mode 3
-print "Create mesh of Cut_2 with sd mode 3"
-Mesh_hexotic_sd3 = smesh.Mesh(Cut_2, "Mesh_hexotic_sd3")
-
-# Create the 2D algo: BlSurf with geometrical mesh
-Mesh_hexotic_sd3.Triangle(algo=smesh.BLSURF).Parameters().SetGeometricMesh( 1 )
-
-# Create the 3D algo: Hexotic with:
-# - minl = 4
-# - maxl = 8
-# - sd = 3
-Mesh_hexotic_sd3.Hexahedron(algo=smesh.Hexotic).SetMinMaxHexes(4, 8).SetHexoticSdMode( 3 )
-
-# Create the groups on filters
-g1 = Mesh_hexotic_sd3.GroupOnFilter(smesh.VOLUME, 'small sphere', aFilter1 )
-g1.SetColor( SALOMEDS.Color( 1, 0, 0 ))
-g2 = Mesh_hexotic_sd3.GroupOnFilter(smesh.VOLUME, 'big sphere - small sphere', aFilter2 )
-g2.SetColor( SALOMEDS.Color( 0, 1, 0 ))
-g3 = Mesh_hexotic_sd3.GroupOnFilter(smesh.VOLUME, 'box - big sphere', aFilter3 )
-g3.SetColor( SALOMEDS.Color( 0, 0, 1 ))
-
-# Compute
-Mesh_hexotic_sd3.Compute()
-
-# End of script
-\endcode
+<h2>Example of sub-domain mode 3 with Hexotic algorithm:</h2>
+\tui_script{hexoticsubdom3.py}
\image html hexotic_sd_mode_3.png Hexotic mesh of a box cut by a holed sphere ( sd = 3 )
\subsection tui_hexotic_sd_mode4 Sub-domain mode = 4
-\code
-
-# Create geometry: a box cut by a plane
-Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
-Translation_1 = geompy.MakeTranslation(Box_1, 0, 200, 0)
-Partition_1 = geompy.MakePartition([Box_1, Translation_1], [], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
-geompy.addToStudy( Box_1, 'Box_1' )
-geompy.addToStudy( Translation_1, 'Translation_1' )
-geompy.addToStudy( Partition_1, 'Partition_1' )
-
-# Create mesh of Partition_1 with sd mode 4 (default sd mode in SALOME)
-Mesh_hexotic_sd4 = smesh.Mesh(Partition_1, "Mesh_hexotic_sd4")
-Mesh_hexotic_sd4.Triangle(algo=smesh.BLSURF)
-Mesh_hexotic_sd4.Hexahedron(algo=smesh.Hexotic).SetMinMaxHexes(4, 8).SetHexoticSdMode( 4 )
-
-# Compute
-Mesh_hexotic_sd4.Compute()
-
-# End of script
-\endcode
+<h2>Example of sub-domain mode 4 with Hexotic algorithm:</h2>
+\tui_script{hexoticsubdom4.py}
\image html hexotic_sd_mode_4.png Hexotic mesh of a box cut by a plane ( On the left, sd = 3: the internal surface is ignored ; on the right sd = 4: all sub-domains are meshed )
need-geom="false"
dim="3">
<python-wrap>
- <algo>Hexotic_3D=Hexahedron(algo=smesh.Hexotic)</algo>
+ <algo>Hexotic_3D=Hexahedron(algo=smeshBuilder.Hexotic)</algo>
<hypo>Hexotic_Parameters=Parameters()</hypo>
</python-wrap>
</algorithm>
--- /dev/null
+# Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+#
+# 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 HexoticPLUGINBuilder
+# Python API for the Hexotic meshing plug-in module.
+
+from salome.smesh.smesh_algorithm import Mesh_Algorithm
+from salome.smesh.smeshBuilder import AssureGeomPublished
+
+# import HexoticPlugin module if possible
+noHexoticPlugin = 0
+try:
+ import HexoticPlugin
+except ImportError:
+ noHexoticPlugin = 1
+ pass
+
+#----------------------------
+# Mesh algo type identifiers
+#----------------------------
+
+## Algorithm type: Hexotic hexahedron 3D algorithm, see Hexotic_Algorithm
+Hexotic = "Hexotic_3D"
+
+#----------------------------
+# Algorithms
+#----------------------------
+
+## Defines a hexahedron 3D algorithm
+#
+# It is created by calling smesh.Mesh.Hexahedron( smesh.Hexotic, geom=0 )
+class Hexotic_Algorithm(Mesh_Algorithm):
+
+ ## name of the dynamic method in smesh.Mesh class
+ # @internal
+ meshMethod = "Hexahedron"
+ ## type of algorithm used with helper function in smesh.Mesh class
+ # @internal
+ algoType = Hexotic
+ ## doc string of the method in smesh.Mesh class
+ # @internal
+ docHelper = "Creates hexahedron 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 noHexoticPlugin: print "Warning: HexoticPlugin module unavailable"
+ self.Create(mesh, geom, Hexotic, "libHexoticEngine.so")
+ self.params = None
+ pass
+
+ ## Defines "SetMinMaxHexes" hypothesis to give two hexotic parameters
+ # @param min minimal level of recursive partitioning on the initial octree cube
+ # @param max maximal level of recursive partitioning on the initial octree cube
+ # @return hypothesis object
+ def SetMinMaxHexes(self, min=3, max=8):
+ self.Parameters().SetHexesMinLevel(min)
+ self.Parameters().SetHexesMaxLevel(max)
+ return self.Parameters()
+
+ ## Defines "SetMinMaxSize" hypothesis to give two hexotic parameters
+ # @param min minimal element's size
+ # @param max maximal element's size
+ # @return hypothesis object
+ def SetMinMaxSize(self, min, max):
+ self.Parameters().SetMinSize(min)
+ self.Parameters().SetMaxSize(max)
+ return self.Parameters()
+
+ ## (OBSOLETE) Defines "MinMaxQuad" hypothesis to give three hexotic parameters
+ # @param min minimal level of recursive partitioning on the initial octree cube
+ # @param max maximal level of recursive partitioning on the initial octree cube
+ # @param quad not documented
+ # @return hypothesis object
+ def MinMaxQuad(self, min=3, max=8, quad=True):
+ print "WARNING: Function MinMaxQuad is deprecated, use SetMinMaxHexes instead"
+ return self.SetMinMaxHexes(min, max)
+
+ ## Defines hypothesis having several parameters
+ # @return hypothesis object
+ def Parameters(self):
+ if not self.params:
+ self.params = self.Hypothesis("Hexotic_Parameters", [],
+ "libHexoticEngine.so", UseExisting=0)
+ pass
+ return self.params
+
+
+ pass # end of Hexotic_Algorithm class
+++ /dev/null
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D
-#
-# 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 HexoticPLUGINDC
-# Python API for the Hexotic meshing plug-in module.
-
-from smesh_algorithm import Mesh_Algorithm
-from smesh import AssureGeomPublished
-
-# import HexoticPlugin module if possible
-noHexoticPlugin = 0
-try:
- import HexoticPlugin
-except ImportError:
- noHexoticPlugin = 1
- pass
-
-#----------------------------
-# Mesh algo type identifiers
-#----------------------------
-
-## Algorithm type: Hexotic hexahedron 3D algorithm, see Hexotic_Algorithm
-Hexotic = "Hexotic_3D"
-
-#----------------------------
-# Algorithms
-#----------------------------
-
-## Defines a hexahedron 3D algorithm
-#
-# It is created by calling smesh.Mesh.Hexahedron( smesh.Hexotic, geom=0 )
-class Hexotic_Algorithm(Mesh_Algorithm):
-
- ## name of the dynamic method in smesh.Mesh class
- # @internal
- meshMethod = "Hexahedron"
- ## type of algorithm used with helper function in smesh.Mesh class
- # @internal
- algoType = Hexotic
- ## doc string of the method in smesh.Mesh class
- # @internal
- docHelper = "Creates hexahedron 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 noHexoticPlugin: print "Warning: HexoticPlugin module unavailable"
- self.Create(mesh, geom, Hexotic, "libHexoticEngine.so")
- self.params = None
- pass
-
- ## Defines "SetMinMaxHexes" hypothesis to give two hexotic parameters
- # @param min minimal level of recursive partitioning on the initial octree cube
- # @param max maximal level of recursive partitioning on the initial octree cube
- # @return hypothesis object
- def SetMinMaxHexes(self, min=3, max=8):
- self.Parameters().SetHexesMinLevel(min)
- self.Parameters().SetHexesMaxLevel(max)
- return self.Parameters()
-
- ## Defines "SetMinMaxSize" hypothesis to give two hexotic parameters
- # @param min minimal element's size
- # @param max maximal element's size
- # @return hypothesis object
- def SetMinMaxSize(self, min, max):
- self.Parameters().SetMinSize(min)
- self.Parameters().SetMaxSize(max)
- return self.Parameters()
-
- ## (OBSOLETE) Defines "MinMaxQuad" hypothesis to give three hexotic parameters
- # @param min minimal level of recursive partitioning on the initial octree cube
- # @param max maximal level of recursive partitioning on the initial octree cube
- # @param quad not documented
- # @return hypothesis object
- def MinMaxQuad(self, min=3, max=8, quad=True):
- print "WARNING: Function MinMaxQuad is deprecated, use SetMinMaxHexes instead"
- return self.SetMinMaxHexes(min, max)
-
- ## Defines hypothesis having several parameters
- # @return hypothesis object
- def Parameters(self):
- if not self.params:
- self.params = self.Hypothesis("Hexotic_Parameters", [],
- "libHexoticEngine.so", UseExisting=0)
- pass
- return self.params
-
-
- pass # end of Hexotic_Algorithm class
$(BLSURFPLUGIN_LDFLAGS)
# Scripts to be installed.
-dist_salomescript_DATA=HexoticPLUGINDC.py
-
+#dist_salomescript_DATA=HexoticPLUGINDC.py
+mypkgpythondir = $(salomepythondir)/salome/HexoticPLUGIN
+mypkgpython_PYTHON = \
+ __init__.py \
+ HexoticPLUGINBuilder.py
--- /dev/null
+# Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+#
+# 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 HexoticPluginBuilder
+# Python API for the Hexotic meshing plug-in module.