<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3516.2800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#0000ff face=Arial size=2>Dear GMSH users,</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>I have a small problem:</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2>With this code I create a geometrical
form:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>c1 = 0.2;<BR>l1 = 0.2;<BR>l2 =
0.3;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><BR>Point(newp) = {l1, l1,
-(l2-l1)/2, c1};<BR>Point(newp) = {-l1, l1, -(l2-l1)/2, c1};<BR>Point(newp) =
{-l1, -l1, -(l2-l1)/2, c1};<BR>Point(newp) = {l1, -l1, -(l2-l1)/2,
c1};<BR>Point(newp) = {l1, l1, (l2-l1)/2, c1};<BR>Point(newp) = {-l1, l1,
(l2-l1)/2, c1};<BR>Point(newp) = {-l1, -l1, (l2-l1)/2, c1};<BR>Point(newp) =
{l1, -l1, (l2-l1)/2, c1};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>Point(newp) = {l2, l2, -(l2-l1)/2,
c1};<BR>Point(newp) = {-l2, l2, -(l2-l1)/2, c1};<BR>Point(newp) = {-l2, -l2,
-(l2-l1)/2, c1};<BR>Point(newp) = {l2, -l2, -(l2-l1)/2, c1};<BR>Point(newp) =
{l2, l2, (l2-l1)/2, c1};<BR>Point(newp) = {-l2, l2, (l2-l1)/2,
c1};<BR>Point(newp) = {-l2, -l2, (l2-l1)/2, c1};<BR>Point(newp) = {l2, -l2,
(l2-l1)/2, c1};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><BR>Line(1) = {1, 9};<BR>Line(2) =
{9, 13};<BR>Line(3) = {13, 5};<BR>Line(4) = {5, 1};<BR>Line(5) = {5,
6};<BR>Line(6) = {1, 2};<BR>Line(7) = {9, 10};<BR>Line(8) = {13, 14};<BR>Line(9)
= {6, 14};<BR>Line(10) = {14, 10};<BR>Line(11) = {10, 2};<BR>Line(12) = {2,
6};<BR>Line(13) = {2, 3};<BR>Line(14) = {6, 7};<BR>Line(15) = {14,
15};<BR>Line(16) = {10, 11};<BR>Line(17) = {11, 3};<BR>Line(18) = {3,
7};<BR>Line(19) = {7, 15};<BR>Line(20) = {15, 11};<BR>Line(21) = {3,
4};<BR>Line(22) = {7, 8};<BR>Line(23) = {15, 16};<BR>Line(24) = {11,
12};<BR>Line(25) = {4, 12};<BR>Line(26) = {12, 16};<BR>Line(27) = {16,
8};<BR>Line(28) = {8, 4};<BR>Line(29) = {12, 9};<BR>Line(30) = {16,
13};<BR>Line(31) = {4, 1};<BR>Line(32) = {8, 5};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><BR>Line Loop(45) = {1, 2, 3,
4};<BR>Plane Surface(46) = {45};<BR>Line Loop(47) = {12, 9, 10, 11};<BR>Plane
Surface(48) = {47};<BR>Line Loop(49) = {19, 20, 17, 18};<BR>Plane Surface(50) =
{49};<BR>Line Loop(51) = {28, 25, 26, 27};<BR>Plane Surface(52) = {51};<BR>Line
Loop(53) = {-3, -30, 27, 32};<BR>Plane Surface(54) = {53};<BR>Line Loop(55) =
{-30, -26, 29, 2};<BR>Plane Surface(56) = {55};<BR>Line Loop(57) = {29, -1, -31,
25};<BR>Plane Surface(58) = {57};<BR>Line Loop(59) = {31, -4, -32, 28};<BR>Plane
Surface(60) = {59};<BR>Line Loop(61) = {9, -8, 3, 5};<BR>Plane Surface(62) =
{61};<BR>Line Loop(63) = {-7, 2, 8, 10};<BR>Plane Surface(64) = {63};<BR>Line
Loop(65) = {11, -6, 1, 7};<BR>Plane Surface(66) = {65};<BR>Line Loop(67) = {-5,
4, 6, 12};<BR>Plane Surface(68) = {67};<BR>Line Loop(69) = {13, -17, -16,
11};<BR>Plane Surface(70) = {69};<BR>Line Loop(71) = {-18, -13, 12,
14};<BR>Plane Surface(72) = {71};<BR>Line Loop(73) = {19, -15, -9, 14};<BR>Plane
Surface(74) = {73};<BR>Line Loop(75) = {-20, -15, 10, 16};<BR>Plane Surface(76)
= {75};<BR>Line Loop(77) = {-23, 20, 24, 26};<BR>Plane Surface(78) =
{77};<BR>Line Loop(79) = {-24, 17, 21, 25};<BR>Plane Surface(80) = {79};<BR>Line
Loop(81) = {22, 28, -21, 18};<BR>Plane Surface(82) = {81};<BR>Line Loop(83) =
{-22, 19, 23, 27};<BR>Plane Surface(84) = {83};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><BR>Surface Loop(100) = {52, 60, 58,
56, 54, 46};<BR>Volume(101) = {100};<BR>Surface Loop(102) = {46, 66, 48, 68, 62,
64};<BR>Volume(103) = {102};<BR>Surface Loop(104) = {50, 74, 76, 48, 72,
70};<BR>Volume(105) = {104};<BR>Surface Loop(106) = {52, 82, 84, 50, 78,
80};<BR>Volume(107) = {106};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><BR>Physical Volume(2) = {101, 103,
105, 107};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>Line Loop(108) =
{22,32,5,14};<BR>Plane Surface(109) = {108};<BR>Line Loop(110) =
{31,6,13,21};<BR>Plane Surface(111) = {110};<BR>Surface Loop(112) =
{111,60,68,109,82,72};<BR>Volume(113) = {112};</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><BR> </DIV></FONT>
<DIV><FONT color=#0000ff face=Arial size=2>the 3D mesh it's working
fine.</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2>Now I try to make this code more
general, in the hypothesis like I want to multiply the form
generated.</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2>The code is this:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>Function
CreateVolume </FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>p1=newp; Point(p1) = {PX+l1,
PY+l1, PZ+(-(l2-l1)*2), c1};<BR>p2=newp; Point(p2) =
{PX+(-l1), PY+l1, PZ+(-(l2-l1)*2), c1};<BR>p3=newp;
Point(p3) = {PX+(-l1), PY+(-l1), PZ+(-(l2-l1)*2),
c1};<BR>p4=newp; Point(p4) = {PX+l1, PY+(-l1), PZ+(-(l2-l1)*2),
c1};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>p5=newp; Point(p5) = {PX+l1,
PY+l1, PZ+(+(l2-l1)*2), c1};<BR>p6=newp; Point(p6) =
{PX+(-l1), PY+l1, PZ+(+(l2-l1)*2), c1};<BR>p7=newp; Point(p7)
= {PX+(-l1), PY+(-l1), PZ+(+(l2-l1)*2), c1};<BR>p8=newp; Point(p8) =
{PX+l1, PY+(-l1), PZ+(+(l2-l1)*2), c1};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>p9=newp; Point(p9) = {PX+l2,
PY+l2, PZ+(-(l2-l1)*2), c1};<BR>p10=newp; Point(p10) =
{PX+(-l2), PY+l2, PZ+(-(l2-l1)*2), c1};<BR>p11=newp;
Point(p11) = {PX+(-l2), PY+(-l2), PZ+(-(l2-l1)*2), c1};<BR>p12=newp;
Point(p12) = {PX+l2, PY+(-l2), PZ+(-(l2-l1)*2),
c1};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>p13=newp; Point(p13) = {PX+l2,
PY+l2, PZ+(+(l2-l1)*2), c1};<BR>p14=newp; Point(p14) =
{PX+(-l2), PY+l2, PZ+(+(l2-l1)*2), c1};<BR>p15=newp;
Point(p15) = {PX+(-l2), PY+(-l2), PZ+(+(l2-l1)*2), c1};<BR>p16=newp;
Point(p16) = {PX+l2, PY+(-l2), PZ+(+(l2-l1)*2),
c1};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><BR>L1=newreg; Line(L1) = {p1,
p9};<BR>L2=newreg; Line(L2) = {p9, p13};<BR>L3=newreg; Line(L3) = {p13,
p5};<BR>L4=newreg; Line(L4) = {p5, p1};<BR>L5=newreg; Line(L5) = {p5,
p6};<BR>L6=newreg; Line(L6) = {p1, p2};<BR>L7=newreg; Line(L7) = {p9,
p10};<BR>L8=newreg; Line(L8) = {p13, p14};<BR>L9=newreg; Line(L9) = {p6,
p14};<BR>L10=newreg; Line(L10) = {p14, p10};<BR>L11=newreg; Line(L11) = {p10,
p2};<BR>L12=newreg; Line(L12) = {p2, p6};<BR>L13=newreg; Line(L13) = {p2,
p3};<BR>L14=newreg; Line(L14) = {p6, p7};<BR>L15=newreg; Line(L15) = {p14,
p15};<BR>L16=newreg; Line(L16) = {p10, p11};<BR>L17=newreg; Line(L17) = {p11,
p3};<BR>L18=newreg; Line(L18) = {p3, p7};<BR>L19=newreg; Line(L19) = {p7,
p15};<BR>L20=newreg; Line(L20) = {p15, p11};<BR>L21=newreg; Line(L21) = {p3,
p4};<BR>L22=newreg; Line(L22) = {p7, p8};<BR>L23=newreg; Line(L23) = {p15,
p16};<BR>L24=newreg; Line(L24) = {p11, p12};<BR>L25=newreg; Line(L25) = {p4,
p12};<BR>L26=newreg; Line(L26) = {p12, p16};<BR>L27=newreg; Line(L27) = {p16,
p8};<BR>L28=newreg; Line(L28) = {p8, p4};<BR>L29=newreg; Line(L29) = {p12,
p9};<BR>L30=newreg; Line(L30) = {p16, p13};<BR>L31=newreg; Line(L31) = {p4,
p1};<BR>L32=newreg; Line(L32) = {p8, p5};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>Line Loop(newreg) = {L1, L2, L3,
L4};<BR>Plane Surface(newreg) = {newreg-1}; ps1=newreg-1; <BR>Line
Loop(newreg) = {L12, L9, L10, L11};<BR>Plane Surface(newreg) = {newreg-1};
ps2=newreg-1; <BR>Line Loop(newreg) = {L19, L20, L17, L18}; <BR>Plane
Surface(newreg) = {newreg-1}; ps3=newreg-1;<BR>Line Loop(newreg) = {L28, L25,
L26, L27};<BR>Plane Surface(newreg) = {newreg-1}; ps4=newreg-1;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>Line Loop(newreg) = {-L3, -L30, L27,
L32};<BR>Plane Surface(newreg) = {newreg-1}; ps5=newreg-1;<BR>Line Loop(newreg)
= {-L30, -L26, L29, L2};<BR>Plane Surface(newreg) = {newreg-1};
ps6=newreg-1;<BR>Line Loop(newreg) = {L29, -L1, -L31, L25};<BR>Plane
Surface(newreg) = {newreg-1}; ps7=newreg-1;<BR>Line Loop(newreg) = {L31, -L4,
-L32, L28};<BR>Plane Surface(newreg) = {newreg-1}; ps8=newreg-1;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>Line Loop(newreg) = {L9, -L8, L3,
L5};<BR>Plane Surface(newreg) = {newreg-1}; ps9=newreg-1;<BR>Line Loop(newreg) =
{-L7, L2, L8, L10};<BR>Plane Surface(newreg) = {newreg-1};
ps10=newreg-1;<BR>Line Loop(newreg) = {L11, -L6, L1, L7};<BR>Plane
Surface(newreg) = {newreg-1}; ps11=newreg-1;<BR>Line Loop(newreg) = {-L5, L4,
L6, L12};<BR>Plane Surface(newreg) = {newreg-1}; ps12=newreg-1;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>Line Loop(newreg) = {L13, -L17, -L16,
L11};<BR>Plane Surface(newreg) = {newreg-1}; ps13=newreg-1;<BR>Line Loop(newreg)
= {-L18, -L13, L12, L14};<BR>Plane Surface(newreg) = {newreg-1};
ps14=newreg-1;<BR>Line Loop(newreg) = {L19, -L15, -L9, L14};<BR>Plane
Surface(newreg) = {newreg-1}; ps15=newreg-1;<BR>Line Loop(newreg) = {-L20, -L15,
L10, L16};<BR>Plane Surface(newreg) = {newreg-1}; ps16=newreg-1;</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>Line Loop(newreg) = {-L23, L20, L24,
L26};<BR>Plane Surface(newreg) = {newreg-1}; ps17=newreg-1;<BR>Line Loop(newreg)
= {-L24, L17, L21, L25};<BR>Plane Surface(newreg) = {newreg-1};
ps18=newreg-1;<BR>Line Loop(newreg) = {L22, L28, -L21, L18};<BR>Plane
Surface(newreg) = {newreg-1}; ps19=newreg-1;<BR>Line Loop(newreg) = {-L22, L19,
L23, L27};<BR>Plane Surface(newreg) = {newreg-1}; ps20=newreg-1;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>sl1=newreg; Surface Loop(sl1) =
{ps4,ps8,ps7,ps6,ps5,ps1};<BR>V1=newreg; Volume(V1) = {sl1};<BR>sl2=newreg;
Surface Loop(sl2) = {ps1,ps11,ps2,ps12,ps9,ps10};<BR>V2=newreg; Volume(V2) =
{sl2};<BR>sl3=newreg; Surface Loop(sl3) =
{ps3,ps15,ps16,ps2,ps14,ps13};<BR>V3=newreg; Volume(V3) = {sl3};<BR>sl4=newreg;
Surface Loop(sl4) = {ps4,ps19,ps20,ps3,ps17,ps18};<BR>V4=newreg; Volume(V4) =
{sl4};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>phvX=newreg; CooperV=phvX; Physical
Volume(phvX) = {V1,V2,V3,V4};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial
size=2>Return </FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>Function
CreateVolumeInterior </FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>Printf("L: =%G =%G =%G =%G
",L22,L32,L5,L14);<BR>Line Loop(newreg) = {L22,L32,L5,L14};<BR>Plane
Surface(newreg) = {newreg-1}; Mps1=newreg-1; <BR>Line Loop(newreg) =
{L21,L31,L6,L13};<BR>Printf("L: =%G =%G =%G =%G ",L21,L31,L6,L13);<BR>Plane
Surface(newreg) = {newreg-1}; Mps2=newreg-1;
<BR>Printf("ps14=%G,ps12=%G,ps8=%G,ps19=%G,Mps1=%G,Mps2=%G",ps14,ps12,ps8,ps19,Mps1,Mps2);<BR>Msl1=newreg;
Surface Loop(Msl1) = {ps19,Mps1,ps14,Mps2,ps12,ps8};<BR>V5=newreg; IronX1=V5;
Volume(V5) = {Msl1};<BR>phvX=newreg; IronVol=phvX; Physical Volume(phvX) =
{V5};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial
size=2>Return </FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><BR>c1 = 0.1;<BR>l1 = 0.1; l2 =
0.15;<BR>PX=0.0;PY=0.0;PZ=0.0;<BR>Call CreateVolume;<BR>Call
CreateVolumeInterior; </FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><FONT color=#0000ff><FONT size=2><FONT face=Arial>Now looks again in the
same way like before</FONT><FONT face=Arial> but when I try to mesh
th</FONT></FONT><FONT face=Arial size=2>is geo file I have a lot of
errors.</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>What is the
problem?</FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2>I will attach also the code
files.</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial
size=2><BR>Regards,<BR>Catalin<BR> </FONT></DIV>
<DIV>
<HR color=blue>
<FONT color=#008000><B>Department of Engineering Science</B> <FONT
color=#0000ff><I><BR>University of Oxford <BR>Parks Road,OXFORD,OX1
3PJ,UK</I></FONT> <BR>Land-Line: +44 1865 273001 <BR>Mobile : +44 7791 860696
<BR>E-mail: <A
href="mailto:cbondrea@robotics.ucv.ro">cbondrea@robotics.ucv.ro</A>
</FONT></DIV></BODY></HTML>