Because the STEP file writing using the wrappers fails, made the same test using C++:
TopoDS_Shape B1 = BRepPrimAPI_MakeBox (200.,150.,100.);
STEPControl_Writer aWriter;
aWriter.Transfer(B1, STEPControl_ShellBasedSurfaceModel);
IFSelect_ReturnStatus status = aWriter.Write("C:/mfctest.step");
The C++ code works well and saves the box shape on the file. The same code made with .Net wrappers fails and nothing is written on disk:
OCSTEPControl_Writer aWriter = new OCSTEPControl_Writer();
OCTopoDS_Shape shape = new OCBRepPrimAPI_MakeBox(200.0, 150.0, 100.0).Shape();
aWriter.Transfer(shape, OCSTEPControl_StepModelType.STEPControl_ShellBasedSurfaceModel, true);
OCIFSelect_ReturnStatus status = aWriter.Write("C:/sharptest.step");
The generated wrapper code seems ok, no exceptions are generated. Will continue investigation on this tomorrow by debugging using WinDbg on OpenCascade built in debug mode to find the native line of code which fails.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment