App DocumentObject/it

Introduzione


Un oggetto App DocumentObject, o formalmente un, è la classe di base di tutte le classi di oggetti gestite nel documento.

In termini generali, un "DocumentObject" è qualsiasi "cosa" che può apparire nella vista ad albero e che viene salvata e ripristinata all'apertura di un documento.





Utilizzo
App DocumentObject è una classe interna, quindi non può essere creata dall'interfaccia grafica, né deve essere utilizzata da sola. Definisce semplicemente il comportamento e le proprietà di base degli oggetti nel software.

Some of the most important DocumentObjects are the following:
 * The App FeaturePython class, an empty object that can be used for different purposes, depending on the added properties.
 * The App GeoFeature class, the base object of all geometrical objects, that is, of objects that have a Placement property that defines their position in the 3D view.
 * The Part Feature class, derived from App GeoFeature, and the parent class of objects with 2D and 3D topological shapes.
 * The Mesh Feature class, derived from App GeoFeature, and the parent class of objects with 2D and 3D meshes.

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

These are the basic properties that essentially all objects have. These properties can be accessed from the Python console.


 * : a list of expressions.
 * : the user editable name of this object, it is an arbitrary UTF8 string. By default, it is the same as the.
 * : a longer, user editable description of this object, it is an arbitrary UTF8 string that may include newlines. By default, it is an empty string.
 * : whether to display the object or not.

For derived objects, only will be listed in the property editor by default. The other properties will be hidden.

Script
FreeCAD Scripting Basics, and scripted objects.

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

A DocumentObject is created with the method of the document. However, in general, there is no need to create this object manually. It is usually better to sub-class one of the more complex sub-classes, for example, App FeaturePython, App GeoFeature, Part Feature, Part Part2DObject, etc.