]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
PAL12557: Documentation for scripts is not up to date.
authorjfa <jfa@opencascade.com>
Fri, 14 Jul 2006 06:16:22 +0000 (06:16 +0000)
committerjfa <jfa@opencascade.com>
Fri, 14 Jul 2006 06:16:22 +0000 (06:16 +0000)
doc/salome/gui/GEOM/blocks_operations.htm
doc/salome/gui/GEOM/building_by_blocks.htm
doc/salome/gui/GEOM/geometrical_objects.htm
doc/salome/gui/GEOM/measurement_tools.htm
doc/salome/gui/GEOM/primitives.htm
doc/salome/gui/GEOM/transformation_operations.htm

index ece24133c3595941214d96d8b98848ad4cb5dfae..7498a7ae4181e9c35753956ec77834c924071dcd 100755 (executable)
@@ -15,6 +15,7 @@ if (navigator.appName !="Netscape")
 <style type="text/css">\r
 <!--\r
 p.whs1 { font-family:'Lucida Console' , monospace; }\r
+p.whs2 { font-family:'Times New Roman' , serif; }\r
 -->\r
 </style><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
 <!--\r
@@ -79,15 +80,18 @@ if (window.writeIntopicBar)
 \r
 <h3><a name=bookmark4>Multi Transformation</a></h3>\r
 \r
-<p class="whs1">import geompy</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">import \r
+ geompy</span></p>\r
 \r
 <p class="whs1">import salome</p>\r
 \r
+<p class="whs1">&nbsp;</p>\r
+\r
 <p class="whs1">gg = salome.ImportComponentGUI(&quot;GEOM&quot;)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># create vertices</p>\r
+<p class="whs2"># create vertices</p>\r
 \r
 <p class="whs1">p_25_25_50 = geompy.MakeVertex(25., \r
  25., 50.)</p>\r
@@ -98,9 +102,13 @@ if (window.writeIntopicBar)
 <p class="whs1">p_25_50_25 = geompy.MakeVertex(25., \r
  50., 25.)</p>\r
 \r
+<p class="whs1">&nbsp;</p>\r
+\r
 <p class="whs1">box = geompy.MakeBoxDXDYDZ(50, \r
  50, 50)</p>\r
 \r
+<p class="whs1">&nbsp;</p>\r
+\r
 <p class="whs1">top_face = geompy.GetFaceNearPoint(box, \r
  p_25_25_50)</p>\r
 \r
@@ -110,18 +118,21 @@ if (window.writeIntopicBar)
 <p class="whs1">xz_face = geompy.GetFaceNearPoint(box, \r
  p_25_50_25)</p>\r
 \r
