View Issue Details

IDProjectCategoryView StatusLast Update
0026962CommunityOCCT:Data Exchangepublic2023-03-24 15:34
Reporterjensgw Assigned Togka 
PrioritynormalSeveritymajor 
Status newResolutionopen 
PlatformWindowsOSVC++ 2013 
Product Version6.9.1 
Summary0026962: Possible Bug in STEP-Import
DescriptionPlease find attached STEP files and some code which illustrate a possible bug in the STEP Import:
- cylinder.stp has one Assembly which has one Part which has one Cylinder.
- quader.stp has one Assembly which has one Part which has one Box.

What should happen (code below): read a step file, get the shape of a specific entity in the tree - not for the root.
Steps To Reproduce
STEPControl_Reader reader;
reader.ReadFile("c:/tmp/cylinder.stp");
//reader.ReadFile("c:/tmp/quader.stp");
reader.TransferRoots();

Handle(StepData_StepModel) stepModel = reader.StepModel();
Interface_EntityIterator entities = stepModel->Entities();

for (entities.Start(); entities.More(); entities.Next()) {

    Handle(Standard_Transient) value = entities.Value();

    if (value->IsKind("StepShape_ManifoldSolidBrep")) {
        Handle(StepShape_ManifoldSolidBrep) downCast = Handle(StepShape_ManifoldSolidBrep)::DownCast(value);
        Handle(Transfer_TransientProcess) pr = reader.WS()->MapReader();
    
        //Crashes with cylinder.stp on writing
        //Works with quader.stp on writing
        StepToTopoDS_Builder builder(downCast, pr);
        TopoDS_Shape value2 = builder.Value();
        
        //Works - but gets shape of root not of specific entity
        //TopoDS_Shape value2 = reader.OneShape();

        STEPControl_Writer writer;
        writer.Transfer(value2, STEPControl_ManifoldSolidBrep);
        writer.Write("C:/tmp/output.stp");

    }
}
TagsNo tags attached.
Test case number

Attached Files

  • step.zip (5,433 bytes)

Activities

jensgw

2015-12-07 17:39

reporter  

step.zip (5,433 bytes)

Issue History

Date Modified Username Field Change
2015-12-07 17:39 jensgw New Issue
2015-12-07 17:39 jensgw Assigned To => gka
2015-12-07 17:39 jensgw File Added: step.zip
2023-03-24 15:34 dpasukhi Steps to Reproduce Updated