<div dir="ltr"><div>Hi Mario,</div><div><br></div><div>The fact that you are using Tcl actually validates our continuing</div><div>support for Tcl, so in a way it is a good thing.</div><div><br></div><div>The best way to get a fully-functional VTK window with Tcl is to</div><div>use Tk. Take a look at these two examples:</div><div><br></div><div> Examples/GUI/Tcl/vtkTkRenderWidgetDemo.tcl</div><div> Examples/GUI/Tcl/MaceTk.tcl</div><div><br></div><div>The MaceTk example provides a window close operation, using</div><div>this call to the window manager:</div><div><br></div><div> wm protocol . WM_DELETE_WINDOW <callback function></div><div><br></div><div>For more information, see the tk documentation, e.g.:</div><div><a href="https://www.tcl.tk/man/tcl8.4/TkCmd/wm.htm">https://www.tcl.tk/man/tcl8.4/TkCmd/wm.htm</a></div><div><br></div><div> - David</div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 15, 2015 at 4:24 PM, Mario Rodriguez <span dir="ltr"><<a href="mailto:biomates@telefonica.net" target="_blank">biomates@telefonica.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div>El 15/12/15 a las 21:51, David Gobbi
escribió:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi Mario,
<div><br>
</div>
</div>
</blockquote>
<br>
Thanks for your kind and quick response.<span class=""><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div>Tcl syntax a mixture of lisp and shell script. The code
will look like this:</div>
<div><br>
</div>
<div> set line [chart AddPlot 0]<br>
</div>
<div><span style="font-size:12.8px"> $line SetInputData table 0
2</span><br>
</div>
</div>
</blockquote>
<br></span>
Now I see where I was wrong. I forgot the dollar symbol.<br>
<br>
After writing:<br>
<br>
[view GetRenderWindow] SetMultiSamples 0<br>
[view GetRenderWindow] Render<br>
<br>
where view was created by<br>
<br>
vtkContextView view<br>
<br>
I successfully get the expected plot.<br>
<br>
The problem now is how to close the window with a mouse click. Any
hints?<span class=""><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">Are you really sure that you
want to use Tcl? <br>
</span></div>
</div>
</blockquote>
<br></span>
Yes, it is mandatory. We have the system Lisp -> Tcl -> Vtk
for drawing 3D scenes from Computer Algebra System Maxima:<br>
<br>
<a href="http://riotorto.users.sourceforge.net/vtk/" target="_blank">http://riotorto.users.sourceforge.net/vtk/</a><br>
<br>
Tcl is a dependency to be satisfied by Maxima, which is also used
for other purposes.<br>
<br>
I am trying to know how far we can go with Vtk for plotting 2D
scenes, in order to extend the Maxima-Vtk interface.<span class=""><br>
<br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div><span style="font-size:12.8px"> Many of the VTK classes</span></div>
<div><span style="font-size:12.8px">and methods that you can use
with Python cannot be used from Tcl, so</span></div>
<div><span style="font-size:12.8px">it might not even be
possible to convert that example into working Tcl</span></div>
<div><span style="font-size:12.8px">code. You're welcome to
try, though.</span></div>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px"> - David</span></div>
<br>
</div>
</blockquote>
<br></span>
Thanks again for your help.<br>
<br>
--<br>
Mario<br>
</div>
</blockquote></div><br></div></div>