UnionΒΆ
Learning targets
- Use Boolean operation to form union of two objects
This example unites two circles by means of the Boolean union operator.
Surely, we could also create this geometry by a simple overlay. However, a Boolean operation allows to apply shape manipulating operations such as corner rounding to the resulting shape.
.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
Layout2D { UnitOfLength = 1 Objects { Parallelogram { Priority = ComputationalDomain DomainId = 1 BoundingBox { Offset = [1 1 1 1] } } BooleanOperation { DomainId = 2 Operator = Union A { Circle { Radius = 6 GlobalPosition = [-4.0 0.0] RefineAll = 2 } } B { Circle { Radius = 4 GlobalPosition = [1.75 0.0] RefineAll = 2 } } } } }
To apply a corner rounding we add the following definitions
BooleanOperation {
A {
...
}
B {
...
}
CornerRounding {
Radius = 0.5
MaxAngle = 140
NPoints = 5
}
}
which yields the following geometry