def edges2(self): "return edges in a list" wireExp = BRepTools.BRepTools_WireExplorer(self.wire) while wireExp.More(): e = wireExp.Current() yield e wireExp.Next()
def addWire(self, wire): logging.debug("Adding Wire:" + str(wire)) loop = Loop() self.loops.append(loop) bwe = BRepTools.BRepTools_WireExplorer(wire) while bwe.More(): edge = bwe.Current() self.addEdge(edge) bwe.Next() bwe.Clear()
def edgesAsSequence(self): "returns edge list as a sequence" wireExp = BRepTools.BRepTools_WireExplorer(self.wire) resultWires = TopTools.TopTools_HSequenceOfShape() while wireExp.More(): e = wireExp.Current() resultWires.Append(e) wireExp.Next() return resultWires