Architektura: Ogrodzenie

From FreeCAD Documentation
Revision as of 05:18, 5 May 2024 by Kaktus (talk | contribs) (Created page with "# Użyj wybranego środowiska pracy, aby utworzyć pojedynczy słupek ogrodzenia i pojedynczą sekcję. # Stwórz ścieżkę, którą ma podążać ogrodzenie, używając środowiska pracy Szkicownik lub Rysunek Roboczy. # Przełącz się z powrotem do środowiska Architektura. # Wybierz sekcję, słupek i ścieżkę dokładnie w tej kolejności. # Naciśnij przycisk {{Button|[[Image:Arch_Fence.svg|16px]...")

Architektura: Ogrodzenie

Lokalizacja w menu
Architektura → Ogrodzenie
Środowisko pracy
Architektura
Domyślny skrót
brak
Wprowadzono w wersji
0.19
Zobacz także
brak

Opis

Narzędzie Ogrodzenie jest obiektem, który buduje ogrodzenie poprzez powtarzanie pojedynczego słupka i sekcji wzdłuż danej ścieżki.

Użycie

Tworzenie od podstaw

  1. Użyj wybranego środowiska pracy, aby utworzyć pojedynczy słupek ogrodzenia i pojedynczą sekcję.
  2. Stwórz ścieżkę, którą ma podążać ogrodzenie, używając środowiska pracy Szkicownik lub Rysunek Roboczy.
  3. Przełącz się z powrotem do środowiska Architektura.
  4. Wybierz sekcję, słupek i ścieżkę dokładnie w tej kolejności.
  5. Naciśnij przycisk Ogrodzenie.

Options

For now the tool assumes the following

  1. The Path is drawn on the XY-Plane
  2. Section and Post are drawn at the origin so that they stand upright in front view

Properties

Data

  • DANEPath: The path the fence should follow
  • DANEPost: A single fence post to repeat
  • DANESection: A single section to repeat
  • DANENumber Of Posts: The total number of posts used to build the fence. This is calculated automatically.
  • DANENumber Of Sections: The total number of sections used to build the fence. This is calculated automatically.

View

  • WIDOKUse Original Colors: When set to true the fence will use the colors from the original section and post. Otherwise the ShapeColor of the fence will be used to colorize the fence.

Notes

  • Arch Fence was introduced in FC v0.19 by user furti.
  • Forum thread discussing Arch Fence functionality

Scripting

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

Fence = buildFence(section, post, path)

Example:

import FreeCAD
import Part
import Arch

parts = []

parts.append(Part.makeBox(2000, 50, 30, FreeCAD.Vector(0, 0, 1000 - 30)))
parts.append(Part.makeBox(2000, 50, 30))
parts.append(Part.makeBox(20, 20, 1000 - 60, FreeCAD.Vector(0, 15, 30)))
parts.append(Part.makeBox(20, 20, 1000 - 60, FreeCAD.Vector(1980, 15, 30)))

for i in range(8):
    parts.append(Part.makeBox(20, 20, 1000 - 60, FreeCAD.Vector((2000 / 9 * (i + 1)) - 10, 15, 30)))

Part.show(Part.makeCompound(parts), "Fence_section")
fence_section = FreeCAD.ActiveDocument.Fence_section

sketch = FreeCAD.ActiveDocument.addObject("Sketcher::SketchObject", "Path")
sketch.Placement = FreeCAD.Placement(FreeCAD.Vector(0, 0, 0), FreeCAD.Rotation(0, 0, 0, 1))
sketch.addGeometry(Part.LineSegment(FreeCAD.Vector(0, 0, 0), FreeCAD.Vector(20000, 0, 0)), False)
sketch.addGeometry(Part.LineSegment(FreeCAD.Vector(20000, 0, 0), FreeCAD.Vector(20000, 20000, 0)), False)

post = Part.makeBox(100, 100, 1000, FreeCAD.Vector(0, 0, 0))
Part.show(post, "Post")
post = FreeCAD.ActiveDocument.Post

Fence = Arch.buildFence(fence_section, post, sketch)