Incorrect behaviour - Edge.TangentiallyConnectedEdges property
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
There appears to be an error with the way the Edge.TangentiallyConnectedEdges method works - it doesn't return edge loops that really should be considered tangent, and it behaves differently to the UI right click 'Select Tangencies' function (introduced in ~ Inventor 2016 I think).
I think it is tolerance related. See the attached Inventor 2019 part file and the image below.
If the edge shown in the image above (set as iLogic Named Geometry) is pre-selected, and the iLogic rule called 'Select Tangent - Current' is run (which uses the Edge.TangentiallyConnectedEdges method), then not all the connected tangential edges are selected.
This does not match the result when using the standard UI method of selecting an edge, right clicking on it and selecting 'Select Tangencies' - which selects the entire loop as expected.
I think the difference between the code behind each of these two methods is that the UI method allows for a small tolerance between the angle of one edge and the angle of the connected edge, but the older (since Inventor 5.3) Edge.TangentiallyConnectedEdges method does not, which returns incorrect results.
Anyway - I've proved this by writing my own version of the Edge.TangentiallyConnectedEdges function which will still consider edges to be 'tangent' if they have an angle of up to 0.01 degrees between them, and this works fine. It is 5 times slower than the Autodesk method (in the example file attached) but I can live with this. My function is in the iLogic rule called 'Select Tangent - With Tolerance'
Perhaps this might be useful to someone else before a fix is provided (if necessary) by Autodesk. Any feedback welcome.
Luke