Property editor/ro: Difference between revisions

From FreeCAD Documentation
(Created page with "Există două tipuri de proprietăți ale funcțiilor accesibile prin tab-urile din partea de jos a editorului de proprietăți: : {{PropertyView | View}}: proprietăți legat...")
(Updating to match new version of source page)
 
(43 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav
|[[Document_structure|Document structure]]
|[[Workbenches|Workbenches]]
}}

{{TOCright}}

<span id="Introduction"></span>
<div class="mw-translate-fuzzy">
== Prezentare generală ==
== Prezentare generală ==
Editorul proprietății este unul dintre cele mai importante instrumente ale FreeCAD și un element principal în timpul colaborării cu FreeCAD.
Editorul proprietății este unul dintre cele mai importante instrumente ale FreeCAD și un element principal în timpul colaborării cu FreeCAD.
Editorul proprietății permite gestionarea proprietăților obiectelor din document.
Editorul proprietății permite gestionarea proprietăților obiectelor din document.
</div>


The [[Property_editor|property editor]] appears when the {{MenuCommand|Model}} tab of the [[Combo_view|combo view]] is active in the [[interface|interface]]; it allows managing the publicly exposed properties of the objects in the document.

<div class="mw-translate-fuzzy">
În general, editorul de proprietăți este destinat să se ocupe de un singur obiect la un moment dat. Valorile afișate în Editorul de proprietăți aparțin obiectului activ al documentului dvs. activ (aveți grijă ce document este activ, dacă lucrați la mai multe documente). Dacă nu ați selectat niciun element (sau nu există elemente), editorul proprietății va fi gol.
În general, editorul de proprietăți este destinat să se ocupe de un singur obiect la un moment dat. Valorile afișate în Editorul de proprietăți aparțin obiectului activ al documentului dvs. activ (aveți grijă ce document este activ, dacă lucrați la mai multe documente). Dacă nu ați selectat niciun element (sau nu există elemente), editorul proprietății va fi gol.
</div>


<div class="mw-translate-fuzzy">
Nu toate proprietățile pot fi modificate în orice moment. În funcție de starea specifică, unele proprietăți vor fi afișate ca fiind numai pentru citire.
Nu toate proprietățile pot fi modificate în orice moment. În funcție de starea specifică, unele proprietăți vor fi afișate ca fiind numai pentru citire.
</div>


{{TOCright}}
Proprietățile unui obiect sunt grupate în proprietăți Vizualizare și Proprietăți date și afișate în file diferite.


[[File:FreeCAD_Property_editor_empty.png]]
Obiectele diferite pot avea proprietăți diferite. Cu toate acestea, unele proprietăți sunt comune printre toate obiectele, de exemplu poziția și rotirea unui obiect sunt Proprietăți de date care pot fi manipulate.


{{Caption|Empty property editor, when no object is selected.}}

<span id="Property_types"></span>
<div class="mw-translate-fuzzy">
==Property definition==
==Property definition==
A '''property''' is a piece of information like a number or a text string that is attached to a FreeCAD document or an object in a document. Properties can be viewed and modified with the [[Property editor]].
A '''property''' is a piece of information like a number or a text string that is attached to a FreeCAD document or an object in a document. Properties can be viewed and modified with the [[Property editor]].
</div>


A property is a piece of information like a number or a text string that is attached to a FreeCAD document or an object in the document.
Proprietățile joacă un rol foarte important în FreeCAD, deoarece a fost proiectat să funcționeze cu obiecte parametrice, care sunt obiecte definite numai prin proprietățile lor.


<div class="mw-translate-fuzzy">
Obiecte personalizate [[scripted objects]] în FreeCAD pot avea proprietăți ale următoarelor tipuri:
Obiecte personalizate [[scripted objects]] în FreeCAD pot avea proprietăți ale următoarelor tipuri:
</div>

Some of the most commonly used property types are:


{{Code|code=
{{Code|code=
App::PropertyBool
Boolean
App::PropertyFloat
Float
App::PropertyAngle
FloatList
App::PropertyDistance
FloatConstraint
App::PropertyInteger
Angle
App::PropertyString
Distance
App::PropertyMatrix
Integer
App::PropertyVector
IntegerConstraint
App::PropertyPlacement
Percent
Enumeration
IntegerList
String
StringList
Link
LinkList
Matrix
Vector
VectorList
Placement
PlacementLink
Color
ColorList
Material
Path
File
FileIncluded
PartShape
FilletContour
Circle
}}
}}


