<html><head></head><body><div><br></div><div><br></div><div>On Thu, 2018-05-17 at 21:12 +0200, Christophe Geuzaine wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre>On Thu, 2018-05-17 at 08:46 +0200, Christophe Geuzaine wrote:</pre><pre>How could I get point coordinates at python api?</pre><pre>gmsh.model.getBoundingBox(0, point_tag)</pre><pre>Is there any way to get the center of gravity of a volume or surface?</pre><pre>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.</pre><pre><br></pre></blockquote><pre><br></pre><pre>OCC provides that information through brepgprop_VolumeProperties, brepgprop_SurfaceProperties and brepgprop_LinearProperties.</pre><pre>There is a CentreOfMass() method that returns a vector. There also exists a Mass() method that gives either the volume, surface or length of the entity.</pre><pre>I call them through PythonOCC, but if that interface was provided by Gmsh API then I would not need to read the same BREP file both with PythonOCC and Gmsh.</pre><pre><br></pre><pre>BTW, I love the new Gmsh API :-)</pre><pre><br></pre><pre>--</pre><pre>jeremy theler</pre><pre>www.seamplex.com</pre></body></html>