Arch MeshToShape/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "==Tworzenie skryptów==")
(Created page with "==Ograniczenia==")
Line 40: Line 40:
==Tworzenie skryptów==
==Tworzenie skryptów==


{{Emphasis|See also:}} [[Arch_API|Arch API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
{{Emphasis|Zobacz również:}} [[Arch_API/pl|API: Architektura]] i [[FreeCAD_Scripting_Basics/pl|Podstawy tworzenia skryptów FreeCAD]].


This tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function:
This tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function:

Revision as of 16:48, 6 May 2024

Architektura: Kształt z siatki

Lokalizacja w menu
Architektura → Narzędzia → Kształt z siatki
Środowisko pracy
Architektura
Domyślny skrót
brak
Wprowadzono w wersji
-
Zobacz także
Podziel siatkę, Usuń kształt

Opis

Narzędzie Kształt z siatki konwertuje wybrany obiekt siatki (cechy siatki) na obiekt kształtu (cechę Części).

Narzędzie to jest zoptymalizowane dla obiektów o płaskich powierzchniach (bez krzywych). Odpowiednie narzędzie Utwórz kształt z siatki ze środowiska Część może być bardziej odpowiednie dla obiektów zawierających zakrzywione powierzchnie.

Użycie

  1. Wybierz obiekt siatki.
  2. Naciśnij przycisk Kształt z siatki w menu Architektura → Narzędzia → Kształt z siatki.

Właściwości

Ograniczenia

Tworzenie skryptów

Zobacz również: API: Architektura i Podstawy tworzenia skryptów FreeCAD.

This tool can be used in macros and from the Python console by using the following function:

new_obj = meshToShape(obj, mark=True, fast=True, tol=0.001, flat=False, cut=True)

The above code snippet converts the given obj (a mesh), into a shape, joining coplanar facets.

  • If mark is True, non-solid objects will be marked in red.
  • If fast is True, it uses a faster algorithm by building a shell from the facets then removing splitter.
  • tol is the tolerance used when converting mesh segments to wires.
  • If flat is True, it will force the wires to be perfectly planar to be sure they can be converted into faces, but this might leave gaps in the final shell.
  • If cut is True, holes in faces are made by subtraction.

Example:

import Arch, Mesh, BuildRegularGeoms

Box = FreeCAD.ActiveDocument.addObject("Mesh::Cube", "Cube")
Box.Length = 1000
Box.Width = 2000
Box.Height = 1000
FreeCAD.ActiveDocument.recompute()

new_obj = Arch.meshToShape(Box)