App GeoFeature/it

Introduzione


Un oggetto App GeoFeature, o formalmente un, è la classe base della maggior parte degli oggetti che visualizzano elementi geometrici nella vista 3D.



Utilizzo
The App GeoFeature is an internal object, so it cannot be created from the graphical interface. It is generally not meant to be used directly, rather it can be sub-classed to get a bare-bones object that only has a basic property to define its position in the 3D view.

Some of the most important derived objects are the following:
 * The Part Feature class, the parent of most objects with 2D and 3D topological shapes.
 * The Mesh Feature class, the parent of most objects made from meshes, not solids.
 * The Fem FemMeshObject class, the parent of finite element meshes created with the FEM Workbench.
 * The Path Feature class, the parent of paths created with the Path Workbench for use in CNC machining.
 * The App Part class, which defines Std Parts that can be used as containers of bodies to perform assemblies.

When creating this object in Python, instead of sub-classing, you should sub-class because the latter includes a default view provider, and  attributes for the object itself, and its view provider. See Scripting.

Proprietà
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.

Dati

 * : 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. This only exists for the Python version. See Scripting.
 * : whether to display the object or not.

Vista

 * : 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. This only exists for the Python version. See Scripting.
 * : 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 handling shapes, 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 subclassing, you should create the object.

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