App DocumentObject/pl: Difference between revisions
(Created page with "{{Caption|Widok drzewa pokazujący różne obiekty w dokumencie. Każdy z nich jest "obiektem dokumentu", wywodzącym się z klasy bazowej {{incode|App::DocumentObject}}.}}") |
(Created page with "{{Caption|Uproszczony diagram zależności pomiędzy podstawowymi obiektami w programie FreeCAD.}}") |
||
Line 17: | Line 17: | ||
[[File:FreeCAD_core_objects.svg|800px]] |
[[File:FreeCAD_core_objects.svg|800px]] |
||
{{Caption| |
{{Caption|Uproszczony diagram zależności pomiędzy podstawowymi obiektami w programie FreeCAD.}} |
||
== Usage == |
== Usage == |
Revision as of 14:31, 30 March 2024
Wprowadzenie
Obiekt Dokumentu, lub formalnie App::DocumentObject
, jest klasą bazową wszystkich klas obiektów obsługiwanych w dokumencie.
Ogólnie rzecz biorąc, "ObiektDokumentu" to dowolna "rzecz", która może pojawić się w Tree view i która jest zapisywana i przywracana podczas otwierania dokumentu.
Widok drzewa pokazujący różne obiekty w dokumencie. Każdy z nich jest "obiektem dokumentu", wywodzącym się z klasy bazowej App::DocumentObject
.
Uproszczony diagram zależności pomiędzy podstawowymi obiektami w programie FreeCAD.
Usage
The App DocumentObject is an internal class, so it cannot be created from the graphical interface, nor is it meant to be used by itself. It just defines the basic behavior and properties of objects in the program.
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.
Properties
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.
- DANELabel (
String
): the user editable name of this object, it is an arbitrary UTF8 string. By default, it is the same as theName
. - DANELabel2 (
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""
. - DANEExpression Engine (
ExpressionEngine
): a list of expressions. - DANEVisibility (
Bool
): whether to display the object or not.
For derived objects, only DANELabel will be listed in the property editor by default. The other properties will be hidden.
Scripting
See also: FreeCAD Scripting Basics and scripted objects.
See Part Feature for the general information on adding objects to the document.
A DocumentObject is created with the addObject()
method of the document. However, in general, there is no need to create this object manually. It is usually better to subclass one of the more complex classes, for example, App FeaturePython, App GeoFeature, Part Feature, Part Part2DObject, etc.
import FreeCAD as App
doc = App.newDocument()
obj = App.ActiveDocument.addObject("App::DocumentObject", "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