List Select Macro (Select hidden sub-objects)

Need help, or want to share a macro? Post here!
HoWil
Posts: 858
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: List Select Macro (Select hidden sub-objects)

Postby HoWil » Thu Aug 22, 2019 7:11 pm

realthunder wrote:
Thu Aug 22, 2019 11:11 am
Yes, it's already in the upstream.
:D yippie :!:
bernd wrote: Ping
Hey Bernd, Is it possible to use it that way in FEM?
HoWil
Posts: 858
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: List Select Macro (Select hidden sub-objects)

Postby HoWil » Fri Aug 23, 2019 11:37 am

realthunder wrote:
Thu Aug 22, 2019 11:11 am
Yes, it's already in the upstream.
I did test it with the 0.19_pre appimage and noticed that no solids are listed. Is it possible to add solids as well? A simple test-case is creating a cube and a sphere in Part-wb and applying 'Boolean Fragmenst'. After that there exists a third solid-domain between the cube and the sphere which is the target to select.
Thanks in advance,
BR,
HoWil
Attachments
Screenshot from 2019-08-23 13-36-31.png
Screenshot from 2019-08-23 13-36-31.png (268.22 KiB) Viewed 252 times
BooleanFragments_of_cube_and_sphere.FCStd
sample file for selection
(11.31 KiB) Downloaded 14 times
realthunder
Posts: 1300
Joined: Tue Jan 03, 2017 10:55 am

Re: List Select Macro (Select hidden sub-objects)

Postby realthunder » Sat Aug 24, 2019 2:45 am

HoWil wrote:
Fri Aug 23, 2019 11:37 am
I did test it with the 0.19_pre appimage and noticed that no solids are listed. Is it possible to add solids as well? A simple test-case is creating a cube and a sphere in Part-wb and applying 'Boolean Fragmenst'. After that there exists a third solid-domain between the cube and the sphere which is the target to select.
That's a very useful feature that is lacking in the current selection framework. I actually thought about this in the past too. Not easy to add. Let me think about it.
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
tthomas20
Posts: 3
Joined: Thu Jan 16, 2020 1:16 pm

Re: List Select Macro (Select hidden sub-objects)

Postby tthomas20 » Tue Jan 28, 2020 8:21 pm

I have updated the code for this macro and it is working in 0.18.4, but when I am in FEM it will not let me select the inner object. I have been trying to follow the tutorial

https://www.freecadweb.org/wiki/FEM_She ... site_Block

and I am stuck on selecting the second object for the second mesh region.

The report view gives me
Traceback (most recent call last):
File "C:\Users\tthomas\AppData\Local\FreeCAD 0.18\Mod\Fem\femguiobjects\FemSelectionWidgets.py", line 496, in addSelection
self.parseSelectionFunction(self.added_obj)
File "C:\Users\tthomas\AppData\Local\FreeCAD 0.18\Mod\Fem\femguiobjects\FemSelectionWidgets.py", line 411, in selectionParser
elt = selection[0].Shape.getElement(selection[1])
<class 'SystemError'>: <built-in method getElement of Part.CompSolid object at 0x000001CACF71DD58> returned NULL without setting an error
I am not quite sure what to do at this point and any help would be appriciated
Attachments
FEM Of 2 Materials Tutorial.FCStd
(12.9 KiB) Not downloaded yet