<div class="mw-translate-fuzzy">
==Exemplu de proprietăți obiecte Piese == ===Properietăți===
Obiectele diferite pot avea proprietăți diferite. Cu toate acestea, unele proprietăți sunt comune printre toate obiectele, de exemplu poziția și rotirea unui obiect sunt Proprietăți de date care pot fi manipulate.
</div>


== View and Data properties ==


<div class="mw-translate-fuzzy">
Există două tipuri de proprietăți ale funcțiilor accesibile prin tab-urile din partea de jos a editorului de proprietăți: : {{PropertyView | View}}: proprietăți legate de afișarea "vizuală" a unui obiect. : {{PropertyData | Data}}: proprietăți legate de parametrii "fizici" ai unui obiect.
Există două tipuri de proprietăți ale funcțiilor accesibile prin tab-urile din partea de jos a editorului de proprietăți: : {{PropertyView | View}}: proprietăți legate de afișarea "vizuală" a unui obiect. : {{PropertyData | Data}}: proprietăți legate de parametrii "fizici" ai unui obiect.
</div>


For this reason, {{MenuCommand|Data}} properties are considered to be more "real", as they truly define the geometry of a shape. On the other hand, {{MenuCommand|View}} 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".
===View===


=== Basic properties ===


{{Emphasis|See also: [[Object_name|Object name]]}}
[[Image:PartDesign_Revolution_en_03.png|300px|left]]

The most basic [[Scripted_objects|scripted object]] won't show any {{MenuCommand|Data}} property in the property editor, except for its {{incode|Label}} attribute. The {{incode|Label}} is a user editable string that identifies the object in the [[Tree_view|tree view]]. On the other hand, the {{incode|Name}} 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.

A basic parametric object is created as follow

{{Code|code=
obj = App.ActiveDocument.addObject("App::FeaturePython", "App__FeaturePython")
obj.Label = "Plain_object"
print(obj.Name)
print(obj.Label)
}}

[[File:FreeCAD_Property_editor_View_basic.png|x264px]] [[File:FreeCAD_Property_editor_Data_basic.png|x264px]]

{{Caption|View and Data tabs of the property editor, for a basic "App::FeaturePython" scripted object.}}

Most geometrical objects that can be created and displayed in the [[3D_view|3D view]] are derived from a {{incode|Part::Feature}}. See [[Part_Feature|Part Feature]] for the most basic properties that these objects have.

For 2D geometry, most objects are derived from {{incode|Part::Part2DObject}} (itself derived from {{incode|Part::Feature}}) which is the base of [[Sketch|Sketches]], and most [[Draft_Workbench|Draft elements]]. See [[Part_Part2DObject|Part Part2DObject]] for the most basic properties that these objects have.

==Actions ==

Right clicking in an empty space of the view, or with a property selected, shows only one command:
* {{MenuCommand|Show all}}: 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 {{MenuCommand|Show all}} option is active, and one property is selected, more actions are available with a second right click:
* {{MenuCommand|Show all}}: deactivates the {{MenuCommand|Show all}} command, hiding the additional Data and View properties.
* {{MenuCommand|Add Property}}: adds a dynamic property to the object; this works with both C++ defined objects, and Python [[Scripted_objects|scripted objects]].
* {{MenuCommand|Expression...}}: brings up the formula editor, which allows using [[Expressions|expressions]] in the property value.
* {{MenuCommand|Hidden}}: if active, sets the property as hidden, meaning that it will only be displayed in the property editor if {{MenuCommand|Show all}} is active.
* {{MenuCommand|Output}}: if active, sets the property as output.
* {{MenuCommand|NoRecompute}}: 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.
* {{MenuCommand|ReadOnly}}: 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 {{MenuCommand|Expression...}} menu entry is no longer available. {{Emphasis|Note:}} It may be still possible to change the property via a dialog that updates the property.
* {{MenuCommand|Transient}}: 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.
* {{MenuCommand|Touched}}: if active, it becomes touched, and ready for recompute.
* {{MenuCommand|EvalOnRestore}}: if active, it is evaluated when the document is restored.

