1
2geom = SplineGeometry()
3
4# Define Points
5pi1 = geom.AppendPoint(0,0)
6pi2 = geom.AppendPoint(1,0)
7pi3 = geom.AppendPoint(1,1)
8pi4 = geom.AppendPoint(0,1)
9
10# Define Segments
11geom.AppendSegment([pi1,pi2])
12geom.AppendSegment([pi2,pi3])
13geom.AppendSegment([pi3,pi4])
14geom.AppendSegment([pi4,pi1])
15
16# Plot Geometry
17geom.Plot()
18
19# Plot Point Index
20geom.ShowPoints()
21# Plot Domain Numbers
22geom.ShowDomains()
23
24# Set Meshing Parameters
25mparam = MeshingParameters()
26mparam.maxh = 0.1
27
28mesh = geom.GenerateMesh(mparam)