IntersectionΒΆ
Learning targets
- Use Boolean operation to intersect two objects
This example intersects two circles by means of the Boolean intersection operator to form a lens like object.
.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 = Intersection A { Circle { Radius = 6 GlobalPosition = [-4.0 0.0] RefineAll = 2 } } B { Circle { Radius = 4 GlobalPosition = [1.75 0.0] RefineAll = 2 } } } } }
Shape manipulating operations such as corner rounding can be applied to the resulting shape, e.g.:
BooleanOperation {
A {
...
}
B {
...
}
CornerRounding {
Radius = 0.5
MaxAngle = 140
NPoints = 5
}
}
which yields the following geometry: