Draft: move arc_3points to the make package

Also import it in the `Draft` namespace so that is available
as `Draft.make_arc_3points`.

Use this new function in the unit test `drafttests.test_creation`,
in the GuiCommand `draftguitools.gui_arcs`, and in the
`draft_test_objects` script.
This commit is contained in:
vocx-fc
2020-05-08 17:29:21 -05:00
committed by Yorik van Havre
parent 9a2aa39538
commit d3d52c57b4
6 changed files with 22 additions and 16 deletions

View File

@@ -32,11 +32,11 @@ Or load it as a module and use the defined function.
import os
import datetime
import math
import FreeCAD as App
from FreeCAD import Vector
import Draft
from FreeCAD import Vector
from draftutils.messages import _msg, _wrn
import draftobjects.arc_3points
if App.GuiUp:
import DraftFillet
@@ -172,9 +172,9 @@ def create_test_file(file_name="draft_test_objects",
_msg(16 * "-")
_msg("Circular arc 3 points")
draftobjects.arc_3points.make_arc_3points([Vector(4600, 0, 0),
Vector(4600, 800, 0),
Vector(4000, 1000, 0)])
Draft.make_arc_3points([Vector(4600, 0, 0),
Vector(4600, 800, 0),
Vector(4000, 1000, 0)])
t_xpos += 600
_t = Draft.makeText(["Circular arc 3 points"], Vector(t_xpos, t_ypos, 0))
_set_text(_t)