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=7008952e12096be9581bb4cbb263d728e1a56d9d;hpb=3e9d56c09b4bb1f34cf25c95613ef7e12890a8cd;p=modules%2Fgeom.git diff --git a/doc/salome/gui/GEOM/geometrical_objects.htm b/doc/salome/gui/GEOM/geometrical_objects.htm index 7008952e1..7e26114b9 100755 --- a/doc/salome/gui/GEOM/geometrical_objects.htm +++ b/doc/salome/gui/GEOM/geometrical_objects.htm @@ -34,43 +34,48 @@ onerror = null; - - + +

Advanced Geometrical Objects

Creation of an Edge

@@ -95,20 +100,20 @@ else

 

-

# create edge

+

# create an edge

edge = geompy.MakeEdge(p0, pxyz)

 

-

# add object in study

+

# add object in the study

id_edge = geompy.addToStudy(edge,"Edge")

 

-

# display edge

+

# display an edge

gg.createAndDisplayGO(id_edge)

@@ -142,36 +147,37 @@ else

 

-

# create vector on two - points

+

# create a vector from + two points

vxy = geompy.MakeVector(px, py)

 

-

# create arc with three - points

+

# create an arc from + three points

arc = geompy.MakeArc(py, pz, px)

 

-

# create wire

+

# create a wire

wire = geompy.MakeWire([vxy, arc])

 

-

# add object in study

+

# add an object in the + study

id_wire = geompy.addToStudy(wire,"Wire")

 

-

# display wire

+

# display the wire

gg.createAndDisplayGO(id_wire)

@@ -215,23 +221,23 @@ else

 

-

# create vector on two - points

+

# create a vector from + two points

vxy = geompy.MakeVector(px, py)

 

-

# create arc with three - points

+

# create an arc from + three points

arc = geompy.MakeArc(py, pz, px)

 

-

# create wire

+

# create a wire

wire = geompy.MakeWire([vxy, arc])

@@ -256,7 +262,8 @@ else

 

-

# create face from wire

+

# create a face from + the wire

face1 = geompy.MakeFace(wire, isPlanarFace)

@@ -274,7 +281,8 @@ else

 

-

# add objects in study

+

# add objects in the + study

id_face1 = geompy.addToStudy(face1,"Face1")

@@ -284,7 +292,7 @@ else

 

-

# display faces

+

# display the faces

gg.createAndDisplayGO(id_face1)

@@ -342,30 +350,31 @@ else

 

-

# create face from two - wires

+

# create a face from + two wires

face = geompy.MakeFaces([sketcher1, sketcher2],isPlanarFace)

 

-

# create prism

+

# create a prism

prism = geompy.MakePrism(face, p0, pxyz)

 

-

# explode prism on faces

+

# explode the prism into + faces

prism_faces = geompy.SubShapeAllSorted(prism, geompy.ShapeType["FACE"])

 

-

# create shell from the - set of faces

+

# create a shell from + a set of faces

shell = geompy.MakeShell([prism_faces[0], prism_faces[2], prism_faces[3],

@@ -375,13 +384,14 @@ else

 

-

# add objects in study

+

# add objects in the + study

id_shell = geompy.addToStudy(shell,"Shell")

 

-

# display shell

+

# display the shell

gg.createAndDisplayGO(id_shell)

@@ -427,22 +437,23 @@ else

 

-

# create prism

+

# create a prism

prism = geompy.MakePrism(face, p0, pz)

 

-

# explode prism on faces

+

# explode the prism into + faces

prism_faces = geompy.SubShapeAllSorted(prism, geompy.ShapeType["FACE"])

 

-

# create shell from the - set of faces

+

# create a shell from + a set of faces

shell = geompy.MakeShell([prism_faces[0], prism_faces[1],

@@ -455,20 +466,21 @@ else

 

-

# create solid, bounded +

# create a solid, bounded by the given shells

solid = geompy.MakeSolid([shell])

 

-

# add objects in study

+

# add objects in the + study

id_solid = geompy.addToStudy(solid,"Solid")

 

-

# display solid

+

# display the solid

gg.createAndDisplayGO(id_solid)

@@ -479,86 +491,73 @@ else

Creation of a Compound

-

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 prism

+

# create an arc from + three points

-

prism = geompy.MakePrism(face, - p0, pz)

+

arc = geompy.MakeArc(p1, + p2, p3)

-

 

+

ShapeListCompound + = []

-

# explode prism on faces

+

i = 0

-

prism_faces = geompy.SubShapeAllSorted(prism, - geompy.ShapeType["FACE"])

+

while i <= 3 :

-

 

+

    S + = geompy.MakeTranslation(arc, i * 50., 0., 0.)

-

# create shell from the - set of faces

+

    ShapeListCompound.append(S)

-

shell = geompy.MakeShell([prism_faces[0], - prism_faces[1],

- -

                          prism_faces[3], - prism_faces[4],

- -

                          prism_faces[5], - prism_faces[2]])

+

    i + = i + 1

 

-

# create solid, bounded - by the given shells

+

# create a compund of + the given shapes

-

solid = geompy.MakeSolid([shell])

+

compound = geompy.MakeCompound(ShapeListCompound)

 

-

# add objects in study

+

# add object in the study

-

id_solid = geompy.addToStudy(solid,"Solid")

+

id_compound = geompy.addToStudy(compound,"Compound")

 

-

# display solid

+

# display the compound

-

gg.createAndDisplayGO(id_solid)

- -

gg.setDisplayMode(id_solid,1) +

gg.createAndDisplayGO(id_compound)