App FeaturePython/fr

Introduction


Un objet App FeaturePython, ou officiellement, est une simple instance de App DocumentObject dans Python. Il s'agit d'un objet simple qui, par défaut, n'a pas beaucoup de propriétés, par exemple, pas de Positionnement ni forme topologique. Cet objet est destiné à un usage général, et en lui donnant des propriétés. Il peut être utilisé pour gérer différents types de données.



How to use
The App FeaturePython is an internal object, so it cannot be created from the graphical interface. It is meant to be sub-classed by classes that will handle different types of data.

See Scripting for more information.

Properties
An App FeaturePython ( class) is derived from the basic App DocumentObject ( class), therefore it shares all the latter's properties.

In addition to the properties described in App DocumentObject, the FeaturePython has a basic view provider, so it does appear in the tree view.

See Property for all property types that scripted objects can have.

These are the properties available in the property editor. Hidden properties can be shown by using the command in the context menu of the property editor.

Data

 * : the user editable name of this object, it is an arbitrary UTF8 string.

Hidden properties Data

 * : a list of expressions. By default, it is empty.
 * : a longer, user editable description of this object, it is an arbitrary UTF8 string. By default, it is an empty string.
 * : a custom class associated with this object.
 * : whether to display the object or not.

View

 * : it is empty by default.
 * : (default),, ,.
 * : (default), . If the option is, the entire shape (vertices, edges, and faces) will be highlighted in the 3D view; if it is  only the bounding box will be highlighted.
 * : if it is, the object appears in the tree view. Otherwise, it is set as invisible.
 * : if it is, the object appears in the 3D view; otherwise it is invisible. By default this property can be toggled on and off by pressing the bar in the keyboard.

Hidden properties View

 * : a custom view provider class associated with this object. By default it is empty.

Scripting
FreeCAD Scripting Basics, and scripted objects.

See Part Feature for the general information on adding objects to the program.

An App FeaturePython is created with the method of the document.

For example, the Draft Text, Draft Dimension, and Working plane proxy elements of the Draft Workbench are objects with a custom icon. They hold data but not an actual Part TopoShape.