-<p class="whs1">top_face_ind = geompy.LocalOp.GetSubShapeIndex(box, \r
+<p class="whs1">&nbsp;</p>\r
+\r
+<p class="whs1">top_face_ind = geompy.GetSubShapeID(box, \r
  top_face)</p>\r
 \r
-<p class="whs1">yz_face_ind = geompy.LocalOp.GetSubShapeIndex(box, \r
+<p class="whs1">yz_face_ind = geompy.GetSubShapeID(box, \r
  yz_face)</p>\r
 \r
-<p class="whs1">xz_face_ind = geompy.LocalOp.GetSubShapeIndex(box, \r
+<p class="whs1">xz_face_ind = geompy.GetSubShapeID(box, \r
  xz_face)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># Multi-transformate block and glue the result</p>\r
+<p class="whs2"># Multi-transformate \r
+ block and glue the result</p>\r
 \r
 <p class="whs1">box_tr1 = geompy.MakeMultiTransformation1D(box, \r
  yz_face_ind, top_face_ind, 3)</p>\r
@@ -129,9 +140,10 @@ if (window.writeIntopicBar)
 <p class="whs1">box_tr2 = geompy.MakeMultiTransformation2D(box, \r
  xz_face_ind, yz_face_ind, 3, top_face_ind, 0, 2)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># add objects in the study</p>\r
+<p class="whs2"># add objects in the \r
+ study</p>\r
 \r
 <p class="whs1">id_box = geompy.addToStudy(box, \r
  &quot;Box&quot;)</p>\r
@@ -142,9 +154,9 @@ if (window.writeIntopicBar)
 <p class="whs1">id_box_tr2 = geompy.addToStudy(box_tr2, \r
  &quot;Multi-transformed Block 2D&quot;)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># display the results</p>\r
+<p class="whs2"># display the results</p>\r
 \r
 <p class="whs1">gg.createAndDisplayGO(id_box)</p>\r
 \r
@@ -152,10 +164,10 @@ if (window.writeIntopicBar)
 \r
 <p class="whs1">gg.createAndDisplayGO(id_box_tr1)</p>\r
 \r
-<p><span style="font-family: 'Lucida Console', monospace;">gg.createAndDisplayGO(id_box_tr2)</span> \r
+<p class="whs1">gg.createAndDisplayGO(id_box_tr2) \r
  </p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <h3><a name=bookmark5>Explode on Blocks</a></h3>\r
 \r
@@ -163,11 +175,14 @@ if (window.writeIntopicBar)
 \r
 <p class="whs1">import salome</p>\r
 \r
+<p class="whs1">&nbsp;</p>\r
+\r
 <p class="whs1">gg = salome.ImportComponentGUI(&quot;GEOM&quot;)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># create a box and a sphere</p>\r
+<p class="whs2"># create a box and a \r
+ sphere</p>\r
 \r
 <p class="whs1">box = geompy.MakeBoxDXDYDZ(200, \r
  200, 200)</p>\r
@@ -176,31 +191,38 @@ if (window.writeIntopicBar)
 \r
 <p class="whs1">&nbsp;</p>\r
 \r
-<p># make a compound</p>\r
+<p class="whs2"># make a compound</p>\r
 \r
 <p class="whs1">compound = geompy.MakeCompound([box, \r
  sphere])</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs2">&nbsp;</p>\r
+\r
+<p class="whs2"># get all the blocks \r
+ of the given compound, by criteria: min_nb_faces &lt;= nb. of faces &lt;= \r
+ max_nb_faces</p>\r
+\r
+<p class="whs1">min_nb_faces = 6</p>\r
 \r
-<p># get all the blocks, contained in the given compound</p>\r
+<p class="whs1">max_nb_faces = 6</p>\r
 \r
 <p class="whs1">make_block_explode \r
- = geompy.MakeBlockExplode(compound, 1, 1)</p>\r
+ = geompy.MakeBlockExplode(compound, min_nb_faces, max_nb_faces)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># add objects in the study</p>\r
+<p class="whs2"># add objects in the \r
+ study</p>\r
 \r
 <p class="whs1">id_compound = geompy.addToStudy(compound, \r
  &quot;Compound&quot;)</p>\r
 \r
 <p class="whs1">id_make_block_explode \r
- = geompy.addToStudy(make_block_explode[0], &quot;MakeBlockExplode&quot;)</p>\r
+ = geompy.addToStudyInFather(compound, make_block_explode[0], &quot;MakeBlockExplode&quot;)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># display the results</p>\r
+<p class="whs2"># display the results</p>\r
 \r
 <p class="whs1">gg.createAndDisplayGO(id_compound)</p>\r
 \r
@@ -217,42 +239,45 @@ if (window.writeIntopicBar)
 \r
 <p class="whs1">import salome</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># create a box and a sphere</p>\r
+<p class="whs2"># create a box</p>\r
 \r
 <p class="whs1">box = geompy.MakeBoxDXDYDZ(200, \r
  200, 200)</p>\r
 \r
-<p>&nbsp;</p>\r
-\r
-<p># check and improve</p>\r
-\r
-<p class="whs1">check_box = geompy.CheckAndImprove(box)</p>\r
-\r
-<p>&nbsp;&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># build all possible propagation groups</p>\r
+<p class="whs2"># build all possible \r
+ propagation groups</p>\r
 \r
 <p class="whs1">listChains = geompy.Propagate(check_box)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># add objects in the study</p>\r
+<p class="whs2"># add objects in the \r
+ study</p>\r
 \r
 <p class="whs1">geompy.addToStudy(check_box, \r
  &quot;Box&quot;)</p>\r
 \r
+<p class="whs1">ii = 1</p>\r
+\r
 <p class="whs1">for chain in listChains:</p>\r
 \r
 <p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;geompy.addToStudyInFather(check_box, \r
- chain, &quot;propagation chain&quot;)</p>\r
+ chain, &quot;propagation chain &quot; + `ii`)</p>\r
 \r
-<p><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;ii \r
+ = ii + 1</p>\r
+\r
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;pass</p>\r
 \r
 <p>&nbsp;</p>\r
 \r
+<p><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
+ </p>\r
+\r
 <script type="text/javascript" language="javascript1.2">\r
 <!--\r
 if (window.writeIntopicBar)\r
index 7f4ea3e9749411c1b5c02a8f6748296216d9c2c3..e2cb299ad8b0242d076c1e9317660297c51fed6d 100755 (executable)
@@ -15,6 +15,7 @@ if (navigator.appName !="Netscape")
 <style type="text/css">\r
 <!--\r
 p.whs1 { font-family:'Lucida Console' , monospace; }\r
+p.whs2 { font-family:'Times New Roman' , serif; }\r
 -->\r
 </style><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
 <!--\r
@@ -200,8 +201,6 @@ if (window.writeIntopicBar)
 <p><span style="font-family: 'Lucida Console', monospace;">gg.setDisplayMode(id_qface3,1)</span> \r
  </p>\r
 \r
-<p>&nbsp;</p>\r
-\r
 <h3>Hexagonal Solid</h3>\r
 \r
 <p class="whs1">import geompy</p>\r
@@ -210,120 +209,141 @@ if (window.writeIntopicBar)
 \r
 <p class="whs1">gg = salome.ImportComponentGUI(&quot;GEOM&quot;)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># create vertices</p>\r
+<p class="whs2"># create vertices</p>\r
 \r
-<p class="whs1">p1 = geompy.MakeVertex( \r
- &nbsp;0., &nbsp;&nbsp;0., \r
+<p class="whs1">p0 &nbsp;= \r
+ geompy.MakeVertex( &nbsp;0., \r
+ &nbsp;&nbsp;0., \r
  &nbsp;&nbsp;0.)</p>\r
 \r
-<p class="whs1">p2 = geompy.MakeVertex(150., \r
- &nbsp;30., &nbsp;&nbsp;0.)</p>\r
+<p class="whs1">p1 &nbsp;= \r
+ geompy.MakeVertex( &nbsp;0., \r
+ &nbsp;&nbsp;0., \r
+ &nbsp;40.)</p>\r
 \r
-<p class="whs1">p3 = geompy.MakeVertex( \r
- &nbsp;0., 120., \r
- &nbsp;50.)</p>\r
+<p class="whs1">p2 &nbsp;= \r
+ geompy.MakeVertex( 70., -15., &nbsp;&nbsp;0.)</p>\r
 \r
-<p class="whs1">p4 = geompy.MakeVertex( \r
- &nbsp;0., &nbsp;40., \r
- &nbsp;70.)</p>\r
+<p class="whs1">p3 &nbsp;= \r
+ geompy.MakeVertex( 70., -15., &nbsp;70.)</p>\r
 \r
-<p class="whs1">p5 = geompy.MakeVertex(100., \r
- &nbsp;20., &nbsp;45.)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs1">p6 = geompy.MakeVertex( \r
&nbsp;0., 70., \r
- &nbsp;40.)</p>\r
+<p class="whs1">p4 &nbsp;= \r
geompy.MakeVertex( &nbsp;0., \r
+ &nbsp;70., &nbsp;&nbsp;0.)</p>\r
 \r
-<p class="whs1">p7 = geompy.MakeVertex( \r
- 70., 70., &nbsp;70.)</p>\r
+<p class="whs1">p5 &nbsp;= \r
+ geompy.MakeVertex( &nbsp;0., \r
+ &nbsp;70., &nbsp;40.)</p>\r
 \r
-<p class="whs1">p8 = geompy.MakeVertex( \r
- 70.,-15., &nbsp;70.)</p>\r
+<p class="whs1">p6 &nbsp;= \r
+ geompy.MakeVertex( 70., &nbsp;70., \r
+ &nbsp;&nbsp;0.)</p>\r
 \r
-<p class="whs1">p9 = geompy.MakeVertex( \r
- &nbsp;0., &nbsp;0., \r
- &nbsp;40.)</p>\r
+<p class="whs1">p7 &nbsp;= \r
+ geompy.MakeVertex( 70., &nbsp;70., \r
+ &nbsp;70.)</p>\r
+\r
+<p class="whs1">&nbsp;</p>\r
+\r
+<p class="whs1">p8 &nbsp;= \r
+ geompy.MakeVertex( &nbsp;0., \r
+ -50., &nbsp;&nbsp;0.)</p>\r
+\r
+<p class="whs1">p9 &nbsp;= \r
+ geompy.MakeVertex( &nbsp;0., \r
+ -50., &nbsp;40.)</p>\r
 \r
 <p class="whs1">p10 = geompy.MakeVertex( \r
- &nbsp;0., 70., \r
- &nbsp;&nbsp;0.)</p>\r
+ 70., -35., &nbsp;&nbsp;0.)</p>\r
 \r
 <p class="whs1">p11 = geompy.MakeVertex( \r
- 70., 70., &nbsp;&nbsp;0.)</p>\r
+ 70., -35., &nbsp;70.)</p>\r
 \r
