#include <CurveCreator_Curve.hxx>
#include <CurveCreator_Displayer.hxx>
+#include <CurveCreator_Utils.hxx>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
aCurveCoords.push_back( aSectPoint.Y() );
}
+ Quantity_Color aColor = CurveCreator_Utils::getRandColor();
+ QColor aQColor = CurveCreator_Utils::colorConv(aColor);
+ myEditedObject->GetSectionColor(i-1, aQColor);
+
myCurve->addSectionInternal( aSectName.toStdString(),
- aCurveType, aSectClosure, aCurveCoords );
+ aCurveType, aSectClosure, aCurveCoords, CurveCreator_Utils::colorConv(aQColor) );
}
}
else
for (int aSI = 0; aSI < aSCount; ++aSI)
{
myCurve->addSectionInternal((aNamePrefix + (aSI + 1)).ToCString(),
- CurveCreator::Spline, isCloseds[aSI], aPs[aSI]);
+ CurveCreator::Spline, isCloseds[aSI], aPs[aSI], CurveCreator_Utils::getRandColor());
}
}
}
aPolylineObj->AddSection( aSectName, aSectType, aSectClosure );
- // Add the points fro section
- CurveCreator::Coordinates aCurveCoords = myCurve->getPoints( i );
+ Quantity_Color aColor = myCurve->getColorSection(i);
+ aPolylineObj->SetSectionColor(i, CurveCreator_Utils::colorConv(aColor));
+
+ // Add the points from section
+ CurveCreator::Coordinates aCurveCoords = myCurve->getCoords( i );
if ( aCurveCoords.size() <= 2 )
{
}
}
- if ( !myIsEdit )
- {
- aPolylineObj->SetWireColor( HYDROData_PolylineXY::DefaultWireColor() );
- }
+ //if ( !myIsEdit )
+ //{
+ // aPolylineObj->SetWireColor( HYDROData_PolylineXY::DefaultWireColor() );
+ //}
// Update the wire of polyline
aPolylineObj->Update();