I have some folded sheets and I need to find out which face or faces have the largest number of tangent faces.
This is in Grasshopper.
No code, not even a picture. How are you expecting people to help you?
The largest number looks to be 5 - 4 tangents to a specific srf.
-wim
Where there is a central hole, I know that it has 4 tangent faces, which are the 4 sides of the folds.
The problem is that I identify the piece as a “Brep”.
This “Brep” has many faces.
Find which face it is in the list of faces.
My_Example.3dm (1.5 MB)
my_Example.gh (11.7 KB)
Faces 2 and 13 are the central faces of this piece.
I know that these are the central faces and consequently the ones with the most tangent sides.
The question is how to create an algorithm that finds them using Grasshopper.
maybe a good starting point could be Brep Topology, but my very first guess is to get rid of fillets, as they are those sort of “bridges between faces but not faces themselves” (I’m just spitting ideas, if you know the Faces you are interested in are always planar, then you can filter out those with curvature?)
[edit] wait, isn’t the problem I pose above the answer to the question itself?
→ because neighbor faces that need to be counted always have a fillet in between, then the surface that has the most neighboring (unique) fillets is the most connected surface?
Yes. The surface that has more neighboring fillets is the most connected.
this is just the sketch of an idea, be aware that it counts the hole as a connection [meaning it makes no difference between any sort of curved surface] (indeed the “winners” here are listed as 5 connection each instead of 4):
count_neighbor_faces.gh (63.1 KB)
example: if one face was connected just to another single face, but it also had 10 holes, that face would be revealed as the most connected face… need to think to a way to filter holes out, and need gin tonics for that
Hey.
Testing your code.
It looks very promising to me.
If that’s the case, I’ll move on to the second step.
Just a minute.
Now let’s share the whole mess I’m making.
The goal was to unfold a steel plate.
I found a tool called byRhinoGadgetPlus.
And it had an example.
But when I tried to make it work, it didn’t work with the pieces I had.
I discovered in the case of this and others that it worked by chance when you informed the side that has the most interconnected folds. The fillets.
But how do you locate them?
It seems you found the solution.
Now I’m going to try to put it all together in one solution.
Although I prefer to have an independent solution to the problem without depending on third-party code.
But for now, this is what I have.
The final version is here.
With the use of SheepMetal
Sorry. I said byRhinoGadgetPlus before but it’s SheepMetal
https://www.food4rhino.com/en/app/sheepmetal?lang=en
sheet_metal_samples_v0.2.0_bestfx.ghx (1.1 MB)
Many thanks to “inno” for his attention to this issue.
Your code is wonderful.
Thanks to everyone who contributed.
Let’s continue.
The final goal is to get to the laser cut and the average fold line.
There is a layer in the drawing that shows me the Laser Cut and there is a layer in the center line that shows the fold line.
I know that I will get the angles from this part of the code in some way that I don’t know how yet.
The question is how to create the fold line and put the Fold Angles on it.
sheet_metal_samples_v0.2.0_bestfx.ghx (507.3 KB)