p.whs2 { font-family:'Lucida Console' , monospace; }\r
p.whs3 { font-family:'Times New Roman' , serif; }\r
p.whs4 { margin-top:0pt; margin-bottom:0pt; font-family:'Lucida Console' , monospace; }\r
-p.whs5 { margin-top:0pt; margin-bottom:0pt; }\r
-p.whs6 { margin-top:0pt; margin-bottom:0pt; font-family:Tahoma, sans-serif; }\r
-p.whs7 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
+p.whs5 { margin-top:0pt; margin-bottom:0pt; font-family:'Times New Roman' , serif; }\r
+p.whs6 { margin-top:0pt; margin-bottom:0pt; }\r
-->\r
</style><script type="text/javascript" language="JavaScript">\r
<!--\r
strNSS += "p.whs4 {margin-top:1pt;margin-bottom:1pt; }";\r
strNSS += "p.whs5 {margin-top:1pt;margin-bottom:1pt; }";\r
strNSS += "p.whs6 {margin-top:1pt;margin-bottom:1pt; }";\r
- strNSS += "p.whs7 {margin-top:1pt;margin-bottom:1pt; }";\r
strNSS +="</style>";\r
document.write(strNSS);\r
}\r
\r
<p class="whs3"># create vertices</p>\r
\r
-<p class="whs2">px =geompy.MakeVertex(100., 0. ,0. )</p>\r
+<p class="whs2">px = \r
+ geompy.MakeVertex(100., 0. , \r
+ 0. )</p>\r
\r
-<p class="whs2">py =geompy.MakeVertex(0. ,100., 0. )</p>\r
+<p class="whs2">py = \r
+ geompy.MakeVertex(0. , \r
+ 100., 0. )</p>\r
\r
-<p class="whs2">pz =geompy.MakeVertex(0. ,0. , 100.)</p>\r
+<p class="whs2">pz = \r
+ geompy.MakeVertex(0. , \r
+ 0. , 100.)</p>\r
\r
<p class="whs2"> </p>\r
\r
<p class="whs3"># create a vector from \r
two points</p>\r
\r
-<p class="whs2">vxy = geompy.MakeVector(px,py)</p>\r
+<p class="whs2">vxy = geompy.MakeVector(px, \r
+ py)</p>\r
\r
<p class="whs2"> </p>\r
\r
<p class="whs3"># create an arc from \r
three points</p>\r
\r
-<p class="whs2">arc = geompy.MakeArc(py, pz, px)</p>\r
+<p class="whs2">arc = geompy.MakeArc(py, \r
+ pz, px)</p>\r
\r
<p class="whs2"> </p>\r
\r
<p class="whs3"># create a wire</p>\r
\r
-<p class="whs2">wire = geompy.MakeWire([vxy,arc])</p>\r
+<p class="whs2">wire = geompy.MakeWire([vxy, \r
+ arc])</p>\r
\r
<p class="whs2">isPlanarFace = 1</p>\r
\r
<p class="whs2"> </p>\r
\r
-<p class="whs3"># create a face from the wire</p>\r
+<p class="whs3"># create a face from \r
+ the wire</p>\r
\r
-<p class="whs2">face1 = geompy.MakeFace(wire,isPlanarFace)</p>\r
+<p class="whs2">face1 = geompy.MakeFace(wire, \r
+ isPlanarFace)</p>\r
\r
<p class="whs2"> </p>\r
\r
-<p class="whs3"># get edges from the face</p>\r
+<p class="whs3"><span style="font-family: 'Times New Roman', serif;"># \r
+ get edges from the face</span></p>\r
\r
-<p class="whs2">vxy, arc = geompy.SubShapeAll(face1, geompy.ShapeType["EDGE"])</p>\r
+<p class="whs2">vxy,arc = geompy.SubShapeAll(face1,geompy.ShapeType["EDGE"])</p>\r
\r
-<p class="whs2"> </p>\r
+<p class="whs3"> </p>\r
\r
-<p class="whs3"># add objects in the study</p>\r
+<p class="whs3"># add objects in the \r
+ study</p>\r
\r
<p class="whs2">id_face1 = geompy.addToStudy(face1,"Face1")</p>\r
\r
-<p class="whs2">id_arc = geompy.addToStudyInFather(face1,arc,"Arc Edge")</p>\r
+<p class="whs2">id_arc = geompy.addToStudyInFather(face1,arc,"Arc \r
+ Edge")</p>\r
\r
<p class="whs2"> </p>\r
\r
\r
<p class="whs3"># create hexahedral mesh</p>\r
\r
-<p class="whs2">hexa = smesh.Mesh(face1,"Face compound : hexahedrical mesh")</p>\r
+<p class="whs2">hexa = smesh.Mesh(face1, \r
+ "Face compound : hexahedrical mesh")</p>\r
\r
<p class="whs2">algo = hexa.Triangle()</p>\r
\r
<p class="whs2"> </p>\r
\r
-<p class="whs3"># define "MaxElementArea"hypothesis</p>\r
+<p class="whs3"># define "MaxElementArea" \r
+ hypothesis</p>\r
\r
<p class="whs2">algo.MaxElementArea(30)</p>\r
\r
<p class="whs2"> </p>\r
\r
-<p class="whs3"># create a local hypothesis on the wire</p>\r
+<p class="whs3"># create a local hypothesis \r
+ on the wire</p>\r
\r
<p class="whs2">algo = hexa.Segment(wire)</p>\r
\r
<p class="whs2"> </p>\r
\r
-<p class="whs3"># define "NumberOfSegments"hypothesis to cut\r
-a straight edge in a fixed number of segments</p>\r
+<p class="whs3"># define "NumberOfSegments" \r
+ hypothesis to cut a straight edge in a fixed number of segments</p>\r
\r
<p class="whs2">algo.NumberOfSegments(6)</p>\r
\r
<p class="whs2"> </p>\r
\r
-<p class="whs3"># define a local "Deflection1D"hypothesis on the arc</p>\r
+<p class="whs3"># define a local "Deflection1D" \r
+ hypothesis on the arc</p>\r
\r
<p class="whs2">algo = hexa.Segment(arc)</p>\r
+\r
<p class="whs2">algo.Deflection1D(1)</p>\r
\r
<p class="whs2"> </p>\r
\r
+<p class="whs2"> </p>\r
+\r
<p class="whs3"># compute the mesh</p>\r
\r
<p class="whs2">hexa.Compute() </p>\r
\r
<h4><a name=bookmark4>Maximum Element Area</a></h4>\r
\r
-<p class="whs4">import smesh</p>\r
+<p class="whs4"><span style="font-family: 'Lucida Console', monospace;">import \r
+ smesh</span></p>\r
\r
<p class="whs4">import geompy</p>\r
\r
<p class="whs4">import salome</p>\r
\r
-<p class="whs4">gg = salome.ImportComponentGUI("GEOM")</p>\r
-\r
-<p class="whs5"> </p>\r
+<p class="whs4"> </p>\r
\r
-<p class="whs5"># create vertices</p>\r
+<p class="whs5"># create a face</p>\r
\r
<p class="whs4">px = \r
geompy.MakeVertex(100., 0. , \r
geompy.MakeVertex(0. , \r
0. , 100.)</p>\r
\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"># create a vector from \r
- two points</p>\r
+<p class="whs4"> </p>\r
\r
<p class="whs4">vxy = geompy.MakeVector(px, \r
py)</p>\r
\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"># create an arc from three \r
- points</p>\r
-\r
<p class="whs4">arc = geompy.MakeArc(py, \r
pz, px)</p>\r
\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"># create a wire</p>\r
-\r
<p class="whs4">wire = geompy.MakeWire([vxy, \r
arc])</p>\r
\r
-<p class="whs4">isPlanarFace = 1</p>\r
-\r
-<p class="whs5"> </p>\r
+<p class="whs4"> </p>\r
\r
-<p class="whs5"># create a face from the \r
- wire</p>\r
+<p class="whs4">isPlanarFace = 1</p>\r
\r
-<p class="whs4">face1 = geompy.MakeFace(wire, \r
+<p class="whs4">face = geompy.MakeFace(wire, \r
isPlanarFace)</p>\r
\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"># add objects in the study</p>\r
-\r
-<p class="whs4">id_face1 = geompy.addToStudy(face1,"Face1")</p>\r
-\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"># display faces</p>\r
-\r
-<p class="whs4">gg.createAndDisplayGO(id_face1)</p>\r
+<p class="whs4"> </p>\r
\r
-<p class="whs4">gg.setDisplayMode(id_face1,1)</p>\r
+<p class="whs5"># add the face in the \r
+ study</p>\r
\r
-<p class="whs4">gg.setTransparency(id_face1,0.2)</p>\r
+<p class="whs4">id_face = geompy.addToStudy(face, \r
+ "Face to be meshed")</p>\r
\r
-<p class="whs5"> </p>\r
-\r
-<p class="whs5"># create a hexahedral mesh</p>\r
+<p class="whs4"> </p>\r
\r
-<p class="whs4">hexa = smesh.Mesh(face1, \r
- "Face compound : hexahedrical mesh")</p>\r
+<p class="whs5"># create a mesh</p>\r
\r
-<p class="whs4">algo = hexa.Triangle()</p>\r
+<p class="whs4">tria_mesh = smesh.Mesh(face, \r
+ "Face : triangulation")</p>\r
\r
-<p class="whs5"> </p>\r
+<p class="whs4"> </p>\r
\r
-<p class="whs5"># define "MaxElementArea" \r
- hypothesis to be applied to each triangle</p>\r
+<p class="whs5"># define 1D meshing:</p>\r
\r
-<p class="whs4">algo.MaxElementArea(7)</p>\r
+<p class="whs4">algo = tria_mesh.Segment()</p>\r
\r
-<p class="whs5"> </p>\r
+<p class="whs4">algo.NumberOfSegments(20)</p>\r
\r
-<p class="whs5"># create a quadrangle 2D \r
- algorithm for faces</p>\r
+<p class="whs4"> </p>\r
\r
-<p class="whs4">hexa.Quadrangle()</p>\r
+<p class="whs5"># define 2D meshing:</p>\r
\r
<p class="whs5"> </p>\r
\r
-<p class="whs5"># create a local hypothesis</p>\r
+<p class="whs5"># assign triangulation \r
+ algorithm</p>\r
\r
-<p class="whs6">algo = hexa.Segment(wire)</p>\r
+<p class="whs4">algo = tria_mesh.Triangle()</p>\r
\r
-<p class="whs5"> </p>\r
+<p class="whs4"> </p>\r
\r
-<p class="whs5"># define "NumberOfSegments" \r
- hypothesis to cut an edge in a fixed number of segments</p>\r
+<p class="whs5"># apply "Max Element \r
+ Area" hypothesis to each triangle</p>\r
\r
-<p class="whs4">algo.NumberOfSegments(10)</p>\r
+<p class="whs4">algo.MaxElementArea(100)</p>\r
\r
-<p class="whs5"> </p>\r
+<p class="whs4"> </p>\r
\r
<p class="whs5"># compute the mesh</p>\r
\r
-<p class="whs4">hexa.Compute() </p>\r
+<p class="whs4">tria_mesh.Compute() \r
+ </p>\r
\r
<p class="whs4"> </p>\r
\r
\r
<p class="whs4">import StdMeshers</p>\r
\r
+<p class="whs4">import NETGENPlugin</p>\r
+\r
+<p class="whs4"> </p>\r
+\r
<p class="whs4">smesh = salome.lcc.FindOrLoadComponent("FactoryServer", \r
"SMESH")</p>\r
\r
\r
<p class="whs4"> </p>\r
\r
-<p class="whs7"># create a box</p>\r
+<p class="whs5"># create a box</p>\r
\r
<p class="whs4">box = geompy.MakeCylinderRH(30, \r
- 50) #MakeBox(0., 0., 0., 100., 200., 300.)</p>\r
+ 50) #MakeBox(0., 0., 0., </p>\r
+\r
+<p class="whs4">100., 200., 300.)</p>\r
\r
<p class="whs4"> </p>\r
\r
-<p class="whs7"># add the box to the \r
+<p class="whs5"># add the box in the \r
study</p>\r
\r
<p class="whs4">idbox = geompy.addToStudy(box, \r
\r
<p class="whs4"> </p>\r
\r
-<p class="whs7"># create vertices</p>\r
-\r
-<p class="whs4">px = \r
- geompy.MakeVertex(100., 0. , \r
- 0. )</p>\r
-\r
-<p class="whs4">py = \r
- geompy.MakeVertex(0. , \r
- 100., 0. )</p>\r
-\r
-<p class="whs4">pz = \r
- geompy.MakeVertex(0. , \r
- 0. , 100.)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs7"># create a vector from \r
- two points</p>\r
-\r
-<p class="whs4">vxy = geompy.MakeVector(px, \r
- py)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs7"># create an arc from \r
- three points</p>\r
-\r
-<p class="whs4">arc = geompy.MakeArc(py, \r
- pz, px)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs7"># create a wire</p>\r
-\r
-<p class="whs4">wire = geompy.MakeWire([vxy, \r
- arc])</p>\r
-\r
-<p class="whs4">isPlanarFace = 1</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs7"># create a face from \r
- the wire</p>\r
-\r
-<p class="whs4">#face1</p>\r
-\r
-<p class="whs4">box = geompy.MakeFace(wire, \r
- isPlanarFace)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs7"># add objects in the \r
- study</p>\r
-\r
-<p class="whs4">id_face1 = geompy.addToStudy(box,"Face1")</p>\r
-\r
-<p class="whs4">#geompy.addToStudy(face1,"Face1")</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs7"># display faces</p>\r
-\r
-<p class="whs4">gg.createAndDisplayGO(id_face1)</p>\r
+<p class="whs5"># create a set of hypotheses</p>\r
\r
-<p class="whs4">gg.setDisplayMode(id_face1,1)</p>\r
-\r
-<p class="whs4">gg.setTransparency(id_face1,0.2)</p>\r
-\r
-<p class="whs4"> </p>\r
-\r
-<p class="whs7"># create a hypothesis</p>\r
-\r
-<p class="whs4">print "-------------------------- \r
- create Hypothesis"</p>\r
+<p class="whs5"> </p>\r
\r
-<p class="whs4">print "-------------------------- \r
- NumberOfSegments"</p>\r
+<p class="whs5"># Number of Segments</p>\r
\r
<p class="whs4">numberOfSegments \r
= 7</p>\r
\r
<p class="whs4">print hypNbSeg.GetName()</p>\r
\r
-<p class="whs4">print hypNbSeg.GetId()</p>\r
-\r
<p class="whs4">print hypNbSeg.GetNumberOfSegments()</p>\r
\r
<p class="whs4">smeshgui.SetName(salome.ObjectToID(hypNbSeg), \r
- "NumberOfSegments_10")</p>\r
+ "NumberOfSegments_7")</p>\r
\r
-<p class="whs4">print "-------------------------- \r
- MaxElementArea"</p>\r
+<p class="whs4"> </p>\r
+\r
+<p class="whs5"># Max Element Area</p>\r
\r
<p class="whs4">maxElementArea = \r
800</p>\r
\r
<p class="whs4">print hypArea.GetName()</p>\r
\r
-<p class="whs4">print hypArea.GetId()</p>\r
-\r
<p class="whs4">print hypArea.GetMaxElementArea()</p>\r
\r
<p class="whs4">smeshgui.SetName(salome.ObjectToID(hypArea), \r
"MaxElementArea_800")</p>\r
\r
-<p class="whs4">print "-------------------------- \r
- MaxElementVolume"</p>\r
+<p class="whs4"> </p>\r
+\r
+<p class="whs5"># Max Element Volume</p>\r
\r
<p class="whs4">maxElementVolume \r
= 900</p>\r
\r
<p class="whs4">print hypVolume.GetName()</p>\r
\r
-<p class="whs4">print hypVolume.GetId()</p>\r
-\r
<p class="whs4">print hypVolume.GetMaxElementVolume()</p>\r
\r
<p class="whs4">smeshgui.SetName(salome.ObjectToID(hypVolume), \r
\r
<p class="whs4"> </p>\r
\r
-<p class="whs7"># create algorithms</p>\r
+<p class="whs5"># create a set of algorithms</p>\r
\r
-<p class="whs4">print "-------------------------- \r
- create Algorithms"</p>\r
+<p class="whs5"> </p>\r
\r
-<p class="whs4">print "-------------------------- \r
- Regular_1D"</p>\r
+<p class="whs5"># Regular_1D</p>\r
\r
<p class="whs4">regular1D = smesh.CreateHypothesis("Regular_1D", \r
"libStdMeshersEngine.so")</p>\r
<p class="whs4">smeshgui.SetName(salome.ObjectToID(regular1D), \r
"Wire Discretisation")</p>\r
\r
-<p class="whs4">print "-------------------------- \r
- MEFISTO_2D"</p>\r
+<p class="whs4"> </p>\r
+\r
+<p class="whs5"># MEFISTO_2D</p>\r
\r
<p class="whs4">mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", \r
"libStdMeshersEngine.so")</p>\r
<p class="whs4">smeshgui.SetName(salome.ObjectToID(mefisto2D), \r
"MEFISTO_2D")</p>\r
\r
-<p class="whs4">#print "-------------------------- \r
- Hexa_3D (Hexahedron meshing algorithm)"</p>\r
+<p class="whs4"> </p>\r
\r
-<p class="whs4">hexa3D = smesh.CreateHypothesis("Hexa_3D", \r
- "libStdMeshersEngine.so")</p>\r
+<p class="whs5"># NETGEN_3D (Tetrahedron \r
+ meshing algorithm)</p>\r
\r
-<p class="whs4">smeshgui.SetName(salome.ObjectToID(hexa3D), \r
- "HEXA_3D")</p>\r
+<p class="whs4">tetra3D = smesh.CreateHypothesis("NETGEN_3D", \r
+ "libNETGENEngine.so")</p>\r
+\r
+<p class="whs4">smeshgui.SetName(salome.ObjectToID(tetra3D), \r
+ "NETGEN_3D")</p>\r
\r
<p class="whs4"> </p>\r
\r
-<p class="whs7"># initialize a mesh \r
+<p class="whs5"># initialize a mesh \r
with the box</p>\r
\r
<p class="whs4">mesh = smesh.CreateMesh(box)</p>\r
\r
<p class="whs4"> </p>\r
\r
-<p class="whs7"># add a hypothesis \r
- to the box</p>\r
-\r
-<p class="whs4">print "-------------------------- \r
- add hypothesis to the box"</p>\r
+<p class="whs5"># add hypotheses and \r
+ algorithms to the box</p>\r
\r
<p class="whs4">mesh.AddHypothesis(box,hypNbSeg)</p>\r
\r
\r
<p class="whs4">mesh.AddHypothesis(box,mefisto2D)</p>\r
\r
-<p class="whs4">mesh.AddHypothesis(box,hexa3D)</p>\r
+<p class="whs4">mesh.AddHypothesis(box,tetra3D)</p>\r
\r
<p class="whs4"> </p>\r
\r
-<p class="whs7"># compute the mesh</p>\r
-\r
-<p class="whs4">print "-------------------------- \r
- compute the mesh of the box"</p>\r
+<p class="whs5"># compute the mesh</p>\r
\r
<p class="whs4">ret = smesh.Compute(mesh,box)</p>\r
\r
-<p class="whs4">print ret</p>\r
-\r
<p class="whs4">if ret == 0:</p>\r
\r
<p class="whs4"> print \r
"probleme when computing the mesh"</p>\r
\r
-<p class="whs4">salome.sg.updateObjBrowser(1)</p>\r
+<p class="whs4">else:</p>\r
\r
-<p class="whs4"> </p>\r
+<p class="whs4"> print \r
+ "Computation succeded"</p>\r
\r
-<h3>Defining Additional Hypotheses</h3>\r
+<p class="whs4">salome.sg.updateObjBrowser(1) \r
+ </p>\r
+\r
+<p class="whs4"> </p>\r
\r
<h4><a name=bookmark6>Length from Edges</a></h4>\r
\r
-<p class="whs2">import smesh</p>\r
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">import \r
+ salome</span></p>\r
\r
<p class="whs2">import geompy</p>\r
\r
-<p class="whs2">import salome</p>\r
-\r
-<p class="whs2">gg = salome.ImportComponentGUI("GEOM")</p>\r
+<p class="whs2">import smesh</p>\r
\r
-<p> </p>\r
+<p class="whs2"> </p>\r
\r
-<p># create sketchers</p>\r
+<p class="whs3"># create sketchers</p>\r
\r
<p class="whs2">sketcher1 = geompy.MakeSketcher("Sketcher:F \r
0 0:TT 70 0:TT 70 70:TT 0 70:WW")</p>\r
\r
<p class="whs2">isPlanarFace = 1</p>\r
\r
-<p> </p>\r
+<p class="whs2"> </p>\r
\r
-<p># create faces from two wires</p>\r
+<p class="whs3"># create a face from \r
+ two wires</p>\r
\r
<p class="whs2">face1 = geompy.MakeFaces([sketcher1, \r
sketcher2],isPlanarFace)</p>\r
\r
-<p> </p>\r
+<p class="whs2"> </p>\r
\r
-<p># add objects in the study</p>\r
+<p class="whs3"># add object in the study</p>\r
\r
<p class="whs2">id_face1 = geompy.addToStudy(face1,"Face1")</p>\r
\r
-<p> </p>\r
-\r
-<p># display faces</p>\r
-\r
-<p class="whs2">gg.createAndDisplayGO(id_face1)</p>\r
-\r
-<p class="whs2">gg.setDisplayMode(id_face1,1)</p>\r
-\r
-<p class="whs2">gg.setTransparency(id_face1,0.2)</p>\r
-\r
-<p> </p>\r
+<p class="whs2"> </p>\r
\r
-<p># create a mesh</p>\r
+<p class="whs3"># create a mesh</p>\r
\r
-<p class="whs2">hexa = smesh.Mesh(face1, \r
+<p class="whs2">tria = smesh.Mesh(face1, \r
"Face : triangle 2D mesh")</p>\r
\r
-<p class="whs2">algo = hexa.Triangle()</p>\r
-\r
-<p> </p>\r
-\r
-<p># define "MaxElementArea" hypothesis to be applied to each \r
- triangle</p>\r
+<p class="whs2"> </p>\r
\r
-<p class="whs2">algo.MaxElementArea(30)</p>\r
+<p class="whs3"># Define 1D meshing</p>\r
\r
-<p> </p>\r
+<p class="whs2">algo = tria.Segment()</p>\r
\r
-<p># define "LengthFromEdges" hypothesis to build triangles based \r
- on the length of the edges taken from the wire</p>\r
+<p class="whs2">algo.NumberOfSegments(2)</p>\r
\r
-<p class="whs2">algo.LengthFromEdges()</p>\r
+<p class="whs2"> </p>\r
\r
-<p> </p>\r
+<p class="whs3"># create and assign the \r
+ algorithm for 2D meshing with triangles</p>\r
\r
-<p># create local hypothesis</p>\r
+<p class="whs2">algo = tria.Triangle()</p>\r
\r
-<p class="whs2">algo = hexa.Segment()</p>\r
+<p class="whs2"> </p>\r
\r
-<p> </p>\r
+<p class="whs3"># create and assign "LengthFromEdges" \r
+ hypothesis to build triangles </p>\r
\r
-<p># define "NumberOfSegments" hypothesis to cut an edge in a \r
- fixed number of segments</p>\r
+<p class="whs3"># based on the length \r
+ of the edges taken from the wire</p>\r
\r
-<p class="whs2">algo.NumberOfSegments(2)</p>\r
+<p class="whs2">algo.LengthFromEdges()</p>\r
\r
-<p> </p>\r
+<p class="whs2"> </p>\r
\r
-<p># compute the mesh</p>\r
+<p class="whs3"># compute the mesh</p>\r
\r
-<p class="whs2">hexa.Compute() </p>\r
+<p class="whs2">tria.Compute() </p>\r
\r
<p class="whs2"> </p>\r
\r
+<h3>Defining Additional Hypotheses</h3>\r
+\r
<h4><a name=bookmark7>Propagation</a></h4>\r
\r
-<p class="whs2">from geompy import \r
- *</p>\r
+<p class="whs2"><span style="font-family: 'Lucida Console', monospace;">from \r
+ geompy import *</span></p>\r
\r
<p class="whs2">import smesh</p>\r
\r
\r
<p class="whs3"># create a solid</p>\r
\r
-<p class="whs2">Block = MakeHexa(FaceX11, \r
+<p class="whs2">box = MakeHexa(FaceX11, \r
FaceX21, FaceY111, FaceY121, FaceZ11, FaceZ12)</p>\r
\r
<p class="whs2"> </p>\r
\r
-<p class="whs3"># create a compound</p>\r
-\r
-<p class="whs2">box = MakeCompound([Block])</p>\r
-\r
-<p class="whs2"> </p>\r
-\r
<p class="whs3"># add in the study</p>\r
\r
<p class="whs2">box_id = addToStudy(box, \r
- "Box compound")</p>\r
+ "Box")</p>\r
\r
<p class="whs2"> </p>\r
\r
mesh on the box</p>\r
\r
<p class="whs2">hexa = smesh.Mesh(box, \r
- "Box compound : hexahedrical mesh")</p>\r
+ "Box : hexahedrical mesh")</p>\r
+\r
+<p class="whs2"> </p>\r
+\r
+<p class="whs3"># create an 1D algorithm \r
+ for edges</p>\r
\r
<p class="whs2">algo = hexa.Segment()</p>\r
\r
\r
<p class="whs2"> </p>\r
\r
-<p class="whs2"><span style="font-family: 'Times New Roman', serif;"># \r
- define "Arithmetic1D" hypothesis to cut an edge in several segments \r
- with arithmetic length</span> </p>\r
-\r
-<p class="whs2">increasing</p>\r
+<p class="whs3"># define "Arithmetic1D" \r
+ hypothesis to cut an edge<span style="font-family: 'Times New Roman', serif;"> \r
+ in several segments with increasing length</span></p>\r
\r
<p class="whs2">algo.Arithmetic1D(1, \r
4)</p>\r
<p class="whs2"> </p>\r
\r
<p class="whs3"># define "Propagation" \r
- hypothesis that propagatea all other hypothesis on all edges on the opposite \r
- side in case of quadrangular faces</p>\r
+ hypothesis that propagates all other 1D hypotheses</p>\r
+\r
+<p class="whs3"># from all edges on the \r
+ opposite side of a face in case of quadrangular faces</p>\r
\r
<p class="whs2">algo.Propagation()</p>\r
\r
\r
<p class="whs3"># compute the mesh</p>\r
\r
-<p class="whs2">hexa.Compute() </p>\r
-\r
-<p class="whs2"> </p>\r
+<p class="whs2">hexa.Compute() </p>\r
\r
<h3><a name=bookmark8>Defining Meshing Algorithms</a></h3>\r
\r
\r
<p class="whs4">smeshgui.Init(salome.myStudyId);</p>\r
\r
-<p class="whs5"> </p>\r
+<p class="whs6"> </p>\r
\r
-<p class="whs5"># create algorithms</p>\r
+<p class="whs6"># create algorithms</p>\r
\r
<p class="whs4">print "-------------------------- \r
create Algorithms"</p>\r
\r
<p class="whs4">salome.sg.updateObjBrowser(1)</p>\r
\r
-<p class="whs5"> </p>\r
+<p class="whs6"> </p>\r
\r
<script type="text/javascript" language="javascript1.2">\r
<!--\r