Hi,
assuming the reading itself was successfull, have you tried it with the "GetShape" methods from XCAFDoc_ShapeTool?
Regards,
Commenter-1
Archived discussion
I use the following code to read a iges file.
But I cannot retrieve any shapes from shapeTool.
Could anyone know how to use IGESCAFControl_Reader ?
Thank you in advance!
===================================================
Handle(TDocStd_Document) doc;
Handle(TDocStd_Application) A;
if (!DDocStd::Find(A)) {cout
A->NewDocument("MDTV-XCAF",doc);
TDataStd_Name::Set(doc->GetData()->Root(),"SGP");
IGESCAFControl_Reader igesReader;
igesReader.SetColorMode (Standard_True);
igesReader.SetNameMode (Standard_True);
igesReader.SetLayerMode (Standard_True);;
IFSelect_ReturnStatus readStat = igesReader.ReadFile("c:\\temp\\BoxTrim.igs");
if(!igesReader.Transfer(doc))
{
cout
}
Handle(XCAFDoc_ShapeTool) shapeTool = XCAFDoc_DocumentTool::ShapeTool(doc->Main());
Discussion
Posts are displayed in their archived order.
Hi,
assuming the reading itself was successfull, have you tried it with the "GetShape" methods from XCAFDoc_ShapeTool?
Regards,
Commenter-1
Hi,
I got shapes using GetShapes().
Thank You very much.
How to get color of the shape from iges file with XDE?