1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

0021189: Clean up KAS:dev:ros and Products

Removal of VoxelClient
VoxelDemo sample is redesigned so that it doesn't require compilation of OpenGl classes. It refers to TKOpenGl.dll as to an external library.
Some minor bugs are fixed in OCAF and Viewer 3d standard MFC samples
This commit is contained in:
vro
2012-10-05 14:17:17 +04:00
parent 64e2d3bd71
commit cc1d74e225
27 changed files with 383 additions and 1211 deletions

View File

@@ -1088,11 +1088,30 @@ GetDocument()->UpdateResultMessageDlg("SetAntialiasingOn/SetAntialiasingOff",Mes
void CViewer3dView::OnClearLights()
{
// Setting Off all viewer active lights
TColStd_ListOfTransient lights;
for(myView->Viewer()->InitActiveLights(); myView->Viewer()->MoreActiveLights(); myView->Viewer()->NextActiveLights())
myView->Viewer()->SetLightOff(myView->Viewer()->ActiveLight());
{
lights.Append(myView->Viewer()->ActiveLight());
}
TColStd_ListIteratorOfListOfTransient itrLights(lights);
for (; itrLights.More(); itrLights.Next())
{
Handle(V3d_Light) light = Handle(V3d_Light)::DownCast(itrLights.Value());
myView->Viewer()->SetLightOff(light);
}
// Setting Off all view active lights
for(myView->InitActiveLights(); myView->MoreActiveLights(); myView->NextActiveLights())
myView->SetLightOff(myView->ActiveLight());
lights.Clear();
for(myView->InitActiveLights(); myView->MoreActiveLights(); myView->NextActiveLights())
{
lights.Append(myView->ActiveLight());
}
itrLights.Initialize(lights);
for (; itrLights.More(); itrLights.Next())
{
Handle(V3d_Light) light = Handle(V3d_Light)::DownCast(itrLights.Value());
myView->SetLightOff(light);
}
myView->Viewer()->SetDefaultLights();// Setting the default lights on
@@ -1101,10 +1120,31 @@ void CViewer3dView::OnClearLights()
myView->Update();
TCollection_AsciiString Message("\
// Setting Off all viewer active lights\n\
TColStd_ListOfTransient lights;\n\
for(myView->Viewer()->InitActiveLights(); myView->Viewer()->MoreActiveLights(); myView->Viewer()->NextActiveLights())\n\
myView->Viewer()->SetLightOff(myView->Viewer()->ActiveLight()); //Setting Off all viewer active lights\n\
{\n\
lights.Append(myView->Viewer()->ActiveLight());\n\
}\n\
TColStd_ListIteratorOfListOfTransient itrLights(lights);\n\
for (; itrLights.More(); itrLights.Next())\n\
{\n\
Handle(V3d_Light) light = Handle(V3d_Light)::DownCast(itrLights.Value());\n\
myView->Viewer()->SetLightOff(light);\n\
}\n\
\n\
// Setting Off all view active lights\n\
lights.Clear();\n\
for(myView->InitActiveLights(); myView->MoreActiveLights(); myView->NextActiveLights())\n\
myView->SetLightOff(myView->ActiveLight()); //Setting Off all view active lights\n\
{\n\
lights.Append(myView->ActiveLight());\n\
}\n\
itrLights.Initialize(lights);\n\
for (; itrLights.More(); itrLights.Next())\n\
{\n\
Handle(V3d_Light) light = Handle(V3d_Light)::DownCast(itrLights.Value());\n\
myView->SetLightOff(light);\n\
}\n\
\n\
myView->Viewer()->SetDefaultLights();// Setting the default lights on\n\
");

View File

@@ -143,7 +143,7 @@ BOOL COcafApp::IsViewExisting(CDocument * pDoc, CRuntimeClass * pViewClass, CVie
void COcafApp::OnFileOpen()
{
CFileDialog aDlg(TRUE, NULL, NULL, OFN_FILEMUSTEXIST|OFN_HIDEREADONLY,
"OCAFSample(STA) (*.sta)|*.sta|OCAFSample(XML) (*.xml)|*.xml|OCAFSample(Binary) (*.cbf)|*.cbf||");
"OCAFSample(STD) (*.std)|*.std|OCAFSample(XML) (*.xml)|*.xml|OCAFSample(Binary) (*.cbf)|*.cbf||");
if (aDlg.DoModal() != IDOK)
return;

View File

@@ -603,7 +603,8 @@ D->CommitCommand(); \n\
// Get the TOcafFunction_CutDriver using its Standard_GUID in the TFunction_DriverTable
Handle(TOcafFunction_CutDriver) myCutDriver;
TFunction_DriverTable::Get()->FindDriver(myDriverID, myCutDriver);
if (TFunction_DriverTable::Get()->FindDriver(myDriverID, myCutDriver))
myCutDriver->Init(LabObject);
// Recompute the cut object if it must be (look at the MustExecute function code)
// if (myCutDriver->MustExecute(log))
@@ -904,21 +905,21 @@ void COcafDoc::OnFileSaveAs()
CString Filter;
if (TPathName.SearchFromEnd(".xml") > 0){
Filter = "OCAFSample(XML) (*.xml)|*.xml|OCAFSample(STA) (*.sta)|*.sta|OCAFSample(Binary) (*.cbf)|*.cbf||";
Filter = "OCAFSample(XML) (*.xml)|*.xml|OCAFSample(STD) (*.std)|*.std|OCAFSample(Binary) (*.cbf)|*.cbf||";
}
else if (TPathName.SearchFromEnd(".cbf") > 0){
Filter = "OCAFSample(Binary) (*.cbf)|*.cbf|OCAFSample(STA) (*.sta)|*.sta|OCAFSample(XML) (*.xml)|*.xml||";
Filter = "OCAFSample(Binary) (*.cbf)|*.cbf|OCAFSample(STD) (*.std)|*.std|OCAFSample(XML) (*.xml)|*.xml||";
}
else{
Filter = "OCAFSample(STA) (*.sta)|*.sta|OCAFSample(XML) (*.xml)|*.xml|OCAFSample(Binary) (*.cbf)|*.cbf||";
Filter = "OCAFSample(STD) (*.std)|*.std|OCAFSample(XML) (*.xml)|*.xml|OCAFSample(Binary) (*.cbf)|*.cbf||";
}
CFileDialog dlg(FALSE,
"sta",
"std",
GetTitle(),
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
Filter,
// "sta Files (*.sta)|*.sta; |All Files (*.*)|*.*||",
// "std Files (*.std)|*.std; |All Files (*.*)|*.*||",
NULL );
@@ -930,8 +931,8 @@ void COcafDoc::OnFileSaveAs()
CWaitCursor aWaitCursor;
CString CSPath = dlg.GetPathName();
// if((CSPath.Find(CString(".sta")))==-1 )
// CSPath = CSPath + ".sta";
// if((CSPath.Find(CString(".std")))==-1 )
// CSPath = CSPath + ".std";
cout << "Save As " << CSPath << endl;
PathName=CSPath;
@@ -1042,11 +1043,11 @@ m_App->SaveAs(myOcafDoc,(TCollection_ExtendedString) TPath); \n\
}
CFileDialog dlg(FALSE,
"sta",
"std",
GetTitle(),
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"OCAFSample(STA) (*.sta)|*.sta|OCAFSample(XML) (*.xml)|*.xml|OCAFSample(Binary) (*.cbf)|*.cbf||",
// "sta Files (*.sta)|*.sta; |All Files (*.*)|*.*||",
"OCAFSample(STD) (*.std)|*.std|OCAFSample(XML) (*.xml)|*.xml|OCAFSample(Binary) (*.cbf)|*.cbf||",
// "std Files (*.std)|*.std; |All Files (*.*)|*.*||",
NULL );
if (dlg.DoModal() != IDOK) return;
@@ -1088,8 +1089,8 @@ m_App->SaveAs(myOcafDoc,(TCollection_ExtendedString) TPath); \n\
}
// if((CSPath.Find(CString(".sta")))==-1 )
// CSPath = CSPath + ".sta";
// if((CSPath.Find(CString(".std")))==-1 )
// CSPath = CSPath + ".std";
// cout << "Save As " << CSPath << endl;
// PathName=CSPath;