For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Import STEP and Mapping TopoDS

Jeongho Han's picture


I want to step data import into TopoDS data.

So, i read Data Exchange- STEP user manual, and i find StepToTopoDS_* class

But, i don't know that how can i using this class

In the manual, for using StepToTopoDS Class, i must call the Transfer_TransferProcess, STEPControl_ActorRead, and StepTopoDS_Builder(in the Graph of calls)

so i try like this,

IFSelect_ReturnStatus status = aReader.ReadFile(aFileName);

if (status != IFSelect_RetDone)
return status;
//Some code for transfer ex) Standard_Boolean ok = aReader.TransferRoot(i);
Handle(TColStd_HSequenceOfTransient) list = aReader.GiveList();
Handle(STEPControl_ActorRead) actor = new STEPControl_ActorRead();
for (i = 1; i Handle(Standard_Transient) start = list->Value(i);
Standard_Boolean OK = actor->Recognize(start);
//Call STEPControl_ActorRead Class
//Call StepToTopoDS_Builder
//Call StepToTopoDS_Translate* Class
I know, this is not good code...
So, how can using the StepToTopoDS_* Class?
Please, show me some example code or process for call this classes.

Thank you, Have a nice day!

PG's picture

Have a look at this sketchy code:
STEPControl_Reader aReader;
IFSelect_ReturnStatus status = aReader.ReadFile(aFileName);
if (status != IFSelect_RetDone)
return status;

aReader.WS()->MapReader()->SetTraceLevel(2); // increase default trace level

Standard_Boolean failsonly = Standard_False;
aReader.PrintCheckLoad(failsonly, IFSelect_ItemsByEntity);

// Root transfers
Standard_Integer nbr = aReader.NbRootsForTransfer();
aReader.PrintCheckTransfer (failsonly, IFSelect_ItemsByEntity);
for ( Standard_Integer n = 1; n Standard_Boolean ok = aReader.TransferRoot(n);

// Collecting resulting entities
Standard_Integer nbs = aReader.NbShapes();
if (nbs == 0) {
return IFSelect_RetVoid;
for (Standard_Integer i=1; i aHSequenceOfShape->Append(aReader.Shape(i));


Jeongho Han's picture

Thank you for your answer.

I'm already complete of import STEP, just into TopoDS_Shape


So, i want the method for Translating into Topology(package StepToTopoDS)

Thank you!