As we can see here, the BREP has 3 edges and I want to fillet one of them.
How can I identify this edge and select it with a GH component to feed FilEdge? Please no add-on if possible.
Dug a bit deeper in the search results and found a definition that was doing some edge selection but I’m stuck here;
It seems I was able to identify the curve I need but I don’t know how to pass on this information…
Pot7.gh (14.0 KB)
In code you posted (Pot7.gh), I see SrfMorph instead of FilEdge
You just need to give the FilletEdge component the index number of the edge the you want to filet.
When I have to do this I first use DeconstructBRep to get the Faces, Edges and Vertices.
I then plug the Edges into CurveMidPoint and then use Point list to number them. This numbers every edge so you can see what index number you want to give the FilletEdge component.
You can do the same thing if you want to find the face index numbers by plugging the Faces from DecBRep into Area component to get the centroid points.
Once you know what index numbers you need for the edges you want to fillet you can either work out some logic to get them or just use a slider or panel.
Another technique is to use the BRepTopology component. This gives you the indexes of all the edges around each face so if you know which face you want a fillet all the way around you can get the indexes for all the edges.
FILLET_EDGES.gh (10.7 KB)
Sorry, it was the wrong file…
Pot6.gh (27.1 KB)
Thanks, I got it to work.
But it doesn’t look like it would be robust. If the geometry changes, there’s a chance the edge would have a different index number?
Pot8.gh (21.2 KB)
Yes, that’s always going to be an issue unless you can find a more robust logic to determine the edges.
You could use things like closest point on curve if your BRep is always a similar shape, to select the edges.
It can be hard to define logic that always gets the right edge index.
I tried for a while to select the correct edge based on it’s z-axis position, using a “smaller than” condition, but I couldn’t come up with a working combination of component.
For this file, maybe the most robust would be if there’s a way to identify the edge that is the lowest in Z (or closest to zero), but I’m lost with all these similar components and their arbitrary names.
This fillets the edge with the lowest midpoint.
Obviously it will fail if several edge midpoints have the same Z value.
FILLET_EDGES_LOWEST_MIDPOINT.gh (9.3 KB)
I’ll try that!
Will most probably be fine for all the shapes that could be cooked up with this definition.
Thanks a lot!!!
I know you found a solution with @martynjhogg, and I’d say that’s the way to go. Here are a couple of additional options, perhaps more redundant than robust:
Pot8.gh (34.3 KB)
Thanks René, I’ll study that!
I use the same approach. I find it a more foreseeable approach to build the polysurfaces in a way that the edge indexes never change. That way once you know which edge has which index number you can just work on it. Because sometimes an edge with an index no 5 for example, can be number 7 if you change something in your definition before the fillet command point. That being said, I am introducing this idea theoretically but I can’t achieve it always anyways. Generally it is so much time consuming to ensure the edge indexes stay the same then just trying with trial and error method.