Property editor/tr: Difference between revisions

From FreeCAD Documentation
(Created page with "490px|left {{TitleProperty|Base}}")
(Updating to match new version of source page)
Line 2: Line 2:
{{docnav|Interface Customization|Workbenches}}
{{docnav|Interface Customization|Workbenches}}


<div class="mw-translate-fuzzy">
==Genel Bakış==
==Genel Bakış==
Özellik Penceresi, FreeCAD'in en önemli araçlarından ve ana unsurlarından biridir. Özellik Penceresi, belgenizdeki nesnelerin özelliklerini yönetmenize olanak sağlar.
Özellik Penceresi, FreeCAD'in en önemli araçlarından ve ana unsurlarından biridir. Özellik Penceresi, belgenizdeki nesnelerin özelliklerini yönetmenize olanak sağlar.
</div>


The [[Property editor|property editor]] allows managing the publicly exposed properties of the objects in your document.

<div class="mw-translate-fuzzy">
Genel olarak Özellik Penceresi bir kerede yalnızca bir nesneyle ilgilenmesi amaçlanmıştır. Özellik Penceresinde gösterilen değerler, aktif belgenizin aktif nesnesine aittir (birden fazla belge üzerinde çalışıyorsanız hangi belgenin gerçekten etkin olduğuna dikkat edin). Herhangi bir öğe seçmediyseniz (veya hiç öğe yoksa), Özellik Penceresi boş olacaktır.
Genel olarak Özellik Penceresi bir kerede yalnızca bir nesneyle ilgilenmesi amaçlanmıştır. Özellik Penceresinde gösterilen değerler, aktif belgenizin aktif nesnesine aittir (birden fazla belge üzerinde çalışıyorsanız hangi belgenin gerçekten etkin olduğuna dikkat edin). Herhangi bir öğe seçmediyseniz (veya hiç öğe yoksa), Özellik Penceresi boş olacaktır.
</div>


<div class="mw-translate-fuzzy">
Bazı özellikler değiştirilemez. Özel duruma bağlı olarak, bazı özellikler salt okunur olarak gösterilecektir.
Bazı özellikler değiştirilemez. Özel duruma bağlı olarak, bazı özellikler salt okunur olarak gösterilecektir.
</div>


[[File:FreeCAD_Properties_empty.png]]
Bir nesnenin özellikleri, Görünüm özellikleri ve Veri özellikleri şeklinde gruplandırılmış ve farklı sekmeler altında gösterilmiştir.


{{Caption|Empty property editor, when no object is selected.}}
Farklı nesneler farklı özelliklere sahip olabilir. Bununla birlikte, bazı özellikler tüm nesneler arasında ortaktır, örneğin bir nesnenin konumu ve döndürülmesi manipüle edilebilen Veri özellikleridir.


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 21: Line 29:
</div>
</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.
Properties play a very important part in FreeCAD, since it has been designed to work with parametric objects, which are objects defined only by their properties.


Custom [[scripted objects]] in FreeCAD can have properties of the following types:
Custom [[scripted objects|scripted objects]] can use any of the property types defined in the base system. See the full list in [[Property|Property]].


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">
==Example of Part object properties==
Farklı nesneler farklı özelliklere sahip olabilir. Bununla birlikte, bazı özellikler tüm nesneler arasında ortaktır, örneğin bir nesnenin konumu ve döndürülmesi manipüle edilebilen Veri özellikleridir.
===Properties===
</div>


== View and Data properties ==


There are two types of feature properties accessible through tabs at the bottom of the property editor:
There are two classes of feature properties accessible through tabs in the property editor:
* {{Emphasis|View}} properties, related to the "visual" appearance of the object. The {{Emphasis|View}} properties are tied to the {{Emphasis|ViewProvider}} ({{incode|ViewObject}} 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.
: {{PropertyView|View}} : properties related to the "visual" display of an object.
* {{Emphasis|Data}} properties, related to the "physical" parameters of the object. The {{Emphasis|Data}} 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.
: {{PropertyData|Data}} : properties related to the "physical" parameters of an object.


For this reason, {{Emphasis|Data}} properties are considered to be more "important", as they truly define the geometry of a shape. On the other hand {{Emphasis|View}} properties are less important because they only affect the appearance of the geometry. For example, a circle of 10 mm radius is different from a circle of 5 mm radius; the color (View property) of the circles doesn't affect their shapes, but the radius does (Data property). In many instances in this documentation, the word "property" is understood to refer to a "Data property".
===View===


=== Basic properties ===


The most basic scripted object won't show any 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}} of an object is an internal attribute that is assigned to the object at the moment of its creation; this attribute is read-only, so it cannot be changed, and it 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")
}}

