The placement of 3 point arcs very often was unexpected and typically did not match the placement of circles created on the same working plane. This PR updates the code to use the placement of the working plane to adjust the placement of the created arc. Additonally: * Avoided code duplication by just passing the edge from make_arc_3points to make_circle. * Removed inconsistent map_mode argument from make_arc_3points and the cryptic code related to it. The handling of the support property is something that has to be reviewed for all Draft commands at some point though.
2020 May
These modules contain the basic functions to create custom "scripted objects" defined within the workbench.
Each scripted object has a "make function" like make_rectangle,
a proxy class like Rectangle, and a viewprovider class
like ViewProviderRectangle.
Each make function should import the two corresponding classes
in order to create a new object with the correct data
and visual properties for that object.
These classes should be defined in the modules in draftobjects/
and draftviewproviders/.
The make functions can be used in both graphical and non-graphical
modes (terminal only); in the latter case the viewprovider is not used.
The functions are also used internally by the graphical "GuiCommands"
(buttons, menu actions) defined in the modules in draftguitools/
and drafttaskpanels/.
These make functions were previously defined in the Draft.py module,
which was very large. Now Draft.py just loads the individual modules
in order to provide these functions under the Draft namespace.
import Draft
new_obj1 = Draft.make_rectangle(...)
new_obj2 = Draft.make_circle(...)
new_obj3 = Draft.make_line(...)
The functions in the Draft namespace are considered to be the public
application programming interface (API) of the workbench, and should be
usable in scripts, macros, and other workbenches.
For more information see the thread: [Discussion] Splitting Draft tools into their own modules