X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FGEOM%2Fprimitives.htm;h=13f9f6577a07a3b46f9b6832544ce70bb838121b;hb=c6a0df686bae87821d7acf929b4bb8f4ae3b1d78;hp=b13969a228da3fb9fce1b343f43995e3e7259a0c;hpb=e180c20f73ffa96c2d039106f2a2a868c8bc0df1;p=modules%2Fgeom.git diff --git a/doc/salome/gui/GEOM/primitives.htm b/doc/salome/gui/GEOM/primitives.htm index b13969a22..13f9f6577 100755 --- a/doc/salome/gui/GEOM/primitives.htm +++ b/doc/salome/gui/GEOM/primitives.htm @@ -33,43 +33,48 @@ onerror = null; - -
+ +import salome
++
gg = salome.ImportComponentGUI("GEOM")
-+
# create a vertex and a vector
-p1 = geompy.MakeVertex(35, - 35, 0)
+p1 = geompy.MakeVertex(25, + 35, 45)
-p2 = geompy.MakeVertex(35, - 35, 70)
+p2 = geompy.MakeVertex(70, + 70, 70)
v = geompy.MakeVector(p1, p2)
-
# create cones
+# create cylinders
-cone1 = geompy.MakeCone(p1, - v, 17, 1, 20)
+height = 40
-cone2 = geompy.MakeConeR1R2H(30, - 10, 30)
++ +
radius1 = 15
+ +cylinder1 = geompy.MakeCylinder(p1, + v, radius1, height)
+ ++ +
radius2 = 30
+ +cylinder2 = geompy.MakeCylinderRH(radius2, + height)
# add objects in the study
-id_cone1 = geompy.addToStudy(cone1,"Cone1")
+id_cylinder1 = geompy.addToStudy(cylinder1,"Cylinder1")
-id_cone2 = geompy.addToStudy(cone2,"Cone2")
+id_cylinder2 = geompy.addToStudy(cylinder2,"Cylinder2")
-
# display cones
+# display the cylinders
-gg.createAndDisplayGO(id_cone1)
+gg.createAndDisplayGO(id_cylinder1)
-gg.setDisplayMode(id_cone1,1)
+gg.setDisplayMode(id_cylinder1,1)
-gg.createAndDisplayGO(id_cone2)
+gg.createAndDisplayGO(id_cylinder2)
-gg.setDisplayMode(id_cone2,1) +
gg.setDisplayMode(id_cylinder2,1)