<div dir="ltr"><div>Jean:<br><br></div>With your suggestion I was able to figure out what I was trying to do. I did not realize that you could not extrude a line loop directly. Thank you for your help. I have posted below in case this is helpful to someone else. <br>
<br>Cheers,<br><br>Trevor<br><div><br>lc = 10; // Target element size<br>R = .25;   // Magnet Radius<br>D0 = 10;   // Top of magnet<br>D1 = 11;   // Bottom of magnet<br><br>// Total Solution Space<br>X0 = -2.;<br>X1 =  2.;<br>
Y0 = -2.;<br>Y1 =  2.;<br>Z0 =  9.;<br>Z1 = 12.;<br><br>////////////////////////////////////<br>// North Pole<br>p = newp;<br><br>Point(p) =   { 0,  0, D0, lc/100};<br>Point(p+1) = { R,  0, D0, lc/100};<br>Point(p+2) = { 0,  R, D0, lc/100};<br>
Point(p+3) = {-R,  0, D0, lc/100};<br>Point(p+4) = { 0, -R, D0, lc/100};<br><br>// Connect up the points<br>c = newc;<br>Circle(c)  = {p+1, p, p+3};<br><br>l = newl;<br>Line(l) = {p+3,p+1};<br><br>ll = newll;<br>Line Loop(ll) = {c, l};<br>
<br>ss = news;<br>ss = Extrude {0, 0, D1-D0} { Line{c,l}; };<br><br>/////////////////////////////////////<br>// Large Bounding box<br>Point(116)  = {X0, Y0, Z0};<br>Point(117)  = {X1, Y0, Z0};<br>Point(118)  = {X1, Y1, Z0};<br>
Point(119)  = {X0, Y1, Z0};<br>Line(120) = {116,117};<br>Line(121) = {117,118};<br>Line(122) = {118,119};<br>Line(123) = {119,116};<br>Line Loop(124) = {120, 121, 122, 123};<br>Plane Surface(125) = {124};<br><br>//v = newv;<br>
v[] = Extrude {0, 0, Z1-Z0} { Surface{125}; };<br><br>Surface{ss[1]} In Volume{v[1]};<br>Physical Volume(1) = {v[1]};<br></div></div><div class="gmail_extra"><br clear="all"><div>-- Trevor<br></div>
<br><br><div class="gmail_quote">On 7 August 2014 10:16, Trevor Irons <span dir="ltr"><<a href="mailto:trevorirons@gmail.com" target="_blank">trevorirons@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Thank you again. I tried extruding lines and was able to do so with straight ones but not Line Loops. I have included as small of an example as I can think of. This does what I want for the top of the 1/2 cylinder. But I would like to extend this behaviour to the commented out extrusion step. Again thanks for any ideas. All I can think of is throw what is written here into a loop. But I am not sure how well that would work. <br>

<div><br>lc = 10;   // Target element size<br>R = .25;   // Radius<br>D0 = 10;   // Top<br>D1 = 11;   // Bottom<br><br>// Total Solution Space<br>X0 = -2.;<br>X1 =  2.;<br>Y0 = -2.;<br>Y1 =  2.;<br>Z0 =  9.;<br>Z1 = 12.;<br>

<br>////////////////////////////////////<br>// North Pole<br><br>Point(0) = { 0, 0, D0, lc/10};<br>Point(1) = { R, 0, D0, lc/10};<br>Point(2) = { 0, R, D0, lc/10};<br>Point(3) = {-R, 0, D0, lc/10};<br><br>// Connect up the points<br>

Circle(4) = {1, 0, 3};<br>Line(5) = {3,1};<div class=""><br>Line Loop(6) = {4,5};<br>Plane Surface(7) = {6};<br><br></div>//////////////////////////////////////<br>// Extrude 1/2 cylinder<br>//Extrude {0, 0, D1-D0} { Surface{7};  } // I want this *outer surface* within my final volume<br>

