-
- double anX;
-
- double anY;
-
- double aZ;
-
- int i = 0;
-
- for( ; i < ( aSectSize - 1 ) ; i++ ){
-
- Handle_AIS_Point anAISPnt = getAISPoint(i);
-
- myObjects.push_back( anAISPnt );
-
- Handle_AIS_Line aLine = getAISLine( i, i+1 );
-
- myObjects.push_back( aLine );
-
+ bool aSectIsClosed = myCurve->isClosed( mySection );
+
+ if( aSectType == CurveCreator::Polyline )
+ {
+ int i = 0;
+ for( ; i < ( aSectSize - 1 ) ; i++ ){
+ Handle_AIS_Point anAISPnt = getAISPoint(i);
+ myObjects.push_back( anAISPnt );
+ Handle_AIS_Line aLine = getAISLine( i, i+1 );
+ myObjects.push_back( aLine );
+ }
+ if( aSectSize != 0 ){
+ Handle_AIS_Point anAISPnt = getAISPoint(i);
+ myObjects.push_back( anAISPnt );
+ if( myCurve->isClosed(mySection) && ( aSectSize > 1 ) ){
+ Handle_AIS_Line aLine = getAISLine( i, 0 );
+ myObjects.push_back( aLine );
+ }
+ }