From af9f05e2cf3b94e80eb4161a611d6c9e4e47283a Mon Sep 17 00:00:00 2001 From: dmv Date: Fri, 12 Feb 2010 14:43:44 +0000 Subject: [PATCH] 0020628: EDF 1144 GEOM : In TUI, need a function to know the orientation of an edge or a wire --- .../gui/GEOM/input/tui_measurement_tools.doc | 29 +++++++ .../GEOM/input/using_measurement_tools.doc | 81 +++++++++++-------- idl/GEOM_Gen.idl | 9 +++ src/GEOMImpl/GEOMImpl_IMeasure.hxx | 7 +- src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx | 54 +++++++++++++ src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx | 3 + src/GEOMImpl/GEOMImpl_MeasureDriver.cxx | 68 ++++++++++++++++ src/GEOMImpl/GEOMImpl_Types.hxx | 1 + src/GEOM_I/GEOM_IMeasureOperations_i.cc | 25 ++++++ src/GEOM_I/GEOM_IMeasureOperations_i.hh | 3 + src/GEOM_SWIG/geompyDC.py | 35 ++++++++ 11 files changed, 280 insertions(+), 35 deletions(-) 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: