Property editor/pt-br

Introdução
O editor de propriedades aparece quando a guia  da visão combinada está ativa na interface; ele permite gerenciar as propriedades publicamente expostas dos objetos de documento.

Geralmente, o editor de propriedade é destinado a lidar com apenas um objeto de cada vez. Os valores mostrados no editor de propriedade pertencem ao objeto selecionado do documento ativo. Apesar disso, algumas propriedades como cores, podem ser definidas para vários objetos selecionados. Se não houver elementos selecionados, o editor de propriedades estará vazio.

Nem todas as propriedades podem ser modificadas sempre; dependendo do status específico da propriedade, algumas delas serão invisíveis (não listadas), ou somente leitura (não editáveis).



Tipos de propriedade
Uma propriedade é uma informação como um número ou uma cadeia de texto que é anexada a um documento FreeCAD ou a um objeto no documento.

Objetos personalizados objetos com scripts podem usar qualquer um dos tipos de propriedade definidos no sistema base. Veja a lista completa em Propriedade.

Alguns dos tipos de propriedade mais comumente utilizados são:

Objetos diferentes podem ter diferentes tipos de propriedade. No entanto, muitos objetos têm os mesmos tipos porque são derivados da mesma classe interna. Por exemplo, a maioria dos objetos que descrevem formas geométricas (linhas, círculos, retângulos, sólidos, peças importadas, etc.) tem a propriedade "Colocação" que define sua posição na Vista 3D.

Propriedades de visualização e dados
There are two classes of feature properties accessible through tabs in the property editor:
 * properties, related to the "visual" appearance of the object. The properties are tied to the  ( attribute) of the object, and are only accessible when the graphical user interface (GUI) is loaded. They are not accessible when using FreeCAD in console mode, or as a headless library.
 * properties, related to the "physical" parameters of the object. The properties define the essential characteristics of the object; they exist at all times, even when FreeCAD is used in console mode, or as a library. This means that if you load a document in console mode, you can edit the radius of a circle or the length of a line, even if you cannot see the result on the screen.

For this reason, properties are considered to be more "real", as they truly define the geometry of a shape. On the other hand, properties are less important because they only affect the superficial appearance of the geometry. For example, a circle of 10 mm radius is different from a circle of 5 mm radius; the color of the circle (view property) doesn't affect its shape, but the radius does (data property). In many instances in this documentation, the word "property" is understood to refer to a "Data property" and not to a "View property".

Propriedades básicas
The most basic scripted object won't show any property in the property editor, except for its  attribute. The is a user editable string that identifies the object in the tree view. On the other hand, the attribute of an object is assigned at the moment of its creation and cannot be changed; this attribute is read-only, and is not displayed in the property editor either.

Um objeto paramétrico básico é criado da seguinte forma



Most geometrical objects that can be created and displayed in the 3D view are derived from a. See Part Feature for the most basic properties that these objects have.

For 2D geometry, most objects are derived from (itself derived from ) which is the base of Sketches, and most Draft elements. See Part Part2DObject for the most basic properties that these objects have.

Ações
As ações na visão da propriedade foram implementadas em 0.19.

Right clicking in an empty space of the view, or with a property selected, shows only one command:
 * : if active, in addition to the standard properties that appear already, it shows all the hidden Data and View properties in their respective tabs.
 * Data: "Proxy", "Label2", "Expression Engine", and "Visibility".
 * View: "Proxy".

When the option is active, and one property is selected, more actions are available with a second right click:
 * : deactivates the command, hiding the additional Data and View properties.
 * : adds a dynamic property to the object; this works with both C++ defined objects, and Python scripted objects.
 * : brings up the formula editor, which allows using expressions in the property value.
 * : if active, sets the property as hidden, meaning that it will only be displayed in the property editor if is active.
 * : if active, sets the property as output.
 * : if active, sets the property as not recomputed when the document is recomputed; this is useful when a property should be kept unaffected by other updates.
 * : if active, sets the property to be read-only; it won't be editable in the property editor any more until this switch is turned off. The menu entry is no longer available.  It may be still possible to change the property via a dialog that updates the property.
 * : if active, sets the property as transient. The value of a transient property is not saved to file. When opening a file, it is instantiated with its default value.
 * : if active, it becomes touched, and ready for recompute.
 * : if active, it is evaluated when the document is restored.

Exemplo de propriedades de um objeto PartDesign
In this section we show some common properties that are visible for a PartDesign Body, and one PartDesign Feature. The specific properties of an object can found in the specific documentation page of that object.

Vista
A maioria dessas propriedades são herdadas do objeto básico Part Feature.




 * : it is another way to specify how finely to generate the mesh for rendering on screen or when exporting. The default value is 28.5 degrees, or 0.5 radians. The smaller the value the smoother the appearance will be in the 3D view, and the finer the mesh that will be exported.
 * : indicates if a box showing the overall extent of the object is displayed.
 * : sets the accuracy of the polygonal representation of the model in the 3D view (tessellation). Lower values indicate better quality. The value is in percent of object's size.
 * : display mode of the entire Body, (default),, ,.
 * : display mode of the Tip of the Body, (default),.
 * :, , , ; defines the style of the edges in the 3D view.
 * :, (default).
 * : the RGB color of the edges, it defaults to.
 * : the thickness of the edges, it defaults to pixels.
 * : the RGB color of the vertices, it defaults to.
 * : the size of the vertices, it defaults to pixels.
 * : whether the object is selectable or not.
 * : the RGB color of the shape, it defaults to.
 * : if it is, the object appears in the tree view. Otherwise, it is set as invisible.
 * : the degree of transparency from (default) to.
 * : whether the object is visible in the 3D view or not. Toggle with the bar in the keyboard.
 * : the degree of transparency from (default) to.
 * : whether the object is visible in the 3D view or not. Toggle with the bar in the keyboard.

Data
Neste caso, observamos as propriedades da função Revolução PartDesign.




 * : the user defined name given to the object, this can be changed as desired.


 * : whether to refine the fusion done with other objects.


 * : the point in space that specifies where the revolution takes place. It cannot be modified directly, only when editing the feature.


 * : the axis around which the revolution will be performed. It cannot be modified directly, only when editing the feature.


 * : the angle that specifies how much of the base element is rotated. By default it is, but it can be any fraction of that.


 * : if the base object is a Sketch, when this property is, it will perform the revolution with the sketch serving as a plane of symmetry. This is noticeable if the is different from.
 * : by default it is . Whether to perform the revolution in one direction or the other.

Scripting
FreeCAD Scripting Basics.

See scripted objects for the full information on adding properties to objects defined through Python.

Most properties that are visible in the property editor can be accessed from the Python console. These properties are just attributes of the class that defines the selected object. For example, if the property editor shows the property, this means that the object has the  attribute.

These attributes (properties) are added with the method of the base object. At least it is necessary to specify the type of property, and its name.

Properties follow the or  convention, meaning that each word starts with a capital letter, and there are no underscores. When the property editor displays such names, it leaves a space between each capital letter, making it easier to read.



In similar way the properties are added, not to the base object, but to its. Then, it follows that properties like, , , , , and others, can be examined and changed from the Python console.

Todas as propriedades públicas do objeto e seu provedor de visão estão contidas no atributo correspondente.