import os\r
\r
from math import pi, cos, sin\r
+import SMESH\r
\r
geompy = geomBuilder.New()\r
smesh = smeshBuilder.New()\r
wire = geompy.MakeWire(edges)\r
hexa = geompy.MakeFace(wire, True)\r
geompy.addToStudy(hexa, "Hexagon")\r
-g = create_group_from("Hexagon_boundaries", hexa, [geompy.GetInPlace(hexa, wire, 1)])\r
+g = create_group_from("HexagonBoundary", hexa, [geompy.GetInPlace(hexa, wire, 1)])\r
\r
mesh = smesh.Mesh(hexa, "HexagonWith"+str(NumberOfSegments)+"Triangles")\r
msurf = mesh.Triangle(algo=smeshBuilder.NETGEN_1D2D)\r
NETGEN_2D_Simple_Parameters_1 = msurf.Parameters(smeshBuilder.SIMPLE)\r
NETGEN_2D_Simple_Parameters_1.SetNumberOfSegments( NumberOfSegments )\r
\r
-mesh.Group(g)\r
+HexagonBoundary_1 = mesh.GroupOnGeom(g, 'BoundaryFaces', SMESH.EDGE)\r
+HexagonBoundary_2 = mesh.GroupOnGeom(g, 'BoundaryNodes', SMESH.NODE)\r
\r
mesh.Compute()\r
mesh.ExportMED("meshHexagonWithTriangles"+str(NumberOfSegments)+".med")\r