Home
Reply
Contributor
Simu2011
Posts: 11

A few questions on checking on surfaces

First, I have hard time in finding an Api to check if two or more 2D surfaces are on the same plane. I know how to write a piece of program to do that, but I thought ACIS must already have something for that.

 

Second, after confirming that they are on the same plane, I need to make sure that they are not completely detached to each other. Any Api available for that?

 

Third, is it possible to intentionally skip recording certain steps of modeling for Undo/Redo management? For example, after drawing a few 3D structures whose operations were recorded, I want to draw a line that is not needed to be undo/redo at all. Thus, it is OK to skip recording the line's drawing steps, which can make an undo operation directly move back to the last 3D drawing.

 

Thanks in advance.

 

Jian

Spatial Moderator
rbagley
Posts: 120

Re: A few questions on checking on surfaces

Jian,

 

I don't know of an API to test coplanarity, but your second question can probably be solved with api_clash_faces() or api_clash_bodies().  In fact, the clash APIs should implicitly answer the coplanarity question, though perhaps a dedicated function of your own would have better performance.

 

for question 3, please read up on how to use the history macros in this tutorial - I believe it covers just what you're asking:

http://doc.spatial.com/index.php/Tutorial:ACIS_Tutorial_9:_What_Happens_if_Something_Goes_Wrong%3F_(...

 

Best,

Ray

Contributor
Simu2011
Posts: 11

Re: A few questions on checking on surfaces

Ray,

 

Thanks for the tips.

 

The coplanarity issue is manageable even without an Api. To find if two faces are connected, I found that api_check_face_clearance and api_fafa_int might do the job. What is your opinion on them? I am having people to try those two now, and will try the one you suggested too. Besides, I am going to check out the link to understand undo/redo machnism better.

 

Jian 

Spatial Moderator
rbagley
Posts: 120

Re: A few questions on checking on surfaces

It depends on the specifics of what kind of answer you want:

 

api_clash will classify the relationship between the two entities - clearance, abutting, interfering/overlapping.

api_check_face_clearance give the minimum distance down to zero, but won't tell you if they are abutting or overlapping.

api_fafa_int is designed to return a wire body of the intersection - I don't know what it will do with overlapping faces or with non-intersecting faces (somebody with more specific knowledge will have to reply to this).

Contributor
Simu2011
Posts: 11

Re: A few questions on checking on surfaces

Sounds good analysis of the two. I will try the clash api first, instead.

 

Thanks, Ray.

 

Jian