Wed, 12/12/2001 - 08:50
Hello all,
I try to read STEP and IGES files via the new XDE package. But since this are my first steps with OCAF I got some problems. Here's the code:
CFileDialog dlg(TRUE,
NULL,
NULL,
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"STEP Files (*.stp , *.step)|*.stp; *.step; |All Files (*.*)|*.*||",
NULL );
if (dlg.DoModal() == IDOK)
{
CWaitCursor aWaitCursor;
CString filename = dlg.GetPathName();
Standard_CString aFileName = (Standard_CString)(LPCTSTR)filename;
STEPCAFControl_Reader reader;
IFSelect_ReturnStatus readstat = reader.ReadFile(aFileName);
if ( !reader.Transfer ( myOcafDoc ) )
{
AfxMessageBox("Cannot read any relevant data from the STEP file");
}
else
{
myOcafDoc->CommitCommand();
myAISContext->UpdateCurrentViewer();
UpdateAllViews(NULL);
}
}
It reads the file but I don't get shapes in my 3D-View.
What am I doing wrong?
Regards, Patrik Müller
Tue, 01/08/2002 - 09:27
Hello all,
after working some times with XDE and OCAF most of my wishes work. Now I've still got one question: Is it possible using AIS_TexturedShape with TPrsStd? Or where is the entry point for building such a functionality. I want to include further visualization attributes for reading 3DS and such things.
Regards, Patrik Müller