Macro FCInfo/cs: Difference between revisions

From FreeCAD Documentation
(Created page with "'''Sector 5: Inclination''' * Záhyby objektu lze zobrazit v: * '''desetinné stupně''', např .: 174.831872611 ° * '''stupeň minuty seconde' '', např .: <nowiki> 174 ° 4...")
(Created page with "'''Sector 6: Surface and Volume''' * Povrch zobrazené velikosti jednotky může být vybrán * Může být vybrán povrch zobrazené velikosti obličeje * Může být vybrán...")
Line 57: Line 57:


'''Sector 6: Surface and Volume'''
'''Sector 6: Surface and Volume'''
* Povrch zobrazené velikosti jednotky může být vybrán
*Surface of the form displayed unit size can be selected
* Může být vybrán povrch zobrazené velikosti obličeje
*Surface of the face displayed unit size can be selected
* Může být vybrána hlasitost zobrazené velikosti jednotky
*Volume of the form displayed unit size can be selected
*density of the material in '''kg by dm3'''<br />(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 204)
* hustota materiálu v '''kg dm3''' <br /> ("spinBox" je nastaven na '''7,5 '''kg, průměrná hustota oceli.Pokud chcete jinou výchozí hodnotu , změňte hodnotu hustoty, řádek 204)
*The {{KEY|gram}} buttom unit mass can be chosen :<br /> ton,quintal, kg, hg, dag, '''gram''', dg, cg, mg, µg, ng, pg, fg, gr (grain), dr (drachm), oz (once), oz t (once troy),<br />lb t (livre troy), lb (livre av), st (stone), qtr (quarter), cwt (hundredweight), tonneau fr, ct
* Hmotnost {{KEY|gram}} buttom jednotky může být vybrána: <br /> t, quintal, kg, hg, dag, '''gram''', dg, cg, fg, gr (obilí), dr (drachm), oz (jednou), oz t (troy trojúhelník), lb (livre troy), lb (livre av) , cwt (sto váha), tonneau fr, ct
* může být vybrána váha zobrazené jednotky
*weight of the form displayed unit mass can be selected


'''Sector 7: BoundBox'''
'''Sector 7: BoundBox'''

Revision as of 10:22, 18 December 2018

FCInfo

Popis
Dává řadu informací o tvaru.

Version macro : 01.16
Date last modification : 2017-06-21
Autor: Mario52
Autor
Mario52
Download
None
Odkazy
Verze
01.16
Datum poslední úpravy
2017-06-21
Verze FreeCAD
None
Výchozí zástupce
None
Viz též
None

Popis

Dává řadu informací o vybraném tvaru a může zobrazit konverzi délky, sklonu (stupně, radiány, procenta) tělesa, povrchu, objemu a váhy tvaru s měrnou hmotností vybranou v různých jednotkách hmotnosti mezinárodních i Anglo-Saských.

Temporary code for external macro link. Do not use this code. This code is used exclusively by Addon Manager. Link for optional manual installation: Macro


# This code is copied instead of the original macro code
# to guide the user to the online download page.
# Use it if the code of the macro is larger than 64 KB and cannot be included in the wiki
# or if the RAW code URL is somewhere else in the wiki.

from PySide import QtGui, QtCore

diag = QtGui.QMessageBox(QtGui.QMessageBox.Information,
    "Information",
    "This macro must be downloaded from this link\n"
    "\n"
    "https://gist.githubusercontent.com/mario52a/8d40ab6c018c2bde678f/raw/e16ad9ea7b38c0c47e42aa3019be01dd1267a620/FCInfo_en_Ver_1-20_Docked.FCMacro" + "\n"
    "\n"
    "Quit this window to access the download page")

diag.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
diag.setWindowModality(QtCore.Qt.ApplicationModal)
diag.exec_()

import webbrowser 
webbrowser.open("https://gist.githubusercontent.com/mario52a/8d40ab6c018c2bde678f/raw/e16ad9ea7b38c0c47e42aa3019be01dd1267a620/FCInfo_en_Ver_1-20_Docked.FCMacro")


FCInfo

Použití

Vyberete objekt nebo spustíte aplikaci a vyberete objekt a zobrazí se řada informací. Jeho výpočty založené na jednotce FreeCADu, což je mm pro kažbý nový výběr, vrací vždy délku v mm a úhel v dekadických stupních.

upper window
upper window

lower window

Sector 1: Document

  • Název dokumentu
  • Označení objektu
  • Interní název objektu
  • Název dílčího objektu
  • Typ objektu

Sector 2: Coordinates click mouse

  • Souřadnice X, Y a Z kliknutím myší
  • Tlačítko vytváří na bodové, osové, rovinné, kopírovací vektorové formě osy 'FreeCAD.Vector (-24.0, 240.0, 7.0)'

Sector 3: Value

  • Délka objektu, je-li objekt obrys obličeje, zobrazí se velikost jednotky:
    km, hm, přehrada, m, dm, cm, 'mm' , μm, fm, palec, propojení, noha, yard, bidélko, řetěz, furlong, míle, ligy, námořní. Je-li objekt kružnicí o jednu sekundu, zobrazí se políčkoEdit a zobrazí poloměr kružnice.
  • Obvod tvaru

