[Gmsh] BUG (Draw): Re: Sleep command.

Maka Mohu maka.mohu at gmail.com
Wed Jan 23 14:20:57 CET 2008


Thanks to all for suggestions. Richard trick worked. According to Draw
command description, it seems to be a BUG. Draw does not update the scene.
This a working example. Have a nice day!

--------------------------------------------------
lc = 0.2;
Point(1) = {0,0,0,lc};
Point(2) = {1,0,0,lc};
Point(6) = {0,0,3,lc};
Line(1) = {1,2};
Line(2) = {2,6};
Line(3) = {6,1};
Line Loop(4) = {2,3,1};
Plane Surface(5) = {4};

Extrude {{0,0,1}, {0,0,0}, Pi/2} { Surface{5}; }
Extrude {{0,0,1}, {0,0,0}, Pi/2} { Surface{17}; }

// added lines:
Draw;
// needed trick because Draw does not update the scene (possible BUG).
Print "dummy_view.jpg";
Sleep 5;

Extrude {{0,0,1}, {0,0,0}, Pi/2} { Surface{29}; }
Extrude {{0,0,1}, {0,0,0}, Pi/2} { Surface{41}; }


--------------------------------------------------

Best regards,
Maka

On Jan 23, 2008 12:39 PM, Richard George <reg28 at cam.ac.uk> wrote:

>
> I found a similar thing, but the tutorial t8.geo works perfectly.
>
> //doesn't work with my meshes
> Draw;
> Sleep 5;
>
> Perhaps it's a bug in the Draw command, or perhaps the viewport
> variables have to be set up in order to get it to work?
>
> Thing to try: Print to a dummy file a couple of times in between Draw
> and Sleep, it seems to run some extra viewport setup code and this
> works with my mesh?
>
> // works with my meshes
> Draw; Print "dummy_view.jpg";
> Draw; Print "dummy_view.jpg";
> Sleep 5;
>
>
>
>
>
> On Wed, 2008-01-23 at 11:48 +0100, Maka Mohu wrote:
> > Thanks for your help. I tried it but it did not see the delay that is
> > supposed to be used by Sleep. I split the content of the file over 3
> > pieces as suggested but it had the same result.
> >
> > Even if it worked it is inconvenient. The objective is: assume you
> > have a very complex shape built by gmsh by other colleague and you
> > want to understand it. You can use /* */ to work on the file piece by
> > piece and save and reload after every change but this is very slow.
> > When I saw Sleep and Draw command, I said that simply one can insert a
> > 10 to 20 "Draw; Sleep 5;" in different place in the file and then one
> > should see a sort of animation of how the geometry was built step by
> > step. Unfortunately, either I did not understand the description of
> > Sleep command or it does not work as described. Thanks again. Have a
> > nice day!
> >
> > On Jan 23, 2008 10:20 AM, Bernhard Kubicek
> > <bernhard.kubicek at arsenal.ac.at> wrote:
> >         Hello!
> >         Maybe you could try to load gmsh view 3 geo files by
> >         splitting:
> >         gmsh load.geo wait.geo finish.geo
> >
> >         IIRC after each loaded geo file, gmsh updates the geometry.
> >         very nice greetings,
> >         bernhard
> >
> >         On Tue, 2008-01-22 at 19:47 +0100, Maka Mohu wrote:
> >         > places
> >
> > _______________________________________________
> > gmsh mailing list
> > gmsh at geuz.org
> > http://www.geuz.org/mailman/listinfo/gmsh
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20080123/e5ca3f47/attachment.html>