[Gmsh] Merge of a surface overwrites an existing Surface( 1 )?
Rich Bayless
richard.bayless at att.net
Fri Jun 26 15:07:26 CEST 2009
Hi Mike,
Try this:
//start
//bring in the stl file
Merge "sph.stl";
// define the surface of the stl
Surface Loop(1) = {1};
// define the volume of the stl
Volume(1) = {1};
// then your geometry
Point( 1 ) = { -5 , -5 , -1 };
Point( 2 ) = { -5 , 5 , -1 };
Point( 3 ) = { 5 , 5 , -1 };
Point( 4 ) = { 5 , -5 , -1 };
Line( 1 ) = { 1, 2 };
Line( 2 ) = { 2, 3 };
Line( 3 ) = { 3, 4 };
Line( 4 ) = { 4, 1 };
Line Loop( 1 ) = {1, 2, 3, 4};
// define the rectangle, but as surface 2
Plane Surface( 2 ) = { 1 };
//end
Cheers, Rich
-------------- Original message from "Mike B." <mb78aa at yahoo.com>: --------------
Hi All,
It seems that `Merge' of a surface (STL file in my case) overwrites Surface( 1 ).
For example, this file defines a plane surface (rectangle) and imports a sphere saved in an STL file:
Point( 1 ) = { -5 , -5 , -1 };
Point( 2 ) = { -5 , 5 , -1 };
Point( 3 ) = { 5 , 5 , -1 };
Point( 4 ) = { 5 , -5 , -1 };
Line( 1 ) = { 1, 2 };
Line( 2 ) = { 2, 3 };
Line( 3 ) = { 3, 4 };
Line( 4 ) = { 4, 1 };
Line Loop( 1 ) = {1, 2, 3, 4};
// define the rectangle
Plane Surface( 1 ) = { 1 };
Merge "sph.stl";
After running Gmsh shows only there is only surface( 1 ) which is the sphere and not the rectangle. Is this how it's supposed to work?.
Cheers,
Mike.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20090626/6b05ddf2/attachment.html>