Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Usage issues / Import STEP and Mapping TopoDS

Import STEP and Mapping TopoDS

Import STEP and Mapping TopoDS
HanJeongho 2012/08/30 21: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 <= nb; 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 2012/08/31 06: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));
}

-------------------------------------
HanJeongho 2012/08/31 07: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!
 
 
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map