3.16. booleanUnion command
Description: This command creates a new object that encloses the regions of the two selected objects that are included in any of them (A OR B operation). Note that this command will delete the original objects.
Inline mode usage:
- booleanUnion -h: Displays the help file that summarizes the parameters for this command.
- booleanUnion –s –objectA <list of names A> -objectB <list of names B>: Draws the parts of the surfaces listed in A and B that are contained in any object.
Interactive mode usage:
- Invocation: booleanUnion
- Parameters:
- Surfaces of the 'objectA': selection of surfaces and objects of the first object.
- Surfaces of the 'objectB': selection of surfaces and objects of the second object.
Example:
Suppose that we have created the two spheres shown in the next figure:
Initial state of the geometry for the booleanUnion command
The geometry was created by using the following commands:
command> sphere
Select center [x y z]: 0 0 0
Radius [double]: 2
command> sphere
Select center [x y z]: 1.5 1.5 1.5
Radius [double]: 1
We want to create an object that encloses the regions of both spheres. To do this, we need to run the booleanUnion command on both objects:
command> booleanUnion
Select the surfaces of the 'objectA' on screen (Press enter when done): (Select one sphere)
Select the surfaces of the 'objectB' on screen (Press enter when done): (Select the other sphere)
Please Wait...
command>
If the spheres were named "sphere1" and "sphere2", the user could run the command in non-interactive mode in the following way:
command> booleanUnion -s -objectA sphere1 -objectB sphere2
Please Wait...
command>
This command will create the surfaces, grouped as an object, needed to enclose the regions of both objects. Visually, the result is the same as shown in the previous figure.