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

0026342: No materials are read from STEP

Changed number of  arguments for descriptive_representation_item (for the case when description is absent).

Test case for issue CR26342
This commit is contained in:
ink
2015-07-02 14:30:42 +03:00
committed by bugmaster
parent c7283baaaf
commit 59e349919f
2 changed files with 34 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
// commercial license or contractual agreement.
#include <RWStepRepr_RWDescriptiveRepresentationItem.ixx>
#include <TCollection_HAsciiString.hxx>
RWStepRepr_RWDescriptiveRepresentationItem::RWStepRepr_RWDescriptiveRepresentationItem () {}
@@ -26,7 +27,17 @@ void RWStepRepr_RWDescriptiveRepresentationItem::ReadStep
// --- Number of Parameter Control ---
if (!data->CheckNbParams(num,2,ach,"descriptive_representation_item")) return;
//if (!data->CheckNbParams(num,2,ach,"descriptive_representation_item")) return;
// for the case when description is absent
if (data->NbParams(num) != 2 && data->NbParams(num) != 1)
{
Handle(TCollection_HAsciiString) errmess = new TCollection_HAsciiString(
"Count of Parameters is not 1 or 2 for descriptive_representation_item");
Handle(TCollection_HAsciiString) errmesso = new TCollection_HAsciiString(
"Count of Parameters is not %d or %d for %s");
ach->AddFail (errmess->ToCString(),errmesso->ToCString());
return;
}
// --- inherited field : name ---