Arch Survey: Difference between revisions

From FreeCAD Documentation
m (minor)
m (code)
Line 41: Line 41:
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 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:
</translate>
</translate>
{{Code|code=
<syntaxhighlight>
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: ", element.Area
print "Length: ", element.Length
print "Length: ", element.Length
print "Volume: ", element.Volume
print "Volume: ", element.Volume
print "Center of Mass: ", element.CenterOfMass
print "Center of Mass: ", element.CenterOfMass
}}
</syntaxhighlight>


<languages/>
<languages/>

Revision as of 13:08, 30 December 2014

Arch Survey

Menu location
Arch -> Survey
Workbenches
Arch
Default shortcut
None
Introduced in version
-
See also
FCInfo (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, three 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 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. Press ESC or the Cancel button to exit survey mode and remove all the labels.

Scripting

The Survey mode cannot be used directly from python scripts, but gathering the same information from any selected Part-based object is easy reproduced with the following script:

import FreeCADGui
selection = FreeCADGui.Selection.getSelectionEx()
for obj in selection:
   for element in obj.SubObjects:
       print "Area: ", element.Area
       print "Length: ", element.Length
       print "Volume: ", element.Volume
       print "Center of Mass: ", element.CenterOfMass