-<p class="whs1">p12 = geompy.MakeVertex( \r
- 70., -15., &nbsp;&nbsp;0.)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs1">p13 = geompy.MakeVertex( \r
- &nbsp;0., &nbsp;0., \r
- &nbsp;&nbsp;0.)</p>\r
+<p class="whs2"># create faces</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">qface1 = geompy.MakeQuad4Vertices(p0, \r
+ p1, p2, p3)</p>\r
 \r
-<p># create faces</p>\r
+<p class="whs1">qface2 = geompy.MakeQuad4Vertices(p4, \r
+ p5, p6, p7)</p>\r
 \r
-<p class="whs1">qface1 = geompy.MakeQuad4Vertices(p1\r
- p2, p3, p4)</p>\r
+<p class="whs1">qface3 = geompy.MakeQuad4Vertices(p0\r
+ p1, p4, p5)</p>\r
 \r
-<p class="whs1">qface2 = geompy.MakeQuad4Vertices(p1\r
- p2, p5, p4)</p>\r
+<p class="whs1">qface4 = geompy.MakeQuad4Vertices(p2\r
+ p3, p6, p7)</p>\r
 \r
-<p class="whs1">qface3 = geompy.MakeQuad4Vertices(p13\r
- p12, p11, p10)</p>\r
+<p class="whs1">qface5 = geompy.MakeQuad4Vertices(p0\r
+ p2, p4, p6)</p>\r
 \r
