Arch Zaun

From FreeCAD Documentation
Revision as of 09:52, 22 August 2020 by Maker (talk | contribs) (Created page with "==Optionen==")

Arch Zaun

Menüeintrag
Arch → Zaun
Arbeitsbereich
Arch
Standardtastenkürzel
Keiner
Eingeführt in Version
0.19
Siehe auch
Keiner

Beschreibung

Der Arch Zaun ist ein Objekt, das einen Zaun durch die Wiederholung eines einzelnen Zaunpfostens und eines Abschnitts entlang eines bestimmten Pfades bildet.

Anwendung

Erzeugung von Grundauf

  1. Verwende einen Arbeitsbereich deiner Wahl, um einen einzelnen Zaunpfosten und einen einzelnen Abschnitt zu erstellen.
  2. Erstelle den Pfad, dem der Zaun folgen soll, mit Hilfe des Skizzierer Arbeitsbereich oder Entwurf Arbeitsbereich.
  3. Wechsle zurück zum Arch Arbeitsbereich.
  4. Wähle den Abschnitt, den Beitrag und den Pfad in genau dieser Reihenfolge aus.
  5. Drücke die Arch Zaun Schaltfläche

Optionen

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

  • DatenPath: The path the fence should follow
  • DatenPost: A single fence post to repeat
  • DatenSection: A single section to repeat
  • DatenNumber Of Posts: The total number of posts used to build the fence. This is calculated automatically.
  • DatenNumber Of Sections: The total number of sections used to build the fence. This is calculated automatically.

View

  • AnsichtUse 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.

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)