> On 27 Mar 2020, at 11:21, Tobias Lichti Fraunhofer ITWM 
> <tobias.lic...@itwm.fraunhofer.de> wrote:
> 
> Hello all,
> 
> I have a question regarding the values of above variables/function output.
> 
> If my model is a cube of e.g. [Xmin , Ymin , Zmin , Xmax , Ymax , Zmax] = 
> [0,0,0,5,5,5] and I calculate the boundingBox of the model I will obtain 
> [0-1e-7 , 0-1e-7 , 0-1e-7 , 5+1e-7 , 5+1e-7 , 5+1e-7].
> The variables General.MinX/Y/Z and General.MaxX/Y/Z as well have an offset of 
> 1e-7.
> 
> This offset seems to be independent from Geometry.Tolerance.

Indeed, this is the internal tolerance of OpenCASCADE. To be on the safe side, 
OCC always adds this tolerance to its bounding boxes. Moreover, OCC bounding 
boxes are not guaranteed to be tight - they are sometimes actually completely 
unusable because they are much larger than the actual geometry.

To mitigate this issue, the latest development snapshot introduces a new 
option: "Geometry.OCCBoundsUseStl". If you set it to 1, the bounding boxes of 
OCC shapes are computed using to the STL mesh. They might be too small compared 
to the true shape (for curved surfaces), but this way you can at least choose 
your poison ;-)

See e.g. https://gitlab.onelab.info/gmsh/gmsh/-/blob/master/tutorial/t18.geo 
for an example.

Christophe

> 
> Can anyone tell me how the offset can be controlled or how it is defined?
> I am also grateful for every hint about how is the best way to get the exact 
> bounding box of the model.
> 
> Best regards and thanks in advance!
> Tobias
> 
> 
> 
> -- 
> Tobias Lichti
> Fraunhofer-Platz 1, 67663 Kaiserslautern, Germany
> Telefon: +49 631 31600-4974, Fax: +49 631 31600-5974
> mailto: tobias.lic...@itwm.fraunhofer.de
> www.itwm.fraunhofer.de
> 
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh@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




_______________________________________________
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh

Reply via email to