Home
Reply
Regular Contributor
Posts: 55
0
Accepted Solution

api_offset_faces results in self-intersecting body

Hello,

Users often try to use offset to close holes in a model. For example, there is a cylindrical hole, user selects internal cylinder's faces and offsets them with a value > half of the cylinder's diameter.

As a result, sometimes api_offset_faces fails with REM_NO_SOLUTION, which is OK. But for some more complicated cases, offset can successfully produce weird geometry. So the questions are:

 

1. Is it possible/recommended to use Offset to close holes?
2. Is it possible to use ACIS API to recognize the cases when such workflow can produce bad geometry?

 

Thanks!

Spatial Employee
Posts: 151
0

Re: api_offset_faces results in self-intersecting body

It sounds like you are trying to remove a face in the body and close the gap by doing offset.  This is not the recommended workflow.  Please read up  about the remove faces api.

 

http://docwiki/index.php/Remove_Faces

 

It takes a face out of the body and extends the surrounding faces to close the gap.

 

best regards

 

Eric Zenk

Spatial Employee
Posts: 151
0

Re: api_offset_faces results in self-intersecting body

oops.  The document link I provided in the previous post is bad (only works for spatial employees).  please see the following link

 

https://doc.spatial.com/get_doc_page/articles/r/e/m/Component~Remove_Faces_05f0.html

 

best results

 

Eric

Regular Contributor
Posts: 55
0

Re: api_offset_faces results in self-intersecting body

Thank you, yes - it looks like much more suitable for the task.

The problem I have is not that Offset can fail in this non-recommended workflow, but that I can't recognize the bad geometry which can be created as a result. It would be great to have some hints from ACIS API that algorithms encountered problems, so some geometry should be double checked before finishing successfully.

 

Spatial Employee
Posts: 151
0

Re: api_offset_faces results in self-intersecting body

Do you know about the checker? https://doc.spatial.com/get_doc_page/articles/a/c/i/Component~ACIS_Checker_c03c.html.  The checker is an api which allows you to determine if you have bad bodies.  the self intersection check takes a while so it is only done at level 70, if I remember correctly.

 

You can combine this with some of our API macros (https://doc.spatial.com/get_doc_page/articles/a/p/i/API_Macros_b22b.html?zoom_highlightsub=api_trial... to come up with something that won't produce bad geometry.  Basically, run the offset (or other API suspected to produce bad geometry)and the checker in an API trial block.  make sure to resignal the error from both the api and the checker.  if anything fails, the result will be rolled as part of the trial block.

 

you should probably also log a bug that the API produced a bad result.  there is already some checking in the offset api to avoid self intersecting surfaces, but occasionally it may miss problems.

 

Eric

Highlighted
Regular Contributor
Posts: 55
0

Re: api_offset_faces results in self-intersecting body

Thanks again! I used the checker, but did not know that level 70 is needed to catch self-intersection. Other info is also very useful.