Attempts to build a wire that consists of the edges in the provided list :param cls: :param listOfEdges: a list of Edge objects. The edges are not to be consecutive. :return: a wire with the edges assembled BRepBuilderAPI_MakeWire::Error() values:
(cls, listOfEdges: Iterable[Edge])
| 2949 | |
| 2950 | @classmethod |
| 2951 | def assembleEdges(cls, listOfEdges: Iterable[Edge]) -> Wire: |
| 2952 | """ |
| 2953 | Attempts to build a wire that consists of the edges in the provided list |
| 2954 | |
| 2955 | :param cls: |
| 2956 | :param listOfEdges: a list of Edge objects. The edges are not to be consecutive. |
| 2957 | :return: a wire with the edges assembled |
| 2958 | |
| 2959 | BRepBuilderAPI_MakeWire::Error() values: |
| 2960 | |
| 2961 | * BRepBuilderAPI_WireDone = 0 |
| 2962 | * BRepBuilderAPI_EmptyWire = 1 |
| 2963 | * BRepBuilderAPI_DisconnectedWire = 2 |
| 2964 | * BRepBuilderAPI_NonManifoldWire = 3 |
| 2965 | """ |
| 2966 | wire_builder = BRepBuilderAPI_MakeWire() |
| 2967 | |
| 2968 | occ_edges_list = TopTools_ListOfShape() |
| 2969 | for e in listOfEdges: |
| 2970 | occ_edges_list.Append(e.wrapped) |
| 2971 | wire_builder.Add(occ_edges_list) |
| 2972 | |
| 2973 | wire_builder.Build() |
| 2974 | |
| 2975 | if not wire_builder.IsDone(): |
| 2976 | w = ( |
| 2977 | "BRepBuilderAPI_MakeWire::Error(): returns the construction status. BRepBuilderAPI_WireDone if the wire is built, or another value of the BRepBuilderAPI_WireError enumeration indicating why the construction failed = " |
| 2978 | + str(wire_builder.Error()) |
| 2979 | ) |
| 2980 | warnings.warn(w) |
| 2981 | |
| 2982 | return cls(wire_builder.Wire()) |
| 2983 | |
| 2984 | @classmethod |
| 2985 | def makeCircle(cls, radius: float, center: VectorLike, normal: VectorLike) -> Wire: |
no outgoing calls