finding/selecting all elements below cursor

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Chris_G
Veteran
Posts: 2601
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: finding/selecting all elements below cursor

Post by Chris_G »

Thanks, Mario, for taking care of the Code-Snippets page.
Chris
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: finding/selecting all elements below cursor

Post by HoWil »

Finally I was able to write a small script/macro out of the lines you provided me. 8-)
The result can be found over here... viewtopic.php?f=18&t=12381&p=151950#p151950
Thanks again,
HoWil
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: finding/selecting all elements below cursor

Post by Jee-Bee »

Sorry for opening an old topic... But is the macro also added to the add-on manager?
mario52
Veteran
Posts: 4698
Joined: Wed May 16, 2012 2:13 pm

Re: finding/selecting all elements below cursor

Post by mario52 »

Hi
Jee-Bee wrote: Tue Nov 20, 2018 7:38 pm But is the macro also added to the add-on manager?
done Macro_Mouse_over_cb

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.
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: finding/selecting all elements below cursor

Post by UR_ »

mario52 wrote: Mon Nov 26, 2018 4:30 pmdone
Why did you add "Macro_Mouse_over_cb", instead of "FC_element_selector_v1p1p1.FCMacro"

IMO, "Macro_Mouse_over_cb" is more a snippet, than a working macro, isn't it :?

"FC_element_selector_v1p1p1.FCMacro" should be available by addon manager. :roll:
mario52
Veteran
Posts: 4698
Joined: Wed May 16, 2012 2:13 pm

Re: finding/selecting all elements below cursor

Post by mario52 »

hi

i create page Macro_FC_element_selector

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.
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: finding/selecting all elements below cursor

Post by UR_ »

thumbs-up_s.png
thumbs-up_s.png (3.41 KiB) Viewed 1406 times
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: finding/selecting all elements below cursor

Post by triplus »

User avatar
zacl
Posts: 63
Joined: Wed Jul 31, 2019 1:15 pm

Re: finding/selecting all elements below cursor

Post by zacl »

Hello,
You made a great macro! This function is a must have.

I have some questions :

Why do we have to click on "start here" button ?
It is important for the code or just to verify that you see the dialog window?

When I click on an object, the freecad windows go above the dialog one. It is a normal behavior?
I tried to add the following code to the macro but I end up freezing Freecad.

Code: Select all

self.dialog.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) 
Can we keep the dialog windows above freecad all the time?

zacl
Post Reply