[Gmsh] gmsh 4.5.6: Creating a mesh from .vtk files - Surface is not remeshing but only the Volume
Lisa Pankewitz
lisa at simula.no
Tue Jun 23 15:38:01 CEST 2020
That is awesome and neat, thanks so much! Also for commenting in the script!
Running the script (with the modified File_2) using the latest snapshot on
mac ( checked the git commit) resulted in 16 errors.
I double checked that I downloaded the correct version ( mesh and .log
attached).
Kind regards,
Lisa
----------------------------------------------------------------------------------------------------------------------
*Lisa Pankewitz*
PhD student
Simula Research Laboratory
Martin Linges vei 25
1364 Fornebu
Office 329
lisa at simula.no
On Tue, 23 Jun 2020 at 13:35, Christophe Geuzaine <cgeuzaine at uliege.be>
wrote:
>
>
> > On 23 Jun 2020, at 10:16, Lisa Pankewitz <lisa at simula.no> wrote:
> >
> > Hi Christophe,
> >
> > Thanks for the clarification, I misunderstood.
> >
> > Could you maybe point me to a tutorial or an example that elaborates a
> bit more on how I would now tag the surfaces manually based on the vtk
> providing the boundaries?
> > I assume you tagged the surfaces and volume afterwards in order to
> create the nice figure you sent?
>
> No I just used the script and set nice colors. After looking at your file
> in more detail though, we could actually do without reclassifying the input
> mesh if
>
> 1. we improve the VTK reader to create one surface per file (instead of
> loading all the triangles in a single surface)
> 2. you fix File_2.vtk (which has triangles oriented inconsistently)
>
> I just coded 1. and manually fixed 2. Here's the resulting script, nice
> and easy ;-)
>
>
>
> You'll need the latest development snaphot to test it.
>
> Christophe
>
> >
> > Thanks!
> >
> >
> > Kind regards,
> >
> > Lisa
> >
> >
> ----------------------------------------------------------------------------------------------------------------------
> > Lisa Pankewitz
> > PhD student
> > Simula Research Laboratory
> > Martin Linges vei 25
> > 1364 Fornebu
> > Office 329
> > lisa at simula.no
> >
> >
> >
> > On Tue, 23 Jun 2020 at 08:30, Christophe Geuzaine <cgeuzaine at uliege.be>
> wrote:
> >
> >
> > > On 22 Jun 2020, at 19:14, Lisa Pankewitz <lisa at simula.no> wrote:
> > >
> > > Dear Christophe,
> > >
> > > thanks so much for your helpful and fast response. It is really
> appreciated!
> > >
> > > Just to double check: Does that mean that the assignment of surface
> names with the syntax I used before does not work any longer in gmsh ?
> > >
> >
> > It does of course. But when new surfaces are created (by
> ClassifySurfaces) you'll need to identify them as well.
> >
> > > Thanks so much and have a great day :)
> > > Kind regards,
> > >
> > > Lisa
> > >
> > >
> ----------------------------------------------------------------------------------------------------------------------
> > > Lisa Pankewitz
> > > PhD student
> > > Simula Research Laboratory
> > > Martin Linges vei 25
> > > 1364 Fornebu
> > > Office 329
> > > lisa at simula.no
> > >
> > >
> > >
> > > On Mon, 22 Jun 2020 at 18:10, Christophe Geuzaine <cgeuzaine at uliege.be>
> wrote:
> > > Hi Lisa,
> > >
> > > Your script seems quite complicated. Here's a simple one that produces
> a decent mesh:
> > >
> > > Merge "File_1.vtk";
> > > Merge "File_2.vtk";
> > > Merge "File_3.vtk";
> > > Merge "File_4.vtk";
> > > Merge "File_5.vtk";
> > > Merge "File_6.vtk";
> > > Merge "File_7.vtk";
> > >
> > > Coherence Mesh; // remove duplicate mesh nodes
> > >
> > > ClassifySurfaces{21 * Pi/180, 1, 0 /* or 1 */, 40 * Pi / 180};
> > > CreateGeometry;
> > >
> > > Mesh.CharacteristicLengthMax = 10;
> > > Mesh.CharacteristicLengthMin = 0.1;
> > > Mesh.CharacteristicLengthFromCurvature = 1;
> > > Mesh.MinimumElementsPerTwoPi = 20;
> > >
> > > s() = Surface{:};
> > > Surface Loop(1) = s();
> > > Volume(1) = 1;
> > >
> > > We still need to add some tools to automate the identification of
> curves/surfaces created by ClassifySurfaces. For now you'll need to tag
> them manually (or use some geometrical tests, e.g. using the Gmsh API).
> > >
> > > Christophe
> > >
> > > <ok.png>
> > >
> > >
> > >
> > >> On 22 Jun 2020, at 17:25, Lisa Pankewitz <lisa at simula.no> wrote:
> > >>
> > >> To whom it may concern,
> > >>
> > >> I am trying to remesh a geometry based on .vtk files.
> > >> I merge 7 .vtk files. 4 vtk files are used to create a surface that
> consists of 4 compounds. All 7 surfaces together define the volume. I
> assign tags (names) to the physical surfaces, which I need in later steps.
> Unfortunately, I realized the surface does not remesh. I checked several
> tutorials and parameters but could not yet find a possibility to keep the
> tags and remesh the surface and the volume in the assigned characteristic
> length in gmsh version 4.
> > >> I tried
> > >> '''
> > >> RefineMesh
> > >> '''
> > >> but this only splits the elements instead of performing an optimal
> refinement.
> > >>
> > >> Do you by chance know what I could assign in order to remesh the
> surface AND the volume and not only the volume?
> > >>
> > >> Thanks so much for your time and have a wonderful day!
> > >> Kind regards,
> > >>
> > >> Lisa
> > >>
> > >>
> ----------------------------------------------------------------------------------------------------------------------
> > >> Lisa Pankewitz
> > >> PhD student
> > >> Simula Research Laboratory
> > >> Martin Linges vei 25
> > >> 1364 Fornebu
> > >> Office 327
> > >> lisa at simula.no
> > >>
> > >>
> <File_4.vtk><File_3.vtk><File_2.vtk><complex.geo><File_1.vtk><File_5.vtk><File_6.vtk><File_7.vtk>_______________________________________________
> > >> 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
> > >
> > >
> > >
> > > _______________________________________________
> > > 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
> >
> >
> >
>
> —
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20200623/e5be9b4a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20200623_remesh.out
Type: application/octet-stream
Size: 612968 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20200623/e5be9b4a/attachment-0001.out>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20200623_remeshing.msh
Type: application/octet-stream
Size: 3055493 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20200623/e5be9b4a/attachment-0001.msh>
More information about the gmsh
mailing list