Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Confusion about subtracting two geometric entities

Please login with a confirmed email address before reporting spam

I have a question about using the Difference boolean operation when building a 3D geometry.

Let's say I am trying to create a final geometry composed of two parts: (1) a cube which is completely solid except for a hole in the center (denoted by C), and (2) a solid sphere (denoted by B) that fills the hole in the center of C.

So the steps I take to create this are (COMSOL model attached): 1) Create a solid cube (denoted by A). 2) Create a solid sphere inside the solid cube (aka B). 3) Do the Difference operation A - B = C, with the option "Keep input objects" checked.

Now my confusion is what are the end products remaining. Is it just B and C (which is what I want), or is it A, B, and C (which is not what I want). In other words, does "input objects" refer to both A and B, or just B? And is A removed automatically by default? If not, how would I just get B and C?



3 Replies Last Post 2021年2月1日 GMT-5 16:52
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 2021年1月21日 GMT-5 15:25

Hi Vivek,

The input objects and A and B. You can test this in your file: after the dif1 step you can still use blk1 and sph1.

With that said, to create the geometry you describe in your second paragraph, you don't need to subtract the sphere from the cube, only to draw the sphere again. All you need to do is draw a cube and draw a sphere. The Form Union step will take care of everything else.

Best,

Jeff

-------------------
Jeff Hiller
Hi Vivek, The input objects and A and B. You can test this in your file: after the dif1 step you can still use blk1 and sph1. With that said, to create the geometry you describe in your second paragraph, you don't need to subtract the sphere from the cube, only to draw the sphere again. All you need to do is draw a cube and draw a sphere. The Form Union step will take care of everything else. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 2021年2月1日 GMT-5 16:45

Hi Vivek,

The input objects and A and B. You can test this in your file: after the dif1 step you can still use blk1 and sph1.

With that said, to create the geometry you describe in your second paragraph, you don't need to subtract the sphere from the cube, only to draw the sphere again. All you need to do is draw a cube and draw a sphere. The Form Union step will take care of everything else.

Best,

Jeff

Hi Jeff, thanks for your reply. So if I'm understanding correctly, once I create object B, the form union step will automatically delete the portion of object A that is occupied by object B?

>Hi Vivek, > >The input objects and A and B. You can test this in your file: after the dif1 step you can still use blk1 and sph1. > >With that said, to create the geometry you describe in your second paragraph, you don't need to subtract the sphere from the cube, only to draw the sphere again. All you need to do is draw a cube and draw a sphere. The Form Union step will take care of everything else. > >Best, > >Jeff Hi Jeff, thanks for your reply. So if I'm understanding correctly, once I create object B, the form union step will automatically delete the portion of object A that is occupied by object B?

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 2021年2月1日 GMT-5 16:52

The form union step will create two domains, one corresponding to the cube minus the sphere, the other corresponding to the sphere.

Best,

Jeff

-------------------
Jeff Hiller
The form union step will create two domains, one corresponding to the cube minus the sphere, the other corresponding to the sphere. Best, Jeff

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.