Macro FCInfo/it

Fornisce una ampia serie di informazioni sulla forma selezionata quali lunghezza, angoli, superficie, inclinazione, volume e peso secondo la densità della forma selezionata, sia nelle unità del Sistema Internazionale che in quelle del Sistema Anglosassone.



Utilizzo
Selezionare un oggetto e avviare l'applicazione o viceversa. Viene visualizzata la tabella delle informazioni. I calcoli sono basati sull'unità di FreeCAD, che è il mm. Ogni nuova selezione ripristina il mm per l'unità di lunghezza e i gradi sessadecimali (°) per gli angoli.

Sector 1 Sector 2 Sector 3 km, hm, dam, m, dm, cm, mm, µm, nm, pm, fm, inch, link, foot, yard, perch, chain, furlong, mile, league, nautique. Sector 4 max 200 lines in the table, if there are more than 200 lines it appears (!+ 200) and the number of lines (full details can save be the button in a file in CSV format and can be viewed the file in spreadsheet with the  or by an external spreadsheet as LibreOffice OpenOffice or other) Sector 5 Sector 6 Sector 7 ton,quintal, kg, hg, dag, gram, dg, cg, mg, µg, ng, pg, fg, gr (grain), dr (drachm), oz (once), oz t (once troy), lb t (livre troy), lb (livre av), st (stone), qtr (quarter), cwt (hundredweight), tonneau fr, ct (the "spinBox" is set to 7,5 kg, average density of steel. If you want a different default value, change the value of the density, line 206) Sector 8 Sector 9 Buttoms
 * Document name
 * Label of the object
 * Internal Name of the object
 * Sub element name of the object
 * Type of the object
 * Coordinates X,Y and Z click to mouse
 * Length of the object if the object is a face perimeter is displayed unit size can be selected :
 * Perimeter of the shape
 * Vertexes and details of the shape (compt_Edge), (compt_Faces), (compt_Vector of the Face)
 * Inclinations of the object can be displayed in:
 * decimal degree, ex: 174.831872611°
 * degree minute seconde, ex: 174° 49' 54.741401''
 * radian, ex: 3.05139181449 rad
 * grade, ex: 194.257636235 gon
 * pourcent ex: 30° = 57.74%
 * Inclinations in planes XY, YZ, ZX and their coordinates
 * Surface of the form displayed unit size can be selected
 * Surface of the face displayed unit size can be selected
 * Volume of the form displayed unit size can be selected
 * The buttom unit mass can be chosen :
 * weight of the form displayed unit mass can be selected
 * density of the material in kg by dm3
 * Center of the shape and these coordinates XYZ
 * Center of mass and these coordinates XYZ
 * BoundBox extreme dimensions of the shape
 * Moment of inertia and these coordinates
 * : Open a file .FCInfo
 * : Save a file .FCInfo
 * : Exit the macro and delete it from memory
 * : Refresh the display of data in report view

Once launched macro, the macro remains active and the window remains visible. To exit the macro by pressing. If you leave by the cross, the macro remains in memory and the data appears in the "report view" of FreeCAD.

Lunghezza :
km, hm, dam, m, dm, cm, mm, µm, nm, pm, fm, inch, link, foot, yard, perch, chain, furlong, mile, league, nautique.

Angoli:

 * 1) gradi sessadecimali, esempio: 174.831872611°
 * 2) sessagesimali gradi primi secondi, es: 174° 49' 54.741401''
 * 3) radianti, es: 3.05139181449 rad
 * 4) centesimali, es: 194.257636235 gon
 * 5) pendenza %, es: 30° = 57.74%

Visualizzazione degli angoli in FCInfo.

Weight unit :
ton, quintal, kg, hg, dag, gram, dg, cg, mg, µg, ng, pg, fg, gr (grain), dr (drachm), oz (once), oz t (once troy),

lb t (livre troy), lb (livre av), st (stone), qtr (quarter), cwt (hundredweight), tonneau fr, ct

the "spinBox" is set to 7,5 kg, average density of steel. If you want a different default value, change the value of the density, line 206

Tramite il pulsante è possibile archiviare i dati ottenuti in un file di tipo csv e utilizzarli in una tabella dentro FreeCAD o OpenOffice, LibreOffice ...

Script
Copy the contents of the macro in a file named "FCInfo.FCMacro" (for Windows) in "C:\Program Files\your version".

Or, directly in the interface of FreeCAD

