Read Step Fail because translate face no wire

i read step using XCAF.
=============================================
code:
STEPCAFControl_Reader sReader;
...
...
...
IFSelect_ReturnStatus status = sReader.ReadFile((CStringA)pathSTEP);
sReader.Transfer(m_DataDoc); <-------ERROR
...
...
...
=============================================

callstack:
Standard_Boolean Standard_Transient::IsKind (const Handle(Standard_Type)& aType) const
{
return DynamicType()->SubType ( aType );
}

> TKernel.dll!Standard_Transient::IsKind(const opencascade::handle<Standard_Type> & aType) Line 56 C++
TKSTEP.dll!StepToTopoDS_TranslateFace::Init(const opencascade::handle<StepShape_FaceSurface> & FS, StepToTopoDS_Tool & aTool, StepToTopoDS_NMTool & NMTool) Line 241 C++
TKSTEP.dll!StepToTopoDS_TranslateShell::Init(const opencascade::handle<StepShape_ConnectedFaceSet> & CFS, StepToTopoDS_Tool & aTool, StepToTopoDS_NMTool & NMTool, const Message_ProgressRange & theProgress) Line 85 C++
TKSTEP.dll!StepToTopoDS_Builder::Init(const opencascade::handle<StepShape_ManifoldSolidBrep> & aManifoldSolid, const opencascade::handle<Transfer_TransientProcess> & TP, const Message_ProgressRange & theProgress) Line 143 C++
TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepGeom_GeometricRepresentationItem> & start, const opencascade::handle<Transfer_TransientProcess> & TP, const bool isManifold, const Message_ProgressRange & theProgress) Line 1406 C++
TKSTEP.dll!STEPControl_ActorRead::TransferShape(const opencascade::handle<Standard_Transient> & start, const opencascade::handle<Transfer_TransientProcess> & TP, const bool isManifold, const bool theUseTrsf, const Message_ProgressRange & theProgress) Line 1680 C++
TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepShape_ShapeRepresentation> & sr, const opencascade::handle<Transfer_TransientProcess> & TP, bool & isBound, const bool theUseTrsf, const Message_ProgressRange & theProgress) Line 904 C++
TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepRepr_ShapeRepresentationRelationship> & und, const opencascade::handle<Transfer_TransientProcess> & TP, const int nbrep, const bool theUseTrsf, const Message_ProgressRange & theProgress) Line 1120 C++
TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepBasic_ProductDefinition> & PD, const opencascade::handle<Transfer_TransientProcess> & TP, const bool theUseTrsf, const Message_ProgressRange & theProgress) Line 653 C++
TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepRepr_NextAssemblyUsageOccurrence> & NAUO, const opencascade::handle<Transfer_TransientProcess> & TP, const Message_ProgressRange & theProgress) Line 761 C++
TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepBasic_ProductDefinition> & PD, const opencascade::handle<Transfer_TransientProcess> & TP, const bool theUseTrsf, const Message_ProgressRange & theProgress) Line 562 C++
TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepRepr_NextAssemblyUsageOccurrence> & NAUO, const opencascade::handle<Transfer_TransientProcess> & TP, const Message_ProgressRange & theProgress) Line 761 C++
TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepBasic_ProductDefinition> & PD, const opencascade::handle<Transfer_TransientProcess> & TP, const bool theUseTrsf, const Message_ProgressRange & theProgress) Line 562 C++
TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepRepr_NextAssemblyUsageOccurrence> & NAUO, const opencascade::handle<Transfer_TransientProcess> & TP, const Message_ProgressRange & theProgress) Line 761 C++
TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepBasic_ProductDefinition> & PD, const opencascade::handle<Transfer_TransientProcess> & TP, const bool theUseTrsf, const Message_ProgressRange & theProgress) Line 562 C++
TKSTEP.dll!STEPControl_ActorRead::TransferShape(const opencascade::handle<Standard_Transient> & start, const opencascade::handle<Transfer_TransientProcess> & TP, const bool isManifold, const bool theUseTrsf, const Message_ProgressRange & theProgress) Line 1641 C++
TKSTEP.dll!STEPControl_ActorRead::Transfer(const opencascade::handle<Standard_Transient> & start, const opencascade::handle<Transfer_TransientProcess> & TP, const Message_ProgressRange & theProgress) Line 308 C++
TKXSBase.dll!Transfer_ActorOfTransientProcess::Transferring(const opencascade::handle<Standard_Transient> & ent, const opencascade::handle<Transfer_ProcessForTransient> & TP, const Message_ProgressRange & theProgress) Line 42 C++
TKXSBase.dll!Transfer_ProcessForTransient::TransferProduct(const opencascade::handle<Standard_Transient> & start, const Message_ProgressRange & theProgress) Line 1167 C++
TKXSBase.dll!Transfer_ProcessForTransient::Transferring(const opencascade::handle<Standard_Transient> & start, const Message_ProgressRange & theProgress) Line 1069 C++
TKXSBase.dll!Transfer_ProcessForTransient::Transfer(const opencascade::handle<Standard_Transient> & start, const Message_ProgressRange & theProgress) Line 1200 C++
TKXSBase.dll!Transfer_TransferOutput::Transfer(const opencascade::handle<Standard_Transient> & obj, const Message_ProgressRange & theProgress) Line 79 C++
TKXSBase.dll!XSControl_TransferReader::TransferOne(const opencascade::handle<Standard_Transient> & ent, const bool rec, const Message_ProgressRange & theProgress) Line 820 C++
TKXSBase.dll!XSControl_Reader::TransferEntity(const opencascade::handle<Standard_Transient> & start, const Message_ProgressRange & theProgress) Line 262 C++
TKXSBase.dll!XSControl_Reader::TransferOneRoot(const int num, const Message_ProgressRange & theProgress) Line 235 C++
TKXDESTEP.dll!STEPCAFControl_Reader::Transfer(STEPControl_Reader & reader, const int nroot, opencascade::handle<TDocStd_Document> & doc, NCollection_Sequence<TDF_Label> & Lseq, const bool asOne, const Message_ProgressRange & theProgress) Line 588 C++
TKXDESTEP.dll!STEPCAFControl_Reader::Transfer(opencascade::handle<TDocStd_Document> & doc, const Message_ProgressRange & theProgress) Line 437 C++

in Standard_Transient::IsKind function, Message is "this is nullptr."

because, when translating face, can not make wire from face.

but, CAD Assistant can read this step file .

how solve this problem??

Kirill Gavrilov's picture

how solve this problem??

  • Register a bug on Bugtracker.
  • Provide sample file reproducing the problem.
  • Suggest a patch for OCCT, if possible.
J.W.Kim's picture

- I'm sorry. I can't provide sample that reproducing the problem.
- I have tested that Other OCC projects can read this file.
- FreeCAD: Fail (abnormal termination)
- MAYO: Fail (abnormal termination)
- SALOME: Success
- NIST - STEP File Analyzer and Viewer: Success
- I compared the step import code of SALOME and NIST with my code, but there is no difference.

Kirill Gavrilov's picture

If you are not able to share file sample, you may debug issue in OCCT source code and suggest bugfix adding missing NULL checks.

Francois Lauzon's picture

We have the exact same crash in our application.
I have create an issue in Mantis https://tracker.dev.opencascade.org/view.php?id=32980

J.W.Kim's picture

I read the issue you posted. The STEP where the problem occurred is also a file created by SolidWorks.