mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-08 18:40:55 +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:
parent
c7283baaaf
commit
59e349919f
@ -12,6 +12,7 @@
|
|||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
#include <RWStepRepr_RWDescriptiveRepresentationItem.ixx>
|
#include <RWStepRepr_RWDescriptiveRepresentationItem.ixx>
|
||||||
|
#include <TCollection_HAsciiString.hxx>
|
||||||
|
|
||||||
|
|
||||||
RWStepRepr_RWDescriptiveRepresentationItem::RWStepRepr_RWDescriptiveRepresentationItem () {}
|
RWStepRepr_RWDescriptiveRepresentationItem::RWStepRepr_RWDescriptiveRepresentationItem () {}
|
||||||
@ -26,7 +27,17 @@ void RWStepRepr_RWDescriptiveRepresentationItem::ReadStep
|
|||||||
|
|
||||||
// --- Number of Parameter Control ---
|
// --- 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 ---
|
// --- inherited field : name ---
|
||||||
|
|
||||||
|
22
tests/bugs/step/bug26342
Executable file
22
tests/bugs/step/bug26342
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "OCC26342"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
# No materials are read from STEP
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
pload DCAF
|
||||||
|
|
||||||
|
ReadStep D [locate_data_file OCC23251-dm1-oc-214.stp] res
|
||||||
|
|
||||||
|
set dump_info [ XDumpDF D ]
|
||||||
|
|
||||||
|
set XCAFDoc_Material_ID "efd212f8-6dfd-11d4-b9c8-0060b0ee281b"
|
||||||
|
|
||||||
|
if { [regexp ${XCAFDoc_Material_ID} ${dump_info}] == 1 } {
|
||||||
|
puts "OK: materials are read from STEP"
|
||||||
|
} else {
|
||||||
|
puts "Error : No materials are read from STEP"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user