[Gmsh] Skipping surface on conversion from STEP to geo_unrolled
Christophe Geuzaine
cgeuzaine at uliege.be
Thu Apr 4 15:00:36 CEST 2019
> On 4 Apr 2019, at 03:32, Gavin Ridley <gavin.keith.ridley at gmail.com> wrote:
>
> Unfortunately I cannot share this STEP file in particular. It's a bit big for sake of example anyways. Even better, could you show how to modify import.geo from the demos directory so that the cylindrical surface on the inside of the nut is split into two cylinders by a plane perpendicular to the axis of the nut's hole? Then one BC could be applied below a certain axial level (along the axis of the nut's hole) and a separate one above that plane?
>
> Physically, I need to do this since I'm trying to model a pipe which has one section of it wrapped in heating tape, and another section insulated.
>
> If this isn't straightforward, I will just go back and modify the CAD. Seems that most CAD software has a tool for splitting surfaces.
>
Sure - you can use boolean operations:
SetFactory("OpenCASCADE");
Cylinder(1) = {0.5,0.5,-0.5, 0,0,1, 0.1};
Rectangle(100) = {0,0,0,1,1,0};
BooleanFragments{ Volume{1}; Delete; }{ Surface{100}; Delete; }
Christophe
> On Wed, Apr 3, 2019 at 4:13 PM <cgeuzaine at uliege.be> wrote:
>
>
> Le 3 avr. 2019 à 21:51, Gavin Ridley <gavin.keith.ridley at gmail.com> a écrit :
>
>> Hi Dr. Geuzaine,
>>
>> Thanks for your response. I see the problem here now. It doesn't work after meshing, although the geometry seems to load to the GUI. Unfortunately, I need to split a surface into two surfaces, and it seems there's no way to do that to the STEP file using what's available under the OpenCASCADE kernel right now.
>
> Can you share the STEP file? It should be possible to do what you want directly in Gmsh.
>
>
>> I was hoping to be able to convert the STEP to gmsh-style geometry, then delete a surface (and its dependent volumes) and replace it with a new, split one. I'll just have to change the CAD then re-export, I suppose.
>>
>> Thanks again!
>>
>> On Wed, Apr 3, 2019 at 3:11 PM Christophe Geuzaine <cgeuzaine at uliege.be> wrote:
>>
>>
>> > On 3 Apr 2019, at 18:23, Gavin Ridley <gavin.keith.ridley at gmail.com> wrote:
>> >
>> > Hi,
>> >
>> > I would just like to note something to the developers regarding a perhaps unnecessary skipping of surfaces in the code.
>> >
>> > I recently have had to convert a STEP file with fairly complicated geometry to a GEO.
>>
>> Don't do that. By design, Gmsh never translates from one CAD format to another. The "unrolled GEO" feature is there for unrolling complex GEO scripts. It can indeed export a limited subset of geometrical entities created by other CAD kernels, but it's there only for debugging.
>>
>> If you want to modify a STEP model, set
>>
>> SetFactory("OpenCASCADE");
>>
>> at the beginning of your script. Since we import STEP models with OpenCASCADE, this will allow you to modify the file directly with OpenCASCADE. See https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/boolean/import.geo for an example.
>>
>> Christophe
>>
>>
>>
>>
>> > This is done so that I can split one of the surfaces in the STEP file to set different BCs on different parts of the surface. At the moment, it appears that gmsh will skip several surfaces in the conversion from STEP to geo_unrolled unnecessarily: surfaces were left out from the gmsh file. A warning message comes with this.
>> >
>> > It seems, however, that the skipped surfaces work fine if you just go back in and add surfaces manually. Gmsh now reads the geo file correctly.
>> >
>> > So, why are these surfaces being skipped? Is there some ambiguity about their interpretation from STEP? It would be nice to not have to manually go in and add the surfaces.
>> >
>> > --
>> > Thanks,
>> > Gavin Ridley
>> > _______________________________________________
>> > 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
>>
>>
>>
>>
>>
>> --
>> Thanks,
>> Gavin Ridley
>
>
> --
> Thanks,
> Gavin Ridley
—
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