<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class="">Using your second option, you may use BooleanFragments. </div>
<div class="">Try at the end of your file:</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">// Surface{7,8,9,10,11,12} In Volume{1}; // Comment out this line</div>
<div class="">Physical Volume(100) = {1};</div>
<div class=""><br class="">
</div>
<div class="">aux() = BooleanFragments{ Volume{1}; Delete; }{ Surface{7:12}; Delete;};</div>
<div class="">Printf("", aux()); // For checking the numbers of the generated geometrical entities</div>
<div class=""><br class="">
</div>
<div class="">// For visibility</div>
<div class="">Recursive Color Red{Volume{1};}</div>
<div class="">Recursive Color Yellow{Surface{7:12};}</div>
</div>
<div class=""><br class="">
</div>
<div class="">With regard to your first option, you can only create rectangles in the XY plane, but you can translate and rotate to place them where you want.</div>
<div class=""><br class="">
</div>
<div class="">HTH</div>
<div class="">Ruth</div>
<br class="">
<div class="">
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
—<br class="">
Prof. Ruth V. Sabariego<br class="">
KU Leuven <br class="">
Dept. Electrical Engineering ESAT/Electa, EnergyVille<br class="">
<a href="http://www.esat.kuleuven.be/electa" class="">http://www.esat.kuleuven.be/electa</a></div>
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<a href="http://www.energyville.be" class="">http://www.energyville.be</a></div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
</div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Free software: <a href="http://gmsh.info" class="">http://gmsh.info</a> | <a href="http://getdp.info" class="">http://getdp.info</a> | <a href="http://onelab.info" class="">http://onelab.info</a><br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
</div>
</div>
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 8 Feb 2018, at 22:13, Sathyanarayan Rao <<a href="mailto:sathyanarayan.rao@uclouvain.be" class="">sathyanarayan.rao@uclouvain.be</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; font-family: "Times New Roman", Times, serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Dear GMSH team,</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">I am trying to generate a cube with each face having a rectangular surface that will be later identified as a sensor. </div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">1) I<span class="">n case I want to use rectangle command of opencascade is it possible to create rectangle other than in XY plane ?</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span class=""><br class="">
</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span class=""><br class="">
</span></div>
<p style="margin-top: 0px; margin-bottom: 0px;" class=""><span class=""></span></p>
<div class=""></div>
<div class="">```</div>
<div class="">SetFactory("OpenCASCADE");</div>
<div class="">Mesh.Algorithm3D = 4; // 3D mesh algorithm (1=Delaunay, 4=Frontal, 5=Frontal Delaunay, 6=Frontal Hex, 7=MMG3D, 9=R-tree)</div>
<div class="">R = 0.05;</div>
<div class="">w = R;</div>
<div class="">Box(1) = {-R,-R,-R, 2*R,2*R,2*R};</div>
<div class="">Rectangle(10) = {-R/2,-R/2,-R, R,R};</div>
<div class="">Rectangle(11) = {-R/2,-R/2,R, R,R};</div>
<div class="">```</div>
<div class=""></div>
<div class=""><br class="">
</div>
<div class=""> 2) When I manually create surfaces in each face of the cube, they come as separate regions in 3D mesh. </div>
<div class=""><br class="">
</div>
<div class="">
<div style="font-family: "Times New Roman", Times, serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">
```</div>
<div style="font-family: "Times New Roman", Times, serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">
</div>
<div class="">SetFactory("OpenCASCADE");</div>
<div class="">Mesh.Algorithm3D = 4; // 3D mesh algorithm (1=Delaunay, 4=Frontal, 5=Frontal Delaunay, 6=Frontal Hex, 7=MMG3D, 9=R-tree)</div>
<div class="">R = 0.05;</div>
<div class="">R1 = R;</div>
<div class="">w = R;</div>
<div class="">Box(1) = {-R,-R,-R, 2*R,2*R,2*R};</div>
<div class="">q = 0.005;</div>
<div class=""><br class="">
</div>
<div class="">/* Right electrode */</div>
<div class="">RE = 300;</div>
<div class=""><br class="">
</div>
<div class="">Point(RE+1) = { R1, R1/2, R1/2, q};</div>
<div class="">Point(RE+2) = { R1, -R1/2, R1/2, q};</div>
<div class="">Point(RE+3) = { R1, -R1/2, -R1/2, q};</div>
<div class="">Point(RE+4) = { R1, R1/2, -R1/2, q};</div>
<div class="">Line(RE+13) = {RE+4, RE+1};</div>
<div class="">Line(RE+14) = {RE+1, RE+2};</div>
<div class="">Line(RE+15) = {RE+2, RE+3};</div>
<div class="">Line(RE+16) = {RE+3, RE+4};</div>
<div class="">Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};</div>
<div class="">Plane Surface(7) = {RE+7};</div>
<div class="">Physical Surface(10000) = {7};</div>
<div class=""><br class="">
</div>
<div class="">/* Left electrode */</div>
<div class=""><br class="">
</div>
<div class="">RE = 400;</div>
<div class=""><br class="">
</div>
<div class="">Point(RE+1) = { -R1, R1/2, R1/2, q};</div>
<div class="">Point(RE+2) = { -R1, -R1/2, R1/2, q};</div>
<div class="">Point(RE+3) = { -R1, -R1/2, -R1/2, q};</div>
<div class="">Point(RE+4) = { -R1, R1/2, -R1/2, q};</div>
<div class="">Line(RE+13) = {RE+4, RE+1};</div>
<div class="">Line(RE+14) = {RE+1, RE+2};</div>
<div class="">Line(RE+15) = {RE+2, RE+3};</div>
<div class="">Line(RE+16) = {RE+3, RE+4};</div>
<div class="">Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};</div>
<div class="">Plane Surface(8) = {RE+7};</div>
<div class="">Physical Surface(10001) = {8};</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">// create plate electrodes</div>
<div class="">/* back electrode */</div>
<div class=""><br class="">
</div>
<div class="">RE = 500;</div>
<div class=""><br class="">
</div>
<div class="">Point(RE+1) = { R1/2, -R1, R1/2, q};</div>
<div class="">Point(RE+2) = { -R1/2, -R1, R1/2, q};</div>
<div class="">Point(RE+3) = { -R1/2, -R1,-R1/2, q};</div>
<div class="">Point(RE+4) = { R1/2, -R1, -R1/2, q};</div>
<div class="">Line(RE+13) = {RE+4, RE+1};</div>
<div class="">Line(RE+14) = {RE+1, RE+2};</div>
<div class="">Line(RE+15) = {RE+2, RE+3};</div>
<div class="">Line(RE+16) = {RE+3, RE+4};</div>
<div class="">Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};</div>
<div class="">Plane Surface(9) = {RE+7};</div>
<div class="">Physical Surface(10002) = {9};</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">/* front electrode */</div>
<div class=""><br class="">
</div>
<div class="">RE = 600;</div>
<div class=""><br class="">
</div>
<div class="">Point(RE+1) = { R1/2, R1, R1/2, q};</div>
<div class="">Point(RE+2) = { -R1/2, R1, R1/2, q};</div>
<div class="">Point(RE+3) = { -R1/2, R1,-R1/2, q};</div>
<div class="">Point(RE+4) = { R1/2, R1, -R1/2, q};</div>
<div class="">Line(RE+13) = {RE+4, RE+1};</div>
<div class="">Line(RE+14) = {RE+1, RE+2};</div>
<div class="">Line(RE+15) = {RE+2, RE+3};</div>
<div class="">Line(RE+16) = {RE+3, RE+4};</div>
<div class="">Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};</div>
<div class="">Plane Surface(10) = {RE+7};</div>
<div class="">Physical Surface(10003) = {10};</div>
<div class=""><br class="">
</div>
<div class="">/* top electrode */</div>
<div class=""><br class="">
</div>
<div class="">RE = 700;</div>
<div class=""><br class="">
</div>
<div class="">Point(RE+1) = { R1/2,R1/2,R1, q};</div>
<div class="">Point(RE+2) = { -R1/2,R1/2, R1,q};</div>
<div class="">Point(RE+3) = { -R1/2, -R1/2,R1, q};</div>
<div class="">Point(RE+4) = { R1/2, -R1/2,R1, q};</div>
<div class="">Line(RE+13) = {RE+4, RE+1};</div>
<div class="">Line(RE+14) = {RE+1, RE+2};</div>
<div class="">Line(RE+15) = {RE+2, RE+3};</div>
<div class="">Line(RE+16) = {RE+3, RE+4};</div>
<div class="">Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};</div>
<div class="">Plane Surface(11) = {RE+7};</div>
<div class="">Physical Surface(10004) = {11};</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">/* bottom electrode */</div>
<div class=""><br class="">
</div>
<div class="">RE = 800;</div>
<div class=""><br class="">
</div>
<div class="">Point(RE+1) = { R1/2,R1/2,-R1, q};</div>
<div class="">Point(RE+2) = { -R1/2,R1/2, -R1,q};</div>
<div class="">Point(RE+3) = { -R1/2, -R1/2,-R1, q};</div>
<div class="">Point(RE+4) = { R1/2, -R1/2,-R1, q};</div>
<div class="">Line(RE+13) = {RE+4, RE+1};</div>
<div class="">Line(RE+14) = {RE+1, RE+2};</div>
<div class="">Line(RE+15) = {RE+2, RE+3};</div>
<div class="">Line(RE+16) = {RE+3, RE+4};</div>
<div class="">Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};</div>
<div class="">Plane Surface(12) = {RE+7};</div>
<div class="">Physical Surface(10005) = {12};</div>
<div class=""><br class="">
</div>
<div class="">Surface{7,8,9,10,11,12} In Volume{1};</div>
<div class="">Physical Volume(100) = {1};</div>
<div style="font-family: "Times New Roman", Times, serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">
</div>
<div style="font-family: "Times New Roman", Times, serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">
```</div>
<div style="font-family: "Times New Roman", Times, serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">
<br class="">
</div>
<div style="font-family: "Times New Roman", Times, serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">
Somehow the command "Surface{} In Volume" seems to not care for what I want. Please let me know</div>
<div style="font-family: "Times New Roman", Times, serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">
how can I get a cube with each face having a rectangular surface with its own physical number. </div>
<br class="">
</div>
<div class=""><br class="">
</div>
<br class="">
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div id="Signature" class="">
<div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class="">
<div name="divtagdefaultwrapper" style="margin: 0px;" class=""><font face="Times New Roman, Times, serif" color="#0000ff" class=""><br class="">
</font></div>
<div name="divtagdefaultwrapper" style="margin: 0px;" class="">
<hr class="">
</div>
<blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;" class="">
<div name="divtagdefaultwrapper" style="margin: 0px;" class=""><font face="Times New Roman, Times, serif" class="">Best Regards,</font></div>
<div name="divtagdefaultwrapper" style="margin: 0px;" class=""><font face="Times New Roman, Times, serif" class=""><br class="">
</font></div>
<div name="divtagdefaultwrapper" style="margin: 0px;" class=""><span style="font-family: "Times New Roman", Times, serif;" class="">Sathyanarayan Rao, PhD student</span></div>
<div name="divtagdefaultwrapper" style="margin: 0px;" class=""><span style="font-family: "Times New Roman", Times, serif; background-color: rgb(255, 255, 255); white-space: pre-wrap;" class="">Earth and Life Institute/Environmental Sciences (ELI-e)</span></div>
<div name="divtagdefaultwrapper" style="margin: 0px;" class=""><span style="background-color: rgb(255, 255, 255); font-family: "Times New Roman", Times, serif; white-space: pre-wrap;" class="">Université catholique de Louvain</span></div>
<div name="divtagdefaultwrapper" style="margin: 0px;" class=""><span style="font-family: "Times New Roman", Times, serif; white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium
</span></div>
<div name="divtagdefaultwrapper" style="margin: 0px;" class=""><span style="background-color: rgb(255, 255, 255); white-space: pre-wrap;" class="">Phone: 010473827 ( intercom 73827)</span></div>
</blockquote>
<div name="divtagdefaultwrapper" style="margin: 0px;" class="">
<div class="">
<pre cols="72" style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><hr class=""></pre>
</div>
</div>
</div>
</div>
</div>
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">gmsh
mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="mailto:gmsh@onelab.info" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">gmsh@onelab.info</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="http://onelab.info/mailman/listinfo/gmsh" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://onelab.info/mailman/listinfo/gmsh</a></div>
</blockquote>
</div>
<br class="">
</body>
</html>