]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
OCC functionality moving out from the widget
authornds <nds@opencascade.com>
Tue, 3 Dec 2013 15:41:06 +0000 (15:41 +0000)
committernds <nds@opencascade.com>
Tue, 3 Dec 2013 15:41:06 +0000 (15:41 +0000)
src/HYDROCurveCreator/CurveCreator_Utils.cxx

index 39084ac6a42c06e6fb376bb1601fc7184c73cffd..f4e49253ac69e7ff38c073248b656cbf1622a1b5 100644 (file)
@@ -138,14 +138,9 @@ void CurveCreator_Utils::constructShape( const CurveCreator_ICurve* theCurve,
   }
   else if( aSectType == CurveCreator::Spline )
   {
-#ifdef USE_COMPOUND
-#else
     std::vector<double> aPoints;
     for( int iPoint = 0; iPoint < aPointSize; iPoint++ )
     {
-      //Handle_AIS_Point anAISPnt = theCurve->getAISPoint( theISection, iPoint );
-      //aSectionRepresentation.push_back( anAISPnt );
-
       CurveCreator::Coordinates aCoords = theCurve->getPoint( theISection, iPoint );
       double aX = aCoords[0];
       double aY = aCoords[1];
@@ -181,16 +176,15 @@ void CurveCreator_Utils::constructShape( const CurveCreator_ICurve* theCurve,
       TopoDS_Wire aWire = BRepBuilderAPI_MakeWire( anEdge ).Wire();
       theShape = aWire;
     }
-#endif
   }
 
-#ifndef USE_COMPOUND
   const CurveCreator_Curve* aCurve = dynamic_cast<const CurveCreator_Curve*>( theCurve );
   if ( !aCurve )
     return;
 
   if( aSectType == CurveCreator::Polyline )
   {
+#ifndef USE_COMPOUND
     int iPoint = 0; 
     for( ; iPoint < ( aPointSize - 1 ) ; iPoint++ ){
       Handle_AIS_Point anAISPnt = aCurve->getAISPoint(theISection, iPoint);
@@ -206,6 +200,7 @@ void CurveCreator_Utils::constructShape( const CurveCreator_ICurve* theCurve,
         aSectionRepresentation.push_back( aLine );
       }
     }
+#endif
   }
   else if( aSectType == CurveCreator::Spline )
   {
@@ -216,7 +211,6 @@ void CurveCreator_Utils::constructShape( const CurveCreator_ICurve* theCurve,
       aSectionRepresentation.push_back( anAISPnt );
     }
   }
-#endif
 }
 
 std::list<float> CurveCreator_Utils::getSelectedPoints( Handle(AIS_InteractiveContext) theContext )
@@ -267,12 +261,12 @@ std::list<float> CurveCreator_Utils::getSelectedPoints( Handle(AIS_InteractiveCo
 // function : setLocalPointContext
 // purpose  : Open/close the viewer local context
 //=======================================================================
-//#define USE_COMPOUND
+//#define USE_GLOBAL_SELECTION
 void CurveCreator_Utils::setLocalPointContext(
                                               Handle(AIS_InteractiveContext) theContext,
                                               const bool theOpen )
 {
-#ifdef USE_COMPOUND
+#ifdef USE_GLOBAL_SELECTION
   return;
 #endif
   if ( !theContext )