Home
Reply
Contributor
henryl
Posts: 5

Extracting shells from a lump and placing them in a new body?

Hopefully the title says it all, but here is an example of the problem we're trying to solve.

 

Consider a hollowed out cube with one lump and two shells.  The outer shell has six faces.  The inner shell also has six faces.  Use api_remove_face() to remove one of the faces on the inner shell.  I'm assuming the resulting body will still have a single lump with two shells.  The outer shell will have six single sided faces. The inner shell will have five double sided faces with both sides of the face designated as inside.  I'd like to extract the inner shell from the body and place it in its own body.  The new body would have a single lump and a shell with five faces.  Faces on the new body would be double sided with both sides of the face designated as outside.  I can think of ways to do this, none of them particularly elegant, but I'm hoping someone with more expertise might recommend the best approach.

 

Thanks.

 

Henry

 

Spatial Moderator
ybiyani
Posts: 223

Re: Extracting shells from a lump and placing them in a new body?

Hello Henry,

 

1) The first operation (remove internal face) will result in a bad body (bascially you have a situation where an bounded void becomes and unbounded void). Please do not allow such operations as it will result in downstream failures...and I think level 70 checks will fail on such bodies.

2) To create a solid out of a well defined void you can use api_enclose_void http://doc.spatial.com/qref/ACIS/html/group__CSTRMODIFYAPI.html#g87f8c531f037d58af439d02d6abd52f4 . Also see http://doc.spatial.com/index.php/SchemeExt:Sheet:enclose

 

I hope this helps.

 

Regards,

Yogesh

 

Contributor
henryl
Posts: 5

Re: Extracting shells from a lump and placing them in a new body?

Yogesh,

 

I agree that the removal of the face on the inner shell does leave the body in a body state.  We need to extract the inner shell from the body and place it in a new body.  It appears that once the inner shell has been removed from the original body and placed in a new one, that api_enclose_void() would handle fixing the containment information on the faces.  So I guess the question still remains, what's the best way to extract the inner shell from the original body and place it in its own new body?  Removal of the desired face could occur once the inner shell was extracted into its own body.

 

Thanks,

 

Henry

 

Visitor
bravoshota
Posts: 3

Re: Extracting shells from a lump and placing them in a new body?

you can see also nice function api_unhook_faces, where entity_list will contain all the faces of the inner shell