diff --git a/src/Mod/Arch/ArchCommands.py b/src/Mod/Arch/ArchCommands.py index a6d7c889e..0e15fc6ac 100644 --- a/src/Mod/Arch/ArchCommands.py +++ b/src/Mod/Arch/ArchCommands.py @@ -321,7 +321,7 @@ def closeHole(shape): for e in shape.Edges: if lut[e.hashCode()] == 1: bound.append(e) - bound = DraftGeomUtils.sortEdges(bound) + bound = Part.__sortEdges__(bound) try: nface = Part.Face(Part.Wire(bound)) shell = Part.makeShell(shape.Faces+[nface]) diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index 8d9797e9f..ca1d448be 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -423,7 +423,7 @@ class Component: dvec2 = DraftVecUtils.scaleTo(dvec,obj.Offset.Value) wire = DraftGeomUtils.offsetWire(wire,dvec2) w2 = DraftGeomUtils.offsetWire(wire,dvec) - w1 = Part.Wire(DraftGeomUtils.sortEdges(wire.Edges)) + w1 = Part.Wire(Part.__sortEdges__(wire.Edges)) sh = DraftGeomUtils.bind(w1,w2) elif obj.Align == "Right": dvec.multiply(w) @@ -433,7 +433,7 @@ class Component: dvec2 = DraftVecUtils.scaleTo(dvec,obj.Offset.Value) wire = DraftGeomUtils.offsetWire(wire,dvec2) w2 = DraftGeomUtils.offsetWire(wire,dvec) - w1 = Part.Wire(DraftGeomUtils.sortEdges(wire.Edges)) + w1 = Part.Wire(Part.__sortEdges__(wire.Edges)) sh = DraftGeomUtils.bind(w1,w2) elif obj.Align == "Center": dvec.multiply(w/2) diff --git a/src/Mod/Arch/ArchFrame.py b/src/Mod/Arch/ArchFrame.py index 41ca55c65..a77352c44 100644 --- a/src/Mod/Arch/ArchFrame.py +++ b/src/Mod/Arch/ArchFrame.py @@ -139,7 +139,7 @@ class _Frame(ArchComponent.Component): profile = baseprofile.copy() #basepoint = profile.Placement.Base if hasattr(obj,"BasePoint"): - edges = DraftGeomUtils.sortEdges(profile.Edges) + edges = Part.__sortEdges__(profile.Edges) basepointliste = [profile.CenterOfMass] for edge in edges: basepointliste.append(DraftGeomUtils.findMidpoint(edge)) diff --git a/src/Mod/Arch/ArchRoof.py b/src/Mod/Arch/ArchRoof.py index 13b455a9e..69fb76a16 100644 --- a/src/Mod/Arch/ArchRoof.py +++ b/src/Mod/Arch/ArchRoof.py @@ -63,7 +63,7 @@ def makeRoof(baseobj=None,facenr=0, angles=[45.,], run = [], idrel = [0,],thickn w = obj.Base.Shape.Wires[0] if w: if w.isClosed(): - edges = DraftGeomUtils.sortEdges(w.Edges) + edges = Part.__sortEdges__(w.Edges) l = len(edges) la = len(angles) @@ -545,7 +545,7 @@ class _Roof(ArchComponent.Component): self.shps = [] self.subVolshps = [] heights = [] - edges = DraftGeomUtils.sortEdges(w.Edges) + edges = Part.__sortEdges__(w.Edges) l = len(edges) print("le contour contient "+str(l)+" aretes") for i in range(l): diff --git a/src/Mod/Arch/ArchSectionPlane.py b/src/Mod/Arch/ArchSectionPlane.py index 8701dd93a..a423027f7 100644 --- a/src/Mod/Arch/ArchSectionPlane.py +++ b/src/Mod/Arch/ArchSectionPlane.py @@ -149,9 +149,9 @@ class _ViewProviderSectionPlane: vobj.addProperty("App::PropertyFloat","LineWidth","Base","") vobj.addProperty("App::PropertyColor","LineColor","Base","") vobj.addProperty("App::PropertyBool","CutView","Arch",translate("Arch","Show the cut in the 3D view")) - vobj.DisplayLength = 1 - vobj.DisplayHeight = 1 - vobj.ArrowSize = 1 + vobj.DisplayLength = 1000 + vobj.DisplayHeight = 1000 + vobj.ArrowSize = 50 vobj.Transparency = 85 vobj.LineWidth = 1 vobj.LineColor = (0.0,0.0,0.4,1.0) diff --git a/src/Mod/Arch/ArchSpace.py b/src/Mod/Arch/ArchSpace.py index b6f6221ce..15d5efab2 100644 --- a/src/Mod/Arch/ArchSpace.py +++ b/src/Mod/Arch/ArchSpace.py @@ -341,7 +341,7 @@ class _Space(ArchComponent.Component): sh = obj.Shape.copy() cutplane,v1,v2 = ArchCommands.getCutVolume(pl,sh) e = sh.section(cutplane) - e = DraftGeomUtils.sortEdges(e.Edges) + e = Part.__sortEdges__(e.Edges) w = Part.Wire(e) f = Part.Face(w) return f.Area diff --git a/src/Mod/Arch/ArchVRM.py b/src/Mod/Arch/ArchVRM.py index 3eb1a60b6..58e0f3025 100644 --- a/src/Mod/Arch/ArchVRM.py +++ b/src/Mod/Arch/ArchVRM.py @@ -180,7 +180,7 @@ class Renderer: norm = face[0].normalAt(0,0) for w in face[0].Wires: verts = [] - edges = DraftGeomUtils.sortEdges(w.Edges) + edges = Part.__sortEdges__(w.Edges) #print len(edges)," edges after sorting" for e in edges: v = e.Vertexes[0].Point @@ -217,7 +217,7 @@ class Renderer: wires = [] for w in face[0].Wires: verts = [] - edges = DraftGeomUtils.sortEdges(w.Edges) + edges = Part.__sortEdges__(w.Edges) for e in edges: v = e.Vertexes[0].Point verts.append(FreeCAD.Vector(v.x,v.y,0)) @@ -568,7 +568,7 @@ class Renderer: "Returns a SVG path data string from a 2D wire" def tostr(val): return str(round(val,DraftVecUtils.precision())) - edges = DraftGeomUtils.sortEdges(w.Edges) + edges = Part.__sortEdges__(w.Edges) v = edges[0].Vertexes[0].Point svg = 'M '+ tostr(v.x) +' '+ tostr(v.y) + ' ' for e in edges: diff --git a/src/Mod/Arch/ArchWall.py b/src/Mod/Arch/ArchWall.py index d20128335..89baa9009 100644 --- a/src/Mod/Arch/ArchWall.py +++ b/src/Mod/Arch/ArchWall.py @@ -499,16 +499,6 @@ class _ViewProviderWall(ArchComponent.ViewProviderComponent): return ":/icons/Arch_Wall_Tree_Assembly.svg" return ":/icons/Arch_Wall_Tree.svg" - def getDisplayModes(self,vobj): - return ArchComponent.ViewProviderComponent.getDisplayModes(self,vobj)+["Flat 2D"] - - def setDisplayMode(self,mode): - self.Object.Proxy.execute(self.Object) - if mode == "Flat 2D": - return "Flat Lines" - else: - return ArchComponent.ViewProviderComponent.setDisplayMode(self,mode) - def attach(self,vobj): self.Object = vobj.Object return diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index 288839a8f..8c44078d4 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -1081,7 +1081,7 @@ def getRepresentation(ifcfile,context,obj,forcebrep=False,subtraction=False,tess # extruded polyline if not curves: - w = Part.Wire(DraftGeomUtils.sortEdges(p.Edges)) + w = Part.Wire(Part.__sortEdges__(p.Edges)) pts = [ifcfile.createIfcCartesianPoint(tuple(v.Point)[:2]) for v in w.Vertexes+[w.Vertexes[0]]] pol = ifcfile.createIfcPolyline(pts) @@ -1089,7 +1089,7 @@ def getRepresentation(ifcfile,context,obj,forcebrep=False,subtraction=False,tess else: segments = [] last = None - edges = DraftGeomUtils.sortEdges(p.Edges) + edges = Part.__sortEdges__(p.Edges) for e in edges: if isinstance(e.Curve,Part.Circle): follow = True @@ -1195,7 +1195,7 @@ def getRepresentation(ifcfile,context,obj,forcebrep=False,subtraction=False,tess shapetype = "brep" for fcface in fcsolid.Faces: loops = [] - verts = [v.Point for v in Part.Wire(DraftGeomUtils.sortEdges(fcface.OuterWire.Edges)).Vertexes] + verts = [v.Point for v in Part.Wire(Part.__sortEdges__(fcface.OuterWire.Edges)).Vertexes] c = fcface.CenterOfMass v1 = verts[0].sub(c) v2 = verts[1].sub(c) @@ -1208,7 +1208,7 @@ def getRepresentation(ifcfile,context,obj,forcebrep=False,subtraction=False,tess loops.append(bound) for wire in fcface.Wires: if wire.hashCode() != fcface.OuterWire.hashCode(): - verts = [v.Point for v in Part.Wire(DraftGeomUtils.sortEdges(wire.Edges)).Vertexes] + verts = [v.Point for v in Part.Wire(Part.__sortEdges__(wire.Edges)).Vertexes] v1 = verts[0].sub(c) v2 = verts[1].sub(c) if DraftVecUtils.angle(v2,v1,DraftVecUtils.neg(n)) >= 0: diff --git a/src/Mod/Arch/importIFClegacy.py b/src/Mod/Arch/importIFClegacy.py index e0ed479b4..6db269698 100644 --- a/src/Mod/Arch/importIFClegacy.py +++ b/src/Mod/Arch/importIFClegacy.py @@ -1198,7 +1198,7 @@ def getTuples(data,scale=1,placement=None,normal=None,close=True): t = [] if len(data.Wires) == 1: import Part,DraftGeomUtils - data = Part.Wire(DraftGeomUtils.sortEdges(data.Wires[0].Edges)) + data = Part.Wire(Part.__sortEdges__(data.Wires[0].Edges)) verts = data.Vertexes try: c = data.CenterOfMass @@ -1274,7 +1274,7 @@ def getIfcExtrusionData(obj,scale=1,nosubs=False): ecurves = [] last = None import DraftGeomUtils - edges = DraftGeomUtils.sortEdges(p.Edges) + edges = Part.__sortEdges__(p.Edges) for e in edges: if isinstance(e.Curve,Part.Circle): import math diff --git a/src/Mod/Arch/importOBJ.py b/src/Mod/Arch/importOBJ.py index 2282d2aaa..c84d2dd3a 100644 --- a/src/Mod/Arch/importOBJ.py +++ b/src/Mod/Arch/importOBJ.py @@ -84,7 +84,7 @@ def getIndices(shape,offset): else: fi = "" # OCC vertices are unsorted. We need to sort in the right order... - edges = DraftGeomUtils.sortEdges(f.OuterWire.Edges) + edges = Part.__sortEdges__(f.OuterWire.Edges) #print edges for e in edges: #print e.Vertexes[0].Point,e.Vertexes[1].Point diff --git a/src/Mod/Arch/importWebGL.py b/src/Mod/Arch/importWebGL.py index b81dd4038..759f9db7d 100644 --- a/src/Mod/Arch/importWebGL.py +++ b/src/Mod/Arch/importWebGL.py @@ -171,7 +171,7 @@ def getObjectData(obj,wireframeMode=wireframeStyle): result += tab+"geom.faces.push( new THREE.Face3"+str(f)+" );\n" for f in obj.Shape.Faces: for w in f.Wires: - wo = Part.Wire(DraftGeomUtils.sortEdges(w.Edges)) + wo = Part.Wire(Part.__sortEdges__(w.Edges)) wires.append(wo.discretize(QuasiDeflection=0.1)) elif obj.isDerivedFrom("Mesh::Feature"): diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index 9543c3f2d..ae0e2b2fb 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -785,7 +785,7 @@ def makeWire(pointslist,closed=False,placement=None,face=True,support=None): import DraftGeomUtils, Part if not isinstance(pointslist,list): e = pointslist.Wires[0].Edges - pointslist = Part.Wire(DraftGeomUtils.sortEdges(e)) + pointslist = Part.Wire(Part.__sortEdges__(e)) nlist = [] for v in pointslist.Vertexes: nlist.append(v.Point) @@ -1760,13 +1760,13 @@ def getSVG(obj,scale=1,linewidth=0.35,fontsize=12,fillstyle="shape color",direct svg += 'id="%s" ' % pathname svg += ' d="' if not wires: - egroups = (DraftGeomUtils.sortEdges(edges),) + egroups = (Part.__sortEdges__(edges),) else: egroups = [] for w in wires: w1=w.copy() w1.fixWire() - egroups.append(DraftGeomUtils.sortEdges(w1.Edges)) + egroups.append(Part.__sortEdges__(w1.Edges)) for egroupindex, edges in enumerate(egroups): vs=() #skipped for the first edge for edgeindex,e in enumerate(edges): @@ -2648,7 +2648,7 @@ def upgrade(objects,delete=False,force=None): newobj.Shape = f else: edges.append(Part.Line(p1,p0).toShape()) - w = Part.Wire(DraftGeomUtils.sortEdges(edges)) + w = Part.Wire(Part.__sortEdges__(edges)) newobj = FreeCAD.ActiveDocument.addObject("Part::Feature","Wire") newobj.Shape = w addList.append(newobj) @@ -2751,7 +2751,7 @@ def upgrade(objects,delete=False,force=None): for e in o.Shape.Edges: edges.append(e) try: - nedges = DraftGeomUtils.sortEdges(edges[:]) + nedges = Part.__sortEdges__(edges[:]) # for e in nedges: print("debug: ",e.Curve,e.Vertexes[0].Point,e.Vertexes[-1].Point) w = Part.Wire(nedges) except Part.OCCError: @@ -4678,7 +4678,7 @@ class _Shape2DView(_DraftObject): c = sh.section(cutp) if (obj.ProjectionMode == "Cutfaces") and (sh.ShapeType == "Solid"): try: - c = Part.Wire(DraftGeomUtils.sortEdges(c.Edges)) + c = Part.Wire(Part.__sortEdges__(c.Edges)) except Part.OCCError: pass else: @@ -4949,7 +4949,7 @@ class _PathArray(_DraftObject): import DraftGeomUtils closedpath = DraftGeomUtils.isReallyClosed(pathwire) normal = DraftGeomUtils.getNormal(pathwire) - path = DraftGeomUtils.sortEdges(pathwire.Edges) + path = Part.__sortEdges__(pathwire.Edges) ends = [] cdist = 0 for e in path: # find cumulative edge end distance diff --git a/src/Mod/Draft/DraftGeomUtils.py b/src/Mod/Draft/DraftGeomUtils.py index 43738cf97..9f8f8ff92 100755 --- a/src/Mod/Draft/DraftGeomUtils.py +++ b/src/Mod/Draft/DraftGeomUtils.py @@ -619,7 +619,7 @@ def findClosest(basepoint,pointslist): def concatenate(shape): "concatenate(shape) -- turns several faces into one" edges = getBoundary(shape) - edges = sortEdges(edges) + edges = Part.__sortEdges__(edges) try: wire=Part.Wire(edges) face=Part.Face(wire) @@ -656,11 +656,13 @@ def isLine(bsp): if bsp.tangent(i*step) != b: return False return True - + + def sortEdges(edges): - """Sort edges in path order, i.e., such that the end point of edge N - equals the start point of edge N+1. - """ + "Deprecated. Use Part__sortEdges__ instead" + + raise DeprecationWarning("Deprecated. Use Part__sortEdges__ instead") + # Build a dictionary of edges according to their end points. # Each entry is a set of edges that starts, or ends, at the # given vertex hash. @@ -733,9 +735,12 @@ def sortEdges(edges): # All done. return ret -def sortEdgesOld(lEdges, aVertex=None): - "an alternative, more accurate version of Part.__sortEdges__ (old version)" +def sortEdgesOld(lEdges, aVertex=None): + "Deprecated. Use Part__sortEdges__ instead" + + raise DeprecationWarning("Deprecated. Use Part__sortEdges__ instead") + #There is no reason to limit this to lines only because every non-closed edge always #has exactly two vertices (wmayer) #for e in lEdges: @@ -922,7 +927,7 @@ def superWire(edgeslist,closed=False): vd = v2.sub(v1) vd.scale(.5,.5,.5) return v1.add(vd) - edges = sortEdges(edgeslist) + edges = Part.__sortEdges__(edgeslist) print(edges) newedges = [] for i in range(len(edges)): @@ -999,35 +1004,6 @@ def findMidpoint(edge): else: return None -# OBSOLETED -#def complexity(obj): -# ''' -# tests given object for shape complexity: -# 1: line -# 2: arc -# 3: circle -# 4: open wire with no arc -# 5: closed wire -# 6: wire with arcs -# 7: faces -# 8: faces with arcs -# ''' -# shape = obj.Shape -# if shape.Faces: -# for e in shape.Edges: -# if (isinstance(e.Curve,Part.Circle)): return 8 -# return 7 -# if shape.Wires: -# for e in shape.Edges: -# if (isinstance(e.Curve,Part.Circle)): return 6 -# for w in shape.Wires: -# if w.isClosed(): return 5 -# return 4 -# if (isinstance(shape.Edges[0].Curve,Part.Circle)): -# if len(shape.Vertexes) == 1: -# return 3 -# return 2 -# return 1 def findPerpendicular(point,edgeslist,force=None): ''' @@ -1060,7 +1036,7 @@ def findPerpendicular(point,edgeslist,force=None): else: return None return None -def offset(edge,vector): +def offset(edge,vector,trim=False): ''' offset(edge,vector) returns a copy of the edge at a certain (vector) distance @@ -1075,8 +1051,12 @@ def offset(edge,vector): return Part.Line(v1,v2).toShape() elif geomType(edge) == "Circle": rad = edge.Vertexes[0].Point.sub(edge.Curve.Center) - newrad = Vector.add(rad,vector).Length - return Part.Circle(edge.Curve.Center,NORM,newrad).toShape() + curve = Part.Circle(edge.Curve) + curve.Radius = Vector.add(rad,vector).Length + if trim: + return Part.ArcOfCircle(curve,edge.FirstParameter,edge.LastParameter).toShape() + else: + return curve.toShape() else: return None @@ -1147,7 +1127,7 @@ def offsetWire(wire,dvec,bind=False,occ=False): the wire. If bind is True (and the shape is open), the original wire and the offsetted one are bound by 2 edges, forming a face. ''' - edges = sortEdges(wire.Edges) + edges = Part.__sortEdges__(wire.Edges) norm = getNormal(wire) closed = isReallyClosed(wire) nedges = [] @@ -1174,13 +1154,11 @@ def offsetWire(wire,dvec,bind=False,occ=False): v = vec(curredge) angle = DraftVecUtils.angle(vec(edges[0]),v,norm) delta = DraftVecUtils.rotate(delta,angle,norm) - nedge = offset(curredge,delta) + #print "edge ",i,": ",curredge.Curve," ",curredge.Orientation," parameters:",curredge.ParameterRange," vector:",delta + nedge = offset(curredge,delta,trim=True) if not nedge: return None - if isinstance(curredge.Curve,Part.Circle): - nedge = Part.ArcOfCircle(nedge.Curve,curredge.FirstParameter,curredge.LastParameter).toShape() nedges.append(nedge) - FreeCAD.n=nedges nedges = connect(nedges,closed) if bind and not closed: e1 = Part.Line(edges[0].Vertexes[0].Point,nedges[0].Vertexes[0].Point).toShape() @@ -1374,6 +1352,7 @@ def isPlanar(shape): def findWiresOld(edges): '''finds connected edges in the list, and returns a list of lists containing edges that can be connected''' + raise DeprecationWarning("This function shouldn't be called anymore - use findWires() instead") def verts(shape): return [shape.Vertexes[0].Point,shape.Vertexes[-1].Point] def group(shapes): @@ -1529,7 +1508,7 @@ def cleanFaces(shape): fset = [] for i in isle: fset.append(find(i)) bounds = getBoundary(fset) - shp = Part.Wire(sortEdges(bounds)) + shp = Part.Wire(Part.__sortEdges__(bounds)) shp = Part.Face(shp) if shp.normalAt(0.5,0.5) != find(isle[0]).normalAt(0.5,0.5): shp.reverse() @@ -1617,7 +1596,7 @@ def getCubicDimensions(shape): def removeInterVertices(wire): '''removeInterVertices(wire) - remove unneeded vertices (those that are in the middle of a straight line) from a wire, returns a new wire.''' - edges = sortEdges(wire.Edges) + edges = Part__sortEdges__(wire.Edges) nverts = [] def getvec(v1,v2): if not abs(round(v1.getAngle(v2),precision()) in [0,round(math.pi,precision())]): @@ -1689,7 +1668,7 @@ def fillet(lEdges,r,chamfer=False): return existingCurveType rndEdges = lEdges[0:2] - rndEdges = sortEdges(rndEdges) + rndEdges = Part__sortEdges__(rndEdges) if len(rndEdges) < 2 : return rndEdges @@ -1943,7 +1922,7 @@ def filletWire(aWire,r,chamfer=False): size of the chamfer''' edges = aWire.Edges - edges = sortEdges(edges) + edges = Part.__sortEdges__(edges) filEdges = [edges[0]] for i in range(len(edges)-1): result = fillet([filEdges[-1],edges[i+1]],r,chamfer) diff --git a/src/Mod/Draft/DraftTools.py b/src/Mod/Draft/DraftTools.py index 59ee8a856..3c7e8262e 100644 --- a/src/Mod/Draft/DraftTools.py +++ b/src/Mod/Draft/DraftTools.py @@ -2718,7 +2718,7 @@ class Trimex(Modifier): self.extrudeMode = False if self.obj.Shape.Wires: self.edges = self.obj.Shape.Wires[0].Edges - self.edges = DraftGeomUtils.sortEdges(self.edges) + self.edges = Part.__sortEdges__(self.edges) else: self.edges = self.obj.Shape.Edges self.ghost = [] diff --git a/src/Mod/Draft/DraftVecUtils.py b/src/Mod/Draft/DraftVecUtils.py index a9b64764a..c2d8b7fd2 100644 --- a/src/Mod/Draft/DraftVecUtils.py +++ b/src/Mod/Draft/DraftVecUtils.py @@ -32,7 +32,7 @@ from FreeCAD import Vector, Matrix params = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft") def precision(): - return params.GetInt("precision") + return params.GetInt("precision",6) def typecheck (args_and_types, name="?"): for v,t in args_and_types: diff --git a/src/Mod/Draft/importDXF.py b/src/Mod/Draft/importDXF.py index 6822ddea2..080f7e519 100644 --- a/src/Mod/Draft/importDXF.py +++ b/src/Mod/Draft/importDXF.py @@ -1588,7 +1588,7 @@ def getWire(wire,nospline=False,lw=True): else: # Polyline format return ((v.x,v.y,v.z),None,[None,None],b) - edges = DraftGeomUtils.sortEdges(wire.Edges) + edges = Part.__sortEdges__(wire.Edges) points = [] # print("processing wire ",wire.Edges) for edge in edges: diff --git a/src/Mod/Draft/importSVG.py b/src/Mod/Draft/importSVG.py index 57b80c0ae..7e49b228d 100644 --- a/src/Mod/Draft/importSVG.py +++ b/src/Mod/Draft/importSVG.py @@ -297,8 +297,8 @@ def makewire(path,checkclosed=False,donttry=False): closed if required the 'connectEdgesToWires' function is used''' if not donttry: try: - import DraftGeomUtils - sh = Part.Wire(DraftGeomUtils.sortEdges(path)) + import Part + sh = Part.Wire(Part.__sortEdges__(path)) #sh = Part.Wire(path) isok = (not checkclosed) or sh.isClosed() except Part.OCCError:# BRep_API:command not done diff --git a/src/Mod/Path/PathScripts/PathUtils.py b/src/Mod/Path/PathScripts/PathUtils.py index 247a736df..90e5de3c6 100644 --- a/src/Mod/Path/PathScripts/PathUtils.py +++ b/src/Mod/Path/PathScripts/PathUtils.py @@ -248,10 +248,10 @@ def SortPath(wire,Side,radius,clockwise,firstedge=None,SegLen =0.5): else: preoffset.append(e) - sortedpreoff = DraftGeomUtils.sortEdgesOld(preoffset) + sortedpreoff = Part.__sortEdges__(preoffset) wire = Part.Wire(sortedpreoff) else: - sortedpreoff = DraftGeomUtils.sortEdgesOld(edgelist) + sortedpreoff = Part.__sortEdges__(edgelist) wire = Part.Wire(sortedpreoff) edgelist = []