Problem with topExp_explorer

i would like to convert a step file to cascade shape and to determinate all the face in the shape ,and all the wire in the face, and all the edges in the wire also all the vertices in the edges.
for this i readed my step file from STepcontrol_reader, and i like to explore all the face from a shape.(code):
int main(){
STEPControl_Reader reader;
reader.ReadFile("D:\\Documents and Settings\\ferid sablaoui\\Mes documents\\farid\\S214.STEP");

// lire le fichier.stp

Standard_Integer NbRoots = reader.NbRootsForTransfer();

// donner le nombre des solutions transférables

cout

Standard_Integer NbTrans = reader.TransferRoots();

// translation de tous les solutions transférable, et retourner le nombre//des solutions translaté

cout cout

// obtenir le résultat de translation de step file en Open CASCADE shape(forme)

TopoDS_Shape result = reader.OneShape();

//explorer la forme en des faces et dterminer le nombre des faces explorer

TopExp_Explorer EX;

for(EX.Init(result, TopAbs_FACE); EX.More();EX.Next())
{
TopoDS_Face acurrentFace=TopoDS_Face(EX.Current());

}

//tester l'orientation de face current

//TopAbs_Orientation orient = acurrentFace.Orientation();

for(EX.Init(acurrentFace, TopAbs_WIRE); EX.More();EX.Next())
{
TopoDS_Wire acurrentWire==TopoDS_Wire(EX.Current());

}
return (0);

}

but when i compile my code: error:can not convert from TopoDS_shape to TopoDs_Face

please help....................

Mikael Aronsson's picture

It would be nice if you would specify the line with the error.

I guess you have to cast the shape to a face using TopoDS::Face( shape)

stifan's picture

Think you Mikael

the now my code compile with any problem.

think you...........

Marco Matt's picture

To convert from shape to something more specialized you must use:
TopoDS::Face( aShape )
TopoDS::Wire( aShape )
TopoDS::Edge( aShape )
etc...

stifan's picture

think you marco for reply:

juste a simple question :how i can determinate the geometrique information from a face explorer from a shape.

think you..........