From: nds Date: Tue, 3 Dec 2013 15:41:06 +0000 (+0000) Subject: OCC functionality moving out from the widget X-Git-Tag: BR_hydro_v_0_4~74 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=20a57e34c4cd0f5f74c4663b4b7cb04dcc881217;p=modules%2Fhydro.git OCC functionality moving out from the widget --- diff --git a/src/HYDROCurveCreator/CurveCreator_Utils.cxx b/src/HYDROCurveCreator/CurveCreator_Utils.cxx index 39084ac6..f4e49253 100644 --- a/src/HYDROCurveCreator/CurveCreator_Utils.cxx +++ b/src/HYDROCurveCreator/CurveCreator_Utils.cxx @@ -138,14 +138,9 @@ void CurveCreator_Utils::constructShape( const CurveCreator_ICurve* theCurve, } else if( aSectType == CurveCreator::Spline ) { -#ifdef USE_COMPOUND -#else std::vector 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( 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 CurveCreator_Utils::getSelectedPoints( Handle(AIS_InteractiveContext) theContext ) @@ -267,12 +261,12 @@ std::list 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 )