I am attempting to read trimmed surfaces from an IGES file using OpenCascade. I can get the surfaces, but how do I get the trimming curves.boundary curves from something like an Entity 144? Any help would be great. I am looking to get the actual geometry that defines the trimming curve in the parametric space of the surface being trimmed.
IGESControl_Reader reader;
IFSelect_ReturnStatus stat = reader.ReadFile("144-000.igs");
Handle(TColStd_HSequenceOfTransient) facesList = reader.GiveList("iges-faces");
reader.TransferRoots();
Standard_Integer nbs = reader.NbShapes();
cout << nbs << endl;
for (int i = 1; i <= nbs; i++) {
TopoDS_Shape shape = reader.Shape(i);
TopoDS_Face& face = TopoDS::Face(shape);
Handle(Geom_Surface) surf = BRep_Tool::Surface(face);
Handle(Geom_BSplineSurface) bsplineSurf = GeomConvert::SurfaceToBSplineSurface(surf);
cout << bsplineSurf->UDegree() << " " << bsplineSurf->VDegree() << endl;
}