Getting the vertice numbers of a subset of vertices

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
Mantabit
Posts: 4
Joined: Thu Dec 20, 2018 3:36 pm

Getting the vertice numbers of a subset of vertices

Post by Mantabit »

Hello everyone,

I am new to FEM simulations and I got started using the Fenics solver. I want to use FreeCad to model the geometry of my simulations and create the mesh. However, I basically ran into the following problem: Assume I want to create a domain D which consists of multiple subdomains D1,D2,D3 (see also body.png), is there a way (Macro etc.) to get a list of the vertices contained in a certain subdomain? Let's say I want to have the numbers of all mesh-vertices which are contained in the half-sphere of the body shown in body.png, is there a way to get access to a list containing these vertices numbers?

(In the example shown, it would of course be possible to test for each vertex programmatically if it lies in the subdomain of interest since the geometry is simple but I am looking for a general way of obtaining the vertex-numbers of subdomains)

Thanks!
Attachments
domains.fcstd
(81.96 KiB) Downloaded 23 times
body.png
body.png (132.2 KiB) Viewed 390 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Getting the vertice numbers of a subset of vertices

Post by bernd »

strange geometry ... See tree view the cube material_0 and material_02 is the same cube ...
Attachments
Screenshot_20190101_201606.png
Screenshot_20190101_201606.png (493.35 KiB) Viewed 373 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Getting the vertice numbers of a subset of vertices

Post by bernd »

BTW your CompSolid has four solids, the right cube, the left cube without downside half sphere, the downside half sphere and the upper half sphere. If you only would like to have three you should only use three solids ...
Post Reply