[Gmsh] Using OpenCASCADE Boolean to create transfinite surfaces (Boundary) which maintain Transfinite mesh

Christophe Geuzaine cgeuzaine at uliege.be
Tue Mar 10 22:25:09 CET 2020



> On 10 Mar 2020, at 15:57, William Logie <will.logie at anu.edu.au> wrote:
> 
> Dear Gmsh Members,
> 
> I was wondering if anyone can recommend a way for me to create Transfinite Surfaces with the OpenCASCADE kernel which then can be relocated in space (translated/rotated) while maintaining the Transfinite Mesh defined on original curves/surfaces or created through extrusion?

That's not supported (at least not yet).

The meshing constraints for OpenCASCADE shapes are actually stored as attributes linked to the geometrical location of the entities (and their bounding box). We could move/modify the attributes when a shape is transformed, but it's going to be at best a partial solution (like Geometry.CopyMeshingMethod for the built-in kernel, which only deals with transfinite constraints - extrusions cannot be copied, as the geometrical transformation is provided explicitly.)

Christophe


> 
> My reasons for using OCC is to piece together volumes (various pipe extrusions), then remove internal surfaces between them with BooleanUnion, and finally delete the Volume (and ends) to leave a surface shell.
> 
> Here, a MWE:
> 
> // UNITS mm
> SetFactory("OpenCASCADE");
> Geometry.CopyMeshingMethod=1;
> Mesh.CharacteristicLengthMin=0.1;
> Mesh.CharacteristicLengthMax=0.3;
> 
> theta = Pi*30/180;
> 
> // Create OCC disk, define circumference as Transfinite Curve and Extrude
> Disk(1) = {0, 0, 0, 0.5};
> Transfinite Curve{1} = 30;
> Extrude {{1, 0, 0}, {0, -10, 0}, theta} {
>   Surface{1}; Layers{20}; Recombine;
> }
> Extrude {{1, 0, 0}, {0, 10, 0}, theta} {
>   Surface{1}; Layers{20}; Recombine;
> }
> 
> // Transfinite Cyclinder Surface Mesh is lost with Translate, Rotate or Affine, despite Geometry.CopyMeshingMethod=1 being set, e.g.:
> Affine {Cos(theta),Sin(theta),0,0, -Sin(theta),Cos(theta),0,0, 0,0,1,0} {Volume{1,2};}
> 
> Many Thanks,
> Will.
> --
> William Logie
> PhD Candidate
> Research School of Engineering
> The Australian National University
> Canberra ACT 2601
> _______________________________________________
> 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






More information about the gmsh mailing list