SALOME documentation central

Defining Hypotheses for Ghs3D Algorithm

Construction of Mesh using Ghs3D algorithm

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)

# create a Ghs3D algorithm for volume
GHS3D = ghs3dMesh.Tetrahedron(algo=smesh.GHS3D)

# get Ghs3D algorithm hypothesis
GHS3D_Parameters = GHS3D.Parameters()

# define an enforced vertex at (50,50,100) with a physical size of 2
GHS3D_Parameters.SetEnforcedVertex( 50, 50, 100, 2 )

# define an enforced vertex at (150,150,100) with a physical size of 5
GHS3D_Parameters.SetEnforcedVertex( 150, 150, 100, 5 )

# compute the mesh
ghs3dMesh.Compute()

# End of script
ghs3d_enforced_vertices_screenshot.png

Copyright © 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS