I'm writing some NXopen code using the 'UfSession.Modl.DevchkEdgeToEdge' function.
The problem I'm having is that all of the reuslts I get from this are always less than 90deg.
This is causing a huge headache for me as I'm trying to measure angles between faces and have to know if it is an acute angle or obtuse.
Does anyone know if there is a setting that can be changed to alter the behaviour?
Solved! Go to Solution.
The Deviation Checking functions are intended for use in cases where things are almost the same (i.e. where the deviation is small). So, apparently, they do not take into account the sense of the surface normal. If they did, it would be much more difficult to use them for checking small angular deviations.
I can't think of an easy way to do this. It looks like you might have to essentially write your own function from first principles. Step along the edge caclulating pairs of (outward) surface normals and measure the angle between each pair. Deciding how many locations to measure at is the usual trade-off between performance and certainty.
Thanks for your reply.
I see your point about the comparrison of like surfaces although I don't see how taking the sense of the angle would increase the complexity at near identical angles?
The problem with the tools we create are that they are often used for things we never envisaged.
The deviation check tools are probably the best we have for checking tangency of surfaces and is what we use them for predominantly in my industry.
Thinking about my scenario I believe I now understand why it doesn't differentiate acute and obtuse angles.
As you say the assumption is that we will be checking similar surfaces and therfore angles above 90 deg can be discounted (we all know the saying about ass-umptions ) )
I have the advantage that my check will always be carried out on surfaces that have been sewn and threfore normalised. This is the essential step.
The issue that deviation check has is that it needs to work for un-sewn pairs of surfaces and the face normals can be any direction. If this is the case you cannot differentiate between acute and obtuse but you can compare all permetations of normals and return the smallest value.
The reason I asked this in the first place is I already have a function that does exactly what you describe. Taking normals and checking at set distances along an edge. I was trying to find a way of increasing the efficiency of the code and found that the deviation tool was very quick compared to my current function. Looks like it's not the silver bullet I'd hoped for though (
I'm finding that as I'm comparing so many faces (2000+) that the construction of point and direction objects required to measure the angle is pretty slow.
It seems that the overhead of creating a simple point object in NXopen is pretty high for something that only has to store x,y,z coordinate data :o(
"The deviation check tools are probably the best we have for checking tangency of surfaces and is what we use them for predominantly in my industry."
Perhaps you could also use the "examine geometry -> edge check -> smoothness" check? Or if it is part of an NXOpen program, the AskEdgeSmoothness method.
"A geometry check routine.
The condition for smoothness is defined as being that the angle
between the normals of the two faces that meet at the edge does not
at any point along that edge exceed the angle supplied by the user. If
the tolerance entered = 0, the current modeling angle tolerance is
used. Edges with only one adjacent face are reported as smooth."
We use the examine geometry tool for full model checks but still use the deviation analysis tools while we are surfacing. We use it to check angles between specific surfaces and get visual feedback where they might be problematic which many of the other tools are lacking or time consuming to get the results.
The askedgesmoothness method does look very promising, although it can only be used to return an edge of interest and not the actual faces. However...
I can use this as a quick first pass to ignore anything tending towards tangency and then anything else, apply a more thourough check of face pair angles.
This should dramatically reduce the number of face pairs I need to check so should deliver a pretty healthy efficiency increase.
"The askedgesmoothness method does look very promising, although it can only be used to return an edge of interest and not the actual faces."
Given an edge, you should be able to use AskEdgeFaces to return the faces that use the edge.