<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    As the Plugin MathEval creates a new view, the background mesh is
    not longer View[0] but View[1].<br>
    <br>
    The correct script is thus:<br>
    <br>
    // Merge the image (this will create a new post-processing view,<br>
    // View[0])<br>
    Merge "cg.jpg";<br>
    <br>
    // Modify the normalized pixel values to make them reasonnable<br>
    // characteristic lengths for the mesh<br>
    Plugin(MathEval).Expression0 = "v0 * 10";<br>
    Plugin(MathEval).Run;<br>
    <br>
    // Apply the view as the current background mesh<br>
    Background Mesh View[1];<br>
    <br>
    // Build a simple geometry on top of the background mesh<br>
    w = View[1].MaxX;<br>
    h = View[1].MaxY;<br>
    Point(1)={0,0,0,w};<br>
    Point(2)={w,0,0,w};<br>
    Point(3)={w,h,0,w};<br>
    Point(4)={0,h,0,w};<br>
    Line(1) = {1,2};<br>
    Line(2) = {2,3};<br>
    Line(3) = {3,4};<br>
    Line(4) = {4,1};<br>
    Line Loop(5) = {3,4,1,2};<br>
    Plane Surface(6) = {5};<br>
    <br>
    <br>
    <br>
    On 16/09/10 15:01, Emilie Sauvage wrote:
    <blockquote
cite="mid:24acd1e82ebcb7b7f8f6e83ce70944c8.squirrel@mmp.sipr-dc.ucl.ac.be"
      type="cite">
      <pre wrap="">Dear Christophe,

I tried to use your picture (cg.jpg) and script to test remeshing with a
background picture. I have the latest svn version of Gmsh. It looks like
the syntax to call the "MathEval" plugin changed a bit. However even with
this modification, the script still doesn't seem to work properly. Do you
have an idea what is wrong?

Is this "background remeshing" supposed to work in 3D also?

Thanks a lot.

Emilie Sauvage.</pre>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
gmsh mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gmsh@geuz.org">gmsh@geuz.org</a>
<a class="moz-txt-link-freetext" href="http://www.geuz.org/mailman/listinfo/gmsh">http://www.geuz.org/mailman/listinfo/gmsh</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Dr. Ir. Ruth V. Sabariego
University of Liege, Dept. of Electrical Engineering & Computer Science, 
Applied & Computational Electromagnetics (ACE),
phone: +32-4-3663737 - fax: +32-4-3662910 - <a class="moz-txt-link-freetext" href="http://ace.montefiore.ulg.ac.be/">http://ace.montefiore.ulg.ac.be/</a>
</pre>
  </body>
</html>