> "bo1()" (or "bo1[]", parentheses and square brackets can both be used
Ah, I didn't even know that. The fact that `foo[]` refers to the list and `foo` to its first element gets me every time. Cheers, Nico On Wed, Sep 27, 2017 at 2:18 PM Christophe Geuzaine <[email protected]> wrote: > > > > On 27 Sep 2017, at 14:09, Nico Schlömer <[email protected]> > wrote: > > > > > ex1[] = Extrude{0,0,1}{Surface{bo1()};}; > > > > As a general rule, do OpenCASCADE entities always only work with round > brackets? > > > > No, it's just that "bo1()" is a list: "bo1" refers to the first element in > the list; "bo1()" (or "bo1[]", parentheses and square brackets can both be > used - I tend to prefer parentheses) returns the full list. > > > Cheers, > > Nico > > > > On Wed, Sep 27, 2017 at 2:07 PM Christophe Geuzaine <[email protected]> > wrote: > > > > > > > On 27 Sep 2017, at 14:03, Nico Schlömer <[email protected]> > wrote: > > > > > > Hi everyone, > > > > > > The following code forms a union of a rectangle and two disks, and > aims to extrude the resulting shape. > > > ``` > > > SetFactory("OpenCASCADE"); > > > > > > Mesh.CharacteristicLengthMin = 0.1; > > > Mesh.CharacteristicLengthMax = 0.1; > > > > > > s0 = news; > > > Rectangle(s0) = {-1.0, -1.0, 0.0, 2.0, 2.0}; > > > > > > s1 = news; > > > Disk(s1) = {-1.0, 0.0, 0.0, 0.5}; > > > > > > s2 = news; > > > Disk(s2) = {1.0, 0.0, 0.0, 0.5}; > > > > > > bo1[] = BooleanUnion{Surface {s0}; Delete;} {Surface {s1,s2}; Delete;}; > > > > > > ex1[] = Extrude{0,0,1}{Surface{bo1};}; > > > ``` > > > However, it appears that only the _difference_ between the rectangle > and the disks is extruded. > > > > > > Any idea what's going on? > > > > The last line should be > > > > ex1[] = Extrude{0,0,1}{Surface{bo1()};}; > > > > > > > > > > Cheers, > > > Nico > > > _______________________________________________ > > > gmsh mailing list > > > [email protected] > > > 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 > > > > -- > 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 > >
_______________________________________________ gmsh mailing list [email protected] http://onelab.info/mailman/listinfo/gmsh
