Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JAE on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding similar (shared) faces in multi-part NX models 1

Status
Not open for further replies.

mderrik

Industrial
Joined
Oct 14, 2014
Messages
5
Location
SE
Hi
I am looking for a solution for following problem:
Given: A multi-part NX model with faces already split over intersections to their smallest pieces without more intersection with other bodies.
Desired: Finding similar faces belonging to different parts. By similar I mean those which specify same geometrical region even though their normal vectors might be opposite.
Proper comparison of faces involves lots of type-specific comparison of face definitions and type-specific edge definitions and probably different ways the edges are sorted and direction of each edge. These information might be accessible from UF but not normal NxOpen API and seems too complicated to cover everything. There might already be some method in the API that I am not aware of or some easier way to handle it. Any suggestion?

 
I ran into a somewhat similar problem a while back, in my case it was looking for duplicate faces in a single file (imported from IGES). Your problem is different enough that you won't be able to use my code directly, but perhaps the overall strategy will still apply. I started by getting the bounding box for all the faces, if two bounding boxes overlapped (within a tolerance) then the faces might be duplicates. UF_MODL_compare or UF_MODL_compare_topology was then used to thoroughly check the candidate pairs. It worked for our purposes and was fairly fast.

You can see the code at:

www.nxjournaling.com
 
Thanks cowski for your precious help. Your code was pretty much what I needed. I adopted that into my java code. However I have a few doubts about the results that I need to verify. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top