<span id="Example_of_the_properties_of_a_PartDesign_object"></span>
<div class="mw-translate-fuzzy">
==Exemplu de proprietăți obiecte Piese ==
===Proprietăți===
</div>

In this section we show some common properties that are visible for a [[PartDesign_Body|PartDesign Body]], and one [[PartDesign_Feature|PartDesign Feature]]. The specific properties of an object can found in the specific documentation page of that object.

<span id="View"></span>
===Vizualizare ===

Most of these properties are inherited from the [[Part_Feature|Part Feature]] basic object.

<div class="mw-translate-fuzzy">
[[File:FreeCAD_Properties_View.png|490px|left]]
{{TitleProperty|Base}}
{{TitleProperty|Base}}
</div>


{{TitleProperty|Base}}
* {{PropertyView|Bounding Box}} : Indicates if a box showing the overall extent of the object is to be displayed. Value False, or True (Default, False).
* {{PropertyView|Control Point}} : Indicates if the feature control points are to be displayed. Value False, or True (Default, False).
* {{PropertyView|Deviation}} : Sets the accuracy of the polygonal representation of the model in the 3d view (tessellation). Lower values = better quality. The value is in percent of object's size (deviation in mm = (w+h+d)/3*valueInPercent/100, where w,h,d are the bounding box dimensions).
* {{PropertyView|Display Mode}} :Display mode of the feature, '''Flat lines, Shaded, Wireframe, Points''' [[IMAGE:Vue_DisplayModePartDesign_fr_00.png|96px]]. (Default, '''Flat lines''').
* {{PropertyView|Lighting}} : Lighting '''One side, Two side''' [[IMAGE:Vue_Lighting_fr_00.png|96px]]. (Default, '''Two side''').
* {{PropertyView|Line Color}} : Gives the color of the line (edges) (Default, '''25, 25, 25''').
* {{PropertyView|Line Width}} : Gives the thickness of the line (edges) (Default, '''2''').
* {{PropertyView|Point Color}} : Gives the color of the points (ends of the feature) (Default, '''25, 25, 25''').
* {{PropertyView|Point Size}} : Gives the size of the points (Default, '''2''').
* {{PropertyView|Selectable}} : Allows selection of the feature. Value False, ou True (Default, True).
* {{PropertyView|Shape Color}} : Give the color shape (default, '''204, 204, 204''').
* {{PropertyView|Transparency}} : Sets the degree of transparency in the feature of '''0''' to '''100''' (Default, '''0''').
* {{PropertyView|Visibility}} : Determines the visibility of the feature (like the bar {{KEY|SPACE}}). Value False, or True (Default, True).
{{clear}}


<div class="mw-translate-fuzzy">
* {{PropertyView/ro|Bounding Box}}: Indică dacă trebuie afișată o casetă care să arate întinderea globală a obiectului. Valoare False sau True (Implicit, Fals).
* {{PropertyView/ro|Point Control}}: Indică dacă punctele de control ale elementelor trebuie afișate. Valoare False sau True (Implicit, Fals).
* {{PropertyView/ro|Deviation}}: Setează precizia reprezentării poligoanelor modelului în vederea 3D (mozaicare/tessellation). Valori mai mici = o calitate mai bună. Valoarea este în procente din mărimea obiectului (deviația în mm = (w + h + d) /3
* valueInPercent / 100, unde w, h, d sunt dimensiunile casetei delimitate).
* {{PropertyView/ro|Display Mode}}: Modul de afișare al caracteristicii, '''Flat lines, Shaded, Wireframe, Points''' [[IMAGE: Vue_DisplayModePartDesign_fr_00.png|96px]]. (Implicit, '''Linii plate''').
* {{PropertyView/ro|Lighting}}: Iluminare '''O parte, Două laturi''' [[IMAGE:Vue_Lighting_fr_00.png|96px]]. (Default, '''Two side''').
* {{PropertyView/ro|Line Color}}: Oferă culoarea liniei (margini) (Implicit, '''25, 25, 25''').
* {{PropertyView/ro|Line Width}}: Dă grosimea liniei (marginii) (Implicit, '''2''').
* {{PropertyView/ro|Point Color}}: Oferă culoarea punctelor (capetele caracteristicii) (Implicit, '''25, 25, 25''').
* {{PropertyView/ro|Point Size}}: Oferă dimensiunea punctelor (Implicit, '''2''').
* {{PropertyView/ro|Selectable}}: Permite selectarea caracteristicii. Valoare False, True (implicită, True).
* {{PropertyView/ro|Shape Color}}: Dați culoarea formei (implicit, '' '204, 204, 204' '').
* {{PropertyView/ro|Transparency}}: Setează gradul de transparență în caracteristica de la '''0''' la ''' 100 '''(Implicit,''' 0 ''').
* {{PropertyView/ro|Visibility}}: Determină vizibilitatea funcționalității (de exemplu, bara {{KEY|SPACE}}). Valoare False sau True (Implicit, True). {{clear}}
</div>

