[Gmsh] extrude OpenCASCADE Boolean union doesn't work

Christophe Geuzaine cgeuzaine at ulg.ac.be
Wed Sep 27 14:18:10 CEST 2017



> On 27 Sep 2017, at 14:09, Nico Schlömer <nico.schloemer at gmail.com> 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 <cgeuzaine at ulg.ac.be> wrote:
> 
> 
> > On 27 Sep 2017, at 14:03, Nico Schlömer <nico.schloemer at gmail.com> 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
> > 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
> 

-- 
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