Corner RoundingΒΆ

Learning targets

  • Define corner roundings for polygons

This example shows how to round the corners of a linear polygon.

_images/ex2d_corner_rounding_mesh1.png

All corners of the outer square are replaced by circle segments with curvature as specified by the parameter Radius within the CornerRoundings section (see layout.jcm). For the inner triangle we only round the upper vertex by specifying the point index (Point = 3) within the CornerRoundings section. The parameter NPoints set the number of linear subdivisions of the curved vertex profile.

.jcm Input File

  • layout.jcm [ASCII]

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    Layout2D {  
      UnitOfLength = 1  
      Objects { 
        Parallelogram {
          Width = 2
          Height = 2
          CornerRounding {
            Radius = 0.2
            NPoints = 5
          }
        }
        Polygon {
          Points = [-0.5 -0.5 0.5 -0.5 0.0 0.5]
          DomainId = 2
          CornerRounding {
            Point = 3
            Radius = 0.1
            NPoints = 5
          }
        }
      }  
    }