{{clear}}


===Data===
===Data===


In this case we observe the properties of the [[PartDesign_Revolution|PartDesign Revolution]] feature.


<div class="mw-translate-fuzzy">
[[Image:PartDesign_Revolution_en_04.png|300px|left]]
[[File:FreeCAD_Properties_Data.png|490px|left]]
{{TitleProperty|Base}}
{{TitleProperty|Base}}
</div>


{{TitleProperty|Base}}


<div class="mw-translate-fuzzy">
{{PropertyData|Placement}} :
{{PropertyData/ro|Label}} :
Summary of the data below.
Eticheta este numele dat obiectului (funcționalității), acest nume poate fi schimbat ulterior.
Every feature has a placement that can be controlled through the Data Properties table. It controls the placement of the part with respect to the coordinate system. NOTE: The placement properties do not affect the physical dimensions of the feature, but merely its position in space!<br>If you select the title '''Placement''' [[Image:Tache_Placement_01_fr_00.png|256px|Options Placement]], a button with {{KEY|three small points}} appears to the right. Clicking this button {{KEY| '''...'''}}, opens the '''[[Tasks_Placement|Tasks_Placement]]''' options window.
</div>


{{TitleProperty|Part Design}}
* {{PropertyData|Refine}}: whether to refine the fusion done with other objects.


