Macro FCInfo/sv: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>

<div class="mw-translate-fuzzy">
{{Macro/sv
|Name=Macro FCInfo
|Icon=FCInfo.png
|Translate=Macro FCInfo
|Description=Beskrivning = Ger en serie information på formuläret.
|Author=Mario52
|Version=1.22
|Date=2020/11/12
|FCVersion=All
|Download=Download the [https://forum.freecadweb.org/download/file.php?id=50755 Macro_FCInfo_Icon] package and paste it in the same directory of the macro
|SeeAlso=[[File:Arch Survey.svg|Arch Survey|24px]] [[Arch_Survey/sv|Arch Survey]]<br />[[Macro_SimpleProperties/sv|Macro SimpleProperties]]
}}
</div>


{{Macro
{{Macro
Line 20: Line 5:
|Icon=FCInfo.png
|Icon=FCInfo.png
|Description=Gives information about the selected shape and can display a conversion of length, inclination (degrees, radians, grades, percent), area, volume and weight in different units (metric and imperial). The macro now also works for the elements of a sketch in edit mode.
|Description=Gives information about the selected shape and can display a conversion of length, inclination (degrees, radians, grades, percent), area, volume and weight in different units (metric and imperial). The macro now also works for the elements of a sketch in edit mode.
<br />French Version [https://gist.githubusercontent.com/mario52a/6afc64081c4eb8be3b93/raw/795cac01c84fbbfa7ea68703c7138667119995d8/FCInfo_fr_Ver_1-26c-rmu_Docked.FCMacro Version française]
<br />French Version [https://gist.githubusercontent.com/mario52a/6afc64081c4eb8be3b93/raw/ddfd2254616b8f3127e0d930abe0b322fa99ee6a/FCInfo_fr_Ver_1-27-rmu_Docked.FCMacro Version française]
|Author=Mario52
|Author=Mario52
|Version=1.26c
|Version=1.27
|Date=2022/04/19
|Date=2023/06/30
|FCVersion=All
|FCVersion=All
|SeeAlso=[[File:Arch Survey.svg|Arch Survey|24px]] [[Arch_Survey|Arch Survey]]<br /> [[File:Macro_SimpleProperties.png|Macro_SimpleProperties|24px]] [[Macro_SimpleProperties|Macro SimpleProperties]]<br /> [[File:Macro_FCInfoGlass.png|24px]] [[Macro_FCInfoGlass|Macro FCInfoGlass]]
|SeeAlso=[[File:Arch Survey.svg|Arch Survey|24px]] [[Arch_Survey|Arch Survey]]<br /> [[File:Macro_SimpleProperties.png|Macro_SimpleProperties|24px]] [[Macro_SimpleProperties|Macro SimpleProperties]]<br /> [[File:Macro_FCInfoGlass.png|24px]] [[Macro_FCInfoGlass|Macro FCInfoGlass]]
Line 35: Line 20:
</div>
</div>


{{Codeextralink|https://gist.githubusercontent.com/mario52a/8d40ab6c018c2bde678f/raw/5577cf1a8818a4cbc5790cce335df158713b5841/FCInfo_en_Ver_1-26c-rmu_Docked.FCMacro}}
{{Codeextralink|https://gist.githubusercontent.com/mario52a/8d40ab6c018c2bde678f/raw/93362d69fe505714b80655756b2a3ba752767975/FCInfo_en_Ver_1-27-rmu_Docked.FCMacro}}


[[File:Macro_FCInfo_00_en.png|480px]]
[[File:Macro_FCInfo_00_en.png|480px]]
{{Caption|FCInfo}}
{{Caption|FCInfo}}


==Utilisation==
==Use==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 49: Line 34:
</div>
</div>


<div class="mw-translate-fuzzy">
{{clear}}
{{clear}}
'''Sektor 1: Dokument'''
'''Sektor 1: Dokument'''
Line 56: Line 42:
* Subelementets namn på objektet
* Subelementets namn på objektet
* Typ av objektet
* Typ av objektet
</div>


===Sector 1: Document===

[[File:Macro_FCInfo_Document_00.png|FCInfo Document]]

*Document name
*Label and internal name of the object
*Internal Name of the object
*Sub element name and type of the object
*Type of the object



<span id="Sector_2:_Coordinates_click_mouse"></span>
<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
'''Sektor 2: Koordinater klicka på musen'''
'''Sektor 2: Koordinater klicka på musen'''
Line 62: Line 62:
* Knappen skapas på punkt, axel, plan, kopiera vektoraxelformat '''FreeCAD.Vector (-24.0, 240.0, 7.0)'''
* Knappen skapas på punkt, axel, plan, kopiera vektoraxelformat '''FreeCAD.Vector (-24.0, 240.0, 7.0)'''
</div>
</div>

[[File:Macro_FCInfo_Coordinate_click_mouse_00.png|FCInfo Coordinate]]

*Coordinates X,Y and Z click to mouse
*The {{Button|button}} creates point, axis, plane, copy vector axis from '''FreeCAD.Vector(-24.0, 240.0, 7.0)'''

===Sector 3: Color on point===

[[File:Macro_FCInfo_Color_on_point_00.png|FCInfo Color_on_point]]


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 69: Line 78:
</div>
</div>


===Sector 4: Value Units===
<div class="mw-translate-fuzzy">
'''Sektor 4: Vertexes och detaljer'''
* Checkbox för att söka eller inte alla detaljer om objektet om det inte är markerat visas endast huvudvärdet.
* Vertexes och detaljer om formen (compt_Edge), (compt_Faces), (compt_Vector of the Face) <br/> Max 200 linjer i tabellen, om det finns mer än 200 linjer visas det (! + 200) och antalet rader <br/> (fullständiga detaljer kan spara {{KEY|Save}} -knappen i en fil i CSV-format och kan ses i filen i kalkylbladet med {{KEY|Read}} eller av ett externt kalkylblad som[https://www.libreoffice.org/ LibreOffice] [http://openoffice.apache.org/downloads.html OpenOffice] or other)
</div>


[[File:Macro_FCInfo_Units_00.png|FCInfo Units]]
<div class="mw-translate-fuzzy">
'''Sektor 5: Höjning'''
* Höjningar av objektet kan visas i:
* '''decimalgrad''', ex: 174.831872611 °
* '''gradminne sekund''', ex: <nowiki> 174° 49' 54.741401''</nowiki>
* '''radian''', ex: 3.05139181449 rad
* '''betyg''', ex: 194.257636235 gon
* '''pourcent''' ex: 30° = 57,74%
* Höjningar i plan XY, YZ, ZX och deras koordinater
* '''Riktningsobjekt''', ge objektets riktning beräkningen är: coord_1 - coord_2 = riktning (eller omvänd)
** {{KEY|Line}} den här knappen skapar en rad i riktning mot objektet
* ''' ValueAt''' returnerar 3D-vektorn som motsvarar ett parametervärde.
</div>


*{{ComboBox|mm}} : If the object is a face perimeter, length of the object is displayed. Unit size can be selected :<br />km, hm, dam, m, dm, cm, '''mm''', µm, nm, pm, fm, inch, link, foot, yard, perch, chain, furlong, mile, league, nautique.
<div class="mw-translate-fuzzy">
*Length of the object : Length of the object or perimeter of the face {{LineEdit|10.0 mm}}.
'''Sektor 6: Yta och volym'''
*If the object is a circle, a second lineEdit '''Radius :''' is opened and display the radius and diameter of circle {{LineEdit|2.0 mm (dia. 4.0 mm)}}.
* Ytan på formuläret visat enhetsstorlek kan väljas
*Perimeter of the shape (12). Perimeter of the object and number of subObject (Edges) contained in the object {{LineEdit|120.0 mm}}.
* Ytan på ansiktets visade enhetsstorlek kan väljas
* Volymen av formuläret visat enhetsstorlek kan väljas
* Täthet av materialet i '''kg av dm3 '''<br/> ("spinBox" är inställt på '''7,5''' kg, medeltäthet av stål. Om du vill ha ett annat standardvärde , ändra värdet på densiteten, linje 204)
* Massfältet {{KEY|gram}} buttom kan väljas: <br/> ton, kvintal, kg, hg, dag, gramm, dg, cg, mg, μg, ng, pg, fg, gr (korn), dr (drachm), oz (en gång), oz t (en gång troj), <br/> lb t (livre troy), lb (livre av) , cwt (hundra vikt), tonneau fr, ct
* Vikten av formuläret som visas enhetens massa kan väljas
</div>


===Sector 5: Inclination===
<div class="mw-translate-fuzzy">
'''Sektor 7: BoundBox'''
* BoundBox extrema dimensioner av formen
</div>


[[File:Macro_FCInfo_Inclination_00.png|FCInfo Inclination]]
<div class="mw-translate-fuzzy">
'''Sektor 8: Centrum för:'''
* Centrum för formen och dessa koordinater XYZ
* Masscentrum och dessa koordinater XYZ
* Knappen skapas på punkt, axel, plan, kopiera vektoraxelformat '''FreeCAD.Vector (-24.0, 240.0, 7.0)'''
</div>


*'''Inclination of the object''' can be displayed in:
<div class="mw-translate-fuzzy">
**decimal degree, ex: {{LineEdit|174.831872611°}}
'''Sektor 9: Tröghet'''
**degree minute seconde, ex: {{LineEdit|174° 49' 54.741401''}}
* Moment av tröghet och dessa koordinater längd och vikt
**radian, ex: {{LineEdit|3.05139181449 rad}}
* Knappen skapas på punkt, axel, plan, kopiera vektoraxelformat '''FreeCAD.Vector (-24.0, 240.0, 7.0)'''
**grade, ex: {{LineEdit|194.257636235 gon}}
** åtgärdslinje 1: x1, y1, z1
**pourcent, ex: 30° = {{LineEdit|57.74%}}
** åtgärdslinje 2: x2, y2, z2
*'''Inclinations in planes XY, YZ, ZX''' and their coordinates
** åtgärdslinje 3: x3, y3, z3
*'''Direction object''', {{LineEdit|Vector (0.0, 0.0, -10.0)}} give the direction of object. The calculate is : coord_1 - coord_2 = direction (or reverse)
** åtgärd 4 diagonal: x1, y2, z3
**{{Button|Direction}} this button create a line in direction of the object.
samma för längd och vikt
*'''ValueAt(0)''', {{LineEdit|Vector (0.0, 0.0, 10.0)}} returns the 3D vector corresponding to a parameter value.
* Bestämmer 1: beräknar determinanten av matrisens vetenskapliga värde
**{{Button|ValueAt(0)}} this button create a line in ValueAt direction of the object.
* Bestämmer 2: beräknar determinanten av matris decimalvärdet
*'''NormalAt(0,0)''', {{LineEdit|Vector (0.0, 0.0, 1.0)}} returns the 3D vector corresponding to a parameter value.
</div>
**{{Button|NormalAt(0,0)}} this button create a line in NormalAt direction of the object.


===Sector 6: Surface and Volume===
'''Avsnitt 10: SpreadSheet'''

* {{KEY|Read}}: läs data i ett kalkylblad sparat '''.FCInfo''' eller txt, asc, csv
[[File:Macro_FCInfo_Surface_and_Volume_00.png|FCInfo Surface and Volume]]
* {{KEY|Save}}: spara data på disk i formuläret nedan '''.FCInfo''' eller txt, asc, csv

* {{KEY|Tabulation}}: separatorn är tabulering
*Surface of the form displayed, unit size can be selected. {{LineEdit|600.0 mm2}}
* {{KEY|Comma}}: separatorn är Comma
*Surface of the face displayed, unit size can be selected. {{LineEdit|0.0 mm2}}
* {{KEY|semicolon}}: separatorn är semikolon
*Volume of the form displayed, unit size can be selected. {{LineEdit|1000.0 mm3}}
* {{KEY|Space}}: separatorn är Space
*Unit , choice your unit.
*The {{ComboBox|gram}} 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.
*Weight of the form displayed, unit mass can be selected. {{LineEdit|2.7 g}}
*Density of the material in '''kg by dm3''' {{LineEdit|2.7000 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).
*Material {{ComboBox|Metal Nickel (Ni),8.27,10.0,adapt Price}}
**In beginning the macro search the file '''FCInfo_material.txt''', if the file not exist, one file FCInfo_material.txt is created.
**The file is created with 10 types of material saved in this format.
***'''Title of material , Density on dm3 , Price on dm3 , text info on choice'''
***''(4 fields separate by coma)''
***Liquid Water (H2o),1,10.0,adapt Price
***Mater Beton,2.4,10.0,adapt Price
***Metal Aluminium (Al),2.7,10.0,adapt Price
***Metal Copper (Cu),8.96,10.0,adapt Price
***Metal Gold (Au),19.3,10.0,Gratis
***Metal Iron (Fe),7.87,10.0,adapt Price
***Metal Lead (Pb),11.35,10.0,adapt Price
***Metal Magnesium (Mg),1.43,10.0,adapt Price
***Metal Nickel (Ni),8.27,10.0,adapt Price
***Metal Pewter (Sn),7.29,10.0,adapt Price
***Metal Platinum (Pt),21.45,10.0,adapt Price
***Metal Silver (Ag),10.5,10.0,adapt Price
***Metal Sodium (Na),0.97,10.0,adapt Price
***Metal Titanium (Ti),4.4,10.0,adapt Price
***Metal Zinc (Zn),7.1,10.0,adapt Price
***Wood Beechwood,0.8,10.0,adapt Price
***Wood MDF,0.75,10.0,adapt Price
***Wood Mahogany,0.6,10.0,adapt Price
***Wood Oak,0.7,10.0,adapt Price
***Wood White pine,0.4,10.0,adapt Price
*New material or editing {{LineEdit|Metal Nickel (Ni),8.27,10.0,adapt Price}}
**you can modify or edit one new material in this format:
**'''Title, Density on dm3, Price on dm3, text info on choice'''
**''(4 fields separate by coma)''
**''you can also edit the file in your favorite editor respecting the specific format''
**you can save the file in a path desired with the variable : '''seTMaterialSavePathName'''
**''by default the file is created in the macro path''
**{{Button|Delete 1/17}} : delete the field displayed
**{{Button|Save}} : save the modification or the new material

===Sector 7: Cost===

[[File:Macro_FCInfo_Cost_00.png|FCInfo Cost]]

*Cost total : cost total of the object selected
{{LineEdit|0.027 Eu}}
*Price (kc/dm3) : price of the material selected (''Metal Aluminium (Al),2.7,'''''10.0''''',adapt Price'')
{{SpinBox|10,0000 Eu (by Kg)}}

===Sector 8: BoundBox===

[[File:Macro_FCInfo_BoundBox_00.png|FCInfo BoundBox]]

*BoundBox gives extreme dimensions of the shape.
**maximum X length : {{LineEdit|10.0 mm}}
**maximum Y length : {{LineEdit|10.0 mm}}
**maximum Z length : {{LineEdit|10.0 mm}}
**diagonal length : {{LineEdit|17.3205 mm}}
**{{Button|Tracing}} : create 6 rectangles to dimensions of boundbox
**{{Button|Volume}} : create volume to dimensions of boundbox
**{{CheckBox|Text Dim.}} : create the dimension of the triangle ''(boundbox)''
**If the {{CheckBox|TRUE|Text Dim.}} is checked, the spinbox dimension of text {{SpinBox|3,000}} is operational for give your value ''(3.0 by default)''

===Sector 9: Center of:===

[[File:Macro_FCInfo_Center_of_00.png|FCInfo Center of...]]

*Center of the shape and these coordinates XYZ
*Center of mass and these coordinates XYZ
*The {{Button|buttons}} creates on point, axis, plane, copy vector axis form '''FreeCAD.Vector(-24.0, 240.0, 7.0)''' ''(see Sector 13)''

===Sector 10: Inertia===

[[File:Macro_FCInfo_Inertia_00.png|FCInfo Inertia]]

*Moment of inertia and these coordinates length and weigth
*The button creates on point, axis, plane, copy vector axis form '''FreeCAD.Vector(-24.0, 240.0, 7.0)''' ''(see Sector 13)''
** action line 1 : {{LineEdit|x1}}, {{LineEdit|y1}}, {{LineEdit|z1}}, {{LineEdit|0.0}}
** action line 2 : {{LineEdit|x2}}, {{LineEdit|y2}}, {{LineEdit|z2}}, {{LineEdit|0.0}}
** action line 3 : {{LineEdit|x3}}, {{LineEdit|y3}}, {{LineEdit|z3}}, {{LineEdit|0.0}}
** action 4 diagonal : {{LineEdit|x1}}, {{LineEdit|y2}}, {{LineEdit|z3}}
same for length and weigth
*Determinant 1 : {{LineEdit|4629629629629.633}} computes the determinant of the matrix, in [https://en.wikipedia.org/wiki/Scientific_notation scientific value]
*Determinant 2 : {{LineEdit|4629629629629.6328125}} computes the determinant of the matrix, in decimal value

===Sector 11: Vertexes and details===

[[File:Macro_FCInfo_Disabled_module_00.png|FCInfo Disabled]]

*{{CheckBox|Disabled module}} CheckBox for for search or not all details of the object. If it is not checked, only the principal value is displayed.
*Vertexes and details of the shape (compt_Edge), (compt_Faces), (compt_Vector of the Face) <br />max 200 lines in the table, if there are more than 200 lines it appears (!+ 200) and the number of lines<br />If the object is complicate with many object the time to be long and the research is repeated to all click mouse<br/>(full details can save be the {{KEY|Save}} button in a file in CSV format and can be viewed the file in spreadsheet with the {{KEY|Read}} or by an external spreadsheet as [https://www.libreoffice.org/ LibreOffice] [http://openoffice.apache.org/downloads.html OpenOffice] or other)

===Sector 12: SpreadSheet===

[[File:Macro_FCInfo_SpreedSheet_00.png|FCInfo SpreedSheet]]

*{{Button|Read}} : read the data in a spreadsheet saved '''.FCInfo''' or txt, asc, csv
*{{Button|Save}} : save the data in disk in the form selected below '''.FCInfo''' or txt, asc, csv
*{{RadioButton|TRUE|Tabulation}} : the separator is Tabulation (by default)
*{{RadioButton|Comma}} : the separator is Comma
*{{RadioButton|Semicolon}} : the separator is Semicolon
*{{RadioButton|Space}} : the separator is Space


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 141: Line 223:
</div>
</div>


===Sector 13: Main===
<div class="mw-translate-fuzzy">
'''Avsnitt 11: Huvud'''
* {{KEY|CheckBox Klippkort}}: om markerad sparas koordinaterna i clipboardform: '' 'FreeCAD.Vector (-24.0, 240.0, 7.0)'''
* {{KEY|CheckBox Point}}: om kryssad en punkt skapas i den visade koordinaten: '' 'FreeCAD.Vector (-24.0, 240.0, 7.0)'''
* {{KEY|CheckBox Axis}}: om den markerade enaxeln skapas i den visade koordinaten: '''FreeCAD.Vector (-24.0, 240.0, 7.0)'''
* {{KEY|CheckBox Plane}}: om det markerade ettaxelplanet skapas i den koordinat som visas: '' 'FreeCAD.Vector (-24.0, 240.0, 7.0)'''
* {{KEY|Ref}}: Uppdatera visning av data i rapportvy
* {{KEY|Exit}}: Avsluta makroet (du måste starta om från verktygsfältet knappen eller menyn "Visa → Paneler → FCInfo"
* {{KEY|CheckBox}} '''1''': Om denna kryssrutan är markerad visas informationen i rapportvynsfönstret
* {{KEY|CheckBox}} '''2''': Om den här kryssrutan inte är markerad visas fönstret makro till höger (standard). Om den är markerad visas fönstret makro till vänster
</div>


[[File:Macro_FCInfo_Main_00.png|FCInfo Main]]

*{{CheckBox|Info}} : if this CheckBox is checked, the informations are displayed in the report view window
*{{CheckBox|Point}} : if checked, one point is created in the coordinate displayed form : '''FreeCAD.Vector(-24.0, 240.0, 7.0)'''
*{{CheckBox|Axis}} : if checked, one axis is created in the coordinate displayed form : '''FreeCAD.Vector(-24.0, 240.0, 7.0)'''
*{{CheckBox|Plane}} : if checked, one axis plane is created in the coordinate displayed form : '''FreeCAD.Vector(-24.0, 240.0, 7.0)'''
*{{RadioButton|Clip-B0}} : None clipBoard
*{{RadioButton|Clip-B1}} : If checked the coordinate are copy in the clipBoard Form : '''FreeCAD.Vector(X.0, Y.0, Z.0)''' FreeCAD model
*{{RadioButton|Clip-B2}} : If checked the coordinate are copy in the clipBoard Form : '''X, Y, Z''' with Comma separator
*{{RadioButton|Clip-B3}} : If checked the coordinate are copy in the clipBoard Form : '''X Y Z''' as is with Space separator
*{{CheckBox|Left/Right}} : 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.<br> If the option is 1 mode fly ''(User parameter:BaseApp/Preferences/Macros/FCMmacros/FCInfo/'''seTPositionFlyRightLeft''')'' this button is not visible .
*{{KEY|Ref}} : refresh the display of data in report view
*{{KEY|Exit}} : exit properly the macro

<div class="mw-translate-fuzzy">
När makroen är lanserad, förblir makroen aktiv och fönstret är synligt. För att lämna makroet genom att trycka på {{KEY|Exit}}. Om du lämnar vid korset kvarstår makrot i minnet och data visas i "Rapportvy" av FreeCAD.
När makroen är lanserad, förblir makroen aktiv och fönstret är synligt. För att lämna makroet genom att trycka på {{KEY|Exit}}. Om du lämnar vid korset kvarstår makrot i minnet och data visas i "Rapportvy" av FreeCAD.
</div>


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 167: Line 255:
==Options==
==Options==


<span id="The_unit_used"></span>
<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
==Alternativ==
==Alternativ==
Line 215: Line 304:
</div>
</div>


<span id="Script"></span>
<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
==Script==
==Script==
Line 322: Line 412:


==Version==
==Version==

ver 1.27 2023/06/30 optimize the styleSheet, correct the left/right position and restore view after edition sketcher
{{Code|code=
self.PB_00_Decrement.setStyleSheet("background-color: white; border:2px solid rgb(215, 10, 22);") # bord white and red
}}
replaced by
{{Code|code=
self.PB_00_Decrement.setStyleSheet("QPushButton {background-color: white; border:2px solid rgb(215, 10, 22)};") # bord white and red
}}


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 397: Line 496:
* ver 1.00, 6/09/2013 <br />
* ver 1.00, 6/09/2013 <br />


<span id="Links"></span>
<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
==Länkar==
==Länkar==

Revision as of 14:56, 1 July 2023

Macro FCInfo

Description
Gives information about the selected shape and can display a conversion of length, inclination (degrees, radians, grades, percent), area, volume and weight in different units (metric and imperial). The macro now also works for the elements of a sketch in edit mode.


French Version Version française

Macro version: 1.27
Last modified: 2023/06/30
FreeCAD version: All
Author: Mario52

Author
Mario52
Download
None
Links
Macro Version
1.27
Date last modified
2023/06/30
FreeCAD Version(s)
All
Default shortcut
None
See also
Arch Survey Arch Survey
Macro_SimpleProperties Macro SimpleProperties
Macro FCInfoGlass

Description

Beskrivning

Ger en serie information om den valda formen och kan visa en konvertering av längd, lutning (grader, radianer, grader, hällande) form, yta, volym och vikt av formuläret i densiteten vald i olika kvantiteter internationella och Anglo -Saxiska.

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/93362d69fe505714b80655756b2a3ba752767975/FCInfo_en_Ver_1-27-rmu_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/93362d69fe505714b80655756b2a3ba752767975/FCInfo_en_Ver_1-27-rmu_Docked.FCMacro")


FCInfo

Use

Utnyttjande

Välj ett objekt eller starta programmet och välj ett objekt och en serie information visas. Hans beräkningar baserade på FreeCADs enhet, som är mm för varje nytt val, kommer längdsenheten alltid tillbaka på mm och vinkel på decimalgrader.

upper window
upper window
lower window

Sektor 1: Dokument

  • Dokument namn
  • Etikett för objektet
  • Objektets interna namn
  • Subelementets namn på objektet
  • Typ av objektet


Sector 1: Document

FCInfo Document

  • Document name
  • Label and internal name of the object
  • Internal Name of the object
  • Sub element name and type of the object
  • Type of the object


Sektor 2: Koordinater klicka på musen

  • Koordinater X, Y och Z klickar på musen
  • Knappen skapas på punkt, axel, plan, kopiera vektoraxelformat FreeCAD.Vector (-24.0, 240.0, 7.0)

FCInfo Coordinate

  • Coordinates X,Y and Z click to mouse
  • The button creates point, axis, plane, copy vector axis from FreeCAD.Vector(-24.0, 240.0, 7.0)

Sector 3: Color on point

FCInfo Color_on_point

Sektor 2: Koordinater klicka på musen

  • Koordinater X, Y och Z klickar på musen
  • Knappen skapas på punkt, axel, plan, kopiera vektoraxelformat FreeCAD.Vector (-24.0, 240.0, 7.0)

Sector 4: Value Units

FCInfo Units

  • mm  : If the object is a face perimeter, length of the object is displayed. Unit size can be selected :
    km, hm, dam, m, dm, cm, mm, µm, nm, pm, fm, inch, link, foot, yard, perch, chain, furlong, mile, league, nautique.
  • Length of the object : Length of the object or perimeter of the face 10.0 mm.
  • If the object is a circle, a second lineEdit Radius : is opened and display the radius and diameter of circle 2.0 mm (dia. 4.0 mm).
  • Perimeter of the shape (12). Perimeter of the object and number of subObject (Edges) contained in the object 120.0 mm.

Sector 5: Inclination

FCInfo Inclination

  • Inclination 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
  • Direction object, Vector (0.0, 0.0, -10.0) give the direction of object. The calculate is : coord_1 - coord_2 = direction (or reverse)
    • Direction this button create a line in direction of the object.
  • ValueAt(0), Vector (0.0, 0.0, 10.0) returns the 3D vector corresponding to a parameter value.
    • ValueAt(0) this button create a line in ValueAt direction of the object.
  • NormalAt(0,0), Vector (0.0, 0.0, 1.0) returns the 3D vector corresponding to a parameter value.
    • NormalAt(0,0) this button create a line in NormalAt direction of the object.

Sector 6: Surface and Volume

FCInfo Surface and Volume

  • Surface of the form displayed, unit size can be selected. 600.0 mm2
  • Surface of the face displayed, unit size can be selected. 0.0 mm2
  • Volume of the form displayed, unit size can be selected. 1000.0 mm3
  • Unit , choice your unit.
  • The gram unit mass can be chosen :
    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.
  • Weight of the form displayed, unit mass can be selected. 2.7 g
  • Density of the material in kg by dm3 2.7000 kg (by dm3)
    (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).
  • Material Metal Nickel (Ni),8.27,10.0,adapt Price
    • In beginning the macro search the file FCInfo_material.txt, if the file not exist, one file FCInfo_material.txt is created.
    • The file is created with 10 types of material saved in this format.
      • Title of material , Density on dm3 , Price on dm3 , text info on choice
      • (4 fields separate by coma)
      • Liquid Water (H2o),1,10.0,adapt Price
      • Mater Beton,2.4,10.0,adapt Price
      • Metal Aluminium (Al),2.7,10.0,adapt Price
      • Metal Copper (Cu),8.96,10.0,adapt Price
      • Metal Gold (Au),19.3,10.0,Gratis
      • Metal Iron (Fe),7.87,10.0,adapt Price
      • Metal Lead (Pb),11.35,10.0,adapt Price
      • Metal Magnesium (Mg),1.43,10.0,adapt Price
      • Metal Nickel (Ni),8.27,10.0,adapt Price
      • Metal Pewter (Sn),7.29,10.0,adapt Price
      • Metal Platinum (Pt),21.45,10.0,adapt Price
      • Metal Silver (Ag),10.5,10.0,adapt Price
      • Metal Sodium (Na),0.97,10.0,adapt Price
      • Metal Titanium (Ti),4.4,10.0,adapt Price
      • Metal Zinc (Zn),7.1,10.0,adapt Price
      • Wood Beechwood,0.8,10.0,adapt Price
      • Wood MDF,0.75,10.0,adapt Price
      • Wood Mahogany,0.6,10.0,adapt Price
      • Wood Oak,0.7,10.0,adapt Price
      • Wood White pine,0.4,10.0,adapt Price
  • New material or editing Metal Nickel (Ni),8.27,10.0,adapt Price
    • you can modify or edit one new material in this format:
    • Title, Density on dm3, Price on dm3, text info on choice
    • (4 fields separate by coma)
    • you can also edit the file in your favorite editor respecting the specific format
    • you can save the file in a path desired with the variable : seTMaterialSavePathName
    • by default the file is created in the macro path
    • Delete 1/17 : delete the field displayed
    • Save : save the modification or the new material

Sector 7: Cost

FCInfo Cost

  • Cost total : cost total of the object selected

0.027 Eu

  • Price (kc/dm3) : price of the material selected (Metal Aluminium (Al),2.7,10.0,adapt Price)

10,0000 Eu (by Kg)

Sector 8: BoundBox

FCInfo BoundBox

  • BoundBox gives extreme dimensions of the shape.
    • maximum X length : 10.0 mm
    • maximum Y length : 10.0 mm
    • maximum Z length : 10.0 mm
    • diagonal length : 17.3205 mm
    • Tracing : create 6 rectangles to dimensions of boundbox
    • Volume : create volume to dimensions of boundbox
    • Text Dim. : create the dimension of the triangle (boundbox)
    • If the Text Dim. is checked, the spinbox dimension of text 3,000 is operational for give your value (3.0 by default)

Sector 9: Center of:

FCInfo Center of...

  • Center of the shape and these coordinates XYZ
  • Center of mass and these coordinates XYZ
  • The buttons creates on point, axis, plane, copy vector axis form FreeCAD.Vector(-24.0, 240.0, 7.0) (see Sector 13)

Sector 10: Inertia

FCInfo Inertia

  • Moment of inertia and these coordinates length and weigth
  • The button creates on point, axis, plane, copy vector axis form FreeCAD.Vector(-24.0, 240.0, 7.0) (see Sector 13)
    • action line 1 : x1, y1, z1, 0.0
    • action line 2 : x2, y2, z2, 0.0
    • action line 3 : x3, y3, z3, 0.0
    • action 4 diagonal : x1, y2, z3

same for length and weigth

  • Determinant 1  : 4629629629629.633 computes the determinant of the matrix, in scientific value
  • Determinant 2  : 4629629629629.6328125 computes the determinant of the matrix, in decimal value

Sector 11: Vertexes and details

FCInfo Disabled

  • Disabled module CheckBox for for search or not all details of the object. If it is not checked, only the principal value is displayed.
  • Vertexes and details of the shape (compt_Edge), (compt_Faces), (compt_Vector of the Face)
    max 200 lines in the table, if there are more than 200 lines it appears (!+ 200) and the number of lines
    If the object is complicate with many object the time to be long and the research is repeated to all click mouse
    (full details can save be the Save button in a file in CSV format and can be viewed the file in spreadsheet with the Read or by an external spreadsheet as LibreOffice OpenOffice or other)

Sector 12: SpreadSheet

FCInfo SpreedSheet

  • Read : read the data in a spreadsheet saved .FCInfo or txt, asc, csv
  • Save : save the data in disk in the form selected below .FCInfo or txt, asc, csv
  • Tabulation : the separator is Tabulation (by default)
  • Comma : the separator is Comma
  • Semicolon : the separator is Semicolon
  • Space : the separator is Space

Alternativ för att spara eller läsa spreadSheet med olika separator, Tabulation, Comma, Semicolon, Space
Tabellen är separatorn för FreeCAD spreadSheet-modulen
Numret på den här fyra separatorn beräknas för hjälp om det är okänt
Kommunen är den gamla (01.16 och tidigare) separatorn av FCInfo makro
Nu för kompatibilitet med FreeCAD spreadSheet och sedan 01.17 versionen är tabellen separator som standard
Om du vill konvertera ditt gamla FCInfo-kalkylblad: Öppna det i FCInfo och spara det med Tabuleringsalternativet markerat

Sector 13: Main

FCInfo Main

  • Info : if this CheckBox is checked, the informations are displayed in the report view window
  • Point : if checked, one point is created in the coordinate displayed form : FreeCAD.Vector(-24.0, 240.0, 7.0)
  • Axis : if checked, one axis is created in the coordinate displayed form : FreeCAD.Vector(-24.0, 240.0, 7.0)
  • Plane : if checked, one axis plane is created in the coordinate displayed form : FreeCAD.Vector(-24.0, 240.0, 7.0)
  • Clip-B0 : None clipBoard
  • Clip-B1 : If checked the coordinate are copy in the clipBoard Form : FreeCAD.Vector(X.0, Y.0, Z.0) FreeCAD model
  • Clip-B2 : If checked the coordinate are copy in the clipBoard Form : X, Y, Z with Comma separator
  • Clip-B3 : If checked the coordinate are copy in the clipBoard Form : X Y Z as is with Space separator
  • Left/Right : 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.
    If the option is 1 mode fly (User parameter:BaseApp/Preferences/Macros/FCMmacros/FCInfo/seTPositionFlyRightLeft) this button is not visible .
  • Ref  : refresh the display of data in report view
  • Exit : exit properly the macro

När makroen är lanserad, förblir makroen aktiv och fönstret är synligt. För att lämna makroet genom att trycka på Exit. Om du lämnar vid korset kvarstår makrot i minnet och data visas i "Rapportvy" av FreeCAD.

Options

Alternativ

Den enhet som används

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

Length unit:

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

Angle degrees :

Vinkelgrader :

  1. decimal degree, ex: 174.831872611°
  2. degree minute seconde, ex: 174° 49' 54.741401''
  3. radian, ex: 3.05139181449 rad
  4. grade, ex: 194.257636235 gon
  5. pourcent ex: 30° = 57.74%

Förståelse av vinklar i FCInfo-displayen.

Weight unit :

Viktenhet :

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

"spinboxen" är inställd på 7,5 kg, medeltäthet av stål. Om du vill ha ett annat standardvärde, ändra värdet på densiteten, linje 208

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

En fil kan skapas med knappen Save. Filen är skriven som en fil csv på så sätt kan data studeras i ett kalkylblad i FreeCAD eller Openoffice, LibreOffice...

Script

Kopiera innehållet i makroet i en fil med namnet "FCInfo.FCMacro"

  • Windows: formen är vanligtvis " drive:\Users\your_user_name\AppData\Roaming\FreeCAD\ "
  • Ubuntu: formen är vanligtvis " /home/your_user_name/.FreeCAD ".

Eller direkt i gränssnittet till FreeCAD
Ikonen måste vara i samma katalog som makroen.
Ladda ner bildpositionering på ikonen och dra sedan musen med högerklicka "spara som" (ändra inte namnet)

Copy the contents of the macro in a file named "FCInfo.FCMacro"

  • Windows: the form is usually " drive:\Users\your_user_name\AppData\Roaming\FreeCAD\ "
  • Ubuntu: the form is usually " /home/your_user_name/.FreeCAD ".

Or, directly in the interface of FreeCAD
The icon must be in the same directory as the macro.
Download image positioning on the icon and then drag the mouse right click "save as" (do not change the name)

PS: för länge att finnas på wikisidan (för tillfället wiki sidorna accepterar endast 64 KB) makrokoden har placerats i forumet

Det finns också FCInfo_Alternate_Linux för endast för FreeCAD-versionen 0.13... and PyQt4

Det finns även en Macro_FCInfo_Alternate_Linux här ändras koden (på grund av teckenfönstret : ² ³ ° μ ordinal not in range (128)") vilket innebar problem i vissa konfigurationer funktionerna är desamma
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))

Filer som sparas med den här versionen är inkompatibla med den andra versionen (dockad eller ej)


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)) # also:  carre    hex="\xb2"  # also:  html=<span>&#178;</span>
global uniteVs       ; uniteVs       = "mm"+iso8859(unichr(179)) # also:  cube     hex="\xb3"  # also:  html=<span>&#179;</span>
global uniteAs       ; uniteAs       = iso8859(unichr(176))      # also:  degrees  hex="\xb0"  # also:  html=<span>&#176;</span>
                                     = iso8859(unichr(181))      # also:  micro    hex="\xB5"  # also:  html=<span>&#181;</span>

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


Hämta makrofilen på docked to right


(Eller On the forum. )

PS: detta makro använder getSelection () och listan över objekt börjar till 1 ex: för en ruta Edge1 till Edge12 och koden i konsolen börjar vid 0 ex: for a box Edge[0] to Edge[11]
Detta är normalt att räkna på arrayer / listor i OpenCascade börjar alltid på 1 och inte på 0

Limitations

Begränsningar

Lämna alltid knappen Exit. Om man lämnar programmet utan att gå igenom knappen Exit, förblir programmet i minnet och fortsätter att springa och displayen kommer att vara kvar i "visningsrapporten". Du måste lämna FreeCAD för att radera det från minnet.
Endast de första 200 elementen i objektet är synliga i tabellen om det finns mer än 200 objekt i objektet kommer en signal att visas med (! +200). Den fullständiga listan med data är synlig i filen som sparas med knappen Save.

Om fönstret makro är osynligt efter körningen, se nedre fönstret:


projekt:
läs filen direkt i en tabell. gjort
matchar "Edges" och deras koordinater gjort
Sammansättning av ett ämne för dens densitet
lutning på elementet snarare än det globala objektet gjort
inlägg direkt i gränssnittet till FreeCAD gjort

Version

ver 1.27 2023/06/30 optimize the styleSheet, correct the left/right position and restore view after edition sketcher

self.PB_00_Decrement.setStyleSheet("background-color: white; border:2px solid rgb(215, 10, 22);")      # bord white and red

replaced by

self.PB_00_Decrement.setStyleSheet("QPushButton {background-color: white; border:2px solid rgb(215, 10, 22)};")      # bord white and red
  • ver 1.22 , 12/11/2020 : now the macro is totally uninstalled i use :
  • ver 1.26b 20/02/2022 upgrade for detect BSpline in SubObject
  • ver 1.26 06/02/2022 add info on Mesh and Points objects, decode colours, duplicate object or subObject, memorize the latest path and other preferences options
  • ver 1.25e 18/12/2021 add info detailed to BSpline (ToByArcs) and info "sel[0].TypeId"
  • ver 1.25d 12/12/2021 ---
  • ver 1.25c 12/12/2021 correct "strAround((" by "str(Around(" and other little ...
  • ver 1.25b 11/12/2021 correction error in change/modify new material and reorganization
  • ver 1.25 10/12/2021 PySide2 and add comboBox materials
  • ver 1.24 02/12/2021 add adjustedGlobalPlacement modified by edwilliams16 for placement with Body, boundbox tracing
  • ver 1.23cb 25/11/2021 delete "import Sketcher * " create conflict with "open(OpenName, "r")" ??

Adding

FreeCAD.ActiveDocument.openTransaction(u"FCInfo")    # memorise les actions (avec annuler restore)
FreeCAD.ActiveDocument.commitTransaction()           # restore les actions  (avec annuler restore)
#FreeCAD.ActiveDocument.abortTransaction()            # abandonne les actions(avec annuler restore)
  • ver 1.25d, 13/12/2021 little correction material field uncomment the "'try...Except" !!!
  • ver 1.25c, 12/12/2021 little correction new material
  • ver 1.23b, 20/11/2021 little correction, add text info in beginning run macro, and ordinal the text code
  • ver 1.23 , 19/11/2021 include icon in macro, number decimal displayed, text height, configure options in the Preference FC, correct info for elements of sketch in edit mode.
  • ver 1.22 , 12/11/2020 : now the macro is totally uninstalled i use :
try:
        self.window.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)    # destroy
        self.window.deleteLater()                                     # destroy
        self.window.destroy()                                         # destroy
except Exception:
        None

How do i exit from FreeCAD instead of Python?

instead:

self.window.hide()

and i adding the possibility display or not the "Error Message" window "False" by default, if you wand activate the warning window go to :

FreeCAD >Menu >Tools >Edit parameters... >BaseApp/Preferences/Macros/FCMmacros/FCInfo > switchWarning
  • ver 1.21-3.01 , 07/11/2019 # 07/11/2019 ver "01.21-3-rmu" replace character micro = "U", square = "2", cube = "3", degrees = " deg" see "https://forum.freecadweb.org/viewtopic.php?f=3&t=6005&start=70#p345819"
  • ver 1.21-2.01 (1.21-rmu) 11/06/2019 rmu replace all characters over 127 in ex: "°" in chr(176)) #degree
  • ver 1.21.01 (1.21-rmu) 30/05/2019 rmu change fixed positions to qt layouts grid.addWidget() by rmu75 see the rmu75 fork "https://gist.github.com/rmu75/b165147bd1c2f2659c014103793ae1d8"
  • Ver 1.20, 29/01/2018 optimering
  • ver 1.19, 20/01/2018 skapa checkbox för att upptäcka alla element i objektet om det är önskat eller inte, makroet är snabbare. Optimering
  • ver 1.18, 19/12/2017 ...
  • ver 1.17c, 14/12/2017 skapa plan med koordinat ge i ett projekt i annat projekt och ersätt "FCInfo" med "__title__"
  • Ver 1.17b, 13/12/2017 liten korrigering ersätter FCTreeView till FCInfo
  • ver 1.17, 12/12/2017 lägg till uppgradering Moment of inertia mm och kg av pinq FCMacro och tröghetsmoment och skapa plan, axel, punkt och lägg till alternativ separator för kalkylblad
  • ver 1.16, 21/06/2017 lägg till kontrollhöjds polis (här PointSize 8) och kryssrutan för att placera fönstret åt höger eller vänster
  • ver 1.15, 19/12/2015 suppression PyQt4 alternativ se, lägg till checkbox för att redigera infos i rapportvy
  • ver 1.14, 04/08/2014 ersätt PyQt4 och PySide och korrigera verktygstips inte visad orsak på PySide och lägg till fg
  • ver 1.13, 27/07/2014 ersätt FCInfo_en_Ver_1-12_Docked.FCMacro till FCInfo_en_Ver_1-13_Docked.FCMacro acceptera PyQt4 och PySide
  • ver 1.12, 10/03/2014 lägger till verktygstips
  • ver 1.11, 04/03/2014 Lägga till μm, nm, pm, fm, μg, ng, pg, hällande, fast av storhet karat "cd" i '"ct" , visning av etiketten och internt namn, fast beräkning av vinklar XY YZ ZX kan ge ett fel på en sammansatt form, fönstret dockbart i FreeCAD
  • Ver 1.10.b, 19/11/2013 knappar utanför rullningsfältet och dimensionerna i fönstret blockerar

(ver 1.10, 18/11/2013 skapa rullningsfältet)

  • ver 1.08.b, 10/11/2013 översättningsenheter på engelska, felkorrigering för att visa området för ansikten som anges i tabellen och ersättning av print App.Console .PrintMessage

ver 1.09, 04/11/2013 fungerar perfekt på Windows och Linux (orsak till fel på Linux karaktärerna: ² ³ ° ordinal inte inom intervallet (128) ")
I en Linux-distribution och i händelse av ett fel på ordinär inte inom intervallet (128) finns det en alternativ version på den här sidan Macro_FCInfo_Alternate_Linux

  • Ver 1.08, 24/10/2013 korrigering av högsta "Faces" och "Edges" som visar 100 objekt (i den sparade filen)
  • ver 1.07, 11/10/2013 matchar "Faces" och deras koordinater.
  • ver 1.06, 22/09/2013 matchar "Edges" och deras koordinater, lutning på elementet snarare än det globala objektet
  • ver 1.05, 17/09/2013 lade till en ikon för kalkylbladet, konverteringskärlet fr, affichage des dimensions overall istället för koordinater.
  • ver 1.04, 11/09/2013: läs filen direkt i en tabell.
  • ver 1.03, 09/09/2013: tydligare visning i rapport och ersättning med "typeObject = sel [0] .Shape.ShapeType"
  • ver 1.02, 7/09/2013: små uppdateringar
  • ver 1.00, 6/09/2013

Länkar

Se även Arch Survey Arch Survey

See Also: Arch Survey Arch Survey

Du kan dela dina kommentarer på forumet Info Workbench - Help with icons please.
Här ett annat inlägg av FCInfo Macro