Ticket #3932 - Selecting solids on interior of CompSolid

About the development of the FEM module/workbench.

Moderator: bernd

HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Ticket #3932 - Selecting solids on interior of CompSolid

Post by HoWil »

realthunder wrote: Wed May 27, 2020 6:05 am Most likely too late for 0.19.
Please, give it a try. We are waiting for this feature for several years now, and it is essential for more complex 3D simulation models.
Thanks in advance,
HoWil
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Ticket #3932 - Selecting solids on interior of CompSolid

Post by bernd »

if it would be a small single PR we could may be speed it up. But mostly realthunders PRs include many different things at once.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Ticket #3932 - Selecting solids on interior of CompSolid

Post by realthunder »

HoWil wrote: Thu May 28, 2020 5:14 am
realthunder wrote: Wed May 27, 2020 6:05 am Most likely too late for 0.19.
Please, give it a try. We are waiting for this feature for several years now, and it is essential for more complex 3D simulation models.
Thanks in advance,
HoWil
Unfortunately, it does involve a big PR which I submitted over six months ago. I have since splitted that PR into three. This selection enhancement requires one of the essential piece that must be applied after the first two pieces.
Try Assembly3 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
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Ticket #3932 - Selecting solids on interior of CompSolid

Post by bernd »

The only advice I can give you is to develop more in the regard Werner would like to have it. As less he needs to fix after merges as sooner he merges more of your PRs. He is the only one who is able to merge your PRs. Noone else will do it, noone! You might get in kontact with him directly and ask him how you could help him to speed up the process.

I only do merges in FEM, small ones in Arch or Draft. The time being when I could not merge myself I tried to keep the work for Werner and Yorik as small as possible for FEM merges. Really as small as possible. Just to be sure to get things merged fast.

cheers bernd

BTW: The shadows are absolutly awesome.
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Ticket #3932 - Selecting solids on interior of CompSolid

Post by HoWil »

An update on realthunders selection dialogue https://forum.freecadweb.org/viewtopic. ... 51#p416341

Did anyone test it with fem recently?
imgprojts
Posts: 5
Joined: Sun Mar 31, 2019 5:42 pm

Re: Ticket #3932 - Selecting solids on interior of CompSolid

Post by imgprojts »

realthunder wrote: Tue May 26, 2020 11:03 pm
HoWil wrote: Tue May 26, 2020 7:49 pm
bernd wrote: Thu Mar 26, 2020 2:12 pm A innner solid inside a inner solid is still missing in the example ...
So, whom can we ask for help? Realthunder should be able to solve this? Or do we nee Werner?
I have already implemented this. The core will have support of selecting all types of high level geometries.

compsolid-pick.gif
oh we really need this selection tool for FEM!
imgprojts
Posts: 5
Joined: Sun Mar 31, 2019 5:42 pm

Re: Ticket #3932 - Selecting solids on interior of CompSolid

Post by imgprojts »

OK I tried the version in the Github. I was jumping from the joy of being to select the inner solid. But then I hit the run FEM button only to find that the materials have been changed to have 0 Young's Modulus. I try to change that to anything, it lets me do that and as soon as I change to a different field, it goes back to value of 0. But I can select the inner solid. so this would be a great addition to the main branch.


OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21911 +2545 (Git)
Build type: Release
Branch: LinkStage3
Hash: 04c80c99eee0f7d2f761bdc7d8b32c077adefdec
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
tcsut
Posts: 5
Joined: Wed Oct 21, 2020 6:10 am

Re: Ticket #3932 - Selecting solids on interior of CompSolid

Post by tcsut »

I have a similar problem. I am using FeeCAD 0.18 (Revision number 4).

I have found a workaround for me, by programmatically assigning the solids to the mesh groups and regions.
First I assigned to the first mesh group the outermost face/solid of the CompSolid (msh1.MeshGroupList[0].References[0][0]), such that I can use it in the code for the generation of the correct links to the solids

Code: Select all

msh1 = App.ActiveDocument.getObject('FEMMeshGmsh')
obj2 = msh1.MeshGroupList[0].References[0][0]
msh1.MeshGroupList[0].References = [(obj2,('Solid3',))]  # FEMMeshGroup_Plate1
msh1.MeshGroupList[1].References = [(obj2,('Solid1',))]  # FEMMeshGroup_Dielectricum
msh1.MeshGroupList[2].References = [(obj2,('Solid2',))]  # FEMMeshGroup_Plate2
msh1.MeshGroupList[3].References = [(obj2,('Solid4',))]  # FEMMeshGroup_Air
msh1.MeshRegionList[0].References = [(obj2,('Solid1',))]  # FEMMeshRegion_Dielectricum
Faces to the boundaries can be assigned by a clipping plane in the FEM WB.
Or copied from the solids mesh group to the boundary mesh group by the following helper script:

Code: Select all

def copySolidFacesGroup(solidGrp,faceGrp):
 msh1 = App.ActiveDocument.getObject('FEMMeshGmsh')
 obj1 = msh1.MeshGroupList[solidGrp].References[0][0] # Part::Feature object of CompSolid
 solidIdx = int(msh1.MeshGroupList[solidGrp].References[0][1][0][5:])-1
 fcs = ['Face'+str(i+1) for i, j in enumerate(obj1.Shape.Faces) if any([j.isSame(k) for k in obj1.Shape.Solids[solidIdx].Faces])] #find all Faces in the CompSolid which are shared with the Solids.
 msh1.MeshGroupList[faceGrp].References=[(obj1,(fcs))]
After meshing I exported the mesh to a test3.unv file

Code: Select all

ElmerGrid 8 2 test3.unv -autoclean
I also attached the Elmer project files and results.

greetings
Attachments
FemMeshHelper.py
(1.32 KiB) Downloaded 74 times
PlateCapacitor3.zip
(823.46 KiB) Downloaded 51 times
PlateCapacitor3.FCStd
(336.44 KiB) Downloaded 51 times
Last edited by tcsut on Tue Nov 24, 2020 10:37 am, edited 5 times in total.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #3932 - Selecting solids on interior of CompSolid

Post by Kunda1 »

Cool work around. Does it apply to version 0.19? That's what most of us are running on the form these days. Especially anything that has to do with the FEM workbench

Edit: typos
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
ddovod
Posts: 2
Joined: Tue Jun 29, 2021 7:34 pm

Re: Ticket #3932 - Selecting solids on interior of CompSolid

Post by ddovod »

Good day everyone.

I've just faced exactly this issue trying to complete the FEM + CompSolid tutorial and wasn't able to do this. I'm using FreeCAD 0.19.2 (24291) and just wanted to ask if there's any progress on this issue. Probably there're some dev/nightly build with proper solid selection or something like this?

Thank you very much!
Post Reply