-<p class="whs1">qface4 = geompy.MakeQuad4Vertices(p9\r
- p8, p7, p6)</p>\r
+<p class="whs1">qface6 = geompy.MakeQuad4Vertices(p1\r
+ p3, p5, p7)</p>\r
 \r
-<p class="whs1">qface5 = geompy.MakeQuad4Vertices(p13, \r
- p9, p6, p10)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs1">qface6 = geompy.MakeQuad4Vertices(p13\r
- p9, p8, p12)</p>\r
+<p class="whs1">qface7 = geompy.MakeQuad4Vertices(p8\r
+ p9, p10, p11)</p>\r
 \r
-<p class="whs1">qface7 = geompy.MakeQuad4Vertices(p12, \r
- p8, p7, p11)</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs1">qface8 = geompy.MakeQuad4Vertices(p11, \r
p7, p6, p10)</p>\r
+<p class="whs2"># create a hexahedral \r
solid between two given faces</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">solid1 = geompy.MakeHexa2Faces(qface1, \r
+ qface7)</p>\r
 \r
-<p># create a hexahedral solid between two given faces</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs1">solid1 = geompy.MakeHexa2Faces(qface1, \r
qface2)</p>\r
+<p class="whs2"># create a hexahedral \r
solid, bounded by six given faces</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">solid2 = geompy.MakeHexa(qface1, \r
+ qface2, qface3, qface4, qface5, qface6)</p>\r
 \r
-<p># create a hexahedral solids, bounded by six given faces</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs1">solid2 = geompy.MakeHexa(qface3, \r
qface4, qface5, qface6, qface7, qface8)</p>\r
+<p class="whs2"># add objects in the \r
study</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">geompy.addToStudy(qface1,&quot;qface1&quot;)</p>\r
 \r
