1 <!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
\r
6 <title>Constructing Meshes</title>
\r
7 <meta http-equiv="content-type" content="text/html; charset=windows-1252">
\r
8 <meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com"><style type="text/css">
\r
10 p.whs1 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }
\r
11 p.whs2 { margin-top:0pt; margin-bottom:0pt; }
\r
12 p.whs3 { font-family:'Lucida Console' , monospace; margin-top:0px; margin-bottom:0px; }
\r
13 p.whs4 { margin-top:0px; margin-bottom:0px; }
\r
14 p.whs5 { margin-top:0px; margin-bottom:0px; font-family:'Times New Roman' , serif; }
\r
16 </style><script type="text/javascript" language="JavaScript">
\r
18 if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
\r
20 var strNSS = "<style type='text/css'>";
\r
21 strNSS += "p.whs1 {margin-top:1pt;margin-bottom:1pt; }";
\r
22 strNSS += "p.whs2 {margin-top:1pt;margin-bottom:1pt; }";
\r
23 strNSS += "p.whs3 {margin-top:1pt;margin-bottom:1pt; }";
\r
24 strNSS += "p.whs4 {margin-top:1pt;margin-bottom:1pt; }";
\r
25 strNSS += "p.whs5 {margin-top:1pt;margin-bottom:1pt; }";
\r
26 strNSS +="</style>";
\r
27 document.write(strNSS);
\r
31 <script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
\r
34 if (innerWidth != origWidth || innerHeight != origHeight)
\r
37 if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
\r
38 origWidth = innerWidth;
\r
39 origHeight = innerHeight;
\r
45 <style type="text/css">
\r
47 div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
\r
49 </style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
\r
50 <script type="text/javascript" language="javascript" src="whver.js"></script>
\r
51 <script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
\r
52 <script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
\r
53 <script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
\r
55 <body><script type="text/javascript" language="javascript1.2">
\r
57 if (window.gbWhTopic)
\r
59 if (window.addTocInfo)
\r
61 addTocInfo("MESH module\nTUI Scripts\nCreating Meshes");
\r
62 addButton("show",BTN_TEXT,"Show","","","","",0,0,"","","");
\r
65 if (window.writeBtnStyle)
\r
68 if (window.writeIntopicBar)
\r
71 if (window.setRelStartPage)
\r
73 setRelStartPage("smesh.htm");
\r
82 document.location.reload();
\r
85 <h1>Creating Meshes</h1>
\r
87 <h3><a name=bookmark>Construction of a Mesh</a></h3>
\r
89 <p class="whs1">import salome</p>
\r
91 <p class="whs1">import geompy</p>
\r
93 <p class="whs1">import StdMeshers</p>
\r
95 <p class="whs1">smesh = salome.lcc.FindOrLoadComponent("FactoryServer",
\r
96 "SMESH")</p>
\r
98 <p class="whs1">smeshgui = salome.ImportComponentGUI("SMESH")</p>
\r
100 <p class="whs1">smeshgui.Init(salome.myStudyId);</p>
\r
102 <p class="whs2"> </p>
\r
104 <p class="whs2"># create a box</p>
\r
106 <p class="whs1">box = geompy.MakeBox(0.,
\r
107 0., 0., 100., 200., 300.)</p>
\r
109 <p class="whs2"> </p>
\r
111 <p class="whs2"># add box to the study</p>
\r
113 <p class="whs1">idbox = geompy.addToStudy(box,
\r
114 "box")</p>
\r
116 <p class="whs2"> </p>
\r
118 <p class="whs2"># create a hypothesis</p>
\r
120 <p class="whs1">print "--------------------------
\r
121 create Hypothesis"</p>
\r
123 <p class="whs1">print "--------------------------
\r
124 NumberOfSegments"</p>
\r
126 <p class="whs1">numberOfSegments
\r
129 <p class="whs1">hypNbSeg = smesh.CreateHypothesis("NumberOfSegments",
\r
130 "libStdMeshersEngine.so")</p>
\r
132 <p class="whs1">hypNbSeg.SetNumberOfSegments(numberOfSegments)</p>
\r
134 <p class="whs1">print hypNbSeg.GetName()</p>
\r
136 <p class="whs1">print hypNbSeg.GetId()</p>
\r
138 <p class="whs1">print hypNbSeg.GetNumberOfSegments()</p>
\r
140 <p class="whs1">smeshgui.SetName(salome.ObjectToID(hypNbSeg),
\r
141 "NumberOfSegments_10")</p>
\r
143 <p class="whs1">print "--------------------------
\r
144 MaxElementArea"</p>
\r
146 <p class="whs1">maxElementArea =
\r
149 <p class="whs1">hypArea = smesh.CreateHypothesis("MaxElementArea",
\r
150 "libStdMeshersEngine.so")</p>
\r
152 <p class="whs1">hypArea.SetMaxElementArea(maxElementArea)</p>
\r
154 <p class="whs1">print hypArea.GetName()</p>
\r
156 <p class="whs1">print hypArea.GetId()</p>
\r
158 <p class="whs1">print hypArea.GetMaxElementArea()</p>
\r
160 <p class="whs1">smeshgui.SetName(salome.ObjectToID(hypArea),
\r
161 "MaxElementArea_500")</p>
\r
163 <p class="whs1">print "--------------------------
\r
164 MaxElementVolume"</p>
\r
166 <p class="whs1">maxElementVolume
\r
169 <p class="whs1">hypVolume = smesh.CreateHypothesis("MaxElementVolume",
\r
170 "libStdMeshersEngine.so")</p>
\r
172 <p class="whs1">hypVolume.SetMaxElementVolume(maxElementVolume)</p>
\r
174 <p class="whs1">print hypVolume.GetName()</p>
\r
176 <p class="whs1">print hypVolume.GetId()</p>
\r
178 <p class="whs1">print hypVolume.GetMaxElementVolume()</p>
\r
180 <p class="whs1">smeshgui.SetName(salome.ObjectToID(hypVolume),
\r
181 "MaxElementVolume_500")</p>
\r
183 <p class="whs2"> </p>
\r
185 <p class="whs2"># create algorithms</p>
\r
187 <p class="whs1">print "--------------------------
\r
188 create Algorithms"</p>
\r
190 <p class="whs1">print "--------------------------
\r
191 Regular_1D"</p>
\r
193 <p class="whs1">regular1D = smesh.CreateHypothesis("Regular_1D",
\r
194 "libStdMeshersEngine.so")</p>
\r
196 <p class="whs1">smeshgui.SetName(salome.ObjectToID(regular1D),
\r
197 "Wire Discretisation")</p>
\r
199 <p class="whs1">print "--------------------------
\r
200 MEFISTO_2D"</p>
\r
202 <p class="whs1">mefisto2D = smesh.CreateHypothesis("MEFISTO_2D",
\r
203 "libStdMeshersEngine.so")</p>
\r
205 <p class="whs1">smeshgui.SetName(salome.ObjectToID(mefisto2D),
\r
206 "MEFISTO_2D")</p>
\r
208 <p class="whs2"> </p>
\r
210 <p class="whs2"># initialize a mesh with
\r
213 <p class="whs1">mesh = smesh.CreateMesh(box)</p>
\r
215 <p class="whs1">smeshgui.SetName(salome.ObjectToID(mesh),
\r
216 "MeshBox")</p>
\r
218 <p class="whs2"> </p>
\r
220 <p class="whs2"># add the hypothesis to
\r
223 <p class="whs1">print "--------------------------
\r
224 add hypothesis to the box"</p>
\r
226 <p class="whs1">mesh.AddHypothesis(box,hypNbSeg)</p>
\r
228 <p class="whs1">mesh.AddHypothesis(box,hypArea)</p>
\r
230 <p class="whs1">mesh.AddHypothesis(box,hypVolume)</p>
\r
232 <p class="whs1">mesh.AddHypothesis(box,regular1D)</p>
\r
234 <p class="whs1">mesh.AddHypothesis(box,mefisto2D)</p>
\r
236 <p class="whs2"> </p>
\r
238 <p class="whs2"># compute the mesh</p>
\r
240 <p class="whs1">print "--------------------------
\r
241 compute the mesh of the box"</p>
\r
243 <p class="whs1">ret = smesh.Compute(mesh,box)</p>
\r
245 <p class="whs1">print ret</p>
\r
247 <p class="whs1">if ret == 0:</p>
\r
249 <p class="whs1"> print
\r
250 "probleme when computing the mesh"</p>
\r
252 <p class="whs1">salome.sg.updateObjBrowser(1)</p>
\r
254 <p class="whs1"> </p>
\r
256 <h3><a name=bookmark1>Construction of a Submesh</a></h3>
\r
258 <p class="whs3"> </p>
\r
260 <p class="whs3"><span style="font-family: 'Lucida Console', monospace;">from
\r
261 geompy import *</span></p>
\r
263 <p class="whs3">import smesh</p>
\r
265 <p class="whs4"> </p>
\r
267 <p class="whs4"># create vertices</p>
\r
269 <p class="whs3">Point111 = MakeVertex( 0, 0,
\r
272 <p class="whs3">Point211 = MakeVertex(10, 0,
\r
275 <p class="whs3">Point121 = MakeVertex( 0, 10, 0)</p>
\r
277 <p class="whs3">Point221 = MakeVertex(10, 10, 0)</p>
\r
279 <p class="whs3">Point112 = MakeVertex( 0, 0,
\r
282 <p class="whs3">Point212 = MakeVertex(10, 0,
\r
285 <p class="whs3">Point122 = MakeVertex( 0, 10, 10)</p>
\r
287 <p class="whs3">Point222 = MakeVertex(10, 10, 10)</p>
\r
289 <p class="whs4"> </p>
\r
291 <p class="whs4"># create edges</p>
\r
293 <p class="whs3">EdgeX111 = MakeEdge(Point111, Point211)</p>
\r
295 <p class="whs3">EdgeX121 = MakeEdge(Point121, Point221)</p>
\r
297 <p class="whs3">EdgeX112 = MakeEdge(Point112, Point212)</p>
\r
299 <p class="whs3">EdgeX122 = MakeEdge(Point122, Point222)</p>
\r
301 <p class="whs3">EdgeY11 = MakeEdge(Point111, Point121)</p>
\r
303 <p class="whs3">EdgeY21 = MakeEdge(Point211, Point221)</p>
\r
305 <p class="whs3">EdgeY12 = MakeEdge(Point112, Point122)</p>
\r
307 <p class="whs3">EdgeY22 = MakeEdge(Point212, Point222)</p>
\r
309 <p class="whs3">EdgeZ111 = MakeEdge(Point111, Point112)</p>
\r
311 <p class="whs3">EdgeZ211 = MakeEdge(Point211, Point212)</p>
\r
313 <p class="whs3">EdgeZ121 = MakeEdge(Point121, Point122)</p>
\r
315 <p class="whs3">EdgeZ221 = MakeEdge(Point221, Point222)</p>
\r
317 <p class="whs4"> </p>
\r
319 <p class="whs4"># create faces</p>
\r
321 <p class="whs3">FaceX11 = MakeQuad(EdgeY11, EdgeZ111,
\r
322 EdgeY12, EdgeZ121)</p>
\r
324 <p class="whs3">FaceX21 = MakeQuad(EdgeY21, EdgeZ211,
\r
325 EdgeY22, EdgeZ221)</p>
\r
327 <p class="whs3">FaceY111 = MakeQuad(EdgeX111, EdgeZ111,
\r
328 EdgeX112, EdgeZ211)</p>
\r
330 <p class="whs3">FaceY121 = MakeQuad(EdgeX121, EdgeZ121,
\r
331 EdgeX122, EdgeZ221)</p>
\r
333 <p class="whs3">FaceZ11 = MakeQuad(EdgeX111, EdgeY11,
\r
334 EdgeX121, EdgeY21)</p>
\r
336 <p class="whs3">FaceZ12 = MakeQuad(EdgeX112, EdgeY12,
\r
337 EdgeX122, EdgeY22)</p>
\r
339 <p class="whs4"> </p>
\r
341 <p class="whs4"># create a solid</p>
\r
343 <p class="whs3">Block = MakeHexa(FaceX11, FaceX21, FaceY111,
\r
344 FaceY121, FaceZ11, FaceZ12)</p>
\r
346 <p class="whs4"> </p>
\r
348 <p class="whs4"># create a compound</p>
\r
350 <p class="whs3">box = MakeCompound([Block])</p>
\r
352 <p class="whs4"> </p>
\r
354 <p class="whs4"># add in the study</p>
\r
356 <p class="whs3">box_id = addToStudy(box, "Box compound")</p>
\r
358 <p class="whs4"> </p>
\r
360 <p class="whs4"># create hexahedral mesh
\r
363 <p class="whs3">hexa = smesh.Mesh(box, "Box compound
\r
364 : hexahedrical mesh")</p>
\r
366 <p class="whs3">algo = hexa.Segment()</p>
\r
368 <p class="whs4"> </p>
\r
370 <p class="whs4"># define "NumberOfSegments"
\r
371 hypothesis to cut the edge in a fixed number of segments</p>
\r
373 <p class="whs3">algo.NumberOfSegments(4)</p>
\r
375 <p class="whs4"> </p>
\r
377 <p class="whs4"># creates a quadrangle
\r
378 2D algorithm for the faces</p>
\r
380 <p class="whs3">hexa.Quadrangle()</p>
\r
382 <p class="whs4"> </p>
\r
384 <p class="whs4"># construct a submesh with
\r
385 a local hypothesis</p>
\r
387 <p class="whs3">algo = hexa.Segment(EdgeX111)</p>
\r
389 <p class="whs4"> </p>
\r
391 <p class="whs4"># define "Arithmetic1D"
\r
392 hypothesis to cut an edge in several segments with increasing arithmetic
\r
395 <p class="whs3">algo.Arithmetic1D(1, 4)</p>
\r
397 <p class="whs4"> </p>
\r
399 <p class="whs4"># define "Propagation"
\r
400 hypothesis that propagates all other hypothesis on all edges on the opposite
\r
401 side in case of quadrangular faces</p>
\r
403 <p class="whs3">algo.Propagation()</p>
\r
405 <p class="whs4"> </p>
\r
407 <p class="whs4"># compute the mesh</p>
\r
409 <p class="whs3">hexa.Compute() </p>
\r
411 <p class="whs3"> </p>
\r
413 <h3><a name=bookmark2>Editing of a mesh</a></h3>
\r
415 <p class="whs3"> </p>
\r
417 <p class="whs3"><span style="font-family: 'Lucida Console', monospace;">import
\r
420 <p class="whs3">import geompy</p>
\r
422 <p class="whs3">import SMESH</p>
\r
424 <p class="whs3">import StdMeshers</p>
\r
426 <p class="whs3"> </p>
\r
428 <p class="whs3">smesh = salome.lcc.FindOrLoadComponent("FactoryServer",
\r
429 "SMESH")</p>
\r
431 <p class="whs3">smesh.SetCurrentStudy(salome.myStudy)</p>
\r
433 <p class="whs3"> </p>
\r
435 <p class="whs3">box =
\r
436 geompy.MakeBox(0., 0., 0., 20., 20., 20.)</p>
\r
438 <p class="whs3">idbox = geompy.addToStudy(box, "box")</p>
\r
440 <p class="whs3"> </p>
\r
442 <p class="whs3">subShapeList = geompy.SubShapeAll(box,
\r
443 geompy.ShapeType["EDGE"])</p>
\r
445 <p class="whs3">edge =
\r
446 subShapeList[0]</p>
\r
448 <p class="whs3">name =
\r
449 geompy.SubShapeName(edge, box)</p>
\r
451 <p class="whs3">idedge = geompy.addToStudyInFather(box,
\r
454 <p class="whs3"> </p>
\r
456 <p class="whs3">box =
\r
457 salome.IDToObject(idbox)</p>
\r
459 <p class="whs3">edge = salome.IDToObject(idedge)</p>
\r
461 <p class="whs3"> </p>
\r
463 <p class="whs3">hyp1 = smesh.CreateHypothesis("NumberOfSegments",
\r
464 "libStdMeshersEngine.so")</p>
\r
466 <p class="whs3">hyp1.SetNumberOfSegments(3)</p>
\r
468 <p class="whs3">hyp2 = smesh.CreateHypothesis("MaxElementArea",
\r
469 "libStdMeshersEngine.so")</p>
\r
471 <p class="whs3">hyp2.SetMaxElementArea(10)</p>
\r
473 <p class="whs3">hyp3 = smesh.CreateHypothesis("Arithmetic1D",
\r
474 "libStdMeshersEngine.so")</p>
\r
476 <p class="whs3">hyp3.SetLength(1,1)</p>
\r
478 <p class="whs3">hyp3.SetLength(6,0)</p>
\r
480 <p class="whs3">hyp4 = smesh.CreateHypothesis("Propagation",
\r
481 "libStdMeshersEngine.so")</p>
\r
483 <p class="whs3"> </p>
\r
485 <p class="whs3">algo1 = smesh.CreateHypothesis("Regular_1D",
\r
486 "libStdMeshersEngine.so")</p>
\r
488 <p class="whs3">algo2 = smesh.CreateHypothesis("MEFISTO_2D",
\r
489 "libStdMeshersEngine.so")</p>
\r
491 <p class="whs3"> </p>
\r
493 <p class="whs3">mesh = smesh.CreateMesh(box)</p>
\r
495 <p class="whs3">mesh.AddHypothesis(box,hyp1)</p>
\r
497 <p class="whs3">mesh.AddHypothesis(box,hyp2)</p>
\r
499 <p class="whs3">mesh.AddHypothesis(box,algo1)</p>
\r
501 <p class="whs3">mesh.AddHypothesis(box,algo2)</p>
\r
503 <p class="whs3">mesh.AddHypothesis(edge,hyp3)</p>
\r
505 <p class="whs3">mesh.AddHypothesis(edge,hyp4)</p>
\r
507 <p class="whs3">mesh.AddHypothesis(edge,algo1)</p>
\r
509 <p class="whs3"> </p>
\r
511 <p class="whs3">smesh.Compute(mesh,box)</p>
\r
513 <p class="whs3">salome.sg.updateObjBrowser(1)</p>
\r
515 <p class="whs3"> </p>
\r
517 <p class="whs5"># remove a hypothesis</p>
\r
519 <p class="whs3">mesh.RemoveHypothesis(edge,hyp4)</p>
\r
521 <p class="whs3"> </p>
\r
523 <p class="whs3">smesh.Compute(mesh,box)</p>
\r
525 <p class="whs3">salome.sg.updateObjBrowser(1)</p>
\r
527 <p class="whs3"> </p>
\r
529 <p class="whs5"># change the value
\r
530 of the hypothesis</p>
\r
532 <p class="whs3">hyp2.SetMaxElementArea(2)</p>
\r
534 <p class="whs3">mesh.AddHypothesis(box,hyp2)</p>
\r
536 <p class="whs3"> </p>
\r
538 <p class="whs3">smesh.Compute(mesh,box)</p>
\r
540 <p class="whs3">salome.sg.updateObjBrowser(1) </p>
\r
542 <p class="whs4"> </p>
\r
544 <h3><a name=bookmark3>Export of a Mesh</a></h3>
\r
546 <p class="whs4"> </p>
\r
548 <p class="whs1"><span style="font-family: 'Lucida Console', monospace;">import
\r
551 <p class="whs1">import geompy</p>
\r
553 <p class="whs1">import StdMeshers</p>
\r
555 <p class="whs1">smesh = salome.lcc.FindOrLoadComponent("FactoryServer",
\r
556 "SMESH")</p>
\r
558 <p class="whs1">smeshgui = salome.ImportComponentGUI("SMESH")</p>
\r
560 <p class="whs1">smeshgui.Init(salome.myStudyId);</p>
\r
562 <p class="whs2"> </p>
\r
564 <p class="whs2"># create a box</p>
\r
566 <p class="whs1">box = geompy.MakeBox(0.,
\r
567 0., 0., 100., 200., 300.)</p>
\r
569 <p class="whs2"> </p>
\r
571 <p class="whs2"># add the box to the study</p>
\r
573 <p class="whs1">idbox = geompy.addToStudy(box,
\r
574 "box")</p>
\r
576 <p class="whs2"> </p>
\r
578 <p class="whs2"># create a hypothesis</p>
\r
580 <p class="whs1">print "--------------------------
\r
581 create Hypothesis"</p>
\r
583 <p class="whs1">print "--------------------------
\r
584 NumberOfSegments"</p>
\r
586 <p class="whs1">numberOfSegments
\r
589 <p class="whs1">hypNbSeg = smesh.CreateHypothesis("NumberOfSegments",
\r
590 "libStdMeshersEngine.so")</p>
\r
592 <p class="whs1">hypNbSeg.SetNumberOfSegments(numberOfSegments)</p>
\r
594 <p class="whs1">print hypNbSeg.GetName()</p>
\r
596 <p class="whs1">print hypNbSeg.GetId()</p>
\r
598 <p class="whs1">print hypNbSeg.GetNumberOfSegments()</p>
\r
600 <p class="whs1">smeshgui.SetName(salome.ObjectToID(hypNbSeg),
\r
601 "NumberOfSegments_10")</p>
\r
603 <p class="whs1">print "--------------------------
\r
604 MaxElementArea"</p>
\r
606 <p class="whs1">maxElementArea =
\r
609 <p class="whs1">hypArea = smesh.CreateHypothesis("MaxElementArea",
\r
610 "libStdMeshersEngine.so")</p>
\r
612 <p class="whs1">hypArea.SetMaxElementArea(maxElementArea)</p>
\r
614 <p class="whs1">print hypArea.GetName()</p>
\r
616 <p class="whs1">print hypArea.GetId()</p>
\r
618 <p class="whs1">print hypArea.GetMaxElementArea()</p>
\r
620 <p class="whs1">smeshgui.SetName(salome.ObjectToID(hypArea),
\r
621 "MaxElementArea_500")</p>
\r
623 <p class="whs1">print "--------------------------
\r
624 MaxElementVolume"</p>
\r
626 <p class="whs1">maxElementVolume
\r
629 <p class="whs1">hypVolume = smesh.CreateHypothesis("MaxElementVolume",
\r
630 "libStdMeshersEngine.so")</p>
\r
632 <p class="whs1">hypVolume.SetMaxElementVolume(maxElementVolume)</p>
\r
634 <p class="whs1">print hypVolume.GetName()</p>
\r
636 <p class="whs1">print hypVolume.GetId()</p>
\r
638 <p class="whs1">print hypVolume.GetMaxElementVolume()</p>
\r
640 <p class="whs1">smeshgui.SetName(salome.ObjectToID(hypVolume),
\r
641 "MaxElementVolume_500")</p>
\r
643 <p class="whs2"> </p>
\r
645 <p class="whs2"># create algorithms</p>
\r
647 <p class="whs1">print "--------------------------
\r
648 create Algorithms"</p>
\r
650 <p class="whs1">print "--------------------------
\r
651 Regular_1D"</p>
\r
653 <p class="whs1">regular1D = smesh.CreateHypothesis("Regular_1D",
\r
654 "libStdMeshersEngine.so")</p>
\r
656 <p class="whs1">smeshgui.SetName(salome.ObjectToID(regular1D),
\r
657 "Wire Discretisation")</p>
\r
659 <p class="whs1">print "--------------------------
\r
660 MEFISTO_2D"</p>
\r
662 <p class="whs1">mefisto2D = smesh.CreateHypothesis("MEFISTO_2D",
\r
663 "libStdMeshersEngine.so")</p>
\r
665 <p class="whs1">smeshgui.SetName(salome.ObjectToID(mefisto2D),
\r
666 "MEFISTO_2D")</p>
\r
668 <p class="whs2"> </p>
\r
670 <p class="whs2"># initialize a mesh with
\r
673 <p class="whs1">mesh = smesh.CreateMesh(box)</p>
\r
675 <p class="whs1">smeshgui.SetName(salome.ObjectToID(mesh),
\r
676 "MeshBox")</p>
\r
678 <p class="whs1"> </p>
\r
680 <p class="whs2"># add the hypothesis to
\r
683 <p class="whs1">print "--------------------------
\r
684 add hypothesis to the box"</p>
\r
686 <p class="whs1">mesh.AddHypothesis(box,hypNbSeg)</p>
\r
688 <p class="whs1">mesh.AddHypothesis(box,hypArea)</p>
\r
690 <p class="whs1">mesh.AddHypothesis(box,hypVolume)</p>
\r
692 <p class="whs1">mesh.AddHypothesis(box,regular1D)</p>
\r
694 <p class="whs1">mesh.AddHypothesis(box,mefisto2D)</p>
\r
696 <p class="whs2"> </p>
\r
698 <p class="whs2"># compute the mesh</p>
\r
700 <p class="whs1">print "--------------------------
\r
701 compute the mesh of the box"</p>
\r
703 <p class="whs1">ret = smesh.Compute(mesh,box)</p>
\r
705 <p class="whs1">print ret</p>
\r
707 <p class="whs1">if ret == 0:</p>
\r
709 <p class="whs1"> print
\r
710 "probleme when computing the mesh"</p>
\r
712 <p class="whs1">salome.sg.updateObjBrowser(1)</p>
\r
714 <p class="whs1">mesh.ExportMED("/tmp/meshMED.med",0)</p>
\r
716 <p class="whs2"> </p>
\r
718 <p class="whs4"> </p>
\r
720 <script type="text/javascript" language="javascript1.2">
\r
722 if (window.writeIntopicBar)
\r
723 writeIntopicBar(0);
\r