lol...
Edit: Please Triplus, be serious... what do you propose?
In short cut the Draft module folder from the Mod location and paste it into Ext/freecad location and start from there. Note that i don't necessarily propose that, but that would need to happen, if we want to say draft module has migrated to being a namespace module. The current work being done isn't all that related.
Nobody ever mentioned migrating Draft to be a namespace workbench. I don't understand why you even bring this up.
Code: Select all
import Draft
Draft.make_line(...)
As a concrete example, if another workbench wanted to use the Draft polar array objects and GUI, what would the code look like ?vocx wrote: ↑Fri Sep 04, 2020 6:00 amA new object is created through the make functions, which are imported into the "Draft" namespace, from which they can be used in scripts and other workbenches. This should be the public programming interface (API) .... and then they can be used in other workbenches.
Draft PolarArray
Code: Select all
import Draft
array = Draft.make_polar_array(my_object, 8, 270, App.Vector(-1600, 0, 0))
App.ActiveDocument.recompute()
Code: Select all
class MyWorkbench:
def Initialize(self):
import DraftTools
self.appendToolbar("Draft tools", "Draft_PolarArray")
I need to import the entire Draft workbench only to use 1 Draft object (importing directly draftobjects/polararray.py also imports the entire Draft WB). The code for polar arrays is spread over 5 files in 5 directories.