-<p># add objects in the study</p>\r
+<p class="whs1">geompy.addToStudy(qface2,&quot;qface2&quot;)</p>\r
+\r
+<p class="whs1">geompy.addToStudy(qface3,&quot;qface3&quot;)</p>\r
+\r
+<p class="whs1">geompy.addToStudy(qface4,&quot;qface4&quot;)</p>\r
+\r
+<p class="whs1">geompy.addToStudy(qface5,&quot;qface5&quot;)</p>\r
+\r
+<p class="whs1">geompy.addToStudy(qface6,&quot;qface6&quot;)</p>\r
+\r
+<p class="whs1">geompy.addToStudy(qface7,&quot;qface7&quot;)</p>\r
+\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <p class="whs1">id_solid1 = geompy.addToStudy(solid1,&quot;Solid1&quot;)</p>\r
 \r
 <p class="whs1">id_solid2 = geompy.addToStudy(solid2,&quot;Solid2&quot;)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># display solids</p>\r
+<p class="whs2"># display solids</p>\r
 \r
 <p class="whs1">gg.createAndDisplayGO(id_solid1)</p>\r
 \r
-<p class="whs1">gg.setDisplayMode(id_solid1,1)</p>\r
+<p class="whs1">gg.setDisplayMode(id_solid1, \r
+ 1)</p>\r
 \r
 <p class="whs1">gg.createAndDisplayGO(id_solid2)</p>\r
 \r
-<p><span style="font-family: 'Lucida Console', monospace;">gg.setDisplayMode(id_solid2,1)</span> \r
- </p>\r
-\r
-<p>&nbsp;</p>\r
+<p><span style="font-family: 'Lucida Console', monospace;">gg.setDisplayMode(id_solid2, \r
+ 1)</span> </p>\r
 \r
 <script type="text/javascript" language="javascript1.2">\r
 <!--\r
index 5822ead2a6a1e793dd6da8b48882b781a38df427..7e26114b9b385762b66e55774337f0bf70381d38 100755 (executable)
@@ -491,88 +491,73 @@ if (window.writeIntopicBar)
 \r
 <h3><a name=bookmark4>Creation of a Compound</a></h3>\r
 \r
-<p class="whs1">import geompy</p>\r
+<p class="whs1"><span style="font-family: 'Lucida Console', monospace;">import \r
+ geompy</span></p>\r
 \r
 <p class="whs1">import salome</p>\r
 \r
-<p class="whs1">gg = salome.ImportComponentGUI(&quot;GEOM&quot;)</p>\r
-\r
 <p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs2">#create vertices</p>\r
-\r
-<p class="whs1">p0 = geompy.MakeVertex( \r
- 0., &nbsp;0., \r
- &nbsp;0.)</p>\r
-\r
-<p class="whs1">pz = geompy.MakeVertex( \r
- 0., &nbsp;0., \r
- 40.)</p>\r
+<p class="whs1">gg = salome.ImportComponentGUI(&quot;GEOM&quot;)</p>\r
 \r
 <p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs2"># create sketchers</p>\r
+<p class="whs2"># create a vertex and \r
+ a vector</p>\r
 \r
-<p class="whs1">sketcher = geompy.MakeSketcher(&quot;Sketcher:F \r
- -50 -50:TT 100 -50:R 0:C 50 70:R 0:L 100:WW&quot;)</p>\r
+<p class="whs1">p1 = geompy.MakeVertex( \r
+ &nbsp;-30., &nbsp;-30., \r
+ &nbsp;50.)</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs1">p2 = geompy.MakeVertex( \r
+ &nbsp;-60., &nbsp;-60., \r
+ &nbsp;30.)</p>\r
 \r
-<p class="whs2"># create faces from two \r
- wires</p>\r
-\r
-<p class="whs1">face = geompy.MakeFace(sketcher,1)</p>\r
+<p class="whs1">p3 = geompy.MakeVertex( \r
+ &nbsp;-30., &nbsp;-30., \r
+ &nbsp;10.)</p>\r
 \r
 <p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs2"># create a prism</p>\r
