MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026962Community[OCCT] OCCT:Data Exchangepublic2015-12-07 17:392015-12-07 17:39
Reporterjensgw 
Assigned Togka 
PrioritynormalSeveritymajor 
StatusnewResolutionopen 
PlatformWindowsOSVC++ 2013OS Version64 bit
Product Version[OCCT] 6.9.1 
Target VersionFixed in Version 
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== SAMPLE CODE BELOW ==
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 Fileszip file icon step.zip (5,433 bytes) 2015-12-07 17:39

- Relationships

-  Notes
There are no notes attached to this issue.

- 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


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker