Seperating the Physical Volumes of two Cubes inside a Sphere from the Physical Volume of the Sphere
Hello,
I have modeled two cubes inside a sphere and assigned a physical volume to them. Now i want to separate these volumes so the 3D mesh from the sphere doesnt overlap with the ones from the cubes.
I know I need to use the BooleanFragments command, but I am not very familiar with how to use it. I have already tried it myself but I am not sure if it is correct.
Here is the Script for the Geometry:
SetFactory("OpenCASCADE");
//Two Cubes
Box(1) = {-20,-5,-5, 10,10,10};
Box(2) = {10,-5,-5, 10,10,10};
Physical Volume("Würfel 1", 1) = {1};
Physical Volume("Würfel 2", 2) = {2};
//Sphere 3D-Mesh overlapping with cubes
Sphere(3) = {0, 0, 0, 40};
Physical Volume("Kugel überlagert", 3) = {3};
//Sphere 3D-Mesh seperated from Cubes
BooleanFragments{ Volume{3,2}; Delete; }{}
BooleanFragments{ Volume{3,1}; Delete; }{}
I hope someone can tell me if this is right, and if not how exactly booleanFragments works.
Thanks in regards.
Edited by Christophe Geuzaine