-// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// GEOM GEOMGUI : GUI for Geometry component
-// File : MeasureGUI_AngleDlg.cxx
-// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-//
+// File : MeasureGUI_AngleDlg.cxx
+// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
+
#include "MeasureGUI_AngleDlg.h"
#include "MeasureGUI_Widgets.h"
#include <GEOMBase.h>
#include <GeometryGUI.h>
+#include <Basics_OCCTVersion.hxx>
+
#include <SUIT_Session.h>
#include <SUIT_Desktop.h>
#include <SUIT_ResourceMgr.h>
#include <gce_MakePln.hxx>
#include <Precision.hxx>
#include <AIS.hxx>
+#include <AIS_Drawer.hxx>
+#include <Prs3d_AngleAspect.hxx>
+#include <Prs3d_LineAspect.hxx>
// QT Includes
#include <qlineedit.h>
if (anAngle > Precision::Angular()) {
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape S1, S2;
aLabel.sprintf("%.1f", anAngle);
Handle(AIS_AngleDimension) anIO = new AIS_AngleDimension
- (anEdge1, anEdge2, aPlane, anAngle * PI180,
- TCollection_ExtendedString((Standard_CString)aLabel.toLatin1().data()));
+ (anEdge1, anEdge2, aPlane, anAngle * M_PI / 180.,
+ TCollection_ExtendedString((Standard_CString)aLabel.toLatin1().data()));
Handle(Geom_Line) geom_lin1,geom_lin2;
gp_Pnt ptat11,ptat12,ptat21,ptat22;
Standard_Boolean isInfinite1,isInfinite2;
anIO->SetArrowSize(arrowSize);
}
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ int w = resMgr->integerValue("Geometry", "measures_line_width", 1);
+ Handle(Prs3d_AngleAspect) asp = new Prs3d_AngleAspect();
+ asp->LineAspect()->SetWidth(w);
+ anIO->Attributes()->SetAngleAspect(asp);
+
SOCC_Prs* aPrs =
dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));