Arch CloseHoles/en: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:


{{Docnav
{{Docnav
|[[Arch_RemoveShape|Remove Shape]]
|[[Arch_RemoveShape|RemoveShape]]
|[[Arch_MergeWalls|Merge Walls]]
|[[Arch_MergeWalls|MergeWalls]]
|[[Arch_Module|Arch]]
|[[Arch_Workbench|Arch]]
|IconL=Arch_RemoveShape.svg
|IconL=Arch_RemoveShape.svg
|IconR=Arch_MergeWalls.svg
|IconR=Arch_MergeWalls.svg
Line 12: Line 12:
{{GuiCommand
{{GuiCommand
|Name=Arch CloseHoles
|Name=Arch CloseHoles
|MenuLocation=Arch → Utilities → Close Holes
|MenuLocation=Arch → Utilities → Close holes
|Workbenches=[[Arch_Module|Arch]]
|Workbenches=[[Arch_Workbench|Arch]]
|SeeAlso=[[Arch_Check|Arch Check]]
|SeeAlso=[[Arch_Check|Arch Check]]
}}
}}
Line 19: Line 19:
==Description==
==Description==


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.
This tool identifies holes (circular sequence of open edges) in a [[Part_Workbench|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==
==Usage==


# Select a [[Part Module|Shape]] object.
# Select a [[Part_Workbench|Shape]] object.
# Press the {{Button|[[Image:Arch CloseHoles.svg|16px]] [[Arch CloseHoles|Close Holes]]}} entry in {{MenuCommand|Arch → Utilities → Close Holes}}.
# Press the {{Button|[[Image:Arch CloseHoles.svg|16px]] [[Arch CloseHoles|Close Holes]]}} entry in {{MenuCommand|Arch → Utilities → Close Holes}}.


==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]].
This tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function:

This tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function:
{{Code|code=
{{Code|code=
solid = closeHole(shape)
solid = closeHole(shape)
Line 57: Line 58:
solid = Arch.closeHole(Wall.Shape)
solid = Arch.closeHole(Wall.Shape)
}}
}}



{{Docnav
{{Docnav
|[[Arch_RemoveShape|Remove Shape]]
|[[Arch_RemoveShape|RemoveShape]]
|[[Arch_MergeWalls|Merge Walls]]
|[[Arch_MergeWalls|MergeWalls]]
|[[Arch_Module|Arch]]
|[[Arch_Workbench|Arch]]
|IconL=Arch_RemoveShape.svg
|IconL=Arch_RemoveShape.svg
|IconR=Arch_MergeWalls.svg
|IconR=Arch_MergeWalls.svg
Line 68: Line 70:


{{Arch Tools navi{{#translation:}}}}
{{Arch Tools navi{{#translation:}}}}

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

Latest revision as of 12:00, 19 May 2023

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)