1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0027185: Data Exchange - IGES - incorrect reading of DE for undefined entity

Fix reading of pointers to color entity.
This commit is contained in:
ika
2020-09-15 17:20:35 +03:00
committed by bugmaster
parent 4661dcadd4
commit b0b7668261
3 changed files with 6 additions and 8 deletions

View File

@@ -218,7 +218,7 @@ Standard_Boolean IGESData_UndefinedEntity::ReadDir
iapb = Standard_False;
if (v[3] < -max) iapb = Standard_True;
else if (v[3] < 0) {
anent = GetCasted(IGESData_IGESEntity,IR->BoundEntity((-1-v[3])/2));
anent = GetCasted(IGESData_IGESEntity,IR->BoundEntity((1-v[3])/2));
if (!anent->IsKind(STANDARD_TYPE(IGESData_LineFontEntity))) iapb = Standard_True;
}
// Sending of message : Line Font Pattern field is incorrect.
@@ -232,7 +232,7 @@ Standard_Boolean IGESData_UndefinedEntity::ReadDir
iapb = Standard_False;
if (v[4] < -max) iapb = Standard_True;
else if (v[4] < 0) {
anent = GetCasted(IGESData_IGESEntity,IR->BoundEntity((-1-v[4])/2));
anent = GetCasted(IGESData_IGESEntity,IR->BoundEntity((1-v[4])/2));
if (!anent->IsKind(STANDARD_TYPE(IGESData_LevelListEntity))) iapb = Standard_True;
}
@@ -276,7 +276,7 @@ Standard_Boolean IGESData_UndefinedEntity::ReadDir
iapb = Standard_False;
if (v[7] < 0 || v[7] > max) iapb = Standard_True;
else if (v[7] < 0) {
else if (v[7] > 0) {
anent = GetCasted(IGESData_IGESEntity,IR->BoundEntity((1+v[7])/2));
if (!anent->IsKind(STANDARD_TYPE(IGESData_LabelDisplayEntity))) iapb = Standard_True;
}
@@ -290,9 +290,9 @@ Standard_Boolean IGESData_UndefinedEntity::ReadDir
}
iapb = Standard_False;
if (v[14] < 0 || v[14] > max) iapb = Standard_True;
if (v[14] < -max || v[14] > max) iapb = Standard_True;
else if (v[14] < 0) {
anent = GetCasted(IGESData_IGESEntity,IR->BoundEntity((1+v[14])/2));
anent = GetCasted(IGESData_IGESEntity,IR->BoundEntity((1-v[14])/2));
if (!anent->IsKind(STANDARD_TYPE(IGESData_ColorEntity)))
{ thedstat += 512; v[14] = 0; }
}