The icon must be in the same directory as the macro for Windows "C:\Program Files\FreeCAD0.13".

Download image positioning on the icon   and then drag the mouse right click "save as" (do not change the name)

PS: too long to be contained in the wiki page (for the time being the wiki pages accept only 64 KB) the macro code has been placed in the forum

There are two versions available, they are identical but one is docked and the other is not docked in the case of a malfunction of the docked version.

There is also a Macro_FCInfo_Alternate_Linux here the code is changed (due to the character display error : ² ³ ° μ ordinal not in range (128)") which posed problems in certain configurations the functions are the same

Example : remplacés par Files saved with this version is incompatible with the other version (docked or not)

(PS: this is a false zip to clear the ".zip" extension that is there than to allow attachment to the forum)

Dwnload the file docked to right FCInfo_en_Ver_1-14_Docked.FCMacro.zip. PyQt4 and PySide

Dwnload the file not docked FCInfo_en_Ver_1-12_No_Docked.FCMacro.zip.

(Or On the forum. )

PS: this macro uses getSelection and the list of object begin to 1 ex: for a box Edge1 to Edge12 and the code in the console start at 0 ex: for a box Edge[0] to Edge[11]

This is normal the counting on arrays/lists inside OpenCascade always starts at 1 and not at 0

Limitazioni
Uscire sempre dalla macro tramite il pulsante, altrimenti il programma rimane in memoria e continua a funzionare fino a quando non si chiude FreeCAD.

La tabella riporta solo i primi 200 elementi dell'oggetto, quando l'oggetto contiene più di 200 elementi viene visualizzato l'avviso (! +200). In questo caso, l'elenco completo dei dati è visibile nel file csv che può essere creato e salvato cliccando sul pulsante.

Questo programma è stato creato con Windows Vista e, per il momento, "class SelObserver:" non funziona allo stesso modo dentro Linux. In Linux è necessario selezionare prima l'oggetto e poi lanciare il programma.

In progetto :

leggere i dati direttamente in una tabella. fatto

mappare dgli spigoli ("Edges") e le loro coordinate fatto

associare una sostanza alla sua massa volumica

angoli di inclinazione riferiti all'elemento piuttosto che all'oggetto globale fatto

alloggiamento a destra nell'interfaccia di FreeCAD fatto

currently:

ver 1.14, 04/08/2014 replace PyQt4 and PySide and correct tooltip not displayed cause on PySide and add fg

ver 1.13, 27/07/2014 replace FCInfo_en_Ver_1-12_Docked.FCMacro to FCInfo_en_Ver_1-13_Docked.FCMacro accept PyQt4 and PySide

ver 1.12, 10/03/2014 adding tooltip

ver 1.11, 04/03/2014 adding µm, nm, pm, fm, µg, ng, pg, pourcent, fixed of grandeur carat "cd" in "ct", display of the label and internal name, fixed calculation of angles XY YZ ZX could give an error on a compound shape,  window dockable in FreeCAD

ver 1.10.b, 19/11/2013 buttons outside the scrollbar and the dimensions of the window blocking

(ver 1.10, 18/11/2013 create scrollbar)

ver 1.08.b, 10/11/2013 translation units in English, error correction to display the area of the faces listed in the table and replacement of the"print" by "App.Console.PrintMessage"

ver 1.09, 04/11/2013 works perfectly on Windows and Linux (cause of errors on Linux the characters : ² ³ ° "ordinal not in range(128)")

In a Linux distribution and in the case of an error of "ordinal not in range (128)" an alternative version exists on this page Macro_FCInfo_Alternate_Linux

ver 1.08, 24/10/2013 correction of high top "Faces" and "Edges" displaying 100 objects (in the saved file)

ver 1.07, 11/10/2013 matches the "Faces" and their coordinates.

ver 1.06, 22/09/2013 matches the "Edges" and their coordinates, inclination on the element rather than the global object

ver 1.05, 17/09/2013 added an icon for the spreadsheet, conversion barrel fr, affichage des dimensions overall instead of coordinates.

ver 1.04, 11/09/2013: read the file directly in a table.

ver 1.03, 09/09/2013: clearer display in view report and replacement by "typeObject = sel[0].Shape.ShapeType"

ver 1.02, 7/09/2013 : small updates

ver 1.00, 6/09/2013

Links
Si può commentare questa macro nel forum Info Workbench - Help with icons please.

Qui uno altro post ché parla di FCInfo Macro