triplus wrote: ↑Thu Sep 05, 2019 5:47 pm
Wherever it works by default, somebody has likely already created the alias.
As I said the "FreeCADCmd" executable already includes it, nobody has added it. It is added in the sources at least.
Code: Select all
vocx@VOCX-TP:/opt/freecad-build$ bin/FreeCADCmd
FreeCAD 0.19, Libs: 0.19R18037 (Git)
(c) Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
##### #### ### ####
# # # # # #
# ## #### #### # # # # #
#### # # # # # # # ##### # #
# # #### #### # # # # #
# # # # # # # # # ## ## ##
# # #### #### ### # # #### ## ## ##
[FreeCAD Console mode <Use Ctrl-D (i.e. EOF) to exit.>]
>>> App.Vector()
Vector (0.0, 0.0, 0.0)
>>>
P.S. But this i guess has little to do with branding.
...
The issue is with writing documentation. In the documentation, you can specifically refer to certain functions like "FreeCAD.Vector" or "App.Vector" and they will work the same.
The FreeCAD interface itself uses these aliases
Code: Select all
>>> Gui.runCommand('Std_ViewStatusBar',1)
>>> Gui.runCommand('Std_ViewStatusBar',0)
>>> Gui.runCommand('Std_Workbench',19)
>>> ### Begin command Std_New
>>> App.newDocument("Unnamed")
>>> App.setActiveDocument("Unnamed")
>>> App.ActiveDocument=App.getDocument("Unnamed")
>>> Gui.ActiveDocument=Gui.getDocument("Unnamed")
>>> Gui.activeDocument().activeView().viewDefaultOrientation()
>>> ### End command Std_New
>>> Gui.runCommand('Std_OrthographicCamera',1)
Somebody who is learning FreeCAD won't know about this, they will see the code reported by FreeCAD, and will just copy it to write their own scripts. So instead of using the
FreeCAD namespace sometimes, and
App other times, we should be consistent. The wiki has quite old programming documentation, maybe written by Jürgen himself, and a lot of that tends to use
App, but without much explanation that it is interchangeable with
FreeCAD. This is why I think it's a matter of branding. Basically, he wrote the documentation thinking that this could be used in any FreeCAD-based program, not necessarily the plain FreeCAD.