<br>/////////////////////////////////////<br>// Large Bounding box<br>Point(116)  = {X0, Y0, Z0};<br>Point(117)  = {X1, Y0, Z0};<br>Point(118)  = {X1, Y1, Z0};<br>Point(119)  = {X0, Y1, Z0};<br>Line(120) = {116,117};<br>
Line(121) = {117,118};<br>
Line(122) = {118,119};<br>Line(123) = {119,116};<br>Line Loop(124) = {120, 121, 122, 123};<br>Plane Surface(125) = {124};<br>Extrude {0, 0, Z1-Z0} { Surface{125}; }<br><br>// We want the surface in the volume<div class="">
<br>Surface{7} In Volume{1};<br></div>
//Surface{8} In Volume{1};<br><br>// Don't export internal structure<br>Physical Volume(1) = {1};<br></div></div><div class="gmail_extra"><br clear="all"><div>-- Trevor<br></div><div><div class="h5">
<br><br><div class="gmail_quote">On 7 August 2014 07:53, jean pierre aubry <span dir="ltr"><<a href="mailto:jeanpierre@lamachine.fr" target="_blank">jeanpierre@lamachine.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

without a complete example it is difficult to understand what you want<br>
<br>
however extruding the lines that make the borders of Surface{7} you<br>
should get a Surface which would be bordering the volume along the<br>
extrusion vector<br>
<br>
<br>
Le Thu, 7 Aug 2014 09:34:36 -0600,<br>
Trevor Irons <<a href="mailto:trevorirons@gmail.com" target="_blank">trevorirons@gmail.com</a>> a écrit :<br>
<div><div><br>
> Thank you. That worked perfectly for a 2D 'plane surface'! Thanks for<br>
> the tip.<br>
><br>
> I had one follow up question though, Instead of just a 2D surface I<br>
> would like to do this with a 3D surface, i.e. internal 3D object. But<br>
> once I extrude it, it becomes a volume and I cannot call Surface In<br>
> Volume anymore.<br>
><br>
><br>
> Line Loop(6) = {4,5};<br>
> Plane Surface(7) = {6};                           // Define a plane<br>
> surface Surface{7} In Volume{1};                       // This works<br>
> for the unextruded surface<br>
> Extrude {0, 0, D1-D0} { Surface{7};  }  // I want to include the<br>
> surface of this extrusion in the mesh<br>
><br>
><br>
> Surface(8) = CastToSurface{Volume{2}}; // Made up desired<br>
> functionality Surface{8} In Volume{1};                          // I<br>
> want to call something like this<br>
><br>
> Is there a way to cast an extrusion back into just a surface, but now<br>
> just the outer 3D surface?<br>
><br>
> Thanks.<br>
><br>
><br>
> -- Trevor<br>
><br>
><br>
> On 5 August 2014 05:01, jean pierre aubry <<a href="mailto:jeanpierre@lamachine.fr" target="_blank">jeanpierre@lamachine.fr</a>><br>
> wrote:<br>
><br>
> > hello<br>
> ><br>
> > >Is there a way to scrub the internal `surface' but retain the mesh<br>
> > >structure?<br>
> ><br>
> > what about putting the surfaces you want to export into Physical<br>
> > and to NOT put into Physical the ones you do not want<br>
> ><br>
> > i do not know about VTK<br>
> > but by proceeding this way only the defined Physical are exported<br>
> > in .msh or .med mesh<br>
> ><br>
> > --<br>
> > jean pierre aubry<br>
> > 33 688 670 795<br>
> > jeanpierre [at] <a href="http://lamachine.fr" target="_blank">lamachine.fr</a><br>
> ><br>
<br>
<br>
<br>
--<br>
jean pierre aubry<br>
33 688 670 795<br>
jeanpierre [at] <a href="http://lamachine.fr" target="_blank">lamachine.fr</a><br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>