I’m trying to figure out a better way to select subsets of Brep faces based on their continuity, and in particular, tangent faces.
David helped me out with a C# component that I had to put in a loop and hook-up to some Topology analysis Voodoo, but heck, it’s messy and takes too long to process !
I’d be surprised if there wasn’t a component in a plugin out there somewhere that would do this fast and easy, just like you would use SelChain command from within Join, and then set ChainContinuity to Tangent.
Hi David, , If you remember, I managed to make a tree with, for each face of a BREP, the list of faces which are tangentially connected to it, and with your help, I got lists of tangent “chains” of faces.
It required using a C# component and a loop…
Maybe this could be a useful extra output for the “Topology” component.
This is particularly relevant for bent metal parts where it is useful to get the “Intrado” or “Extrado” skin to flatten it.
as I said, haven‘t tested it fully. I spend less then 60 minutes which is a lot for free help in a forum. I believe its more about the idea rather then providing full functionality. Basically you can use this script and devellop it further.I fully commented so even if you dont understand c# you will get the idea from my notes. I also would like to help you further, but I do have a full time job so I cant simply spend 60 hours to it, which is a realistic timeframe for a well engineered functionality like this.
Thanks for your efforts ! Editing C# is out of my league, but at least I know what I’m missing.
That a small script could replace such a messy and convoluted part of my definition is an indication that I should look into scripting indeed !
Hi TomTom,
I think that the issue comes from the fact that you put in the same branch faces which are not tangentially connected to any other.
If they were dispatched in separate branches, this script would be a little jewel
I’m looking into graph theory to solve this problem.
Here is a tree (for Brep N°38) giving, for each face which has tangent neighbours, the list of those neighbours (including itself).
For example, list {38;13} says that face 13 is tangent to face 20 and 18.
If you plot a graph of all the faces (13, and 17 to 25), the two “chains” of tangentially connected faces appear as graph paths of a disjoint graph.
OK folks, I worked out my own solution to this problem.
Using the “BREP topology”, and a but of comparing normals, it is easy to get a tree with, for each face of the BREP, the list of neighboring faces which are tangentially connected.
But then, to get concatenated lists, or “chains” of faces, and despite all the tools in the “Sets” tab,
there didn’t seem to be an easy way to do that.
So, inspired by graph theory, I mapped the faces and the “tangency” condition as a set of nodes connected by links.
Then I got rid of the duplicate lines, made polylines, and reverse-engineered my way back to the face lists.
I guess that this could be useful in other circumstances.