Salome HOME
Porting to OCCT 7.4.1 dev
[modules/geom.git] / src / EntityGUI / EntityGUI_3DSketcherDlg.cxx
old mode 100755 (executable)
new mode 100644 (file)
index fd7b868..74abede
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020  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
@@ -28,8 +28,6 @@
 #include "EntityGUI_3DSketcherDlg.h"
 #include "EntityGUI_Widgets.h"
 
-#include <Basics_OCCTVersion.hxx>
-
 #include <GEOMBase.h>
 #include <GeometryGUI.h>
 #include <Precision.hxx>
@@ -105,7 +103,7 @@ DEFINE_STANDARD_HANDLE(AIS_Text, AIS_InteractiveObject)
 class AIS_Text:public AIS_InteractiveObject
 {
 public:
-  OCCT_DEFINE_STANDARD_RTTIEXT(AIS_Text,AIS_InteractiveObject)
+  DEFINE_STANDARD_RTTIEXT(AIS_Text,AIS_InteractiveObject)
 
   AIS_Text(){};
 
@@ -147,7 +145,7 @@ protected:
   Graphic3d_VerticalTextAlignment     aVJustification;
 };
 
-OCCT_IMPLEMENT_STANDARD_RTTIEXT(AIS_Text, AIS_InteractiveObject)
+IMPLEMENT_STANDARD_RTTIEXT(AIS_Text, AIS_InteractiveObject)
 
 AIS_Text::AIS_Text( const TCollection_ExtendedString& text, const gp_Pnt& position,
                           Quantity_Color    color       = Quantity_NOC_YELLOW,
@@ -756,7 +754,7 @@ void EntityGUI_3DSketcherDlg::SelectionIntoArgument()
         aSelMgr->GetIndexes(aSelList.First(), aMap);
         if (aMap.Extent() == 1) {
           int anIndex = aMap(1);
-          GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+          GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
           aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
         }
       }
@@ -943,7 +941,7 @@ void EntityGUI_3DSketcherDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr EntityGUI_3DSketcherDlg::createOperation()
 {
-  return getGeomEngine()->GetICurvesOperations(getStudyId());
+  return getGeomEngine()->GetICurvesOperations();
 }
 
 //=================================================================================
@@ -997,10 +995,10 @@ bool EntityGUI_3DSketcherDlg::execute (ObjectList& objects)
 //   MESSAGE("aCommands.last() = "<< aCommands.last().toStdString());
   GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow(getOperation());
   //GEOM::GEOM_Object_var anObj = anOper->Make3DSketcher(aCoordsArray);
-  GEOM::GEOM_Object_var anObj = anOper->Make3DSketcherCommand(aCommands.join(":").toLatin1().constData());
+  GEOM::GEOM_Object_var anObj = anOper->Make3DSketcherCommand(aCommands.join(":").toUtf8().constData());
 
   if (!anObj->_is_nil()) {
-    if (!IsPreview()) anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+    if (!IsPreview()) anObj->SetParameters(aParameters.join(":").toUtf8().constData());
     objects.push_back(anObj._retn());
   }
 
@@ -1285,7 +1283,7 @@ gp_Dir EntityGUI_3DSketcherDlg::getPresentationPlane() const
       gp_Vec V = Vec1.Transformed(aTransform.Inverted());
       gp_Vec Vec3(V.X(),V.Y(),0.0);
       
-      // Express the coordinates in the refernce coordinate system (OXY)
+      // Express the coordinates in the reference coordinate system (OXY)
       Vec3.Transform(aTransform);   
       if(Abs(Vec1.CrossMagnitude(Vec3)) > Precision::Confusion())                                  
       { 
@@ -1482,10 +1480,10 @@ void EntityGUI_3DSketcherDlg::displayDimensions (bool store)
                  aLength * sin(anAngle1 * M_PI / 180. ),
                  0.0); 
     
-    // Express the coordinates in the refernce coordinate system (OXY)
-    gp_Trsf aTranform = toReferenceSystem(P0);
-    P1.Transform(aTranform);    
-    P2.Transform(aTranform);
+    // Express the coordinates in the reference coordinate system (OXY)
+    gp_Trsf aTransform = toReferenceSystem(P0);
+    P1.Transform(aTransform);    
+    P2.Transform(aTransform);
     P1.Translate(Origin, P0);
     P2.Translate(Origin, P0);
     
@@ -1656,7 +1654,7 @@ void EntityGUI_3DSketcherDlg::displayText ( std::string theText,
 //================================================================
 // Function : createAISLengthDimension()
 // Purpose  : Method for creation of a length dimension object
-//            Returns an Handle on the AIS_LengthDimension obect
+//            Returns an Handle on the AIS_LengthDimension object
 //================================================================
 Handle(AIS_LengthDimension) EntityGUI_3DSketcherDlg::createAISLengthDimension(double theLength, 
                                                                               gp_Pnt P1, 
@@ -1694,7 +1692,7 @@ Handle(AIS_LengthDimension) EntityGUI_3DSketcherDlg::createAISLengthDimension(do
 //================================================================
 // Function : createAISAngleDimension()
 // Purpose  : Method for creation of an angle dimension object
-//            Returns an Handle on the AIS_AngleDimension obect
+//            Returns an Handle on the AIS_AngleDimension object
 //================================================================
 Handle(AIS_AngleDimension) EntityGUI_3DSketcherDlg::createAISAngleDimension(double theAngle, 
                                                                             gp_Pnt P0,