* On lines where the variable type is obvious from inspection, avoid repeating the type using auto.
* When possible use a ranged for loop instead of begin() and end() iterators
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml`
Context aware selection makes it possible to select the same Coin3D node
in different hierarchies (i.e. context) without ambiguity.
New/modified APIs in ViewProvider (the first two are the most crucial
APIs for context aware selection to work):
* getElementPicked(), supercedes getElement(). Given a Coin3D pick
point, this function returns a dot separated subname reference as a
path leads to the selected object.
* getDetailPath(), supercedes getDetail(). Given a subname reference,
this function returns an SoFullPath leads to the Coin3D node of the
selected object or sub-element (with SoDetail).
* (has)HiddenMarker(), check/return a special text marker for context
aware override of object visibility.
* partialRender(), render only part of the object based on given
subname references. It can render, e.g. some faces of a solid, or
some children of a container. It uses the 'secondary' extension of
SoSelectionElementAction to select which elements to render or hide.
The actually rendering functionality will be added in the following
patch.
* update()/onChanged(), modified to sync Visibility property from
DocumentObject.
* useNewSelectionModel(), modified to return the default true view
parameter. This is for test in the early stage of Link development,
probably not needed anymore.
* getBoundingBox(), a convenience function to obtain the bounding box
of a sub-object/element regardless of object's visibility. It uses
getDetailPath() and SoGetBoundingBoxAction to obtain bounding box
through Coin3D. It will be used in later sub-element box selection
functionality.
New/modified APIs in ViewProviderDocumentObject:
* getElementPicked()/getDetailPath() provides actual implementation to
support container like (sub)object selection without ambiguity. It
relies on DocumentObject::getSubObject() to walk the path.
* reattach(), called when undo deleteion
* forceUpdate()/isUpdateForced(), force update even if object is
invisible. These are used by Link to force update the visual of a
linked object regardless of its visibility.
* getLinkedViewProvider(), return the linked view provider with
hierarchy.
ViewProviderDocumentObjectPy:
* Object attribute is made writtable. Assigning it is equaivalant of
calling ViewProviderDocumentObject::attach() in Python.
Some of these new APIs are not strictly needed for Link to work, but
good to have.
Summary of the API changes:
* getModeSwitch/getTransformNode() exposes view provider mode switch
and transformation coin3D node, required by ViewProviderLink to
override placement and visibility.
* canAddToSceneGraph() inform 3D viewer whether to add the root node to
scenegraph. Some object only exists as a child of some coordinate
system. Not adding them can simplify scenegraph and visibility
management.
* showInTree() inform tree view whether to show the corresponding tree
item.
* getDefaultMode() to expose the current active mode regardless of the
view provider's visibility
* (can)DropObjectEx() superseds (can)DropObject() with additional
support of subname reference, which makes it easy to support linking
to sub-objects. One of the use case is cross coordinate system
linking.
* getDropPrefix() is used to tell tree view where the object is dropped
into. A non empty return means the object is actually dropped into a
sub-object. For example, Assembly3 container puts all dropped object
into its child container PartGroup.
* canDragAndDropObject() is used to inform tree view whether the object
dropped need to be dragged out of its original parent, which usually
does not make sure for Link type object.
* beforeDelete() will be called by Gui::Document when either the
object itself is being deleted or when the document is being
destoried.
* is/setLinkVisibility() allows to show/hide a link to this object.
This may be used during editing, to prevent showing editing geometry
in multiple places.
* update() is made a virtual function, it will be overridden by
ViewProviderDocumentObject in future patch.
* startEditing() now becomes virtual, and return a ViewProvider that
actually handles the editing. This is for future Link type object to
forward editing request
* covert(), convenience function to convert between Coin3D and FC matrix
ViewProviderExtension also gains many relavant extension point of the
new API. There is also the new extensionModeSwitchChange() for notifying
mode switch changes
ViewProviderPy exposes several method/attribute for the new API as well.
+ reimplment addDynamicProperty and removeDynamicProperty in TransactionalObject to raise exceptions
+ move addProperty, removeProperty and supportedProperties from ViewProviderPythonFeaturePy to ViewProviderPy
inherit Base.FreeCADError form RuntimeError
inherit Part.OCCError from Base.FreeCADError
inherit OCCDomainError from Part.OCCError
inherit OCCRangeError from Part.OCCError
inherit OCCConstructionError from OCCDomainError
inherit OCCDimensionError from OCCDomainError
Added PY_CATCH_OCC macro
replace PyExc_Exception
use FreeCADError in makeWireString
catch exception in BSplineCurve.increasedegree