Shapebinder selection/control fixed in a macro.

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Shapebinder selection/control fixed in a macro.

Post by freedman »

I run macros all the time to make FreeCAD work my way. I pulled out a small section of code I use to deal with Shapebinders and put it in a stand alone macro, maybe someone wants to run it/look at and maybe include some of the logic into Master. IMO shapebinder selection (in the current Master) needs some code to make it work correctly, it's messy with multiple selections, incorrect selections and overlapping solids possible.

With the macro running I added this logic to the 3D view:
1) If you create a Shapebinder the Support object is hidden and the Shapebinder is available for a face selection.
2) If you tree select a binder and hit spacebar i.e. hide/show, the view will toggle between shapebinder and the Support object (solid).
3) When a shapebinder is toggled hide/show the document is scanned for other shapebinders with the same support and those are hidden. This allows the 3D to show only the selected shapebinder.

I had to use a couple timers because the slots fire early in the process.
I think this covers most all the issues. All feedback is welcome.
Thanks
Attachments
Binder_demo2.FCMacro
(6.46 KiB) Downloaded 14 times
Post Reply