1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +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 );
}
}

View File

@ -104,8 +104,8 @@ char* nomfic; int lesect[6]; int modefnes;
/* Sending of message : No Terminal Section */
if (lesect[5] == 0) {
IGESFile_Check3 (0,"XSTEP_20");
return -1;
IGESFile_Check3 (1, "XSTEP_20");
//return -1;
}

View File

@ -48,7 +48,10 @@ StepToTopoDS_TranslateShell::StepToTopoDS_TranslateShell
void StepToTopoDS_TranslateShell::Init
(const Handle(StepShape_ConnectedFaceSet)& CFS, StepToTopoDS_Tool& aTool, StepToTopoDS_NMTool& NMTool)
{
//bug15697
if(CFS.IsNull())
return;
if (!aTool.IsBound(CFS)) {
BRep_Builder B;
@ -120,3 +123,4 @@ StepToTopoDS_TranslateShellError StepToTopoDS_TranslateShell::Error() const
{
return myError;
}