How to lock the navigation?

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

How to lock the navigation?

Post by DorinDXN »

Hi all,

In long macros how I can disable navigation by scripting? (say, at the beginning of the macro)
to prevent accidental rotation or zoom or anything can be caused by keys or mouse if, by accident, gets focus,
as it will affect the .saveImage output.

thanks!

cheers,
Dorin

OS: Windows 10 and Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16078 (Git)
Build type: Release
Branch: master
Hash: 67df9f3a828fbb0fec29d039792d4baf3d9ee8e0
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
Last edited by DorinDXN on Mon Aug 15, 2022 5:03 am, edited 1 time in total.
User avatar
onekk
Veteran
Posts: 6146
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: How to lock the navigation?

Post by onekk »

DorinDXN wrote: Sat Aug 13, 2022 1:32 pm ...
as usual, what FC version are you using?

https://forum.freecadweb.org/viewtopic.php?f=3&t=2264

It may or not may be relevant, but as said many times here in this forum, there are many variables that could came into play like:
  • Qt Version
  • Python Version
  • Coin3D Version
So probably it is not a "pedantic request" to have some infos, eventually if you are using multiple version of FC you could post "in the first post" your relevant infos for every FC version you are using.

If a user came here say two or more years in future (using maybe forum search) things could have changed, so giving a proper "FC version info" could be useful.

Regards

Carlo D.

Edited Post to shorten it deleting "full quoting of OP"
Last edited by onekk on Sat Aug 13, 2022 3:35 pm, edited 1 time in total.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
onekk
Veteran
Posts: 6146
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: How to lock the navigation?

Post by onekk »

DorinDXN wrote: Sat Aug 13, 2022 2:46 pm ...
Please add it to the first post and enclose it in code tags.

Plus, it is complicate to answer for a very old version as now the "stable" is 0.20.

Usually the answer is "install latest stable" which is 0.20 (for now, probably 0.20.1 will be out soon).

You could amend the post with the version putting maybe "deleted post" or "see first post" if you could not delete it with the X button.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: How to lock the navigation?

Post by chrisb »

I have moved the FreeCAD infos and removed the separate post. Members can delete their own posts only as long as there is no answer to them.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
DorinDXN
Posts: 66
Joined: Sat Oct 31, 2020 8:07 am

Re: How to lock the navigation?

Post by DorinDXN »

Thanks.

My question wasn't for a particular FC version.
Appreciate any hint, regardless of the FC used.

For various tasks, I found solutions which were stated for FC 0.20 or 0.19
and I adapted eventually for FC 0.18 which I prefer to use.

cheers,
Dorin
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: How to lock the navigation?

Post by chrisb »

DorinDXN wrote: Sun Aug 14, 2022 7:08 am My question wasn't for a particular FC version.
The questions aren't usually the problem. But often the answers are version dependent.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply