X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FGEOM%2Fgeometrical_objects.htm;h=7e26114b9b385762b66e55774337f0bf70381d38;hb=c6a0df686bae87821d7acf929b4bb8f4ae3b1d78;hp=5822ead2a6a1e793dd6da8b48882b781a38df427;hpb=9499b99fe2dcb53e1ea364f97986f8f432b04600;p=modules%2Fgeom.git diff --git a/doc/salome/gui/GEOM/geometrical_objects.htm b/doc/salome/gui/GEOM/geometrical_objects.htm index 5822ead2a..7e26114b9 100755 --- a/doc/salome/gui/GEOM/geometrical_objects.htm +++ b/doc/salome/gui/GEOM/geometrical_objects.htm @@ -491,88 +491,73 @@ if (window.writeIntopicBar)
import geompy
+import + geompy
import salome
-gg = salome.ImportComponentGUI("GEOM")
--
#create vertices
- -p0 = geompy.MakeVertex( - 0., 0., - 0.)
- -pz = geompy.MakeVertex( - 0., 0., - 40.)
+gg = salome.ImportComponentGUI("GEOM")
-
# create sketchers
+# create a vertex and + a vector
-sketcher = geompy.MakeSketcher("Sketcher:F - -50 -50:TT 100 -50:R 0:C 50 70:R 0:L 100:WW")
+p1 = geompy.MakeVertex( + -30., -30., + 50.)
-+
p2 = geompy.MakeVertex( + -60., -60., + 30.)
-# create faces from two - wires
- -face = geompy.MakeFace(sketcher,1)
+p3 = geompy.MakeVertex( + -30., -30., + 10.)
-
# create a prism
- -prism = geompy.MakePrism(face, - p0, pz)
- -+
# create an arc from + three points
-# explode the prism into - faces
+arc = geompy.MakeArc(p1, + p2, p3)
-prism_faces = geompy.SubShapeAllSorted(prism, - geompy.ShapeType["FACE"])
+ShapeListCompound + = []
-+
i = 0
-# create a shell from - a set of faces
+while i <= 3 :
-shell = geompy.MakeShell([prism_faces[0], - prism_faces[1],
+S + = geompy.MakeTranslation(arc, i * 50., 0., 0.)
-prism_faces[3], - prism_faces[4],
+ShapeListCompound.append(S)
-prism_faces[5], - prism_faces[2]])
+i + = i + 1
-
# create a solid, bounded - by the given shells
+# create a compund of + the given shapes
-solid = geompy.MakeSolid([shell])
+compound = geompy.MakeCompound(ShapeListCompound)
-
# add objects in the - study
+# add object in the study
-id_solid = geompy.addToStudy(solid,"Solid")
+id_compound = geompy.addToStudy(compound,"Compound")
-
# display the solid
- -gg.createAndDisplayGO(id_solid)
+# display the compound
-gg.setDisplayMode(id_solid,1) +
gg.createAndDisplayGO(id_compound)