Skip to content
Snippets Groups Projects
Commit bf2e405e authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

awesomest

parent c44f21a0
No related branches found
No related tags found
No related merge requests found
...@@ -7,15 +7,16 @@ Mesh.CharacteristicLengthMax = 0.1; ...@@ -7,15 +7,16 @@ Mesh.CharacteristicLengthMax = 0.1;
DefineConstant[ DefineConstant[
sph = {0, Choices{0,1}, Name "Make sphere a single volume"} sph = {0, Choices{0,1}, Name "Make sphere a single volume"}
xx = {2.2, Min -1, Max 5, Step 0.01, Name "Sphere position"} xx = {2.2, Min -1, Max 5, Step 0.01, Name "Sphere position"}
rr = {0.5, Min 0.1, Max 3, Step 0.01, Name "Sphere radius"}
]; ];
Block(1) = {0,0,0, 2,2,2}; Block(1) = {0,0,0, 2,2,2};
Sphere(2) = {xx, 1, 1, 0.5}; Sphere(2) = {xx, 1, 1, rr};
Block(3) = {2,0,0, 4,2,2}; Block(3) = {2,0,0, 4,2,2};
BooleanFragments { Volume{1}; Delete; }{ Volume{2,3}; Delete; } f() = BooleanFragments { Volume{1}; Delete; }{ Volume{2,3}; Delete; };
If(sph) If(sph)
BooleanUnion { Volume{2}; Delete; }{ Volume{3}; Delete; } BooleanUnion { Volume{f[1]}; Delete; }{ Volume{f[{2:#f()-2}]}; Delete; }
EndIf EndIf
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment