Tue, 02/17/2004 - 12:21
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());
Wed, 02/18/2004 - 11:02
Hi,
assuming the reading itself was successfull, have you tried it with the "GetShape" methods from XCAFDoc_ShapeTool?
Regards,
Patrik
Wed, 02/18/2004 - 11:11
Hi,
I got shapes using GetShapes().
Thank You very much.
Fri, 02/09/2007 - 21:04
How to get color of the shape from iges file with XDE?