[Gmsh] problem with BoundingBox Volume{}
Christophe Geuzaine
cgeuzaine at uliege.be
Wed Oct 17 20:33:59 CEST 2018
> On 16 Oct 2018, at 23:00, Marco Antolovic <marco_antolovic at yahoo.it> wrote:
>
> 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?
>
The command was indeed only coded for a single entity.
I have added the more general case, where you can now give a list of entities. You can test it with the latest snapshot.
Christophe
>
> 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
> _______________________________________________
> 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