<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
\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"> </p>\r
+\r
<p class="whs1">gg = salome.ImportComponentGUI("GEOM")</p>\r
\r
-<p> </p>\r
+<p class="whs1"> </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
<p class="whs1">p_25_50_25 = geompy.MakeVertex(25., \r
50., 25.)</p>\r
\r
+<p class="whs1"> </p>\r
+\r
<p class="whs1">box = geompy.MakeBoxDXDYDZ(50, \r
50, 50)</p>\r
\r
+<p class="whs1"> </p>\r
+\r
<p class="whs1">top_face = geompy.GetFaceNearPoint(box, \r
p_25_25_50)</p>\r
\r
<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"> </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> </p>\r
+<p class="whs1"> </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
<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> </p>\r
+<p class="whs1"> </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
"Box")</p>\r
<p class="whs1">id_box_tr2 = geompy.addToStudy(box_tr2, \r
"Multi-transformed Block 2D")</p>\r
\r
-<p> </p>\r
+<p class="whs1"> </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
\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> </p>\r
+<p class="whs1"> </p>\r
\r
<h3><a name=bookmark5>Explode on Blocks</a></h3>\r
\r
\r
<p class="whs1">import salome</p>\r
\r
+<p class="whs1"> </p>\r
+\r
<p class="whs1">gg = salome.ImportComponentGUI("GEOM")</p>\r
\r
-<p> </p>\r
+<p class="whs1"> </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 class="whs1"> </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> </p>\r
+<p class="whs2"> </p>\r
+\r
+<p class="whs2"># get all the blocks \r
+ of the given compound, by criteria: min_nb_faces <= nb. of faces <= \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> </p>\r
+<p class="whs1"> </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
"Compound")</p>\r
\r
<p class="whs1">id_make_block_explode \r
- = geompy.addToStudy(make_block_explode[0], "MakeBlockExplode")</p>\r
+ = geompy.addToStudyInFather(compound, make_block_explode[0], "MakeBlockExplode")</p>\r
\r
-<p> </p>\r
+<p class="whs1"> </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
\r
<p class="whs1">import salome</p>\r
\r
-<p> </p>\r
+<p class="whs1"> </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> </p>\r
-\r
-<p># check and improve</p>\r
-\r
-<p class="whs1">check_box = geompy.CheckAndImprove(box)</p>\r
-\r
-<p> </p>\r
+<p class="whs1"> </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> </p>\r
+<p class="whs1"> </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
"Box")</p>\r
\r
+<p class="whs1">ii = 1</p>\r
+\r
<p class="whs1">for chain in listChains:</p>\r
\r
<p class="whs1"> geompy.addToStudyInFather(check_box, \r
- chain, "propagation chain")</p>\r
+ chain, "propagation chain " + `ii`)</p>\r
\r
-<p><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span> \r
- </p>\r
+<p class="whs1"> ii \r
+ = ii + 1</p>\r
+\r
+<p class="whs1"> pass</p>\r
\r
<p> </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
<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
<p><span style="font-family: 'Lucida Console', monospace;">gg.setDisplayMode(id_qface3,1)</span> \r
</p>\r
\r
-<p> </p>\r
-\r
<h3>Hexagonal Solid</h3>\r
\r
<p class="whs1">import geompy</p>\r
\r
<p class="whs1">gg = salome.ImportComponentGUI("GEOM")</p>\r
\r
-<p> </p>\r
+<p class="whs1"> </p>\r
\r
-<p># create vertices</p>\r
+<p class="whs2"># create vertices</p>\r
\r
-<p class="whs1">p1 = geompy.MakeVertex( \r
- 0., 0., \r
+<p class="whs1">p0 = \r
+ geompy.MakeVertex( 0., \r
+ 0., \r
0.)</p>\r
\r
-<p class="whs1">p2 = geompy.MakeVertex(150., \r
- 30., 0.)</p>\r
+<p class="whs1">p1 = \r
+ geompy.MakeVertex( 0., \r
+ 0., \r
+ 40.)</p>\r
\r
-<p class="whs1">p3 = geompy.MakeVertex( \r
- 0., 120., \r
- 50.)</p>\r
+<p class="whs1">p2 = \r
+ geompy.MakeVertex( 70., -15., 0.)</p>\r
\r
-<p class="whs1">p4 = geompy.MakeVertex( \r
- 0., 40., \r
- 70.)</p>\r
+<p class="whs1">p3 = \r
+ geompy.MakeVertex( 70., -15., 70.)</p>\r
\r
-<p class="whs1">p5 = geompy.MakeVertex(100., \r
- 20., 45.)</p>\r
+<p class="whs1"> </p>\r
\r
-<p class="whs1">p6 = geompy.MakeVertex( \r
- 0., 70., \r
- 40.)</p>\r
+<p class="whs1">p4 = \r
+ geompy.MakeVertex( 0., \r
+ 70., 0.)</p>\r
\r
-<p class="whs1">p7 = geompy.MakeVertex( \r
- 70., 70., 70.)</p>\r
+<p class="whs1">p5 = \r
+ geompy.MakeVertex( 0., \r
+ 70., 40.)</p>\r
\r
-<p class="whs1">p8 = geompy.MakeVertex( \r
- 70.,-15., 70.)</p>\r
+<p class="whs1">p6 = \r
+ geompy.MakeVertex( 70., 70., \r
+ 0.)</p>\r
\r
-<p class="whs1">p9 = geompy.MakeVertex( \r
- 0., 0., \r
- 40.)</p>\r
+<p class="whs1">p7 = \r
+ geompy.MakeVertex( 70., 70., \r
+ 70.)</p>\r
+\r
+<p class="whs1"> </p>\r
+\r
+<p class="whs1">p8 = \r
+ geompy.MakeVertex( 0., \r
+ -50., 0.)</p>\r
+\r
+<p class="whs1">p9 = \r
+ geompy.MakeVertex( 0., \r
+ -50., 40.)</p>\r
\r
<p class="whs1">p10 = geompy.MakeVertex( \r
- 0., 70., \r
- 0.)</p>\r
+ 70., -35., 0.)</p>\r
\r
<p class="whs1">p11 = geompy.MakeVertex( \r
- 70., 70., 0.)</p>\r
+ 70., -35., 70.)</p>\r
\r
-<p class="whs1">p12 = geompy.MakeVertex( \r
- 70., -15., 0.)</p>\r
+<p class="whs1"> </p>\r
\r
-<p class="whs1">p13 = geompy.MakeVertex( \r
- 0., 0., \r
- 0.)</p>\r
+<p class="whs2"># create faces</p>\r
\r
-<p> </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"> </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"> </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> </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"> </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> </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"> </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> </p>\r
+<p class="whs1">geompy.addToStudy(qface1,"qface1")</p>\r
\r
-<p># add objects in the study</p>\r
+<p class="whs1">geompy.addToStudy(qface2,"qface2")</p>\r
+\r
+<p class="whs1">geompy.addToStudy(qface3,"qface3")</p>\r
+\r
+<p class="whs1">geompy.addToStudy(qface4,"qface4")</p>\r
+\r
+<p class="whs1">geompy.addToStudy(qface5,"qface5")</p>\r
+\r
+<p class="whs1">geompy.addToStudy(qface6,"qface6")</p>\r
+\r
+<p class="whs1">geompy.addToStudy(qface7,"qface7")</p>\r
+\r
+<p class="whs1"> </p>\r
\r
<p class="whs1">id_solid1 = geompy.addToStudy(solid1,"Solid1")</p>\r
\r
<p class="whs1">id_solid2 = geompy.addToStudy(solid2,"Solid2")</p>\r
\r
-<p> </p>\r
+<p class="whs1"> </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> </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
\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("GEOM")</p>\r
-\r
<p class="whs1"> </p>\r
\r
-<p class="whs2">#create vertices</p>\r
-\r
-<p class="whs1">p0 = geompy.MakeVertex( \r
- 0., 0., \r
- 0.)</p>\r
-\r
-<p class="whs1">pz = geompy.MakeVertex( \r
- 0., 0., \r
- 40.)</p>\r
+<p class="whs1">gg = salome.ImportComponentGUI("GEOM")</p>\r
\r
<p class="whs1"> </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("Sketcher:F \r
- -50 -50:TT 100 -50:R 0:C 50 70:R 0:L 100:WW")</p>\r
+<p class="whs1">p1 = geompy.MakeVertex( \r
+ -30., -30., \r
+ 50.)</p>\r
\r
-<p class="whs1"> </p>\r
+<p class="whs1">p2 = geompy.MakeVertex( \r
+ -60., -60., \r
+ 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
+ -30., -30., \r
+ 10.)</p>\r
\r
<p class="whs1"> </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"> </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["FACE"])</p>\r
+<p class="whs1">ShapeListCompound \r
+ = []</p>\r
\r
-<p class="whs1"> </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 <= 3 :</p>\r
\r
-<p class="whs1">shell = geompy.MakeShell([prism_faces[0], \r
- prism_faces[1],</p>\r
+<p class="whs1"> S \r
+ = geompy.MakeTranslation(arc, i * 50., 0., 0.)</p>\r
\r
-<p class="whs1"> prism_faces[3], \r
- prism_faces[4],</p>\r
+<p class="whs1"> ShapeListCompound.append(S)</p>\r
\r
-<p class="whs1"> prism_faces[5], \r
- prism_faces[2]])</p>\r
+<p class="whs1"> i \r
+ = i + 1</p>\r
\r
<p class="whs1"> </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"> </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,"Solid")</p>\r
+<p class="whs1">id_compound = geompy.addToStudy(compound,"Compound")</p>\r
\r
<p class="whs1"> </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
\r
<h3>Point Coordinates</h3>\r
\r
+<p class="whs1">import math</p>\r
+\r
<p class="whs1">import geompy</p>\r
\r
-<p> </p>\r
+<p class="whs1"> </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> </p>\r
+<p class="whs1"> </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"> </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) < tolerance)</p>\r
+\r
+<p class="whs1"> </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"> print \r
- "Coordinates of point must be (15, 23, 80), but returned (", \r
- coords[0], ", ", coords[1], ", ", coords[2], ")"</p>\r
+ "All values are OK."</p>\r
\r
<p class="whs1">else :</p>\r
\r
-<p><span style="font-family: 'Lucida Console', monospace;"> print \r
- "All values are OK."</span> </p>\r
+<p class="whs1"> print \r
+ "Coordinates of point must be (15, 23, 80), but returned (",</p>\r
+\r
+<p class="whs1"> print \r
+ coords[0], ", ", coords[1], ", ", coords[2], ")"</p>\r
+\r
+<p><span style="font-family: 'Lucida Console', monospace;"> pass</span> \r
+ </p>\r
\r
<h3>Basic Properties</h3>\r
\r
\r
<p class="whs1">import salome</p>\r
\r
+<p class="whs1"> </p>\r
+\r
<p class="whs1">gg = salome.ImportComponentGUI("GEOM")</p>\r
\r
-<p> </p>\r
+<p class="whs1"> </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> </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"> </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"> </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"> </p>\r
\r
<p># add objects in the study</p>\r
\r
-<p class="whs1">id_cone1 = geompy.addToStudy(cone1,"Cone1")</p>\r
+<p class="whs1">id_cylinder1 = geompy.addToStudy(cylinder1,"Cylinder1")</p>\r
\r
-<p class="whs1">id_cone2 = geompy.addToStudy(cone2,"Cone2")</p>\r
+<p class="whs1">id_cylinder2 = geompy.addToStudy(cylinder2,"Cylinder2")</p>\r
\r
<p> </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> </p>\r
<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
\r
<p> </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
\r
<p> </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
\r
<p> </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
\r
<p class="whs1">import salome</p>\r
\r
+<p class="whs1"> </p>\r
+\r
<p class="whs1">gg = salome.ImportComponentGUI("GEOM")</p>\r
\r
-<p> </p>\r
+<p class="whs1"> </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> </p>\r
+<p class="whs1"> </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
<p class="whs1">scale = geompy.MakeScaleTransform(box, \r
p0, factor)</p>\r
\r
-<p> </p>\r
+<p class="whs1"> </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
"Box")</p>\r
<p class="whs1">id_scale = geompy.addToStudy(scale, \r
"Scale")</p>\r
\r
-<p> </p>\r
+<p class="whs1"> </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