App GeoFeature/fr

Introduction


Un objet App GeoFeature, ou officiellement, est la classe de base de la plupart des objets qui afficheront des éléments géométriques dans la vue 3D car il inclut la propriété.



Utilisation
App GeoFeature est un objet interne, il ne peut donc pas être créé à partir de l'interface graphique. Il n'est généralement pas destiné à être utilisé directement, mais il peut plutôt être sous-classé pour obtenir un objet nu qui n'a qu'une propriété de base pour définir sa position dans la vue 3D.

Certains des objets dérivés les plus importants sont les suivants:
 * La classe Part Feature, le parent de la plupart des objets 2D et 3D formes topologiques.
 * La classe Mesh Feature, le parent des objets fabriqués à partir de maillages, pas de solides.
 * La classe App Part, qui définit Std Parts qui peut être utilisée comme conteneurs de corps pour effectuer des assemblages.

Lorsque vous créez cet objet dans Python, au lieu de sous-classer, vous devez sous-classer car ce dernier inclut une valeur par défaut fournisseur de vues et attributs  pour l'objet lui-même et son fournisseur de vues. Voir Script.

Propriétés
An App GeoFeature ( 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 GeoFeature has the property, which controls its position in the 3D 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 position of the object in the 3D view. The placement is defined by a point (vector), and a  (axis and angle). See Placement.
 * : the angle of rotation around the . By default, it is (zero degrees).
 * : the unit vector that defines the axis of rotation for the placement. Each component is a floating point value between and . If any value is above, the vector is normalized so that the magnitude of the vector is . By default, it is the positive Z axis,.
 * : a vector with the 3D coordinates of the base point. By default, it is the origin.
 * : 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

 * : if it is, the object will show the bounding box in the 3D view.
 * : it is empty by default.
 * : (default),, ,.
 * : if it is, the object can be picked with the pointer in the 3D view. Otherwise, the object cannot be selected until this option is set to.
 * : (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.
 * : a tuple of three floating point RGB values to define the color of the faces in the 3D view; by default it is, which is displayed as  on base 255, a light gray.
 * : if it is, the object appears in the tree view. Otherwise, it is set as invisible.
 * : an integer from to  that determines the level of transparency of the faces in the 3D view. A value of  indicates completely invisible faces; the faces are invisible but they can still be picked as long as  is.
 * : 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.
 * : an App Material associated with this object. By default it is empty.

Script
FreeCAD Scripting Basics, and scripted objects.

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

A GeoFeature is created with the method of the document. If you would like to create an object with a 2D or 3D topological shape, it may be better to create one of the sub-classes specialized for that, for example, Part Feature or Part Part2DObject.

This basic doesn't have a default view provider, so no icon will be displayed on the tree view, and no  properties will be available.

Therefore, for Python scripting, the recommendation is to create the object.

For example, the Arch BuildingPart element of the Arch Workbench is an object with a custom icon.