From: rnv Date: Tue, 27 Mar 2012 13:45:22 +0000 (+0000) Subject: 0021308: EDF 1923 SMESH: Remove hard-coded dependency of the external mesh plugins... X-Git-Tag: V6_5_0a1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2d6761de494da85c0e6a8e14a3ec8cbbc814f179;p=plugins%2Fghs3dplugin.git 0021308: EDF 1923 SMESH: Remove hard-coded dependency of the external mesh plugins from the SMESH module: Update documentation. --- diff --git a/Makefile.am b/Makefile.am index ca82224..b60c7a1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,9 +40,9 @@ else !GHS3DPLUGIN_ENABLE_GUI -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files endif -SUBDIRS = idl adm_local resources src bin +SUBDIRS = idl adm_local resources src bin doc -DIST_SUBDIRS = idl adm_local resources src bin +DIST_SUBDIRS = idl adm_local resources src bin doc DISTCLEANFILES = a.out aclocal.m4 configure local-install.sh hack_libtool diff --git a/configure.ac b/configure.ac index 05c561d..19f9b47 100644 --- a/configure.ac +++ b/configure.ac @@ -430,6 +430,14 @@ AC_OUTPUT([ \ bin/VERSION \ bin/Makefile \ GHS3DPLUGIN_version.h \ + doc/Makefile \ + doc/salome/Makefile \ + doc/salome/gui/Makefile \ + doc/salome/gui/GHS3DPLUGIN/Makefile \ + doc/salome/gui/GHS3DPLUGIN/doxyfile \ + doc/salome/gui/GHS3DPLUGIN/doxyfile_py \ + doc/salome/gui/GHS3DPLUGIN/static/header.html \ + doc/salome/gui/GHS3DPLUGIN/static/header_py.html \ src/Makefile \ src/GUI/Makefile \ src/GHS3DPlugin/Makefile \ diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..40951f3 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,24 @@ +# Copyright (C) 2007-2011 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 +# +SUBDIRS = salome + +usr_docs: + (cd salome && $(MAKE) $(AM_MAKEFLAGS) usr_docs) + +docs: usr_docs diff --git a/doc/salome/Makefile.am b/doc/salome/Makefile.am new file mode 100644 index 0000000..1f9f5cb --- /dev/null +++ b/doc/salome/Makefile.am @@ -0,0 +1,28 @@ +# Copyright (C) 2007-2011 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 +# + +SUBDIRS = gui +SUBDIRSGUI = gui + +usr_docs: + @@SETX@; for d in $(SUBDIRSGUI); do \ + (cd $$d && $(MAKE) $@) || exit 1; \ + done; + +docs: usr_docs \ No newline at end of file diff --git a/doc/salome/gui/GHS3DPLUGIN/input/ghs3dplugin_python_intarface.doc b/doc/salome/gui/GHS3DPLUGIN/input/ghs3dplugin_python_intarface.doc deleted file mode 100644 index 9042bd4..0000000 --- a/doc/salome/gui/GHS3DPLUGIN/input/ghs3dplugin_python_intarface.doc +++ /dev/null @@ -1,240 +0,0 @@ -/*! - -\page ghs3dplugin_python_intarface_page Python Interface - -Python package \ref GHS3DPluginDC "GHS3DPlugin" 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. - -Below you can see an example of usage of the GHS3DPlugin package for mesh generation: - -\anchor tui_ghs3d - -
    -
  1. \ref tui_ghs3d_basic "Construction of Mesh using Ghs3D algorithm"
  2. -
  3. \ref tui_ghs3d_enforced_vertices "Adding enforced vertices"
  4. -
  5. \ref tui_ghs3d_enforced_meshes "Adding enforced mesh"
  6. -
- -\anchor tui_ghs3d_basic -

Construction of Mesh using Ghs3D algorithm

- -\code -import geompy -import smesh -import BLSURFPlugin -import GHS3DPlugin - -# create a box -box = geompy.MakeBoxDXDYDZ(200., 200., 200.) -geompy.addToStudy(box, "box") - -# create a mesh on the box -ghs3dMesh = smesh.Mesh(box,"box: Ghs3D and BLSurf mesh") - -# create a BLSurf algorithm for faces -BLSURF = ghs3dMesh.Triangle(algo=smesh.BLSURF) -GHS3D = ghs3dMesh.Tetrahedron(algo=smesh.GHS3D) - -# compute the mesh -ghs3dMesh.Compute() - -# End of script -\endcode - -\image html ghs3d_screenshot.png Ghs3d mesh withtout hypothesis - -\ref tui_ghs3d "Back to top" - -\anchor tui_ghs3d_enforced_vertices -

Adding enforced vertices

- -\code - -# An enforced vertex can be added via: -# - the coordinates x,y,z -# - a GEOM vertex or compound (No geometry, TUI only) -# -# The created enforced nodes can also be stored in -# a group. -# -# This feature is available only on meshes without geometry. - -# Ex1: Add one enforced vertex with coordinates (50,50,100) -# and physical size 2. - -import geompy -import smesh -import BLSURFPlugin -import GHS3DPlugin - -# create a box -box = geompy.MakeBoxDXDYDZ(200., 200., 200.) -geompy.addToStudy(box, "box") -# create a mesh on the box -ghs3dMesh = smesh.Mesh(box,"box: Ghs3D and BLSurf mesh") -# create a BLSurf algorithm for faces -ghs3dMesh.Triangle(algo=smesh.BLSURF) -# compute the mesh -ghs3dMesh.Compute() - -# Make a copy of the 2D mesh -ghs3dMesh_wo_geometry = smesh.CopyMesh( ghs3dMesh, 'Ghs3D wo geometry', 0, 0) - -# create a Ghs3D algorithm and hypothesis and assign them to the mesh -GHS3D = smesh.CreateHypothesis('GHS3D_3D', 'GHS3DEngine') -GHS3D_Parameters = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') -ghs3dMesh.AddHypothesis( GHS3D ) -ghs3dMesh.AddHypothesis( GHS3D_Parameters ) -# Create the enforced vertex -GHS3D_Parameters.SetEnforcedVertex( 50, 50, 100, 2) # no group -# Compute the mesh -ghs3dMesh.Compute() - - -# Ex2: Add one vertex enforced by a GEOM vertex at (50,50,100) -# with physical size 5 and add it to a group called "My special nodes" - -# Create another GHS3D hypothesis and assign it to the mesh without geometry -GHS3D_Parameters_wo_geometry = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') -ghs3dMesh_wo_geometry.AddHypothesis( GHS3D ) -ghs3dMesh_wo_geometry.AddHypothesis( GHS3D_Parameters_wo_geometry ) - -# Create the enforced vertex -p1 = geompy.MakeVertex(150, 150, 100) -geompy.addToStudy(p1, "p1") -GHS3D_Parameters_wo_geometry.SetEnforcedVertexGeomWithGroup( p1, 5 , "My special nodes") -#GHS3D_Parameters.SetEnforcedVertexGeom( p1, 5 ) # no group - -# compute the mesh -ghs3dMesh_wo_geometry.Compute() - -# Erase all enforced vertices -GHS3D_Parameters.ClearEnforcedVertices() - -# End of script - -\endcode - -\image html ghs3d_screenshot_enf1.png Ghs3d mesh with enforced vertex -\image html ghs3d_screenshot_enf2.png Ghs3d mesh with enforced vertex from GEOM vertex - -\ref tui_ghs3d "Back to top" - -\anchor tui_ghs3d_enforced_meshes -

Adding enforced mesh

- -\code - -# It is possible to constrain GHS3D with another mesh or group. -# The constraint can refer to the nodes, edges or faces. -# This feature is available only on meshes without geometry. -# The constraining elements are called enforced elements for the mesh. -# They can be recovered using groups if necessary. - -# In the following examples, a box and a cylinder are meshed. -# The mesh of the cylinder will be used as a constraint for the -# 3D mesh of the box. - -import geompy -import smesh -import BLSURFPlugin -import GHS3DPlugin - -box = geompy.MakeBoxDXDYDZ(200, 200, 200) -geompy.addToStudy( box, "box" ) -cylindre = geompy.MakeCylinderRH(50, 50) -geompy.TranslateDXDYDZ(cylindre, 100, 100, 30) -face_cyl = geompy.ExtractShapes(cylindre, geompy.ShapeType["FACE"], True)[1] -geompy.addToStudy( cylindre, 'cylindre' ) -geompy.addToStudyInFather( cylindre, face_cyl, 'face_cyl' ) -p1 = geompy.MakeVertex(20, 20, 20) -p2 = geompy.MakeVertex(180, 180, 20) -c = geompy.MakeCompound([p1,p2]) -geompy.addToStudy( p1, "p1" ) -geompy.addToStudy( p2, "p2" ) -geompy.addToStudy( c, "c" ) - -# Create the 2D algorithm and hypothesis -BLSURF = smesh.CreateHypothesis('BLSURF', 'BLSURFEngine') -# For the box -BLSURF_Parameters = smesh.CreateHypothesis('BLSURF_Parameters', 'BLSURFEngine') -BLSURF_Parameters.SetPhysicalMesh( 1 ) -BLSURF_Parameters.SetPhySize( 200 ) -# For the cylinder -BLSURF_Parameters2 = smesh.CreateHypothesis('BLSURF_Parameters', 'BLSURFEngine') -BLSURF_Parameters2.SetGeometricMesh( 1 ) - -# Create the 3D algorithm and hypothesis -GHS3D = smesh.CreateHypothesis('GHS3D_3D', 'GHS3DEngine') -GHS3D_Parameters_node = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') -#GHS3D_Parameters_node.SetToMeshHoles( 1 ) -GHS3D_Parameters_edge = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') -#GHS3D_Parameters_edge.SetToMeshHoles( 1 ) -GHS3D_Parameters_face = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') -GHS3D_Parameters_face.SetToMeshHoles( 1 ) # to mesh inside the cylinder -GHS3D_Parameters_mesh = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') -GHS3D_Parameters_mesh.SetToMeshHoles( 1 ) # to mesh inside the cylinder - -# Create the mesh on the cylinder -Mesh_cylindre = smesh.Mesh(cylindre) -smesh.SetName(Mesh_cylindre,"Mesh_cylindre") -Mesh_cylindre.AddHypothesis( BLSURF ) -Mesh_cylindre.AddHypothesis( BLSURF_Parameters2 ) -# Create some groups -face_cyl_faces = Mesh_cylindre.GroupOnGeom(face_cyl,'group_face_cyl', smesh.FACE) -face_cyl_edges = Mesh_cylindre.GroupOnGeom(face_cyl,'group_edge_cyl', smesh.EDGE) -face_cyl_nodes = Mesh_cylindre.GroupOnGeom(face_cyl,'group_node_cyl', smesh.NODE) -Mesh_cylindre.Compute() - -# Create the mesh on the cylinder -Mesh_box_tri = smesh.Mesh(box) -smesh.SetName(Mesh_box_tri,"Mesh_box_tri") -Mesh_box_tri.AddHypothesis( BLSURF ) -Mesh_box_tri.AddHypothesis( BLSURF_Parameters ) -Mesh_box_tri.Compute() - -# Create 4 copies of the 2D mesh to test the 3 types of contraints (NODE, EDGE, FACE) -# from the whole mesh and from groups of elements. -# Then the 3D algo and hypothesis are assigned to them. - -mesh_mesh = smesh.CopyMesh( Mesh_box_tri, 'Enforced by faces of mesh', 0, 0) -mesh_mesh.AddHypothesis( GHS3D ) -mesh_mesh.AddHypothesis( GHS3D_Parameters_mesh) - -mesh_node = smesh.CopyMesh( Mesh_box_tri, 'Enforced by group of nodes', 0, 0) -mesh_node.AddHypothesis( GHS3D ) -mesh_node.AddHypothesis( GHS3D_Parameters_node) - -mesh_edge = smesh.CopyMesh( Mesh_box_tri, 'Enforced by group of edges', 0, 0) -mesh_edge.AddHypothesis( GHS3D ) -mesh_edge.AddHypothesis( GHS3D_Parameters_edge) - -mesh_face = smesh.CopyMesh( Mesh_box_tri, 'Enforced by group of faces', 0, 0) -mesh_face.AddHypothesis( GHS3D ) -mesh_face.AddHypothesis( GHS3D_Parameters_face) - -# Add the enforced elements -GHS3D_Parameters_mesh.SetEnforcedMeshWithGroup(Mesh_cylindre.GetMesh(),smesh.FACE,"faces from cylinder") -GHS3D_Parameters_node.SetEnforcedMeshWithGroup(face_cyl_nodes,smesh.NODE,"nodes from face_cyl_nodes") -GHS3D_Parameters_edge.SetEnforcedMeshWithGroup(face_cyl_edges,smesh.EDGE,"edges from face_cyl_edges") -GHS3D_Parameters_face.SetEnforcedMeshWithGroup(face_cyl_faces,smesh.FACE,"faces from face_cyl_faces") - -#Compute the meshes -mesh_node.Compute() -mesh_edge.Compute() -mesh_face.Compute() -mesh_mesh.Compute() - -# End of script - -\endcode - -\image html ghs3d_screenshot_enf3.png -\image html ghs3d_screenshot_enf4.png -\image html ghs3d_screenshot_enf5.png -\image html ghs3d_screenshot_enf6.png - -\ref tui_ghs3d "Back to top" - -*/ diff --git a/doc/salome/gui/GHS3DPLUGIN/input/ghs3dplugin_python_interface.doc b/doc/salome/gui/GHS3DPLUGIN/input/ghs3dplugin_python_interface.doc new file mode 100644 index 0000000..f9ea4fa --- /dev/null +++ b/doc/salome/gui/GHS3DPLUGIN/input/ghs3dplugin_python_interface.doc @@ -0,0 +1,240 @@ +/*! + +\page ghs3dplugin_python_interface_page Python Interface + +Python package \ref GHS3DPluginDC "GHS3DPlugin" 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. + +Below you can see an example of usage of the GHS3DPlugin package for mesh generation: + +\anchor tui_ghs3d + +
    +
  1. \ref tui_ghs3d_basic "Construction of Mesh using Ghs3D algorithm"
  2. +
  3. \ref tui_ghs3d_enforced_vertices "Adding enforced vertices"
  4. +
  5. \ref tui_ghs3d_enforced_meshes "Adding enforced mesh"
  6. +
+ +\anchor tui_ghs3d_basic +

Construction of Mesh using Ghs3D algorithm

+ +\code +import geompy +import smesh +import BLSURFPlugin +import GHS3DPlugin + +# create a box +box = geompy.MakeBoxDXDYDZ(200., 200., 200.) +geompy.addToStudy(box, "box") + +# create a mesh on the box +ghs3dMesh = smesh.Mesh(box,"box: Ghs3D and BLSurf mesh") + +# create a BLSurf algorithm for faces +BLSURF = ghs3dMesh.Triangle(algo=smesh.BLSURF) +GHS3D = ghs3dMesh.Tetrahedron(algo=smesh.GHS3D) + +# compute the mesh +ghs3dMesh.Compute() + +# End of script +\endcode + +\image html ghs3d_screenshot.png Ghs3d mesh withtout hypothesis + +\ref tui_ghs3d "Back to top" + +\anchor tui_ghs3d_enforced_vertices +

Adding enforced vertices

+ +\code + +# An enforced vertex can be added via: +# - the coordinates x,y,z +# - a GEOM vertex or compound (No geometry, TUI only) +# +# The created enforced nodes can also be stored in +# a group. +# +# This feature is available only on meshes without geometry. + +# Ex1: Add one enforced vertex with coordinates (50,50,100) +# and physical size 2. + +import geompy +import smesh +import BLSURFPlugin +import GHS3DPlugin + +# create a box +box = geompy.MakeBoxDXDYDZ(200., 200., 200.) +geompy.addToStudy(box, "box") +# create a mesh on the box +ghs3dMesh = smesh.Mesh(box,"box: Ghs3D and BLSurf mesh") +# create a BLSurf algorithm for faces +ghs3dMesh.Triangle(algo=smesh.BLSURF) +# compute the mesh +ghs3dMesh.Compute() + +# Make a copy of the 2D mesh +ghs3dMesh_wo_geometry = smesh.CopyMesh( ghs3dMesh, 'Ghs3D wo geometry', 0, 0) + +# create a Ghs3D algorithm and hypothesis and assign them to the mesh +GHS3D = smesh.CreateHypothesis('GHS3D_3D', 'GHS3DEngine') +GHS3D_Parameters = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') +ghs3dMesh.AddHypothesis( GHS3D ) +ghs3dMesh.AddHypothesis( GHS3D_Parameters ) +# Create the enforced vertex +GHS3D_Parameters.SetEnforcedVertex( 50, 50, 100, 2) # no group +# Compute the mesh +ghs3dMesh.Compute() + + +# Ex2: Add one vertex enforced by a GEOM vertex at (50,50,100) +# with physical size 5 and add it to a group called "My special nodes" + +# Create another GHS3D hypothesis and assign it to the mesh without geometry +GHS3D_Parameters_wo_geometry = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') +ghs3dMesh_wo_geometry.AddHypothesis( GHS3D ) +ghs3dMesh_wo_geometry.AddHypothesis( GHS3D_Parameters_wo_geometry ) + +# Create the enforced vertex +p1 = geompy.MakeVertex(150, 150, 100) +geompy.addToStudy(p1, "p1") +GHS3D_Parameters_wo_geometry.SetEnforcedVertexGeomWithGroup( p1, 5 , "My special nodes") +#GHS3D_Parameters.SetEnforcedVertexGeom( p1, 5 ) # no group + +# compute the mesh +ghs3dMesh_wo_geometry.Compute() + +# Erase all enforced vertices +GHS3D_Parameters.ClearEnforcedVertices() + +# End of script + +\endcode + +\image html ghs3d_screenshot_enf1.png Ghs3d mesh with enforced vertex +\image html ghs3d_screenshot_enf2.png Ghs3d mesh with enforced vertex from GEOM vertex + +\ref tui_ghs3d "Back to top" + +\anchor tui_ghs3d_enforced_meshes +

Adding enforced mesh

+ +\code + +# It is possible to constrain GHS3D with another mesh or group. +# The constraint can refer to the nodes, edges or faces. +# This feature is available only on meshes without geometry. +# The constraining elements are called enforced elements for the mesh. +# They can be recovered using groups if necessary. + +# In the following examples, a box and a cylinder are meshed. +# The mesh of the cylinder will be used as a constraint for the +# 3D mesh of the box. + +import geompy +import smesh +import BLSURFPlugin +import GHS3DPlugin + +box = geompy.MakeBoxDXDYDZ(200, 200, 200) +geompy.addToStudy( box, "box" ) +cylindre = geompy.MakeCylinderRH(50, 50) +geompy.TranslateDXDYDZ(cylindre, 100, 100, 30) +face_cyl = geompy.ExtractShapes(cylindre, geompy.ShapeType["FACE"], True)[1] +geompy.addToStudy( cylindre, 'cylindre' ) +geompy.addToStudyInFather( cylindre, face_cyl, 'face_cyl' ) +p1 = geompy.MakeVertex(20, 20, 20) +p2 = geompy.MakeVertex(180, 180, 20) +c = geompy.MakeCompound([p1,p2]) +geompy.addToStudy( p1, "p1" ) +geompy.addToStudy( p2, "p2" ) +geompy.addToStudy( c, "c" ) + +# Create the 2D algorithm and hypothesis +BLSURF = smesh.CreateHypothesis('BLSURF', 'BLSURFEngine') +# For the box +BLSURF_Parameters = smesh.CreateHypothesis('BLSURF_Parameters', 'BLSURFEngine') +BLSURF_Parameters.SetPhysicalMesh( 1 ) +BLSURF_Parameters.SetPhySize( 200 ) +# For the cylinder +BLSURF_Parameters2 = smesh.CreateHypothesis('BLSURF_Parameters', 'BLSURFEngine') +BLSURF_Parameters2.SetGeometricMesh( 1 ) + +# Create the 3D algorithm and hypothesis +GHS3D = smesh.CreateHypothesis('GHS3D_3D', 'GHS3DEngine') +GHS3D_Parameters_node = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') +#GHS3D_Parameters_node.SetToMeshHoles( 1 ) +GHS3D_Parameters_edge = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') +#GHS3D_Parameters_edge.SetToMeshHoles( 1 ) +GHS3D_Parameters_face = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') +GHS3D_Parameters_face.SetToMeshHoles( 1 ) # to mesh inside the cylinder +GHS3D_Parameters_mesh = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') +GHS3D_Parameters_mesh.SetToMeshHoles( 1 ) # to mesh inside the cylinder + +# Create the mesh on the cylinder +Mesh_cylindre = smesh.Mesh(cylindre) +smesh.SetName(Mesh_cylindre,"Mesh_cylindre") +Mesh_cylindre.AddHypothesis( BLSURF ) +Mesh_cylindre.AddHypothesis( BLSURF_Parameters2 ) +# Create some groups +face_cyl_faces = Mesh_cylindre.GroupOnGeom(face_cyl,'group_face_cyl', smesh.FACE) +face_cyl_edges = Mesh_cylindre.GroupOnGeom(face_cyl,'group_edge_cyl', smesh.EDGE) +face_cyl_nodes = Mesh_cylindre.GroupOnGeom(face_cyl,'group_node_cyl', smesh.NODE) +Mesh_cylindre.Compute() + +# Create the mesh on the cylinder +Mesh_box_tri = smesh.Mesh(box) +smesh.SetName(Mesh_box_tri,"Mesh_box_tri") +Mesh_box_tri.AddHypothesis( BLSURF ) +Mesh_box_tri.AddHypothesis( BLSURF_Parameters ) +Mesh_box_tri.Compute() + +# Create 4 copies of the 2D mesh to test the 3 types of contraints (NODE, EDGE, FACE) +# from the whole mesh and from groups of elements. +# Then the 3D algo and hypothesis are assigned to them. + +mesh_mesh = smesh.CopyMesh( Mesh_box_tri, 'Enforced by faces of mesh', 0, 0) +mesh_mesh.AddHypothesis( GHS3D ) +mesh_mesh.AddHypothesis( GHS3D_Parameters_mesh) + +mesh_node = smesh.CopyMesh( Mesh_box_tri, 'Enforced by group of nodes', 0, 0) +mesh_node.AddHypothesis( GHS3D ) +mesh_node.AddHypothesis( GHS3D_Parameters_node) + +mesh_edge = smesh.CopyMesh( Mesh_box_tri, 'Enforced by group of edges', 0, 0) +mesh_edge.AddHypothesis( GHS3D ) +mesh_edge.AddHypothesis( GHS3D_Parameters_edge) + +mesh_face = smesh.CopyMesh( Mesh_box_tri, 'Enforced by group of faces', 0, 0) +mesh_face.AddHypothesis( GHS3D ) +mesh_face.AddHypothesis( GHS3D_Parameters_face) + +# Add the enforced elements +GHS3D_Parameters_mesh.SetEnforcedMeshWithGroup(Mesh_cylindre.GetMesh(),smesh.FACE,"faces from cylinder") +GHS3D_Parameters_node.SetEnforcedMeshWithGroup(face_cyl_nodes,smesh.NODE,"nodes from face_cyl_nodes") +GHS3D_Parameters_edge.SetEnforcedMeshWithGroup(face_cyl_edges,smesh.EDGE,"edges from face_cyl_edges") +GHS3D_Parameters_face.SetEnforcedMeshWithGroup(face_cyl_faces,smesh.FACE,"faces from face_cyl_faces") + +#Compute the meshes +mesh_node.Compute() +mesh_edge.Compute() +mesh_face.Compute() +mesh_mesh.Compute() + +# End of script + +\endcode + +\image html ghs3d_screenshot_enf3.png +\image html ghs3d_screenshot_enf4.png +\image html ghs3d_screenshot_enf5.png +\image html ghs3d_screenshot_enf6.png + +\ref tui_ghs3d "Back to top" + +*/ diff --git a/doc/salome/gui/GHS3DPLUGIN/input/index.doc b/doc/salome/gui/GHS3DPLUGIN/input/index.doc index dab5c16..e39ba6d 100644 --- a/doc/salome/gui/GHS3DPLUGIN/input/index.doc +++ b/doc/salome/gui/GHS3DPLUGIN/input/index.doc @@ -16,7 +16,7 @@ license to be used within the Mesh module. To manage parameters of the GHS3DPLUGIN use \subpage ghs3d_hypo_page and \subpage additional_hypo_page Also all GHS3DPLUGIN functionalities are accessible via -\subpage ghs3dplugin_python_intarface_page "GHS3DPLUGIN Python interface". +\subpage ghs3dplugin_python_interface_page "GHS3DPLUGIN Python interface". \image html image2.gif "Example of a tetrahedral 3D mesh" diff --git a/doc/salome/gui/Makefile.am b/doc/salome/gui/Makefile.am new file mode 100644 index 0000000..e1c9554 --- /dev/null +++ b/doc/salome/gui/Makefile.am @@ -0,0 +1,26 @@ +# Copyright (C) 2007-2011 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 +# +include $(top_srcdir)/adm_local/unix/make_common_starter.am + +SUBDIRS = GHS3DPLUGIN + +usr_docs: + (cd GHS3DPLUGIN && $(MAKE) $(AM_MAKEFLAGS) usr_docs) + +docs: usr_docs diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml index bca519a..8b9379f 100644 --- a/resources/SalomeApp.xml +++ b/resources/SalomeApp.xml @@ -26,4 +26,7 @@ +
+ +
diff --git a/src/GHS3DPlugin/GHS3DPluginDC.py b/src/GHS3DPlugin/GHS3DPluginDC.py index b2e7014..5cf2a1f 100644 --- a/src/GHS3DPlugin/GHS3DPluginDC.py +++ b/src/GHS3DPlugin/GHS3DPluginDC.py @@ -39,7 +39,6 @@ GHS3D = "GHS3D_3D" ## Tetrahedron GHS3D 3D algorithm # It is created by calling Mesh.Tetrahedron( GHS3D, geom=0 ) # -# @ingroup l3_algos_basic class GHS3D_Algorithm(Mesh_Algorithm): meshMethod = "Tetrahedron" @@ -54,7 +53,6 @@ class GHS3D_Algorithm(Mesh_Algorithm): ## Defines hypothesis having several parameters # - # @ingroup l3_hypos_ghs3dh def Parameters(self): if not self.params: self.params = self.Hypothesis("GHS3D_Parameters", [], @@ -62,7 +60,7 @@ class GHS3D_Algorithm(Mesh_Algorithm): return self.params ## To mesh "holes" in a solid or not. Default is to mesh. - # @ingroup l3_hypos_ghs3dh + # def SetToMeshHoles(self, toMesh): self.Parameters().SetToMeshHoles(toMesh) @@ -70,28 +68,25 @@ class GHS3D_Algorithm(Mesh_Algorithm): # None_Optimization, Light_Optimization, Standard_Optimization, StandardPlus_Optimization, # Strong_Optimization. # Default is Standard_Optimization - # @ingroup l3_hypos_ghs3dh def SetOptimizationLevel(self, level): self.Parameters().SetOptimizationLevel(level) ## Maximal size of memory to be used by the algorithm (in Megabytes). - # @ingroup l3_hypos_ghs3dh + # def SetMaximumMemory(self, MB): self.Parameters().SetMaximumMemory(MB) ## Initial size of memory to be used by the algorithm (in Megabytes) in # automatic memory adjustment mode. - # @ingroup l3_hypos_ghs3dh def SetInitialMemory(self, MB): self.Parameters().SetInitialMemory(MB) ## Path to working directory. - # @ingroup l3_hypos_ghs3dh + # def SetWorkingDirectory(self, path): self.Parameters().SetWorkingDirectory(path) ## To keep working files or remove them. Log file remains in case of errors anyway. - # @ingroup l3_hypos_ghs3dh def SetKeepFiles(self, toKeep): self.Parameters().SetKeepFiles(toKeep) @@ -103,18 +98,15 @@ class GHS3D_Algorithm(Mesh_Algorithm): #
  • 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. - # @ingroup l3_hypos_ghs3dh def SetVerboseLevel(self, level): self.Parameters().SetVerboseLevel(level) ## To create new nodes. - # @ingroup l3_hypos_ghs3dh def SetToCreateNewNodes(self, toCreate): self.Parameters().SetToCreateNewNodes(toCreate) ## To use boundary recovery version which tries to create mesh on a very poor # quality surface mesh. - # @ingroup l3_hypos_ghs3dh def SetToUseBoundaryRecoveryVersion(self, toUse): self.Parameters().SetToUseBoundaryRecoveryVersion(toUse) @@ -122,12 +114,10 @@ class GHS3D_Algorithm(Mesh_Algorithm): # 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. - # @ingroup l3_hypos_ghs3dh def SetFEMCorrection(self, toUseFem): self.Parameters().SetFEMCorrection(toUseFem) ## To removes initial central point. - # @ingroup l3_hypos_ghs3dh def SetToRemoveCentralPoint(self, toRemove): self.Parameters().SetToRemoveCentralPoint(toRemove) @@ -138,7 +128,6 @@ class GHS3D_Algorithm(Mesh_Algorithm): # @param size : size of 1D element around enforced vertex # @param vertexName : name of the enforced vertex # @param groupName : name of the group - # @ingroup l3_hypos_ghs3dh def SetEnforcedVertex(self, x, y, z, size, vertexName = "", groupName = ""): if vertexName == "": if groupName == "": @@ -155,7 +144,6 @@ class GHS3D_Algorithm(Mesh_Algorithm): # @param theVertex : GEOM vertex (or group, compound) to be projected on theFace. # @param size : size of 1D element around enforced vertex # @param groupName : name of the group - # @ingroup l3_hypos_ghs3dh def SetEnforcedVertexGeom(self, theVertex, size, groupName = ""): AssureGeomPublished( self.mesh, theVertex ) if groupName == "": @@ -167,13 +155,11 @@ class GHS3D_Algorithm(Mesh_Algorithm): # @param x : x coordinate # @param y : y coordinate # @param z : z coordinate - # @ingroup l3_hypos_ghs3dh def RemoveEnforcedVertex(self, x, y, z): return self.Parameters().RemoveEnforcedVertex(x, y, z) ## To remove an enforced vertex given a GEOM vertex, group or compound. # @param theVertex : GEOM vertex (or group, compound) to be projected on theFace. - # @ingroup l3_hypos_ghs3dh def RemoveEnforcedVertexGeom(self, theVertex): AssureGeomPublished( self.mesh, theVertex ) return self.Parameters().RemoveEnforcedVertexGeom(theVertex) @@ -183,7 +169,6 @@ class GHS3D_Algorithm(Mesh_Algorithm): # @param elementType : SMESH.ElementType (NODE, EDGE or FACE) # @param size : size of elements around enforced elements. Unused if -1. # @param groupName : group in which enforced elements will be added. Unused if "". - # @ingroup l3_hypos_ghs3dh def SetEnforcedMesh(self, theSource, elementType, size = -1, groupName = ""): if size >= 0: if groupName != "": @@ -197,7 +182,6 @@ class GHS3D_Algorithm(Mesh_Algorithm): return self.Parameters().SetEnforcedMeshSizeWithGroup(theSource, elementType, size, groupName) ## Sets command line option as text. - # @ingroup l3_hypos_ghs3dh def SetTextOption(self, option): self.Parameters().SetTextOption(option)