3 \page netgenplugin_python_interface_page Python Interface
5 Python package \ref NETGENPluginDC "NETGENPlugin" defines several classes, destined for creation of the 2D and 3D meshes.
7 Documentation for NETGENPlugin package is available in linear form grouped by classes, declared in the NETGENPluginDC.py file.
9 Below you can see an example of usage of the NETGENPlugin package for mesh generation:
17 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
18 geompy.addToStudy(box, "Box")
21 # 1. Create a triangular 2D mesh on the box with NETGEN_1D2D algorithm
22 triaN = smesh.Mesh(box, "Box : triangular mesh by NETGEN_1D2D")
24 # create a Netgen_1D2D algorithm for solids
25 algo2D = triaN.Triangle(smesh.NETGEN_1D2D)
28 n12_params = algo2D.Parameters()
30 # define number of segments
31 n12_params.SetNbSegPerEdge(19)
34 n12_params.SetMaxSize(300)
36 # 2. Create a tetrahedral mesh on the box with NETGEN_1D2D3D algorithm (full netgen)
37 tetraN = smesh.Mesh(box, "Box : tetrahedrical mesh by NETGEN_1D2D3D")
39 # create a Netgen_1D2D3D algorithm for solids
40 algo3D = tetraN.Tetrahedron(smesh.FULL_NETGEN)
43 n123_params = algo3D.Parameters()
45 # define number of segments
46 n123_params.SetNbSegPerEdge(11)
48 # define max element size
49 n123_params.SetMaxSize(300)