[Gmsh] problem with BoundingBox Volume{}

Marco Antolovic marco_antolovic at yahoo.it
Tue Oct 16 23:00:04 CEST 2018


Hi all,
I'm trying to get the bounding box of a set of volumes grouped in an array (several_volumes()). To do so, I say:
samp = BoundingBox Volume { several_volumes() };
and I get an error ( "syntax error ())")
But if I say:

samp = BoundingBox Volume { several_volumes(0) };

everything is ok, I get the bounding box of only one volume. Is this a bug?

To further explain my problem I have prepared a small script:
SetFactory("OpenCASCADE");
total = newreg;Cone(total) = {0.2, -0.2, -0.2, 0, 0, 1, .8, 0, 2*Pi};
total() += newreg;Cone(total(1)) = {0.2, -0.2, -0.2, 0, 0, -1, .8, 0, 2*Pi};
samp = BoundingBox Volume { total(0)};  // this command gives no problem//samp = BoundingBox Volume { total(1)};  // this command gives no problem//samp = BoundingBox Volume { total()};  // this command gives problem
x_s = samp(0);y_s = samp(1);z_s = samp(2);
dxs = Abs(samp(0)-samp(3));dys = Abs(samp(1)-samp(4));dzs = Abs(samp(2)-samp(5));
Box(newreg) = {x_s, y_s,  z_s, dxs, dys, dzs};

Best regards,
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20181016/81727a47/attachment.html>


More information about the gmsh mailing list