[Gmsh] Finding entity properties

Christophe Geuzaine cgeuzaine at uliege.be
Mon Dec 4 13:10:24 CET 2017



> On 3 Dec 2017, at 11:40, andrew <armitatz at gmail.com> wrote:
> 
> Hi,
> 
> Is there a way to access the properties of an entity like area/volume/length?. For example in the Boolean.geo demo is there a command like
> 
> Volume[8].Area or Volume[8].volume?
> 

No, this is not trivial. The best way is to mesh the entity, and to compute the volume. See

https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/post_processing/compute_area_volume.geo

for an example.

> Or is there a way to do it in the API?
> 

Yes, you could use the new API to reproduce the same workflow as in the above script.

Christophe

> kind regards
> Andrew
> 
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info




More information about the gmsh mailing list