From: jfa Date: Fri, 18 Jan 2013 11:52:16 +0000 (+0000) Subject: Mantis issue 0021394: EDF 1637 GEOM: Function 'MinDistance' with creation of vertices X-Git-Tag: V6_main_FINAL~59 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7d2fc6b422963767d49bab8c74d226342a856f27;p=modules%2Fgeom.git Mantis issue 0021394: EDF 1637 GEOM: Function 'MinDistance' with creation of vertices --- diff --git a/doc/salome/gui/GEOM/images/distance.png b/doc/salome/gui/GEOM/images/distance.png index 594bef905..31fa829fd 100755 Binary files a/doc/salome/gui/GEOM/images/distance.png and b/doc/salome/gui/GEOM/images/distance.png differ diff --git a/doc/salome/gui/GEOM/input/min_distance.doc b/doc/salome/gui/GEOM/input/min_distance.doc index 690a17f3a..d329126b4 100644 --- a/doc/salome/gui/GEOM/input/min_distance.doc +++ b/doc/salome/gui/GEOM/input/min_distance.doc @@ -5,7 +5,13 @@ Returns the minimum distance between two geometrical objects and the coordinates of the vector of distance and shows the vector in the viewer. -TUI Command: geompy.MinDistance(Shape1, Shape2), +\n On \b Apply or Apply and Close it creates a set of closest +points of the shapes. + +TUI Commands: +\naDist = geompy.MinDistance(Shape1, Shape2), +\n[aDist, DX, DY, DZ] = geompy.MinDistanceComponents(Shape1, Shape2), +\n[nbSols, (x11, y11, z11, x21, y21, z21, ...)] = geompy.ClosestPoints(Shape1, Shape2), where \em Shape1 and \em Shape2 are shapes between which the minimal distance is computed. @@ -13,4 +19,4 @@ See also a \ref tui_min_distance_page "TUI example". \image html distance.png -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/tui_min_distance.doc b/doc/salome/gui/GEOM/input/tui_min_distance.doc index e26e219f9..6afa6abd6 100644 --- a/doc/salome/gui/GEOM/input/tui_min_distance.doc +++ b/doc/salome/gui/GEOM/input/tui_min_distance.doc @@ -5,11 +5,51 @@ \code import geompy -# create boxes -box1 = geompy.MakeBoxDXDYDZ(100,30,100) -box2 = geompy.MakeBox(105,0,0,200,30,100) -min_dist = geompy.MinDistance(box1,box2) -print "\nMinimal distance between box1 and box2 = ", min_dist +# Create two curves with three closest points +Vertex_1 = geompy.MakeVertex(0, 0, 0) +Vertex_2 = geompy.MakeVertex(0, 70, 0) +Vertex_3 = geompy.MakeVertex(30, 100, 0) +Vertex_4 = geompy.MakeVertex(60, 70, 0) +Vertex_5 = geompy.MakeVertex(90, 100, 0) +Vertex_6 = geompy.MakeVertex(120, 70, 0) +Vertex_7 = geompy.MakeVertex(120, 0, 0) +Vertex_8 = geompy.MakeVertex(90, -30, 0) +Vertex_9 = geompy.MakeVertex(60, 0, 0) +Vertex_10 = geompy.MakeVertex(30, -30, 0) + +geompy.addToStudy( Vertex_1, 'Vertex_1' ) +geompy.addToStudy( Vertex_2, 'Vertex_2' ) +geompy.addToStudy( Vertex_3, 'Vertex_3' ) +geompy.addToStudy( Vertex_4, 'Vertex_4' ) +geompy.addToStudy( Vertex_5, 'Vertex_5' ) +geompy.addToStudy( Vertex_6, 'Vertex_6' ) +geompy.addToStudy( Vertex_7, 'Vertex_7' ) +geompy.addToStudy( Vertex_8, 'Vertex_8' ) +geompy.addToStudy( Vertex_9, 'Vertex_9' ) +geompy.addToStudy( Vertex_10, 'Vertex_10' ) + +Curve_a = geompy.MakeInterpol([Vertex_2, Vertex_3, Vertex_4, Vertex_5, Vertex_6], False, True) +Curve_b = geompy.MakeInterpol([Vertex_1, Vertex_7, Vertex_8, Vertex_9, Vertex_10], False, True) + +geompy.addToStudy( Curve_a, 'Curve_a' ) +geompy.addToStudy( Curve_b, 'Curve_b' ) + +# Get all closest points +[nbSols, listCoords] = geompy.ClosestPoints(Curve_a, Curve_b) + +for i in range(nbSols): + v1 = geompy.MakeVertex(listCoords[i*6 + 0], listCoords[i*6 + 1], listCoords[i*6 + 2]) + v2 = geompy.MakeVertex(listCoords[i*6 + 3], listCoords[i*6 + 4], listCoords[i*6 + 5]) + + geompy.addToStudy(v1, 'MinDist_%d_Curve_a'%(i+1)) + geompy.addToStudy(v2, 'MinDist_%d_Curve_b'%(i+1)) + +# Get minimum distance +print "Minimal distance between Curve_a and Curve_b is", geompy.MinDistance(Curve_a, Curve_b) + +# Get minimum distance with components along axes +[aDist, DX, DY, DZ] = geompy.MinDistanceComponents(Curve_a, Curve_b) +print "Minimal distance between Curve_a and Curve_b is (", DX, ",", DY, ",", DZ, ")" \endcode */ diff --git a/src/DlgRef/DlgRef.cxx b/src/DlgRef/DlgRef.cxx index 01be686b6..a7a551f60 100644 --- a/src/DlgRef/DlgRef.cxx +++ b/src/DlgRef/DlgRef.cxx @@ -217,34 +217,6 @@ DlgRef_1Sel3Spin1Check::~DlgRef_1Sel3Spin1Check() { } -////////////////////////////////////////// -// DlgRef_1Sel4Spin2Check -////////////////////////////////////////// - -DlgRef_1Sel4Spin2Check::DlgRef_1Sel4Spin2Check( QWidget* parent, Qt::WindowFlags f ) -: QWidget( parent, f ) -{ - setupUi( this ); -} - -DlgRef_1Sel4Spin2Check::~DlgRef_1Sel4Spin2Check() -{ -} - -////////////////////////////////////////// -// DlgRef_1Sel4Spin -////////////////////////////////////////// - -DlgRef_1Sel4Spin::DlgRef_1Sel4Spin( QWidget* parent, Qt::WindowFlags f ) -: QWidget( parent, f ) -{ - setupUi( this ); -} - -DlgRef_1Sel4Spin::~DlgRef_1Sel4Spin() -{ -} - ////////////////////////////////////////// // DlgRef_1Sel5Spin1Check ////////////////////////////////////////// @@ -259,20 +231,6 @@ DlgRef_1Sel5Spin1Check::~DlgRef_1Sel5Spin1Check() { } -////////////////////////////////////////// -// DlgRef_1Sel5Spin -////////////////////////////////////////// - -DlgRef_1Sel5Spin::DlgRef_1Sel5Spin( QWidget* parent, Qt::WindowFlags f ) -: QWidget( parent, f ) -{ - setupUi( this ); -} - -DlgRef_1Sel5Spin::~DlgRef_1Sel5Spin() -{ -} - ////////////////////////////////////////// // DlgRef_1Spin ////////////////////////////////////////// diff --git a/src/DlgRef/DlgRef.h b/src/DlgRef/DlgRef.h index bb707a511..b727e96ec 100644 --- a/src/DlgRef/DlgRef.h +++ b/src/DlgRef/DlgRef.h @@ -258,38 +258,6 @@ public: ~DlgRef_1Sel3Spin1Check(); }; -////////////////////////////////////////// -// DlgRef_1Sel4Spin2Check -////////////////////////////////////////// - -#include "ui_DlgRef_1Sel4Spin2Check_QTD.h" - -class DLGREF_EXPORT DlgRef_1Sel4Spin2Check : public QWidget, - public Ui::DlgRef_1Sel4Spin2Check_QTD -{ - Q_OBJECT - -public: - DlgRef_1Sel4Spin2Check( QWidget* = 0, Qt::WindowFlags = 0 ); - ~DlgRef_1Sel4Spin2Check(); -}; - -////////////////////////////////////////// -// DlgRef_1Sel4Spin -////////////////////////////////////////// - -#include "ui_DlgRef_1Sel4Spin_QTD.h" - -class DLGREF_EXPORT DlgRef_1Sel4Spin : public QWidget, - public Ui::DlgRef_1Sel4Spin_QTD -{ - Q_OBJECT - -public: - DlgRef_1Sel4Spin( QWidget* = 0, Qt::WindowFlags = 0 ); - ~DlgRef_1Sel4Spin(); -}; - ////////////////////////////////////////// // DlgRef_1Sel5Spin1Check ////////////////////////////////////////// @@ -306,22 +274,6 @@ public: ~DlgRef_1Sel5Spin1Check(); }; -////////////////////////////////////////// -// DlgRef_1Sel5Spin -////////////////////////////////////////// - -#include "ui_DlgRef_1Sel5Spin_QTD.h" - -class DLGREF_EXPORT DlgRef_1Sel5Spin : public QWidget, - public Ui::DlgRef_1Sel5Spin_QTD -{ - Q_OBJECT - -public: - DlgRef_1Sel5Spin( QWidget* = 0, Qt::WindowFlags = 0 ); - ~DlgRef_1Sel5Spin(); -}; - ////////////////////////////////////////// // DlgRef_1Spin ////////////////////////////////////////// diff --git a/src/DlgRef/DlgRef_1Sel4Spin2Check_QTD.ui b/src/DlgRef/DlgRef_1Sel4Spin2Check_QTD.ui deleted file mode 100644 index a6c6a6391..000000000 --- a/src/DlgRef/DlgRef_1Sel4Spin2Check_QTD.ui +++ /dev/null @@ -1,211 +0,0 @@ - - DlgRef_1Sel4Spin2Check_QTD - - - - 0 - 0 - 156 - 120 - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 6 - - - 6 - - - - - - - - - 9 - - - 9 - - - 9 - - - 9 - - - 6 - - - 6 - - - - - - 0 - 0 - - - - TL1 - - - false - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - - 0 - 0 - - - - TL2 - - - false - - - - - - - - - - - - 0 - 0 - - - - TL3 - - - false - - - - - - - - - - - - 0 - 0 - - - - TL4 - - - false - - - - - - - - - - - - 0 - 0 - - - - TL5 - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - qPixmapFromMimeSource - - - SalomeApp_DoubleSpinBox - QDoubleSpinBox -
SalomeApp_DoubleSpinBox.h
-
-
- - PushButton1 - LineEdit1 - SpinBox_DX - SpinBox_DY - SpinBox_DZ - SpinBox_SC - CheckBox1 - CheckBox2 - - - -
diff --git a/src/DlgRef/DlgRef_1Sel4Spin_QTD.ui b/src/DlgRef/DlgRef_1Sel4Spin_QTD.ui deleted file mode 100644 index 43cbcba2b..000000000 --- a/src/DlgRef/DlgRef_1Sel4Spin_QTD.ui +++ /dev/null @@ -1,214 +0,0 @@ - - DlgRef_1Sel4Spin_QTD - - - - 0 - 0 - 271 - 117 - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 6 - - - 6 - - - - - - - - - 9 - - - 9 - - - 9 - - - 9 - - - 6 - - - 6 - - - - - - 0 - 0 - - - - TL6 - - - false - - - - - - - - - - - - - - 6 - - - 9 - - - 9 - - - 9 - - - 9 - - - - - - 0 - 0 - - - - TL3 - - - false - - - - - - - - - - - 0 - 0 - - - - TL4 - - - false - - - - - - - - - - - 0 - 0 - - - - TL5 - - - false - - - - - - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - TL1 - - - false - - - - - - - - - - qPixmapFromMimeSource - - - SalomeApp_DoubleSpinBox - QDoubleSpinBox -
SalomeApp_DoubleSpinBox.h
-
-
- - PushButton1 - LineEdit1 - SpinBox_DX - SpinBox_DY - SpinBox_DZ - SpinBox_S - - - -
diff --git a/src/DlgRef/DlgRef_1Sel5Spin_QTD.ui b/src/DlgRef/DlgRef_1Sel5Spin_QTD.ui deleted file mode 100644 index 1b945b5a8..000000000 --- a/src/DlgRef/DlgRef_1Sel5Spin_QTD.ui +++ /dev/null @@ -1,232 +0,0 @@ - - DlgRef_1Sel5Spin_QTD - - - - 0 - 0 - 174 - 123 - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - 9 - - - 9 - - - 9 - - - 9 - - - 6 - - - 6 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 6 - - - 6 - - - - - - 0 - 0 - - - - TL4 - - - false - - - - - - - - 0 - 0 - - - - TL3 - - - false - - - - - - - - - - - 0 - 0 - - - - TL2 - - - false - - - - - - - - - - - 0 - 0 - - - - TL6 - - - false - - - - - - - - - - - - - - - - - 0 - 0 - - - - TL5 - - - false - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - TL1 - - - false - - - - - - - - - - - - - qPixmapFromMimeSource - - - SalomeApp_DoubleSpinBox - QDoubleSpinBox -
SalomeApp_DoubleSpinBox.h
-
-
- - PushButton1 - LineEdit1 - SpinBox1 - SpinBox2 - SpinBox4 - SpinBox5 - SpinBox3 - - - -
diff --git a/src/DlgRef/Makefile.am b/src/DlgRef/Makefile.am index 3e5d05b63..681636166 100644 --- a/src/DlgRef/Makefile.am +++ b/src/DlgRef/Makefile.am @@ -48,10 +48,7 @@ UIC_FILES = \ ui_DlgRef_1Sel3Spin_QTD.h \ ui_DlgRef_1Sel3Spin1Check_QTD.h \ ui_DlgRef_1Sel3Spin2Check1Spin_QTD.h \ - ui_DlgRef_1Sel4Spin2Check_QTD.h \ - ui_DlgRef_1Sel4Spin_QTD.h \ ui_DlgRef_1Sel5Spin1Check_QTD.h \ - ui_DlgRef_1Sel5Spin_QTD.h \ ui_DlgRef_1Sel_QTD.h \ ui_DlgRef_1SelExt_QTD.h \ ui_DlgRef_1Spin_QTD.h \ diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index c0ec2c792..8b0e0e82c 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -1082,6 +1082,10 @@ Please, select face, shell or solid and try again GEOM_MINDIST_TITLE Minimun Distance Between Two Objects + + GEOM_MINDIST_NAME + MinDist + GEOM_MIRROR Mirror @@ -1202,6 +1206,10 @@ Please, select face, shell or solid and try again GEOM_SOURCE_OBJECT Source vertex, edge or wire + + GEOM_SOLUTION + Solution : + GEOM_TARGET_OBJECT Target face diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index 6f4194500..b81e5c7ab 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -1542,6 +1542,36 @@ TCollection_AsciiString GEOMImpl_IMeasureOperations::WhatIs (Handle(GEOM_Object) return Astr; } +//============================================================================= +/*! + * AreCoordsInside + */ +//============================================================================= +std::vector GEOMImpl_IMeasureOperations::AreCoordsInside(Handle(GEOM_Object) theShape, + const std::vector& coords, + double tolerance) +{ + std::vector res; + if (!theShape.IsNull()) { + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (!aRefShape.IsNull()) { + TopoDS_Shape aShape = aRefShape->GetValue(); + if (!aShape.IsNull()) { + BRepClass3d_SolidClassifier SC(aShape); + unsigned int nb_points = coords.size()/3; + for (int i = 0; i < nb_points; i++) { + double x = coords[3*i]; + double y = coords[3*i+1]; + double z = coords[3*i+2]; + gp_Pnt aPnt(x, y, z); + SC.Perform(aPnt, tolerance); + res.push_back( ( SC.State() == TopAbs_IN ) || ( SC.State() == TopAbs_ON ) ); + } + } + } + } + return res; +} //======================================================================= //function : CheckSingularCase @@ -1845,38 +1875,6 @@ static bool CheckSingularCase(const TopoDS_Shape& aSh1, } */ - -//============================================================================= -/*! - * AreCoordsInside - */ -//============================================================================= -std::vector GEOMImpl_IMeasureOperations::AreCoordsInside(Handle(GEOM_Object) theShape, - const std::vector& coords, - double tolerance) -{ - std::vector res; - if (!theShape.IsNull()) { - Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); - if (!aRefShape.IsNull()) { - TopoDS_Shape aShape = aRefShape->GetValue(); - if (!aShape.IsNull()) { - BRepClass3d_SolidClassifier SC(aShape); - unsigned int nb_points = coords.size()/3; - for (int i = 0; i < nb_points; i++) { - double x = coords[3*i]; - double y = coords[3*i+1]; - double z = coords[3*i+2]; - gp_Pnt aPnt(x, y, z); - SC.Perform(aPnt, tolerance); - res.push_back( ( SC.State() == TopAbs_IN ) || ( SC.State() == TopAbs_ON ) ); - } - } - } - } - return res; -} - //============================================================================= /*! * GetMinDistance @@ -1941,7 +1939,7 @@ Standard_Real GEOMImpl_IMeasureOperations::GetMinDistance // additional workaround for bugs 19899, 19908 and 19910 from Mantis gp_Pnt Ptmp1, Ptmp2; double dist = CheckSingularCase(aShape1, aShape2, Ptmp1, Ptmp2); - if(dist>-1.0) { + if (dist > -1.0) { Ptmp1.Coord(X1, Y1, Z1); Ptmp2.Coord(X2, Y2, Z2); SetErrorCode(OK); @@ -1978,6 +1976,84 @@ Standard_Real GEOMImpl_IMeasureOperations::GetMinDistance return MinDist; } +//======================================================================= +/*! + * Get coordinates of closest points of two shapes + */ +//======================================================================= +Standard_Integer GEOMImpl_IMeasureOperations::ClosestPoints (Handle(GEOM_Object) theShape1, + Handle(GEOM_Object) theShape2, + Handle(TColStd_HSequenceOfReal)& theDoubles) +{ + SetErrorCode(KO); + Standard_Integer nbSolutions = 0; + + if (theShape1.IsNull() || theShape2.IsNull()) return nbSolutions; + + Handle(GEOM_Function) aRefShape1 = theShape1->GetLastFunction(); + Handle(GEOM_Function) aRefShape2 = theShape2->GetLastFunction(); + if (aRefShape1.IsNull() || aRefShape2.IsNull()) return nbSolutions; + + TopoDS_Shape aShape1 = aRefShape1->GetValue(); + TopoDS_Shape aShape2 = aRefShape2->GetValue(); + if (aShape1.IsNull() || aShape2.IsNull()) { + SetErrorCode("One of Objects has NULL Shape"); + return nbSolutions; + } + + // Compute the extremities + try { +#if OCC_VERSION_LARGE > 0x06010000 + OCC_CATCH_SIGNALS; +#endif + + // skl 30.06.2008 + // additional workaround for bugs 19899, 19908 and 19910 from Mantis + gp_Pnt P1, P2; + double dist = CheckSingularCase(aShape1, aShape2, P1, P2); + if (dist > -1.0) { + nbSolutions = 1; + + theDoubles->Append(P1.X()); + theDoubles->Append(P1.Y()); + theDoubles->Append(P1.Z()); + theDoubles->Append(P2.X()); + theDoubles->Append(P2.Y()); + theDoubles->Append(P2.Z()); + + SetErrorCode(OK); + return nbSolutions; + } + + BRepExtrema_DistShapeShape dst (aShape1, aShape2); + if (dst.IsDone()) { + nbSolutions = dst.NbSolution(); + if (theDoubles.IsNull()) theDoubles = new TColStd_HSequenceOfReal; + + gp_Pnt P1, P2; + for (int i = 1; i <= nbSolutions; i++) { + P1 = dst.PointOnShape1(i); + P2 = dst.PointOnShape2(i); + + theDoubles->Append(P1.X()); + theDoubles->Append(P1.Y()); + theDoubles->Append(P1.Z()); + theDoubles->Append(P2.X()); + theDoubles->Append(P2.Y()); + theDoubles->Append(P2.Z()); + } + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return nbSolutions; + } + + SetErrorCode(OK); + return nbSolutions; +} + //======================================================================= /*! * Get coordinates of point diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx index eff6fdaca..1a9071838 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx @@ -144,6 +144,10 @@ class GEOMImpl_IMeasureOperations : public GEOM_IOperations { Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2); + Standard_EXPORT Standard_Integer ClosestPoints (Handle(GEOM_Object) theShape1, + Handle(GEOM_Object) theShape2, + Handle(TColStd_HSequenceOfReal)& theDoubles); + Standard_EXPORT void PointCoordinates (Handle(GEOM_Object) theShape, Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ); diff --git a/src/GEOM_I/GEOM_IMeasureOperations_i.cc b/src/GEOM_I/GEOM_IMeasureOperations_i.cc index 257822004..b6132132c 100644 --- a/src/GEOM_I/GEOM_IMeasureOperations_i.cc +++ b/src/GEOM_I/GEOM_IMeasureOperations_i.cc @@ -531,7 +531,7 @@ CORBA::Long GEOM_IMeasureOperations_i::ClosestPoints GetOperations()->SetNotDone(); // allocate the CORBA array - int nbSols = -1; + int nbSols = 0; GEOM::ListOfDouble_var aDoublesArray = new GEOM::ListOfDouble(); //Get the reference shape @@ -541,23 +541,12 @@ CORBA::Long GEOM_IMeasureOperations_i::ClosestPoints if (!aShape1.IsNull() && !aShape2.IsNull()) { Handle(TColStd_HSequenceOfReal) aDoubles = new TColStd_HSequenceOfReal; // Get shape parameters - //nbSols = GetOperations()->ClosestPoints(aShape1, aShape2, aDoubles); - //int nbDbls = aDoubles->Length(); - //aDoublesArray->length(nbDbls); - //for (int id = 0; id < nbDbls; id++) { - // aDoublesArray[id] = aDoubles->Value(id + 1); - //} - // tmp - double X1, Y1, Z1, X2, Y2, Z2; - GetOperations()->GetMinDistance(aShape1, aShape2, X1, Y1, Z1, X2, Y2, Z2); - aDoublesArray->length(6); - aDoublesArray[0] = X1; - aDoublesArray[1] = Y1; - aDoublesArray[2] = Z1; - aDoublesArray[3] = X2; - aDoublesArray[4] = Y2; - aDoublesArray[5] = Z2; - nbSols = 1; + nbSols = GetOperations()->ClosestPoints(aShape1, aShape2, aDoubles); + int nbDbls = aDoubles->Length(); + aDoublesArray->length(nbDbls); + for (int id = 0; id < nbDbls; id++) { + aDoublesArray[id] = aDoubles->Value(id + 1); + } } theCoords = aDoublesArray._retn(); diff --git a/src/GEOM_SWIG/GEOM_TestMeasures.py b/src/GEOM_SWIG/GEOM_TestMeasures.py index ea9e31c86..cd9c07dd0 100644 --- a/src/GEOM_SWIG/GEOM_TestMeasures.py +++ b/src/GEOM_SWIG/GEOM_TestMeasures.py @@ -164,6 +164,16 @@ def TestMeasureOperations (geompy, math): print "\nMinimal distance between Box and Cube = ", MinDistComps[0] print "Its components are (", MinDistComps[1], ", ", MinDistComps[2], ", ", MinDistComps[3], ")" + # Get all closest points + [nbSols, listCoords] = geompy.ClosestPoints(box, cube) + for i in range(nbSols): + v1 = geompy.MakeVertex(listCoords[i*6 + 0], listCoords[i*6 + 1], listCoords[i*6 + 2]) + v2 = geompy.MakeVertex(listCoords[i*6 + 3], listCoords[i*6 + 4], listCoords[i*6 + 5]) + + geompy.addToStudy(v1, 'MinDist_%d_on_Box'%(i+1)) + geompy.addToStudy(v2, 'MinDist_%d_on_Cube'%(i+1)) + pass + ####### Angle ####### OX = geompy.MakeVectorDXDYDZ(10, 0,0) diff --git a/src/GEOM_SWIG/geompyDC.py b/src/GEOM_SWIG/geompyDC.py index 9d750572a..0dc6009ef 100644 --- a/src/GEOM_SWIG/geompyDC.py +++ b/src/GEOM_SWIG/geompyDC.py @@ -8878,6 +8878,28 @@ class geompyDC(GEOM._objref_GEOM_Gen): aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]] return aRes + ## Get closest points of the given shapes. + # @param theShape1,theShape2 Shapes to find closest points of. + # @return The number of found solutions (-1 in case of infinite number of + # solutions) and a list of (X, Y, Z) coordinates for all couples of points. + # + # @ref tui_measurement_tools_page "Example" + def ClosestPoints (self, theShape1, theShape2): + """ + Get closest points of the given shapes. + + Parameters: + theShape1,theShape2 Shapes to find closest points of. + + Returns: + The number of found solutions (-1 in case of infinite number of + solutions) and a list of (X, Y, Z) coordinates for all couples of points. + """ + # Example: see GEOM_TestMeasures.py + aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2) + RaiseIfFailed("ClosestPoints", self.MeasuOp) + return aTuple + ## Get angle between the given shapes in degrees. # @param theShape1,theShape2 Lines or linear edges to find angle between. # @note If both arguments are vectors, the angle is computed in accordance diff --git a/src/MeasureGUI/Makefile.am b/src/MeasureGUI/Makefile.am index 55cfcf7a5..c739ca76b 100644 --- a/src/MeasureGUI/Makefile.am +++ b/src/MeasureGUI/Makefile.am @@ -15,7 +15,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# # GEOM MEASUREGUI : # File : Makefile.am @@ -95,7 +94,6 @@ UIC_FILES = \ ui_MeasureGUI_1Sel3LineEdit_QTD.h \ ui_MeasureGUI_1Sel6LineEdit_QTD.h \ ui_MeasureGUI_2Sel1LineEdit_QTD.h \ - ui_MeasureGUI_2Sel4LineEdit_QTD.h \ ui_MeasureGUI_SkeletonBox_QTD.h BUILT_SOURCES = $(UIC_FILES) diff --git a/src/MeasureGUI/MeasureGUI_2Sel4LineEdit_QTD.ui b/src/MeasureGUI/MeasureGUI_2Sel4LineEdit_QTD.ui deleted file mode 100644 index d63fb5ab9..000000000 --- a/src/MeasureGUI/MeasureGUI_2Sel4LineEdit_QTD.ui +++ /dev/null @@ -1,189 +0,0 @@ - - MeasureGUI_2Sel4LineEdit_QTD - - - - 0 - 0 - 198 - 197 - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - 0 - 0 - - - - TL1 - - - false - - - - - - - - 0 - 0 - - - - - - - - - 100 - 0 - - - - - - - - - 0 - 0 - - - - TL2 - - - false - - - - - - - - 0 - 0 - - - - - - - - - 100 - 0 - - - - - - - - - 0 - 0 - - - - TL3 - - - false - - - - - - - - - - - 0 - 0 - - - - TL4 - - - false - - - - - - - - - - - 0 - 0 - - - - TL5 - - - false - - - - - - - - - - - 0 - 0 - - - - TL6 - - - false - - - - - - - - - - - - - - diff --git a/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx b/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx index d0d9fda91..8d670a9d0 100644 --- a/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx @@ -77,19 +77,28 @@ MeasureGUI_DistanceDlg::MeasureGUI_DistanceDlg (GeometryGUI* GUI, QWidget* paren mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose); mainFrame()->RadioButton3->close(); - myGrp = new MeasureGUI_2Sel4LineEdit (centralWidget()); + mainFrame()->GroupBoxName->hide(); + + myGrp = new MeasureGUI_DistanceGroup (centralWidget()); myGrp->GroupBox1->setTitle(tr("GEOM_MINDIST_OBJ")); + + // Arguments myGrp->TextLabel1->setText(tr("GEOM_OBJECT_I").arg("1")); myGrp->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("2")); + myGrp->PushButton1->setIcon(image1); + myGrp->PushButton2->setIcon(image1); + myGrp->LineEdit1->setReadOnly(true); + myGrp->LineEdit2->setReadOnly(true); + + // Solutions combobox + myGrp->TextLabel7->setText(tr("GEOM_SOLUTION")); + + // Distance, dx, dy and dz myGrp->TextLabel3->setText(tr("GEOM_LENGTH")); myGrp->TextLabel4->setText(tr("GEOM_DX")); myGrp->TextLabel5->setText(tr("GEOM_DY")); myGrp->TextLabel6->setText(tr("GEOM_DZ")); myGrp->LineEdit3->setReadOnly(true); - myGrp->PushButton1->setIcon(image1); - myGrp->PushButton2->setIcon(image1); - myGrp->LineEdit1->setReadOnly(true); - myGrp->LineEdit2->setReadOnly(true); myGrp->LineEdit4->setReadOnly(true); myGrp->LineEdit5->setReadOnly(true); myGrp->LineEdit6->setReadOnly(true); @@ -128,10 +137,11 @@ void MeasureGUI_DistanceDlg::Init() connect(myGrp->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(myGrp->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(myGrp->ComboBox1, SIGNAL(currentIndexChanged(int)), this, SLOT(SolutionSelected(int))); + connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName(tr("GEOM_DISTANCE")); globalSelection(); SelectionIntoArgument(); } @@ -184,6 +194,38 @@ void MeasureGUI_DistanceDlg::enterEvent(QEvent*) ActivateThisDialog(); } +//================================================================================= +// function : SolutionSelected() +// purpose : Called when ComboBox selection has changed +//================================================================================= +void MeasureGUI_DistanceDlg::SolutionSelected (int i) +{ + if (i < 0 || myDbls->length() <= i*6) { + myGrp->LineEdit3->setText(""); + myGrp->LineEdit4->setText(""); + myGrp->LineEdit5->setText(""); + myGrp->LineEdit6->setText(""); + erasePreview(); + return; + } + + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 ); + + gp_Pnt p1 (myDbls[i*6 + 0], myDbls[i*6 + 1], myDbls[i*6 + 2]); + gp_Pnt p2 (myDbls[i*6 + 3], myDbls[i*6 + 4], myDbls[i*6 + 5]); + + double aDist = p1.Distance(p2); + myGrp->LineEdit3->setText(DlgRef::PrintDoubleValue(aDist, aPrecision)); + + gp_XYZ aVec = p2.XYZ() - p1.XYZ(); + myGrp->LineEdit4->setText(DlgRef::PrintDoubleValue(aVec.X(), aPrecision)); + myGrp->LineEdit5->setText(DlgRef::PrintDoubleValue(aVec.Y(), aPrecision)); + myGrp->LineEdit6->setText(DlgRef::PrintDoubleValue(aVec.Z(), aPrecision)); + + redisplayPreview(); +} + //================================================================================= // function : SelectionIntoArgument() // purpose : Called when selection has changed @@ -260,56 +302,29 @@ void MeasureGUI_DistanceDlg::processObject() myGrp->LineEdit1->setText(!myObj1->_is_nil() ? GEOMBase::GetName(myObj1) : ""); myGrp->LineEdit2->setText(!myObj2->_is_nil() ? GEOMBase::GetName(myObj2) : ""); - gp_Pnt aPnt1, aPnt2; - double aDist = 0.; - if (getParameters(aDist, aPnt1, aPnt2)) { - SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); - int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 ); + myGrp->ComboBox1->clear(); + erasePreview(); - myGrp->LineEdit3->setText(DlgRef::PrintDoubleValue(aDist, aPrecision)); + int nbSols = 0; - gp_XYZ aVec = aPnt2.XYZ() - aPnt1.XYZ(); - myGrp->LineEdit4->setText(DlgRef::PrintDoubleValue(aVec.X(), aPrecision)); - myGrp->LineEdit5->setText(DlgRef::PrintDoubleValue(aVec.Y(), aPrecision)); - myGrp->LineEdit6->setText(DlgRef::PrintDoubleValue(aVec.Z(), aPrecision)); + QString msg; + if (!isValid(msg)) return; - redisplayPreview(); + GEOM::GEOM_IMeasureOperations_var anOper = GEOM::GEOM_IMeasureOperations::_narrow(getOperation()); + try { + nbSols = anOper->ClosestPoints(myObj1, myObj2, myDbls); } - else { - myGrp->LineEdit3->setText(""); - myGrp->LineEdit4->setText(""); - myGrp->LineEdit5->setText(""); - myGrp->LineEdit6->setText(""); - erasePreview(); + catch (const SALOME::SALOME_Exception& e) { + SalomeApp_Tools::QtCatchCorbaException(e); + return; } -} -//================================================================================= -// function : getParameters() -// purpose : Get distance between objects -//================================================================================= -bool MeasureGUI_DistanceDlg::getParameters (double& theDistance, gp_Pnt& thePnt1, gp_Pnt& thePnt2) -{ - QString msg; - if (isValid(msg)) { - GEOM::GEOM_IMeasureOperations_var anOper = GEOM::GEOM_IMeasureOperations::_narrow(getOperation()); - - try { - double x1, y1, z1, x2, y2, z2; - theDistance = anOper->GetMinDistance(myObj1, myObj2, x1, y1, z1, x2, y2, z2); - - thePnt1.SetCoord(x1, y1, z1); - thePnt2.SetCoord(x2, y2, z2); - } - catch (const SALOME::SALOME_Exception& e) { - SalomeApp_Tools::QtCatchCorbaException(e); - return false; + if (anOper->IsDone() && nbSols > 0) { + for (int i = 0; i < nbSols; i++) { + myGrp->ComboBox1->addItem(QString("Solution %1").arg(i + 1)); } - - return anOper->IsDone(); + myGrp->ComboBox1->setCurrentIndex(0); } - - return false; } //================================================================================= @@ -318,16 +333,19 @@ bool MeasureGUI_DistanceDlg::getParameters (double& theDistance, gp_Pnt& thePnt1 //================================================================================= SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs() { - double aDist = 0.; - gp_Pnt aPnt1 (0, 0, 0), aPnt2 (0, 0, 0); - SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow(); - if (myObj1->_is_nil() || myObj2->_is_nil() || - !getParameters(aDist, aPnt1, aPnt2) || + int currSol = myGrp->ComboBox1->currentIndex(); + + if (myObj1->_is_nil() || myObj2->_is_nil() || currSol == -1 || vw->getViewManager()->getType() != OCCViewer_Viewer::Type()) return 0; + gp_Pnt aPnt1 (myDbls[currSol*6 + 0], myDbls[currSol*6 + 1], myDbls[currSol*6 + 2]); + gp_Pnt aPnt2 (myDbls[currSol*6 + 3], myDbls[currSol*6 + 4], myDbls[currSol*6 + 5]); + + double aDist = aPnt1.Distance(aPnt2); + try { if (aDist <= 1.e-9) { @@ -408,15 +426,19 @@ bool MeasureGUI_DistanceDlg::execute (ObjectList& objects) GEOM::GEOM_IMeasureOperations_var anOper = GEOM::GEOM_IMeasureOperations::_narrow(getOperation()); GEOM::GEOM_IBasicOperations_var aBasicOper = getGeomEngine()->GetIBasicOperations(getStudyId()); - double x1, y1, z1, x2, y2, z2; - double aDist = anOper->GetMinDistance(myObj1, myObj2, x1, y1, z1, x2, y2, z2); + GEOM::ListOfDouble_var aDbls; + int nbSols = anOper->ClosestPoints(myObj1, myObj2, aDbls); - GEOM::GEOM_Object_var anObj1 = aBasicOper->MakePointXYZ(x1, y1, z1); - GEOM::GEOM_Object_var anObj2 = aBasicOper->MakePointXYZ(x2, y2, z2); + if (anOper->IsDone()) { + for (int i = 0; i < nbSols; i++) { + GEOM::GEOM_Object_var anObj1 = aBasicOper->MakePointXYZ(aDbls[i*6 + 0], aDbls[i*6 + 1], aDbls[i*6 + 2]); + GEOM::GEOM_Object_var anObj2 = aBasicOper->MakePointXYZ(aDbls[i*6 + 3], aDbls[i*6 + 4], aDbls[i*6 + 5]); - if (!anObj1->_is_nil() && !anObj2->_is_nil()) { - objects.push_back(anObj1._retn()); - objects.push_back(anObj2._retn()); + if (!anObj1->_is_nil() && !anObj2->_is_nil()) { + objects.push_back(anObj1._retn()); + objects.push_back(anObj2._retn()); + } + } } return true; @@ -449,3 +471,95 @@ void MeasureGUI_DistanceDlg::redisplayPreview() SalomeApp_Tools::QtCatchCorbaException(e); } } + +//================================================================ +// Function : getNewObjectName +// Purpose : Redefine this method to return proper name for a new object +//================================================================ +QString MeasureGUI_DistanceDlg::getNewObjectName (int currObj) const +{ + QString aName = tr("GEOM_MINDIST_NAME") + QString("_%1_").arg((currObj+1)/2); + aName += GEOMBase::GetName(currObj%2 ? myObj1 : myObj2); + + return aName; +} + +//================================================================================= +// function : MeasureGUI_DistanceGroup +// purpose : +//================================================================================= +MeasureGUI_DistanceGroup::MeasureGUI_DistanceGroup (QWidget *parent) +{ + gridLayout = new QGridLayout (parent); + gridLayout->setSpacing(6); + gridLayout->setContentsMargins(11, 11, 11, 11); + gridLayout->setHorizontalSpacing(0); + gridLayout->setVerticalSpacing(0); + gridLayout->setContentsMargins(0, 0, 0, 0); + + GroupBox1 = new QGroupBox (parent); + + gridLayout1 = new QGridLayout (GroupBox1); + gridLayout1->setSpacing(6); + gridLayout1->setContentsMargins(11, 11, 11, 11); + gridLayout1->setHorizontalSpacing(6); + gridLayout1->setVerticalSpacing(6); + gridLayout1->setContentsMargins(9, 9, 9, 9); + + // 2Sel + TextLabel1 = new QLabel(GroupBox1); + TextLabel2 = new QLabel(GroupBox1); + + PushButton1 = new QPushButton (GroupBox1); + PushButton2 = new QPushButton (GroupBox1); + + LineEdit1 = new QLineEdit(GroupBox1); + LineEdit2 = new QLineEdit(GroupBox1); + + gridLayout1->addWidget(TextLabel1, 0, 0, 1, 1); + gridLayout1->addWidget(TextLabel2, 1, 0, 1, 1); + gridLayout1->addWidget(PushButton1, 0, 1, 1, 1); + gridLayout1->addWidget(PushButton2, 1, 1, 1, 1); + gridLayout1->addWidget(LineEdit1, 0, 2, 1, 1); + gridLayout1->addWidget(LineEdit2, 1, 2, 1, 1); + + // 1Combo + TextLabel7 = new QLabel (GroupBox1); + + ComboBox1 = new QComboBox (GroupBox1); + + gridLayout1->addWidget(TextLabel7, 2, 0, 1, 1); + gridLayout1->addWidget(ComboBox1, 2, 1, 1, 2); + + // 4Text + TextLabel3 = new QLabel (GroupBox1); + TextLabel4 = new QLabel (GroupBox1); + TextLabel5 = new QLabel (GroupBox1); + TextLabel6 = new QLabel (GroupBox1); + + LineEdit3 = new QLineEdit(GroupBox1); + LineEdit4 = new QLineEdit(GroupBox1); + LineEdit5 = new QLineEdit(GroupBox1); + LineEdit6 = new QLineEdit(GroupBox1); + + gridLayout1->addWidget(TextLabel3, 3, 0, 1, 1); + gridLayout1->addWidget(TextLabel4, 4, 0, 1, 1); + gridLayout1->addWidget(TextLabel5, 5, 0, 1, 1); + gridLayout1->addWidget(TextLabel6, 6, 0, 1, 1); + + gridLayout1->addWidget(LineEdit3, 3, 1, 1, 2); + gridLayout1->addWidget(LineEdit4, 4, 1, 1, 2); + gridLayout1->addWidget(LineEdit5, 5, 1, 1, 2); + gridLayout1->addWidget(LineEdit6, 6, 1, 1, 2); + + gridLayout->addWidget(GroupBox1, 0, 0, 1, 1); +} + +//================================================================================= +// function : ~MeasureGUI_DistanceGroup() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +MeasureGUI_DistanceGroup::~MeasureGUI_DistanceGroup() +{ + // no need to delete child widgets, Qt does it all for us +} diff --git a/src/MeasureGUI/MeasureGUI_DistanceDlg.h b/src/MeasureGUI/MeasureGUI_DistanceDlg.h index 83a44272c..9f4c7992c 100644 --- a/src/MeasureGUI/MeasureGUI_DistanceDlg.h +++ b/src/MeasureGUI/MeasureGUI_DistanceDlg.h @@ -28,9 +28,59 @@ #include -class MeasureGUI_2Sel4LineEdit; +// IDL Headers +#include +#include CORBA_SERVER_HEADER(GEOM_Gen) + +#include +#include +#include +#include +#include +#include + class gp_Pnt; +//================================================================================= +// class : MeasureGUI_DistanceGroup +// purpose : +//================================================================================= +class MeasureGUI_DistanceGroup : public QWidget +{ + Q_OBJECT + + public: + MeasureGUI_DistanceGroup (QWidget *parent); + ~MeasureGUI_DistanceGroup(); + + public: + QGridLayout *gridLayout; + QGroupBox *GroupBox1; + QGridLayout *gridLayout1; + + // 2Sel + QLabel *TextLabel1; + QLabel *TextLabel2; + QPushButton *PushButton1; + QPushButton *PushButton2; + QLineEdit *LineEdit1; + QLineEdit *LineEdit2; + + // 1Combo + QLabel *TextLabel7; + QComboBox *ComboBox1; + + // 4Text + QLabel *TextLabel3; + QLabel *TextLabel4; + QLabel *TextLabel5; + QLabel *TextLabel6; + QLineEdit *LineEdit3; + QLineEdit *LineEdit4; + QLineEdit *LineEdit5; + QLineEdit *LineEdit6; +}; + //================================================================================= // class : MeasureGUI_DistanceDlg // purpose : @@ -48,6 +98,7 @@ protected: virtual GEOM::GEOM_IOperations_ptr createOperation(); virtual bool isValid (QString&); virtual bool execute (ObjectList&); + virtual QString getNewObjectName (int CurrObj = -1) const; void redisplayPreview(); virtual void processObject(); @@ -56,13 +107,13 @@ protected: private: void Init(); void enterEvent (QEvent*); - bool getParameters (double&, gp_Pnt&, gp_Pnt&); private: GEOM::GEOM_Object_var myObj1; GEOM::GEOM_Object_var myObj2; - MeasureGUI_2Sel4LineEdit* myGrp; + MeasureGUI_DistanceGroup* myGrp; + GEOM::ListOfDouble_var myDbls; private slots: void ClickOnOk(); @@ -70,6 +121,7 @@ private slots: void ActivateThisDialog(); void SelectionIntoArgument(); void SetEditCurrentArgument(); + void SolutionSelected (int i); }; #endif // MEASUREGUI_DISTANCEDLG_H diff --git a/src/MeasureGUI/MeasureGUI_Widgets.cxx b/src/MeasureGUI/MeasureGUI_Widgets.cxx index 5cb2936fd..d9b93cf1e 100644 --- a/src/MeasureGUI/MeasureGUI_Widgets.cxx +++ b/src/MeasureGUI/MeasureGUI_Widgets.cxx @@ -15,11 +15,10 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// // File : MeasureGUI_Widgets.cxx // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) -// + #include "MeasureGUI_Widgets.h" ////////////////////////////////////////// @@ -121,20 +120,6 @@ MeasureGUI_2Sel1LineEdit::~MeasureGUI_2Sel1LineEdit() { } -////////////////////////////////////////// -// MeasureGUI_2Sel4LineEdit -////////////////////////////////////////// - -MeasureGUI_2Sel4LineEdit::MeasureGUI_2Sel4LineEdit( QWidget* parent, Qt::WindowFlags f ) -: QWidget( parent, f ) -{ - setupUi( this ); -} - -MeasureGUI_2Sel4LineEdit::~MeasureGUI_2Sel4LineEdit() -{ -} - ////////////////////////////////////////// // MeasureGUI_SkeletonBox ////////////////////////////////////////// diff --git a/src/MeasureGUI/MeasureGUI_Widgets.h b/src/MeasureGUI/MeasureGUI_Widgets.h index 17067d067..651b65298 100644 --- a/src/MeasureGUI/MeasureGUI_Widgets.h +++ b/src/MeasureGUI/MeasureGUI_Widgets.h @@ -15,11 +15,10 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// // File : MeasureGUI_Widgets.h // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) -// + #ifndef MEASUREGUI_WIDGETS_H #define MEASUREGUI_WIDGETS_H @@ -135,22 +134,6 @@ public: ~MeasureGUI_2Sel1LineEdit(); }; -////////////////////////////////////////// -// MeasureGUI_2Sel4LineEdit -////////////////////////////////////////// - -#include "ui_MeasureGUI_2Sel4LineEdit_QTD.h" - -class MeasureGUI_2Sel4LineEdit : public QWidget, - public Ui::MeasureGUI_2Sel4LineEdit_QTD -{ - Q_OBJECT - -public: - MeasureGUI_2Sel4LineEdit( QWidget* = 0, Qt::WindowFlags = 0 ); - ~MeasureGUI_2Sel4LineEdit(); -}; - ////////////////////////////////////////// // MeasureGUI_SkeletonBox //////////////////////////////////////////