<div class="mw-translate-fuzzy">
{{PropertyData|Angle}} :
{{PropertyData/ro|Placement}} :
Specifies the angle to be used with the [[#Axis|axis]] property (below). An angle is set here, and the axis that the angle acts upon is set with the axis property.
Rezumatul datelor de mai jos.
The feature is rotated by the specified angle, about the specified axis.
Fiecare caracteristică are o destinație de plasare care poate fi controlată prin tabelul Proprietăți date. Controlează amplasarea piesei în raport cu sistemul de coordonate. NOTĂ: Proprietățile de plasare nu afectează dimensiunile fizice ale elementului, ci doar poziția sa în spațiu!<br>If you select the title '''Placement''' [[Image:Tache_Placement_01_fr_00.png|256px|Options Placement]], a button with {{KEY|three small points}} appears to the right. Clicking this button {{KEY| '''...'''}}, opens the '''[[Tasks_Placement|Tasks_Placement]]''' options window.
A usage example might be if you created a revolution feature as required, but then needed to rotate the whole feature by some amount, in order to allow it to line-up with another pre-existing feature.
</div>


<div class="mw-translate-fuzzy">
{{PropertyData/ro|Axis}} :
Această proprietate specifică axa/axele după care se rotește funcționalitatea/obiectul. Valoarea exactă a rotației provine de la funcția unghiului (deasupra).
Această proprietate are trei argumente, care sunt trecute ca numere în casetele x, y și z din instrument. Stabilirea unei valori pentru mai multe axe va determina rotirea piesei în fiecare axă, prin valoarea unghiului înmulțită cu valoarea pentru axă.
De exemplu, cu un unghi de 15 °, setarea unei valori de 1,0 pentru x și 2,0 pentru y va determina rotirea piesei finite cu 15 ° în axa x și 30 ° în axa y.
</div>


<div class="mw-translate-fuzzy">
{{PropertyData|Axis}} :
{{PropertyData/ro|Angle}} :
This property specifies the axis/axes about which the feature is to be rotated. The exact value of rotation comes from the angle property (above).
Specifică unghiul care va utilizat cu funcția [[#Axis|axis]] (de mai jos). Un unghi este setat aici, iar axa pe care unghiul acționează este stabilită cu proprietatea axei.
This property takes three arguments, which are passed as numbers in the x, y, and z boxes in the tool. Setting a value for more than one of the axes will cause the part to be rotated in each axis, by the angle value multiplied by the value for the axis.
Funcționalitatea este rotită cu unghiul specificat, în jurul axei specificate.
For example, with an angle of 15° set, specifying a value of 1.0 for x, and 2.0 for y will cause the finished part to be rotated 15° in the x-axis AND 30° in the y-axis.
Un exemplu de utilizare ar putea fi dacă ați creat o caracteristică de revoluție după cum este necesar, dar a trebuit apoi să rotiți întreaga caracteristică cu o anumită sumă, pentru a permite o aliniere cu o altă caracteristică pre-existentă.
</div>


{{TitleProperty|Sketch Based}}


<div class="mw-translate-fuzzy">
{{PropertyData|Position}} :
{{PropertyData/ro|Position}} :
This property specifies the base point to which all dimensions refer. This takes three arguments, which are passed as numbers to the x, y, and z boxes in the tool. Setting a value for more than one of the boxes will cause the part to be translated by the number of units along the corresponding axis.
Această proprietate specifică punctul de bază la care se referă toate dimensiunile. Acest lucru necesită trei argumente, care sunt transmise ca numere în casetele x, y și z din instrument. Stabilirea unei valori pentru mai mult de una dintre casete va face ca piesa să fie translatată cu un număr de unități de-a lungul axei corespunzătoare.
</div>


{{clear}}


== Scripting ==
{{PropertyData|Label}} :
The Label is the name given to the object (feature), this name can be changed as desired.


{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


See [[scripted objects|scripted objects]] for the full information on adding properties to objects defined through [[Python|Python]].
{{clear}}

'''PS: The displayed properties can vary, depending on the tool used.'''
Most properties that are visible in the property editor can be accessed from the [[Python_console|Python console]]. These properties are just attributes of the class that defines the selected object. For example, if the property editor shows the {{PropertyData|Group}} property, this means that the object has the {{incode|Group}} attribute.

{{Code|code=
print(obj.Group)
}}

These attributes (properties) are added with the {{incode|addProperty}} method of the base object. At least it is necessary to specify the type of [[property|property]], and its name.

{{Code|code=
obj.addProperty("App::PropertyFloat", "Custom")
print(obj.Custom)
}}

Properties follow the {{incode|CapitalCamelCase}} or {{incode|PascalCase}} 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.

{{Code|code=
obj.addProperty("App::PropertyDistance", "CustomCamelProperty")
obj.CustomCamelProperty = 1000
print(obj.CustomCamelProperty)
}}

[[File:FreeCAD_Property_editor_Custom.png]]
{{Caption|Property editor showing the Data properties of a [[PartDesign_Body|PartDesign Body]], with two additional properties, "Custom" and "Custom Camel Property".}}

In similar way the {{MenuCommand|View}} properties are added, not to the base object, but to its {{incode|ViewObject}}. Then, it follows that properties like {{PropertyView|Angular Deflection}}, {{PropertyView|Bounding Box}}, {{PropertyView|Display Mode}}, {{PropertyView|Display Mode Body}}, {{PropertyView|Line Color}}, and others, can be examined and changed from the [[Python_console|Python console]].

{{Code|code=
print(obj.ViewObject.AngularDeflection)
print(obj.ViewObject.BoundingBox)
print(obj.ViewObject.DisplayMode)
print(obj.ViewObject.DisplayModeBody)
print(obj.ViewObject.LineColor)
}}

All public properties of the object, and of its view provider, are contained in the corresponding {{incode|PropertiesList}} attribute.

{{Code|code=
print(obj.PropertiesList)
print(obj.ViewObject.PropertiesList)
}}


{{docnav/ro|Interface Customization/ro|Workbenches/ro}}


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
{{docnav/ro
[[Category:User Documentation/ro]]
|[[Interface Customization/ro|Interface Customization]]
|[[Workbenches/ro|Workbenches]]
}}
</div>
</div>

{{Interface navi{{#translation:}}}}
{{Std Base navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 15:37, 20 May 2023

Prezentare generală

Editorul proprietății este unul dintre cele mai importante instrumente ale FreeCAD și un element principal în timpul colaborării cu FreeCAD. Editorul proprietății permite gestionarea proprietăților obiectelor din document.

The property editor appears when the Model tab of the combo view is active in the interface; it allows managing the publicly exposed properties of the objects in the document.

În general, editorul de proprietăți este destinat să se ocupe de un singur obiect la un moment dat. Valorile afișate în Editorul de proprietăți aparțin obiectului activ al documentului dvs. activ (aveți grijă ce document este activ, dacă lucrați la mai multe documente). Dacă nu ați selectat niciun element (sau nu există elemente), editorul proprietății va fi gol.

Nu toate proprietățile pot fi modificate în orice moment. În funcție de starea specifică, unele proprietăți vor fi afișate ca fiind numai pentru citire.

Empty property editor, when no object is selected.

Property definition

A property is a piece of information like a number or a text string that is attached to a FreeCAD document or an object in a document. Properties can be viewed and modified with the Property editor.

A property is a piece of information like a number or a text string that is attached to a FreeCAD document or an object in the document.

Obiecte personalizate scripted objects în FreeCAD pot avea proprietăți ale următoarelor tipuri:

Some of the most commonly used property types are:

App::PropertyBool
App::PropertyFloat
App::PropertyAngle
App::PropertyDistance
App::PropertyInteger
App::PropertyString
App::PropertyMatrix
App::PropertyVector
App::PropertyPlacement

Obiectele diferite pot avea proprietăți diferite. Cu toate acestea, unele proprietăți sunt comune printre toate obiectele, de exemplu poziția și rotirea unui obiect sunt Proprietăți de date care pot fi manipulate.

View and Data properties

Există două tipuri de proprietăți ale funcțiilor accesibile prin tab-urile din partea de jos a editorului de proprietăți: : Vizualizare View: proprietăți legate de afișarea "vizuală" a unui obiect. : Date Data: proprietăți legate de parametrii "fizici" ai unui obiect.

For this reason, Data properties are considered to be more "real", as they truly define the geometry of a shape. On the other hand, View 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".

Basic properties

See also: Object name

The most basic scripted object won't show any Data property in the property editor, except for its Label attribute. The Label is a user editable string that identifies the object in the tree view. On the other hand, the Name 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.

A basic parametric object is created as follow

obj = App.ActiveDocument.addObject("App::FeaturePython", "App__FeaturePython")
obj.Label = "Plain_object"
print(obj.Name)
print(obj.Label)

View and Data tabs of the property editor, for a basic "App::FeaturePython" scripted object.

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

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

Actions

Right clicking in an empty space of the view, or with a property selected, shows only one command:

  • Show all: 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 Show all option is active, and one property is selected, more actions are available with a second right click:

  • Show all: deactivates the Show all command, hiding the additional Data and View properties.
  • Add Property: adds a dynamic property to the object; this works with both C++ defined objects, and Python scripted objects.
  • Expression...: brings up the formula editor, which allows using expressions in the property value.
  • Hidden: if active, sets the property as hidden, meaning that it will only be displayed in the property editor if Show all is active.
  • Output: if active, sets the property as output.
  • NoRecompute: 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.
  • ReadOnly: 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 Expression... menu entry is no longer available. Note: It may be still possible to change the property via a dialog that updates the property.
  • Transient: 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.
  • Touched: if active, it becomes touched, and ready for recompute.
  • EvalOnRestore: if active, it is evaluated when the document is restored.

Exemplu de proprietăți obiecte Piese

Proprietăți

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.

Vizualizare

Most of these properties are inherited from the Part Feature basic object.

Base

Base

  • VEDEREBounding Box: Indică dacă trebuie afișată o casetă care să arate întinderea globală a obiectului. Valoare False sau True (Implicit, Fals).
  • VEDEREPoint Control: Indică dacă punctele de control ale elementelor trebuie afișate. Valoare False sau True (Implicit, Fals).
  • VEDEREDeviation: Setează precizia reprezentării poligoanelor modelului în vederea 3D (mozaicare/tessellation). Valori mai mici = o calitate mai bună. Valoarea este în procente din mărimea obiectului (deviația în mm = (w + h + d) /3
  • valueInPercent / 100, unde w, h, d sunt dimensiunile casetei delimitate).
  • VEDEREDisplay Mode: Modul de afișare al caracteristicii, Flat lines, Shaded, Wireframe, Points . (Implicit, Linii plate).
  • VEDERELighting: Iluminare O parte, Două laturi . (Default, Two side).
  • VEDERELine Color: Oferă culoarea liniei (margini) (Implicit, 25, 25, 25).
* VEDERELine Width: Dă grosimea liniei (marginii) (Implicit, 2).
* VEDEREPoint Color: Oferă culoarea punctelor (capetele caracteristicii) (Implicit, 25, 25, 25). 
  • VEDEREPoint Size: Oferă dimensiunea punctelor (Implicit, 2).
* VEDERESelectable: Permite selectarea caracteristicii. Valoare False, True (implicită, True). 
  • VEDEREShape Color: Dați culoarea formei (implicit, '204, 204, 204' ).
  • VEDERETransparency: Setează gradul de transparență în caracteristica de la 0 la 100 (Implicit, 0 ).
* VEDEREVisibility: Determină vizibilitatea funcționalității (de exemplu, bara SPACE). Valoare False sau True (Implicit, True).

Data

In this case we observe the properties of the PartDesign Revolution feature.

Base

Base

DATELabel : Eticheta este numele dat obiectului (funcționalității), acest nume poate fi schimbat ulterior.

Part Design

  • DateRefine: whether to refine the fusion done with other objects.

DATEPlacement : Rezumatul datelor de mai jos. Fiecare caracteristică are o destinație de plasare care poate fi controlată prin tabelul Proprietăți date. Controlează amplasarea piesei în raport cu sistemul de coordonate. NOTĂ: Proprietățile de plasare nu afectează dimensiunile fizice ale elementului, ci doar poziția sa în spațiu!
If you select the title Placement Options Placement, a button with three small points appears to the right. Clicking this button ..., opens the Tasks_Placement options window.

DATEAxis : Această proprietate specifică axa/axele după care se rotește funcționalitatea/obiectul. Valoarea exactă a rotației provine de la funcția unghiului (deasupra). Această proprietate are trei argumente, care sunt trecute ca numere în casetele x, y și z din instrument. Stabilirea unei valori pentru mai multe axe va determina rotirea piesei în fiecare axă, prin valoarea unghiului înmulțită cu valoarea pentru axă. De exemplu, cu un unghi de 15 °, setarea unei valori de 1,0 pentru x și 2,0 pentru y va determina rotirea piesei finite cu 15 ° în axa x și 30 ° în axa y.

DATEAngle : Specifică unghiul care va utilizat cu funcția axis (de mai jos). Un unghi este setat aici, iar axa pe care unghiul acționează este stabilită cu proprietatea axei. Funcționalitatea este rotită cu unghiul specificat, în jurul axei specificate. Un exemplu de utilizare ar putea fi dacă ați creat o caracteristică de revoluție după cum este necesar, dar a trebuit apoi să rotiți întreaga caracteristică cu o anumită sumă, pentru a permite o aliniere cu o altă caracteristică pre-existentă.

Sketch Based

DATEPosition : Această proprietate specifică punctul de bază la care se referă toate dimensiunile. Acest lucru necesită trei argumente, care sunt transmise ca numere în casetele x, y și z din instrument. Stabilirea unei valori pentru mai mult de una dintre casete va face ca piesa să fie translatată cu un număr de unități de-a lungul axei corespunzătoare.

Scripting

See also: 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 DateGroup property, this means that the object has the Group attribute.

print(obj.Group)

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

obj.addProperty("App::PropertyFloat", "Custom")
print(obj.Custom)

Properties follow the CapitalCamelCase or PascalCase 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.

obj.addProperty("App::PropertyDistance", "CustomCamelProperty")
obj.CustomCamelProperty = 1000
print(obj.CustomCamelProperty)

Property editor showing the Data properties of a PartDesign Body, with two additional properties, "Custom" and "Custom Camel Property".

In similar way the View properties are added, not to the base object, but to its ViewObject. Then, it follows that properties like VizualizareAngular Deflection, VizualizareBounding Box, VizualizareDisplay Mode, VizualizareDisplay Mode Body, VizualizareLine Color, and others, can be examined and changed from the Python console.

print(obj.ViewObject.AngularDeflection)
print(obj.ViewObject.BoundingBox)
print(obj.ViewObject.DisplayMode)
print(obj.ViewObject.DisplayModeBody)
print(obj.ViewObject.LineColor)

All public properties of the object, and of its view provider, are contained in the corresponding PropertiesList attribute.

print(obj.PropertiesList)
print(obj.ViewObject.PropertiesList)