Arch Survey: Difference between revisions

From FreeCAD Documentation
No edit summary
m (add Macro_SimpleProperties)
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>
<!--T:15-->
{{docnav|[[Arch_Remove|Remove component]]|[[Arch_Component|Component]]|[[Arch_Module|Arch]]|IconL=Arch_Remove.svg |IconC=Workbench_Arch.svg |IconR=Arch_Component.svg}}

<!--T:1-->
<!--T:1-->
{{GuiCommand
{{GuiCommand|Name=Arch Survey|Workbenches=[[Arch Module|Arch]]|MenuLocation=Arch → Survey|SeeAlso=[[Macro FCInfo|FCInfo (macro)]]}}
|Name=Arch Survey
|MenuLocation=Arch → Survey
|Workbenches=[[Arch Module|Arch]]
|SeeAlso=[[File:FCInfo.png|FCInfo|24px]] [[Macro FCInfo|FCInfo (macro)]]<br />[[Macro_SimpleProperties|Macro SimpleProperties (macro)]]
}}


==Description== <!--T:2-->
==Description== <!--T:2-->
Line 30: Line 38:


<!--T:7-->
<!--T:7-->
The above image shows what happens when running the survey mode.
''The above image shows what happens when running the survey mode.''


==How to use== <!--T:8-->
==How to use== <!--T:8-->


<!--T:9-->
<!--T:9-->
# Press the {{KEY|[[Image:Arch Survey.png|16px]] [[Arch Survey]]}} button
# Press the {{Button|[[Image:Arch Survey.svg|16px]] [[Arch Survey]]}} button.
# Click on vertices, edges, faces or double-click to select whole objects
# Click on vertices, edges, faces or double-click to select whole objects.
# Click outside any geometry (on the background of the 3D view) to remove existing labels, print a total line in the Task dialog, and restart counting lengths and areas from zero
# Click outside any geometry (on the background of the 3D view) to remove existing labels, print a total line in the Task dialog, and restart counting lengths and areas from zero.
# Press {{KEY|ESC}} or the {{KEY|'''Close'''}} button to exit survey mode and remove all the labels.
# Press {{KEY|Esc}} or the {{Button|Close}} button to exit survey mode and remove all the labels.


==Options== <!--T:12-->
==Options== <!--T:12-->
Line 51: Line 59:


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


<!--T:11-->
<!--T:11-->
The Survey mode cannot be used directly from python scripts, but gathering the same information from any selected [[Part Module|Part]]-based object is easy reproduced with the following script:
The Survey tool doesn't have a programming interface, but gathering but gathering the same information from any selected [[Part Module|Part]]-based object is reproduced with the following script:
</translate>
</translate>
{{Code|code=
{{Code|code=
import FreeCADGui
import FreeCADGui

selection = FreeCADGui.Selection.getSelectionEx()
selection = FreeCADGui.Selection.getSelectionEx()

for obj in selection:
for obj in selection:
for element in obj.SubObjects:
for element in obj.SubObjects:
print "Area: ", element.Area
print("Area: %f", element.Area)
print "Length: ", element.Length
print("Length: %f", element.Length)
print "Volume: ", element.Volume
print("Volume: %f", element.Volume)
print "Center of Mass: ", element.CenterOfMass
print("Center of Mass: %f", element.CenterOfMass)
}}
}}
<translate>
<!--T:16-->
{{docnav|[[Arch_Remove|Remove component]]|[[Arch_Component|Component]]|[[Arch_Module|Arch]]|IconL=Arch_Remove.svg |IconC=Workbench_Arch.svg |IconR=Arch_Component.svg}}

<!--T:17-->
{{Arch Tools navi}}

<!--T:18-->
{{Userdocnavi}}
</translate>

Revision as of 16:16, 15 June 2019

Arch Survey

Menu location
Arch → Survey
Workbenches
Arch
Default shortcut
None
Introduced in version
-
See also
FCInfo FCInfo (macro)
Macro SimpleProperties (macro)

Description

The survey tool enters a special surveying mode, which allows you to quickly grab measures and information from a model, and transfer that information to other applications. Once you are in Survey mode, clicking on different subelements of 3D objects gathers the following information, depending on what you click:

  • If you click on an edge, you get its length
  • If you click on a vertex, you get its height (coordinate on the Z axis)
  • If you click on a face, you get its area
  • If you double-click anything, therefore select the whole object, you get its volume

When such a piece of information is gathered, several things happen:

  • A label is placed on top of the element you clicked, that displays the value (with "a" for area, "l" for length, "z" for height, or "v" for volume)
  • The numeric value is copied to the clipboard, so you can paste it in another application
  • A line is printed on the FreeCAD output window. After you exit the survey mode, those lines can be copied and pasted in another application (the values are comma-separated, making it easy to convert to spreadsheet data)
  • The total length or area of the elements you clicked so far is also printed in the output window
  • Each length or area is also recorded in the task dialog

The above image shows what happens when running the survey mode.

How to use

  1. Press the Arch Survey button.
  2. Click on vertices, edges, faces or double-click to select whole objects.
  3. Click outside any geometry (on the background of the 3D view) to remove existing labels, print a total line in the Task dialog, and restart counting lengths and areas from zero.
  4. Press Esc or the Close button to exit survey mode and remove all the labels.

Options

  • You can add a custom label to any line in the Task dialog by clicking that line, then adding a text in the description field, then press the set description button.
  • Once you are done, before closing, you can export the contents of the Task dialog by pressing the "export CSV" button. The resulting CSV file can then be opened in any spreadsheet application such as Excel or LibreOffice Calc. The values and units will be separated in the resulting CSV file, and the totals are written as SUM() functions.

Scripting

See also: Arch API and FreeCAD Scripting Basics.

The Survey tool doesn't have a programming interface, but gathering but gathering the same information from any selected Part-based object is reproduced with the following script:

import FreeCADGui

selection = FreeCADGui.Selection.getSelectionEx()

for obj in selection:
    for element in obj.SubObjects:
        print("Area: %f", element.Area)
        print("Length: %f", element.Length)
        print("Volume: %f", element.Volume)
        print("Center of Mass: %f", element.CenterOfMass)