Arch 3Views/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "# Wybierz obiekt siatki. # Wybierz przycisk {{KEY|16px}} lub {{MenuCommand|Architektura → Narzędzia → 16px Trzy widoki}} z menu głównego.")
(Created page with "==Tworzenie skryptów==")
Line 29: Line 29:
# Wybierz przycisk {{KEY|[[Image:Arch 3Views.svg|16px]]}} lub {{MenuCommand|Architektura → Narzędzia → [[Image:Arch 3Views.svg|16px]] Trzy widoki}} z menu głównego.
# Wybierz przycisk {{KEY|[[Image:Arch 3Views.svg|16px]]}} lub {{MenuCommand|Architektura → Narzędzia → [[Image:Arch 3Views.svg|16px]] Trzy widoki}} z menu głównego.


== Scripting ==
<span id="Scripting"></span>
==Tworzenie skryptów==


{{Emphasis|See also:}} [[Arch_API|Arch API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
{{Emphasis|See also:}} [[Arch_API|Arch API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

Revision as of 18:40, 6 May 2024

Architektura: Trzy widoki

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

Opis

Polecenie to nie jest obecnie używane. Służy do generowania płaskich, opartych na kształtach widoków z obiektu opartego na siatce, do wykorzystania przez narzędzie Wyposażenie.

Użycie

  1. Wybierz obiekt siatki.
  2. Wybierz przycisk lub Architektura → Narzędzia → Trzy widoki z menu głównego.

Tworzenie skryptów

See also: Arch API and FreeCAD Scripting Basics.

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

shape = createMeshView(obj, direction=FreeCAD.Vector(0, 0, -1), outeronly=False, largestonly=False)
  • Creates a flat shape that is the projection of the given mesh object (obj) in the given direction.
  • If outeronly is True only the outer contour is taken into consideration, discarding the inner holes.
  • If largestonly is True only the largest segment of the given mesh will be used.

Use Part.show() to display the resulting flat shape.

Example:

import FreeCAD, Draft, Arch, Mesh, MeshPart

Line = Draft.makeWire([FreeCAD.Vector(0, 0, 0), FreeCAD.Vector(2000, 2000, 0)])
Wall = Arch.makeWall(Line, width=150, height=3000)
FreeCAD.ActiveDocument.recompute()

Shape = Wall.Shape.copy(False)
Shape.Placement = Wall.getGlobalPlacement()

mesh_obj = FreeCAD.ActiveDocument.addObject("Mesh::Feature", "Mesh")
mesh_obj.Mesh = MeshPart.meshFromShape(Shape=Shape, MaxLength=520)
mesh_obj.ViewObject.DisplayMode = "Flat Lines"
FreeCAD.ActiveDocument.recompute()

XAxis = FreeCAD.Vector(1, 0, 0)
YAxis = FreeCAD.Vector(0, 1, 0)
ZAxis = FreeCAD.Vector(0, 0, -1)

s1 = Arch.createMeshView(mesh_obj, ZAxis)
s2 = Arch.createMeshView(mesh_obj, XAxis)
s3 = Arch.createMeshView(mesh_obj, YAxis)

Part.show(s1)
Part.show(s2)
Part.show(s3)

Wall.ViewObject.Visibility = False
mesh_obj.ViewObject.Visibility = False