Hello, maybe I'm dumb, but I really can't understand this:
I'm creating a 4th order BSplineSurface, and everything goes fine (no Standard_ConstructionError is thrown after Geom_BSplineSurface construction).
Then I want to convert it to an AIS_Shape to display it, and I get an "Access Violation" error on TKBREP.DLL
Here it is the code:
//... arrays assignment code before..
try {
Handle(Geom_BSplineSurface) srf = new Geom_BSplineSurface (
arrPointsSurface, // control points double array
arrUKnots, // dimension U knots array
arrVKnots, // dimension V knots array
arrUMult, // dimension U multiplicity array
arrVMult, // dimension V multiplicity array
4,
4,
Standard_False, // not U periodic
Standard_False // not V periodic
);
// convert it to Geom_Surface, seems to go fine
Handle(Geom_Surface) aSurf = srf;
// MakeFace gives "Access Violation" on TKBREP.DLL!!!!
TopoDS_Face aFace = BRepBuilderAPI_MakeFace(aSurf);
// Display code which is not reached
Handle (AIS_Shape) BSShape = new AIS_Shape(aFace);
myAISContext->Display(BSShape);
} catch ( Standard_ConstructionError e ) {
//as I said, this code is never reached because the BSpline is correct
//...
}
Any ideas? Thanks