I am interested in getting the edges adjacent to a specific face of a brep. Here is the documentation I’m looking at:
Brep: https://developer.rhino3d.com/5/api/RhinoCommon/html/T_Rhino_Geometry_Brep.htm
BrepEdgeList: https://developer.rhino3d.com/5/api/RhinoCommon/html/T_Rhino_Geometry_Collections_BrepEdgeList.htm
here is what I think I should do based on the documentation, because b.Edges is a BrepEdgeList object which has the property “Item”:
#f is a face, b is a brep
indices = f.AdjacentEdges()
edges = []
for i in indices:
edges.append(b.Edges.Item[i])
The above works, but so does this:
#f is a face, b is a brep
indices = f.AdjacentEdges()
edges = []
for i in indices:
edges.append(b.Edges[i])
My questions are:
- Why does the second one work – why can I use typical list syntax with the BrepEdgeList object? I suspect this has something to do with the Rhino.Geometry.Collections namespace.
- When I am reading through documentation in the future, how can I determine whether a class “acts like a list”?