From: dmv Date: Fri, 12 Feb 2010 14:43:44 +0000 (+0000) Subject: 0020628: EDF 1144 GEOM : In TUI, need a function to know the orientation of an edge... X-Git-Tag: V5_1_4a1~61 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=af9f05e2cf3b94e80eb4161a611d6c9e4e47283a;p=modules%2Fgeom.git 0020628: EDF 1144 GEOM : In TUI, need a function to know the orientation of an edge or a wire --- diff --git a/doc/salome/gui/GEOM/input/tui_measurement_tools.doc b/doc/salome/gui/GEOM/input/tui_measurement_tools.doc index ff70d793a..7091e0d4b 100644 --- a/doc/salome/gui/GEOM/input/tui_measurement_tools.doc +++ b/doc/salome/gui/GEOM/input/tui_measurement_tools.doc @@ -71,6 +71,35 @@ else: print "But must be (50, 15, 50)" \endcode +

Get vertex by index

+ +\code +import geompy + +# Create auxiliary objects +Vertex_1 = geompy.MakeVertex(0, 0, 0) +Vertex_2 = geompy.MakeVertex(10, 20, 0) +Vertex_3 = geompy.MakeVertex(0, 40, 0) +Vertex_4 = geompy.MakeVertex(-10, 60, 0) +Vertex_5 = geompy.MakeVertex(0, 80, 0) +Curve_1 = geompy.MakeInterpol([Vertex_1, Vertex_2, Vertex_3]) +Curve_2 = geompy.MakeInterpol([Vertex_5, Vertex_4, Vertex_3]) +Wire_1 = geompy.MakeWire([Curve_1, Curve_2]) +Reversed_Wire = geompy.ChangeOrientationShellCopy(Wire_1) + +# Get The vertexes from Reversed Wire by different functions +vertex_0 = geompy.GetFirstVertex(Reversed_Wire) +vertex_1 = geompy.GetVertexByIndex(Reversed_Wire, 1) +vertex_2 = geompy.GetLastVertex(Reversed_Wire) + +# Publish objects in study +geompy.addToStudy( Wire_1, "Wire_1" ) +geompy.addToStudy( Reversed_Wire, "Reversed_Wire" ) +geompy.addToStudy( vertex_0, "vertex_0" ) +geompy.addToStudy( vertex_1, "vertex_1" ) +geompy.addToStudy( vertex_2, "vertex_2" ) +\endcode +

Inertia

\code diff --git a/doc/salome/gui/GEOM/input/using_measurement_tools.doc b/doc/salome/gui/GEOM/input/using_measurement_tools.doc index 068a94716..13765941c 100644 --- a/doc/salome/gui/GEOM/input/using_measurement_tools.doc +++ b/doc/salome/gui/GEOM/input/using_measurement_tools.doc @@ -8,7 +8,8 @@ concerning created or imported geometrical objects. They are: