[Gmsh] Getting lines' nodes

2020-07-08 Thread Bojan Niceno
Dear all,

Is there a way to fetch curves' (lines' in particular) points? Something
like:

c[] = Point{1}; // c[] contains the coordinates 1,2,3

which is used to get point's coordinates, but I would need lines' points.

Kind regards

Bojan
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Points seem to move on transfinite surface after the recombination

2020-07-08 Thread Bojan Niceno
Dear Christophe,

Oh great, thanks a lot for the fast reply :-)

Best regards,

Bojan



On Wed, Jul 8, 2020 at 1:08 PM Christophe Geuzaine 
wrote:

>
>
> > On 8 Jul 2020, at 12:46, Bojan Niceno 
> wrote:
> >
> > Dear all,
> >
> > I have a problem when trying to mesh planar structured surfaces.
> Although points seem to be uniformly placed on a transfinite surface, they
> move a bit when recombining the mesh to change triangles to quadrilateral
> cells.
> >
> > Here is a simple script which demonstrates it:
> >
> > // Define points
> > Point(1) = {0.0,  0.0,  0.0};
> > Point(2) = {0.5,  0.0,  0.0};
> > Point(3) = {0.0,  0.5,  0.0};
> > Point(4) = {0.7,  0.0,  0.0};
> > Point(5) = {0.0,  0.7,  0.0};
> >
> > // Define connectors from points ...
> > Line  (1) = {2, 4};
> > Circle(2) = {4, 1, 5};
> > Line  (3) = {5, 3};
> > Circle(4) = {3, 1, 2};
> >
> > // ... and set them as transfinite
> > Transfinite Curve {1, 2, 3, 4} = 11 Using Progression 1;
> >
> > // Define surface ...
> > Curve Loop(1) = {1, 2, 3, 4};  Plane Surface(1) = {1};
> >
> > // ... and set it as transfinite too
> > Transfinite Surface {1};
> >
> > So, as I said, generating a 2D mesh over the surface places points
> properly, but command recombine moves them a bit :-/  Is there a way to
> prevent these movements of points?
> >
> > I am also attaching a screenshot of a mesh before and after
> recombination, to illustrate my problem better.
> >
>
> Indeed, recombination a posteriori applies some smoothing. You should add
>
> Recombine Surface{1};
>
> after "Transfinite Surface {1};", which will directly create a quad mesh.
>
> Christophe
>
>
>
>
> > Best regards,
> >
> > Bojan
> >
> > P.S.  I am not sure if attachments go to the mailing list, I've never
> used a mailing list before.
> >
> >
> ___
> > gmsh mailing list
> > gmsh@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@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Unable to select surfaces using GUI

2020-07-08 Thread Christophe Geuzaine


> On 6 Jul 2020, at 21:51, A Chaube  wrote:
> 
> Hello,
> 
> I have a complicated 2D mesh with lots of elements (which I cannot reduce in 
> number), and I am extruding this into a 3D mesh. Upon extrusion, it becomes 
> extremely challenging to keep track of new surfaces (needed for creating 
> sidesets) - the easiest way seems to be to select them using the GUI.
> 
> However, the geometry model has no opacity for surfaces (just a wireframe 
> marker), so everything looks really busy and it is impossible to click on the 
> surface that I wish to select. Making mesh elements visible makes the model 
> visually opaque and less busy, but some surface markers (the dotted crosses) 
> simply disappear, making it impossible to select the right surface without a 
> lot of effort (tracking common curves to deduce surface ID etc).
> 
> Could you please suggest a way to select physical surfaces when you have lots 
> of different surfaces (12-20 per physical surface, and about 10 physical 
> surfaces)?

You could use Tools->Visibility to hide/show only parts of the model, or 
Tools->Clipping. Once you have a mesh you can also only display mesh edges, 
which will allow to "see through".

Christophe

> 
> Thank you.
> Ash.
> ___
> gmsh mailing list
> gmsh@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@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Points seem to move on transfinite surface after the recombination

2020-07-08 Thread Christophe Geuzaine


> On 8 Jul 2020, at 12:46, Bojan Niceno  
> wrote:
> 
> Dear all,
> 
> I have a problem when trying to mesh planar structured surfaces.  Although 
> points seem to be uniformly placed on a transfinite surface, they move a bit 
> when recombining the mesh to change triangles to quadrilateral cells.
> 
> Here is a simple script which demonstrates it:
> 
> // Define points
> Point(1) = {0.0,  0.0,  0.0};
> Point(2) = {0.5,  0.0,  0.0};
> Point(3) = {0.0,  0.5,  0.0};
> Point(4) = {0.7,  0.0,  0.0};
> Point(5) = {0.0,  0.7,  0.0};
> 
> // Define connectors from points ...
> Line  (1) = {2, 4};
> Circle(2) = {4, 1, 5};
> Line  (3) = {5, 3};
> Circle(4) = {3, 1, 2};
> 
> // ... and set them as transfinite
> Transfinite Curve {1, 2, 3, 4} = 11 Using Progression 1;
> 
> // Define surface ...
> Curve Loop(1) = {1, 2, 3, 4};  Plane Surface(1) = {1};
> 
> // ... and set it as transfinite too
> Transfinite Surface {1};
> 
> So, as I said, generating a 2D mesh over the surface places points properly, 
> but command recombine moves them a bit :-/  Is there a way to prevent these 
> movements of points?
> 
> I am also attaching a screenshot of a mesh before and after recombination, to 
> illustrate my problem better.  
> 

Indeed, recombination a posteriori applies some smoothing. You should add

Recombine Surface{1};

after "Transfinite Surface {1};", which will directly create a quad mesh.

Christophe




> Best regards,
> 
> Bojan
> 
> P.S.  I am not sure if attachments go to the mailing list, I've never used a 
> mailing list before.
> 
> ___
> gmsh mailing list
> gmsh@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@onelab.info
http://onelab.info/mailman/listinfo/gmsh