Version: 9.10.0
Python Interface

Python package HYBRIDPluginBuilder defines several classes, destined for creation of the 3D meshes.

HYBRID meshing plugin dynamically adds several methods to the smeshBuilder.Mesh class to create meshing algorithms.

Below you can see an example of usage of the HYBRIDPluginBuilder Python API for mesh generation:

  1. Construction of Mesh using MG-Hybrid algorithm

Construction of Mesh using MG-Hybrid algorithm

Example of mesh generation with HYBRID algorithm:

import salome
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New()
from salome.smesh import smeshBuilder
smesh = smeshBuilder.New()
# create a box
box = geompy.MakeBoxDXDYDZ(200., 200., 200.)
geompy.addToStudy(box, "box")
# create a mesh on the box
hybridMesh = smesh.Mesh(box,"box: MG-Hybrid and BLSurf mesh")
# create a BLSurf algorithm for faces
BLSURF = hybridMesh.Triangle(algo=smeshBuilder.BLSURF)
HYBRID = hybridMesh.Tetrahedron(algo=smeshBuilder.HYBRID)
# compute the mesh
# End of script

Download this script

Back to top