Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello,
in a toolkit application I need to know if an edge is an inner or an outer edge.
In the attachment I have an example what I mean with inner and outer edge.
What I have up to now:
I use visit functions to get all the edges in the part model. A function to determine if the edge is "inner" or "outer" seems not to exist (I found none). But there is the function ProEdgeNeighborsGet(), which has the two surfaces for every edge as an output parameter. Is ist possible to get the inner/outer information with this two surfaces? Or is there another procedure to get the information.
Any help would be appreciated.
regards HP
An edge has always 2 surfaces attached. The neighbor function will return this 2 ones. Next you may want to check the surface type. For a planar one, you need know two compare the angles of this 2 normals. For me, based on the picture you have 0-180 and 180-360 degree to compare. But you know your requirements much better.
I don't think there are terms 'inner edge' or 'outer edge' in pro/toolkit. there are terms "inner contour" and "outer contour". take a look at the user guide 'Geometry Traversal' chapter for the explanation.
Inner/outer contour information of the function ProContourTraversalGet() is not that what I need.
Imagine a cube with a borehole. The circular contour of the hole is the inner contour and the quadratic contour of the cube surface with the borehole is the outer contour. But the edges of the circular contour (circular arcs) are "outer edges" in my sense.
Some additional thoughts...
Inner edge - normals are crossing
Outer edge - normals not crossing
For a non-planar surfaces the algorithm must be different.
this makes sense - following the train of thoughts - inner edge replaced by a fillet would make a concave surface and outer edge would make a convex surface. Is it what you are thinking?
yes, this describes also what I need with other words.
Hello,
meanwhile I did further investigations on the problem.
I tried to get the normals of the surfaces with the function
ProSurfaceXyzdataEval(surface, uv, xyz, der1, der2, normal)
The first input parameter in this function is the surface, which I get from the function ProEdgeNeighborsGet().
But the second (input) parameter uv is unknown.
Any idea, how to get the uv parameter?
I‘m not in front of my computer, but with evaluation you calculate a point on that surface
From the edge you have the neighbor surfaces.
Get the Surface Type , and e.g. for a plane use ProPlanedataGet to get the vectors. There are similar functions for each surface type.
It is also worth to mention, that a contour has different directions, see the Toolkit appendix at the very end😉
function to get UV coordinates from an arbitrary 3D point is ProSurfaceParamEval(...) - 3D point could be calculated by a ray intersection - there is a function ProSolidRayIntersectionCompute() - somewhat resource intensive or another option is to use ProSolidProjectPoint() - not a speedy one either.
probably the easiest is to get ProGeomitemdata - with ProGeomitemdataGet(), and from the filled structure to get uv_min and uv_max members.