Arch Fence/pt-br: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<languages/>
<languages/>

<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
{{Docnav
{{Docnav
|[[Arch_Frame/pt-br|Estrutura]]
|[[Arch_Frame/pt-br|Estrutura]]
|[[Arch_Truss/pt-br|Treliça]]
|[[Arch_Truss/pt-br|Treliça]]
|[[Arch_Module/pt-br|Arch]]
|[[Arch_Workbench/pt-br|Arch]]
|IconL=Arch_Frame.svg
|IconL=Arch_Frame.svg
|IconR=Arch_Equipment.svg
|IconR=Arch_Equipment.svg
Line 43: Line 44:


=== Data ===
=== Data ===

* {{PropertyData|Path}}: The path the fence should follow
* {{PropertyData|Path}}: The path the fence should follow
* {{PropertyData|Post}}: A single fence post to repeat
* {{PropertyData|Post}}: A single fence post to repeat
Line 50: Line 52:


=== View ===
=== View ===

* {{PropertyView|Use 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.
* {{PropertyView|Use 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.


Line 65: Line 68:
}}
}}


Example.
Example:


{{Code|code=
{{Code|code=
Line 96: Line 99:
Fence = Arch.buildFence(fence_section, post, sketch)
Fence = Arch.buildFence(fence_section, post, sketch)
}}
}}



<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 101: Line 105:
|[[Arch_Frame/pt-br|Estrutura]]
|[[Arch_Frame/pt-br|Estrutura]]
|[[Arch_Truss/pt-br|Treliça]]
|[[Arch_Truss/pt-br|Treliça]]
|[[Arch_Module/pt-br|Arch]]
|[[Arch_Workbench/pt-br|Arch]]
|IconL=Arch_Frame.svg
|IconL=Arch_Frame.svg
|IconR=Arch_Equipment.svg
|IconR=Arch_Equipment.svg

Latest revision as of 20:39, 6 September 2021

Other languages:

Arch Fence

Menu location
Arch → Fence
Workbenches
Arch
Default shortcut
None
Introduced in version
0.19
See also
None

Descrição

The Arch Fence is a object that builds a fence by repeating a single fence post and section along a given path.

Utilização

Creating from scratch

  1. Use a workbench of your choice to create a single fence post and a single section.
  2. Create the path the fence should follow using the Sketcher Workbench or Draft Workbench.
  3. Switch back to the Arch Workbench.
  4. Select the section, post and path in exactly that order.
  5. Press the Arch Fence button

Opções

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

Propriedades

Data

  • DadosPath: The path the fence should follow
  • DadosPost: A single fence post to repeat
  • DadosSection: A single section to repeat
  • DadosNumber Of Posts: The total number of posts used to build the fence. This is calculated automatically.
  • DadosNumber Of Sections: The total number of sections used to build the fence. This is calculated automatically.

View

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

Notas

  • 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)