I have this definition making a series of roof rafters. I want to analyze each rafter using brep explode. However qwhen I select a side, I get different results. How would I make each rafter have the same properties so when I select a side, they are all uniform. Attached is screen shot showing problem and grasshopper definition. Thanks!
I think you might have to use some logic to select the edge index that you need instead of trying to make sure that the index you want is always the same.
For example, if you take the midpoint of each edge and then the distance from that midpoint to a curve running around the top of all the Breps, you can then sort by distance and sort the edge indices synchronously to get the index of the edge closest top the curve.
There might be some better logic that always gets the index of the edge you need.
In summary, what youâre seeing is normal behavior.
Similar to what Martyn suggests, if your goal is to select the same edge from each surface with an index value, you must sort the four edges of each surface around their plane first (this requires that their planes are also previously aligned consistently):
If you donât want to sort edges around aligned planes, then you still have to sort the edge points, as Joseph suggests, so you are able to pick the lowest one.
Thanks so much that is very helpful. Now I have another conundrum. When I reparametrize the curves, the points move differently. How can I make these curves all the same. See Screenshot. I added the definition as well.
This is also ânormalâ behavior (this answer is getting old, I know, lol). Itâs not uncommon for brep edges to point in different directions. There are multiple ways to go about this.
Nonetheless, because these edges are all essentially lines, we can do some simple stuff. One option is to find one endpoint (for example, the endpoint closest to the Rhino origin) and then the other endpoint so that the first one becomes point A and the second one becomes point B and you construct a new line for each edge. Another option, since each line is also a vector, is to compare each one against the Rhino X direction, then flip/reverse the ones pointing ânegativeâ.