DifferenceΒΆ

Learning targets

  • Use Boolean operation to form the difference of two objects

This example forms the difference of two circles by means of the Boolean difference operator.

_images/ex2d_difference_mesh.png

.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
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    Layout2D {  
      UnitOfLength = 1  
      Objects {
        
        Parallelogram {
          Priority = ComputationalDomain
          DomainId = 1
          BoundingBox {
            Offset = [1 1 1 1]
          }
        }
        
        BooleanOperation {
          DomainId = 2 
          Operator = Difference
          A { 
            Circle {
              Radius = 6
              GlobalPosition = [-4.0 0.0]
              RefineAll = 2
            }
          }
          
          B {
            Circle {
              Radius = 4
              GlobalPosition = [1.75 0.0]
              RefineAll = 2
            }
          }
        }
      }  
      
    }