|
As the Plugin MathEval creates a new view, the background mesh is
not longer View[0] but View[1]. The correct script is thus: // Merge the image (this will create a new post-processing view, // View[0]) Merge "cg.jpg"; // Modify the normalized pixel values to make them reasonnable // characteristic lengths for the mesh Plugin(MathEval).Expression0 = "v0 * 10"; Plugin(MathEval).Run; // Apply the view as the current background mesh Background Mesh View[1]; // Build a simple geometry on top of the background mesh w = View[1].MaxX; h = View[1].MaxY; Point(1)={0,0,0,w}; Point(2)={w,0,0,w}; Point(3)={w,h,0,w}; Point(4)={0,h,0,w}; Line(1) = {1,2}; Line(2) = {2,3}; Line(3) = {3,4}; Line(4) = {4,1}; Line Loop(5) = {3,4,1,2}; Plane Surface(6) = {5}; On 16/09/10 15:01, Emilie Sauvage wrote: 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._______________________________________________ gmsh mailing list [email protected] http://www.geuz.org/mailman/listinfo/gmsh -- 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 - http://ace.montefiore.ulg.ac.be/ |
_______________________________________________ gmsh mailing list [email protected] http://www.geuz.org/mailman/listinfo/gmsh
