carlopav wrote: ↑Mon Jun 15, 2020 9:35 pm
triplus wrote: ↑Mon Jun 15, 2020 9:09 pm
I probably missed one or two steps

... Can you give a more detailed explanation of what do you propose and which would be the pros (or point to the conversation you are referring)?
Lets do the cons first. Currently one opens FreeCAD Wiki or downloads/clones FreeCAD source code and looks inside the Mod folder for clues and starts coding. "Oh no", you shouldn't' be doing that! Instead what you should do is to download/clone workbench starter kit and start from there. In addition people have started to nitpick in Pythonic department:
https://wiki.freecadweb.org/Draft_Line
Code: Select all
import FreeCAD as App
import Draft
_doc = App.newDocument()
p1 = App.Vector(0, 0, 0)
p2 = App.Vector(1000, 500, 0)
p3 = App.Vector(-250, -500, 0)
p4 = App.Vector(500, 1000, 0)
Line1 = Draft.makeLine(p1, p2)
Line2 = Draft.makeLine(p3, p4)
_doc.recompute()
"Oh no", i want something like:
Code: Select all
import freecad as app
from freecad.draft import line
_doc = app.new_document()
P1 = app.vector(0, 0, 0)
P2 = app.vector(1000, 500, 0)
P3 = app.vector(-250, -500, 0)
P4 = app.vector(500, 1000, 0)
line_1 = line.make_line(P1, P2)
line_2 = line.make_line(P3, P4)
_doc.recompute()
In addition Draft, or i guess draft, module, should be PIP installable.

Then i guess we could say we migrated draft to "namespace module". Or at least its API and leaving the rest in Mod. Pros being all the pros "namespace modules" advertise and cons mentioned above eliminated. As for newly introduced cons. Likely some inconsistency in naming area, between C++/Python and Python API and usually you need to reserve the list for some other items under misc.