Arch Check: Difference between revisions

From FreeCAD Documentation
(Marked this version for translation)
No edit summary
(25 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<translate>

<!--T:10-->
{{docnav
|[[Arch_MergeWalls|Merge Walls]]
|[[Arch_IfcExplorer|Ifc Explorer]]
|[[Arch_Module|Arch]]|IconL=Arch_MergeWalls.svg
|IconC=Workbench_Arch.svg
|IconR=Arch_IfcExplorer.png
}}

<!--T:1-->
<!--T:1-->
{{GuiCommand
{{GuiCommand|Name=Arch Check|Workbenches=[[Arch Module|Arch]]|MenuLocation=Arch -> Calculation Tools -> Check|SeeAlso=[[Arch CloseHoles]]}}
|Name=Arch Check
|Workbenches=[[Arch Module|Arch]]
|MenuLocation=Arch → Utilities → Check
|SeeAlso=[[Arch CloseHoles|Arch CloseHoles]]
}}


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


<!--T:3-->
<!--T:3-->
This tool checks the current document or the selected objects for non-solid [[Part Module|Part]] or [[Arch Module|Arch]] objects, that might give problems, since most operations of the Arch module require solid objects.
This tool checks the current document or the selected objects for non-solid {{KEY|[[Image: Workbench_Part.svg|16px]] [[Part Module|Part]]}} or {{KEY|[[Image: Workbench_Arch.svg|16px]] [[Arch Module|Arch]]}} objects, that might give problems, since most operations of the Arch module require solid objects.


==How to use== <!--T:4-->
==Usage== <!--T:4-->


<!--T:5-->
<!--T:5-->
# Press the {{KEY|[[Image:Arch Check.png|16px]] '''Check'''}} entry in Arch -> Calculation Tools menu
# Press the {{Button|[[Image:Arch Check.svg|16px]] [[Arch Check|Check]]}} button, or {{KEY|Arch}} {{KEY|Utilities}} {{KEY|[[Image:Arch Check.svg|16px]] [[Arch Check|Check]]}} in the top menu.


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


<!--T:7-->
<!--T:7-->
This tool can by used in [[macros]] and from the 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:
</translate>
</translate>
{{Code|code=
<syntaxhighlight>
check (objectslist,includehidden=False)
list_bad = check(objectslist, includehidden=False)
}}
</syntaxhighlight>

<translate>
<translate>

<!--T:8-->
<!--T:8-->
checks if the given objects contain only solids
* Checks if the given objects in {{incode|objectslist}} contain only solids.
* If {{incode|includehidden}} is {{incode|True}} it will include all hidden objects, otherwise it will omit them from the search.
* Returns {{incode|list_bad}}, a list with the objects that are not derived from a {{incode|Part::Feature}}, or components that are not closed, not valid, don't contain solids, or that contain faces that are not part of any solid. This is used to detect [[Arch Workbench|Arch]] or [[Draft Workbench|Draft]] wires and profiles that aren't solids.
** Each element in {{incode|list_bad}} is another list {{incode|[object, message]}}, where {{incode|object}} is the detected non-solid, and {{incode|message}} indicates the reason why it was included in this list.

<!--T:11-->
Example:

</translate>
</translate>
{{Code|code=
<languages/>
import FreeCAD, Draft, Arch

p1 = FreeCAD.Vector(0, 0, 0)
p2 = FreeCAD.Vector(2000, 0, 0)
baseline = Draft.makeLine(p1, p2)
Wall1 = Arch.makeWall(baseline, length=None, width=150, height=2000)
FreeCAD.ActiveDocument.recompute()

Wall2 = Arch.makeWall(None, length=2000, width=200, height=1000)
FreeCAD.ActiveDocument.recompute()

Circle = Draft.makeCircle(450)
Wire = Draft.makeWire([FreeCAD.Vector(1000, 0, 0), FreeCAD.Vector(1500, 1000, 0), FreeCAD.Vector(2500, -1000, 0)])

list_bad = Arch.check([Wall1, Wall2, Circle, Wire], includehidden=True)
print(list_bad)
}}
<translate>

<!--T:16-->
{{docnav
|[[Arch_MergeWalls|Merge Walls]]
|[[Arch_IfcExplorer|Ifc Explorer]]
|[[Arch_Module|Arch]]|IconL=Arch_MergeWalls.svg
|IconC=Workbench_Arch.svg
|IconR=Arch_IfcExplorer.png
}}

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

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

Revision as of 18:20, 19 February 2020

Arch Check

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

Description

This tool checks the current document or the selected objects for non-solid Part or Arch objects, that might give problems, since most operations of the Arch module require solid objects.

Usage

  1. Press the Check button, or ArchUtilities Check in the top menu.

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:

list_bad = check(objectslist, includehidden=False)
  • Checks if the given objects in objectslist contain only solids.
  • If includehidden is True it will include all hidden objects, otherwise it will omit them from the search.
  • Returns list_bad, a list with the objects that are not derived from a Part::Feature, or components that are not closed, not valid, don't contain solids, or that contain faces that are not part of any solid. This is used to detect Arch or Draft wires and profiles that aren't solids.
    • Each element in list_bad is another list [object, message], where object is the detected non-solid, and message indicates the reason why it was included in this list.

Example:

import FreeCAD, Draft, Arch

p1 = FreeCAD.Vector(0, 0, 0)
p2 = FreeCAD.Vector(2000, 0, 0)
baseline = Draft.makeLine(p1, p2)
Wall1 = Arch.makeWall(baseline, length=None, width=150, height=2000)
FreeCAD.ActiveDocument.recompute()

Wall2 = Arch.makeWall(None, length=2000, width=200, height=1000)
FreeCAD.ActiveDocument.recompute()

Circle = Draft.makeCircle(450)
Wire = Draft.makeWire([FreeCAD.Vector(1000, 0, 0), FreeCAD.Vector(1500, 1000, 0), FreeCAD.Vector(2500, -1000, 0)])

list_bad = Arch.check([Wall1, Wall2, Circle, Wire], includehidden=True)
print(list_bad)