X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FGEOM%2Fprimitives.htm;h=13f9f6577a07a3b46f9b6832544ce70bb838121b;hb=c6a0df686bae87821d7acf929b4bb8f4ae3b1d78;hp=363a46db3955749a34d5aa0a35e4c73f4b408ca7;hpb=9499b99fe2dcb53e1ea364f97986f8f432b04600;p=modules%2Fgeom.git diff --git a/doc/salome/gui/GEOM/primitives.htm b/doc/salome/gui/GEOM/primitives.htm index 363a46db3..13f9f6577 100755 --- a/doc/salome/gui/GEOM/primitives.htm +++ b/doc/salome/gui/GEOM/primitives.htm @@ -143,50 +143,62 @@ if (window.writeIntopicBar)

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)