I want to identify inner edge (loops) and outer edges, e.g. see attached figure: The orange face is the face to be evaluated. The highlighted edges represent the edges to be investigated. The edge left and right are the external edges of this face. The edge created by the boss is an internal edge.
I know that there are SNAP functions to do this but unfortunately, I do not have a Snap Author license (so far:/).
There would be also the possibility, to check the facetype, and evaluate the face center axis, the center axis of the edges etc to check for the 2 peripheral loops that come along with the examplary cylinder.
But are there more sophisticated approaches to do this which do not require a lots of cases (e.g. for each face type)?
Found a detour so far: Use the ExtractFaceBuilder which comes along with the option to "DeleteHoles", so to only consider outer/external edges. However, this depicts a comparably messy approach since the face has to be deleted afterwards. Hopefully, there will be a better solution.
You didn't mention what language you are using; there is a function called UF_MODL_ask_face_loops, but it may not work with managed languages (VB, C#, etc). Here is an example in the solutions database:
Would the UF_BREP_* (or equivalents) give you the required info?
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled
As you mentioned, the Snap.Topology functions will probably do exactly what you want. A Snap.NX.Face object has a Loops property. This is an array of Snap.Topology.Loop objects. Each Loop object has a Type property, which can be Outer, Inner, or a few other obscure types. For convenience, each Snap.NX.Face object also has an OuterLoop property.
Of course, if you find an inner loop, this might belong to either a hole or a boss on the face. You have to check edge convexities or face normals to find out which. The SNAP Reference Guide has example code illustrating the process.
Even if you don’t use the SNAP functions, I’d recommend that you read the SNAP documentation and examples to learn about loops and fins.
If you're writing your code in C or C++, then you can call:
Topology functions similar to the SNAP ones were not implemented in the .NET variant of NX/Open because the C/C++ functions have a complicated interface and the automatic wrapping mechanism doesn’t work. But you could do do the wrapping yourself, by hand. Here are some examples that show how to do this:
Thank you all for your responses!
@YamadaThank you. Finally there is a reason why there is a method in SNAP but not in NXOpen (C#). Fortunately, I realized that I have the Snap Author License. Consequently I am now "hybrid" modelling using NXOpen and Snap which works really fine and breaks down the code a lot.
Also the possibility that I could write my own wrapper in case it's needed is really interesting!
One final question also relating to this topic: Now I can determine internal and external edges. In case of a planar face, the definition of "inner" and "outer" is not easy sometimes, (see exemplary picture)
In case the planar face contains two circular edges for the definition of the plane, one could check the center point of all loops, and if the center point of the inner loop is approximately identical to the center point of the outer loop, it's a "peripheral "loop as well.
In the shown example, a rectangular shape is used. How could I detect the "outer" edges in this case and separate them from the inner edges (due to the subtract features)?
> I am now "hybrid" modelling using NXOpen and Snap which works really fine and breaks down the code a lot.
That's how I work, too. I use SNAP functions where they're available, and fall back on NX/Open when I'm forced to. In case you haven't seen it, there's a section in chapter 16 of the "Getting Started with SNAP" guide that talks about mixing SNAP and NX/Open.
In your example, the orange planar face has four loops. Three of them are rectangular, and one is circular. Let's call the rectangular ones R1, R2, R3, where R1 is the largest, and R3 is the smallest. Also,let's call the circular loop C1.
It sounds like you want to distinguish R2 from R3. This is not possible using topological reasoning. To see why, imagine that R2 gradually gets smaller and R3 gradually gets larger. At some point, R3 will be larger than R2, but changing sizes won't affect the topology at all.
Maybe you can describe in words what makes R2 different from R3, for you; it must be something other than topology. Then perhaps I can help you translate the reasoning into code.