mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-16 10:54:53 +03:00
0025387: Error appears during export to STEP operation in ImportExport MFC sample
Combo-box for selection of translation mode is available in Export to STEP and CSFDB files. Default valuer for STEP export mode is set to As Is, i.e. automatic selection. Added #define in function CFileDialog because it takes only 6 parameters in Visual Studio 2005.
This commit is contained in:
parent
db4d439c8f
commit
4084fb643c
@ -836,7 +836,7 @@ IFSelect_ReturnStatus CImportExport::SaveSTEP(const Handle(TopTools_HSequenceOfS
|
||||
|
||||
CFileSaveSTEPDialog aDlg(NULL);
|
||||
|
||||
aDlg.m_Cc1ModelType = STEPControl_ManifoldSolidBrep;
|
||||
aDlg.m_Cc1ModelType = STEPControl_AsIs;
|
||||
|
||||
if (aDlg.DoModal() == IDOK) {
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
|
@ -86,7 +86,7 @@ public :
|
||||
static IFSelect_ReturnStatus SaveSTEP(const Standard_CString& aFileName,
|
||||
const Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape,
|
||||
|
||||
const STEPControl_StepModelType aValue = STEPControl_ManifoldSolidBrep);
|
||||
const STEPControl_StepModelType aValue = STEPControl_AsIs);
|
||||
|
||||
static void ReadSAT(const Handle(AIS_InteractiveContext)& anInteractiveContext);
|
||||
static Handle(TopTools_HSequenceOfShape) ReadSAT(); // not by reference --> the sequence is created here !!
|
||||
|
@ -14,7 +14,12 @@
|
||||
CFileSaveCSFDBDialog::CFileSaveCSFDBDialog(CWnd* pParent /*=NULL*/)
|
||||
: CFileDialog(FALSE,_T("*.csfdb"),NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
_T("CSFDB Files (*.csfdb)|*.csfdb;|CSFDB Files (*.csf)|*.csf;||"),
|
||||
pParent)
|
||||
pParent
|
||||
#if (_MSC_VER < 1500)
|
||||
)
|
||||
#else
|
||||
,0,0)
|
||||
#endif
|
||||
|
||||
{
|
||||
//{{AFX_DATA_INIT(CFileSaveCSFDBDialog)
|
||||
|
@ -12,15 +12,19 @@
|
||||
CFileSaveSTEPDialog::CFileSaveSTEPDialog(CWnd* pParent /*=NULL*/)
|
||||
: CFileDialog(FALSE,_T("*.STEP"),NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
_T("STEP Files (*.step)|*.step;|STEP Files (*.stp)|*.stp;||"),
|
||||
pParent)
|
||||
|
||||
pParent
|
||||
#if (_MSC_VER < 1500)
|
||||
)
|
||||
#else
|
||||
,0,0)
|
||||
#endif
|
||||
|
||||
|
||||
//dlg.m_ofn.lpstrInitialDir = initdir;
|
||||
|
||||
{
|
||||
//{{AFX_DATA_INIT(CFileSaveSTEPDialog)
|
||||
m_Cc1ModelType = STEPControl_ManifoldSolidBrep;
|
||||
m_Cc1ModelType = STEPControl_AsIs;
|
||||
//}}AFX_DATA_INIT
|
||||
|
||||
CString CASROOTValue;
|
||||
@ -38,15 +42,9 @@ void CFileSaveSTEPDialog::DoDataExchange(CDataExchange* pDX)
|
||||
CFileDialog::DoDataExchange(pDX);
|
||||
if (!pDX->m_bSaveAndValidate)
|
||||
{
|
||||
|
||||
if (m_Cc1ModelType==STEPControl_ManifoldSolidBrep) m_DialogType=0;
|
||||
if (m_Cc1ModelType==STEPControl_BrepWithVoids) Standard_Failure::Raise("unsupported enumeration terme");
|
||||
if (m_Cc1ModelType==STEPControl_FacetedBrep) m_DialogType=1;
|
||||
if (m_Cc1ModelType==STEPControl_FacetedBrepAndBrepWithVoids) Standard_Failure::Raise("unsupported enumeration terme");
|
||||
if (m_Cc1ModelType==STEPControl_ShellBasedSurfaceModel) m_DialogType=2;
|
||||
if (m_Cc1ModelType==STEPControl_GeometricCurveSet) m_DialogType=3;
|
||||
|
||||
m_DialogType = m_Cc1ModelType;
|
||||
}
|
||||
|
||||
//{{AFX_DATA_MAP(CFileSaveSTEPDialog)
|
||||
DDX_Control(pDX, IDC_FSaveSTEP_Type, m_SaveTypeCombo);
|
||||
DDX_CBIndex(pDX, IDC_FSaveSTEP_Type, m_DialogType );
|
||||
@ -54,14 +52,7 @@ void CFileSaveSTEPDialog::DoDataExchange(CDataExchange* pDX)
|
||||
|
||||
if (pDX->m_bSaveAndValidate)
|
||||
{
|
||||
|
||||
if (m_DialogType==0) m_Cc1ModelType=STEPControl_ManifoldSolidBrep;
|
||||
|
||||
if (m_DialogType==1) m_Cc1ModelType=STEPControl_FacetedBrep;
|
||||
|
||||
if (m_DialogType==2) m_Cc1ModelType=STEPControl_ShellBasedSurfaceModel;
|
||||
if (m_DialogType==3) m_Cc1ModelType=STEPControl_GeometricCurveSet;
|
||||
|
||||
m_Cc1ModelType = (STEPControl_StepModelType)m_DialogType;
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,12 +67,13 @@ END_MESSAGE_MAP()
|
||||
|
||||
BOOL CFileSaveSTEPDialog::OnInitDialog()
|
||||
{
|
||||
|
||||
BOOL bRet = CFileDialog::OnInitDialog();
|
||||
m_SaveTypeCombo.InsertString(-1, L"ManifoldSolidBrep");
|
||||
|
||||
m_SaveTypeCombo.InsertString(-1, L"FacetedBrep");
|
||||
|
||||
m_SaveTypeCombo.InsertString(-1, L"As Is");
|
||||
m_SaveTypeCombo.InsertString(-1, L"Manifold Solid BRep");
|
||||
m_SaveTypeCombo.InsertString(-1, L"BRep With Voids");
|
||||
m_SaveTypeCombo.InsertString(-1, L"Faceted BRep");
|
||||
m_SaveTypeCombo.InsertString(-1, L"Faceted BRep With Voids");
|
||||
m_SaveTypeCombo.InsertString(-1, L"Shell Based Surface Model");
|
||||
m_SaveTypeCombo.InsertString(-1, L"Geometric Curve Set");
|
||||
m_SaveTypeCombo.SetCurSel(m_DialogType);
|
||||
|
Loading…
x
Reference in New Issue
Block a user