[[File:FreeCAD_Properties_View_basic.png|x290px]] [[File:FreeCAD_Properties_Data_basic.png|x290px]]

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

==Actions ==

Actions in the property view were implemented in 0.19.

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++ 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 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 any more until this switch is turned off.
* {{MenuCommand|Transient}}: if active, sets the property as transient.
* {{MenuCommand|Touched}}: if active, it becomes touched, and ready for recompute.
* {{MenuCommand|EvalOnRestore}}: if active, it is evaluated when the document is restored.

==Example of the properties of a PartDesign object==

===View===

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


* {{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|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|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|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|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|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 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|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 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|Point Size}}: Gives the size of the points (Default, '''2''').
* {{PropertyView|Selectable}} : Allows selection of the feature. Value False, ou True (Default, True).
* {{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|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|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).
* {{PropertyView|Visibility}}: Determines the visibility of the feature (like the bar {{KEY|SPACE}}). Value False, or True (Default, True).
{{clear}}
{{clear}}



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


<div class="mw-translate-fuzzy">

[[File:FreeCAD_Properties_Data.png|490px|left]]
[[File:FreeCAD_Properties_Data.png|490px|left]]
{{TitleProperty|Base}}
{{TitleProperty|Base}}
</div>


* {{PropertyData|Placement}}:

{{PropertyData|Placement}} :
Summary of the data below.
Summary of the data below.
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.
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.


* {{PropertyData|Angle}}:

{{PropertyData|Angle}} :
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.
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.
The feature is rotated by the specified angle, about the specified axis.
The feature is rotated by the specified angle, about the specified axis.
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.
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.


* {{PropertyData|Axis}}:

{{PropertyData|Axis}} :
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).
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).
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.
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.
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.
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.


* {{PropertyData|Position}}:

