Skip to content

Commit f917d14

Browse files
committed
use sets for defining edge indices
1 parent d7a541c commit f917d14

File tree

1 file changed

+3
-2
lines changed
  • src/compas_rhino/geometry/brep

1 file changed

+3
-2
lines changed

src/compas_rhino/geometry/brep/brep.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,9 +625,10 @@ def filleted(self, radius, edges=None):
625625
If the fillet operation fails.
626626
627627
"""
628-
excluded_indices = [edge.native_edge.EdgeIndex for edge in edges] if edges else []
628+
all_edge_indices = set(edge.native_edge.EdgeIndex for edge in self.edges)
629+
excluded_indices = set(edge.native_edge.EdgeIndex for edge in edges or [])
629630

630-
edge_indices = [i for i in range(len(self.edges)) if i not in excluded_indices]
631+
edge_indices = all_edge_indices - excluded_indices
631632
radii = [radius] * len(edge_indices)
632633
blend = Rhino.Geometry.BlendType.Fillet
633634
rail = Rhino.Geometry.RailType.DistanceFromEdge

0 commit comments

Comments
 (0)