Arch Remove: Difference between revisions

From FreeCAD Documentation
(Marked this version for translation)
No edit summary
Line 27: Line 27:


<!--T:3-->
<!--T:3-->
The Remove tools allows you to do 2 kinds of operations:
The '''Arch 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 {{Button|[[Image:Arch_Add.svg|16px]] [[Arch_Add|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_Workbench|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]]}}
* Subtract a [[Part_Workbench|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]]}}
Line 53: Line 53:
<!--T:8-->
<!--T:8-->
==Scripting==
==Scripting==

{{Emphasis|See also:}} [[Arch_API|Arch API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
{{Emphasis|See also:}} [[Arch_API|Arch API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


<!--T:9-->
<!--T:9-->
The Remove tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function:
The Remove tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function:

</translate>
</translate>
{{Code|code=
{{Code|code=
Line 69: Line 71:
<!--T:15-->
<!--T:15-->
Example:
Example:

</translate>
</translate>
{{Code|code=
{{Code|code=

Revision as of 13:52, 15 June 2024

THIS COMMAND IS PART OF THE INTEGRATED BIM WORKBENCH IN V1.0
This page has been updated for that version.

Arch Remove

Menu location
Modify → Remove component
Workbenches
BIM
Default shortcut
None
Introduced in version
-
See also
Arch CutPlane, Arch Add

Description

The Arch 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 Remove component button, or Modify → Remove component 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 Remove component button, or Modify → Remove component 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()