import salome
gg = salome.ImportComponentGUI("GEOM")
+#
+# create edge by two points
+#
+
# create vertices
p0 = geompy.MakeVertex(0. , 0. , 0. )
pxyz = geompy.MakeVertex(100., 100., 100.)
edge = geompy.MakeEdge(p0, pxyz)
# add object in the study
-id_edge = geompy.addToStudy(edge,"Edge")
+id_edge = geompy.addToStudy(edge,"Edge_1")
+
+# display an edge
+gg.createAndDisplayGO(id_edge)
+
+#
+# create edge from wire
+#
+
+# create a circle
+c = geompy.MakeCircle(None, None, 100)
+
+# create a wire
+w = geompy.MakeWire([c], 1e-07)
+
+# create an edge from wire
+edge = geompy.MakeEdgeWire(w)
+
+# add object in the study
+id_edge = geompy.addToStudy(edge,"Edge_2")
+
+# display an edge
+gg.createAndDisplayGO(id_edge)
+
+#
+# create edge from existing curve and a length
+#
+
+# create a circle
+c = geompy.MakeCircle(None, None, 100)
+
+# create an edge of length 25.0 from the circle
+edge = geompy.MakeEdgeOnCurveByLength(c, 25.0)
+
+# add object in the study
+id_edge = geompy.addToStudy(edge,"Edge_3")
# display an edge
gg.createAndDisplayGO(id_edge)
+
\endcode
\anchor tui_creation_wire
prism = geompy.MakePrism(face, p0, pxyz)
# explode the prism into faces
-prism_faces = geompy.SubShapeAllSorted(prism, geompy.ShapeType["FACE"])
+prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
# create a shell from a set of faces
shell = geompy.MakeShell([prism_faces[0], prism_faces[2], prism_faces[3],
prism = geompy.MakePrism(face, p0, pz)
# explode the prism into faces
-prism_faces = geompy.SubShapeAllSorted(prism, geompy.ShapeType["FACE"])
+prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
# create a shell from a set of faces
shell = geompy.MakeShell([prism_faces[0], prism_faces[1],