Sector 4: Vertexes and details

  • CheckBox pro vyhledávání nebo ne všechny detaily objektu, pokud není zaškrtnuto pouze hlavní hodnota jsou zobrazeny.
  • Vertexy a detaily tvaru (compt_Edge), (compt_Faces), (compt_Vector of Face)
    max 200 řádků v tabulce, pokud je více než 200 řádků se objeví (! + 200) a počet linky
    (všechny podrobnosti mohou uložit tlačítko Save ve formátu CSV a soubor v tabulce lze zobrazit pomocí Read nebo externí tabulky jakoLibreOffice OpenOffice or other)

Sector 5: Inclination

  • Záhyby objektu lze zobrazit v:
  • desetinné stupně, např .: 174.831872611 °
  • 'stupeň minuty seconde' , např .: 174 ° 49 '54.741401' '</ nowiki> * '''radian''', např .: 3.05139181449 rad * '''stupeň''', např .: 194.257636235 gon * '''pourcent''' ex: 30 ° = 57,74% * Záhyby v rovinách XY, YZ, ZX a jejich souřadnicích * '''Direction object''', udává směr objektu vypočítá se: coord_1 - coord_2 = směr (nebo reverzní) ** {{KEY|Line}} toto tlačítko vytvoří přímku ve směru objektu * '''ValueAt''' vrací 3D vektor odpovídající hodnotě parametru. '''Sector 6: Surface and Volume''' * Povrch zobrazené velikosti jednotky může být vybrán * Může být vybrán povrch zobrazené velikosti obličeje * Může být vybrána hlasitost zobrazené velikosti jednotky * hustota materiálu v '''kg dm3''' <br /> ("spinBox" je nastaven na '''7,5 '''kg, průměrná hustota oceli.Pokud chcete jinou výchozí hodnotu , změňte hodnotu hustoty, řádek 204) * Hmotnost {{KEY|gram}} buttom jednotky může být vybrána: <br /> t, quintal, kg, hg, dag, '''gram''', dg, cg, fg, gr (obilí), dr (drachm), oz (jednou), oz t (troy trojúhelník), lb (livre troy), lb (livre av) , cwt (sto váha), tonneau fr, ct * může být vybrána váha zobrazené jednotky '''Sector 7: BoundBox''' *BoundBox extreme dimensions of the shape '''Sector 8: Center of:''' *Center of the shape and these coordinates XYZ *Center of mass and these coordinates XYZ *The button create on point, axis, plane, copy vector axis form '''FreeCAD.Vector(-24.0, 240.0, 7.0)''' '''Sector 9: Inertia''' *Moment of inertia and these coordinates length and weigth *The button create on point, axis, plane, copy vector axis form '''FreeCAD.Vector(-24.0, 240.0, 7.0)''' **action line 1 : x1, y1, z1 ** action line 2 : x2, y2, z2 ** action line 3 : x3, y3, z3 ** action 4 diagonal : x1, y2, z3 same for length and weigth *Determinant 1  : computes the determinant of the matrix scientific value *Determinant 2  : computes the determinant of the matrix decimal value '''Section 10: SpreadSheet''' *{{KEY|Read}} : read the data in a spreadsheet saved '''.FCInfo''' or txt, asc, csv *{{KEY|Save}} : save the data in disk in the form selected below '''.FCInfo''' or txt, asc, csv *{{KEY|Tabulation}} : the separator is Tabulation *{{KEY|Comma}} : the separator is Comma *{{KEY|Semicolon}} : the separator is Semicolon *{{KEY|Space}} : the separator is Space Option for save or read the spreadSheet with different separator, Tabulation, Comma, Semicolon, Space<br /> The Tabulation are the separator for the FreeCAD spreadSheet module<br /> The number of this four separator are calculate for help if unknown<br /> The COMMA are the old (01.16 and before) separator of the FCInfo macro<br /> Now for compatibility with the FreeCAD spreadSheet and since 01.17 version the TABULATION is the separator by default<br /> If you want to convert your old FCInfo spreadsheet : Open it in FCInfo and save it with the Tabulation option checked '''Section 11: Main''' *{{KEY|CheckBox Clip Board}}  : if checked the coordinates are saved in clipBoard form : '''FreeCAD.Vector(-24.0, 240.0, 7.0)''' *{{KEY|CheckBox Point}}  : if checked one point is created in the coordinate displayed form : '''FreeCAD.Vector(-24.0, 240.0, 7.0)''' *{{KEY|CheckBox Axis }}  : if checked one axis is created in the coordinate displayed form : '''FreeCAD.Vector(-24.0, 240.0, 7.0)''' *{{KEY|CheckBox Plane}}  : if checked one axis plane is created in the coordinate displayed form : '''FreeCAD.Vector(-24.0, 240.0, 7.0)''' *{{KEY|Ref}}  : Refresh the display of data in report view *{{KEY|Exit}} : Exit the macro (you must restart from the tool bar button or menu "View > Panels > FCInfo" *{{KEY|CheckBox}} '''1'''  : If this CheckBox is checked the informations are displayed in the report view window *{{KEY|CheckBox}} '''2'''  : If this CheckBox is not checked the window macro are displayed to right (default). If it is checked the window macro are displayed to left Once launched macro, the macro remains active and the window remains visible. To exit the macro by pressing {{KEY|Exit}}. If you leave by the cross, the macro remains in memory and the data appears in the "report view" of FreeCAD. <center> <gallery widths="400" heights="200"> Image:Macro_FCInfo_04.png|Docked to rigth, Image:Macro FCInfo 05.png|or left with Combo view and reachable by a tab, or not docked to the choice. </gallery> </center> {{clear}} <div class="mw-translate-fuzzy"> ===Volby=== ====Použité jednotky==== =====Délková jednotka:===== km, hm, dam, m, dm, cm, '''mm''', µm, nm, pm, fm, inch(palec), link, foot(stopa), yard, perch, chain, furlong, mile, league, nautique. </div> <div class="mw-translate-fuzzy"> =====Úhlové stupně :===== #'''dekadické stupně''', např: 174.831872611° #stupně minuty vteřiny, např.:<nowiki> 174° 49' 54.741401''
  1. radiány, např.: 3.05139181449 rad
  2. grade, např.: 194.257636235 gon
  3. procenta např.: 30° = 57.74%

Pochopení úhlů v zobrazení FCInfo.


Váhové jednotky :

ton, quintal, kg, hg, dag, gram, dg, cg, mg, µg, ng, pg, 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
"spinBox" je nastaven na 7,5 kg, tj. průměrná měrná hmotnost oceli. Chcete-li jinou defaultní (přednastavenou) hodnotu, změňte hodnotu měrné hmotnosti na řádku 182

global densite       ; densite       = 7.5  # (steel = 7.5 kg par dm3)

Soubor můůže být vytvořen tlačítkem Save. Takto je vytvořen soubor jako .csv soubor, data mohou být prohlížena v tabulkovém editoru ve FreeCADu nebo Openoffice, LibreOffice...

Skript

Zkopírujte obsah tohoto makra do souboru nazvaného "FCInfo.FCMacro" (ve Windowsech) do "C:\Program Files\FreeCAD0.13".
Nebo přímo do okna FreeCADu
Ikona musí být ve stejném adresáři jako je makro pro Windows "C:\Program Files\FreeCAD0.13".
Stáhněte umístění obrázků u ikon a pravým tlačítkem je "Uložte jako" (neměňte jméno) (originál - 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 is also FCInfo_Alternate_Linux for only for FreeCAD version 0.13... and PyQt4

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 :

global uniteSs       ; uniteSs       = u"mm²"
global uniteVs       ; uniteVs       = u"mm³"
global uniteAs       ; uniteAs       = u"°"

remplacés par

global uniteSs       ; uniteSs       = "mm"+iso8859(unichr(178))
global uniteVs       ; uniteVs       = "mm"+iso8859(unichr(179))
global uniteAs       ; uniteAs       = iso8859(unichr(176))

Files saved with this version is incompatible with the other version (docked or not)


Download the icon file Macro_FCInfo_Icon unzip and copy the icon in the same directory of the macro

Dwnload the macro file on gist docked to right


(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

Omezení

Pro ukončení vždy používejte tlačítko Exit. Ukončení jiným způsobem zapříčiní, že program zůstane v paměti a běží a zobrazuje data v "reportovacím pohledu". Abyste uvolnili pamět, musíte ukončit celý FreeCAD.
V tabulce je viditelných pouze prvních 200 prvků objektu. Je-li jich v objektu více zobrazí se upozornění "'(! +200)" '. Kompletní seznam dat je viditelný v souboru uloženém pomocí tlačítka Save.

If the window macro is invisible after the run , see the bottom window :


project:
read the file directly in a table. done
matches the "Edges" and their coordinates done
Association of a substance to its density
inclination on the element rather than the global object done
inlay right in the interface of FreeCAD done

currently:

  • ver 1.20 , 29/01/2018 optimization
  • ver 1.19 , 20/01/2018 create checkBox for use detection all elements of the object if wanted or not , the macro is faster. Optimisation
  • ver 1.18 , 19/12/2017 ...
  • ver 1.17c , 14/12/2017 create plane with coordinate give in one project in other project and replace "FCInfo" by "__title__"
  • ver 1.17b , 13/12/2017 little correction replace FCTreeView to FCInfo
  • ver 1.17 , 12/12/2017 add upgrade Moment of inertia mm and kg by pinq FCMacro and moment of inertia of assembly, and create plane, axis, point, and add options separator for spreadsheet
  • ver 1.16 , 21/06/2017 add control height police (here PointSize 8) and checkbox for position the window to right or left
  • ver 1.15 , 19/12/2015 suppression PyQt4 option see , add checkBox for editing infos in report view
  • 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

SeeAlso Arch Survey Arch Survey

You can share your comments on the forum Info Workbench - Help with icons please.
Here another post of FCInfo Macro