def addFace(self, face, saveFaceCopy=True): if saveFaceCopy: copier = BRepBuilderAPI.BRepBuilderAPI_Copy(face) self.faces.append(copier.Shape()) copier.Delete() ow = brt.OuterWire(face) logging.debug("Adding OuterWire...") self.addWire(ow) logging.debug("Adding Other Wires...") #now get the other wires te = TopExp.TopExp_Explorer() te.Init(face, TopAbs.TopAbs_WIRE) while te.More(): w = ts.Wire(te.Current()) if not w.IsSame(ow): self.addWire(w) te.Next() te.Clear() te.Destroy()
def addFace(self, face): copier = BRepBuilderAPI.BRepBuilderAPI_Copy(face) self.faces.Append(ts.Face(copier.Shape())) #self.faces.append(face); copier.Delete()