Thu, 08/30/2012 - 23:13
Hello,
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!
Fri, 08/31/2012 - 08:29
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<=nbr; 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<=nbs; i++) {
aHSequenceOfShape->Append(aReader.Shape(i));
}
-------------------------------------
Fri, 08/31/2012 - 09:08
Thank you for your answer.
I'm already complete of import STEP, just into TopoDS_Shape
But, i want "MAPPING STEP ENTITIES TO OPEN CASCADE SHAPES"(step.pdf)
So, i want the method for Translating into Topology(package StepToTopoDS)
Thank you!