Arch Remove: Difference between revisions

From FreeCAD Documentation
(Created page with '{{GuiCommand|Name=Arch Remove|Workbenches=Arch|MenuLocation=Arch -> Remove|SeeAlso=Arch Add}} ====Description==== The Remove tools allows you to do 2 kinds …')
 
m (Linted templates)
(34 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand|Name=Arch Remove|Workbenches=[[Arch Module|Arch]]|MenuLocation=Arch -> Remove|SeeAlso=[[Arch Add]]}}
<translate>
<!--T:12-->
{{Docnav
|[[Arch_Add|Add component]]
|[[Arch_Survey|Survey]]
|[[Arch_Module|Arch]]
|IconL=Arch_Add.svg
|IconC=Workbench_Arch.svg
|IconR=Arch_Survey.svg
}}


<!--T:1-->
====Description====
{{GuiCommand
|Name=Arch Remove
|MenuLocation=Arch → Remove
|Workbenches=[[Arch Module|Arch]]
|SeeAlso=[[Arch Add]]
}}


==Description== <!--T:2-->

<!--T:3-->
The Remove tools allows you to do 2 kinds of operations:
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
* Remove a subcomponent from an Arch object, for example remove a box that has been added to a wall, like in the {{Button|[[Image:Arch_Add.svg|16px]] [[Arch Add|Arch Add]]}} example.
* Subtract a [[Part Module|shape]]-based object from an Arch component such as a [[Arch Wall|wall]] or [[Arch Structure|structure]]
* Subtract a [[Part Module|shape]]-based object from an Arch component such as a {{KEY|[[Image:Arch_Wall.svg|16px]] [[Arch Wall|Arch Wall]]}} or {{KEY|[[Image:Arch_Structure.svg|16px]] [[Arch Structure|Arch Structure]]}}

<!--T:13-->
The counterpart of this tool is the {{Button|[[Image:Arch_Add.svg|16px]] [[Arch Add|Arch Add]]}} tool.

</translate>
[[Image:Arch Remove example.jpg|600px]]
<translate>
<!--T:5-->
{{Caption|A box subtracted from a wall, leaving a hole in it.}}

==Usage== <!--T:6-->

<!--T:7-->
# Select a subcomponent inside an Arch object.
# Press the {{Button|[[Image:Arch Remove.svg|16px]]}} button, or {{KEY|Arch}} → {{KEY|[[Image:Arch_Remove.svg|16px]] [[Arch Remove|Remove]]}} from the top menu.

<!--T:14-->
Or
# Select objects to be subtracted, the last object selected must the Arch object from which the other objects will be subtracted.
# Press the {{Button|[[Image:Arch Remove.svg|16px]]}} button, or {{KEY|Arch}} → {{KEY|[[Image:Arch_Remove.svg|16px]] [[Arch Remove|Remove]]}} from the top menu.

==Scripting== <!--T:8-->
{{Emphasis|See also:}} [[Arch API]] and [[FreeCAD Scripting Basics]].

<!--T:9-->
The Remove tool can be used in [[macros]] and from the [[Python]] console by using the following function:
</translate>
{{Code|code=
removeComponents(objectsList, host=None)
}}
<translate>

<!--T:10-->
* Removes the given objects in {{incode|objectsList}} from their parents.
* If a {{incode|host}} object is specified, this function will try adding the objects in {{incode|objectsList}} as holes to the {{incode|host}}.

<!--T:15-->
Example:
</translate>
{{Code|code=
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)
[[Image:Arch Remove example.jpg]]
FreeCAD.ActiveDocument.recompute()
}}
<translate>
<!--T:16-->
{{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-->
In the above image, a box is being subtracted from a wall
{{Arch Tools navi}}


<!--T:18-->
====Usage====
{{Userdocnavi}}
* Select a subcomponent inside an Arch object, '''or''':
</translate>
* Select object(s) to be subtracted, then the Arch component from which they must be subtracted (the arch component must be the last thing you selected)
* Press the [[Image:Arch Remove.png|16px]] '''Remove''' button

Revision as of 03:44, 4 February 2020

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 Arch Wall or Arch Structure

The counterpart of this tool is the Arch Add tool.

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

Usage

  1. Select a subcomponent inside an Arch object.
  2. Press the button, or Arch Remove from the top menu.

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 button, or Arch Remove from the top menu.

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