3 \page netgenplugin_python_interface_page Python Interface
5 Python package NETGENPluginDC defines several classes, destined for
6 creation of the 2D and 3D meshes.
8 NETGEN meshing plugin dynamically adds several methods to the
9 smesh.Mesh class to create meshing algorithms.
11 Below you can see an example of usage of the NETGENPlugin package for mesh generation:
19 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
20 geompy.addToStudy(box, "Box")
23 # 1. Create a triangular 2D mesh on the box with NETGEN_1D2D algorithm
24 triaN = smesh.Mesh(box, "Box : triangular mesh by NETGEN_1D2D")
26 # create a Netgen_1D2D algorithm for solids
27 algo2D = triaN.Triangle(smesh.NETGEN_1D2D)
30 n12_params = algo2D.Parameters()
32 # define number of segments
33 n12_params.SetNbSegPerEdge(19)
36 n12_params.SetMaxSize(300)
38 # 2. Create a tetrahedral mesh on the box with NETGEN_1D2D3D algorithm (full netgen)
39 tetraN = smesh.Mesh(box, "Box : tetrahedrical mesh by NETGEN_1D2D3D")
41 # create a Netgen_1D2D3D algorithm for solids
42 algo3D = tetraN.Tetrahedron(smesh.FULL_NETGEN)
45 n123_params = algo3D.Parameters()
47 # define number of segments
48 n123_params.SetNbSegPerEdge(11)
50 # define max element size
51 n123_params.SetMaxSize(300)