[Gmsh] Point coordinates at python api

Christophe Geuzaine geuzaine at gmail.com
Thu May 17 21:12:04 CEST 2018



> On 17 May 2018, at 14:39, Jeremy Theler <jeremy at seamplex.com> wrote:
> 
> 
> 
> On Thu, 2018-05-17 at 08:46 +0200, Christophe Geuzaine wrote:
>> How could I get point coordinates at python api?
>> gmsh.model.getBoundingBox(0, point_tag)
> 
> Is there any way to get the center of gravity of a volume or surface?
> 

No, the actual center of gravity requires a mesh - you could mesh (even relatively coarsely) and compute it then using the api by looping over the elements.

Without a mesh, you could use the center of the bounding box as a (crude) approximation.

> 
> --
> jeremy
> www.seamplex.com
> 
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh




More information about the gmsh mailing list