X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROCurveCreator%2FCurveCreator_Curve.cxx;h=129520136437240ed6e21fce61cf9ae439a34aad;hb=8edd427af3997521bda72ca3c416cc1d490565d5;hp=cab312d69de6ff42e1f9ab33befe6897d88770ca;hpb=1c7e2cd6a209334f05f76aaf952881636ba0969c;p=modules%2Fhydro.git diff --git a/src/HYDROCurveCreator/CurveCreator_Curve.cxx b/src/HYDROCurveCreator/CurveCreator_Curve.cxx index cab312d6..12952013 100644 --- a/src/HYDROCurveCreator/CurveCreator_Curve.cxx +++ b/src/HYDROCurveCreator/CurveCreator_Curve.cxx @@ -182,58 +182,17 @@ int CurveCreator_Curve::toICoord(const int theIPnt) const return theIPnt * myDimension; } -//#define USE_COMPOUND std::vector CurveCreator_Curve::constructSection( int theISection ) const { std::vector aSectionRepresentation; - CurveCreator::SectionType aSectType = getSectionType( theISection ); - bool isShapeConstruct = false; -#ifdef USE_COMPOUND - isShapeConstruct = true; -#else - isShapeConstruct = aSectType == CurveCreator::Spline; -#endif + TopoDS_Shape aShape; + CurveCreator_Utils::constructShape( this, theISection, aShape, aSectionRepresentation ); - if ( isShapeConstruct ) { - TopoDS_Shape aShape; - CurveCreator_Utils::constructShape( this, theISection, aShape ); - AIS_Shape* anAISShape = new AIS_Shape( aShape ); - //aShape->SetSelectionMode( AIS_Shape::SelectionMode( (TopAbs_ShapeEnum)TopAbs_VERTEX ) ); - aSectionRepresentation.push_back( anAISShape ); - if ( aSectType != CurveCreator::Spline ) - return aSectionRepresentation; - } + AIS_Shape* anAISShape = new AIS_Shape( aShape ); + //aShape->SetSelectionMode( AIS_Shape::SelectionMode( (TopAbs_ShapeEnum)TopAbs_VERTEX ) ); + aSectionRepresentation.push_back( anAISShape ); - int aPointSize = getNbPoints( theISection ); - bool aSectIsClosed = isClosed( theISection ); - if( aSectType == CurveCreator::Polyline ) - { - int iPoint = 0; - for( ; iPoint < ( aPointSize - 1 ) ; iPoint++ ){ - Handle_AIS_Point anAISPnt = getAISPoint(theISection, iPoint); - aSectionRepresentation.push_back( anAISPnt ); - Handle_AIS_Line aLine = getAISLine( theISection, iPoint, iPoint+1 ); - aSectionRepresentation.push_back( aLine ); - } - if( aPointSize != 0 ){ - Handle_AIS_Point anAISPnt = getAISPoint(theISection, iPoint); - aSectionRepresentation.push_back( anAISPnt ); - if( isClosed(theISection) && ( aPointSize > 1 ) ){ - Handle_AIS_Line aLine = getAISLine( theISection, iPoint, 0 ); - aSectionRepresentation.push_back( aLine ); - } - } - } - else if( aSectType == CurveCreator::Spline ) - { - std::vector aPoints; - for( int iPoint = 0; iPoint < aPointSize; iPoint++ ) - { - Handle_AIS_Point anAISPnt = getAISPoint( theISection, iPoint ); - aSectionRepresentation.push_back( anAISPnt ); - } - } return aSectionRepresentation; } @@ -335,6 +294,7 @@ void CurveCreator_Curve::getCoordinates( int theISection, int theIPoint, double& } } +//#define USE_COMPOUND void CurveCreator_Curve::redisplayCurve() { if( myDisplayer ) {