Arch Remove: Difference between revisions

From FreeCAD Documentation
No edit summary
(Marked this version for translation)
Line 79: Line 79:
{{docnav|[[Arch_Add|Add component]]|[[Arch_Survey|Survey]]|[[Arch_Module|Arch]]|IconL=Arch_Add.svg |IconC=Workbench_Arch.svg |IconR=Arch_Survey.svg}}
{{docnav|[[Arch_Add|Add component]]|[[Arch_Survey|Survey]]|[[Arch_Module|Arch]]|IconL=Arch_Add.svg |IconC=Workbench_Arch.svg |IconR=Arch_Survey.svg}}


<!--T:17-->
{{Arch Tools navi}}
{{Arch Tools navi}}


<!--T:18-->
{{Userdocnavi}}
{{Userdocnavi}}
</translate>
</translate>

Revision as of 22:37, 9 February 2019

Arch Remove

Menu location
Arch → Remove
Workbenches
Arch
Default shortcut
None
Introduced in version
-
See also
Arch Add

Description

The Remove tools allows you to do 2 kinds of operations:

  • Remove a subcomponent from an Arch object, for example remove a box that has been added to a wall, like in the Arch Add example
  • Subtract a shape-based object from an Arch component such as a wall or structure

The counterpart of this tool is the Arch Add tool.

A box subtracted from a wall, leaving a hole in it.

How to use

  1. Select a subcomponent inside an Arch object.
  2. Press the Remove button.

Or

  1. Select objects to be subtracted, the last object selected must the Arch object from which the other objects will be subtracted.
  2. Press the Remove button.

Scripting

See also: Arch API and FreeCAD Scripting Basics.

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

removeComponents(objectsList, host=None)
  • Removes the given objects in objectsList from their parents.
  • If a host object is specified, this function will try adding the objects in objectsList as holes to the host.

Example:

import FreeCAD, Draft, Arch

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

Box = FreeCAD.ActiveDocument.addObject("Part::Box", "Box")
Box.Length = 900
Box.Width = 450
Box.Height = 2000
FreeCAD.ActiveDocument.recompute()

Draft.rotate(Box, 45)
Draft.move(Box, FreeCAD.Vector(1000, 700, 0))

Arch.removeComponents(Box, Wall)
FreeCAD.ActiveDocument.recompute()