diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts
index 797c629ff..6ab8140a0 100644
--- a/src/GEOMGUI/GEOM_msg_en.ts
+++ b/src/GEOMGUI/GEOM_msg_en.ts
@@ -4605,9 +4605,13 @@ Please, select face, shell or solid and try again
Objects And Results
-
+
Angle in degrees :
+
+
+ Angle in radians :
+
Point On Lines Intersection
diff --git a/src/GEOMGUI/GEOM_msg_fr.ts b/src/GEOMGUI/GEOM_msg_fr.ts
index 25f857109..fd3458859 100644
--- a/src/GEOMGUI/GEOM_msg_fr.ts
+++ b/src/GEOMGUI/GEOM_msg_fr.ts
@@ -4593,9 +4593,13 @@ Choisissez une face, une coque ou un solide et essayez de nouveau
Objets et résultats
-
+
Angle en degrés :
+
+
+ Angle in radians :
+
Point à l'Intersection de deux lignes
diff --git a/src/GEOMGUI/GEOM_msg_ja.ts b/src/GEOMGUI/GEOM_msg_ja.ts
index 7837cffaf..d445fab84 100644
--- a/src/GEOMGUI/GEOM_msg_ja.ts
+++ b/src/GEOMGUI/GEOM_msg_ja.ts
@@ -4588,9 +4588,13 @@
オブジェクトと結果
-
+
角度(degree):
+
+
+ Angle in radians :
+
線の交点
diff --git a/src/MeasureGUI/MeasureGUI_AngleDlg.cxx b/src/MeasureGUI/MeasureGUI_AngleDlg.cxx
index 8a7407a29..ccce76eb6 100644
--- a/src/MeasureGUI/MeasureGUI_AngleDlg.cxx
+++ b/src/MeasureGUI/MeasureGUI_AngleDlg.cxx
@@ -57,6 +57,9 @@
#include
#include
#include
+#include
+#include
+#include
// QT Includes
#include
@@ -97,7 +100,7 @@ MeasureGUI_AngleDlg::MeasureGUI_AngleDlg (GeometryGUI* GUI, QWidget* parent)
myGrp->GroupBox1->setTitle(tr("GEOM_MEASURE_ANGLE_OBJ"));
myGrp->TextLabel1->setText(tr("GEOM_OBJECT_I").arg("1"));
myGrp->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("2"));
- myGrp->TextLabel3->setText(tr("GEOM_MEASURE_ANGLE_IS"));
+ myGrp->TextLabel3->setText(tr(aResMgr->stringValue ( "Geometry", "dimensions_angle_units", "deg" ) == "deg" ? "GEOM_MEASURE_ANGLE_DEG" : "GEOM_MEASURE_ANGLE_RAD"));
myGrp->LineEdit3->setReadOnly(true);
myGrp->PushButton1->setIcon(image1);
myGrp->PushButton2->setIcon(image1);
@@ -197,9 +200,8 @@ void MeasureGUI_AngleDlg::processObject()
double anAngle = 0.;
if (getParameters(anAngle)) {
- SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- int aPrecision = resMgr->integerValue( "Geometry", "angle_precision", 6 );
- myGrp->LineEdit3->setText(DlgRef::PrintDoubleValue(anAngle, aPrecision));
+ // To avoid the using different angle values in viewer and dialog,
+ // the value from presentation is used in both cases (see buildPrs())
redisplayPreview();
}
else {
@@ -352,6 +354,7 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
int w = resMgr->integerValue( "Geometry", "measures_line_width", 1 );
+ QString aUnitsAngle = resMgr->stringValue ( "Geometry", "dimensions_angle_units", "deg" );
aDimensionStyle->LineAspect()->SetWidth( w );
aDimensionStyle->SetTextHorizontalPosition( Prs3d_DTHP_Center );
@@ -360,6 +363,9 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
aDimensionStyle->MakeArrows3d( Standard_True );
anIO->SetDimensionAspect( aDimensionStyle );
+ anIO->SetDisplayUnits( aUnitsAngle.toLatin1().data() );
+ if (aUnitsAngle == "rad")
+ anIO->SetDisplaySpecialSymbol(AIS_DSS_No);
SOCC_Prs* aPrs =
dynamic_cast(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
@@ -367,6 +373,18 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
if (aPrs)
aPrs->AddObject(anIO);
+ // set angle value into dialog
+ double anAngle = anIO->GetValue();
+ QString anAngleLabel = "GEOM_MEASURE_ANGLE_RAD";
+ if (aUnitsAngle == "deg") {
+ // using degrees instead of radians
+ anAngle *= 180. / M_PI;
+ anAngleLabel = "GEOM_MEASURE_ANGLE_DEG";
+ }
+ myGrp->TextLabel3->setText(tr(anAngleLabel.toLatin1().data()));
+ int aPrecision = resMgr->integerValue( "Geometry", "angle_precision", 6 );
+ myGrp->LineEdit3->setText(DlgRef::PrintDoubleValue(anAngle, aPrecision));
+
return aPrs;
}
}