- Document objects are mixed with other attributes in
App.ActiveDocument. I would suggest to usedocinstead ofApp.ActiveDocumentand e.g.objs.Boxinstead ofApp.ActiveDocument.Box.doc.Objectswould continue to be the list of children. App.Rotationtakes angle(s) in degrees as input butRotation.Angleis in radians.App.Quantity.getValueAsreturns a unit-less quantity instead of a floatgetGlobalPlacementdoes not return the global placement.App.GuiUpis not available at the start of FreeCAD.- FreeCAD has it's own
PySidebut not under a different name. - There are several way to import FreeCAD (
import FreeCAD as Appandimport freecad as App) but they are not equivalent. - The tolerance for
Placement.isSame()is 0.0 by default. It should be two reasonnably small numnbers by default, one for the translation and one for the rotation. App.getUserMacroDir()return the default path by default. It should default to the configured path.App.getUserMacroDir()vs.App.getTempPathand similar. EitherDirorPatheverywhere.App.ActiveDocument.Box.getPaths()is not implemented.App.ActiveDocument.Box.setEditorMode()is redundant withsetPropertyStatus.- Some basic functions are not implemented:
get_global_placement - Not that important but the API is not Pythonic.
- There are two ways to create plugins (
Init.pyvs__init__.py). Gui.addIconPath(str(ICON_PATH))does not work as it should because returning e.g.return my_object.svgingetIconworks only after workbench activation.
- The
__init__function of proxies is not called on document restore. - View provider proxies are complex (
__init__vsattach,vobj.Proxy = selfprovokes a call toattach). - There is no standard way to know when all properties are defined and
onChangedis called before as soon as a property is defined so that implementers have to check this by themselves. There should exist a way to turn off callbacks and reactivate them when all properties are defined (this would not be an API-breaking change). - There is no standard way to identify the type of a
App.FeaturePythonThe Draft workbench uses theTypeattribute in proxies but this is not a standard.