Arch RemoveShape/en: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
{{docnav|[[Arch_SelectNonSolidMeshes|Select non-solid meshes]]|[[Arch_CloseHoles|Close Holes]]|[[Arch_Module|Arch]]}}
{{GuiCommand|Name=Arch RemoveShape|Workbenches=[[Arch Module|Arch]]|MenuLocation=Arch → Utilities → Remove Shape|SeeAlso=[[Arch MeshToShape|Arch MeshToShape]]}}

{{GuiCommand
|Name=Arch RemoveShape
|Workbenches=[[Arch Module|Arch]]
|MenuLocation=Arch → Utilities → Remove Shape
|SeeAlso=[[Arch SplitMesh]], [[Arch MeshToShape|Arch MeshToShape]]
}}


==Description==
==Description==
Line 8: Line 15:
==How to use==
==How to use==


# Select an [[Arch Wall]] or [[Arch Structure]]
# Select an [[Arch Wall]] or [[Arch Structure]].
# Press the {{KEY|[[Image:Arch RemoveShape.png|16px]] '''Remove Shape'''}} entry in Arch -> Utilities menu
# Press the {{Button|[[Image:Arch RemoveShape.svg|16px]] [[Arch RemoveShape|Remove Shape]]}} entry in {{MenuCommand|Arch Utilities → Remove Shape}}.


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


This tool can by used in [[macros]] and from the python console by using the following function:
This tool can be used in [[macros]] and from the [[Python]] console by using the following function:
{{Code|code=
{{Code|code=
removeShape (object)
removeShape(objs, mark=True)
}}

* Takes a list of Arch objects ({{incode|objs}}) built on a cubic shape, and removes the inner shape, keeping the length, width and height as properties of the Arch object.
** {{incode|objs}} is a single object, [[Arch Wall]] or [[Arch Structure]], or a list of them.
* If {{incode|mark}} is {{incode|True}}, objects that cannot be processed by this function will become red.

{{Code|code=
import FreeCAD, Draft, Arch

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

Structure = Arch.makeStructure(Box)
FreeCAD.ActiveDocument.recompute()

Arch.removeShape(Structure)
FreeCAD.ActiveDocument.recompute()
}}
}}
{{docnav|[[Arch_SelectNonSolidMeshes|Select non-solid meshes]]|[[Arch_CloseHoles|Close Holes]]|[[Arch_Module|Arch]]}}
takes an arch object (wall or structure) built on a cubic shape, and removes the inner shape, keeping its length, width and height as parameters.


{{Arch Tools navi}}
[[Category:Arch]]
{{Userdocnavi}}

Revision as of 13:06, 5 February 2019

Arch RemoveShape

Menu location
Arch → Utilities → Remove Shape
Workbenches
Arch
Default shortcut
None
Introduced in version
-
See also
Arch SplitMesh, Arch MeshToShape

Description

This tool attempts at removing the inner cubic shape of an Arch Wall or Arch Structure, and adjusting its properties, making it totally parametric. This tool will only work if the underlying shape is cubic (exactly 6 faces, all corners have only right angles).

How to use

  1. Select an Arch Wall or Arch Structure.
  2. Press the Remove Shape entry in Arch → Utilities → Remove Shape.

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:

removeShape(objs, mark=True)
  • Takes a list of Arch objects (objs) built on a cubic shape, and removes the inner shape, keeping the length, width and height as properties of the Arch object.
  • If mark is True, objects that cannot be processed by this function will become red.
import FreeCAD, Draft, Arch

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

Structure = Arch.makeStructure(Box)
FreeCAD.ActiveDocument.recompute()

Arch.removeShape(Structure)
FreeCAD.ActiveDocument.recompute()