[Draft] Cleaned code in arc 3Points preview

Arc tracker during creation is computed by arc tracker new method.
This commit is contained in:
carlopav
2019-06-22 19:01:06 +02:00
committed by Yorik van Havre
parent 630f0ba906
commit aa124266f9

View File

@@ -5569,17 +5569,9 @@ class Draft_Arc_3Points:
FreeCAD.ActiveDocument.recompute()
def drawArc(self,point,info):
if len(self.points) == 2:
import Part
if point.sub(self.points[1]).Length > 0.001:
e = Part.Arc(self.points[0],self.points[1],point).toShape()
self.tracker.normal = e.Curve.Axis.negative() # for some reason the axis always points "backwards"
self.tracker.basevector = self.tracker.getDeviation()
self.tracker.setCenter(e.Curve.Center)
self.tracker.setRadius(e.Curve.Radius)
self.tracker.setStartPoint(self.points[0])
self.tracker.setEndPoint(point)
self.tracker.setBy3Points(self.points[0],self.points[1],point)
#---------------------------------------------------------------------------