Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Testing overlap - NXOpen Modeling

I have two bodies, I need to divide one face by a set of edges of the opposing face. This is easy.

However, post division, I wish to name the two faces such that the Overlapping faces are marked overlap.

 

Is there an simple to way to test overlap?

 

I am currently thinking of projecting the center point of one face on the other. If it projects, the two faces overlap, else they don't .

 

Any other ideas?

MAYAHTT
www.mayahtt.com
13 REPLIES

Re: Testing overlap - NXOpen Modeling

Mukund,

 

1. I would compare the co ordinate centerpoint of both faces.

2. Try intesecting option 

 

Hope this helps 

 

Regards,

Karthik Jeeves

Re: Testing overlap - NXOpen Modeling

Note it might help if you keep track of which faces are original (unchanged); original (changed) & which are new.  (I'm assuming when you split a surface one of them is still tagged as the "original" surface).

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Testing overlap - NXOpen Modeling

I don't think NX guarantees a certian face as the original face. If you divide a face into 2, one of them is the original face. You can't assume one against the other.

MAYAHTT
www.mayahtt.com

Re: Testing overlap - NXOpen Modeling

Understood - sorry if I implied you could.

But knowing which faces are new/changed, you might be able to set a "perimeter" around the intersection, and not have to test EVERY face - if one face "inside" the perimeter is (or isn't) part of the intersection, then all the faces inside that perimeter are (or aren't) also?

 

You do need to check for multiple loops (disjoint sets of faces thet lie in the intersection area) / holes / etc.

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Testing overlap - NXOpen Modeling

I can understand projection visually, but the only way to test them programmatically is by projection.

 

I tried with a point on surface, unfortunaltely, that yields a point a on the surface not necessarily on the face. Hence if there was a hole in the center and I queried for a point at 0.5, 0.5 of the face, I would be in the hole.

 

I am resorting to facetted model based queries. This way, within tolerance you know, the mid point of a facet is definitely on the face.

MAYAHTT
www.mayahtt.com

Re: Testing overlap - NXOpen Modeling

If you are compaing 2 faces, the following functions may be of use:

  • UF_MODL_compare
  • UF_MODL_compare_topology

Re: Testing overlap - NXOpen Modeling

Has anyone been able to code anything for this problem? We're finding ourselves in a similar problem with this topic. 

DHuskic Nx 9

Re: Testing overlap - NXOpen Modeling

Hi,

 

I proposed this algorithm (I did not tested yet but I would like to have your opinion)

 

Let's assume we have a set of curves A and we want to divide a face B. We can do the follow:

1) Divide B by A using the Divide Face Feature. We will get a set of new faces;

2) We create a surface between the set of curves A using the Fill Surface Feature. Let's call this surface A*;

3) For each new face generated by the Divide Face Feature:

    3a) We get the bounding edges of that face;

    3b) For each edge of that face:

  • We project the edge on the filled surface A*;
  • If the operation fails, we can say that this specific face does not overlap with the original patch formed by A. We stop the test here.
  • If the operation succeeds, continue to check other edges.

     3c) If all edges projections succeed, we can say that this specific face overlaps with the original patch formed by A.

 

 

What do you think about this ?

Re: Testing overlap - NXOpen Modeling

@DHuskic

I don't have any code specific to this problem (detecting overlapping faces after a divide face feature), but code for a similar problem (detecting duplicate sheet bodies after importing an IGES file) that can be found here:

http://nxjournaling.com/content/find-duplicate-sheet-bodies