-\r
-<p class="whs1">prism = geompy.MakePrism(face, \r
- p0, pz)</p>\r
-\r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs2"># create an arc from \r
+ three points</p>\r
 \r
-<p class="whs2"># explode the prism into \r
faces</p>\r
+<p class="whs1">arc = geompy.MakeArc(p1, \r
p2, p3)</p>\r
 \r
-<p class="whs1">prism_faces = geompy.SubShapeAllSorted(prism, \r
geompy.ShapeType[&quot;FACE&quot;])</p>\r
+<p class="whs1">ShapeListCompound \r
= []</p>\r
 \r
-<p class="whs1">&nbsp;</p>\r
+<p class="whs1">i = 0</p>\r
 \r
-<p class="whs2"># create a shell from \r
- a set of faces</p>\r
+<p class="whs1">while i &lt;= 3 :</p>\r
 \r
-<p class="whs1">shell = geompy.MakeShell([prism_faces[0], \r
prism_faces[1],</p>\r
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;S \r
= geompy.MakeTranslation(arc, i * 50., 0., 0.)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prism_faces[3], \r
- prism_faces[4],</p>\r
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;ShapeListCompound.append(S)</p>\r
 \r
-<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prism_faces[5], \r
prism_faces[2]])</p>\r
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;i \r
= i + 1</p>\r
 \r
 <p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs2"># create a solid, bounded \r
by the given shells</p>\r
+<p class="whs2"># create a compund of \r
the given shapes</p>\r
 \r
-<p class="whs1">solid = geompy.MakeSolid([shell])</p>\r
+<p class="whs1">compound = geompy.MakeCompound(ShapeListCompound)</p>\r
 \r
 <p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs2"># add objects in the \r
- study</p>\r
+<p class="whs2"># add object in the study</p>\r
 \r
-<p class="whs1">id_solid = geompy.addToStudy(solid,&quot;Solid&quot;)</p>\r
+<p class="whs1">id_compound = geompy.addToStudy(compound,&quot;Compound&quot;)</p>\r
 \r
 <p class="whs1">&nbsp;</p>\r
 \r
-<p class="whs2"># display the solid</p>\r
-\r
-<p class="whs1">gg.createAndDisplayGO(id_solid)</p>\r
+<p class="whs2"># display the compound</p>\r
 \r
