Home
Reply
Contributor
xhjhust
Posts: 17

How to get the bound box of body when the face is modifed

Hi all,

 

    In my program, we use the function named api_move_faces to transform the faces on the body, and then we need to get the bound box of this modified body. But, The box we get using function named api_get_entity_box is smaller than the body.

 

    We use the function named reset_boxes_downward(Body*) firstly and then we use the function api_get_entity_box to compute the bound box. We also use the SPAboxing_options to set the computation mode, but the result is not right yet. We refer to http://doc.spatial.com/qref/ACIS/html/group__ACISBOXING.html#g5584ed487433ef1d71b316802c3b38c9, and http://doc.spatial.com/index.php/Entity_Boxing.

   However, I export this body as a  sat format file, and then read them, we find that the bound box computed is right. So I want to ask how and what we need to do to compute the bound box when we use the functions like api_move_faces to modify the faces in this body.

   Thank you for your attention!

Hongjian Xia

Spatial Moderator
ybiyani
Posts: 222

Re: How to get the bound box of body when the face is modifed

Are you doing something like this

 

api_get_entity_box (body);

api_move_faces();

api_get_entity_box (body);

 

and the results are different....Theoritically this should not be the case....the result after move_boxes should have the updated boxes.

 

Can you submit a test case which demonstrates this concern? Please create an incident in the Online Support System

 

Regards,

Yogesh

 

 

Contributor
xhjhust
Posts: 17

Re: How to get the bound box of body when the face is modifed

Hi Yogesh,

 

    Thank you for your attention. we have fixed this bug, the problem was from our codes. And then, we test such codes, the result is like what you said. When we call api_move_faces, the box of body is refreshed.

 

    Thank you very much for you answer.

 

Regards