FreeCAD-Doc/localwiki/Macro_FCInfoGlass.html
2018-07-08 12:11:49 -05:00

261 lines
20 KiB
HTML

<html><head><title>Macro FCInfoGlass</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>Macro FCInfoGlass</h1></div>
<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="mw-parser-output"><table class="fcinfobox wikitable ct" width="100%" style="float: right; width: 230px; margin-left: 10px;">
<tr>
<td class="ctTitle">
<h3><span class="mw-headline" id="Macro_FCInfoGlass"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_FCInfoGlass.png" class="image"><img alt="Macro FCInfoGlass.png" src="32px-Macro_FCInfoGlass.png" width="32" height="32" srcset="/wiki/images/thumb/6/6b/Macro_FCInfoGlass.png/48px-Macro_FCInfoGlass.png 1.5x, 64px-Macro_FCInfoGlass.png 2x" /></a> Macro FCInfoGlass</span></h3>
</td></tr>
<tr>
<th class="ctOdd">Description
</th></tr>
<tr>
<td class="ctEven left macro-description">Gives a series of information on the form display in the 3D view.
</td></tr>
<tr>
<th class="ctOdd">Author
</th></tr>
<tr>
<td class="ctEven macro-author"><a href="https://www.freecadweb.org/wiki/index.php?title=User:Mario52" title="User:Mario52">Mario52</a>
</td></tr>
<tr>
<th class="ctOdd">Links
</th></tr>
<tr>
<td class="ctEven"><a href="Macros_recipes.html" title="Macros recipes">Macros recipes</a><br /><a href="How_to_install_macros.html" title="How to install macros">How to install macros</a><br /><a href="Customize_Toolbars.html" title="Customize Toolbars">How to customize toolbars</a>
</td></tr>
<tr>
<th class="ctOdd">Version
</th></tr>
<tr>
<td class="ctEven macro-version">00.05
</td></tr>
<tr>
<th class="ctOdd">Date last modification
</th></tr>
<tr>
<td class="ctEven macro-date">2016-08-28
</td></tr>
<tr>
<th class="ctOdd">
</th></tr>
<tr>
<td class="ctToc"><br /><div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="#Macro_FCInfoGlass"><span class="tocnumber">1</span> <span class="toctext">Macro FCInfoGlass</span></a></li>
<li class="toclevel-1 tocsection-1"><a href="#Utilisation"><span class="tocnumber">2</span> <span class="toctext">Utilisation</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="#Examples:"><span class="tocnumber">3</span> <span class="toctext">Examples:</span></a></li>
<li class="toclevel-1 tocsection-3"><a href="#Script"><span class="tocnumber">4</span> <span class="toctext">Script</span></a></li>
<li class="toclevel-1 tocsection-4"><a href="#Links"><span class="tocnumber">5</span> <span class="toctext">Links</span></a></li>
<li class="toclevel-1 tocsection-5"><a href="#Version"><span class="tocnumber">6</span> <span class="toctext">Version</span></a></li>
</ul>
</div>
</td></tr>
</table>
<p><br />
</p><p>Gives a series of informations about the selected shape and can display a directly in the 3D view
</p><p><br />
<a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_FCTransparentInfo_00.FCMacro.png" class="image" title="FCInfoGlass"><img alt="FCInfoGlass" src="480px-Macro_FCTransparentInfo_00.FCMacro.png" width="480" height="285" srcset="/wiki/images/5/5f/Macro_FCTransparentInfo_00.FCMacro.png 1.5x" /></a>
</p>
<div style="clear:both"></div>
<h2><span class="mw-headline" id="Utilisation">Utilisation</span></h2>
<p>Select an object or launch the application and select an object, and a series of informations appear on the 3D View.
</p><p><b>Modify this line</b> to move the data display in the screen (lines 84, 85)
</p>
<pre>global posiX &#160;; posiX = 900 # position window coordinate X "defaut = 900"
global posiY &#160;; posiY = 190 # position window coordinate Y "defaut = 190" </pre>
<ul><li> 900, 190 = position X, Y upper left corner</li></ul>
<p><b>Modify this line</b> for change color (line 92)
</p>
<pre>#######################################################################
# Section color #
global colorize &#160;; colorize ="black" # colorize the text choice "defaut = "black"
# "black" "white" "red" "green" "blue" "yellow" "magenta" "cyan" </pre>
<h2><span class="mw-headline" id="Examples:">Examples:</span></h2>
<p>Availlable&#160;: <b> "black" "white" "red" "green" "blue" "yellow" "magenta" "cyan" </b>
</p>
<center>
<ul class="gallery mw-gallery-traditional">
<li class="gallerybox" style="width: 335px"><div style="width: 335px">
<div class="thumb" style="width: 330px;"><div style="margin:99.5px auto;"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_FCInfoGlass_01.png" class="image"><img alt="" src="300px-Macro_FCInfoGlass_01.png" width="300" height="131" srcset="/wiki/images/thumb/5/5c/Macro_FCInfoGlass_01.png/450px-Macro_FCInfoGlass_01.png 1.5x, /wiki/images/thumb/5/5c/Macro_FCInfoGlass_01.png/600px-Macro_FCInfoGlass_01.png 2x" /></a></div></div>
<div class="gallerytext">
<p><b>colorize ="black"</b>
</p>
</div>
</div></li>
<li class="gallerybox" style="width: 335px"><div style="width: 335px">
<div class="thumb" style="width: 330px;"><div style="margin:99.5px auto;"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_FCInfoGlass_02.png" class="image"><img alt="" src="300px-Macro_FCInfoGlass_02.png" width="300" height="131" srcset="/wiki/images/thumb/5/5f/Macro_FCInfoGlass_02.png/450px-Macro_FCInfoGlass_02.png 1.5x, /wiki/images/thumb/5/5f/Macro_FCInfoGlass_02.png/600px-Macro_FCInfoGlass_02.png 2x" /></a></div></div>
<div class="gallerytext">
<p><b>colorize ="white"</b>
</p>
</div>
</div></li>
</ul>
</center>
<div style="clear:both"></div>
<center>
<ul class="gallery mw-gallery-traditional">
<li class="gallerybox" style="width: 335px"><div style="width: 335px">
<div class="thumb" style="width: 330px;"><div style="margin:99.5px auto;"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_FCInfoGlass_03.png" class="image"><img alt="" src="300px-Macro_FCInfoGlass_03.png" width="300" height="131" srcset="/wiki/images/thumb/b/b4/Macro_FCInfoGlass_03.png/450px-Macro_FCInfoGlass_03.png 1.5x, /wiki/images/thumb/b/b4/Macro_FCInfoGlass_03.png/600px-Macro_FCInfoGlass_03.png 2x" /></a></div></div>
<div class="gallerytext">
<p><b>colorize ="red"</b>
</p>
</div>
</div></li>
<li class="gallerybox" style="width: 335px"><div style="width: 335px">
<div class="thumb" style="width: 330px;"><div style="margin:99.5px auto;"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_FCInfoGlass_04.png" class="image"><img alt="" src="300px-Macro_FCInfoGlass_04.png" width="300" height="131" srcset="/wiki/images/thumb/2/2f/Macro_FCInfoGlass_04.png/450px-Macro_FCInfoGlass_04.png 1.5x, /wiki/images/thumb/2/2f/Macro_FCInfoGlass_04.png/600px-Macro_FCInfoGlass_04.png 2x" /></a></div></div>
<div class="gallerytext">
<p><b>colorize ="yellow"</b>
</p>
</div>
</div></li>
</ul>
</center>
<div style="clear:both"></div>
<p><br />
This section hare switch give value <b>1</b> for displayed the info or <b>0</b> for not displayed the info
</p><p><b>Example:</b>
</p><p>is displayed ( = <b>1</b> )
</p>
<pre>global LabelObject &#160;;LabelObject = 1 # Label #3 Label Object </pre>
<p>is not displayed ( = <b>0</b> )
</p>
<pre>global LabelObject &#160;;LabelObject = 0 # Label #3 Label Object </pre>
<p>The section lines 79 to 171
</p>
<pre>#######################################################################
global visualiserWindow &#160;; visualiserWindow = 0 # si visualiserWindow = 1 la fenetre est visible (pour test) "defaut = 0"
# if visualiserWindow = 1 the windows is visible (for test) "default = 0"
###Section Configuration ##############################################
# Placement window hidden #
global posiX &#160;; posiX = 900 # position window coordinate X "defaut = 900"
global posiY &#160;; posiY = 190 # position window coordinate Y "defaut = 190"
#######################################################################
global SizeX &#160;; SizeX = 600 # size window length (do not modify) "defaut = 600"
global SizeY &#160;; SizeY = 600 # size window heigth (do not modify) "defaut = 600"
#######################################################################
# Section color #
global colorize &#160;; colorize ="black" # colorize the text choice "defaut = "black"
# "black" "white" "red" "green" "blue" "yellow" "magenta" "cyan"
#######################################################################
# Section inter #
global mode &#160;; mode = 1 # mode 1=degrees mode 0=radians "defaut = 1"
global arondi &#160;; arondi = 4 # many numbers after the decimal point "defaut = 4"
global chaineRemplacement &#160;; chaineRemplacement = "_" # replacement string (1 character) "defaut = "_"
#######################################################################
# section switch
# if switch = 1 then actif (True Displayed) else inactif (False not Displayed)
global PrintReportView &#160;;PrintReportView = 1 # Affichage dans la vue rapport #0 Displayed ReportView
##
global DocumentName &#160;;DocumentName = 1 # Nom du document #1 Document Name
global InternalName &#160;;InternalName = 1 # Nom interne de l'objet #2 Internal Name
global LabelObject &#160;;LabelObject = 1 # Label #3 Label Object
global ElementName &#160;;ElementName = 1 # Nom de l'element #4 Element Name
global ObjectType &#160;;ObjectType = 1 # Type d'objet #5 Object Type
global LineSeparateTitle &#160;;LineSeparateTitle = 1 # ligne de separation des titres ____________ #6 Line Separate of Title
## Object subObject
global ObjectLength &#160;;ObjectLength = 1 # longueur Objet ou perimetre si c est une face #7 Object Length or perimetre if are a face
global ObjectCurveRadius &#160;;ObjectCurveRadius = 1 # rayon du subObject si arc ou cerle #8 radius subObject if arc or cirle
global ObjectCurveCenter &#160;;ObjectCurveCenter = 1 # coordonnees centrale subObject si arc ou cerle #9 coordinates center subObject if arc or cirle
## Draft
global LineDimension &#160;;LineDimension = 1 # Dimensions Line #10 Line Dimension
global DWireDimension &#160;;DWireDimension = 1 # Dimensions DWire #11 DWire Dimension
global CircleDimension &#160;;CircleDimension = 1 # Dimensions Circle #12 Circle Dimension
global CirclePartDimension &#160;;CirclePartDimension = 1 # Dimensions Circle Part #13 Circle Part Dimension
global ArcDimension &#160;;ArcDimension = 1 # Dimensions Arc #14 Arc Dimension
global EllipseDimension &#160;;EllipseDimension = 1 # Dimensions Ellipse #15 Ellipse Dimension
global EllipsePartDimension &#160;;EllipsePartDimension = 1 # Dimensions Ellipse Part #16 Ellipse Part Dimension
global PolygonDimension &#160;;PolygonDimension = 1 # Dimensions Polygon #17 Polygon Dimension
global RectangleDimension &#160;;RectangleDimension = 1 # Dimensions Rectangle #18 Rectangle Dimension
global BSplineDimension &#160;;BSplineDimension = 1 # Dimensions BSpline #19 BSpline Dimension
global PointDimension &#160;;PointDimension = 1 # Dimensions Point #20 Point Dimension
global BezCurveDimension &#160;;BezCurveDimension = 1 # Dimensions BezCurve #21 BezCurve Dimension
## Solid
global CylinderDimension &#160;;CylinderDimension = 1 # Dimensions du Cylindre Rayon Hauteur Angle #22 Cylinder Dimension
global BoxDimension &#160;;BoxDimension = 1 # Dimensions du Box Length Width Height #23 Box Dimension
global SphereDimension &#160;;SphereDimension = 1 # Dimensions de la Sphere #24 Sphere Dimension
global EllipsoidDimension &#160;;EllipsoidDimension = 1 # Dimensions Ellipsoid #25 Ellipsoid Dimension
global ConeDimension &#160;;ConeDimension = 1 # Dimensions du Cone #26 Cone Dimension
global TorusDimension &#160;;TorusDimension = 1 # Dimensions du Tore #27 Torus Dimension
## Part
global PlanePartDimension &#160;;PlanePartDimension = 1 # Dimensions Plan Part #28 Plane Part Dimension
global PrismPartDimension &#160;;PrismPartDimension = 1 # Dimensions Prisme Part #29 Prism Part Dimension
global WedgePartDimension &#160;;WedgePartDimension = 1 # Dimensions Wedge Part #30 Wedge Part Dimension
global HelixPartDimension &#160;;HelixPartDimension = 1 # Dimensions Helix Part #31 Helix Part Dimension
global SpiralPartDimension &#160;;SpiralPartDimension = 1 # Dimensions Spirale Part #32 Spiral Part Dimension
global VertexPartDimensio &#160;;VertexPartDimension = 1 # Dimensions Vertex Part #33 Vertex Part Dimension
global LinePartDimension &#160;;LinePartDimension = 1 # Dimensions Line Part #34 Line Part Dimension
global RegularPolygonPartDimension;RegularPolygonPartDimension = 1 # Dimensions RegularPolygon Part #35 Regular Polygon Part Dimension
## Face
global FaceSurface &#160;;FaceSurface = 1 # Surface de la face #36 Face Surface
global NormalAt &#160;;NormalAt = 1 # Donne la normale (inclinaison) #37 normalAt(0,0) Face and edges normalAt(0)
global FaceCenter &#160;;FaceCenter = 1 # Center Face (mass) #38 Face Center
global BoundBoxFaceVol &#160;;BoundBoxFaceVol = 1 # BoundBoxFace Volume #39 BoundBox Face Volume
global BoundBoxFaceCent &#160;;BoundBoxFaceCent = 1 # BoundBoxFaceCenter #40 BoundBox Face Center
global BoundBoxFaceCoor &#160;;BoundBoxFaceCoor = 1 # BoundBoxFace coordinates #41 BoundBox Face Coordinates
## Volume
global BounBoxVolumeVol &#160;;BounBoxVolumeVol = 1 # rectangle du BoundBox #42 BounBox Volume Volume
global BounBoxVolumeCent &#160;;BounBoxVolumeCent = 1 # centre de la forme #43 BounBox Volume Center
global BounBoxVolumeCoor &#160;;BounBoxVolumeCoor = 1 # boundinbox (dimensions hors tout) #44 BounBox Volume Coordinates
global VolumeObject &#160;;VolumeObject = 1 # volume #45 Volume Object
global CenterMass &#160;;CenterMass = 1 # centre de la masse #46 Center Mass object
global PlacementForme &#160;;PlacementForme = 1 # placement de la forme #47 Placement Forme
global LineInclination &#160;;LineInclination = 1 # search inclination XY YZ ZX uniquement lignes #48 Line Inclination
global VertexesObject &#160;;VertexesObject = 1 # Vertexes de l'objet selectionne #49 Vertexes Object
global VertexesForme &#160;;VertexesForme = 0 # Vertexes complet de la forme #50 Vertexes Forme
# peut prendre du temps, depasser la fenetre et donner des donnees incompletes
# can take time and exceed the window and give data's incompletes
### End Section Switch ####################################################################################################################### </pre>
<p>After a change save the macro and run
</p><p>It is not possible at the moment to leave the function from the macro or scrolling
</p><p>One mouse click on the object display the information of the object, two mouse click select the object complete and displayed alls informations
</p><p><b>PS:</b> It is also possible that in the Linux environment it is not possible to click or have access to the object within the window displaying the information
</p><p>There are no problems in the Windows environment you can click inside the window and access to the object except the displayed characters
</p><p>this window to view and modify the dimensions, change:
</p><p><b>visualiserWindow line 81 = 1</b>
</p><p>the <b>lines 87 and 88 and SizeX SizeY</b> for window dimensions
</p>
<h2><span class="mw-headline" id="Script">Script</span></h2>
<p>The icon <b>Macro_FCInfoGlass.FCMacro</b> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_FCInfoGlass.png" class="image" title="FCInfoGlass"><img alt="FCInfoGlass" src="64px-Macro_FCInfoGlass.png" width="64" height="64" srcset="/wiki/images/thumb/6/6b/Macro_FCInfoGlass.png/96px-Macro_FCInfoGlass.png 1.5x, /wiki/images/6/6b/Macro_FCInfoGlass.png 2x" /></a>
</p><p>Copy the script on Gits <a rel="nofollow" class="external text" href="https://gist.github.com/mario52a/553b1fc7a8ca5bfa44c6"><b>Macro_FCInfoGlass.FCMacro</b></a>
</p><p>and copy the Macro_FCInfoGlass.FCMacro and the icon in your macro directory.
</p>
<h2><span class="mw-headline" id="Links">Links</span></h2>
<p>The discussion on the forum <a rel="nofollow" class="external text" href="http://forum.freecadweb.org/viewtopic.php?f=8&amp;t=6005">FCInfo Macro</a>
</p><p>My macros on <a rel="nofollow" class="external text" href="https://gist.github.com/mario52a">mario52a </a> gists
</p>
<h2><span class="mw-headline" id="Version">Version</span></h2>
<p><b>28/08/2016 Ver 00.05</b>&#160;: add radius with subObjects and center coordinates
</p><p><b>25/11/2015 Ver 0.04</b>&#160;: add radius with subObjects and normalAT(0,0)
</p><p><b>31/08/2015 Ver 0.03</b>&#160;: add many informations
</p><p><b>04/08/2015 Ver 0.02</b>&#160;: add switch and presentation
</p><p><br />
</p>
</div>
</div>
</div><div class="printfooter">
Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=Macro_FCInfoGlass&amp;oldid=240474">http://www.freecadweb.org/wiki/index.php?title=Macro_FCInfoGlass&amp;oldid=240474</a>"</div>
<div id="catlinks" class="catlinks" data-mw="interface"></div><div class="visualClear"></div>
</div>
</div>
<div id="mw-navigation">
<h2>Navigation menu</h2>
</body></html>