-<p class="whs1">gg.setDisplayMode(id_solid,1\r
+<p class="whs1">gg.createAndDisplayGO(id_compound\r
  </p>\r
 \r
 <script type="text/javascript" language="javascript1.2">\r
index 9cd089dbd5541ee2dfe7940a6a814ad70214f7bb..c3dd6ab37a469aa7319526821bc48c883a506350 100755 (executable)
@@ -80,32 +80,52 @@ if (window.writeIntopicBar)
 \r
 <h3>Point Coordinates</h3>\r
 \r
+<p class="whs1">import math</p>\r
+\r
 <p class="whs1">import geompy</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># create a point</p>\r
+<p class="whs2"># create a point</p>\r
 \r
-<p class="whs1">point = geompy.MakeVertex(15, \r
- 23, 80)</p>\r
+<p class="whs1">point = geompy.MakeVertex(15.\r
+ 23., 80.)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># get the coordinates of the point and check its values</p>\r
+<p class="whs2"># get the coordinates \r
+ of the point and check its values</p>\r
 \r
 <p class="whs1">coords = geompy.PointCoordinates(point)</p>\r
 \r
-<p class="whs1">if coords[0] != 15 \r
- or coords[1] != 23 or coords[2] != 80 :</p>\r
+<p class="whs1">&nbsp;</p>\r
+\r
+<p class="whs2"># check the obtained \r
+ coordinate values </p>\r
+\r
+<p class="whs1">tolerance = 1.e-07</p>\r
+\r
+<p class="whs1">def IsEqual(val1, \r
+ val2): return (math.fabs(val1 - val2) &lt; tolerance)</p>\r
+\r
+<p class="whs1">&nbsp;</p>\r
+\r
+<p class="whs1">if IsEqual(coords[0], \r
+ 15.) and IsEqual(coords[1], 23.) and IsEqual(coords[2], 80.):</p>\r
 \r
 <p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;Coordinates of point must be (15, 23, 80), but returned (&quot;, \r
- coords[0], &quot;, &quot;, coords[1], &quot;, &quot;, coords[2], &quot;)&quot;</p>\r
+ &quot;All values are OK.&quot;</p>\r
 \r
 <p class="whs1">else :</p>\r
 \r
-<p><span style="font-family: 'Lucida Console', monospace;">&nbsp;&nbsp;&nbsp;&nbsp;print \r
- &quot;All values are OK.&quot;</span> </p>\r
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ &quot;Coordinates of point must be (15, 23, 80), but returned (&quot;,</p>\r
+\r
+<p class="whs1">&nbsp;&nbsp;&nbsp;&nbsp;print \r
+ coords[0], &quot;, &quot;, coords[1], &quot;, &quot;, coords[2], &quot;)&quot;</p>\r
+\r
+<p><span style="font-family: 'Lucida Console', monospace;">&nbsp;&nbsp;&nbsp;&nbsp;pass</span> \r
+ </p>\r
 \r
 <h3>Basic Properties</h3>\r
 \r
index 363a46db3955749a34d5aa0a35e4c73f4b408ca7..13f9f6577a07a3b46f9b6832544ce70bb838121b 100755 (executable)
@@ -143,50 +143,62 @@ if (window.writeIntopicBar)
 \r
 <p class="whs1">import salome</p>\r
 \r
+<p class="whs1">&nbsp;</p>\r
+\r
 <p class="whs1">gg = salome.ImportComponentGUI(&quot;GEOM&quot;)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
 <p># create a vertex and a vector</p>\r
 \r
-<p class="whs1">p1 = geompy.MakeVertex(35, \r
- 35, 0)</p>\r
+<p class="whs1">p1 = geompy.MakeVertex(25, \r
+ 35, 45)</p>\r
 \r
-<p class="whs1">p2 = geompy.MakeVertex(35\r
35, 70)</p>\r
+<p class="whs1">p2 = geompy.MakeVertex(70\r
70, 70)</p>\r
 \r
 <p class="whs1">v = geompy.MakeVector(p1, \r
  p2)</p>\r
 \r
 <p>&nbsp;</p>\r
 \r
-<p># create cones</p>\r
+<p># create cylinders</p>\r
 \r
-<p class="whs1">cone1 = geompy.MakeCone(p1, \r
- v, 17, 1, 20)</p>\r
+<p class="whs1">height = 40</p>\r
 \r
-<p class="whs1">cone2 = geompy.MakeConeR1R2H(30, \r
- 10, 30)</p>\r
+<p class="whs1">&nbsp;</p>\r
+\r
+<p class="whs1">radius1 = 15</p>\r
+\r
+<p class="whs1">cylinder1 = geompy.MakeCylinder(p1, \r
+ v, radius1, height)</p>\r
+\r
+<p class="whs1">&nbsp;</p>\r
+\r
+<p class="whs1">radius2 = 30</p>\r
+\r
+<p class="whs1">cylinder2 = geompy.MakeCylinderRH(radius2, \r
+ height)</p>\r
 \r
 <p class="whs1">&nbsp;</p>\r
 \r
 <p># add objects in the study</p>\r
 \r
-<p class="whs1">id_cone1 = geompy.addToStudy(cone1,&quot;Cone1&quot;)</p>\r
+<p class="whs1">id_cylinder1 = geompy.addToStudy(cylinder1,&quot;Cylinder1&quot;)</p>\r
 \r
-<p class="whs1">id_cone2 = geompy.addToStudy(cone2,&quot;Cone2&quot;)</p>\r
+<p class="whs1">id_cylinder2 = geompy.addToStudy(cylinder2,&quot;Cylinder2&quot;)</p>\r
 \r
 <p>&nbsp;</p>\r
 \r
-<p># display cones</p>\r
+<p># display the cylinders</p>\r
 \r
-<p class="whs1">gg.createAndDisplayGO(id_cone1)</p>\r
+<p class="whs1">gg.createAndDisplayGO(id_cylinder1)</p>\r
 \r
-<p class="whs1">gg.setDisplayMode(id_cone1,1)</p>\r
+<p class="whs1">gg.setDisplayMode(id_cylinder1,1)</p>\r
 \r
-<p class="whs1">gg.createAndDisplayGO(id_cone2)</p>\r
+<p class="whs1">gg.createAndDisplayGO(id_cylinder2)</p>\r
 \r
-<p><span style="font-family: 'Lucida Console', monospace;">gg.setDisplayMode(id_cone2,1)</span> \r
+<p><span style="font-family: 'Lucida Console', monospace;">gg.setDisplayMode(id_cylinder2,1)</span> \r
  </p>\r
 \r
 <p>&nbsp;</p>\r
index ec82228673ab38ed5eee265781015552c94eb4a7..4547213f2018f08919c58344a842f419f6802e1a 100755 (executable)
@@ -15,6 +15,7 @@ if (navigator.appName !="Netscape")
 <style type="text/css">\r
 <!--\r
 p.whs1 { font-family:'Lucida Console' , monospace; }\r
+p.whs2 { font-family:'Times New Roman' , serif; }\r
 -->\r
 </style><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
 <!--\r
@@ -347,7 +348,7 @@ if (window.writeIntopicBar)
 \r
 <p>&nbsp;</p>\r
 \r
-<p># create an object, symmetrical to the given one relatively the given \r
+<p># create an object, symmetrical to another object through the given \r
  plane</p>\r
 \r
 <p class="whs1">p1 = geompy.MakeVertex( \r
@@ -367,7 +368,7 @@ if (window.writeIntopicBar)
 \r
 <p>&nbsp;</p>\r
 \r
-<p># create an object, symmetrical to the given one relatively the given \r
+<p># create an object, symmetrical to another object through the given \r
  axis</p>\r
 \r
 <p class="whs1">p4 = geompy.MakeVertex( \r
@@ -384,7 +385,7 @@ if (window.writeIntopicBar)
 \r
 <p>&nbsp;</p>\r
 \r
-<p># create an object, symmetrical to the given one relatively the given \r
+<p># create an object, symmetrical to another object through the given \r
  point</p>\r
 \r
 <p class="whs1">mirror3 = geompy.MakeMirrorByPoint(box, \r
@@ -450,18 +451,22 @@ if (window.writeIntopicBar)
 \r
 <p class="whs1">import salome</p>\r
 \r
+<p class="whs1">&nbsp;</p>\r
+\r
 <p class="whs1">gg = salome.ImportComponentGUI(&quot;GEOM&quot;)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># create a box and a sphere</p>\r
+<p class="whs2"># create a box and a \r
+ sphere</p>\r
 \r
 <p class="whs1">box = geompy.MakeBoxDXDYDZ(200, \r
  200, 200)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># scale the given object by the factor</p>\r
+<p class="whs2"># scale the given object \r
+ by the factor</p>\r
 \r
 <p class="whs1">p0 = geompy.MakeVertex(100, \r
  100, 100)</p>\r
@@ -471,9 +476,10 @@ if (window.writeIntopicBar)
 <p class="whs1">scale = geompy.MakeScaleTransform(box, \r
  p0, factor)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># add objects in the study</p>\r
+<p class="whs2"># add objects in the \r
+ study</p>\r
 \r
 <p class="whs1">id_box = geompy.addToStudy(box, \r
  &quot;Box&quot;)</p>\r
@@ -481,14 +487,16 @@ if (window.writeIntopicBar)
 <p class="whs1">id_scale = geompy.addToStudy(scale, \r
  &quot;Scale&quot;)</p>\r
 \r
-<p>&nbsp;</p>\r
+<p class="whs1">&nbsp;</p>\r
 \r
-<p># display the results</p>\r
+<p class="whs2"># display the results</p>\r
 \r
 <p class="whs1">gg.createAndDisplayGO(id_box)</p>\r
 \r
 <p class="whs1">gg.setDisplayMode(id_box,1)</p>\r
 \r
+<p class="whs1">gg.setTransparency(id_box,0.5)</p>\r
+\r
 <p class="whs1">gg.createAndDisplayGO(id_scale)</p>\r
 \r
 <p><span style="font-family: 'Lucida Console', monospace;">gg.setDisplayMode(id_scale,1)</span> \r