{{PropertyData|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.
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.


* {{PropertyData|Label}}:

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


{{clear}}
'''PS: The displayed properties can vary, depending on the tool used.'''


{{docnav/tr|[[Interface Customization/tr|Arayüz özelleştirme]]|[[Workbenches/tr|Tezgahlar]]}}
{{docnav/tr|[[Interface Customization/tr|Arayüz özelleştirme]]|[[Workbenches/tr|Tezgahlar]]}}

Revision as of 11:21, 25 September 2019

Interface Customization
Workbenches

Genel Bakış

Özellik Penceresi, FreeCAD'in en önemli araçlarından ve ana unsurlarından biridir. Özellik Penceresi, belgenizdeki nesnelerin özelliklerini yönetmenize olanak sağlar.

The property editor allows managing the publicly exposed properties of the objects in your document.

Genel olarak Özellik Penceresi bir kerede yalnızca bir nesneyle ilgilenmesi amaçlanmıştır. Özellik Penceresinde gösterilen değerler, aktif belgenizin aktif nesnesine aittir (birden fazla belge üzerinde çalışıyorsanız hangi belgenin gerçekten etkin olduğuna dikkat edin). Herhangi bir öğe seçmediyseniz (veya hiç öğe yoksa), Özellik Penceresi boş olacaktır.

Bazı özellikler değiştirilemez. Özel duruma bağlı olarak, bazı özellikler salt okunur olarak gösterilecektir.

File:FreeCAD Properties empty.png

Empty property editor, when no object is selected.

Özellik tanımı

Bir Özellik, bir FreeCAD belgesi ve ya bir belge içerisindeki nesneye ait sayı, metin ve benzeri bilgilerdir. Özellikler, Özellik penceresi ile görüntülenebilir ve düzenlenebilir ise değiştirilebilirler.

Özellikler, FreeCAD'de çok önemli bir rol oynar, çünkü sadece özellikleri tarafından tanımlanan nesneler olan parametrik nesnelerle çalışmak üzere tasarlanmıştır.


Parametrik nesneler FreeCAD'de genel olarak aşağıdaki özelliklere sahiptir:

Boolean
Float
FloatList
FloatConstraint
Angle
Distance
Integer
IntegerConstraint
Percent
Enumeration
IntegerList
String
StringList
Link
LinkList
Matrix
Vector
VectorList
Placement
PlacementLink
Color
ColorList
Material
Path
File
FileIncluded
PartShape
FilletContour
Circle


Örnek olarak bir parça'nın özellikleri

örnek yenilenecekmiş.

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.

Custom scripted objects can use any of the property types defined in the base system. See the full list in Property.

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

Farklı nesneler farklı özelliklere sahip olabilir. Bununla birlikte, bazı özellikler tüm nesneler arasında ortaktır, örneğin bir nesnenin konumu ve döndürülmesi manipüle edilebilen Veri özellikleridir.

View and Data properties

There are two classes of feature properties accessible through tabs in the property editor:

  • View properties, related to the "visual" appearance of the object. The View properties are tied to the ViewProvider (ViewObject 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.
  • Data properties, related to the "physical" parameters of the object. The Data 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, Data properties are considered to be more "important", as they truly define the geometry of a shape. On the other hand View properties are less important because they only affect the appearance of the geometry. For example, a circle of 10 mm radius is different from a circle of 5 mm radius; the color (View property) of the circles doesn't affect their shapes, but the radius does (Data property). In many instances in this documentation, the word "property" is understood to refer to a "Data property".

Basic properties

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 of an object is an internal attribute that is assigned to the object at the moment of its creation; this attribute is read-only, so it cannot be changed, and it is not displayed in the property editor either.

A basic parametric object is created as follow

obj = App.ActiveDocument.addObject("App::FeaturePython", "App__FeaturePython")

File:FreeCAD Properties View basic.png File:FreeCAD Properties Data basic.png

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

Actions

Actions in the property view were implemented in 0.19.

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++ 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 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 any more until this switch is turned off.
  • Transient: if active, sets the property as transient.
  • Touched: if active, it becomes touched, and ready for recompute.
  • EvalOnRestore: if active, it is evaluated when the document is restored.

Example of the properties of a PartDesign object

View

Base

  • GörünümBounding Box: Indicates if a box showing the overall extent of the object is to be displayed. Value False, or True (Default, False).
  • GörünümControl Point: Indicates if the feature control points are to be displayed. Value False, or True (Default, False).
  • GörünümDeviation: 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).
  • GörünümDisplay Mode: Display mode of the feature, Flat lines, Shaded, Wireframe, Points . (Default, Flat lines).
  • GörünümLighting: Lighting One side, Two side . (Default, Two side).
  • GörünümLine Color: Gives the color of the line (edges) (Default, 25, 25, 25).
  • GörünümLine Width: Gives the thickness of the line (edges) (Default, 2).
  • GörünümPoint Color: Gives the color of the points (ends of the feature) (Default, 25, 25, 25).
  • GörünümPoint Size: Gives the size of the points (Default, 2).
  • GörünümSelectable: Allows selection of the feature. Value False, ou True (Default, True).
  • GörünümShape Color: Give the color shape (default, 204, 204, 204).
  • GörünümTransparency: Sets the degree of transparency in the feature of 0 to 100 (Default, 0).
  • GörünümVisibility: Determines the visibility of the feature (like the bar SPACE). Value False, or True (Default, True).

Data

Base

  • VeriPlacement:

Summary of the data below. 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!
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.

  • VeriAngle:

Specifies the angle to be used with the axis property (below). An angle is set here, and the axis that the angle acts upon is set with the axis property. The feature is rotated by the specified angle, about the specified axis. 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.

  • VeriAxis:

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). 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. 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.

  • VeriPosition:

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.

  • VeriLabel:

The Label is the name given to the object (feature), this name can be changed as desired.