Mesh API/pl: Difference between revisions
(Created page with "{{VeryImportantMessage/pl |''(listopad 2018 r.)'' Informacje te mogą być niekompletne i nieaktualne. Najnowsze API - patrz [https://www.freecadweb.org/api dokumentacja API g...") |
(Created page with "Obiektami Siatek można manipulować poprzez dodawanie nowych elementów, usuwanie elementów, importowanie z pliku STL, przekształcanie siatki i wiele więcej. Dla pełnego...") |
||
Line 4: | Line 4: | ||
|''(listopad 2018 r.)'' Informacje te mogą być niekompletne i nieaktualne. Najnowsze API - patrz [https://www.freecadweb.org/api dokumentacja API generowana automatycznie].}} |
|''(listopad 2018 r.)'' Informacje te mogą być niekompletne i nieaktualne. Najnowsze API - patrz [https://www.freecadweb.org/api dokumentacja API generowana automatycznie].}} |
||
Obiektami Siatek można manipulować poprzez dodawanie nowych elementów, usuwanie elementów, importowanie z pliku STL, przekształcanie siatki i wiele więcej. Dla pełnego przeglądu tego, co można zrobić zobacz także dokumentację środowiska pracy [[Mesh_Workbench/pl|Siatka]]. Obiekt siatki nie może być dodany bezpośrednio do istniejącego dokumentu. Dlatego dokument musi tworzyć obiekt z klasą właściwości, która obsługuje siatki. Przykład: |
|||
The Mesh objects can be manipulated by adding new facets, deleting facets, importing from an STL file, transforming the mesh and much more. For a complete overview of what can be done see also the [[Mesh_Workbench|Mesh Workbench]] documentation. A mesh object cannot be added to an existing document directly. Therefore the document must create an object with a property class that supports meshes. Example: |
|||
{{Code|code= |
{{Code|code= |
Revision as of 15:03, 25 August 2021
Template:VeryImportantMessage/pl
Obiektami Siatek można manipulować poprzez dodawanie nowych elementów, usuwanie elementów, importowanie z pliku STL, przekształcanie siatki i wiele więcej. Dla pełnego przeglądu tego, co można zrobić zobacz także dokumentację środowiska pracy Siatka. Obiekt siatki nie może być dodany bezpośrednio do istniejącego dokumentu. Dlatego dokument musi tworzyć obiekt z klasą właściwości, która obsługuje siatki. Przykład:
m = Mesh.Mesh()
... # Manipulate the mesh
d = FreeCAD.activeDocument() # Get a reference to the actie document
f = d.addObject("Mesh::Feature", "Mesh") # Create a mesh feature
f.Mesh = m # Assign the mesh object to the internal property
d.recompute()
Description: Get the number of wrong oriented facets
Returns: an integer
Description: Get all planes of the mesh as segment. In the worst case each triangle can be regarded as single plane if none of its neighbors is coplanar.
Returns:
Description: Returns a list containing the different components (separated areas) of the mesh as separate meshes
Returns: a list
Description: Checks if the mesh has facets with inconsistent orientation
Returns:
Description: Get the index and intersection point of the nearest facet to a ray. The first parameter is a tuple of three floats the base point of the ray, the second parameter is ut uple of three floats for the direction. The result is a dictionary with an index and the intersection point or an empty dictionary if there is no intersection.
Returns: a dictionary
Description: Remove components with less or equal to number of given facets
Returns:
Returns: A collection of facets; With this attribute it is possible to get access to the facets of the mesh: for f in mesh.Facets: print f. Facet.Points is a list of coordinate-tupels for the vertices. Facet.PointIndices is a list of indice for the vertices of the facet. WARNING! store Facets in a local variable as it is generated on the fly, each time it is accessed.
Returns: A collection of the mesh points; With this attribute it is possible to get access to the points of the mesh: for p in mesh.Points: print p.x, p.y, p.z,p.Index.WARNING! store Points in a local variable as it is generated on the fly, each time it is accessed.
Returns: the points and face indices as tuple. Topology[0] is a list of all vertices. Each being a tuple of 3 coordinates. Topology[1] is a list of all polygons. Each being a list of vertex indice into Topology[0] WARNING! store Topology in a local variable as it is generated on the fly, each time it is accessed.
- 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, Start, Powierzchnia 3D, Rysunek Techniczny, Test Framework, Web