Skip to content

Commit

Permalink
Draft: Fixed inverted arcs in DXF output - fixes #1513
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed May 8, 2014
1 parent 8e1ebcd commit 9cd2c75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Mod/Draft/importDXF.py
Expand Up @@ -1506,6 +1506,8 @@ def getArcData(edge):
a2 = -DraftVecUtils.angle(ve2.sub(ce))
if round(a1,Draft.precision()) == round(a2,Draft.precision()):
return None,None, None, None
if edge.Curve.Axis.z < 0.0:
ang1, ang2 = ang2, ang1
pseudoarc = Part.ArcOfCircle(edge.Curve,a1,a2).toShape()
if round(pseudoarc.Length,Draft.precision()) != round(edge.Length,Draft.precision()):
ang1, ang2 = ang2, ang1
Expand Down Expand Up @@ -1833,4 +1835,4 @@ def exportPage(page,filename):
dxfGetColors = p.GetBool("dxfGetOriginalColors",False)
dxfUseDraftLayers = p.GetBool("dxfUseDraftLayers",False)
dxfBrightBackground = isBrightBackground()
dxfDefaultColor = getColor()
dxfDefaultColor = getColor()

0 comments on commit 9cd2c75

Please sign in to comment.