[Solved] Mimic FPS info on FullScreen

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
DorinDXN
Posts: 66
Joined: Sat Oct 31, 2020 8:07 am

Re: [Solved] Mimic FPS info on FullScreen

Post by DorinDXN »

Thanks again,

I'll try that as well.

cheers,
Dorin
DorinDXN
Posts: 66
Joined: Sat Oct 31, 2020 8:07 am

Re: [Solved] Mimic FPS info on FullScreen

Post by DorinDXN »

Could be other thing!

Now I remember, sometimes FreeCAD shows, for an instant, like an old(previous) image on fullscreen,
I'm not saying is FreeCAD fault, could be some graphic accel. thing interfering, maybe..

cheers,
Dorin
DorinDXN
Posts: 66
Joined: Sat Oct 31, 2020 8:07 am

Re: [Solved] Mimic FPS info on FullScreen

Post by DorinDXN »

Chris_G wrote: Mon Nov 02, 2020 11:27 am Maybe the touch() function of the scenegraph will work better ?

Code: Select all

sg.touch()
That fixes it!

cheers,
Dorin
User avatar
pablogil
Posts: 881
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: [Solved] Mimic FPS info on FullScreen

Post by pablogil »

@DorinDXN,

I need this code but I'm stuck trying to remove the text, how do you exactly did it?

Thanks!
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: [Solved] Mimic FPS info on FullScreen

Post by mario52 »

Hi
pablogil wrote: Fri Jun 02, 2023 2:38 pm I need this code but I'm stuck trying to remove the text, how do you exactly did it?
as describe in the example viewtopic.php?p=444339#p444339

Code: Select all

# remove the Superimposition layer with :
render.removeSuperimposition(sup)
maybe zoom the screen for refresh

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
pablogil
Posts: 881
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: [Solved] Mimic FPS info on FullScreen

Post by pablogil »

mario52 wrote: Sat Jun 17, 2023 9:37 pm Hi
pablogil wrote: Fri Jun 02, 2023 2:38 pm I need this code but I'm stuck trying to remove the text, how do you exactly did it?
as describe in the example viewtopic.php?p=444339#p444339

Code: Select all

# remove the Superimposition layer with :
render.removeSuperimposition(sup)
maybe zoom the screen for refresh

mario
Yes, I solved it refreshing screen with

Code: Select all

touch()
but as a first try it didn't worked for me as I was using it inside a script so I had to save sg into FreeCAD, that is:

Code: Select all

FreeCAD.sg = view.getSceneGraph()
so that later I could call it with:

Code: Select all

FreeCAD.sg.touch()
This way it works perfectly :)
Thanks!
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: [Solved] Mimic FPS info on FullScreen

Post by mario52 »

Hi
pablogil wrote: Sun Jun 18, 2023 3:41 pm so that later I could call it with:

Code: Select all

FreeCAD.sg.touch()
good ... tanks

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.
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: [Solved] Mimic FPS info on FullScreen

Post by mario52 »

Hi

example creation sphere

Code: Select all

import pivy
from pivy import coin

pointRotation = App.Vector(0.0,0.0,0.0)
ctPoint = FreeCADGui.ActiveDocument.ActiveView.getSceneGraph()
itemctPoint = coin.SoSeparator()
sphere = coin.SoSphere()
sphere.radius = 0.5
color = coin.SoBaseColor()
color.rgb = (1.0, 1.0, 0.0)
move = coin.SoTranslation()
move.translation.setValue(pointRotation)
itemctPoint.addChild(color)
itemctPoint.addChild(move)
itemctPoint.addChild(sphere)
ctPoint.addChild(itemctPoint)

#ctPoint.removeChild(itemctPoint) # remove the point

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.
Post Reply