Skip to content

Commit

Permalink
Wire.combine output ShapeList
Browse files Browse the repository at this point in the history
  • Loading branch information
gumyr committed Aug 1, 2023
1 parent 2831078 commit 8e3b7df
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/build123d/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -6009,19 +6009,17 @@ def to_wire(self) -> Wire:
@classmethod
def combine(
cls, wires: Iterable[Union[Wire, Edge]], tol: float = 1e-9
) -> list[Wire]:
"""Attempt to combine a list of wires and edges into a new wire.
) -> ShapeList[Wire]:
"""combine
Combine a list of wires and edges into a list of Wires.
Args:
cls: param list_of_wires:
tol: default 1e-9
wires: Iterable[Union[Wire:
Edge]]:
tol: float: (Default value = 1e-9)
wires (Iterable[Union[Wire, Edge]]): unsorted
tol (float, optional): tolerance. Defaults to 1e-9.
Returns:
list[Wire]
ShapeList[Wire]: Wires
"""

edges_in = TopTools_HSequenceOfShape()
Expand All @@ -6032,7 +6030,7 @@ def combine(

ShapeAnalysis_FreeBounds.ConnectEdgesToWires_s(edges_in, tol, False, wires_out)

return [cls(wire) for wire in wires_out]
return ShapeList(cls(wire) for wire in wires_out)

def fix_degenerate_edges(self, precision: float) -> Wire:
"""fix_degenerate_edges
Expand Down

0 comments on commit 8e3b7df

Please sign in to comment.