1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0015697: External Contribution on OCC DE Improvement

This commit is contained in:
APN
2012-01-20 12:19:05 +00:00
committed by bugmaster
parent 84dc990afd
commit 1332f04790
3 changed files with 15 additions and 3 deletions

View File

@@ -58,6 +58,11 @@ IGESCAFControl_Reader::IGESCAFControl_Reader (const Handle(XSControl_WorkSession
//function : Transfer
//purpose : basic working method
//=======================================================================
static void checkColorRange (Standard_Real& theCol)
{
if ( theCol < 0. ) theCol = 0.;
if ( theCol > 100. ) theCol = 100.;
}
Standard_Boolean IGESCAFControl_Reader::Transfer (Handle(TDocStd_Document) &doc)
{
@@ -126,6 +131,9 @@ Standard_Boolean IGESCAFControl_Reader::Transfer (Handle(TDocStd_Document) &doc)
else {
Standard_Real r, g, b;
color->RGBIntensity ( r, g, b );
checkColorRange ( r );
checkColorRange ( g );
checkColorRange ( b );
col.SetValues ( 0.01*r, 0.01*g, 0.01*b, Quantity_TOC_RGB );
}
}