Arch MergeWalls: Difference between revisions

From FreeCAD Documentation
(How to use)
m (Code more complete)
Line 18: Line 18:
# Select two or more walls.
# Select two or more walls.
# Go to the menu {{MenuCommand|Arch → Utilities → [[Image:Arch MergeWalls.svg|16px]] Merge Walls}}.
# Go to the menu {{MenuCommand|Arch → Utilities → [[Image:Arch MergeWalls.svg|16px]] Merge Walls}}.

== Scripting ==
{{Emphasis|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:
</translate>
{{Code|code=
base = joinWalls(walls, delete=False)
}}
<translate>

Example:
</translate>
{{Code|code=
import FreeCAD, Draft, Arch

p1 = FreeCAD.Vector(0, 0, 0)
p2 = FreeCAD.Vector(2000, 0, 0)
baseline = Draft.makeLine(p1, p2)
Wall1 = Arch.makeWall(baseline, length=None, width=150, height=2000)
FreeCAD.ActiveDocument.recompute()

Wall2 = Arch.makeWall(None, length=2000, width=200, height=1000)
FreeCAD.ActiveDocument.recompute()

Arch.joinWalls([Wall1, Wall2])
}}
<translate>


<!--T:4-->
<!--T:4-->

Revision as of 02:53, 2 December 2018

This documentation is not finished. Please help and contribute documentation.

GuiCommand model explains how commands should be documented. Browse Category:UnfinishedDocu to see more incomplete pages like this one. See Category:Command Reference for all commands.

See WikiPages to learn about editing the wiki pages, and go to Help FreeCAD to learn about other ways in which you can contribute.

Arch MergeWalls

Menu location
Arch → Utilities → Merge Walls
Workbenches
Arch
Default shortcut
None
Introduced in version
-
See also
Arch Wall

Description

The MergeWalls tool fuses two or more selected Arch Walls.

How to use

  1. Select two or more walls.
  2. Go to the menu Arch → Utilities → Merge Walls.

Scripting

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:

base = joinWalls(walls, delete=False)

Example:

import FreeCAD, Draft, Arch

p1 = FreeCAD.Vector(0, 0, 0)
p2 = FreeCAD.Vector(2000, 0, 0)
baseline = Draft.makeLine(p1, p2)
Wall1 = Arch.makeWall(baseline, length=None, width=150, height=2000)
FreeCAD.ActiveDocument.recompute()

Wall2 = Arch.makeWall(None, length=2000, width=200, height=1000)
FreeCAD.ActiveDocument.recompute() 

Arch.joinWalls([Wall1, Wall2])