App GeoFeature/pl: Difference between revisions
(Created page with "{{TitleProperty|Podstawa}}") |
(Created page with "===Widok===") |
||
Line 58: | Line 58: | ||
* {{PropertyData|Visibility|Bool|Hidden}}: whether to display the object or not. |
* {{PropertyData|Visibility|Bool|Hidden}}: whether to display the object or not. |
||
<span id="View"></span> |
|||
=== |
===Widok=== |
||
{{TitleProperty|Base}} |
{{TitleProperty|Base}} |
Revision as of 19:37, 15 December 2023
Wprowadzenie
Obiekt App: Cechy geometrii, lub formalnie App::GeoFeature
, jest klasą bazową większości obiektów wyświetlających elementy geometryczne w oknie widoku 3D, ponieważ zawiera właściwość DANEUmiejscowienie.
Uproszczony diagram zależności pomiędzy podstawowymi obiektami w programie FreeCAD.
Użycie
App: Cechy geometrii jest obiektem wewnętrznym, więc nie można go utworzyć z poziomu interfejsu graficznego. Zasadniczo nie jest on przeznaczony do bezpośredniego użycia, a raczej może być podklasowany, aby uzyskać obiekt typu bare-bones, który ma tylko podstawową właściwość DANEUmiejscowienie do zdefiniowania jego pozycji w oknie Widoku 3D.
Niektóre z najważniejszych obiektów pochodnych są następujące:
- Klasa Część: Cecha, rodzic większości obiektów o kształtach topologicznych 2D i 3D.
- Klasa Siatka: Cecha, rodzic większości obiektów wykonanych z Siatka, a nie brył.
- Klasa MES: FemMeshObject, rodzic siatek elementów skończonych utworzonych za pomocą środowiska pracy MES.
- Klasa CAM: Cecha, rodzic ścieżek utworzonych za pomocą środowiska pracy Część do użytku w obróbce CNC.
- Klasa App: Część, która definiuje Std: Część, które mogą być używane jako kontenery korpusów do wykonywania złożeń.
Podczas tworzenia tego obiektu w środowisku Python, zamiast klasy podrzędnej App::GeoFeature
, należy utworzyć klasę podrzędną App::GeometryPython
, ponieważ ta ostatnia zawiera domyślnego dostawcę widoku oraz atrybuty Proxy
dla samego obiektu i jego dostawcy widoku. Zobacz także sekcję tworzenie skryptów.
Właściwości App GeoFeature
Zobacz stronę Właściwości dla wszystkich typów właściwości, które mogą mieć obiekty tworzone skryptami.
The App GeoFeature (App::GeoFeature
class) is derived from the basic App DocumentObject (App::DocumentObject
class) and inherits all its properties. In addition it has a DANEPlacement property, which controls its position in the 3D view.
Właściwości App GeometryPython
Zobacz stronę Właściwości dla wszystkich typów właściwości, które mogą mieć obiekty tworzone skryptami.
The App GeometryPython (App::GeometryPython
class) is derived from the basic App GeoFeature (App::GeoFeature
class) and inherits all its properties. It also has several additional properties.
These are the properties available in the property editor. Hidden properties can be shown by using the Show all command in the context menu of the property editor.
Dane
Podstawa
- DANE (Hidden)Proxy (
PythonObject
): a custom class associated with this object. - DANEPlacement (
Placement
): the position of the object in the 3D view. The placement is defined by aBase
point (vector), and aRotation
(axis and angle). See Placement.- DANEAngle: the angle of rotation around the DANEAxis. By default, it is
0°
(zero degrees). - DANEAxis: the unit vector that defines the axis of rotation for the placement. Each component is a floating point value between
0
and1
. If any value is above1
, the vector is normalized so that the magnitude of the vector is1
. By default, it is the positive Z axis,(0, 0, 1)
. - DANEPosition: a vector with the 3D coordinates of the base point. By default, it is the origin
(0, 0, 0)
.
- DANEAngle: the angle of rotation around the DANEAxis. By default, it is
- DANELabel (
String
): the user editable name of this object, it is an arbitrary UTF8 string. - DANE (Hidden)Label2 (
String
): 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""
. - DANE (Hidden)Expression Engine (
ExpressionEngine
): a list of expressions. By default, it is empty[]
. - DANE (Hidden)Visibility (
Bool
): whether to display the object or not.
Widok
Base
- WIDOK (Hidden)Proxy (
PythonObject
): a custom viewprovider class associated with this object.
Display Options
- WIDOKBounding Box (
Bool
): if it istrue
, the object will show the bounding box in the 3D view. - WIDOKDisplay Mode (
Enumeration
): see the information in App FeaturePython. - WIDOKShow In Tree (
Bool
): see the information in App FeaturePython. - WIDOKVisibility (
Bool
): see the information in App FeaturePython.
Object Style
- WIDOKShape Color (
Color
): a tuple of three floating point RGB values(r,g,b)
to define the color of the faces in the 3D view; by default it is(0.8, 0.8, 0.8)
, which is displayed as[204, 204, 204]
on base 255, a light gray . - WIDOK (Hidden)Shape Material (
Material
): an App Material associated with this object. By default it is empty. - WIDOKTransparency (
Percent
): an integer from0
to100
that determines the level of transparency of the faces in the 3D view. A value of100
indicates completely invisible faces; the faces are invisible but they can still be picked as long as WIDOKSelectable istrue
.
Selection
- WIDOKOn Top When Selected (
Enumeration
): see the information in App FeaturePython. - WIDOKSelectable (
Bool
): if it istrue
, the object can be picked with the pointer in the 3D view. Otherwise, the object cannot be selected until this option is set totrue
. - WIDOKSelection Style (
Enumeration
): see the information in App FeaturePython.
Tworzenie skryptów
Zobacz również: Podstawy tworzenia skryptów FreeCAD, oraz Obiekty skryptowe.
Ogólne informacje na temat dodawania obiektów do dokumentu można znaleźć na stronie Część: właściwość.
Obiekt Cechy geometrii jest tworzony za pomocą metody addObject()
dokumentu. Jeśli chcesz utworzyć obiekt o kształcie 2D lub 3D kształt topologiczny, lepszym rozwiązaniem może być utworzenie jednej z klas podrzędnych wyspecjalizowanych do obsługi kształtów, na przykład Część: Cecha lub Część: Część na obiekt 2D.
import FreeCAD as App
doc = App.newDocument()
obj = App.ActiveDocument.addObject("App::GeoFeature", "Name")
obj.Label = "Custom label"
Dlatego też, dla klasy podrzędnej Python, powinieneś stworzyć obiekt App::GeometryPython
.
import FreeCAD as App
doc = App.newDocument()
obj = App.ActiveDocument.addObject("App::GeometryPython", "Name")
obj.Label = "Custom label"
- Rdzenne: App: Obiekt dokumentu
- Podstawowe: : Właściwości Python, App: Cechy geometrii, Część: Cecha, Siatka: Cecha, MES: Siatka
- Kształty wewnętrzne: Część: Kształt topologiczny, Siatka: Obiekt siatki, MES: Siatka
- Struktura: App: Obiekt grupy dokumentu (Std: Grupa), App: Część (Std: Część), App: Link
- Pochodne: Część: Part2DObject, Szkicownik: Obiekt szkicu, Projekt części: Zawartość, Projekt części: Cecha
- Jak zacząć
- Instalacja: Pobieranie programu, Windows, Linux, Mac, Dodatkowych komponentów, Docker, AppImage, Ubuntu Snap
- Podstawy: Informacje na temat FreeCAD, Interfejs użytkownika, Profil nawigacji myszką, Metody wyboru, Nazwa obiektu, Edytor ustawień, Środowiska pracy, Struktura dokumentu, Właściwości, Pomóż w rozwoju FreeCAD, Dotacje
- Pomoc: Poradniki, Wideo poradniki
- Środowiska pracy: Strona Startowa, Architektura, Assembly, CAM, Rysunek Roboczy, MES, Inspekcja, Siatka, OpenSCAD, Część, Projekt Części, Punkty, Inżynieria Wsteczna, Robot, Szkicownik, Arkusz Kalkulacyjny, Powierzchnia 3D, Rysunek Techniczny, Test Framework