View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0026962 | Community | OCCT:Data Exchange | public | 2015-12-07 17:39 | 2023-03-24 15:34 |
| Reporter | jensgw | Assigned To | |||
| Priority | normal | Severity | major | ||
| Status | new | Resolution | open | ||
| Platform | Windows | OS | VC++ 2013 | ||
| Product Version | 6.9.1 | ||||
| Summary | 0026962: Possible Bug in STEP-Import | ||||
| Description | Please 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");
}
}
| ||||
| Tags | No tags attached. | ||||
| Test case number | |||||