FCInfo Macro

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
mario52
Veteran
Posts: 4696
Joined: Wed May 16, 2012 2:13 pm

Re: FCInfo Macro

Post by mario52 »

hi

100%
PySide.QtCore.QSize(1680, 1010)
96
96

125%
PySide.QtCore.QSize(1344, 800)
96
96

150%
PySide.QtCore.QSize(1120, 660)
96
96

175%
PySide.QtCore.QSize(960, 560)
96
96

ps: the dpi is not modified ! and the text in the window is normal
i give the definition (1680, 1010) but the screen is modified in 1344, 800 (125%) or 1120, 660 (150%) or 960, 560 (175%) !!


here 175%
FCInfo_Dpi00.png
FCInfo_Dpi00.png (424.04 KiB) Viewed 2234 times
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
hammax
Veteran
Posts: 1994
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: FCInfo Macro

Post by hammax »

… using the FCInfoMacro for determination of the center of mass for a sailboat hull with a heeling angle,
needing the lifting force of the displaced water volume.
I get also an item with "center of form" ???? What's its use and meaning?
Edit: I suppose this means BoundingBox
CentMass.PNG
CentMass.PNG (52.12 KiB) Viewed 2153 times
mario52
Veteran
Posts: 4696
Joined: Wed May 16, 2012 2:13 pm

Re: FCInfo Macro

Post by mario52 »

hi

yes BoundingBox center

in the comboView FCPointBBCenter read FCPointBoundBoxCenter

Code: Select all

            sel = FreeCADGui.Selection.getSelection()
            boundBox_ = sel[0].Shape.BoundBox

             # centre de la forme
            try:
                boundBoxCenterX = boundBox_.Center[0]
                boundBoxCenterY = boundBox_.Center[1]
                boundBoxCenterZ = boundBox_.Center[2]
            except Exception:
                boundBoxCenterX = 0.0
                boundBoxCenterY = 0.0
                boundBoxCenterZ = 0.0
maybe modify Forme to BounBox line 2442

Code: Select all

        self.label_13.setText("Forme")
also Macro_CenterOfMass for many object selected

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
freecad-heini-1
Veteran
Posts: 7791
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: FCInfo Macro

Post by freecad-heini-1 »

I had the problem that fcinfo slows down my system after it was run. In particular, selecting multiple faces, e.g. to copy, takes a long time, even measuring distances or angles, with the Part Workbench measurement tools. Maybe it's me, because I'm not sure if I installed the fcinfo macro correctly.

I copied the newest version from here.
https://gist.github.com/mario52a/8d40ab6c018c2bde678f
I have created a new macro, assigned a name, e.g. fcinfo1.21, copied the whole text of the macro into it, closed it and saved it.

The new macro doesn't slow down my system anymore, but it is in French. Where can I find a current fcinfo macro in english and how is the right way to install it?
mario52
Veteran
Posts: 4696
Joined: Wed May 16, 2012 2:13 pm

Re: FCInfo Macro

Post by mario52 »

hi
freecad-heini-1 wrote: Mon May 27, 2019 10:51 am I have created a new macro, assigned a name, e.g. fcinfo1.21, copied the whole text of the macro into it, closed it and saved it.
the macro Fr , En , It are identical only the text change , are you sure to work with other version on the precedent macro and same object as before ?

i compare 2 macros Fr and En with a text editor (Notepad++) and the code is equal

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
freecad-heini-1
Veteran
Posts: 7791
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: FCInfo Macro

Post by freecad-heini-1 »

It's this macro:

Code: Select all

# 
__title__    = "FCInfo"
__author__   = "Mario52"
__url__      = "http://www.freecadweb.org/index-en.html"
__version__  = "01.20"
__date__     = "29/01/2018"
mario52
Veteran
Posts: 4696
Joined: Wed May 16, 2012 2:13 pm

Re: FCInfo Macro

Post by mario52 »

freecad-heini-1 wrote: Mon May 27, 2019 2:10 pm Code: Select all

#
__title__ = "FCInfo"
__author__ = "Mario52"
__url__ = "http://www.freecadweb.org/index-en.html"
__version__ = "01.20"
__date__ = "29/01/2018"
hi

it is this macro that works very well ?

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
freecad-heini-1
Veteran
Posts: 7791
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: FCInfo Macro

Post by freecad-heini-1 »

mario52 wrote: Mon May 27, 2019 2:20 pm
freecad-heini-1 wrote: Mon May 27, 2019 2:10 pm Code: Select all

#
__title__ = "FCInfo"
__author__ = "Mario52"
__url__ = "http://www.freecadweb.org/index-en.html"
__version__ = "01.20"
__date__ = "29/01/2018"
hi

it is this macro that works very well ?

mario
No. That's the macro that slow down Freecad.
mario52
Veteran
Posts: 4696
Joined: Wed May 16, 2012 2:13 pm

Re: FCInfo Macro

Post by mario52 »

hi
freecad-heini-1 wrote: Mon May 27, 2019 10:51 am I copied the newest version from here.
https://gist.github.com/mario52a/8d40ab6c018c2bde678f
I have created a new macro, assigned a name, e.g. fcinfo1.21, copied the whole text of the macro into it, closed it and saved it.
then this link is the latest version in English

1.21 French version
1.21 English version (as your link)

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
freecad-heini-1
Veteran
Posts: 7791
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: FCInfo Macro

Post by freecad-heini-1 »

Thank you very much Mario.
Post Reply