<html><head></head><body><div class="ydpe82401a5yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div></div>
        <div>Hi Christophe,</div><div><br></div><div>It works great!</div><div><br></div><div>Thanks for the fast reply.</div><div><br></div><div>Best regards,</div><div><br></div><div>Marco</div><div><br></div>
        
        </div><div id="ydp7569a4f4yahoo_quoted_0277466557" class="ydp7569a4f4yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    Il mercoledì 17 ottobre 2018, 20:34:00 CEST, Christophe Geuzaine <cgeuzaine@uliege.be> ha scritto:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div dir="ltr"><br clear="none"><br clear="none">> On 16 Oct 2018, at 23:00, Marco Antolovic <<a shape="rect" href="mailto:marco_antolovic@yahoo.it" rel="nofollow" target="_blank">marco_antolovic@yahoo.it</a>> wrote:<br clear="none">> <br clear="none">> Hi all,<br clear="none">> <br clear="none">> I'm trying to get the bounding box of a set of volumes grouped in an array (several_volumes()). To do so, I say:<br clear="none">> <br clear="none">> samp = BoundingBox Volume { several_volumes() };<br clear="none">> <br clear="none">> and I get an error ( "syntax error ())")<br clear="none">> <br clear="none">> But if I say:<br clear="none">> <br clear="none">> samp = BoundingBox Volume { several_volumes(0) };<br clear="none">> <br clear="none">> everything is ok, I get the bounding box of only one volume. Is this a bug?<br clear="none">> <br clear="none"><br clear="none">The command was indeed only coded for a single entity.<br clear="none"><br clear="none">I have added the more general case, where you can now give a list of entities. You can test it with the latest snapshot.<br clear="none"><br clear="none">Christophe<div class="ydp7569a4f4yqt7937647238" id="ydp7569a4f4yqtfd06548"><br clear="none"><br clear="none">> <br clear="none">> To further explain my problem I have prepared a small script:<br clear="none">> <br clear="none">> SetFactory("OpenCASCADE");<br clear="none">> <br clear="none">> total = newreg;<br clear="none">> Cone(total) = {0.2, -0.2, -0.2, 0, 0, 1, .8, 0, 2*Pi};<br clear="none">> <br clear="none">> total() += newreg;<br clear="none">> Cone(total(1)) = {0.2, -0.2, -0.2, 0, 0, -1, .8, 0, 2*Pi};<br clear="none">> <br clear="none">> samp = BoundingBox Volume { total(0)};  // this command gives no problem<br clear="none">> //samp = BoundingBox Volume { total(1)};  // this command gives no problem<br clear="none">> //samp = BoundingBox Volume { total()};  // this command gives problem<br clear="none">> <br clear="none">> x_s = samp(0);<br clear="none">> y_s = samp(1);<br clear="none">> z_s = samp(2);<br clear="none">> <br clear="none">> dxs = Abs(samp(0)-samp(3));<br clear="none">> dys = Abs(samp(1)-samp(4));<br clear="none">> dzs = Abs(samp(2)-samp(5));<br clear="none">> <br clear="none">> Box(newreg) = {x_s, y_s,  z_s, dxs, dys, dzs};<br clear="none">> <br clear="none">> <br clear="none">> Best regards,<br clear="none">> <br clear="none">> Marco</div><br clear="none">> _______________________________________________<br clear="none">> gmsh mailing list<br clear="none">> <a shape="rect" href="mailto:gmsh@onelab.info" rel="nofollow" target="_blank">gmsh@onelab.info</a><br clear="none">> <a shape="rect" href="http://onelab.info/mailman/listinfo/gmsh" rel="nofollow" target="_blank">http://onelab.info/mailman/listinfo/gmsh</a><br clear="none"><br clear="none">— <br clear="none">Prof. Christophe Geuzaine<br clear="none">University of Liege, Electrical Engineering and Computer Science <br clear="none"><a shape="rect" href="http://www.montefiore.ulg.ac.be/~geuzaine" rel="nofollow" target="_blank">http://www.montefiore.ulg.ac.be/~geuzaine</a><br clear="none"><br clear="none">Free software: <a shape="rect" href="http://gmsh.info " rel="nofollow" target="_blank">http://gmsh.info </a>| <a shape="rect" href="http://getdp.info " rel="nofollow" target="_blank">http://getdp.info </a>| <a shape="rect" href="http://onelab.info" rel="nofollow" target="_blank">http://onelab.info</a><div class="ydp7569a4f4yqt7937647238" id="ydp7569a4f4yqtfd33225"><br clear="none"></div></div></div>
            </div>
        </div></body></html>