Arch CloseHoles: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
(28 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand|Name=Arch CloseHoles|Workbenches=[[Arch Module|Arch]]|MenuLocation=Arch -> Conversion Tools -> Close Holes|SeeAlso=[[Arch Check]]}}
<translate>


<!--T:10-->
==Description==
{{Docnav
|[[Arch_RemoveShape|Remove Shape]]
|[[Arch_MergeWalls|Merge Walls]]
|[[Arch_Module|Arch]]
|IconL=Arch_RemoveShape.svg
|IconR=Arch_MergeWalls.svg
|IconC=Workbench_Arch.svg
}}


<!--T:1-->
This tool identifies holes (circular sequence of open edges) in a [[Part Module|Shape]] object and attempts to close it by adding it a new face made from that edges sequence. You must still verify yourself that the result is a solid, though.
{{GuiCommand
|Name=Arch CloseHoles
|MenuLocation=Arch → Utilities → Close Holes
|Workbenches=[[Arch_Module|Arch]]
|SeeAlso=[[Arch_Check|Arch Check]]
}}


==Description== <!--T:2-->
==How to use==


<!--T:3-->
# Select a [[Part Module|Shape]] object
This tool identifies holes (circular sequence of open edges) in a [[Part_Module|Shape]] object and attempts to close it by adding it a new face made from that edges sequence. You must still verify yourself that the result is a solid, though.
# Press the {{KEY|[[Image:Arch CloseHoles.png|16px]] '''Close Holes'''}} entry in Arch -> Conversion Tools menu


==Usage== <!--T:4-->
==Scripting==


<!--T:5-->
This tool can by used in [[macros]] and from the python console by using the following function:
# Select a [[Part Module|Shape]] object.
# Press the {{Button|[[Image:Arch CloseHoles.svg|16px]] [[Arch CloseHoles|Close Holes]]}} entry in {{MenuCommand|Arch Utilities Close Holes}}.


==Scripting== <!--T:6-->
'''closeHole (shape)''': closes a hole in an open shape
{{Emphasis|See also:}} [[Arch API|Arch API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].


<!--T:7-->
This tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function:
</translate>
{{Code|code=
solid = closeHole(shape)
}}
<translate>


<!--T:8-->
* Closes a hole in a {{incode|shape}}, which is a {{incode|Part.Shape}}, and returns the new {{incode|solid}} object.


<!--T:11-->
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")
{{languages | {{it|Arch CloseHoles/it}} }}
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()

solid = Arch.closeHole(Wall.Shape)
}}
<translate>

<!--T:12-->
{{Docnav
|[[Arch_RemoveShape|Remove Shape]]
|[[Arch_MergeWalls|Merge Walls]]
|[[Arch_Module|Arch]]
|IconL=Arch_RemoveShape.svg
|IconR=Arch_MergeWalls.svg
|IconC=Workbench_Arch.svg
}}

</translate>
{{Arch Tools navi{{#translation:}}}}

{{Userdocnavi{{#translation:}}}}

Revision as of 14:56, 29 November 2020

Arch CloseHoles

Menu location
Arch → Utilities → Close Holes
Workbenches
Arch
Default shortcut
None
Introduced in version
-
See also
Arch Check

Description

This tool identifies holes (circular sequence of open edges) in a Shape object and attempts to close it by adding it a new face made from that edges sequence. You must still verify yourself that the result is a solid, though.

Usage

  1. Select a Shape object.
  2. Press the Close Holes entry in Arch → Utilities → Close Holes.

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:

solid = closeHole(shape)
  • Closes a hole in a shape, which is a Part.Shape, and returns the new solid object.

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

solid = Arch.closeHole(Wall.Shape)