I am getting an Access violation exception when trying to read an iges file, here is a stripped down console app that reproduces the problem. The file is good and can be read by open source apps using OCC.
The file is quite large w.r.t the number of faces and the code below works fine on other smaller files.
I must be doing something very wrong. I can comment out Poly_Connect pc(facing) then the problem happens further down (not shown).
This is driving me mad!
Any help is appreciated
int _tmain(int argc, _TCHAR* argv)
Standard_CString aFileName = (Standard_CString) "C:\\Users\\Julian\\Desktop\\Crash.igs";
int status = Reader.ReadFile(aFileName);
if ( status == IFSelect_RetDone )
TopoDS_Shape shape = Reader.OneShape();
TopExp_Explorer explorer(shape, TopAbs_FACE);
for (; explorer.More(); explorer.Next())
TopoDS_Face face = TopoDS::Face(explorer.Current());
Handle_Poly_Triangulation facing = BRep_Tool::Triangulation(face, topLoc_Location);
gp_Trsf tr = topLoc_Location;