From 03eb96038e853c37a2229e59d0acb72f5dd0478d Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 2 Dec 2021 18:54:45 +0300 Subject: [PATCH] 0032709: Samples, MFC - remove samples Viewer2d, Viewer3d, Ocaf, Triangulation, Animation, Convert --- CMakeLists.txt | 10 +- .../CMakeLists.txt | 0 .../adm/win/vc10/ImportExport.vcxproj | 0 .../adm/win/vc10/ImportExport.vcxproj.filters | 0 .../res/ImportExport.rc | 0 .../res/Toolbar.bmp | Bin .../res/resource.h | 0 .../src/ColoredShapes.cpp | 0 .../src/ColoredShapes.h | 0 .../src/ImportExportApp.cpp | 0 .../src/ImportExportApp.h | 0 .../src/ImportExportDoc.cpp | 0 .../src/ImportExportDoc.h | 0 .../src/StdAfx.cpp | 0 .../src/StdAfx.h | 0 .../mfc/standard/03_Viewer2d/CMakeLists.txt | 54 - samples/mfc/standard/03_Viewer2d/README.txt | 16 - .../03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj | 354 ----- .../adm/win/vc10/Viewer2d.vcxproj.filters | 55 - .../mfc/standard/03_Viewer2d/res/Toolbar.bmp | Bin 1318 -> 0 bytes .../mfc/standard/03_Viewer2d/res/Viewer2d.rc | 420 ------ .../mfc/standard/03_Viewer2d/res/resource.h | 122 -- .../mfc/standard/03_Viewer2d/src/StdAfx.cpp | 6 - samples/mfc/standard/03_Viewer2d/src/StdAfx.h | 158 --- .../standard/03_Viewer2d/src/Viewer2dApp.cpp | 75 - .../standard/03_Viewer2d/src/Viewer2dApp.h | 30 - .../standard/03_Viewer2d/src/Viewer2dDoc.cpp | 405 ------ .../standard/03_Viewer2d/src/Viewer2dDoc.h | 42 - .../{08_HLR => 04_HLR}/CMakeLists.txt | 0 .../standard/{08_HLR => 04_HLR}/README.txt | 0 .../adm/win/vc10/HLR.vcxproj | 0 .../adm/win/vc10/HLR.vcxproj.filters | 0 .../{08_HLR => 04_HLR}/res/AXOVIEWU.bmp | Bin .../{08_HLR => 04_HLR}/res/BACKVIEWD.bmp | Bin .../{08_HLR => 04_HLR}/res/BACKVIEWF.bmp | Bin .../{08_HLR => 04_HLR}/res/BACKVIEWU.bmp | Bin .../{08_HLR => 04_HLR}/res/BOTTOMVIEWD.bmp | Bin .../{08_HLR => 04_HLR}/res/BOTTOMVIEWF.bmp | Bin .../{08_HLR => 04_HLR}/res/BOTTOMVIEWU.bmp | Bin .../{08_HLR => 04_HLR}/res/ChildFrame2D.bmp | Bin .../{08_HLR => 04_HLR}/res/ChildFrame3D.bmp | Bin .../{08_HLR => 04_HLR}/res/FRONTVIEWD.bmp | Bin .../{08_HLR => 04_HLR}/res/FRONTVIEWF.bmp | Bin .../{08_HLR => 04_HLR}/res/FRONTVIEWU.bmp | Bin .../standard/{08_HLR => 04_HLR}/res/HLR.rc | 0 .../{08_HLR => 04_HLR}/res/LEFTVIEWD.bmp | Bin .../{08_HLR => 04_HLR}/res/LEFTVIEWF.bmp | Bin .../{08_HLR => 04_HLR}/res/LEFTVIEWU.bmp | Bin .../{08_HLR => 04_HLR}/res/RIGHTVIEWD.bmp | Bin .../{08_HLR => 04_HLR}/res/RIGHTVIEWF.bmp | Bin .../{08_HLR => 04_HLR}/res/RIGHTVIEWU.bmp | Bin .../{08_HLR => 04_HLR}/res/ToolBarObjects.bmp | Bin .../{08_HLR => 04_HLR}/res/Toolbar.bmp | Bin .../{08_HLR => 04_HLR}/res/axoviewd.bmp | Bin .../{08_HLR => 04_HLR}/res/axoviewf.bmp | Bin .../{08_HLR => 04_HLR}/res/dummyd.bmp | Bin .../{08_HLR => 04_HLR}/res/dummyf.bmp | Bin .../{08_HLR => 04_HLR}/res/dummyu.bmp | Bin .../{08_HLR => 04_HLR}/res/resource.h | 0 .../{08_HLR => 04_HLR}/res/topviewd.bmp | Bin .../{08_HLR => 04_HLR}/res/topviewf.bmp | Bin .../{08_HLR => 04_HLR}/res/topviewu.bmp | Bin .../{08_HLR => 04_HLR}/src/HLRApp.cpp | 0 .../standard/{08_HLR => 04_HLR}/src/HLRApp.h | 0 .../{08_HLR => 04_HLR}/src/HLRDoc.cpp | 0 .../standard/{08_HLR => 04_HLR}/src/HLRDoc.h | 0 .../{08_HLR => 04_HLR}/src/HLRView2D.cpp | 0 .../{08_HLR => 04_HLR}/src/HLRView2D.h | 0 .../{08_HLR => 04_HLR}/src/HLRView3D.cpp | 0 .../{08_HLR => 04_HLR}/src/HLRView3D.h | 0 .../src/SelectionDialog.cpp | 0 .../{08_HLR => 04_HLR}/src/SelectionDialog.h | 0 .../{08_HLR => 04_HLR}/src/StdAfx.cpp | 0 .../standard/{08_HLR => 04_HLR}/src/StdAfx.h | 0 .../mfc/standard/04_Viewer3d/CMakeLists.txt | 77 -- .../04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj | 492 ------- .../adm/win/vc10/Viewer3d.vcxproj.filters | 133 -- .../standard/04_Viewer3d/res/AISToolbar.bmp | Bin 1718 -> 0 bytes .../mfc/standard/04_Viewer3d/res/AIS_TB.bmp | Bin 2118 -> 0 bytes .../mfc/standard/04_Viewer3d/res/Toolbar.bmp | Bin 6918 -> 0 bytes .../mfc/standard/04_Viewer3d/res/Viewer3d.rc | 563 -------- .../mfc/standard/04_Viewer3d/res/resource.h | 94 -- .../mfc/standard/04_Viewer3d/res/resource.hm | 4 - .../standard/04_Viewer3d/src/BoxRadius.cpp | 61 - .../mfc/standard/04_Viewer3d/src/BoxRadius.h | 49 - .../04_Viewer3d/src/ConvertClickToPoint.cxx | 27 - .../04_Viewer3d/src/DlgAttributes.cpp | 332 ----- .../standard/04_Viewer3d/src/DlgAttributes.h | 83 -- .../mfc/standard/04_Viewer3d/src/DlgIsos.cpp | 49 - .../mfc/standard/04_Viewer3d/src/DlgIsos.h | 52 - .../04_Viewer3d/src/ISession_Curve.cpp | 52 - .../standard/04_Viewer3d/src/ISession_Curve.h | 32 - .../04_Viewer3d/src/ModelClippingDlg.cpp | 298 ---- .../04_Viewer3d/src/ModelClippingDlg.h | 68 - .../04_Viewer3d/src/OCCDemo_Presentation.cpp | 329 ----- .../04_Viewer3d/src/OCCDemo_Presentation.h | 135 -- .../standard/04_Viewer3d/src/OffsetDlg.cpp | 314 ----- .../mfc/standard/04_Viewer3d/src/OffsetDlg.h | 60 - .../mfc/standard/04_Viewer3d/src/ScaleDlg.cpp | 188 --- .../mfc/standard/04_Viewer3d/src/ScaleDlg.h | 63 - .../04_Viewer3d/src/ShadingModelDlg.cpp | 70 - .../04_Viewer3d/src/ShadingModelDlg.h | 53 - samples/mfc/standard/04_Viewer3d/src/State.h | 3 - .../mfc/standard/04_Viewer3d/src/StdAfx.cpp | 5 - samples/mfc/standard/04_Viewer3d/src/StdAfx.h | 70 - .../src/TexturesExt_Presentation.cpp | 441 ------ .../src/TexturesExt_Presentation.h | 59 - .../standard/04_Viewer3d/src/TrihedronDlg.cpp | 291 ---- .../standard/04_Viewer3d/src/TrihedronDlg.h | 82 -- .../standard/04_Viewer3d/src/Viewer3dApp.cpp | 93 -- .../standard/04_Viewer3d/src/Viewer3dApp.h | 34 - .../standard/04_Viewer3d/src/Viewer3dDoc.cpp | 1039 -------------- .../standard/04_Viewer3d/src/Viewer3dDoc.h | 159 --- .../standard/04_Viewer3d/src/Viewer3dView.cpp | 1180 ---------------- .../standard/04_Viewer3d/src/Viewer3dView.h | 173 --- samples/mfc/standard/06_Ocaf/CMakeLists.txt | 70 - .../06_Ocaf/adm/win/vc10/Ocaf.vcxproj | 493 ------- .../06_Ocaf/adm/win/vc10/Ocaf.vcxproj.filters | 112 -- samples/mfc/standard/06_Ocaf/res/AIS_TB.bmp | Bin 838 -> 0 bytes .../mfc/standard/06_Ocaf/res/ActionsTB.bmp | Bin 658 -> 0 bytes samples/mfc/standard/06_Ocaf/res/Ocaf.rc | 390 ------ samples/mfc/standard/06_Ocaf/res/Plugin | 44 - samples/mfc/standard/06_Ocaf/res/Resources | 15 - samples/mfc/standard/06_Ocaf/res/Toolbar.bmp | Bin 598 -> 0 bytes .../mfc/standard/06_Ocaf/res/UndoRedoTB.bmp | Bin 358 -> 0 bytes samples/mfc/standard/06_Ocaf/res/resource.h | 35 - .../mfc/standard/06_Ocaf/src/DebugBrowser.hxx | 113 -- .../mfc/standard/06_Ocaf/src/NewBoxDlg.cpp | 72 - samples/mfc/standard/06_Ocaf/src/NewBoxDlg.h | 53 - .../mfc/standard/06_Ocaf/src/NewCylDlg.cpp | 69 - samples/mfc/standard/06_Ocaf/src/NewCylDlg.h | 52 - .../06_Ocaf/src/OCAFSample_CommonDriver.cxx | 94 -- .../06_Ocaf/src/OCAFSample_CommonDriver.hxx | 37 - .../06_Ocaf/src/OCAFSample_Driver.hxx | 44 - samples/mfc/standard/06_Ocaf/src/OcafApp.cpp | 153 --- samples/mfc/standard/06_Ocaf/src/OcafApp.h | 45 - samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp | 1209 ----------------- samples/mfc/standard/06_Ocaf/src/OcafDoc.h | 86 -- .../mfc/standard/06_Ocaf/src/OcafMainFrm.cpp | 96 -- .../mfc/standard/06_Ocaf/src/OcafMainFrm.h | 61 - samples/mfc/standard/06_Ocaf/src/StdAfx.cpp | 6 - samples/mfc/standard/06_Ocaf/src/StdAfx.h | 153 --- .../06_Ocaf/src/TOcafFunction_BoxDriver.cxx | 122 -- .../06_Ocaf/src/TOcafFunction_BoxDriver.hxx | 49 - .../06_Ocaf/src/TOcafFunction_CutDriver.cxx | 143 -- .../06_Ocaf/src/TOcafFunction_CutDriver.hxx | 49 - .../06_Ocaf/src/TOcafFunction_CylDriver.cxx | 116 -- .../06_Ocaf/src/TOcafFunction_CylDriver.hxx | 49 - .../06_Ocaf/src/TOcaf_Application.cxx | 39 - .../06_Ocaf/src/TOcaf_Application.hxx | 38 - .../standard/06_Ocaf/src/TOcaf_Commands.cxx | 357 ----- .../standard/06_Ocaf/src/TOcaf_Commands.hxx | 85 -- .../standard/07_Triangulation/CMakeLists.txt | 60 - .../adm/win/vc10/Triangulation.vcxproj | 321 ----- .../win/vc10/Triangulation.vcxproj.filters | 67 - .../standard/07_Triangulation/res/RCa05792 | Bin 12346 -> 0 bytes .../standard/07_Triangulation/res/Toolbar.bmp | Bin 2358 -> 0 bytes .../07_Triangulation/res/Triangulation.rc | 232 ---- .../standard/07_Triangulation/res/resource.h | 28 - .../07_Triangulation/src/ISession_Curve.cpp | 52 - .../07_Triangulation/src/ISession_Curve.h | 32 - .../src/OCCDemo_Presentation.cpp | 331 ----- .../src/OCCDemo_Presentation.h | 135 -- .../standard/07_Triangulation/src/StdAfx.cpp | 6 - .../standard/07_Triangulation/src/StdAfx.h | 113 -- .../src/Tesselate_Presentation.cpp | 439 ------ .../src/Tesselate_Presentation.h | 34 - .../07_Triangulation/src/TriangulationApp.cpp | 77 -- .../07_Triangulation/src/TriangulationApp.h | 32 - .../07_Triangulation/src/TriangulationDoc.cpp | 418 ------ .../07_Triangulation/src/TriangulationDoc.h | 63 - .../mfc/standard/09_Animation/CMakeLists.txt | 61 - .../adm/win/vc10/Animation.vcxproj | 409 ------ .../adm/win/vc10/Animation.vcxproj.filters | 82 -- .../standard/09_Animation/res/Animation.rc | 271 ---- .../mfc/standard/09_Animation/res/Toolbar.bmp | Bin 2278 -> 0 bytes .../mfc/standard/09_Animation/res/child2.bmp | Bin 2358 -> 0 bytes .../mfc/standard/09_Animation/res/resource.h | 56 - .../09_Animation/src/AnimationApp.cpp | 99 -- .../standard/09_Animation/src/AnimationApp.h | 38 - .../09_Animation/src/AnimationDoc.cpp | 344 ----- .../standard/09_Animation/src/AnimationDoc.h | 67 - .../09_Animation/src/AnimationView3D.cpp | 568 -------- .../09_Animation/src/AnimationView3D.h | 173 --- .../mfc/standard/09_Animation/src/Fonc.cxx | 96 -- .../mfc/standard/09_Animation/src/Fonc.hxx | 46 - .../09_Animation/src/ShadingDialog.cpp | 97 -- .../standard/09_Animation/src/ShadingDialog.h | 56 - .../mfc/standard/09_Animation/src/StdAfx.cpp | 6 - .../mfc/standard/09_Animation/src/StdAfx.h | 214 --- .../09_Animation/src/ThreadDialog.cpp | 74 - .../standard/09_Animation/src/ThreadDialog.h | 54 - .../mfc/standard/10_Convert/CMakeLists.txt | 83 -- .../10_Convert/adm/win/vc10/Convert.vcxproj | 467 ------- .../adm/win/vc10/Convert.vcxproj.filters | 112 -- .../10_Convert/src/Convert_Presentation.cpp | 459 ------- .../10_Convert/src/Convert_Presentation.h | 55 - .../src/ISession/ISession_Curve.cpp | 52 - .../10_Convert/src/ISession/ISession_Curve.h | 32 - .../10_Convert/src/OCCDemo_Presentation.cpp | 324 ----- .../10_Convert/src/OCCDemo_Presentation.h | 134 -- .../standard/10_Convert/src/WNT/MainFrm.cpp | 113 -- .../mfc/standard/10_Convert/src/WNT/MainFrm.h | 59 - .../standard/10_Convert/src/WNT/OCCDemo.cpp | 178 --- .../mfc/standard/10_Convert/src/WNT/OCCDemo.h | 57 - .../standard/10_Convert/src/WNT/OCCDemo.rc | 388 ------ .../10_Convert/src/WNT/OCCDemoDoc.cpp | 243 ---- .../standard/10_Convert/src/WNT/OCCDemoDoc.h | 86 -- .../10_Convert/src/WNT/OCCDemoView.cpp | 552 -------- .../standard/10_Convert/src/WNT/OCCDemoView.h | 144 -- .../10_Convert/src/WNT/ResultDialog.cpp | 206 --- .../10_Convert/src/WNT/ResultDialog.h | 67 - .../standard/10_Convert/src/WNT/StdAfx.cpp | 6 - .../mfc/standard/10_Convert/src/WNT/StdAfx.h | 41 - .../10_Convert/src/WNT/res/OCCDemo.ico | Bin 3774 -> 0 bytes .../10_Convert/src/WNT/res/OCCDemo.rc2 | 1 - .../10_Convert/src/WNT/res/logopen.bmp | Bin 58456 -> 0 bytes .../10_Convert/src/WNT/res/occlogo.bmp | Bin 9190 -> 0 bytes .../10_Convert/src/WNT/res/toolbar.bmp | Bin 1558 -> 0 bytes .../10_Convert/src/WNT/res/toolbar1.bmp | Bin 3558 -> 0 bytes .../standard/10_Convert/src/WNT/resource.h | 30 - samples/mfc/standard/All-vc10.sln | 64 +- samples/mfc/standard/All-vc11.sln | 64 +- samples/mfc/standard/All-vc12.sln | 64 +- samples/mfc/standard/All-vc14.sln | 64 +- samples/mfc/standard/All-vc141.sln | 64 +- samples/mfc/standard/All-vc142.sln | 64 +- .../Common/Primitive/Sample2D_Face.cpp | 440 ------ .../standard/Common/Primitive/Sample2D_Face.h | 81 -- .../Common/Primitive/Sample2D_Image.cpp | 49 - .../Common/Primitive/Sample2D_Image.h | 68 - .../Common/Primitive/Sample2D_Markers.cpp | 57 - .../Common/Primitive/Sample2D_Markers.h | 71 - samples/mfc/standard/Common/User_Cylinder.cxx | 478 ------- samples/mfc/standard/Common/User_Cylinder.hxx | 78 -- samples/mfc/standard/ReadMe.md | 12 +- samples/mfc/standard/mfcsample/CMakeLists.txt | 15 - .../mfcsample/adm/win/vc10/mfcsample.vcxproj | 53 - .../adm/win/vc10/mfcsample.vcxproj.filters | 31 - 239 files changed, 17 insertions(+), 24543 deletions(-) rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/CMakeLists.txt (100%) rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/adm/win/vc10/ImportExport.vcxproj (100%) rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/adm/win/vc10/ImportExport.vcxproj.filters (100%) rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/res/ImportExport.rc (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/res/Toolbar.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/res/resource.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/ColoredShapes.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/ColoredShapes.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/ImportExportApp.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/ImportExportApp.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/ImportExportDoc.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/ImportExportDoc.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/StdAfx.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/StdAfx.h (100%) mode change 100755 => 100644 delete mode 100644 samples/mfc/standard/03_Viewer2d/CMakeLists.txt delete mode 100644 samples/mfc/standard/03_Viewer2d/README.txt delete mode 100644 samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj delete mode 100644 samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj.filters delete mode 100755 samples/mfc/standard/03_Viewer2d/res/Toolbar.bmp delete mode 100755 samples/mfc/standard/03_Viewer2d/res/Viewer2d.rc delete mode 100755 samples/mfc/standard/03_Viewer2d/res/resource.h delete mode 100755 samples/mfc/standard/03_Viewer2d/src/StdAfx.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/StdAfx.h delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.h delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.h rename samples/mfc/standard/{08_HLR => 04_HLR}/CMakeLists.txt (100%) rename samples/mfc/standard/{08_HLR => 04_HLR}/README.txt (100%) rename samples/mfc/standard/{08_HLR => 04_HLR}/adm/win/vc10/HLR.vcxproj (100%) rename samples/mfc/standard/{08_HLR => 04_HLR}/adm/win/vc10/HLR.vcxproj.filters (100%) rename samples/mfc/standard/{08_HLR => 04_HLR}/res/AXOVIEWU.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/BACKVIEWD.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/BACKVIEWF.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/BACKVIEWU.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/BOTTOMVIEWD.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/BOTTOMVIEWF.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/BOTTOMVIEWU.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/ChildFrame2D.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/ChildFrame3D.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/FRONTVIEWD.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/FRONTVIEWF.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/FRONTVIEWU.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/HLR.rc (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/LEFTVIEWD.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/LEFTVIEWF.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/LEFTVIEWU.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/RIGHTVIEWD.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/RIGHTVIEWF.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/RIGHTVIEWU.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/ToolBarObjects.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/Toolbar.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/axoviewd.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/axoviewf.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/dummyd.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/dummyf.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/dummyu.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/resource.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/topviewd.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/topviewf.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/topviewu.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRApp.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRApp.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRDoc.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRDoc.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRView2D.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRView2D.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRView3D.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRView3D.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/SelectionDialog.cpp (100%) rename samples/mfc/standard/{08_HLR => 04_HLR}/src/SelectionDialog.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/StdAfx.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/StdAfx.h (100%) mode change 100755 => 100644 delete mode 100644 samples/mfc/standard/04_Viewer3d/CMakeLists.txt delete mode 100644 samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj delete mode 100644 samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj.filters delete mode 100644 samples/mfc/standard/04_Viewer3d/res/AISToolbar.bmp delete mode 100755 samples/mfc/standard/04_Viewer3d/res/AIS_TB.bmp delete mode 100755 samples/mfc/standard/04_Viewer3d/res/Toolbar.bmp delete mode 100755 samples/mfc/standard/04_Viewer3d/res/Viewer3d.rc delete mode 100755 samples/mfc/standard/04_Viewer3d/res/resource.h delete mode 100644 samples/mfc/standard/04_Viewer3d/res/resource.hm delete mode 100755 samples/mfc/standard/04_Viewer3d/src/BoxRadius.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/BoxRadius.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ConvertClickToPoint.cxx delete mode 100755 samples/mfc/standard/04_Viewer3d/src/DlgAttributes.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/DlgAttributes.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/DlgIsos.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/DlgIsos.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ISession_Curve.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ISession_Curve.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/OffsetDlg.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/OffsetDlg.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ScaleDlg.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ScaleDlg.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/State.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/StdAfx.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/StdAfx.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h delete mode 100644 samples/mfc/standard/06_Ocaf/CMakeLists.txt delete mode 100644 samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj delete mode 100644 samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj.filters delete mode 100755 samples/mfc/standard/06_Ocaf/res/AIS_TB.bmp delete mode 100755 samples/mfc/standard/06_Ocaf/res/ActionsTB.bmp delete mode 100755 samples/mfc/standard/06_Ocaf/res/Ocaf.rc delete mode 100755 samples/mfc/standard/06_Ocaf/res/Plugin delete mode 100755 samples/mfc/standard/06_Ocaf/res/Resources delete mode 100755 samples/mfc/standard/06_Ocaf/res/Toolbar.bmp delete mode 100755 samples/mfc/standard/06_Ocaf/res/UndoRedoTB.bmp delete mode 100755 samples/mfc/standard/06_Ocaf/res/resource.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/DebugBrowser.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/NewBoxDlg.cpp delete mode 100755 samples/mfc/standard/06_Ocaf/src/NewBoxDlg.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/NewCylDlg.cpp delete mode 100755 samples/mfc/standard/06_Ocaf/src/NewCylDlg.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.cxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/OcafApp.cpp delete mode 100755 samples/mfc/standard/06_Ocaf/src/OcafApp.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp delete mode 100755 samples/mfc/standard/06_Ocaf/src/OcafDoc.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/OcafMainFrm.cpp delete mode 100755 samples/mfc/standard/06_Ocaf/src/OcafMainFrm.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/StdAfx.cpp delete mode 100755 samples/mfc/standard/06_Ocaf/src/StdAfx.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcaf_Application.cxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcaf_Application.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.cxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.hxx delete mode 100644 samples/mfc/standard/07_Triangulation/CMakeLists.txt delete mode 100644 samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj delete mode 100644 samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj.filters delete mode 100755 samples/mfc/standard/07_Triangulation/res/RCa05792 delete mode 100755 samples/mfc/standard/07_Triangulation/res/Toolbar.bmp delete mode 100755 samples/mfc/standard/07_Triangulation/res/Triangulation.rc delete mode 100755 samples/mfc/standard/07_Triangulation/res/resource.h delete mode 100755 samples/mfc/standard/07_Triangulation/src/ISession_Curve.cpp delete mode 100755 samples/mfc/standard/07_Triangulation/src/ISession_Curve.h delete mode 100755 samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.cpp delete mode 100755 samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h delete mode 100755 samples/mfc/standard/07_Triangulation/src/StdAfx.cpp delete mode 100755 samples/mfc/standard/07_Triangulation/src/StdAfx.h delete mode 100755 samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp delete mode 100755 samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.h delete mode 100755 samples/mfc/standard/07_Triangulation/src/TriangulationApp.cpp delete mode 100755 samples/mfc/standard/07_Triangulation/src/TriangulationApp.h delete mode 100755 samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp delete mode 100755 samples/mfc/standard/07_Triangulation/src/TriangulationDoc.h delete mode 100644 samples/mfc/standard/09_Animation/CMakeLists.txt delete mode 100644 samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj delete mode 100644 samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj.filters delete mode 100755 samples/mfc/standard/09_Animation/res/Animation.rc delete mode 100755 samples/mfc/standard/09_Animation/res/Toolbar.bmp delete mode 100755 samples/mfc/standard/09_Animation/res/child2.bmp delete mode 100755 samples/mfc/standard/09_Animation/res/resource.h delete mode 100755 samples/mfc/standard/09_Animation/src/AnimationApp.cpp delete mode 100755 samples/mfc/standard/09_Animation/src/AnimationApp.h delete mode 100755 samples/mfc/standard/09_Animation/src/AnimationDoc.cpp delete mode 100755 samples/mfc/standard/09_Animation/src/AnimationDoc.h delete mode 100755 samples/mfc/standard/09_Animation/src/AnimationView3D.cpp delete mode 100755 samples/mfc/standard/09_Animation/src/AnimationView3D.h delete mode 100755 samples/mfc/standard/09_Animation/src/Fonc.cxx delete mode 100755 samples/mfc/standard/09_Animation/src/Fonc.hxx delete mode 100755 samples/mfc/standard/09_Animation/src/ShadingDialog.cpp delete mode 100755 samples/mfc/standard/09_Animation/src/ShadingDialog.h delete mode 100755 samples/mfc/standard/09_Animation/src/StdAfx.cpp delete mode 100755 samples/mfc/standard/09_Animation/src/StdAfx.h delete mode 100755 samples/mfc/standard/09_Animation/src/ThreadDialog.cpp delete mode 100755 samples/mfc/standard/09_Animation/src/ThreadDialog.h delete mode 100644 samples/mfc/standard/10_Convert/CMakeLists.txt delete mode 100644 samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj delete mode 100644 samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj.filters delete mode 100755 samples/mfc/standard/10_Convert/src/Convert_Presentation.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/Convert_Presentation.h delete mode 100755 samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.h delete mode 100755 samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/MainFrm.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/MainFrm.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemo.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemo.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemo.rc delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/ResultDialog.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/ResultDialog.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/StdAfx.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/StdAfx.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/res/OCCDemo.ico delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/res/OCCDemo.rc2 delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/res/logopen.bmp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/res/occlogo.bmp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/res/toolbar.bmp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/res/toolbar1.bmp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/resource.h delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Face.h delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Image.h delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Markers.h delete mode 100755 samples/mfc/standard/Common/User_Cylinder.cxx delete mode 100755 samples/mfc/standard/Common/User_Cylinder.hxx diff --git a/CMakeLists.txt b/CMakeLists.txt index d98acc0ff9..208a5ab255 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1124,14 +1124,8 @@ if (BUILD_SAMPLES_MFC) add_subdirectory(samples/mfc/standard/mfcsample) add_subdirectory(samples/mfc/standard/01_Geometry) add_subdirectory(samples/mfc/standard/02_Modeling) - add_subdirectory(samples/mfc/standard/03_Viewer2d) - add_subdirectory(samples/mfc/standard/04_Viewer3d) - add_subdirectory(samples/mfc/standard/05_ImportExport) - add_subdirectory(samples/mfc/standard/06_Ocaf) - add_subdirectory(samples/mfc/standard/07_Triangulation) - add_subdirectory(samples/mfc/standard/08_HLR) - add_subdirectory(samples/mfc/standard/09_Animation) - add_subdirectory(samples/mfc/standard/10_Convert) + add_subdirectory(samples/mfc/standard/03_ImportExport) + add_subdirectory(samples/mfc/standard/04_HLR) message (STATUS "Info: \(${CURRENT_TIME}\) MFC Sample projects added") endif() diff --git a/samples/mfc/standard/05_ImportExport/CMakeLists.txt b/samples/mfc/standard/03_ImportExport/CMakeLists.txt similarity index 100% rename from samples/mfc/standard/05_ImportExport/CMakeLists.txt rename to samples/mfc/standard/03_ImportExport/CMakeLists.txt diff --git a/samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj b/samples/mfc/standard/03_ImportExport/adm/win/vc10/ImportExport.vcxproj similarity index 100% rename from samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj rename to samples/mfc/standard/03_ImportExport/adm/win/vc10/ImportExport.vcxproj diff --git a/samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj.filters b/samples/mfc/standard/03_ImportExport/adm/win/vc10/ImportExport.vcxproj.filters similarity index 100% rename from samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj.filters rename to samples/mfc/standard/03_ImportExport/adm/win/vc10/ImportExport.vcxproj.filters diff --git a/samples/mfc/standard/05_ImportExport/res/ImportExport.rc b/samples/mfc/standard/03_ImportExport/res/ImportExport.rc old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/res/ImportExport.rc rename to samples/mfc/standard/03_ImportExport/res/ImportExport.rc diff --git a/samples/mfc/standard/05_ImportExport/res/Toolbar.bmp b/samples/mfc/standard/03_ImportExport/res/Toolbar.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/res/Toolbar.bmp rename to samples/mfc/standard/03_ImportExport/res/Toolbar.bmp diff --git a/samples/mfc/standard/05_ImportExport/res/resource.h b/samples/mfc/standard/03_ImportExport/res/resource.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/res/resource.h rename to samples/mfc/standard/03_ImportExport/res/resource.h diff --git a/samples/mfc/standard/05_ImportExport/src/ColoredShapes.cpp b/samples/mfc/standard/03_ImportExport/src/ColoredShapes.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/ColoredShapes.cpp rename to samples/mfc/standard/03_ImportExport/src/ColoredShapes.cpp diff --git a/samples/mfc/standard/05_ImportExport/src/ColoredShapes.h b/samples/mfc/standard/03_ImportExport/src/ColoredShapes.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/ColoredShapes.h rename to samples/mfc/standard/03_ImportExport/src/ColoredShapes.h diff --git a/samples/mfc/standard/05_ImportExport/src/ImportExportApp.cpp b/samples/mfc/standard/03_ImportExport/src/ImportExportApp.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/ImportExportApp.cpp rename to samples/mfc/standard/03_ImportExport/src/ImportExportApp.cpp diff --git a/samples/mfc/standard/05_ImportExport/src/ImportExportApp.h b/samples/mfc/standard/03_ImportExport/src/ImportExportApp.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/ImportExportApp.h rename to samples/mfc/standard/03_ImportExport/src/ImportExportApp.h diff --git a/samples/mfc/standard/05_ImportExport/src/ImportExportDoc.cpp b/samples/mfc/standard/03_ImportExport/src/ImportExportDoc.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/ImportExportDoc.cpp rename to samples/mfc/standard/03_ImportExport/src/ImportExportDoc.cpp diff --git a/samples/mfc/standard/05_ImportExport/src/ImportExportDoc.h b/samples/mfc/standard/03_ImportExport/src/ImportExportDoc.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/ImportExportDoc.h rename to samples/mfc/standard/03_ImportExport/src/ImportExportDoc.h diff --git a/samples/mfc/standard/05_ImportExport/src/StdAfx.cpp b/samples/mfc/standard/03_ImportExport/src/StdAfx.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/StdAfx.cpp rename to samples/mfc/standard/03_ImportExport/src/StdAfx.cpp diff --git a/samples/mfc/standard/05_ImportExport/src/StdAfx.h b/samples/mfc/standard/03_ImportExport/src/StdAfx.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/StdAfx.h rename to samples/mfc/standard/03_ImportExport/src/StdAfx.h diff --git a/samples/mfc/standard/03_Viewer2d/CMakeLists.txt b/samples/mfc/standard/03_Viewer2d/CMakeLists.txt deleted file mode 100644 index 45ea6c8a22..0000000000 --- a/samples/mfc/standard/03_Viewer2d/CMakeLists.txt +++ /dev/null @@ -1,54 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (Viewer2d) - -add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE) -set (CMAKE_MFC_FLAG 2) - -set (Viewer2d_SOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d/src) -set (Viewer2d_HEADER_FILES ${Viewer2d_SOURCE_DIR}/Viewer2dApp.h - ${Viewer2d_SOURCE_DIR}/Viewer2dDoc.h - ${Viewer2d_SOURCE_DIR}/StdAfx.h ) -set (Viewer2d_SOURCE_FILES ${Viewer2d_SOURCE_DIR}/Viewer2dApp.cpp - ${Viewer2d_SOURCE_DIR}/Viewer2dDoc.cpp - ${Viewer2d_SOURCE_DIR}/StdAfx.cpp ) - -set (Viewer2d_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d/res) -set (Viewer2d_RESOURCE_HEADER ${Viewer2d_RESOURCE_DIR}/resource.h) -set (Viewer2d_RESOURCE_FILES ${Viewer2d_RESOURCE_DIR}/Toolbar.bmp - ${Viewer2d_RESOURCE_DIR}/Viewer2d.rc) - -# groups in the VS solution -source_group ("Source Files" FILES ${Viewer2d_SOURCE_FILES} - ${COMMON_WINMAIN_FILE}) - -source_group ("Header Files" FILES ${Viewer2d_HEADER_FILES} - ${Viewer2d_RESOURCE_HEADER}) - -source_group ("Resource Files" FILES ${Viewer2d_RESOURCE_FILES}) - -add_executable (Viewer2d WIN32 ${Viewer2d_SOURCE_FILES} - ${Viewer2d_HEADER_FILES} - ${COMMON_WINMAIN_FILE} - ${Viewer2d_RESOURCE_HEADER} - ${Viewer2d_RESOURCE_FILES}) - -set_property (TARGET Viewer2d PROPERTY FOLDER "Samples/mfc") - -if (SINGLE_GENERATOR) - install (TARGETS Viewer2d DESTINATION "${INSTALL_DIR_BIN}") -else() - install (TARGETS Viewer2d - CONFIGURATIONS Release RelWithDebInfo - DESTINATION "${INSTALL_DIR_BIN}") - install (TARGETS Viewer2d - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_BIN}d") -endif() - -include_directories (${CMAKE_BINARY_DIR}/inc - ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d - ${Viewer2d_SOURCE_DIR} - ${MFC_STANDARD_SAMPLES_DIR}/Common) - -target_link_libraries (Viewer2d mfcsample) \ No newline at end of file diff --git a/samples/mfc/standard/03_Viewer2d/README.txt b/samples/mfc/standard/03_Viewer2d/README.txt deleted file mode 100644 index fa8efd0a1f..0000000000 --- a/samples/mfc/standard/03_Viewer2d/README.txt +++ /dev/null @@ -1,16 +0,0 @@ -Viewer2d sample demonstrates how the functionality of TKV3d package can be -used for 2D visualization. It provides samples of 2D objects visualization, -dynamic selection and highlighting. -It illustrates how to: -1) implement 2D view behavior with V3d_View class, with interactive zooming -and panning of the 2D scene; -2) draw 2D primitives like rectangles, lines, curves; -3) draw different types of markers; -4) draw text defined by its font, height, style, angle; -5) display 2D curves of a face' edges and group them using orientation -criterion; -6) display zoomable images; -6) display circular and rectangular grids . - -Viewer2d support zooming ,panning of displayed objects and -circular and rectangular grids. \ No newline at end of file diff --git a/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj b/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj deleted file mode 100644 index cbf9eef460..0000000000 --- a/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj +++ /dev/null @@ -1,354 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6B905DC2-4E72-4EDA-99C2-7473634690FE} - Viewer2d - MFCProj - - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ../../../../win32\$(VCFMT)\bin\ - .\win32\obj\ - false - ../../../../win64\$(VCFMT)\bin\ - .\win64\obj\ - false - ../../../../win32\$(VCFMT)\bind\ - .\win32\objd\ - true - ../../../../win64\$(VCFMT)\bind\ - .\win64\objd\ - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\obj/Viewer2d.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\src\Properties;.;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win32\obj/Viewer2d.pch - .\win32\obj/ - .\win32\obj/ - .\win32\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bin/Viewer2d.exe - true - ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win32\$(VCFMT)\bin/Viewer2d.pdb - Windows - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\obj/Viewer2d.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\src\Properties;.;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win64\obj/Viewer2d.pch - .\win64\obj/ - .\win64\obj/ - .\win64\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bin/Viewer2d.exe - true - ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win64\$(VCFMT)\bin/Viewer2d.pdb - Windows - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\objd/Viewer2d.tlb - - - - - Disabled - ..\..\..\src\Properties;.;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win32\objd/Viewer2d.pch - .\win32\objd/ - .\win32\objd/ - .\win32\objd/ - Level4 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bind/Viewer2d.exe - true - ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win32\$(VCFMT)\bind/Viewer2d.pdb - Windows - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\objd/Viewer2d.tlb - - - - - Disabled - ..\..\..\src\Properties;.;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win64\objd/Viewer2d.pch - .\win64\objd/ - .\win64\objd/ - .\win64\objd/ - Level4 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bind/Viewer2d.exe - true - ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win64\$(VCFMT)\bind/Viewer2d.pdb - Windows - MachineX64 - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - - - - - - - - - - - - - - {2d6cbbe8-6965-4016-b503-0d715ae26691} - false - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj.filters b/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj.filters deleted file mode 100644 index 77f8789975..0000000000 --- a/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj.filters +++ /dev/null @@ -1,55 +0,0 @@ - - - - - {a5fbdc06-d5d7-4c8a-b829-e986d5c86642} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {c7319851-4cde-42ce-b4aa-8b7ddd5f0c21} - h;hpp;hxx;hm;inl - - - {ffedd656-2b68-4a6e-8df3-973a1a5b136e} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/samples/mfc/standard/03_Viewer2d/res/Toolbar.bmp b/samples/mfc/standard/03_Viewer2d/res/Toolbar.bmp deleted file mode 100755 index a6928bd8c9c40df8223674f3db3245f63a38187b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1318 zcmbW0v2NQi5QbTxfxIP85p>U1Wa{2`@zk>e4chECAiQ-8KxoLG4hAv^5QsdB-$42P zqok-p+W@`j$kUPh^52R6_WkxMxcy-Kg8#&?@lWA1V+c=W^7w{PUaSd$Cp1l&7zxAq zd}h|d;7=F^ML2&-G1z}uZO<#4G4MmE=GQ+3dnMVkEgK)q>TZR5p3hyQa)1{$?B9$h z=hYHKrfM6uj70G4V;-9=91N%)v+QPel0}iW|KyG0ZPK?p*iQ1ql~25mI7X!kFS@>( zdheDsOSylHiDzRQIi-WM!P}ejD$*6tP zJ(9^8eZMH;4i}GlHw_E3zMbh6l*_Q>M(34W@J=@JoCNP)yjOuPM|3QB{&gpPD;_&b zy<8p@jH<6GwXO|bqP@c)f$zMd^H%-qIt0cTCEJDTG6KvwC72^G!IQwkyOjIv?b9K5 zCRv^F{mI)<8bQGTbDvrPd+KQW)RRPDaDA7HPL|Ix-#@>1oJF2>k)Ow?j~huw-RMC& z52>vH+>pYfIhd5mirR_iMUnM;J}x0J=eE}pD%+fT)m!YtUoYFFabf$Y??ILRzr5Uc T-eTY1!g{^nJcqeLfu}8Rp`Lqe diff --git a/samples/mfc/standard/03_Viewer2d/res/Viewer2d.rc b/samples/mfc/standard/03_Viewer2d/res/Viewer2d.rc deleted file mode 100755 index 240238973a..0000000000 --- a/samples/mfc/standard/03_Viewer2d/res/Viewer2d.rc +++ /dev/null @@ -1,420 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" -#include "..\..\Common\res\OCC_Resource.h" -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "#include ""..\\..\\..\\Common\\res\\OCC_Resource.h""\0" -END - -3 TEXTINCLUDE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Toolbar -// - -IDR_MAINFRAME TOOLBAR 16, 15 -BEGIN - BUTTON ID_FILE_NEW - SEPARATOR - BUTTON ID_BUTTON_Test_Text - BUTTON ID_BUTTON_Test_Markers - BUTTON ID_BUTTON_Test_Line - SEPARATOR - BUTTON ID_BUTTON_Test_Face - SEPARATOR - BUTTON ID_BUTTON_Test_Rect - SEPARATOR - BUTTON ID_BUTTON_Test_Curve - SEPARATOR - BUTTON ID_BUTTON32793 - BUTTON ID_BUTTON_Test_MultiImages - SEPARATOR - BUTTON ID_BUTTON_Erase -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_DIALOG_Color DIALOG 0, 0, 281, 186 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Color Map " -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Type Of The Color Map :",IDC_STATIC,20,10,87,10 - LTEXT "To be updated ...",IDC_ColorMap_STATIC_Type,110,10,69,10 - LTEXT "Size Of The Color Map :",IDC_STATIC,20,20,79,10 - CONTROL "Tab1",IDC_ColorMap_TAB,"SysTabControl32",TCS_BUTTONS,19,53,242,15 - LTEXT "To be updated ...",IDC_ColorMap_STATIC_Size,110,20,69,10 - GROUPBOX "Entries :",IDC_STATIC,10,40,264,50 - LTEXT "Color Name :",IDC_STATIC,20,75,50,10 - LTEXT "To be updated ...",IDC_ColorMap_STATIC_EntryColorName,204,75,69,10 - PUSHBUTTON "Add",IDC_ColorMap_BUTTON_AddNewEntry,110,145,55,15 - GROUPBOX "New Entry",IDC_STATIC,10,100,267,79 - PUSHBUTTON "Update Current",IDC_ColorMap_BUTTON_UpdateCurrentEntry,20,145,55,15 - LTEXT "Color Name :",IDC_ColorMap_STATIC_NewEntryColorNameStatic,20,120,55,10 - PUSHBUTTON "Edit...",IDC_ColorMap_BUTTON_NewEntry_EditColor,204,145,55,15 - LTEXT "999",IDC_ColorMap_STATIC_EntryColorRed,75,75,35,10 - LTEXT "999",IDC_ColorMap_STATIC_EntryColorGreen,120,75,35,10 - LTEXT "999",IDC_ColorMap_STATIC_EntryColorBlue,165,75,35,10 - EDITTEXT IDC_ColorMap_EDIT_NewEntryColorRed,75,120,35,12,ES_AUTOHSCROLL - EDITTEXT IDC_ColorMap_EDIT_NewEntryColorGreen,120,120,30,12,ES_AUTOHSCROLL - EDITTEXT IDC_ColorMap_EDIT_NewEntryColorBlue,165,120,35,12,ES_AUTOHSCROLL - COMBOBOX IDC_ColorMap_COMBO_NewEntryColorName,204,120,70,193,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "New Generic Color Map",IDC_ColorMap_BUTTON_NewGenericColorMap,179,4,95,13 - LTEXT "Not available for this type of Color map",IDC_ColorMap_STATIC_NewEntryNotavailable,70,130,160,10 - PUSHBUTTON "New Color Cube Color Map ",IDC_ColorMap_BUTTON_NewColorCubeColorMap,179,18,95,13 - PUSHBUTTON "New Color Ramp Color Map",IDC_ColorMap_BUTTON_NewColorRampColorMap,179,31,95,13 -END - -IDD_DIALOG_Font DIALOGEX 0, 0, 287, 210 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Font Map" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "Size Of The Font Map :",IDC_STATIC,20,10,80,10 - LTEXT "To be updated ...",IDC_FontMap_STATIC_Size,110,10,80,10 - GROUPBOX "Entries :",IDC_STATIC,10,28,270,97,0,WS_EX_TRANSPARENT - CONTROL "Tab1",IDC_FontMap_TAB,"SysTabControl32",TCS_BUTTONS,20,40,242,15 - GROUPBOX "New Entry",IDC_STATIC,10,130,270,73 - PUSHBUTTON "Update Current",IDC_FontMap_BUTTON_UpdateCurrent,158,181,55,15 - PUSHBUTTON "Add",IDC_FontMap_BUTTON_NewEntry,221,179,55,16 - LTEXT "To be updated...",IDC_FontMap_STATIC_CurrentEntryValue,63,75,217,10 - LTEXT "Type :",IDC_STATIC,21,155,23,10 - LTEXT "Type :",IDC_STATIC,21,60,40,10 - LTEXT "To be updated ...",IDC_FontMap_STATIC_CurrentEntryType,63,60,80,10 - LTEXT "Size :",IDC_STATIC,21,174,42,10 - LTEXT "Slant :",IDC_STATIC,21,189,28,10 - EDITTEXT IDC_FontMap_EDIT_NewEntrySize,63,172,62,12,ES_AUTOHSCROLL | ES_WANTRETURN - EDITTEXT IDC_FontMap_EDIT_NewEntrySlant,63,187,62,12,ES_AUTOHSCROLL | ES_WANTRETURN - LTEXT "Size :",IDC_STATIC,21,90,30,10 - LTEXT "Slant :",IDC_STATIC,21,106,36,10 - LTEXT "Value :",IDC_STATIC,21,75,40,10 - LTEXT "Type :",IDC_STATIC,21,140,42,10 - COMBOBOX IDC_FontMap_COMBO_NewEntryType,63,138,113,77,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_FontMap_EDIT_NewEntryValue,63,153,209,12,ES_AUTOHSCROLL | ES_READONLY - LTEXT "To be updated...",IDC_FontMap_STATIC_CurrentEntrySize,63,90,70,10 - LTEXT "To be updated...",IDC_FontMap_STATIC_CurrentEntrySlant,63,106,80,10 - PUSHBUTTON "Edit...",IDC_FontMap_BUTTON_NewEntry_EditFont,191,138,55,12 -END - -IDD_DIALOG_Width DIALOG 0, 0, 281, 167 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Width Map " -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Size Of The Width Map :",IDC_STATIC,15,10,80,10 - CONTROL "Tab1",IDC_WidthMap_TAB,"SysTabControl32",TCS_BUTTONS,21,40,242,15 - LTEXT "To be updated ...",IDC_WidthMap_STATIC_Size,107,10,80,10 - GROUPBOX "Entries :",IDC_STATIC,10,30,264,57 - LTEXT "Type :",IDC_STATIC,15,60,80,10 - LTEXT "Width :",IDC_STATIC,15,75,80,10 - LTEXT "Type :",IDC_STATIC,15,115,49,10 - LTEXT "Width :",IDC_STATIC,15,130,49,10 - COMBOBOX IDC_WidthMap_COMBO_NewEntryType,70,113,113,77,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_WidthMap_EDIT_NewEntryWidth,70,128,62,12,ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN - LTEXT "To be updated ...",IDC_WidthMap_STATIC_EntryType,107,60,80,10 - LTEXT "To be updated ...",IDC_WidthMap_STATIC_EntryWidth,107,75,80,10 - PUSHBUTTON "Add",IDC_WidthMap_BUTTON_AddNewEntry,200,130,55,15 - GROUPBOX "New Entry",IDC_STATIC,7,101,267,51 - PUSHBUTTON "Update Current",IDC_WidthMap_BUTTON_UpdateCurrentEntry,200,110,55,15 -END - -IDD_DIALOG_NewColorCube DIALOG 0, 0, 207, 156 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "New Color Cube" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,150,10,50,13 - PUSHBUTTON "Cancel",IDCANCEL,150,30,50,14 - LTEXT "base_pixel",IDC_STATIC,20,10,50,10 - LTEXT "greenmax",IDC_STATIC,20,70,50,10 - LTEXT "greenmult",IDC_STATIC,20,90,50,10 - LTEXT "bluemax",IDC_STATIC,20,110,50,10 - LTEXT "bluemult",IDC_STATIC,20,130,50,10 - EDITTEXT IDC_NewColorCube_EDIT_bluemult,80,130,50,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_NewColorCube_EDIT_bluemax,80,110,50,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_NewColorCube_EDIT_grennmult,80,90,50,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_NewColorCube_EDIT_greenmax,80,70,50,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_NewColorCube_EDIT_base_pixel,80,10,50,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "redmax",IDC_STATIC,20,30,50,10 - EDITTEXT IDC_NewColorCube_EDIT_redmax,80,30,50,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "redmult",IDC_STATIC,20,50,50,10 - EDITTEXT IDC_NewColorCube_EDIT_redmult,80,50,50,12,ES_AUTOHSCROLL | ES_NUMBER -END - -IDD_DIALOG_NewColorRamp DIALOG 0, 0, 252, 121 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "New Color ramp" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,150,10,50,13 - PUSHBUTTON "Cancel",IDCANCEL,150,30,50,14 - LTEXT "base_pixel",-1,20,10,49,10 - EDITTEXT IDC_NewColorRamp_EDIT_base_pixel,80,10,40,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "dimension",-1,20,30,49,10 - EDITTEXT IDC_NewColorramp_EDIT_dimension,80,30,40,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Color Name :",IDC_ColorMap_STATIC_NewEntryColorNameStatic,20,50,49,10 - PUSHBUTTON "Edit...",IDC_NewColorMapRamp_BUTTON_EditColor,145,70,55,10 - EDITTEXT IDC_NewColorMapRamp_EDIT_ColorRed,28,70,35,12,ES_AUTOHSCROLL - EDITTEXT IDC_NewColorMapRamp_EDIT_ColorGreen,65,70,35,12,ES_AUTOHSCROLL - EDITTEXT IDC_NewColorMapRamp_EDIT_ColorBlue,103,70,35,12,ES_AUTOHSCROLL - COMBOBOX IDC_NewColorMap_COMBO_NewEntryColorName,80,50,70,193,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP -END - -IDD_DIALOG_Type DIALOGEX 0, 0, 287, 170 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Type Map" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "Size Of The Type Map :",-1,20,10,80,10 - LTEXT "To be updated ...",IDC_TypeMap_STATIC_Size,110,10,80,10 - GROUPBOX "Entries :",-1,10,28,270,62,0,WS_EX_TRANSPARENT - CONTROL "Tab1",IDC_TypeMap_TAB,"SysTabControl32",TCS_BUTTONS,20,40,242,15 - GROUPBOX "New Entry",-1,10,100,270,60 - PUSHBUTTON "Update Current",IDC_FontMap_BUTTON_UpdateCurrent,160,140,55,15 - PUSHBUTTON "Add",IDC_FontMap_BUTTON_NewEntry,220,140,55,15 - LTEXT "To be updated...",IDC_TypeMap_STATIC_CurrentEntryValue,63,75,217,10 - LTEXT "Value :",-1,21,126,42,10 - LTEXT "Style :",-1,21,60,40,10 - LTEXT "To be updated ...",IDC_TypeMap_STATIC_CurrentEntryStyle,63,60,80,10 - LTEXT "Value :",-1,21,75,40,10 - LTEXT "Style :",-1,21,111,42,10 - COMBOBOX IDC_TypeMap_COMBO_NewEntryStyle,63,108,113,77,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_TypeMap_EDIT_NewEntryValue,63,124,194,12,ES_AUTOHSCROLL | ES_READONLY -END - -IDD_DIALOG_Mark DIALOGEX 0, 0, 287, 201 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Mark Map" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "Size Of The Mark Map :",AFX_ID_PREVIEW_CLOSE,20,10,80,10 - LTEXT "To be updated ...",IDC_MarkMap_STATIC_Size,110,10,80,10 - GROUPBOX "Entries :",-1,10,28,270,92,0,WS_EX_TRANSPARENT - CONTROL "Tab1",IDC_MarkMap_TAB,"SysTabControl32",TCS_BUTTONS,20,40,242,15 - LTEXT "To be updated...",IDC_MarkMap_STATIC_CurrentEntryXValue,63,75,217,9 - LTEXT "Style :",-1,21,60,40,10 - LTEXT "To be updated ...",IDC_MarkMap_STATIC_CurrentEntryStyle,63,60,80,10 - LTEXT "XValue :",-1,21,75,40,9 - LTEXT "To be updated...",IDC_MarkMap_STATIC_CurrentEntryYValue,63,90,217,10 - LTEXT "YValue :",-1,21,90,40,10 - LTEXT "To be updated...",IDC_MarkMap_STATIC_CurrentEntrySValue,63,105,217,10 - LTEXT "SValue :",-1,21,105,40,10 - LTEXT "To be updated...",IDC_MarkMap_STATIC_CurrentEntryValue,62,90,217,10 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDR_MAINFRAME BITMAP "Toolbar.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_2DTYPE MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM "&Close", ID_FILE_CLOSE - MENUITEM SEPARATOR - MENUITEM "Export Image...", ID_FILE_EXPORT_IMAGE - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Window" - BEGIN - MENUITEM "&New Window", ID_WINDOW_NEW - MENUITEM "&Cascade", ID_WINDOW_CASCADE - MENUITEM "&Tile", ID_WINDOW_TILE_HORZ - MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE - END - POPUP "&Help" - BEGIN - MENUITEM "&About Viewer2d...", ID_APP_ABOUT - END -END - -IDR_MAINFRAME MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Help" - BEGIN - MENUITEM "&About Viewer2d...", ID_APP_ABOUT - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - VALUE "FileDescription", "SAMPLEVIEWER2D MFC Application" - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "SAMPLEVIEWER2D" - VALUE "LegalCopyright", "Copyright © 1997" - VALUE "OriginalFilename", "VIEWER2D.EXE" - VALUE "ProductName", "SAMPLEVIEWER2D Application" - VALUE "ProductVersion", "1, 0, 0, 1" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDR_MAINFRAME "Viewer2d" - IDR_2DTYPE "\nViewer2d\nViewer2d\n\n\nViewer2d.Document\nViewer2d Document" -END - -STRINGTABLE -BEGIN - ID_BUTTON_Test_Text "Test Text\nTest Text" - ID_BUTTON_Test_Markers "Test Markers\nTest Markers" - ID_BUTTON_Test_Line "Test Lines\nTest Lines" - ID_BUTTON_Erase "Erase all\nErase" -END - -STRINGTABLE -BEGIN - ID_BUTTONAxo "Face orientation\nFace orientation" -END - -STRINGTABLE -BEGIN - ID_BUTTON_Test_Curve "Test Curves\nTest Curves" -END - -STRINGTABLE -BEGIN - ID_BUTTON32793 "Test Image\nTest Image" - ID_BUTTON_Test_MultiImages "Test multi-images\nTest multi-images" - ID_BUTTON_Test_Rect "Test Rects\nTest Rects" - ID_BUTTON_Test_Face "Test Face\nTest Face" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif -#include "afxres.rc" // Standard components -#endif -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/samples/mfc/standard/03_Viewer2d/res/resource.h b/samples/mfc/standard/03_Viewer2d/res/resource.h deleted file mode 100755 index f461f3c401..0000000000 --- a/samples/mfc/standard/03_Viewer2d/res/resource.h +++ /dev/null @@ -1,122 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Viewer2d.rc -// -#define ID_BUTTON_Test_Image 0 -#define IDR_MAINFRAME2 130 -#define IDR_2DTYPE2 131 -#define ID_FILE_EXPORT_IMAGE2 133 -#define ID_MENU_CASCADE_PROPERTIES 148 -#define IDD_DIALOG_Font 160 -#define IDD_DIALOG_Width 161 -#define IDD_DIALOG_Color 162 -#define IDD_DIALOG_NewColorCube 163 -#define IDD_DIALOG_NewColorRamp 164 -#define IDD_DIALOG_Type 165 -#define IDD_DIALOG_Mark 166 -#define ID_BUTTON_Test_Text 1043 -#define ID_BUTTON_Test_Markers 1045 -#define ID_BUTTON_Test_Line 1048 -#define ID_BUTTON_Erase 1051 -#define IDR_MAINFRAME1 1208 -#define IDC_ColorMap_STATIC_Type 1420 -#define IDC_ColorMap_STATIC_Size 1421 -#define IDC_ColorMap_TAB 1422 -#define IDC_ColorMap_STATIC_EntryColorGreen 1423 -#define IDC_ColorMap_STATIC_EntryColorRed 1424 -#define IDC_ColorMap_STATIC_EntryColorBlue 1425 -#define IDC_ColorMap_STATIC_EntryColorName 1426 -#define IDC_ColorMap_EDIT_NewEntryColorRed 1427 -#define IDC_ColorMap_EDIT_NewEntryColorGreen 1428 -#define IDC_ColorMap_EDIT_NewEntryColorBlue 1429 -#define IDC_ColorMap_COMBO_NewEntryColorName 1430 -#define IDC_ColorMap_BUTTON_NewEntry_EditColor 1431 -#define IDC_ColorMap_BUTTON_UpdateCurrentEntry 1432 -#define IDC_ColorMap_BUTTON_AddNewEntry 1433 -#define IDC_ColorMap_BUTTON_NewGenericColorMap 1434 -#define IDC_ColorMap_STATIC_NewEntryColorNameStatic 1435 -#define IDC_ColorMap_STATIC_NewEntryNotavailable 1436 -#define IDC_ColorMap_BUTTON_NewColorCubeColorMap 1437 -#define IDC_ColorMap_BUTTON_NewColorRampColorMap 1438 -#define IDC_NewColorMap_COMBO_NewEntryColorName 1439 -#define IDC_NewColorMap_BUTTON_NewColorRampColorMap 1440 -#define IDC_NewColorMapRamp_EDIT_ColorRed 1441 -#define IDC_NewColorMapRamp_EDIT_ColorGreen 1442 -#define IDC_NewColorMapRamp_EDIT_ColorBlue 1443 -#define IDC_NewColorMapRamp_BUTTON_EditColor 1444 -#define IDC_NewColorRamp_EDIT_base_pixel 1445 -#define IDC_NewColorramp_EDIT_dimension 1446 -#define IDC_NewColorCube_EDIT_bluemult 1447 -#define IDC_NewColorCube_EDIT_base_pixel 1448 -#define IDC_NewColorCube_EDIT_bluemax 1449 -#define IDC_NewColorCube_EDIT_grennmult 1450 -#define IDC_NewColorCube_EDIT_greenmax 1451 -#define IDC_NewColorCube_EDIT_redmax 1452 -#define IDC_NewColorCube_EDIT_redmult 1453 -#define IDC_WidthMap_STATIC_Size 1454 -#define IDC_WidthMap_TAB 1455 -#define IDC_WidthMap_STATIC_EntryType 1456 -#define IDC_WidthMap_STATIC_EntryWidth 1457 -#define IDC_WidthMap_COMBO_NewEntryType 1458 -#define IDC_WidthMap_EDIT_NewEntryWidth 1459 -#define IDC_WidthMap_BUTTON_AddNewEntry 1460 -#define IDC_WidthMap_BUTTON_UpdateCurrentEntry 1461 -#define IDC_FontMap_STATIC_Size 1462 -#define IDC_FontMap_TAB 1463 -#define IDC_FontMap_STATIC_CurrentEntryValue 1464 -#define IDC_FontMap_STATIC_CurrentEntryType 1465 -#define IDC_FontMap_STATIC_CurrentEntrySize 1466 -#define IDC_FontMap_STATIC_CurrentEntrySlant 1467 -#define IDC_FontMap_BUTTON_NewEntry 1468 -#define IDC_FontMap_BUTTON_UpdateCurrent 1469 -#define IDC_FontMap_COMBO_NewEntryType 1470 -#define IDC_FontMap_EDIT_NewEntryValue 1471 -#define IDC_FontMap_EDIT_NewEntrySize 1472 -#define IDC_FontMap_EDIT_NewEntrySlant 1473 -#define IDC_FontMap_BUTTON_NewEntry_EditFont 1474 -#define IDC_TypeMap_STATIC_Size 1475 -#define IDC_TypeMap_TAB 1476 -#define IDC_TypeMap_STATIC_CurrentEntryStyle 1477 -#define IDC_TypeMap_STATIC_CurrentEntryValue 1478 -#define IDC_TypeMap_COMBO_NewEntryStyle 1479 -#define IDC_TypeMap_EDIT_NewEntryValue 1480 -#define IDC_MarkMap_STATIC_Size 1481 -#define IDC_MarkMap_TAB 1482 -#define IDC_MarkMap_STATIC_CurrentEntryXValue 1483 -#define IDC_MarkMap_STATIC_CurrentEntryStyle 1484 -#define IDC_MarkMap_STATIC_CurrentEntryYValue 1485 -#define IDC_MarkMap_STATIC_CurrentEntrySValue 1486 -#define IDC_MarkMap_STATIC_CurrentEntryValue 1487 -#define ID_BUTTON32791 32791 -#define ID_BUTTON32793 32793 -#define ID_BUTTON_Test_MultiImages 32794 -#define ID_BUTTON_Test_Rect 32795 -#define ID_BUTTON_Test_Face 32796 -#define ID_BUTTON_Test_Curve 40016 -#define ID_FILE_NEW2 57601 -#define ID_FILE_OPEN2 57603 -#define ID_FILE_CLOSE2 57604 -#define ID_FILE_SAVE2 57605 -#define ID_FILE_SAVE_AS2 57606 -#define ID_WINDOW_NEW2 57652 -#define ID_WINDOW_ARRANGE2 57653 -#define ID_WINDOW_CASCADE2 57654 -#define ID_WINDOW_TILE_HORZ2 57655 -#define ID_WINDOW_TILE_VERT2 57656 -#define ID_WINDOW_SPLIT2 57657 -#define ID_APP_ABOUT2 57666 -#define ID_APP_EXIT2 57667 -#define ID_VIEW_TOOLBAR2 59394 -#define ID_VIEW_STATUS_BAR2 59395 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 179 -#define _APS_NEXT_COMMAND_VALUE 32797 -#define _APS_NEXT_CONTROL_VALUE 1100 -#define _APS_NEXT_SYMED_VALUE 170 -#endif -#endif diff --git a/samples/mfc/standard/03_Viewer2d/src/StdAfx.cpp b/samples/mfc/standard/03_Viewer2d/src/StdAfx.cpp deleted file mode 100755 index f51e0a6cf3..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/StdAfx.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// SampleViewer2d.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - diff --git a/samples/mfc/standard/03_Viewer2d/src/StdAfx.h b/samples/mfc/standard/03_Viewer2d/src/StdAfx.h deleted file mode 100755 index 133d0a5ec0..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/StdAfx.h +++ /dev/null @@ -1,158 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -#include // MFC OLE automation classes -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - -#pragma warning( disable : 4244 ) // Issue warning 4244 -#include "Standard_ShortReal.hxx" -#pragma warning( default : 4244 ) // Issue warning 4244 - -#include -/* -#ifndef Version15B -# ifndef Version15D -# ifndef Version20 -# define Version15B -# endif // Version20 -# endif // Version15D -#endif // Version15B - -#pragma message ("=============================") -#ifdef Version15B -# pragma message ("Set the libs for version 1.5B") -#endif // Version15B - -#ifdef Version15D -# pragma message ("Set the libs for version 1.5D") -#endif // Version15D - -#ifdef Version20 -# pragma message ("Set the libs for version 2.0 ") -#endif // Version20 -#pragma message ("=============================") - -#ifdef Version15B -# pragma comment (lib,"TKTop.lib") -# pragma comment (lib,"TShort.lib") -# pragma comment (lib,"TColQuantity.lib") -#endif - -#ifdef Version15D -# pragma comment (lib,"TKTop.lib") -#endif - -#ifdef Version20 -# pragma comment (lib,"TKTop1.lib") -# pragma comment (lib,"TKTop2.lib") -#endif - -#pragma message ("Set the specific libs for the application") -# pragma comment (lib,"TKGeom.lib") -# pragma comment (lib,"TKGlt.lib") -# pragma comment (lib,"TKGraphic.lib") -# pragma comment (lib,"TKPrsMgr.lib") -# pragma comment (lib,"TKViewers.lib") -# pragma comment (lib,"gp.lib") -# pragma comment (lib,"TKernel.lib") -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include <..\res\resource.h> - -class ISession2D_InteractiveObject; - -class V3d_Viewer; -class SelectMgr_SelectableObject; -class TCollection_AsciiString; -class gp_Pnt2d; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - diff --git a/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.cpp b/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.cpp deleted file mode 100755 index c452e592ff..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// Viewer2dApp.cpp : Defines the class behaviors for the application. -// - -#include "stdafx.h" - -#include "Viewer2dApp.h" - -#include "OCC_MainFrame.h" -#include "OCC_2dChildFrame.h" -#include "Viewer2dDoc.h" -#include "OCC_2dView.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CViewer2dApp construction - -CViewer2dApp::CViewer2dApp() : OCC_App() -{ - SampleName = "Viewer2d"; //for about dialog - SetSamplePath (L"..\\..\\03_Viewer2d"); -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only CViewer2dApp object - -CViewer2dApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// CViewer2dApp initialization - -BOOL CViewer2dApp::InitInstance() -{ - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - - LoadStdProfileSettings(); // Load standard INI file options (including MRU) - - // Register the application's document templates. Document templates - // serve as the connection between documents, frame windows and views. - - CMultiDocTemplate* pDocTemplate; - pDocTemplate = new CMultiDocTemplate( - IDR_2DTYPE, - RUNTIME_CLASS(CViewer2dDoc), - RUNTIME_CLASS(OCC_2dChildFrame), - RUNTIME_CLASS(OCC_2dView)); - AddDocTemplate(pDocTemplate); - - // create main MDI Frame window - OCC_MainFrame* pMainFrame = new OCC_MainFrame; - if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) - return FALSE; - m_pMainWnd = pMainFrame; - - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); - - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; - - // The main window has been initialized, so show and update it. - pMainFrame->ShowWindow(m_nCmdShow); - pMainFrame->UpdateWindow(); - - return TRUE; -} diff --git a/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.h b/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.h deleted file mode 100755 index d63265348f..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.h +++ /dev/null @@ -1,30 +0,0 @@ -// Viewer2dApp.h : main header file for the VIEWER2D application -// - -#if !defined(AFX_VIEWER2DAPP_H__45F76B43_423D_11D7_8612_0060B0EE281E__INCLUDED_) -#define AFX_VIEWER2DAPP_H__45F76B43_423D_11D7_8612_0060B0EE281E__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include - -class CViewer2dApp : public OCC_App -{ -public: - - CViewer2dApp(); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CViewer2dApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL -}; - - -///////////////////////////////////////////////////////////////////////////// - -#endif //(AFX_VIEWER2DAPP_H__45F76B43_423D_11D7_8612_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp b/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp deleted file mode 100755 index fd99f3d03d..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp +++ /dev/null @@ -1,405 +0,0 @@ -// Viewer2dDoc.cpp : implementation of the CViewer2dDoc class -// - -#include "stdafx.h" -#include "Viewer2dDoc.h" -#include "OCC_App.h" -#include "Primitive\Sample2D_Markers.h" -#include "Primitive\Sample2D_Face.h" -#include "Primitive\Sample2D_Image.h" - -///////////////////////////////////////////////////////////////////////////// -// CViewer2dDoc - -IMPLEMENT_DYNCREATE(CViewer2dDoc, CDocument) - -BEGIN_MESSAGE_MAP(CViewer2dDoc, CDocument) - //{{AFX_MSG_MAP(CViewer2dDoc) - ON_COMMAND(ID_BUTTON_Test_Text, OnBUTTONTestText) - ON_COMMAND(ID_BUTTON_Test_Markers, OnBUTTONTestMarkers) - ON_COMMAND(ID_BUTTON_Test_Line, OnBUTTONTestLine) - ON_COMMAND(ID_BUTTON_Erase, OnBUTTONErase) - ON_COMMAND(ID_BUTTON_Test_Face, OnBUTTONTestFace) - ON_COMMAND(ID_BUTTON_Test_Rect, OnBUTTONTestRect) - ON_COMMAND(ID_BUTTON_Test_Curve, OnBUTTONTestCurve) - ON_COMMAND(ID_BUTTON32793, OnBUTTONTestImage) // test image - ON_COMMAND(ID_BUTTON_Test_MultiImages, OnBUTTONMultipleImage) - - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CViewer2dDoc construction/destruction - -CViewer2dDoc::CViewer2dDoc() -{ -} - -CViewer2dDoc::~CViewer2dDoc() -{ -} - -#ifdef _DEBUG -void CViewer2dDoc::AssertValid() const -{ - CDocument::AssertValid(); -} - -void CViewer2dDoc::Dump(CDumpContext& dc) const -{ - CDocument::Dump(dc); -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// CViewer2dDoc commands - -void CViewer2dDoc::OnBUTTONErase() -{ - myAISContext->EraseAll (Standard_True); -} - -void CViewer2dDoc::OnBUTTONTestText() -{ - int aColor = Quantity_NOC_MATRABLUE; - for (Standard_Real j = 15; j <= 20; j++) - { - Handle(AIS_TextLabel) aText = new AIS_TextLabel(); - aText->SetText (TCollection_AsciiString ("font 0 scale ") + (j / 20.0)); - aText->SetPosition (gp_Pnt (0.0, 15.0 * (j - 15.0), 0.0)); - aText->SetAngle (30.0 * M_PI / 180.0); - aText->SetColor (Quantity_NameOfColor(aColor++)); - aText->SetFontAspect (Font_FA_Regular); - aText->SetFont ("Courier"); - aText->SetHeight (j); - aText->SetHJustification (Graphic3d_HTA_LEFT); - aText->SetVJustification (Graphic3d_VTA_BOTTOM); - aText->SetZoomable (Standard_False); - myAISContext->Display(aText, Standard_False); - } - - for (Standard_Real j = 10; j <= 15; j++) - { - Handle(AIS_TextLabel) aText = new AIS_TextLabel(); - aText->SetText (TCollection_AsciiString ("font 1 scale ") + (j / 10.0)); - aText->SetPosition (gp_Pnt (80.0, 15.0 * (j - 10.0), 0.0)); - aText->SetAngle (0.0); - aText->SetColor (Quantity_NameOfColor(aColor++)); - aText->SetFontAspect (Font_FA_BoldItalic); - aText->SetFont ("Cambria"); - aText->SetHeight (j * 2); - aText->SetHJustification (Graphic3d_HTA_LEFT); - aText->SetVJustification (Graphic3d_VTA_BOTTOM); - aText->SetZoomable (Standard_False); - myAISContext->Display(aText, Standard_False); - } - - aColor = Quantity_NOC_MATRABLUE; - for (Standard_Real j = 5; j <= 10; j++) - { - Handle(AIS_TextLabel) aText = new AIS_TextLabel(); - aText->SetText (TCollection_AsciiString ("font 2 scale ") + (j / 10.0)); - aText->SetPosition (gp_Pnt (140.0, 15.0 * (j - 5.0), 0.0)); - aText->SetAngle (0.0); - aText->SetColor (Quantity_NameOfColor(aColor++)); - aText->SetFontAspect (Font_FA_Bold); - aText->SetFont ("Arial"); - aText->SetHeight (j * 2); - aText->SetHJustification (Graphic3d_HTA_LEFT); - aText->SetVJustification (Graphic3d_VTA_BOTTOM); - aText->SetZoomable (Standard_False); - myAISContext->Display(aText, Standard_False); - } - for (Standard_Real j = 10; j <= 15; j++) - { - Handle(AIS_TextLabel) aText = new AIS_TextLabel(); - aText->SetText (TCollection_AsciiString ("font 3 scale ") + (j / 10.0)); - aText->SetPosition (gp_Pnt (200.0, 15.0 * (j - 10.0), 0.0)); - aText->SetAngle (0.0); - aText->SetColor (Quantity_NameOfColor(aColor++)); - aText->SetFontAspect (Font_FA_Italic); - aText->SetFont ("Georgia"); - aText->SetHeight (j * 2); - aText->SetHJustification (Graphic3d_HTA_LEFT); - aText->SetVJustification (Graphic3d_VTA_BOTTOM); - aText->SetZoomable (Standard_False); - myAISContext->Display(aText, Standard_False); - } - - FitAll2DViews(Standard_True); // Update Viewer -} - - -void CViewer2dDoc::OnBUTTONTestMarkers() -{ - // generic Markers - Standard_Integer aColor = 20; - for (int i=1;i<=2;i++) - { - Handle (Sample2D_Markers) aMarker = - new Sample2D_Markers(10+5,5*i,Aspect_TOM_POINT,Quantity_NOC_YELLOW,2.0); - myAISContext->Display(aMarker, Standard_False); - } - for (int i=1;i<=2;i++) - { - Handle (Sample2D_Markers) aMarker = - new Sample2D_Markers(10+10,5*i,Aspect_TOM_O,(Quantity_NameOfColor)(aColor++)); - myAISContext->Display(aMarker, Standard_False); - } - for (int i=1;i<=2;i++) - { - Handle (Sample2D_Markers) aMarker = - new Sample2D_Markers(10+15,5*i,Aspect_TOM_O_PLUS,(Quantity_NameOfColor)(aColor++)); - myAISContext->Display(aMarker, Standard_False); - } - for (int i=1;i<=2;i++) - { - Handle (Sample2D_Markers) aMarker = - new Sample2D_Markers(10+20,5*i,Aspect_TOM_RING1,(Quantity_NameOfColor)(aColor++)); - myAISContext->Display(aMarker, Standard_False); - } - for (int i=1;i<=2;i++) - { - - Handle (Sample2D_Markers) aMarker = - new Sample2D_Markers(10+25,5*i,Aspect_TOM_STAR,(Quantity_NameOfColor)(aColor++)); - myAISContext->Display(aMarker, Standard_False); - } - for (int i=1;i<=2;i++) - { - Handle (Sample2D_Markers) aMarker = - new Sample2D_Markers(10+30,5*i,Aspect_TOM_O_X,(Quantity_NameOfColor)(aColor++)); - myAISContext->Display(aMarker, Standard_False); - } - - FitAll2DViews(Standard_False); // Update Viewer -} -void CViewer2dDoc::OnBUTTONTestLine() -{ - for (int i=0;i<=13;++i) - for (int j=0;j<=5;++j) - { - //set of rectangles here - TopoDS_Edge E1 = BRepBuilderAPI_MakeEdge(gp_Pnt(10*i,10*j,0.), gp_Pnt(10*i+7,10*j,0.)); - TopoDS_Edge E2 = BRepBuilderAPI_MakeEdge(gp_Pnt(10*i+7,10*j,0.), gp_Pnt(10*i+7,10*j+5,0.)); - TopoDS_Edge E3 = BRepBuilderAPI_MakeEdge(gp_Pnt(10*i+7,10*j+5,0.), gp_Pnt(10*i,10*j+5,0.)); - TopoDS_Edge E4 = BRepBuilderAPI_MakeEdge(gp_Pnt(10*i,10*j+5,0.), gp_Pnt(10*i,10*j,0.)); - TopoDS_Wire W = BRepBuilderAPI_MakeWire(E1,E2,E3,E4); - TopoDS_Face F = BRepBuilderAPI_MakeFace(W); - Handle(AIS_Shape) aRect = new AIS_Shape(F); - //set attributes of boundaries - Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer(); - Handle(Prs3d_LineAspect) aLineAttrib = - new Prs3d_LineAspect(Quantity_NOC_YELLOW, - (Aspect_TypeOfLine)(Aspect_TOL_SOLID+j),1); - aDrawer->SetFaceBoundaryAspect(aLineAttrib); - aDrawer->SetFaceBoundaryDraw(Standard_True); - aRect->SetAttributes(aDrawer); - - myAISContext->SetDisplayMode (aRect, 1, Standard_False); - myAISContext->SetColor(aRect,(Quantity_NameOfColor)(Quantity_NOC_CADETBLUE+2*i),Standard_False); - myAISContext->SetMaterial(aRect,Graphic3d_NOM_PLASTIC,Standard_False); - myAISContext->Display(aRect, Standard_False); - - } - this->FitAll2DViews(Standard_True); -} - - -#include -#include - -void CViewer2dDoc::OnBUTTONTestFace() -{ - //erase all - myAISContext->EraseAll (Standard_True); - - CFileDialog dlg(TRUE, - NULL, - NULL, - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - L"BRep Files (*.brep)|*.brep; ||", - NULL ); - - CString initdir; - initdir.GetEnvironmentVariable (L"CSF_OCCTDataPath"); - initdir += L"\\occ"; - - dlg.m_ofn.lpstrInitialDir = initdir; - - if (dlg.DoModal() == IDOK) - { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - - std::filebuf aFileBuf; - std::istream aStream (&aFileBuf); - if (!aFileBuf.open (dlg.GetPathName(), std::ios::in)) - { - AfxMessageBox (L"The shape must be not a null Face"); - return; - } - - TopoDS_Shape aFaceShape; - BRep_Builder aBuilder; - BRepTools::Read (aFaceShape, aStream, aBuilder); - if(aFaceShape.IsNull() || aFaceShape.ShapeType() != TopAbs_FACE) - { - AfxMessageBox (L"The shape must be not a null Face"); - return; - } - - TopoDS_Face aFace = TopoDS::Face(aFaceShape); - Handle(Sample2D_Face) anAISFace = new Sample2D_Face(aFaceShape); - myAISContext->Display(anAISFace,Standard_True); - //activate selection mode for edges selection - myAISContext->Activate(anAISFace,2); - - FitAll2DViews(Standard_False); - - } -} - - - -void CViewer2dDoc::OnBUTTONTestRect() -{ - //First rectangle - TopoDS_Edge E11 = BRepBuilderAPI_MakeEdge(gp_Pnt(40.,0.,0.), gp_Pnt(82.5,25.,0.)); - TopoDS_Edge E12 = BRepBuilderAPI_MakeEdge(gp_Pnt(82.5,25.,0.), gp_Pnt(42.5,93.,0.)); - TopoDS_Edge E13 = BRepBuilderAPI_MakeEdge(gp_Pnt(42.5,93.,0.), gp_Pnt(0.,68.,0.)); - TopoDS_Edge E14 = BRepBuilderAPI_MakeEdge(gp_Pnt(0.,68.,0.), gp_Pnt(40.,0.,0.)); - TopoDS_Wire W1 = BRepBuilderAPI_MakeWire(E11,E12,E13,E14); - Handle(AIS_Shape) aRect1 = new AIS_Shape(W1); - myAISContext->Display (aRect1, Standard_False); - myAISContext->SetColor (aRect1, Quantity_NOC_YELLOW, Standard_False); - - //Second rectangle - TopoDS_Edge E21 = BRepBuilderAPI_MakeEdge(gp_Pnt(110.,0.,0.), gp_Pnt(152.5,25.,0.)); - TopoDS_Edge E22 = BRepBuilderAPI_MakeEdge(gp_Pnt(152.5,25.,0.), gp_Pnt(112.5,93.,0.)); - TopoDS_Edge E23 = BRepBuilderAPI_MakeEdge(gp_Pnt(112.5,93.,0.), gp_Pnt(70.,68.,0.)); - TopoDS_Edge E24 = BRepBuilderAPI_MakeEdge(gp_Pnt(70.,68.,0.), gp_Pnt(110.,0.,0.)); - TopoDS_Wire W2 = BRepBuilderAPI_MakeWire(E21,E22,E23,E24); - Handle(AIS_Shape) aRect2 = new AIS_Shape(W2); - myAISContext->Display (aRect2, Standard_False); - myAISContext->SetColor (aRect2, Quantity_NOC_YELLOW, Standard_False); - myAISContext->Activate(aRect2,2); - - FitAll2DViews(Standard_True); // Update Viewer -} - -void CViewer2dDoc::OnBUTTONTestCurve() -{ - for(int i=0;i<=5;++i) - for(int j=0;j<=5;++j) - { - Handle(Geom_Point) aStart = new Geom_CartesianPoint(gp_Pnt(10*i,10*j,0.)); - Handle(Geom_Point) anEnd = new Geom_CartesianPoint(gp_Pnt(10*i+5,10*j+10,0.)); - Handle(AIS_Line) aLine = new AIS_Line(aStart,anEnd); - Handle(Prs3d_LineAspect) aLineAttrib = - new Prs3d_LineAspect((Quantity_NameOfColor)(Quantity_NOC_CADETBLUE+2*i+2*j), - (Aspect_TypeOfLine)((Aspect_TOL_DASH+i+j)%5),2+i+j); - aLine->Attributes()->SetLineAspect(aLineAttrib); - myAISContext->Display(aLine,Standard_False); - } - FitAll2DViews(Standard_True); -} - -void CViewer2dDoc::OnBUTTONTestImage() -{ - CFileDialog anOpenImageDlg (TRUE, - NULL, - NULL, - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - SupportedImageFormats() + L"| all files (*.*)|*.*;||", - NULL); - - CString anInitDir; - anInitDir.GetEnvironmentVariable (L"CASROOT"); - anInitDir += L"\\data\\images"; - - anOpenImageDlg.m_ofn.lpstrInitialDir = anInitDir; - if(anOpenImageDlg.DoModal() == IDOK) - { - SetCursor(AfxGetApp()->LoadStandardCursor (IDC_WAIT)); - CString aFilePath = anOpenImageDlg.GetPathName(); - TCollection_AsciiString aFileName ((const wchar_t* )aFilePath); - - //erase viewer - myAISContext->EraseAll (Standard_False); - - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (40,50) ; - anImage->SetScale (1.0); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - FitAll2DViews (Standard_True); - } -} - -void CViewer2dDoc::OnBUTTONMultipleImage() -{ - CFileDialog anOpenImageDlg (TRUE, - NULL, - NULL, - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - SupportedImageFormats() + L"| all files (*.*)|*.*;||", - NULL); - - CString anInitDir; - anInitDir.GetEnvironmentVariable (L"CASROOT"); - anInitDir += L"\\data\\images"; - - anOpenImageDlg.m_ofn.lpstrInitialDir = anInitDir; - - if (anOpenImageDlg.DoModal() == IDOK) - { - SetCursor(AfxGetApp()->LoadStandardCursor (IDC_WAIT)); - CString aFilePath = anOpenImageDlg.GetPathName(); - TCollection_AsciiString aFileName ((const wchar_t* )aFilePath); - - //erase viewer - myAISContext->EraseAll (Standard_False); - - //create images - { // 1 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (40, 50); - anImage->SetScale (0.5); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - { // 2 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (100, 50); - anImage->SetScale (0.9); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - { // 3 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (40, 40); - anImage->SetScale (0.3); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - { // 4 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (50, 40); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - { // 5 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (80, 45); - anImage->SetScale (2); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - { // 6 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (20, -20); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - { // 7 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (0, 0); - anImage->SetScale (0.5); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - FitAll2DViews (Standard_True); // Update Viewer - } -} diff --git a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.h b/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.h deleted file mode 100755 index dc586c5fe8..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.h +++ /dev/null @@ -1,42 +0,0 @@ -// Viewer2dDoc.h : interface of the CViewer2dDoc class -// -///////////////////////////////////////////////////////////////////////////// - -#include -#include -#include "OCC_2dDoc.h" - - -class CViewer2dDoc : public OCC_2dDoc -{ -protected: // create from serialization only - CViewer2dDoc(); - DECLARE_DYNCREATE(CViewer2dDoc) - -// Implementation -public: - virtual ~CViewer2dDoc(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: - -// Generated message map functions -protected: - //{{AFX_MSG(CViewer2dDoc) - afx_msg void OnBUTTONTestText(); - afx_msg void OnBUTTONTestMarkers(); - afx_msg void OnBUTTONTestLine(); - afx_msg void OnBUTTONErase(); - afx_msg void OnBUTTONTestFace(); - afx_msg void OnBUTTONTestRect(); - afx_msg void OnBUTTONTestCurve(); - afx_msg void OnBUTTONTestImage(); - afx_msg void OnBUTTONMultipleImage(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -}; - diff --git a/samples/mfc/standard/08_HLR/CMakeLists.txt b/samples/mfc/standard/04_HLR/CMakeLists.txt similarity index 100% rename from samples/mfc/standard/08_HLR/CMakeLists.txt rename to samples/mfc/standard/04_HLR/CMakeLists.txt diff --git a/samples/mfc/standard/08_HLR/README.txt b/samples/mfc/standard/04_HLR/README.txt similarity index 100% rename from samples/mfc/standard/08_HLR/README.txt rename to samples/mfc/standard/04_HLR/README.txt diff --git a/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj b/samples/mfc/standard/04_HLR/adm/win/vc10/HLR.vcxproj similarity index 100% rename from samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj rename to samples/mfc/standard/04_HLR/adm/win/vc10/HLR.vcxproj diff --git a/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj.filters b/samples/mfc/standard/04_HLR/adm/win/vc10/HLR.vcxproj.filters similarity index 100% rename from samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj.filters rename to samples/mfc/standard/04_HLR/adm/win/vc10/HLR.vcxproj.filters diff --git a/samples/mfc/standard/08_HLR/res/AXOVIEWU.bmp b/samples/mfc/standard/04_HLR/res/AXOVIEWU.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/AXOVIEWU.bmp rename to samples/mfc/standard/04_HLR/res/AXOVIEWU.bmp diff --git a/samples/mfc/standard/08_HLR/res/BACKVIEWD.bmp b/samples/mfc/standard/04_HLR/res/BACKVIEWD.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/BACKVIEWD.bmp rename to samples/mfc/standard/04_HLR/res/BACKVIEWD.bmp diff --git a/samples/mfc/standard/08_HLR/res/BACKVIEWF.bmp b/samples/mfc/standard/04_HLR/res/BACKVIEWF.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/BACKVIEWF.bmp rename to samples/mfc/standard/04_HLR/res/BACKVIEWF.bmp diff --git a/samples/mfc/standard/08_HLR/res/BACKVIEWU.bmp b/samples/mfc/standard/04_HLR/res/BACKVIEWU.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/BACKVIEWU.bmp rename to samples/mfc/standard/04_HLR/res/BACKVIEWU.bmp diff --git a/samples/mfc/standard/08_HLR/res/BOTTOMVIEWD.bmp b/samples/mfc/standard/04_HLR/res/BOTTOMVIEWD.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/BOTTOMVIEWD.bmp rename to samples/mfc/standard/04_HLR/res/BOTTOMVIEWD.bmp diff --git a/samples/mfc/standard/08_HLR/res/BOTTOMVIEWF.bmp b/samples/mfc/standard/04_HLR/res/BOTTOMVIEWF.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/BOTTOMVIEWF.bmp rename to samples/mfc/standard/04_HLR/res/BOTTOMVIEWF.bmp diff --git a/samples/mfc/standard/08_HLR/res/BOTTOMVIEWU.bmp b/samples/mfc/standard/04_HLR/res/BOTTOMVIEWU.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/BOTTOMVIEWU.bmp rename to samples/mfc/standard/04_HLR/res/BOTTOMVIEWU.bmp diff --git a/samples/mfc/standard/08_HLR/res/ChildFrame2D.bmp b/samples/mfc/standard/04_HLR/res/ChildFrame2D.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/ChildFrame2D.bmp rename to samples/mfc/standard/04_HLR/res/ChildFrame2D.bmp diff --git a/samples/mfc/standard/08_HLR/res/ChildFrame3D.bmp b/samples/mfc/standard/04_HLR/res/ChildFrame3D.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/ChildFrame3D.bmp rename to samples/mfc/standard/04_HLR/res/ChildFrame3D.bmp diff --git a/samples/mfc/standard/08_HLR/res/FRONTVIEWD.bmp b/samples/mfc/standard/04_HLR/res/FRONTVIEWD.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/FRONTVIEWD.bmp rename to samples/mfc/standard/04_HLR/res/FRONTVIEWD.bmp diff --git a/samples/mfc/standard/08_HLR/res/FRONTVIEWF.bmp b/samples/mfc/standard/04_HLR/res/FRONTVIEWF.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/FRONTVIEWF.bmp rename to samples/mfc/standard/04_HLR/res/FRONTVIEWF.bmp diff --git a/samples/mfc/standard/08_HLR/res/FRONTVIEWU.bmp b/samples/mfc/standard/04_HLR/res/FRONTVIEWU.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/FRONTVIEWU.bmp rename to samples/mfc/standard/04_HLR/res/FRONTVIEWU.bmp diff --git a/samples/mfc/standard/08_HLR/res/HLR.rc b/samples/mfc/standard/04_HLR/res/HLR.rc old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/HLR.rc rename to samples/mfc/standard/04_HLR/res/HLR.rc diff --git a/samples/mfc/standard/08_HLR/res/LEFTVIEWD.bmp b/samples/mfc/standard/04_HLR/res/LEFTVIEWD.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/LEFTVIEWD.bmp rename to samples/mfc/standard/04_HLR/res/LEFTVIEWD.bmp diff --git a/samples/mfc/standard/08_HLR/res/LEFTVIEWF.bmp b/samples/mfc/standard/04_HLR/res/LEFTVIEWF.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/LEFTVIEWF.bmp rename to samples/mfc/standard/04_HLR/res/LEFTVIEWF.bmp diff --git a/samples/mfc/standard/08_HLR/res/LEFTVIEWU.bmp b/samples/mfc/standard/04_HLR/res/LEFTVIEWU.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/LEFTVIEWU.bmp rename to samples/mfc/standard/04_HLR/res/LEFTVIEWU.bmp diff --git a/samples/mfc/standard/08_HLR/res/RIGHTVIEWD.bmp b/samples/mfc/standard/04_HLR/res/RIGHTVIEWD.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/RIGHTVIEWD.bmp rename to samples/mfc/standard/04_HLR/res/RIGHTVIEWD.bmp diff --git a/samples/mfc/standard/08_HLR/res/RIGHTVIEWF.bmp b/samples/mfc/standard/04_HLR/res/RIGHTVIEWF.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/RIGHTVIEWF.bmp rename to samples/mfc/standard/04_HLR/res/RIGHTVIEWF.bmp diff --git a/samples/mfc/standard/08_HLR/res/RIGHTVIEWU.bmp b/samples/mfc/standard/04_HLR/res/RIGHTVIEWU.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/RIGHTVIEWU.bmp rename to samples/mfc/standard/04_HLR/res/RIGHTVIEWU.bmp diff --git a/samples/mfc/standard/08_HLR/res/ToolBarObjects.bmp b/samples/mfc/standard/04_HLR/res/ToolBarObjects.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/ToolBarObjects.bmp rename to samples/mfc/standard/04_HLR/res/ToolBarObjects.bmp diff --git a/samples/mfc/standard/08_HLR/res/Toolbar.bmp b/samples/mfc/standard/04_HLR/res/Toolbar.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/Toolbar.bmp rename to samples/mfc/standard/04_HLR/res/Toolbar.bmp diff --git a/samples/mfc/standard/08_HLR/res/axoviewd.bmp b/samples/mfc/standard/04_HLR/res/axoviewd.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/axoviewd.bmp rename to samples/mfc/standard/04_HLR/res/axoviewd.bmp diff --git a/samples/mfc/standard/08_HLR/res/axoviewf.bmp b/samples/mfc/standard/04_HLR/res/axoviewf.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/axoviewf.bmp rename to samples/mfc/standard/04_HLR/res/axoviewf.bmp diff --git a/samples/mfc/standard/08_HLR/res/dummyd.bmp b/samples/mfc/standard/04_HLR/res/dummyd.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/dummyd.bmp rename to samples/mfc/standard/04_HLR/res/dummyd.bmp diff --git a/samples/mfc/standard/08_HLR/res/dummyf.bmp b/samples/mfc/standard/04_HLR/res/dummyf.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/dummyf.bmp rename to samples/mfc/standard/04_HLR/res/dummyf.bmp diff --git a/samples/mfc/standard/08_HLR/res/dummyu.bmp b/samples/mfc/standard/04_HLR/res/dummyu.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/dummyu.bmp rename to samples/mfc/standard/04_HLR/res/dummyu.bmp diff --git a/samples/mfc/standard/08_HLR/res/resource.h b/samples/mfc/standard/04_HLR/res/resource.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/resource.h rename to samples/mfc/standard/04_HLR/res/resource.h diff --git a/samples/mfc/standard/08_HLR/res/topviewd.bmp b/samples/mfc/standard/04_HLR/res/topviewd.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/topviewd.bmp rename to samples/mfc/standard/04_HLR/res/topviewd.bmp diff --git a/samples/mfc/standard/08_HLR/res/topviewf.bmp b/samples/mfc/standard/04_HLR/res/topviewf.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/topviewf.bmp rename to samples/mfc/standard/04_HLR/res/topviewf.bmp diff --git a/samples/mfc/standard/08_HLR/res/topviewu.bmp b/samples/mfc/standard/04_HLR/res/topviewu.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/topviewu.bmp rename to samples/mfc/standard/04_HLR/res/topviewu.bmp diff --git a/samples/mfc/standard/08_HLR/src/HLRApp.cpp b/samples/mfc/standard/04_HLR/src/HLRApp.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRApp.cpp rename to samples/mfc/standard/04_HLR/src/HLRApp.cpp diff --git a/samples/mfc/standard/08_HLR/src/HLRApp.h b/samples/mfc/standard/04_HLR/src/HLRApp.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRApp.h rename to samples/mfc/standard/04_HLR/src/HLRApp.h diff --git a/samples/mfc/standard/08_HLR/src/HLRDoc.cpp b/samples/mfc/standard/04_HLR/src/HLRDoc.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRDoc.cpp rename to samples/mfc/standard/04_HLR/src/HLRDoc.cpp diff --git a/samples/mfc/standard/08_HLR/src/HLRDoc.h b/samples/mfc/standard/04_HLR/src/HLRDoc.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRDoc.h rename to samples/mfc/standard/04_HLR/src/HLRDoc.h diff --git a/samples/mfc/standard/08_HLR/src/HLRView2D.cpp b/samples/mfc/standard/04_HLR/src/HLRView2D.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRView2D.cpp rename to samples/mfc/standard/04_HLR/src/HLRView2D.cpp diff --git a/samples/mfc/standard/08_HLR/src/HLRView2D.h b/samples/mfc/standard/04_HLR/src/HLRView2D.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRView2D.h rename to samples/mfc/standard/04_HLR/src/HLRView2D.h diff --git a/samples/mfc/standard/08_HLR/src/HLRView3D.cpp b/samples/mfc/standard/04_HLR/src/HLRView3D.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRView3D.cpp rename to samples/mfc/standard/04_HLR/src/HLRView3D.cpp diff --git a/samples/mfc/standard/08_HLR/src/HLRView3D.h b/samples/mfc/standard/04_HLR/src/HLRView3D.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRView3D.h rename to samples/mfc/standard/04_HLR/src/HLRView3D.h diff --git a/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp b/samples/mfc/standard/04_HLR/src/SelectionDialog.cpp similarity index 100% rename from samples/mfc/standard/08_HLR/src/SelectionDialog.cpp rename to samples/mfc/standard/04_HLR/src/SelectionDialog.cpp diff --git a/samples/mfc/standard/08_HLR/src/SelectionDialog.h b/samples/mfc/standard/04_HLR/src/SelectionDialog.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/SelectionDialog.h rename to samples/mfc/standard/04_HLR/src/SelectionDialog.h diff --git a/samples/mfc/standard/08_HLR/src/StdAfx.cpp b/samples/mfc/standard/04_HLR/src/StdAfx.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/StdAfx.cpp rename to samples/mfc/standard/04_HLR/src/StdAfx.cpp diff --git a/samples/mfc/standard/08_HLR/src/StdAfx.h b/samples/mfc/standard/04_HLR/src/StdAfx.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/StdAfx.h rename to samples/mfc/standard/04_HLR/src/StdAfx.h diff --git a/samples/mfc/standard/04_Viewer3d/CMakeLists.txt b/samples/mfc/standard/04_Viewer3d/CMakeLists.txt deleted file mode 100644 index 8e57cc5a35..0000000000 --- a/samples/mfc/standard/04_Viewer3d/CMakeLists.txt +++ /dev/null @@ -1,77 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (Viewer3d) - -add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE) -set (CMAKE_MFC_FLAG 2) - -set (Viewer3d_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/04_Viewer3d/src) -set (Viewer3d_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/04_Viewer3d/res) -set (Viewer3d_HEADER_FILES ${Viewer3d_SRC_DIR}/BoxRadius.h - ${Viewer3d_SRC_DIR}/DlgIsos.h - ${Viewer3d_SRC_DIR}/ISession_Curve.h - ${Viewer3d_SRC_DIR}/ModelClippingDlg.h - ${Viewer3d_SRC_DIR}/OCCDemo_Presentation.h - ${Viewer3d_SRC_DIR}/OffsetDlg.h - ${Viewer3d_SRC_DIR}/ScaleDlg.h - ${Viewer3d_SRC_DIR}/ShadingModelDlg.h - ${Viewer3d_SRC_DIR}/StdAfx.h - ${Viewer3d_SRC_DIR}/TexturesExt_Presentation.h - ${Viewer3d_SRC_DIR}/TrihedronDlg.h - ${Viewer3d_SRC_DIR}/Viewer3dApp.h - ${Viewer3d_SRC_DIR}/Viewer3dDoc.h - ${Viewer3d_SRC_DIR}/Viewer3dView.h - ${Viewer3d_SRC_DIR}/State.h - ${Viewer3d_RESOURCE_DIR}/resource.h - ${Viewer3d_RESOURCE_DIR}/resource.hm) -set (Viewer3d_SOURCE_FILES ${Viewer3d_SRC_DIR}/BoxRadius.cpp - ${Viewer3d_SRC_DIR}/DlgIsos.cpp - ${Viewer3d_SRC_DIR}/ISession_Curve.cpp - ${Viewer3d_SRC_DIR}/ModelClippingDlg.cpp - ${Viewer3d_SRC_DIR}/OCCDemo_Presentation.cpp - ${Viewer3d_SRC_DIR}/OffsetDlg.cpp - ${Viewer3d_SRC_DIR}/ScaleDlg.cpp - ${Viewer3d_SRC_DIR}/ShadingModelDlg.cpp - ${Viewer3d_SRC_DIR}/StdAfx.cpp - ${Viewer3d_SRC_DIR}/TexturesExt_Presentation.cpp - ${Viewer3d_SRC_DIR}/TrihedronDlg.cpp - ${Viewer3d_SRC_DIR}/Viewer3dApp.cpp - ${Viewer3d_SRC_DIR}/Viewer3dDoc.cpp - ${Viewer3d_SRC_DIR}/Viewer3dView.cpp) - -set (Viewer3d_RESOURCE_FILES ${Viewer3d_RESOURCE_DIR}/Viewer3d.rc - ${Viewer3d_RESOURCE_DIR}/AISToolbar.bmp - ${Viewer3d_RESOURCE_DIR}/AIS_TB.bmp - ${Viewer3d_RESOURCE_DIR}/Toolbar.bmp) - -# groups in the VS solution -source_group ("Source Files" FILES ${Viewer3d_SOURCE_FILES} - ${COMMON_WINMAIN_FILE}) - -source_group ("Header Files" FILES ${Viewer3d_HEADER_FILES}) - -source_group ("Resource Files" FILES ${Viewer3d_RESOURCE_FILES}) - -add_executable (Viewer3d WIN32 ${Viewer3d_SOURCE_FILES} - ${Viewer3d_HEADER_FILES} - ${COMMON_WINMAIN_FILE} - ${Viewer3d_RESOURCE_FILES}) - -set_property (TARGET Viewer3d PROPERTY FOLDER "Samples/mfc") - -if (SINGLE_GENERATOR) - install (TARGETS Viewer3d DESTINATION "${INSTALL_DIR_BIN}") -else() - install (TARGETS Viewer3d - CONFIGURATIONS Release RelWithDebInfo - DESTINATION "${INSTALL_DIR_BIN}") - install (TARGETS Viewer3d - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_BIN}d") -endif() - -include_directories (${CMAKE_BINARY_DIR}/inc - ${Viewer3d_SRC_DIR} - ${MFC_STANDARD_SAMPLES_DIR}/Common) - -target_link_libraries (Viewer3d mfcsample) \ No newline at end of file diff --git a/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj b/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj deleted file mode 100644 index 0ff8da4041..0000000000 --- a/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj +++ /dev/null @@ -1,492 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {949DFBDF-9007-4C88-8925-43209C36A5D6} - Viewer3d - MFCProj - - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ../../../../win32\$(VCFMT)\bin\ - .\win32\obj\ - false - ../../../../win64\$(VCFMT)\bin\ - .\win64\obj\ - false - ../../../../win32\$(VCFMT)\bind\ - .\win32\objd\ - true - ../../../../win64\$(VCFMT)\bind\ - .\win64\objd\ - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\obj/Viewer3d.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win32\obj/Viewer3d.pch - .\win32\obj/ - .\win32\obj/ - .\win32\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bin/Viewer3d.exe - true - ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win32\$(VCFMT)\bin/Viewer3d.pdb - Windows - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\obj/Viewer3d.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win64\obj/Viewer3d.pch - .\win64\obj/ - .\win64\obj/ - .\win64\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bin/Viewer3d.exe - true - ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win64\$(VCFMT)\bin/Viewer3d.pdb - Windows - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\objd/Viewer3d.tlb - - - - - Disabled - ..\..\..\;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win32\objd/Viewer3d.pch - .\win32\objd/ - .\win32\objd/ - .\win32\objd/ - true - Level4 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bind/Viewer3d.exe - true - ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win32\$(VCFMT)\bind/Viewer3d.pdb - Windows - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\objd/Viewer3d.tlb - - - - - Disabled - ..\..\..\;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win64\objd/Viewer3d.pch - .\win64\objd/ - .\win64\objd/ - .\win64\objd/ - true - Level4 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bind/Viewer3d.exe - true - ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win64\$(VCFMT)\bind/Viewer3d.pdb - Windows - MachineX64 - - - - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - Disabled - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {2d6cbbe8-6965-4016-b503-0d715ae26691} - false - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj.filters b/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj.filters deleted file mode 100644 index 58bb2346ce..0000000000 --- a/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj.filters +++ /dev/null @@ -1,133 +0,0 @@ - - - - - {60965501-d2d2-46fa-bdc9-62d45562945b} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {76f67c93-789a-4fb7-a6ca-db367749f593} - h;hpp;hxx;hm;inl - - - {e16ddbde-8cef-4e45-9ba2-e1b79da373a5} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Header Files - - - Resource Files - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/samples/mfc/standard/04_Viewer3d/res/AISToolbar.bmp b/samples/mfc/standard/04_Viewer3d/res/AISToolbar.bmp deleted file mode 100644 index bff4ea87dc52ee069072f5accc3eed0f00ea8ab5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1718 zcmd^9L2iRE5HwO%I7LC~Bl?W0_x{DF7zqh+i=WXa=WPEjLUR8&!uqo}EJ<4TmX*pQj>`&gJ+EQ1$+;TOK;r;pSrfaPk-=_46;>4!qYE-Q zH_fi_K0mRj`f?CjE-ep diff --git a/samples/mfc/standard/04_Viewer3d/res/AIS_TB.bmp b/samples/mfc/standard/04_Viewer3d/res/AIS_TB.bmp deleted file mode 100755 index d99e3aeafd02869aa2b1aa0bc9c8533b4647ab3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2118 zcmcIkJ!>055Z!>u$q+~af%I;aE`Pyx=VHDF(L*bYa;3&+eJnth7y5pajQYRe!KV^Ce&IW1%y$7QQKLt-t|OM?f^tz zc|>HPKCl(rI3Hu2ElyP5#h~GmcI1&k&^VbBaglevmqH5J@Ti}s$Q4Pfi6l&Of&Y(q zEN(Y2CSZBJq#f!pHVlt?5X1YI_k)Tx3|YUg7{-ChP71mhpkWwlVoSJ2J(rN%Ts7Lr zRX1^UhZ;yf0blU{t;R?&GWu5!v;&Pe9^65k4v&V$ zL-c%5+m^D+12pEU-HNfT=J)Yn&?AQQfsr595oj1&d4R@07+})ms^P&HZ8#SX9BV$6 z;rnW(7-(OBGSp7ZubNtZcJ4rVtX=Tc)*NbB*(^^||buzz+H!$d;z+_)FXVsDsdGMfK zzOK?tsvLcV(X>{vuDeKkm%NzA$7! uM2E{HC6kb^2(iYn25n6ou(v5fKnzuYeRrwsWP&2m%#u@-D6-m$b2f2+TstW2AJt0o1riv4tMO zrGNy2OLxjS=aMrVYha4s%XEuLArc}qpPCrV*9ixF2B_LKA1Y^_dD#COTh|i^3vF=S(0h2t1id8-`R&H0U)0YpO{>*1YOY2YwD%3K;C*pwJkpbLRa;wcK}o|ZD? zVaR3`vtFhsNAkDZ{TiIpjph^e*07HfK)q9OJ$txY)W43i12Z8i@Z z57Te{*{o^EXP&@R(n8yYDMFuRq*dq?&m3H#Yr|CjRMKoC(=Jmyi4Ve#PDdEu5Fm?zO`YfgrYKN(2 z)Lo|NtQUQeY49N1(dkXg^tNT1LO21q&lBQGWG;tPFMjHm(`5gPZOer{NixkXy6Vq0w zjZiyGUzkq?l2PmFv^Sk%R>p?c!?zs!rc(;_NTw&F_nfnlGy&k&Ez_9!eVk0%*x%8q z^ZGvkxjSZmwPm!!w0}Nr*8L>YVm`(43!OT;>B3UyVm>YQr))t& zfkWuLhslmIBCi@{G4@%+`}63VPeH@uVICS{Q%eDz zlTP8wJFikQ#jFaZ^bdNqJ^v~9Dz?AJeRiz%8ojRL$u85_#D0wJeA+TaKPJY$40wu2 z()K&t`6N`XAEoDN$xK2$rKK%`LxJrTa2u525J{nwI<@;RzN7Gxc^J?ZNle+93AfjG zR3p>g`PAB`+;iNJMMml)4QiAbSh9?3Rh-M`hc(JQ4s*J-)-0PdpT*F_6tvFS1nG9H z6JtM3sHvp0KjoWgjRI5ru?v}=$>LR+D59Vq9+oEs8X6SQ%|b=9A&ODYO32f`t$1D8 zFsKGu@okDLJ^;P)&*GkWros9mNvIwLSn{@88cbNB$ns48LgD}V^l^H+fz^87S|;8# zY9&-}!_5)lm>{)G<5&e`dMPX3+DS~4IdFsNmGihl--~04}_vj?Xr4{7= zOZix1LQTWaX`3&sLnG9ZsbazBhWU&F3lhBlV=hcgajE}IL4>MV=lcEU8DOARvT2#_ zZ{J(P_0wAo=0e`j#?s3=khx**d!S*e*4rC{Jspf`mZ^P|2`t+Cgs;;TYC|~^Fqi>5 zGfhNU{knvkO$wd9u5;PCajz`=e{J|$y!yU-H!>~fQw_D>*QKX?aWv7l>a@q1Z(h{M Yw9E9Bel4C}*`a8zu|GQYiyI~LKYX^YfB*mh diff --git a/samples/mfc/standard/04_Viewer3d/res/Viewer3d.rc b/samples/mfc/standard/04_Viewer3d/res/Viewer3d.rc deleted file mode 100755 index 8f51d7fe1c..0000000000 --- a/samples/mfc/standard/04_Viewer3d/res/Viewer3d.rc +++ /dev/null @@ -1,563 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -// Generated Help ID header file -#define APSTUDIO_HIDDEN_SYMBOLS -#include "resource.hm" -#undef APSTUDIO_HIDDEN_SYMBOLS - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" -#include "..\..\Common\res\OCC_Resource.h" -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Russian resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) -#ifdef _WIN32 -LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -#pragma code_page(1251) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_SETOFFSETS DIALOGEX 442, 45, 187, 60 -STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_TOOLWINDOW -CAPTION "Set offsets" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - CONTROL "Slider2",IDC_SLIDER_OFFSETFACTOR,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,39,14,100,15 - LTEXT "Factor:",IDC_STATIC,13,17,23,15 - LTEXT "Units:",IDC_STATIC,13,35,19,8 - CONTROL "Slider3",IDC_SLIDER_OFFSETUNITS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,39,32,100,15 - GROUPBOX "Offset parameters",IDC_STATIC,7,6,173,47 - EDITTEXT IDC_EDIT_OFFSETFACTOR,148,14,22,14,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT_OFFSETUNITS,148,32,22,14,ES_AUTOHSCROLL | ES_NUMBER -END - -IDD_TRIHEDRON DIALOG 0, 0, 138, 95 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Triedron settings" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,21,75,50,14 - PUSHBUTTON "Cancel",IDCANCEL,73,75,50,14 - COMBOBOX IDC_COMBOTRIHEDRPOS,38,8,92,60,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_COMBOTRIHEDRCOLOR,38,29,92,78,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_EDITTRIHEDRSCALE,38,51,33,12,ES_CENTER | ES_AUTOHSCROLL - LTEXT "Color:",IDC_STATIC,8,31,20,8 - LTEXT "Position:",IDC_STATIC,8,10,28,8 - LTEXT "Scale:",IDC_STATIC,8,53,24,10 - CONTROL "Spin1",IDC_SPINTRIHEDRSCALE,"msctls_updown32",UDS_AUTOBUDDY | UDS_ARROWKEYS,70,51,11,12 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_SETOFFSETS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 180 - TOPMARGIN, 6 - BOTTOMMARGIN, 53 - END -END -#endif // APSTUDIO_INVOKED - -#endif // Russian resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_SHADINGMODEL DIALOG 0, 0, 60, 66 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "ShadingModel" -FONT 8, "MS Sans Serif" -BEGIN - PUSHBUTTON "GOURAUD",IDC_SHADINGMODEL_GOURAUD,7,7,46,16 - PUSHBUTTON "PHONG", IDC_SHADINGMODEL_PHONG, 7,25,46,15 -END - -IDD_MODELCLIPPING DIALOG 0, 0, 180, 74 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Model clipping" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,13,47,50,14 - PUSHBUTTON "Cancel",IDCANCEL,70,47,50,14 - CONTROL "Slider1",IDC_SLIDER_MODELCLIPPING_Z,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,21,6,97,15 - LTEXT "Z:",-1,12,10,8,8 - GROUPBOX "",-1,7,0,166,25 - EDITTEXT IDC_EDIT_MODELCLIPPING_Z,118,7,34,14,ES_AUTOHSCROLL | ES_NUMBER - GROUPBOX "",-1,7,38,166,29 - CONTROL "Model clipping ON/OFF",IDC_CHECK_MODELCLIPPINGONOFF, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,28,91,10 -END - -IDD_RADIUS DIALOGEX 0, 0, 151, 82 -STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Radius" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - DEFPUSHBUTTON "OK",IDOK,7,61,50,14 - PUSHBUTTON "Cancel",IDCANCEL,94,61,50,14 - CONTROL "Spin1",IDC_SPIN_RADIUS,"msctls_updown32",UDS_ARROWKEYS,98,43,11,14 - EDITTEXT IDC_EDIT_RADIUS,48,42,45,13,ES_AUTOHSCROLL | NOT WS_TABSTOP - CTEXT "Radius Fillet",IDC_RadiusFillet,33,20,94,18,0,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE,HIDC_RadiusFillet -END - -IDD_ISOS DIALOG 0, 0, 161, 66 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Isos" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,7,44,50,14 - PUSHBUTTON "Cancel",IDCANCEL,104,44,50,14 - LTEXT "U Isos Number",IDC_ISOU,31,13,48,8 - LTEXT "V Isos Number",IDC_ISOV,31,28,47,8 - EDITTEXT IDC_EDIT_ISOU,93,7,40,14,ES_AUTOHSCROLL - EDITTEXT IDC_EDIT_ISOV,93,24,40,12,ES_AUTOHSCROLL -END - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "#include ""..\\..\\Common\\res\\OCC_Resource.h""\0" -END - -3 TEXTINCLUDE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDR_MAINFRAME BITMAP "..//res//Toolbar.bmp" -IDR_TB_AIS BITMAP "..//res//AIS_TB.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Toolbar -// - -IDR_MAINFRAME TOOLBAR 20, 20 -BEGIN - BUTTON ID_FILE_NEW - SEPARATOR - BUTTON ID_CIRCLE - BUTTON ID_LINE - BUTTON ID_BOX - BUTTON ID_Cylinder - BUTTON ID_SPHERE - SEPARATOR - BUTTON ID_OVERLAPPED_BOX - BUTTON ID_OVERLAPPED_CYLINDER - BUTTON ID_OVERLAPPED_SPHERE - BUTTON ID_POLYGON_OFFSETS - SEPARATOR - BUTTON ID_ERASEALL - SEPARATOR - BUTTON ID_SPOT_LIGHT - BUTTON ID_POSITIONAL_LIGHT - BUTTON ID_DIRECTIONAL_LIGHT - BUTTON ID_AMBIENT_LIGHT - BUTTON ID_CLEAR_LIGHTS - SEPARATOR - BUTTON ID_SCALE - SEPARATOR - BUTTON ID_NBISOS - BUTTON ID_SHADINGMODEL - BUTTON ID_ANTIALIASINGONOFF - SEPARATOR - BUTTON ID_MODELCLIPPING - SEPARATOR - BUTTON ID_VERTICES - BUTTON ID_EDGES - BUTTON ID_FACES - BUTTON ID_NEUTRAL - SEPARATOR - BUTTON ID_FILLET3D - SEPARATOR - BUTTON ID_TEXTURE_ON - BUTTON ID_BUTTONStart - BUTTON ID_BUTTONPrev - BUTTON ID_BUTTONRepeat - BUTTON ID_BUTTONNext - BUTTON ID_BUTTONEnd - SEPARATOR - BUTTON ID_DUMP_VIEW - SEPARATOR - BUTTON ID_APP_ABOUT -END - -IDR_TB_AIS TOOLBAR 20, 20 -BEGIN - BUTTON ID_OBJECT_WIREFRAME - BUTTON ID_OBJECT_SHADING - BUTTON ID_OBJECT_COLORED_MESH - SEPARATOR - BUTTON ID_OBJECT_COLOR - BUTTON ID_OBJECT_MATERIAL - BUTTON ID_OBJECT_TRANSPARENCY - SEPARATOR - BUTTON ID_OBJECT_ERASE - BUTTON ID_OBJECT_DISPLAYALL - SEPARATOR - BUTTON ID_OBJECT_REMOVE - BUTTON ID_OBJECT_DIM -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MAINFRAME MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Help" - BEGIN - MENUITEM "&About Viewer3d...", ID_APP_ABOUT - END -END - -IDR_3DTYPE MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM "&Close", ID_FILE_CLOSE - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Options" - BEGIN - POPUP "&Trihedron" - BEGIN - MENUITEM "&Static Trihedron...", ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON - MENUITEM "&Dynamic Trihedron", ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON - END - END - POPUP "&Window" - BEGIN - MENUITEM "&New Window", ID_WINDOW_NEW - MENUITEM "&Cascade", ID_WINDOW_CASCADE - MENUITEM "&Tile", ID_WINDOW_TILE_HORZ - MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE - END - POPUP "&Help" - BEGIN - MENUITEM "&About Viewer3d...", ID_APP_ABOUT - END -END - -IDR_Popup3D MENU -BEGIN - POPUP "BackGround" - BEGIN - MENUITEM "Background Color...", ID_Modify_ChangeBackground - END - POPUP "Object(s)" - BEGIN - MENUITEM "Erase", ID_OBJECT_ERASE - MENUITEM "Shading", ID_OBJECT_SHADING - MENUITEM "Wireframe", ID_OBJECT_WIREFRAME - MENUITEM "Color...", ID_OBJECT_COLOR - MENUITEM "Material...", ID_OBJECT_MATERIAL - POPUP "Material" - BEGIN - MENUITEM "Aluminium", ID_OBJECT_MATERIAL_ALUMINIUM - MENUITEM "Brass", ID_OBJECT_MATERIAL_BRASS - MENUITEM "Bronze", ID_OBJECT_MATERIAL_BRONZE - MENUITEM "Chrome", ID_OBJECT_MATERIAL_CHROME - MENUITEM "Copper", ID_OBJECT_MATERIAL_COPPER - MENUITEM "Gold", ID_OBJECT_MATERIAL_GOLD - MENUITEM "Jade", ID_OBJECT_MATERIAL_JADE - MENUITEM "Metalized", ID_OBJECT_MATERIAL_METALIZED - MENUITEM "Neon GNC", ID_OBJECT_MATERIAL_NEON_GNC - MENUITEM "Neon PHC", ID_OBJECT_MATERIAL_NEON_PHC - MENUITEM "Obsidian", ID_OBJECT_MATERIAL_OBSIDIAN - MENUITEM "Pewter", ID_OBJECT_MATERIAL_PEWTER - MENUITEM "Plaster", ID_OBJECT_MATERIAL_PLASTER - MENUITEM "Plastic", ID_OBJECT_MATERIAL_PLASTIC - MENUITEM "Satin", ID_OBJECT_MATERIAL_SATIN - MENUITEM "Shiny plastic", ID_OBJECT_MATERIAL_SHINY_PLASTIC - MENUITEM "Silver", ID_OBJECT_MATERIAL_SILVER - MENUITEM "Steel", ID_OBJECT_MATERIAL_STEEL - MENUITEM "Stone", ID_OBJECT_MATERIAL_STONE - MENUITEM SEPARATOR - MENUITEM "Default", ID_OBJECT_MATERIAL_DEFAULT - END - MENUITEM "Transparency...", ID_OBJECT_TRANSPARENCY - END - POPUP "User cylinder" - BEGIN - MENUITEM "Change face color", ID_USERCYLINDER_CHANGEFACECOLOR - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileDescription", "Viewer MFC Application" - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "Viewer" - VALUE "LegalCopyright", "Copyright (C) 1997" - VALUE "OriginalFilename", "Viewer.EXE" - VALUE "ProductName", "SampleViewer3d Application" - VALUE "ProductVersion", "1, 0, 0, 1" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDR_MAINFRAME "Viewer3d" - IDR_3DTYPE "\nViewer3d\n\n\n\n.Document\n Document" -END - -STRINGTABLE -BEGIN - ID_BOX "Create and display a box\nBox" - ID_Cylinder "Create and display a cylinder\nCylinder" - ID_SPHERE "Create and display a sphere\nSphere" - ID_ERASEALL "Remove all\nRemove all" - ID_AMBIENT_LIGHT "Create an ambient light source\nAmbient light" - ID_DIRECTIONAL_LIGHT "Create an directional light source\nDirectional light" - ID_POSITIONAL_LIGHT "Create an positional light source\nPositional light" - ID_SPOT_LIGHT "Create an spot light source\nSpot light" - ID_LIGHTOFF "Delete lights\nDelete lights" - ID_SHADINGMODEL "Define shading model\nShadingModel" - ID_ANTIALIASINGONOFF "Antialiasing ON/OFF\nAntialiasing" -END - -STRINGTABLE -BEGIN - ID_CLEAR_LIGHTS "Clear all the light sources\nClear lights" - ID_MODELCLIPPING "ModelClipping\nModelClipping" - ID_OVERLAPPED_BOX "Create and display two overlapped boxes\nOverlapped boxes" - ID_BUTTON819 "Create and display two overlapped spheres\nOverlapped spheres" - ID_OVERLAPPED_SPHERE "Create and display two overlapped spheres\nOverlapped spheres" - ID_BUTTON821 "Create and display two overlapped boxes\nOverlapped boxes" - ID_OVERLAPPED_CYLINDER "Create and display two overlapped cylinders\nOverlapped cylinders" - ID_POLYGON_OFFSETS "Set/unset offsets\nSet/unset offsets" - ID_OBJECT_COLORED_MESH "Puts cylinder in colored mesh\nColored mesh" - ID_SCALE "Scale\nScale" -END - -STRINGTABLE -BEGIN - ID_CIRCLE "Clear all the light sources\nClear lights" - ID_LINE "Create and display a line with standard tools\nLine" - ID_VERTICES "Set the selection mode to vertices\nVertices" - ID_EDGES "Set the selection mode to edges\nEdges" - ID_FACES "Set the selection modes to faces\nFaces" - ID_NEUTRAL "Neutral point for selection\nNeutral point" - ID_FILLET3D "Make a fillet between faces\nFillet" - ID_NBISOS "Set global isos number\nIsos" - ID_BUTTONStart "Press to go to the first sample\nFirst sample (Home)" - ID_BUTTONPrev "Press to go to the previous sample\nPrevious sample (PgUp)" - ID_BUTTONRepeat "Press to repeat the current sample\nRepeat sample (Space)" - ID_BUTTONNext "Press to go to the next sample\nNext sample (PgDn)" - ID_BUTTONEnd "Press to go to the last sample\nLast sample (End)" -END - -STRINGTABLE -BEGIN - ID_DUMP_VIEW "Save current frame into an image file\nExport view (F12)" - ID_TEXTURE_ON "Run texture example\nRun texture example" -END - -STRINGTABLE -BEGIN - ID_OBJECT_DIMENSIONS "Add dimensions" - ID_LOCALCONTEXT_ADDDIMENSION "Add new dimension for selected objects" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (U.K.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_SCALE DIALOG 0, 0, 186, 103 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Heterogeneous Scale" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,13,78,50,14 - PUSHBUTTON "Cancel",IDCANCEL,70,78,50,14 - GROUPBOX "",IDC_STATIC,7,69,166,29 - GROUPBOX "",IDC_STATIC,7,0,166,65 - CONTROL "Slider1",IDC_SLIDER_SCALEX,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,6,97,15 - LTEXT "X:",IDC_STATIC,13,9,8,8 - EDITTEXT IDC_EDIT_SCALEX,131,7,34,14,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Slider2",IDC_SLIDER_SCALEY,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,25,97,15 - LTEXT "Y:",IDC_STATIC,13,28,8,8 - EDITTEXT IDC_EDIT_SCALEY,131,26,34,14,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Slider2",IDC_SLIDER_SCALEZ,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,45,97,15 - LTEXT "Z:",IDC_STATIC,13,48,8,8 - EDITTEXT IDC_EDIT_SCALEZ,131,46,34,14,ES_AUTOHSCROLL | ES_NUMBER -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_SCALE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 96 - END -END -#endif // APSTUDIO_INVOKED - -#endif // English (U.K.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif -#include "afxres.rc" // Standard components -#endif -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/samples/mfc/standard/04_Viewer3d/res/resource.h b/samples/mfc/standard/04_Viewer3d/res/resource.h deleted file mode 100755 index d7e6ef7847..0000000000 --- a/samples/mfc/standard/04_Viewer3d/res/resource.h +++ /dev/null @@ -1,94 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Viewer3d.rc -// -#define IDD_SHADINGMODEL 131 -#define IDD_SETOFFSETS 134 -#define IDD_SCALE 139 -#define IDD_RADIUS 144 -#define IDD_TRIHEDRON 542 -#define ID_BOX 802 -#define ID_Cylinder 803 -#define ID_SPHERE 804 -#define ID_ERASEALL 805 -#define ID_AMBIENT_LIGHT 806 -#define ID_DIRECTIONAL_LIGHT 807 -#define ID_POSITIONAL_LIGHT 808 -#define ID_SPOT_LIGHT 809 -#define ID_LIGHTOFF 810 -#define ID_USERCYLINDER_CHANGEFACECOLOR 810 -#define ID_SHADINGMODEL 814 -#define ID_ANTIALIASINGONOFF 815 -#define ID_CLEAR_LIGHTS 816 -#define ID_MODELCLIPPING 817 -#define ID_OVERLAPPED_BOX 818 -#define ID_BUTTON819 819 -#define ID_OVERLAPPED_SPHERE 820 -#define ID_BUTTON821 821 -#define ID_OVERLAPPED_CYLINDER 822 -#define ID_POLYGON_OFFSETS 823 -#define ID_OBJECT_COLORED_MESH 827 -#define ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON 829 -#define ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON 830 -#define ID_SCALE 831 -#define ID_CIRCLE 833 -#define ID_LINE 834 -#define ID_VERTICES 837 -#define ID_EDGES 838 -#define ID_FACES 839 -#define ID_NEUTRAL 840 -#define ID_FILLET3D 841 -#define ID_NBISOS 842 -#define ID_BUTTONStart 843 -#define ID_BUTTONPrev 844 -#define ID_BUTTONRepeat 845 -#define ID_BUTTONNext 846 -#define ID_BUTTONEnd 847 -#define ID_DUMP_VIEW 848 -#define ID_TEXTURE_ON 849 -#define IDC_SPIN_RADIUS 1000 -#define IDC_EDIT_RADIUS 1001 -#define IDC_SHADINGMODEL_COLOR 1002 -#define IDC_EDIT_ISOU 1002 -#define IDC_SHADINGMODEL_MULTICOLOR 1003 -#define IDC_SLIDER_MODELCLIPPING_Z 1003 -#define IDC_SHADINGMODEL_FLAT 1004 -#define IDC_ISOU 1004 -#define IDC_SHADINGMODEL_HIDDEN 1005 -#define IDC_EDIT_MODELCLIPPING_Z 1005 -#define IDC_ISOV 1005 -#define IDC_SHADINGMODEL_GOURAUD 1006 -#define IDC_EDIT_ISOV 1006 -#define IDC_SHADINGMODEL_PHONG 1007 -#define IDC_CHECK_MODELCLIPPINGONOFF 1008 -#define IDC_SLIDER_OFFSETFACTOR 1010 -#define IDC_SLIDER_OFFSETUNITS 1011 -#define IDC_EDIT_OFFSETFACTOR 1012 -#define IDC_EDIT_OFFSETUNITS 1013 -#define IDC_COMBO_OFFSETTYPE 1023 -#define IDC_SLIDER_SCALEX 1028 -#define IDC_SLIDER_SCALEY 1029 -#define IDC_EDIT_SCALEX 1030 -#define IDC_EDIT_SCALEY 1031 -#define IDC_RadiusFillet 1031 -#define IDC_SLIDER_SCALEZ 1032 -#define IDC_EDIT_SCALEZ 1033 -#define IDD_RESULTMESSAGEDLG 1500 -#define IDD_MODELCLIPPING 1501 -#define IDD_ISOS 1502 -#define IDC_EDITTRIHEDRSCALE 1686 -#define IDC_SPINTRIHEDRSCALE 1737 -#define IDC_COMBOTRIHEDRPOS 1739 -#define IDC_COMBOTRIHEDRCOLOR 1740 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 140 -#define _APS_NEXT_COMMAND_VALUE 850 -#define _APS_NEXT_CONTROL_VALUE 1032 -#define _APS_NEXT_SYMED_VALUE 104 -#endif -#endif diff --git a/samples/mfc/standard/04_Viewer3d/res/resource.hm b/samples/mfc/standard/04_Viewer3d/res/resource.hm deleted file mode 100644 index 0ed8fdf68d..0000000000 --- a/samples/mfc/standard/04_Viewer3d/res/resource.hm +++ /dev/null @@ -1,4 +0,0 @@ -// Microsoft Visual C++ generated Help ID include file. -// Used by Viewer3d.rc -// -#define HIDC_RadiusFillet 0x808f0407 // IDD_RADIUS diff --git a/samples/mfc/standard/04_Viewer3d/src/BoxRadius.cpp b/samples/mfc/standard/04_Viewer3d/src/BoxRadius.cpp deleted file mode 100755 index da56cbe4a6..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/BoxRadius.cpp +++ /dev/null @@ -1,61 +0,0 @@ -// BoxRadius.cpp : implementation file -// - -#include "stdafx.h" -#include "Viewer3dApp.h" -#include "BoxRadius.h" - -///////////////////////////////////////////////////////////////////////////// - -BoxRadius::BoxRadius(CWnd* pParent, - double rad) - : CDialog(BoxRadius::IDD, pParent) -{ - //{{AFX_DATA_INIT(BoxRadius) - m_radius = rad; - //}}AFX_DATA_INIT -} - - -void BoxRadius::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(BoxRadius) - DDX_Control(pDX, IDC_SPIN_RADIUS, m_spinradius); - DDX_Text(pDX, IDC_EDIT_RADIUS, m_radius); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(BoxRadius, CDialog) - //{{AFX_MSG_MAP(BoxRadius) - ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_RADIUS, OnDeltaposSpinRadius) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// BoxRadius message handlers - -BOOL BoxRadius::OnInitDialog() -{ - CDialog::OnInitDialog(); - - // TODO: Add extra initialization here - m_spinradius.SetRange(-10000,10000); - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void BoxRadius::OnDeltaposSpinRadius(NMHDR* pNMHDR, LRESULT* pResult) -{ - NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR; - // TODO: Add your control notification handler code here - if (pNMUpDown->iDelta == 1) - pNMUpDown->iDelta = 1; - else - pNMUpDown->iDelta = -1; - m_radius = m_radius + pNMUpDown->iDelta; - UpdateData(FALSE); - *pResult = 0; -} - diff --git a/samples/mfc/standard/04_Viewer3d/src/BoxRadius.h b/samples/mfc/standard/04_Viewer3d/src/BoxRadius.h deleted file mode 100755 index 0679c506f6..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/BoxRadius.h +++ /dev/null @@ -1,49 +0,0 @@ -// BoxRadius.h : header file -// - -#if !defined(AFX_BOXRADIUS_H__AD263FF3_54F3_11D1_8C40_00AA00D10994__INCLUDED_) -#define AFX_BOXRADIUS_H__AD263FF3_54F3_11D1_8C40_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -///////////////////////////////////////////////////////////////////////////// -// BoxRadius dialog - -class BoxRadius : public CDialog -{ -// Construction -public: - BoxRadius(CWnd* pParent,double rad); // standard constructor - -// Dialog Data - //{{AFX_DATA(BoxRadius) - enum { IDD = IDD_RADIUS }; - CSpinButtonCtrl m_spinradius; - double m_radius; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(BoxRadius) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(BoxRadius) - afx_msg void OnDeltaposSpinRadius(NMHDR* pNMHDR, LRESULT* pResult); - virtual BOOL OnInitDialog(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_BOXRADIUS_H__AD263FF3_54F3_11D1_8C40_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/ConvertClickToPoint.cxx b/samples/mfc/standard/04_Viewer3d/src/ConvertClickToPoint.cxx deleted file mode 100755 index 7ffd51f904..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ConvertClickToPoint.cxx +++ /dev/null @@ -1,27 +0,0 @@ -#include - -gp_Pnt ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView) -{ - - Standard_Real XEye,YEye,ZEye,XAt,YAt,ZAt; - aView->Eye(XEye,YEye,ZEye); - aView->At(XAt,YAt,ZAt); - gp_Pnt EyePoint(XEye,YEye,ZEye); - gp_Pnt AtPoint(XAt,YAt,ZAt); - - gp_Vec EyeVector(EyePoint,AtPoint); - gp_Dir EyeDir(EyeVector); - - gp_Pln PlaneOfTheView = gp_Pln(AtPoint,EyeDir); - Standard_Real X,Y,Z; - aView->Convert((int)x,(int)y,X,Y,Z); - gp_Pnt ConvertedPoint(X,Y,Z); - gp_Pnt2d ConvertedPointOnPlane = ProjLib::Project(PlaneOfTheView,ConvertedPoint); - - gp_Pnt ResultPoint = ElSLib::Value(ConvertedPointOnPlane.X(), - ConvertedPointOnPlane.Y(), - PlaneOfTheView); - return ResultPoint; -} - - diff --git a/samples/mfc/standard/04_Viewer3d/src/DlgAttributes.cpp b/samples/mfc/standard/04_Viewer3d/src/DlgAttributes.cpp deleted file mode 100755 index 3c527fd5dd..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/DlgAttributes.cpp +++ /dev/null @@ -1,332 +0,0 @@ -// DlgAttributes.cpp : implementation file -// - -#include "stdafx.h" - -#include "DlgAttributes.h" - -#include "AISDisplayModeApp.h" - -#include -#include - -#include - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// DlgAttributes dialog - - -DlgAttributes::DlgAttributes(CWnd* pParent) - : CDialog(DlgAttributes::IDD, pParent) -{ - //{{AFX_DATA_INIT(DlgAttributes) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void DlgAttributes::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(DlgAttributes) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(DlgAttributes, CDialog) - //{{AFX_MSG_MAP(DlgAttributes) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_ALUMINIUM, OnObjectMaterialAluminium) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_BRASS, OnObjectMaterialBrass) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_BRONZE, OnObjectMaterialBronze) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_CHROME, OnObjectMaterialChrome) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_COPPER, OnObjectMaterialCopper) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_GOLD, OnObjectMaterialGold) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_JADE, OnObjectMaterialJade) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_METALIZED, OnObjectMaterialMetalized) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_NEON_GNC, OnObjectMaterialNeonGNC) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_NEON_PHC, OnObjectMaterialNeonPHC) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_OBSIDIAN, OnObjectMaterialObsidian) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_PEWTER, OnObjectMaterialPewter) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_PLASTER, OnObjectMaterialPlaster) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_PLASTIC, OnObjectMaterialPlastic) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_SATIN, OnObjectMaterialSatin) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_SHINY_PLASTIC, OnObjectMaterialShinyPlastic) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_SILVER, OnObjectMaterialSilver) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_STEEL, OnObjectMaterialSteel) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_STONE, OnObjectMaterialStone) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_DEFAULT, OnObjectMaterialDefault) - ON_BN_CLICKED(ID_OBJECT_COLOR, OnColor) - ON_BN_CLICKED(ID_OBJECT_SHADING, OnShading) - ON_BN_CLICKED(ID_OBJECT_WIREFRAME, OnWireframe) - ON_COMMAND(ID_OBJECT_TRANSPARENCY, OnTransparency) - ON_UPDATE_COMMAND_UI(ID_OBJECT_TRANSPARENCY, OnUpdateObjectTransparency) -//}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// DlgAttributes message handlers - - -void DlgAttributes::OnColor() -{ - Handle(AIS_InteractiveObject) Current ; - Quantity_Color CSFColor ; - COLORREF MSColor ; - - myAISContext->InitCurrent(); - if (myAISContext->MoreCurrent()) { - Current = myAISContext->Current() ; - if ( Current->HasColor () ) { - CSFColor = Current->Color () ; - MSColor = RGB (CSFColor.Red()*255., - CSFColor.Green()*255., - CSFColor.Blue()*255.); - } - else { - MSColor = RGB (255,255,255) ; - } - - CColorDialog dlgColor(MSColor); - if (dlgColor.DoModal() == IDOK) { - MSColor = dlgColor.GetColor(); - CSFColor = Quantity_Color (GetRValue(MSColor)/255., - GetGValue(MSColor)/255., - GetBValue(MSColor)/255.,Quantity_TOC_RGB); - for (myAISContext->InitCurrent(); - myAISContext->MoreCurrent (); - myAISContext->NextCurrent ()) - myAISContext->SetColor (myAISContext->Current(), - CSFColor.Name()); - } - } - -TCollection_AsciiString Message ("\ -\n\ -for (myAISContext->InitCurrent(); myAISContext->MoreCurrent (); \n\ - myAISContext->NextCurrent ()) \n\ - myAISContext->SetColor (myAISContext->Current(), CSFColor.Name()); \n\ -\n"); - - CString text(Message.ToCString()); - (*myCResultDialog).SetTitle(CString("Setting Color")); - (*myCResultDialog).SetText(text); -} - - -void DlgAttributes::OnWireframe() -{ - for(myAISContext->InitCurrent(); myAISContext->MoreCurrent(); - myAISContext->NextCurrent()) - myAISContext->SetDisplayMode(myAISContext->Current(), 0); - -TCollection_AsciiString Message ("\ -\n\ -for (myAISContext->InitCurrent(); myAISContext->MoreCurrent (); \n\ - myAISContext->NextCurrent ()) \n\ - myAISContext->SetDisplayMode(myAISContext->Current(), 0); \n\ -\n"); - - CString text(Message.ToCString()); - (*myCResultDialog).SetTitle(CString("Wireframe")); - (*myCResultDialog).SetText(text); -} - -void DlgAttributes::Set(Handle ( AIS_InteractiveContext ) & acontext, CResultDialog& aResultDialog) -{ - myAISContext = acontext; - myCResultDialog=&aResultDialog; -} - -void DlgAttributes::OnTransparency() -{ -/* - for (myAISContext->InitCurrent(); myAISContext->MoreCurrent (); - myAISContext->NextCurrent ()) { - - - int ival = (int) ((double) myAISContext->Current()->Transparency()*10.) ; - double rval = ((double) ival)/10.; - CDialogTransparency Dlg(NULL, rval); - if(Dlg.DoModal()== IDOK) - myAISContext->SetTransparency (myAISContext->Current(),Dlg.m_transvalue); - - } -*/ - /* - CDialogTransparency DialBox(myAISContext); - DialBox.DoModal(); - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - OCC_3dView *pView = (OCC_3dView *) pChild->GetActiveView(); - pView->Redraw(); - */ - myAISContext->InitCurrent(); - if(myAISContext->NbCurrents() > 0){ - CDialogTransparency DialBox(myAISContext, AfxGetMainWnd()); - DialBox.DoModal(); - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - OCC_3dView *pView = (OCC_3dView *) pChild->GetActiveView(); - pView->Redraw(); - } - -TCollection_AsciiString Message ("\ -\n\ -for (myAISContext->InitCurrent(); myAISContext->MoreCurrent (); \n\ - myAISContext->NextCurrent ()) \n\ - myAISContext->SetTransparency (myAISContext->Current(),Dlg.m_transvalue); \n\ -\n"); - - CString text(Message.ToCString()); - (*myCResultDialog).SetTitle(CString("Setting Transparency")); - (*myCResultDialog).SetText(text); -} - - - -void DlgAttributes::OnObjectMaterialAluminium () { SetMaterial ( Graphic3d_NOM_ALUMINIUM ) ; } -void DlgAttributes::OnObjectMaterialBrass () { SetMaterial ( Graphic3d_NOM_BRASS ) ; } -void DlgAttributes::OnObjectMaterialBronze () { SetMaterial ( Graphic3d_NOM_BRONZE ) ; } -void DlgAttributes::OnObjectMaterialChrome () { SetMaterial ( Graphic3d_NOM_CHROME ) ; } -void DlgAttributes::OnObjectMaterialCopper () { SetMaterial ( Graphic3d_NOM_COPPER ) ; } -void DlgAttributes::OnObjectMaterialGold () { SetMaterial ( Graphic3d_NOM_GOLD ) ; } -void DlgAttributes::OnObjectMaterialJade () { SetMaterial ( Graphic3d_NOM_JADE ) ; } -void DlgAttributes::OnObjectMaterialMetalized () { SetMaterial ( Graphic3d_NOM_METALIZED ) ; } -void DlgAttributes::OnObjectMaterialNeonGNC () { SetMaterial ( Graphic3d_NOM_NEON_GNC ) ; } -void DlgAttributes::OnObjectMaterialNeonPHC () { SetMaterial ( Graphic3d_NOM_NEON_PHC ) ; } -void DlgAttributes::OnObjectMaterialObsidian () { SetMaterial ( Graphic3d_NOM_OBSIDIAN ) ; } -void DlgAttributes::OnObjectMaterialPewter () { SetMaterial ( Graphic3d_NOM_PEWTER ) ; } -void DlgAttributes::OnObjectMaterialPlaster () { SetMaterial ( Graphic3d_NOM_PLASTER ) ; } -void DlgAttributes::OnObjectMaterialPlastic () { SetMaterial ( Graphic3d_NOM_PLASTIC ) ; } -void DlgAttributes::OnObjectMaterialSatin () { SetMaterial ( Graphic3d_NOM_SATIN ) ; } -void DlgAttributes::OnObjectMaterialShinyPlastic () { SetMaterial ( Graphic3d_NOM_SHINY_PLASTIC ) ; } -void DlgAttributes::OnObjectMaterialSilver () { SetMaterial ( Graphic3d_NOM_SILVER ) ; } -void DlgAttributes::OnObjectMaterialSteel () { SetMaterial ( Graphic3d_NOM_STEEL ) ; } -void DlgAttributes::OnObjectMaterialStone () { SetMaterial ( Graphic3d_NOM_STONE ) ; } -void DlgAttributes::OnObjectMaterialDefault () { SetMaterial ( Graphic3d_NOM_DEFAULT ) ; } - -void DlgAttributes::SetMaterial(Graphic3d_NameOfMaterial Material) -{ - for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ()) - myAISContext->SetMaterial (myAISContext->Current(), - (Graphic3d_NameOfMaterial)(Material)); - - TCollection_AsciiString aString; - TCollection_AsciiString Message1 ("\ -\n\ -for (myAISContext->InitCurrent(); myAISContext->MoreCurrent (); \n\ - myAISContext->NextCurrent ()) \n\ - myAISContext->SetMaterial (myAISContext->Current(), "); - - TCollection_AsciiString Message2("); \n\ -\n"); - switch (Material){ - case 0: - aString = "Graphic3d_NOM_BRASS"; - break; - case 1: - aString = "Graphic3d_NOM_BRONZE"; - break; - case 2: - aString = "Graphic3d_NOM_COPPER"; - break; - case 3: - aString = "Graphic3d_NOM_GOLD"; - break; - case 4: - aString = "Graphic3d_NOM_PEWTER"; - break; - case 5: - aString = "Graphic3d_NOM_PLASTER"; - break; - case 6: - aString = "Graphic3d_NOM_PLASTIC"; - break; - case 7: - aString = "Graphic3d_NOM_SILVER"; - break; - case 8: - aString = "Graphic3d_NOM_STEEL"; - break; - case 9: - aString = "Graphic3d_NOM_STONE"; - break; - case 10: - aString = "Graphic3d_NOM_SHINY_PLASTIC"; - break; - case 11: - aString = "Graphic3d_NOM_SATIN"; - break; - case 12: - aString = "Graphic3d_NOM_METALIZED"; - break; - case 13: - aString = "Graphic3d_NOM_NEON_GNC"; - break; - case 14: - aString = "Graphic3d_NOM_CHROME"; - break; - case 15: - aString = "Graphic3d_NOM_ALUMINIUM"; - break; - case 16: - aString = "Graphic3d_NOM_OBSIDIAN"; - break; - case 17: - aString = "Graphic3d_NOM_NEON_PHC"; - break; - case 18: - aString = "Graphic3d_NOM_JADE"; - break; - case 19: - aString = "Graphic3d_NOM_DEFAULT"; - break; - default: - break; - } - - Message1 = Message1 +aString +Message2; - //Graphic3d_MaterialAspect aAspect (Material); - //Standard_CString aString = aAspect.MaterialName(); - - CString text(Message1.ToCString()); - (*myCResultDialog).SetTitle(CString("Setting Material")); - (*myCResultDialog).SetText(text); - -} - -void DlgAttributes::OnUpdateObjectTransparency(CCmdUI* pCmdUI) -{ - bool OneOrMoreInShading = false; - for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ()) - if (myAISContext->IsDisplayed(myAISContext->Current(),1)) OneOrMoreInShading=true; - pCmdUI->Enable (OneOrMoreInShading); -} - - - -void DlgAttributes::OnShading() -{ - for(myAISContext->InitCurrent(); myAISContext->MoreCurrent(); - myAISContext->NextCurrent()) - myAISContext->SetDisplayMode(myAISContext->Current(), 1); - - -TCollection_AsciiString Message ("\ -\n\ -for (myAISContext->InitCurrent(); myAISContext->MoreCurrent (); \n\ - myAISContext->NextCurrent ()) \n\ - myAISContext->SetDisplayMode(myAISContext->Current(), 1); \n\ -\n"); - - CString text(Message.ToCString()); - (*myCResultDialog).SetTitle(CString("Shading")); - (*myCResultDialog).SetText(text); -} diff --git a/samples/mfc/standard/04_Viewer3d/src/DlgAttributes.h b/samples/mfc/standard/04_Viewer3d/src/DlgAttributes.h deleted file mode 100755 index 8d8669325c..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/DlgAttributes.h +++ /dev/null @@ -1,83 +0,0 @@ -// DlgAttributes.h : header file -// - -#if !defined(AFX_DLGATTRIBUTES_H__AF548353_9EF6_11D1_A47D_00C095ECDA78__INCLUDED_) -#define AFX_DLGATTRIBUTES_H__AF548353_9EF6_11D1_A47D_00C095ECDA78__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include -#include - -///////////////////////////////////////////////////////////////////////////// -// DlgAttributes dialog - -class DlgAttributes : public CDialog -{ -// Construction -public: - void Set(Handle(AIS_InteractiveContext)& acontext, CResultDialog& aResultDialog); - DlgAttributes(CWnd* pParent=NULL); - -// Dialog Data - //{{AFX_DATA(DlgAttributes) - enum { IDD = IDD_ATTRIBUTES }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(DlgAttributes) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(DlgAttributes) - afx_msg void OnColor(); - afx_msg void OnWireframe(); - afx_msg void OnTransparency() ; - afx_msg void OnShading(); - afx_msg void OnObjectMaterialAluminium(); - afx_msg void OnObjectMaterialBrass(); - afx_msg void OnObjectMaterialBronze(); - afx_msg void OnObjectMaterialChrome(); - afx_msg void OnObjectMaterialCopper(); - afx_msg void OnObjectMaterialGold(); - afx_msg void OnObjectMaterialJade(); - afx_msg void OnObjectMaterialMetalized(); - afx_msg void OnObjectMaterialNeonGNC(); - afx_msg void OnObjectMaterialNeonPHC(); - afx_msg void OnObjectMaterialObsidian(); - afx_msg void OnObjectMaterialPewter(); - afx_msg void OnObjectMaterialPlastic(); - afx_msg void OnObjectMaterialPlaster(); - afx_msg void OnObjectMaterialSatin(); - afx_msg void OnObjectMaterialShinyPlastic(); - afx_msg void OnObjectMaterialSilver(); - afx_msg void OnObjectMaterialSteel(); - afx_msg void OnObjectMaterialStone(); - afx_msg void OnObjectMaterialDefault(); - - afx_msg void OnUpdateObjectTransparency(CCmdUI* pCmdUI) ; - - - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - void SetMaterial (Graphic3d_NameOfMaterial Material); - -private: - Handle(AIS_InteractiveContext) myAISContext; - CResultDialog* myCResultDialog; -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_DLGATTRIBUTES_H__AF548353_9EF6_11D1_A47D_00C095ECDA78__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/DlgIsos.cpp b/samples/mfc/standard/04_Viewer3d/src/DlgIsos.cpp deleted file mode 100755 index 4de80476da..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/DlgIsos.cpp +++ /dev/null @@ -1,49 +0,0 @@ -// DlgIsos.cpp : implementation file -// - -#include "stdafx.h" - -#include "DlgIsos.h" - -#include "Viewer3dApp.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// DlgIsos dialog - - -DlgIsos::DlgIsos(CWnd* pParent, - int nisou, - int nisov) - : CDialog(DlgIsos::IDD, pParent) -{ - //{{AFX_DATA_INIT(DlgIsos) - m_isou = nisou; - m_isov = nisov; - //}}AFX_DATA_INIT -} - - -void DlgIsos::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(DlgIsos) - DDX_Text(pDX, IDC_EDIT_ISOU, m_isou); - DDX_Text(pDX, IDC_EDIT_ISOV, m_isov); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(DlgIsos, CDialog) - //{{AFX_MSG_MAP(DlgIsos) - // NOTE: the ClassWizard will add message map macros here - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// DlgIsos message handlers diff --git a/samples/mfc/standard/04_Viewer3d/src/DlgIsos.h b/samples/mfc/standard/04_Viewer3d/src/DlgIsos.h deleted file mode 100755 index 0853be19f1..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/DlgIsos.h +++ /dev/null @@ -1,52 +0,0 @@ -// DlgIsos.h : header file -// - -#include "stdafx.h" - -#if !defined(AFX_DLGISOS_H__AD159C33_9EDC_11D1_A47D_00C095ECDA78__INCLUDED_) -#define AFX_DLGISOS_H__AD159C33_9EDC_11D1_A47D_00C095ECDA78__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -///////////////////////////////////////////////////////////////////////////// -// DlgIsos dialog - -class DlgIsos : public CDialog -{ -// Construction -public: - DlgIsos(CWnd* pParent, - int nisou, - int nisov); // standard constructor - -// Dialog Data - //{{AFX_DATA(DlgIsos) - enum { IDD = IDD_ISOS }; - int m_isou; - int m_isov; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(DlgIsos) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(DlgIsos) - // NOTE: the ClassWizard will add member functions here - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_DLGISOS_H__AD159C33_9EDC_11D1_A47D_00C095ECDA78__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.cpp b/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.cpp deleted file mode 100755 index 6d6fb6de72..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// ISession_Curve.cpp: implementation of the ISession_Curve class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "ISession_Curve.h" -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[]=__FILE__; -#endif - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - - -ISession_Curve::ISession_Curve(const Handle(Geom_Curve)& aCurve) -:AIS_InteractiveObject(),myCurve(aCurve) -{ -} - -ISession_Curve::~ISession_Curve() -{ - -} -void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer /*aMode*/) -{ - GeomAdaptor_Curve anAdaptorCurve(myCurve); - if (hasOwnColor) - myDrawer->LineAspect()->SetColor (myDrawer->Color()); - myDrawer->Link()->SetDiscretisation(100); - myDrawer->Link()->SetMaximalParameterValue(500); - - StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer); -} - -void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, - const Standard_Integer /*aMode*/) -{ -} - - diff --git a/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.h b/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.h deleted file mode 100755 index c1c955fdf9..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.h +++ /dev/null @@ -1,32 +0,0 @@ -// ISession_Curve.h: interface for the ISession_Curve class. -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_) -#define AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -#include -#include -#include -#include -class ISession_Curve; -DEFINE_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject) - -class ISession_Curve : public AIS_InteractiveObject -{ -public: - ISession_Curve(const Handle(Geom_Curve)& aCurve); - virtual ~ISession_Curve(); -DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) -private: - -Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; -void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; - -Handle(Geom_Curve) myCurve; -}; - -#endif // !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.cpp b/samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.cpp deleted file mode 100755 index 2bf031f7da..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.cpp +++ /dev/null @@ -1,298 +0,0 @@ -// ModelClippingDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "Viewer3dApp.h" -#include "ModelClippingDlg.h" -#include "Viewer3dDoc.h" -#include "offsetdlg.h" // Added by ClassView - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -#define EOL "\n" - -// ======================================================================= -// function : CModelClippingDlg -// purpose : -// ======================================================================= -CModelClippingDlg::CModelClippingDlg (Handle(V3d_View) theView, - Handle(AIS_Shape) theShape, - Handle(Graphic3d_ClipPlane) theClippingPlane, - CViewer3dDoc* theDoc, - CWnd* theParent) -: CDialog(CModelClippingDlg::IDD, theParent), - m_ModelClipping_Z (0.0), - myModelClipping_Z (0.0), - m_ModelClippingONOFF (FALSE), - myView (theView), - myShape (theShape), - myClippingPlane (theClippingPlane), - myDoc (theDoc) -{} - -// ======================================================================= -// function : DoDataExchange -// purpose : -// ======================================================================= -void CModelClippingDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CModelClippingDlg) - DDX_Control(pDX, IDC_SLIDER_MODELCLIPPING_Z, m_ModelClippingZSlidCtrl); - DDX_Text(pDX, IDC_EDIT_MODELCLIPPING_Z, m_ModelClipping_Z); - DDX_Check(pDX, IDC_CHECK_MODELCLIPPINGONOFF, m_ModelClippingONOFF); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CModelClippingDlg, CDialog) - //{{AFX_MSG_MAP(CModelClippingDlg) - ON_WM_HSCROLL() - ON_EN_CHANGE(IDC_EDIT_MODELCLIPPING_Z, OnChangeEditModelclippingZ) - ON_BN_CLICKED(IDC_CHECK_MODELCLIPPINGONOFF, OnCheckModelclippingonoff) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -// ======================================================================= -// function : OnHScroll -// purpose : -// ======================================================================= -void CModelClippingDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) -{ - UpdateData(TRUE); - - m_ModelClipping_Z = m_ModelClippingZSlidCtrl.GetPos(); - - UpdateData(FALSE); - - // Setting the ZClipping depth at m_ZClippingDepth value - gp_Pln aPlane (gp_Pnt (-m_ModelClipping_Z, 0.0, 0.0), gp_Dir(1.0, 0.0, 0.0)); - - myClippingPlane->SetEquation (aPlane); - - gp_Trsf myTrsf; - myTrsf.SetTranslation (gp_Pnt (m_ModelClipping_Z, 0.0, 0.0), gp_Pnt(myModelClipping_Z, 0.0, 0.0)); - - // transform presentation shape - if (m_ModelClippingONOFF) - { - myDoc->GetAISContext()->SetLocation (myShape, TopLoc_Location (myTrsf)); - myDoc->GetAISContext()->Redisplay (myShape, Standard_True); - myView->Update(); - } - else - { - myShape->SetLocalTransformation (myTrsf); - } - - TCollection_AsciiString aMessage ( - EOL "gp_Pln aPlane (gp_Pnt (-m_ModelClipping_Z, 0.0, 0.0), gp_Dir(1.0, 0.0, 0.0));" - EOL - EOL "myClippingPlane->SetEquation (aPlane);\n" ); - - // Update The Result Message Dialog - myDoc->UpdateResultMessageDlg ("Change clipping plane", aMessage); - - CDialog::OnHScroll (nSBCode, nPos, pScrollBar); -} - -// ======================================================================= -// function : OnInitDialog -// purpose : -// ======================================================================= -BOOL CModelClippingDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - - const Graphic3d_ClipPlane::Equation aPlaneEquation = myClippingPlane->GetEquation(); - - // m_ModelClipping_Z = D (plane coefficient) - m_ModelClipping_Z = aPlaneEquation[3]; - m_ModelClippingZSlidCtrl.SetRange (-750, 750, TRUE); - m_ModelClippingZSlidCtrl.SetPos ((int)floor (m_ModelClipping_Z)); - - m_ModelClippingONOFF = myClippingPlane->IsOn(); - - if (m_ModelClippingONOFF) - { - // register and activate clipping plane - Standard_Boolean toAddPlane = Standard_True; - Handle(Graphic3d_SequenceOfHClipPlane) aPlanes = myView->ClipPlanes(); - if (!aPlanes.IsNull()) - { - for (Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (*aPlanes); aPlaneIt.More(); aPlaneIt.Next()) - { - if (aPlaneIt.Value() == myClippingPlane) - { - toAddPlane = Standard_False; - break; - } - } - } - - if (toAddPlane) - { - myView->AddClipPlane (myClippingPlane); - } - - myClippingPlane->SetOn (Standard_True); - - myDoc->GetAISContext()->Display (myShape, Standard_True); - } - - UpdateData (FALSE); - - return TRUE; -} - -// ======================================================================= -// function : OnChangeEditModelclippingZ -// purpose : -// ======================================================================= -void CModelClippingDlg::OnChangeEditModelclippingZ() -{ - UpdateData (TRUE); - - m_ModelClippingZSlidCtrl.SetPos ((int)floor (m_ModelClipping_Z)); - - // Change clipping plane - gp_Pln aPlane (gp_Pnt (-m_ModelClipping_Z, 0.0, 0.0), gp_Dir (1.0, 0.0, 0.0)); - - myClippingPlane->SetEquation (aPlane); - - // transform presentation shape - gp_Trsf myTrsf; - myTrsf.SetTranslation ( gp_Pnt (m_ModelClipping_Z, 0.0, 0.0), gp_Pnt (myModelClipping_Z, 0.0, 0.0)); - - // transform presentation shape - if (m_ModelClippingONOFF) - { - myDoc->GetAISContext()->SetLocation (myShape, TopLoc_Location (myTrsf)); - myDoc->GetAISContext()->Redisplay (myShape, Standard_False); - myView->Update(); - } - else - { - myShape->SetLocalTransformation (myTrsf); - } - - myModelClipping_Z = m_ModelClipping_Z; - - TCollection_AsciiString aMessage ( - EOL "gp_Pln aPlane (gp_Pnt (-m_ModelClipping_Z, 0.0, 0.0), gp_Dir(1.0, 0.0, 0.0));" - EOL - EOL "myClippingPlane->SetEquation (aPlane);\n" ); - - // Update The Result Message Dialog - myDoc->UpdateResultMessageDlg ("Change clipping plane", aMessage); -} - -// ======================================================================= -// function : OnCheckModelclippingonoff -// purpose : -// ======================================================================= -void CModelClippingDlg::OnCheckModelclippingonoff() -{ - UpdateData(TRUE); - - if (m_ModelClippingONOFF) - { - // register and activate clipping plane - Standard_Boolean toAddPlane = Standard_True; - Handle(Graphic3d_SequenceOfHClipPlane) aPlanes = myView->ClipPlanes(); - if (!aPlanes.IsNull()) - { - for (Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (*aPlanes); aPlaneIt.More(); aPlaneIt.Next()) - { - if (aPlaneIt.Value() == myClippingPlane) - { - toAddPlane = Standard_False; - break; - } - } - } - - if (toAddPlane) - { - myView->AddClipPlane (myClippingPlane); - } - - myClippingPlane->SetOn (Standard_True); - - myDoc->GetAISContext()->Display (myShape, Standard_False); - } - else - { - // deactivate clipping plane - myClippingPlane->SetOn (Standard_False); - - myDoc->GetAISContext()->Remove (myShape, Standard_False); - } - - myView->Update(); - - TCollection_AsciiString aMessage ( - EOL "if (...)" - EOL "{" - EOL " // register and activate clipping plane" - EOL " if (!myView->ClipPlanes()->Contains (myClippingPlane))" - EOL " {" - EOL " myView->AddClipPlane (myClippingPlane);" - EOL " }" - EOL - EOL " myClippingPlane->SetOn (Standard_True);" - EOL "}" - EOL "else" - EOL "{" - EOL " // deactivate clipping plane" - EOL " myClippingPlane->SetOn (Standard_False);" - EOL "}" ); - - myDoc->UpdateResultMessageDlg ("Switch clipping on/off", aMessage); -} - -// ======================================================================= -// function : OnCancel -// purpose : -// ======================================================================= -void CModelClippingDlg::OnCancel() -{ - UpdateData(TRUE); - - if (m_ModelClippingONOFF) - { - // remove and deactivate clipping plane - myView->RemoveClipPlane (myClippingPlane); - - myClippingPlane->SetOn (Standard_False); - } - - m_ModelClippingONOFF=FALSE; - - if (!myShape.IsNull()) - { - myDoc->GetAISContext()->Remove (myShape, Standard_False); - } - - myView->Update(); - - CDialog::OnCancel(); -} - -// ======================================================================= -// function : OnOK -// purpose : -// ======================================================================= -void CModelClippingDlg::OnOK() -{ - if (!myShape.IsNull()) - { - myDoc->GetAISContext()->Remove (myShape, Standard_True); - } - - CDialog::OnOK(); -} diff --git a/samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.h b/samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.h deleted file mode 100755 index dc8533c96f..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.h +++ /dev/null @@ -1,68 +0,0 @@ -#if !defined(AFX_MODELCLIPPINGDLG_H__E206D99D_646E_11D3_8D0A_00AA00D10994__INCLUDED_) -#define AFX_MODELCLIPPINGDLG_H__E206D99D_646E_11D3_8D0A_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// ModelClippingDlg.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CModelClippingDlg dialog -#include "Viewer3dDoc.h" - -#include - -class CModelClippingDlg : public CDialog -{ -public: - - //! Standard constructor. - CModelClippingDlg (Handle(V3d_View) theView, - Handle(AIS_Shape) theShape, - Handle(Graphic3d_ClipPlane) theClippingPlane, - CViewer3dDoc* theDoc, - CWnd* theParent = NULL); - -// Dialog Data - //{{AFX_DATA(CModelClippingDlg) - enum { IDD = IDD_MODELCLIPPING }; - CSliderCtrl m_ModelClippingZSlidCtrl; - double m_ModelClipping_Z; - BOOL m_ModelClippingONOFF; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CModelClippingDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CModelClippingDlg) - afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); - virtual BOOL OnInitDialog(); - afx_msg void OnChangeEditModelclippingZ(); - afx_msg void OnCheckModelclippingonoff(); - virtual void OnCancel(); - virtual void OnOK(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - Handle(V3d_View) myView; - Handle(AIS_Shape) myShape; - Handle(Graphic3d_ClipPlane) myClippingPlane; - CViewer3dDoc* myDoc; - double myModelClipping_Z; -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_MODELCLIPPINGDLG_H__E206D99D_646E_11D3_8D0A_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.cpp b/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.cpp deleted file mode 100755 index 10b73db8e9..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.cpp +++ /dev/null @@ -1,329 +0,0 @@ -// OCCDemo_Presentation.cpp: implementation of the OCCDemo_Presentation class. -// This is a base class for all presentations -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "OCCDemo_Presentation.h" -#include "Viewer3dView.h" -#include "ISession_Curve.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAX_PARAM 1000 // if a surface parameter is infinite, it is assigned -// this value in order to display the "infinit" object in the viewer. - - -Standard_Boolean OCCDemo_Presentation::WaitForInput (unsigned long aMilliSeconds) -{ - //::WaitForSingleObject(::CreateEvent (NULL, FALSE, FALSE, NULL), aMilliSeconds); - if (::MsgWaitForMultipleObjects(0, NULL, FALSE, aMilliSeconds, - QS_KEY | QS_MOUSEBUTTON) != WAIT_TIMEOUT) - { - MSG msg; - if (::PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) - { - if (msg.message == WM_KEYUP) - { - ::PeekMessage (&msg, NULL, 0, 0, PM_REMOVE); - return WaitForInput (aMilliSeconds); - } - else - return Standard_True; - } - } - return Standard_False; -} - -//================================================================ -// Function : fixParam -// Purpose : assigns a finite value to theParam if it's infinite -// (equal to +- Precision::Infinite()) -//================================================================ -static Standard_Boolean fixParam(Standard_Real& theParam) -{ - Standard_Boolean aResult = Standard_False; - if (Precision::IsNegativeInfinite(theParam)) - { - theParam = -MAX_PARAM; - aResult = Standard_True; - } - if (Precision::IsPositiveInfinite(theParam)) - { - theParam = MAX_PARAM; - aResult = Standard_True; - } - return aResult; -} - -//================================================================ -// Function : DrawSurface -// Purpose : displays a given geometric surface in 3d viewer -// (creates a finite face and displays it) -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface - (const Handle(Geom_Surface)& theSurface, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Standard_Real u1, u2, v1, v2; - theSurface->Bounds(u1,u2,v1,v2); - fixParam(u1); - fixParam(u2); - fixParam(v1); - fixParam(v2); - - Handle(AIS_Shape) aGraphicSurface = - new AIS_Shape(BRepBuilderAPI_MakeFace (theSurface, u1, u2, v1, v2, Precision::Confusion())); - - getAISContext()->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay); - getAISContext()->SetColor(aGraphicSurface, theColor, toDisplay); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicSurface, Standard_False); - CViewer3dDoc::Fit(); - } - else - getAISContext()->Display (aGraphicSurface, Standard_True); - } - - return aGraphicSurface; -} - -//================================================================ -// Function : DrawCurve -// Purpose : displays a given curve 3d -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve - (const Handle(Geom_Curve)& theCurve, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(ISession_Curve) aGraphicCurve = new ISession_Curve (theCurve); - - getAISContext()->SetColor (aGraphicCurve, theColor, toDisplay); - aGraphicCurve->Attributes()->Link()->SetLineArrowDraw(Standard_False); - if (toDisplay){ - if (FitMode){ - getAISContext()->Display (aGraphicCurve, Standard_False); - CViewer3dDoc::Fit(); - } - else - getAISContext()->Display (aGraphicCurve, Standard_True); - } - - return aGraphicCurve; -} - -//================================================================ -// Function : DrawCurve -// Purpose : displays a given curve 2d -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve - (const Handle(Geom2d_Curve)& theCurve, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay, - const gp_Ax2& aPosition) -{ - // create 3D curve in plane - Handle(Geom_Curve) aCurve3d; - if (theCurve->IsKind(STANDARD_TYPE(Geom2d_OffsetCurve))) - { - Handle(Geom2d_OffsetCurve) aOffCurve = - Handle(Geom2d_OffsetCurve)::DownCast(theCurve); - Handle(Geom_Curve) aBasCurve3d = - GeomAPI::To3d (aOffCurve->BasisCurve(), gp_Pln(aPosition)); - Standard_Real aDist = aOffCurve->Offset(); - aCurve3d = new Geom_OffsetCurve (aBasCurve3d, aDist, aPosition.Direction()); - } - else - { - aCurve3d = GeomAPI::To3d (theCurve, gp_Pln(aPosition)); - } - return drawCurve (aCurve3d, theColor, toDisplay); -} - -//================================================================ -// Function : drawPoint -// Purpose : displays a given point -//================================================================ -Handle(AIS_Point) OCCDemo_Presentation::drawPoint - (const gp_Pnt& aPnt, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Point) aGraphicPoint = new AIS_Point (new Geom_CartesianPoint(aPnt)); - - getAISContext()->SetColor (aGraphicPoint, theColor, toDisplay); - if (toDisplay) { - getAISContext()->Display (aGraphicPoint, Standard_True); - //COCCDemoDoc::Fit(); - } - - return aGraphicPoint; -} - -//================================================================ -// Function : drawVector -// Purpose : displays a given vector in 3d viewer -// (segment of line starting at thePnt with the arrow at the end, -// the length of segment is the length of the vector) -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector - (const gp_Pnt& thePnt, - const gp_Vec& theVec, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Standard_Real aLength = theVec.Magnitude(); - if (aLength < Precision::Confusion()) - return Handle(AIS_InteractiveObject)(); - - Handle(Geom_Curve) aCurve = new Geom_Line (thePnt, theVec); - aCurve = new Geom_TrimmedCurve (aCurve, 0, aLength); - - Handle(ISession_Curve) aGraphicCurve = new ISession_Curve (aCurve); - - getAISContext()->SetColor (aGraphicCurve, theColor, toDisplay); - Handle(Prs3d_Drawer) aDrawer = aGraphicCurve->Attributes()->Link(); - aDrawer->SetLineArrowDraw(Standard_True); - aDrawer->ArrowAspect()->SetLength(aLength/10); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicCurve, Standard_False); - CViewer3dDoc::Fit(); - } - else - getAISContext()->Display (aGraphicCurve, Standard_True); - } - - return aGraphicCurve; -} - - -Handle(AIS_Shape) OCCDemo_Presentation::drawShape - (const TopoDS_Shape& theShape,const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape); - - getAISContext()->SetMaterial(aGraphicShape, Graphic3d_NOM_PLASTIC, toDisplay); - getAISContext()->SetColor (aGraphicShape, theColor, toDisplay); - if (toDisplay){ - if (FitMode){ - getAISContext()->Display (aGraphicShape, Standard_False); - CViewer3dDoc::Fit(); - } - else - getAISContext()->Display (aGraphicShape, Standard_True); - } - - return aGraphicShape; -} - -Handle(AIS_Shape) OCCDemo_Presentation::drawShape - (const TopoDS_Shape& theShape, - const Graphic3d_NameOfMaterial theMaterial, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape); - - getAISContext()->SetMaterial(aGraphicShape, theMaterial, toDisplay); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicShape, Standard_False); - CViewer3dDoc::Fit(); - } - else - getAISContext()->Display (aGraphicShape, Standard_True); - } - - return aGraphicShape; -} - -void OCCDemo_Presentation::GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->GetViewAt (theX, theY, theZ); -} - -void OCCDemo_Presentation::SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->SetViewAt (theX, theY, theZ); -} - -void OCCDemo_Presentation::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->GetViewEye(X,Y,Z); -} - -void OCCDemo_Presentation::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->SetViewEye(X,Y,Z); -} - -Standard_Real OCCDemo_Presentation::GetViewScale() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - return pView->GetViewScale(); -} - -void OCCDemo_Presentation::SetViewScale(Standard_Real Coef) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->SetViewScale(Coef); -} - -void OCCDemo_Presentation::ResetView() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->Reset(); -} - -Handle(AIS_InteractiveContext) OCCDemo_Presentation::getAISContext() const -{ - return myDoc->GetAISContext(); -} - -Handle(V3d_Viewer) OCCDemo_Presentation::getViewer() const -{ - return myDoc->GetViewer(); -} - -Standard_CString OCCDemo_Presentation::GetDataDir() -{ - return myDoc->GetDataDir(); -} \ No newline at end of file diff --git a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h b/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h deleted file mode 100755 index 1fa66aa451..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h +++ /dev/null @@ -1,135 +0,0 @@ -// OCCDemo_Presentation.h: interface for the OCCDemo_Presentation class. -// This is a base class for all presentations -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "Viewer3dDoc.h" - -#define WAIT_A_LITTLE WaitForInput(500) -#define WAIT_A_SECOND WaitForInput(1000) - -class CViewer3dDoc; -#include -#include -#include -#include -#include -class Quantity_Color; - -class OCCDemo_Presentation -{ -public: - // Construction - OCCDemo_Presentation() : myIndex(0), myNbSamples(0), FitMode(false){} - virtual ~OCCDemo_Presentation() {} - -public: - static OCCDemo_Presentation* Current; - // this pointer must be initialized when realize a derivable class; - // it is used by application to access to a presentation class instance - - void SetDocument (CViewer3dDoc* theDoc) {myDoc = theDoc;} - // document must be set by the user of this class before first use of iterations - -public: - // Titling - const CString& GetName() const {return myName;} - -public: - // Iteration on samples - void FirstSample() {myIndex=0;} - void LastSample() {myIndex=myNbSamples-1;} - Standard_Boolean AtFirstSample() const {return myIndex <= 0;} - Standard_Boolean AtLastSample() const {return myIndex >= myNbSamples-1;} - void NextSample() {myIndex++;} - void PrevSample() {myIndex--;} - virtual void DoSample() = 0; - static void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ); - static void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ); - static void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z); - static void SetViewEye (Standard_Real X, Standard_Real Y, Standard_Real Z); - static Standard_Real GetViewScale(); - static void SetViewScale(Standard_Real Coef); - static void ResetView(); - CViewer3dDoc* getDocument() { return myDoc; } - - - // place one-time initialization code in this function - virtual void Init() {} - -protected: - // Methods to call from a derivable class - void setName (const char* theName) {myName = CString(theName);} - Handle(AIS_InteractiveContext) getAISContext() const; - Handle(V3d_Viewer) getViewer() const; -// void setResultTitle (const char* theTitle) {myDoc->GetResultDialog()->SetTitle(theTitle);} -// void setResultText (const char* theText) {myDoc->GetResultDialog()->SetText(theText);} - Standard_CString GetDataDir(); - - Standard_Boolean WaitForInput (unsigned long aMilliSeconds); - // Waits for a user input or a period of time has been elapsed - - Handle(AIS_InteractiveObject) drawSurface (const Handle(Geom_Surface)& theSurface, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_LEMONCHIFFON3), - const Standard_Boolean toDisplay = Standard_True); - // creates a finite face based on the given geometric surface - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom_Curve)& theCurve, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED), - const Standard_Boolean toDisplay = Standard_True); - // creates an ISession_Curve based on the given geometric curve - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom2d_Curve)& theCurve, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED), - const Standard_Boolean toDisplay = Standard_True, - const gp_Ax2& aPosition = gp::XOY()); - // converts a given curve to 3d using aPosition and calls the previous method - - Handle(AIS_Point) drawPoint (const gp_Pnt& thePnt, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_GREEN), - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given point - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawVector (const gp_Pnt& thePnt, - const gp_Vec& theVec, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_YELLOW), - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given vector - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given shape - // with material PLASTIC and a given color - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape, - const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NameOfMaterial_Brass, - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given shape with the given material - // (color is default for a given material) - // and displays it in the viewer if toDisplay = Standard_True - -protected: - // Fields to use in a derivable class - BOOL FitMode; - int myIndex; - int myNbSamples; - -private: - CViewer3dDoc* myDoc; - CString myName; - -}; - -#endif // !defined(AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.cpp b/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.cpp deleted file mode 100755 index 9084dd3af6..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.cpp +++ /dev/null @@ -1,314 +0,0 @@ -// OffsetDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "..\res\resource.h" -#include "offsetdlg.h" -#include "Viewer3dView.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -#define FactorMinValue 0 -#define FactorMaxValue 20 - -#define UnitsMinValue 0 -#define UnitsMaxValue 20 - - -///////////////////////////////////////////////////////////////////////////// -// COffsetDlg dialog - - -COffsetDlg::COffsetDlg(CViewer3dDoc* theDoc, CWnd* pParent /*=NULL*/) - : CDialog(COffsetDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(COffsetDlg) - m_Factor = 1.; - m_Units = 0.; - //}}AFX_DATA_INIT - myDoc = theDoc; -} - - -void COffsetDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(COffsetDlg) - DDX_Control(pDX, IDC_SLIDER_OFFSETUNITS, m_UnitsSlidCtrl); - DDX_Control(pDX, IDC_SLIDER_OFFSETFACTOR, m_FactorSlidCtrl); - DDX_Text(pDX, IDC_EDIT_OFFSETFACTOR, m_Factor); - DDV_MinMaxDouble(pDX, m_Factor, FactorMinValue, FactorMaxValue); - DDX_Text(pDX, IDC_EDIT_OFFSETUNITS, m_Units); - DDV_MinMaxDouble(pDX, m_Units, UnitsMinValue, UnitsMaxValue); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(COffsetDlg, CDialog) - //{{AFX_MSG_MAP(COffsetDlg) - ON_WM_HSCROLL() - ON_EN_CHANGE(IDC_EDIT_OFFSETFACTOR, OnChangeEditOffsetFactor) - ON_EN_CHANGE(IDC_EDIT_OFFSETUNITS, OnChangeEditOffsetUnits) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// COffsetDlg message handlers - -BOOL COffsetDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - -// Initializing the ComboBox - SetOffsets(m_Factor,m_Units); - -// Setting the m_FactorSlidCtrl position at floor(m_Factor) value (because slider position is an integer) - m_FactorSlidCtrl.SetRange(FactorMinValue, FactorMaxValue, TRUE); - m_FactorSlidCtrl.SetPos( (int) floor(m_Factor)); - -// Setting the m_UnitsSlidCtrl position at floor(m_Units) value (because slider position is an integer) - m_UnitsSlidCtrl.SetRange(UnitsMinValue, UnitsMaxValue, TRUE); - m_UnitsSlidCtrl.SetPos( (int) floor(m_Units)); - - UpdateData(FALSE); - - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void COffsetDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) -{ - -// Setting the m_Factor value at m_FactorSlidCtrl position - m_Factor = m_FactorSlidCtrl.GetPos(); -// Setting the m_Units value at m_UnitsSlidCtrl position - m_Units = m_UnitsSlidCtrl.GetPos(); - - UpdateData(FALSE); - - - SetOffsets(m_Factor,m_Units); - - CDialog::OnHScroll(nSBCode, nPos, pScrollBar); -} - -void COffsetDlg::OnChangeEditOffsetFactor() -{ - UpdateData(); - - m_FactorSlidCtrl.SetPos(int(m_Units)); - - SetOffsets(m_Factor,m_Units); -} - -void COffsetDlg::OnChangeEditOffsetUnits() -{ - UpdateData(); - - m_UnitsSlidCtrl.SetPos(int(m_Units)); - - SetOffsets(m_Factor,m_Units); -} - -void COffsetDlg::SetOffsets(Standard_Real theFactor, Standard_Real theUnits) -{ - Handle(AIS_InteractiveContext) aAISContext = myDoc->GetAISContext(); - - Handle(AIS_Shape) aOverlappedBox = myDoc->GetOverlappedBox(); - Handle(AIS_Shape) aOverlappedCylinder = myDoc->GetOverlappedCylinder(); - Handle(AIS_Shape) aOverlappedSphere = myDoc->GetOverlappedSphere(); - Handle(AIS_Shape) aBox = myDoc->GetBox(); - Handle(User_Cylinder) aCylinder = myDoc->GetCylinder(); - Handle(AIS_Shape) aSphere = myDoc->GetSphere(); - - - myDoc->SetDialogTitle("Set offsets"); - - TCollection_AsciiString Message; - - Standard_Boolean OneOrMoreCurrentIsDisplayed=false; - Standard_ShortReal aFactor = (Standard_ShortReal)theFactor; - Standard_ShortReal aUnits = (Standard_ShortReal)theUnits; - - for (aAISContext->InitSelected(); aAISContext->MoreSelected(); aAISContext->NextSelected()) - if (aAISContext->IsDisplayed(aAISContext->SelectedInteractive())) OneOrMoreCurrentIsDisplayed=true; - - if(OneOrMoreCurrentIsDisplayed){ - // A small trick to avoid compiler error (C2668). - const Handle(AIS_InteractiveObject)& anIOOverlappedBox = aOverlappedBox; - const Handle(AIS_InteractiveObject)& anIOBox = aBox; - if((aAISContext->IsSelected(anIOOverlappedBox) || aAISContext->IsSelected(anIOBox)) - && aAISContext->IsDisplayed(aOverlappedBox)){ - aOverlappedBox->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits); - Message = "Box2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n"; - //myDoc -> AddTextInDialog(Message); - } - - // A small trick to avoid compiler error (C2668). - const Handle(AIS_InteractiveObject)& anIOOverlappedCylinder = aOverlappedCylinder; - const Handle(AIS_InteractiveObject)& anIOCylinder = aCylinder; - if((aAISContext->IsSelected(anIOOverlappedCylinder) || aAISContext->IsSelected(anIOCylinder)) - && aAISContext->IsDisplayed(aOverlappedCylinder)){ - aOverlappedCylinder->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits); - Message = Message + "Cylinder2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n"; - //myDoc -> AddTextInDialog(Message); - } - - // A small trick to avoid compiler error (C2668). - const Handle(AIS_InteractiveObject)& anIOOverlappedSphere = aOverlappedSphere; - const Handle(AIS_InteractiveObject)& anIOSphere = aSphere; - if((aAISContext->IsSelected(anIOOverlappedSphere) || aAISContext->IsSelected(anIOSphere)) - && aAISContext->IsDisplayed(aOverlappedSphere)){ - aOverlappedSphere->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits); - Message = Message + "Sphere2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n"; - //myDoc -> AddTextInDialog(Message); - } - } - else{ - if(aAISContext->IsDisplayed(aOverlappedBox)){ - aOverlappedBox->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits); - Message = Message + "Box2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n"; - //myDoc -> AddTextInDialog(Message); - } - - if(aAISContext->IsDisplayed(aOverlappedCylinder)){ - aOverlappedCylinder->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits); - Message = Message + "Cylinder2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n"; - //myDoc -> AddTextInDialog(Message); - } - - if(aAISContext->IsDisplayed(aOverlappedSphere)){ - aOverlappedSphere->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits); - Message = Message + "Sphere2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n"; - //myDoc -> AddTextInDialog(Message); - } - } - - CString aTextInDialog = myDoc -> GetDialogText(); - if (aTextInDialog != Message.ToCString()) - myDoc -> UpdateResultMessageDlg("Set offsets", Message); - aAISContext->UpdateCurrentViewer(); -} - -void COffsetDlg::UpdateValues() -{ - Standard_Integer aOffsetMode; - Standard_ShortReal aBoxFactor = 0; - Standard_ShortReal aCylFactor = 0; - Standard_ShortReal aSphereFactor = 0; - Standard_ShortReal aCylUnits = 0; - Standard_ShortReal aSphereUnits = 0; - Standard_ShortReal aBoxUnits = 0; - - Handle(AIS_InteractiveContext) aAISContext = myDoc->GetAISContext(); - - Handle(AIS_Shape) aOverlappedBox = myDoc->GetOverlappedBox(); - Handle(AIS_Shape) aOverlappedCylinder = myDoc->GetOverlappedCylinder(); - Handle(AIS_Shape) aOverlappedSphere = myDoc->GetOverlappedSphere(); - Handle(AIS_Shape) aBox = myDoc->GetBox(); - Handle(User_Cylinder) aCylinder = myDoc->GetCylinder(); - Handle(AIS_Shape) aSphere = myDoc->GetSphere(); - - BOOL IsOverlappedCylinderDisplayed = aAISContext->IsDisplayed(aOverlappedCylinder); - BOOL IsOverlappedSphereDisplayed = aAISContext->IsDisplayed(aOverlappedSphere); - BOOL IsOverlappedBoxDisplayed = aAISContext->IsDisplayed(aOverlappedBox); - - const Handle(AIS_InteractiveObject)& anIOOverlappedCylinder = aOverlappedCylinder; - const Handle(AIS_InteractiveObject)& anIOOverlappedSphere = aOverlappedSphere; - const Handle(AIS_InteractiveObject)& anIOOverlappedBox = aOverlappedBox; - BOOL IsOverlappedCylinderCurrent = aAISContext->IsSelected(anIOOverlappedCylinder); - BOOL IsOverlappedSphereCurrent = aAISContext->IsSelected(anIOOverlappedSphere); - BOOL IsOverlappedBoxCurrent = aAISContext->IsSelected(anIOOverlappedBox); - - - /*BOOL IsAnyOverlappedObjectCurrent = - IsOverlappedCylinderCurrent || IsOverlappedSphereCurrent || IsOverlappedBoxCurrent;*/ - - const Handle(AIS_InteractiveObject)& anIOCylinder = aCylinder; - const Handle(AIS_InteractiveObject)& anIOSphere = aSphere; - const Handle(AIS_InteractiveObject)& anIOBox = aBox; - BOOL IsCylinderCurrent = aAISContext->IsSelected(anIOCylinder); - BOOL IsSphereCurrent = aAISContext->IsSelected(anIOSphere); - BOOL IsBoxCurrent = aAISContext->IsSelected(anIOBox); - - BOOL IsAnyObjectCurrent = - IsOverlappedCylinderCurrent || IsOverlappedSphereCurrent || IsOverlappedBoxCurrent - || IsCylinderCurrent || IsSphereCurrent || IsBoxCurrent; - - BOOL IsAnyOverlappedObjectDisplayed = - IsOverlappedCylinderDisplayed || IsOverlappedSphereDisplayed || IsOverlappedBoxDisplayed; - - Standard_Boolean OneOrMoreCurrentIsDisplayed=false; - for (aAISContext->InitSelected();aAISContext->MoreSelected ();aAISContext->NextSelected ()) - if (aAISContext->IsDisplayed(aAISContext->SelectedInteractive())) OneOrMoreCurrentIsDisplayed=true; - - if(OneOrMoreCurrentIsDisplayed){ - if(IsOverlappedBoxDisplayed && (IsBoxCurrent || IsOverlappedBoxCurrent)){ - aOverlappedBox->PolygonOffsets(aOffsetMode,aBoxFactor,aBoxUnits); - } - - if(IsOverlappedCylinderDisplayed && (IsCylinderCurrent || IsOverlappedCylinderCurrent)){ - aOverlappedCylinder->PolygonOffsets(aOffsetMode,aCylFactor,aCylUnits); - } - - if(IsOverlappedSphereDisplayed && (IsSphereCurrent || IsOverlappedSphereCurrent)){ - aOverlappedSphere->PolygonOffsets(aOffsetMode,aSphereFactor,aSphereUnits); - } - - } - else{ - if(IsOverlappedBoxDisplayed){ - aOverlappedBox->PolygonOffsets(aOffsetMode,aBoxFactor,aBoxUnits); - } - - if(IsOverlappedCylinderDisplayed){ - aOverlappedCylinder->PolygonOffsets(aOffsetMode,aCylFactor,aCylUnits); - } - - if(IsOverlappedSphereDisplayed){ - aOverlappedSphere->PolygonOffsets(aOffsetMode,aSphereFactor,aSphereUnits); - } - } - - Standard_Real Max = aBoxFactor; - if (Max < aCylFactor) Max = aCylFactor; - if (Max < aSphereFactor) Max = aSphereFactor; - - m_Factor = Max; - - Max = aBoxUnits; - if (Max < aCylUnits) Max = aCylUnits; - if (Max < aSphereUnits) Max = aSphereUnits; - - m_Units = Max; - - m_FactorSlidCtrl.SetPos( (int) floor(m_Factor)); - - - m_UnitsSlidCtrl.SetPos( (int) floor(m_Units)); - UpdateData(FALSE); - - if( (IsOverlappedBoxCurrent || (IsBoxCurrent && IsOverlappedBoxDisplayed)) || - (IsOverlappedCylinderCurrent || (IsCylinderCurrent && IsOverlappedCylinderDisplayed)) || - (IsOverlappedSphereCurrent || (IsSphereCurrent && IsOverlappedSphereDisplayed)) || - (!IsAnyObjectCurrent && IsAnyOverlappedObjectDisplayed) - ) - { - m_FactorSlidCtrl.EnableWindow(); - m_UnitsSlidCtrl.EnableWindow(); - GetDlgItem(IDC_EDIT_OFFSETFACTOR)->EnableWindow(); - GetDlgItem(IDC_EDIT_OFFSETUNITS)->EnableWindow(); - } - else{ - m_FactorSlidCtrl.EnableWindow(false); - m_UnitsSlidCtrl.EnableWindow(false); - GetDlgItem(IDC_EDIT_OFFSETFACTOR)->EnableWindow(false); - GetDlgItem(IDC_EDIT_OFFSETUNITS)->EnableWindow(false); - } - -} diff --git a/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.h b/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.h deleted file mode 100755 index f97cd1da47..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.h +++ /dev/null @@ -1,60 +0,0 @@ -#if !defined(AFX_OFFSETDLG_H__9E963234_B2CB_11D8_8CF3_00047571ABCA__INCLUDED_) -#define AFX_OFFSETDLG_H__9E963234_B2CB_11D8_8CF3_00047571ABCA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// offsetdlg.h : header file -// - -#include "Viewer3dDoc.h" - -class CViewer3dDoc; -///////////////////////////////////////////////////////////////////////////// -// COffsetDlg dialog - -class COffsetDlg : public CDialog -{ -// Construction -public: - void UpdateValues(); - void SetOffsets(Standard_Real theFactor, Standard_Real theUnits); - COffsetDlg( CViewer3dDoc* theDoc, CWnd* pParent = NULL); - -// Dialog Data - //{{AFX_DATA(COffsetDlg) - enum { IDD = IDD_SETOFFSETS }; - CSliderCtrl m_UnitsSlidCtrl; - CSliderCtrl m_FactorSlidCtrl; - Standard_Real m_Factor; - Standard_Real m_Units; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COffsetDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(COffsetDlg) - virtual BOOL OnInitDialog(); - afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); - afx_msg void OnChangeEditOffsetFactor(); - afx_msg void OnChangeEditOffsetUnits(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - - CViewer3dDoc* myDoc; - -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_OFFSETDLG_H__9E963234_B2CB_11D8_8CF3_00047571ABCA__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/ScaleDlg.cpp b/samples/mfc/standard/04_Viewer3d/src/ScaleDlg.cpp deleted file mode 100755 index 65d39f2c14..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ScaleDlg.cpp +++ /dev/null @@ -1,188 +0,0 @@ -// ScaleDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "ScaleDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// ScaleDlg dialog - - -ScaleDlg::ScaleDlg(Handle(V3d_View) Current_V3d_View, CViewer3dView* pView, CWnd* pParent /*=NULL*/) - : CDialog(ScaleDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(ScaleDlg) - myCurrent_V3d_View = Current_V3d_View; - myView=pView; - m_ScaleX = 0; - m_ScaleY = 0; - m_ScaleZ = 0; - //}}AFX_DATA_INIT -} - - -void ScaleDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(ScaleDlg) - DDX_Control(pDX, IDC_SLIDER_SCALEX, m_ScaleXSlidCtrl); - DDX_Control(pDX, IDC_SLIDER_SCALEY, m_ScaleYSlidCtrl); - DDX_Control(pDX, IDC_SLIDER_SCALEZ, m_ScaleZSlidCtrl); - DDX_Text(pDX, IDC_EDIT_SCALEX, m_ScaleX); - DDV_MinMaxInt(pDX, m_ScaleX, 1, 100); - DDX_Text(pDX, IDC_EDIT_SCALEY, m_ScaleY); - DDV_MinMaxInt(pDX, m_ScaleY, 1, 100); - DDX_Text(pDX, IDC_EDIT_SCALEZ, m_ScaleZ); - DDV_MinMaxInt(pDX, m_ScaleZ, 1, 100); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(ScaleDlg, CDialog) - //{{AFX_MSG_MAP(ScaleDlg) - ON_EN_CHANGE(IDC_EDIT_SCALEX, OnChangeEditScaleX) - ON_EN_CHANGE(IDC_EDIT_SCALEY, OnChangeEditScaleY) - ON_EN_CHANGE(IDC_EDIT_SCALEZ, OnChangeEditScaleZ) - ON_WM_HSCROLL() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// ScaleDlg message handlers -BOOL ScaleDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - - int ScaleX = myView->scaleX; - int ScaleY = myView->scaleY; - int ScaleZ = myView->scaleZ; - - m_ScaleX=ScaleX; - m_ScaleXSlidCtrl.SetRange(0, 100, TRUE); - m_ScaleXSlidCtrl.SetPos( ScaleX ); - - m_ScaleY=ScaleY; - m_ScaleYSlidCtrl.SetRange(0, 100, TRUE); - m_ScaleYSlidCtrl.SetPos( ScaleY ); - - m_ScaleZ=ScaleZ; - m_ScaleZSlidCtrl.SetRange(0, 100, TRUE); - m_ScaleZSlidCtrl.SetPos( ScaleZ ); - - UpdateData(FALSE); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void ScaleDlg::OnChangeEditScaleX() -{ - UpdateData(TRUE); - - m_ScaleXSlidCtrl.SetPos( m_ScaleX ); - myView->scaleX = m_ScaleX; - - myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ ); - myCurrent_V3d_View->Update(); - - TCollection_AsciiString Message("\ -myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ);\n\ -\n\ -myCurrent_V3d_View->Update();\n\ - "); - - // Update The Result Message Dialog - myView->GetDocument()->UpdateResultMessageDlg("SetAxialScale",Message); -} - -void ScaleDlg::OnChangeEditScaleY() -{ - UpdateData(TRUE); - - m_ScaleYSlidCtrl.SetPos( m_ScaleY ); - myView->scaleY = m_ScaleY; - - myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ ); - myCurrent_V3d_View->Update(); - - TCollection_AsciiString Message("\ -myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ);\n\ -\n\ -myCurrent_V3d_View->Update();\n\ - "); - - // Update The Result Message Dialog - myView->GetDocument()->UpdateResultMessageDlg("SetAxialScale",Message); -} - -void ScaleDlg::OnChangeEditScaleZ() -{ - UpdateData(TRUE); - - m_ScaleZSlidCtrl.SetPos( m_ScaleZ ); - myView->scaleZ = m_ScaleZ; - - myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ ); - myCurrent_V3d_View->Update(); - - TCollection_AsciiString Message("\ -myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ);\n\ -\n\ -myCurrent_V3d_View->Update();\n\ - "); - - // Update The Result Message Dialog - myView->GetDocument()->UpdateResultMessageDlg("SetAxialScale",Message); -} - -void ScaleDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) -{ - m_ScaleX = m_ScaleXSlidCtrl.GetPos(); - m_ScaleY = m_ScaleYSlidCtrl.GetPos(); - m_ScaleZ = m_ScaleZSlidCtrl.GetPos(); - - if(m_ScaleX<=0) - { - m_ScaleX=1; - m_ScaleXSlidCtrl.SetPos( 1 ); - } - - if(m_ScaleY<=0) - { - m_ScaleY=1; - m_ScaleYSlidCtrl.SetPos( 1 ); - } - - if(m_ScaleZ<=0) - { - m_ScaleZ=1; - m_ScaleZSlidCtrl.SetPos( 1 ); - } - - UpdateData(FALSE); - - myView->scaleX = m_ScaleX; - myView->scaleY = m_ScaleY; - myView->scaleZ = m_ScaleZ; - - myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ ); - myCurrent_V3d_View->Update(); - - TCollection_AsciiString Message("\ -myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ);\n\ -\n\ -myCurrent_V3d_View->Update();\n\ - "); - - // Update The Result Message Dialog - myView->GetDocument()->UpdateResultMessageDlg("SetAxialScale",Message); - - CDialog::OnHScroll(nSBCode, nPos, pScrollBar); -} - diff --git a/samples/mfc/standard/04_Viewer3d/src/ScaleDlg.h b/samples/mfc/standard/04_Viewer3d/src/ScaleDlg.h deleted file mode 100755 index 2353a9ff92..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ScaleDlg.h +++ /dev/null @@ -1,63 +0,0 @@ -#if !defined(AFX_ScaleDlg_H__1796AA04_63B7_4E46_B00A_D2DAC975CAF1__INCLUDED_) -#define AFX_ScaleDlg_H__1796AA04_63B7_4E46_B00A_D2DAC975CAF1__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// ScaleDlg.h : header file -// - -#include "..\res\resource.h" -#include "Viewer3dView.h" - -///////////////////////////////////////////////////////////////////////////// -// ScaleDlg dialog - -class ScaleDlg : public CDialog -{ -// Construction -public: - ScaleDlg(Handle(V3d_View) Current_V3d_View, CViewer3dView* pView, CWnd* pParent = NULL); - -// Dialog Data - //{{AFX_DATA(ScaleDlg) - enum { IDD = IDD_SCALE }; - CSliderCtrl m_ScaleXSlidCtrl; - CSliderCtrl m_ScaleYSlidCtrl; - CSliderCtrl m_ScaleZSlidCtrl; - int m_ScaleX; - int m_ScaleY; - int m_ScaleZ; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(ScaleDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(ScaleDlg) - virtual BOOL OnInitDialog(); - afx_msg void OnChangeEditScaleX(); - afx_msg void OnChangeEditScaleY(); - afx_msg void OnChangeEditScaleZ(); - afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - - Handle(V3d_View) myCurrent_V3d_View; - CViewer3dView* myView; -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_ScaleDlg_H__1796AA04_63B7_4E46_B00A_D2DAC975CAF1__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.cpp b/samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.cpp deleted file mode 100755 index 77ecb4860e..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// ShadingModelDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "Viewer3dApp.h" -#include "ShadingModelDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CShadingModelDlg dialog - - -CShadingModelDlg::CShadingModelDlg(Handle(V3d_View) Current_V3d_View, CWnd* pParent /*=NULL*/) - : CDialog(CShadingModelDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(CShadingModelDlg) - myCurrent_V3d_View=Current_V3d_View; - //}}AFX_DATA_INIT -} - - -void CShadingModelDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CShadingModelDlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CShadingModelDlg, CDialog) - //{{AFX_MSG_MAP(CShadingModelDlg) - ON_BN_CLICKED(IDC_SHADINGMODEL_COLOR, OnShadingmodelColor) - ON_BN_CLICKED(IDC_SHADINGMODEL_FLAT, OnShadingmodelFlat) - ON_BN_CLICKED(IDC_SHADINGMODEL_GOURAUD, OnShadingmodelGouraud) - ON_BN_CLICKED(IDC_SHADINGMODEL_PHONG, OnShadingmodelPhong) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CShadingModelDlg message handlers - -void CShadingModelDlg::OnShadingmodelColor() -{ - myCurrent_V3d_View->SetShadingModel(V3d_COLOR); - myCurrent_V3d_View->Update(); -} - -void CShadingModelDlg::OnShadingmodelFlat() -{ - myCurrent_V3d_View->SetShadingModel(V3d_FLAT); - myCurrent_V3d_View->Update(); -} - -void CShadingModelDlg::OnShadingmodelGouraud() -{ - myCurrent_V3d_View->SetShadingModel(V3d_GOURAUD); - myCurrent_V3d_View->Update(); -} - -void CShadingModelDlg::OnShadingmodelPhong() -{ - myCurrent_V3d_View->SetShadingModel(V3d_PHONG); - myCurrent_V3d_View->Update(); -} diff --git a/samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.h b/samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.h deleted file mode 100755 index 30f38ab23e..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.h +++ /dev/null @@ -1,53 +0,0 @@ -// ShadingModelDlg.h : header file -// -#if !defined(AFX_SHADINGMODELDLG_H__4DEFD9F9_61FC_11D3_8D0A_00AA00D10994__INCLUDED_) -#define AFX_SHADINGMODELDLG_H__4DEFD9F9_61FC_11D3_8D0A_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include "..\res\resource.h" - -///////////////////////////////////////////////////////////////////////////// -// CShadingModelDlg dialog - -class CShadingModelDlg : public CDialog -{ -// Construction -public: - CShadingModelDlg(Handle(V3d_View) Current_V3d_View, CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CShadingModelDlg) - enum { IDD = IDD_SHADINGMODEL }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CShadingModelDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CShadingModelDlg) - afx_msg void OnShadingmodelColor(); - afx_msg void OnShadingmodelFlat(); - afx_msg void OnShadingmodelGouraud(); - afx_msg void OnShadingmodelPhong(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - - Handle(V3d_View) myCurrent_V3d_View; -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_SHADINGMODELDLG_H__4DEFD9F9_61FC_11D3_8D0A_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/State.h b/samples/mfc/standard/04_Viewer3d/src/State.h deleted file mode 100755 index b58cdc57aa..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/State.h +++ /dev/null @@ -1,3 +0,0 @@ -enum STATE { - FACE_COLOR - }; diff --git a/samples/mfc/standard/04_Viewer3d/src/StdAfx.cpp b/samples/mfc/standard/04_Viewer3d/src/StdAfx.cpp deleted file mode 100755 index a50be5907a..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/StdAfx.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// SampleViewer3d.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" diff --git a/samples/mfc/standard/04_Viewer3d/src/StdAfx.h b/samples/mfc/standard/04_Viewer3d/src/StdAfx.h deleted file mode 100755 index 2d5561443b..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/StdAfx.h +++ /dev/null @@ -1,70 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -#include // MFC OLE automation classes -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - -#pragma warning( disable : 4244 ) // Issue warning 4244 -#include "Standard_ShortReal.hxx" -#pragma warning( default : 4244 ) // Issue warning 4244 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "State.h" - -#include <..\res\resource.h> - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - diff --git a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp b/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp deleted file mode 100755 index a2b00f7a5d..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp +++ /dev/null @@ -1,441 +0,0 @@ -// TexturesExt_Presentation.cpp: implementation of the TexturesExt_Presentation class. -// Creation of textural presentation of shape -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "TexturesExt_Presentation.h" -#include "Viewer3dApp.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define DISP(OBJ) getAISContext()->Display((OBJ), Standard_False) - -// Initialization of global variable with an instance of this class -OCCDemo_Presentation* OCCDemo_Presentation::Current = new TexturesExt_Presentation; - -// Initialization of array of samples -const TexturesExt_Presentation::PSampleFuncType TexturesExt_Presentation::SampleFuncs[] = -{ - &TexturesExt_Presentation::sampleBottle, - &TexturesExt_Presentation::sampleTerrain, - &TexturesExt_Presentation::sampleKitchen -}; - -#define EOL "\r\n" - -#define ZVIEW_SIZE 100 - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -TexturesExt_Presentation::TexturesExt_Presentation() -{ - myNbSamples = sizeof(SampleFuncs)/sizeof(PSampleFuncType); - setName ("Textured Shapes"); -} - -////////////////////////////////////////////////////////////////////// -// Sample execution -////////////////////////////////////////////////////////////////////// - -void TexturesExt_Presentation::DoSample() -{ - ((CViewer3dApp*) AfxGetApp())->SetSampleName (L"Viewer3d"); - ((CViewer3dApp*) AfxGetApp())->SetSamplePath (L"..\\..\\04_Viewer3d"); - getAISContext()->EraseAll (Standard_True); - if (myIndex >=0 && myIndex < myNbSamples) - { - // turn lights on for terrain sample - lightsOnOff(myIndex==1); - (this->*SampleFuncs[myIndex])(); - } -} - -void TexturesExt_Presentation::Init() -{ - // initialize v3d_view so it displays TexturesExt well - Handle(V3d_View) aView = getViewer()->ActiveViews().First(); - aView->SetSize(ZVIEW_SIZE); - -// getDocument()->UpdateResultMessageDlg("Textured Shape", - TCollection_AsciiString Message ("Textured Shape", - " TopoDS_Shape aShape;" EOL - "" EOL - " // initialize aShape" EOL - " // aShape = ..." EOL - "" EOL - " // create a textured presentation object for aShape" EOL - " Handle(AIS_Shape) aTShape = new AIS_Shape(aShape);" EOL - "" EOL - " TCollection_AsciiString aTFileName;" EOL - "" EOL - " // initialize aTFileName with an existing texture file name" EOL - " // (gif, bmp, xwd, rgb, and other formats are supported)" EOL - " // OR with an integer value string (max = Graphic3d_Texture2D::NumberOfTexturesExt())" EOL - " // which will indicate use of predefined texture of this number" EOL - " // aTFileName = ..." EOL - "" EOL - " aTShape->Attributes()->SetShadingAspect (new Prs3d_ShadingAspect());" EOL - " Handle(Graphic3d_Texture2Dmanual) aTexture = new Graphic3d_Texture2Dmanual (aTFileName);" EOL - " aTShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMap (aTexture);" EOL - " aTShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMapOn();" EOL); -// CString text(Message.ToCString()); - getDocument()->ClearDialog(); - getDocument()->SetDialogTitle("Change face color"); - getDocument()->AddTextInDialog(Message); -} - -////////////////////////////////////////////////////////////////////// -// Sample functions -////////////////////////////////////////////////////////////////////// -//================================================================ -// Function : TexturesExt_Presentation::Texturize -// display an AIS_Shape based on a given shape with texture with given filename -// filename can also be an integer value ("2", "5", etc.), in this case -// a predefined texture from Graphic3d_NameOfTexture2D with number = this value -// is loaded. -//================================================================ -Handle(AIS_Shape) TexturesExt_Presentation::Texturize(const TopoDS_Shape& aShape, - TCollection_AsciiString aTFileName, - Standard_Real toScaleU, - Standard_Real toScaleV, - Standard_Real toRepeatU, - Standard_Real toRepeatV, - Standard_Real originU, - Standard_Real originV) -{ - // create a textured presentation object for aShape - Handle(AIS_Shape) aTShape = new AIS_Shape(aShape); - TCollection_AsciiString TFileName; - // load texture from file if it is not an integer value - // integer value indicates a number of texture in predefined TexturesExt enumeration - CString anOCCTDataPathValue; - anOCCTDataPathValue.GetEnvironmentVariable(L"CSF_OCCTDataPath"); - CString initfile = (anOCCTDataPathValue + L"\\images\\"); - if (!aTFileName.IsIntegerValue()) - { - initfile += aTFileName.ToCString(); - } - - if (!aTShape->Attributes()->HasOwnShadingAspect()) - { - aTShape->Attributes()->SetShadingAspect (new Prs3d_ShadingAspect()); - } - aTShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMap (new Graphic3d_Texture2Dmanual (TCollection_AsciiString ((const wchar_t* )initfile))); - aTShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMapOn(); - - // do other initialization of AIS_Shape - aTShape->SetTextureScaleUV (gp_Pnt2d ( toScaleU, toScaleV)); - aTShape->SetTextureRepeatUV(gp_Pnt2d (toRepeatU, toRepeatV)); - aTShape->SetTextureOriginUV(gp_Pnt2d ( originU, originV)); - - aTShape->SetDisplayMode(AIS_Shaded); - - return aTShape; -} - - -//================================================================ -// Function : TexturesExt_Presentation::loadShape -// loads a shape from a given brep file from data dir into a given TopoDS_Shape object -//================================================================ -Standard_Boolean TexturesExt_Presentation::loadShape(TopoDS_Shape& aShape, - TCollection_AsciiString aFileName) -{ - // create a TopoDS_Shape -> read from a brep file - CString anOCCTDataPathValue; - anOCCTDataPathValue.GetEnvironmentVariable(L"CSF_OCCTDataPath"); - CString initfile = (anOCCTDataPathValue + L"\\occ\\" + aFileName.ToCString()); - - std::filebuf aFileBuf; - std::istream aStream (&aFileBuf); - if (!aFileBuf.open (initfile, std::ios::in)) - { - initfile += L" was not found. The sample can not be shown."; - getDocument()->UpdateResultMessageDlg ("Textured Shape", initfile); - return Standard_False; - } - - BRep_Builder aBld; - BRepTools::Read (aShape, aStream, aBld); - if (aShape.IsNull()) - { - initfile += " is invalid. The sample can not be shown."; - getDocument()->UpdateResultMessageDlg ("Textured Shape", initfile); - return Standard_False; - } - - return Standard_True; -} - -//================================================================ -// Function : lightsOnOff -// Purpose : 6 lights are used for a brighter demonstration of textured shapes -// call lightsOnOff(false) before showing normal shape -// call lightsOnOff(true) before showing textured shape -//================================================================ -void TexturesExt_Presentation::lightsOnOff(Standard_Boolean isOn) -{ - static Handle(V3d_Light) aLight1 = new V3d_DirectionalLight(V3d_XnegYposZneg); - static Handle(V3d_Light) aLight2 = new V3d_DirectionalLight(V3d_XnegYnegZpos); - static Handle(V3d_Light) aLight3 = new V3d_DirectionalLight(V3d_XposYnegZpos); - static Handle(V3d_Light) aLight4 = new V3d_DirectionalLight(V3d_XnegYnegZneg); - static Handle(V3d_Light) aLight5 = new V3d_DirectionalLight(V3d_XnegYposZpos); - static Handle(V3d_Light) aLight6 = new V3d_DirectionalLight(V3d_XposYposZpos); - - if (isOn) - { - getViewer()->SetLightOn(aLight1); - getViewer()->SetLightOn(aLight2); - getViewer()->SetLightOn(aLight3); - getViewer()->SetLightOn(aLight4); - getViewer()->SetLightOn(aLight5); - getViewer()->SetLightOn(aLight6); - } - else - { - getViewer()->SetLightOff(aLight1); - getViewer()->SetLightOff(aLight2); - getViewer()->SetLightOff(aLight3); - getViewer()->SetLightOff(aLight4); - getViewer()->SetLightOff(aLight5); - getViewer()->SetLightOff(aLight6); - } -} - -//================================================================ -// Function : TexturesExt_Presentation::sampleBottle -// Purpose : -//================================================================ -void TexturesExt_Presentation::sampleBottle() -{ - TopoDS_Shape aShape; - if (!loadShape(aShape, "bottle.brep")) - return; - - // resize and move the shape to the center of the viewer -gp_Trsf aTrsf1, aTrsf2; -aTrsf1.SetScale(gp_Pnt(0,0,0), 0.8); -aTrsf2.SetTranslation(gp_Pnt(0,0,0),gp_Pnt(0,0,-20)); -aTrsf1.Multiply(aTrsf2); -BRepBuilderAPI_Transform Transformer(aTrsf1); -Transformer.Perform(aShape); -aShape = Transformer.Shape(); - - TopTools_IndexedMapOfShape aFaces; - TopExp::MapShapes(aShape, TopAbs_FACE, aFaces); - - // display original shape in shaded display mode - Handle(AIS_Shape) aShapeIO = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False); - getAISContext()->SetDisplayMode(aShapeIO, AIS_Shaded, Standard_False); - // Set increased polygon offset for the main shape to avoid depth collision with textured faces - aShapeIO->SetPolygonOffsets(Aspect_POM_Fill, 1.5, 0.5); - DISP(aShapeIO); - - Handle(AIS_Shape) aTFace1 = Texturize(aFaces(16), "carrelage1.gif", 1, 1, 3, 2); - DISP(aTFace1); - - Handle(AIS_Shape) aTFace2 = Texturize(aFaces(21), "carrelage1.gif", 1, 1, 3, 2); - DISP(aTFace2); - - getViewer()->Update(); -} - - -//================================================================ -// Function : TexturesExt_Presentation::sampleLand -// Purpose : -//================================================================ -void TexturesExt_Presentation::sampleTerrain() -{ - TopoDS_Shape aShape; - if (!loadShape(aShape, "terrain.brep")) - return; - - // a part of the landscape is textured - TopTools_IndexedMapOfShape aFaces; - TopExp::MapShapes(aShape, TopAbs_FACE, aFaces); - -// TopLoc_Location aLoc; -// Handle(Geom_Surface) aSur = BRep_Tool::Surface(TopoDS::Face(aFaces(1)), aLoc); -// Standard_Real u1,u2,v1,v2; -// aSur->Bounds(u1,u2,v1,v2); -// gp_Pnt aPnt = aSur->Value(u1, v1); - gp_Pnt aPnt(82100,80300,10940);// point at u1,v1 - // resize and move the shape to the center of the viewer - - gp_Trsf aMoveTrsf; - gp_Ax3 New(gp_Pnt(-30,-30, 0),gp_Dir(0,0,1)); - gp_Ax3 aCurrent(aPnt,gp_Dir(0,0,1)); - aMoveTrsf.SetDisplacement(aCurrent, New); - - gp_Trsf aScaleTrsf; - aScaleTrsf.SetScale(aPnt,0.0075); - - BRepBuilderAPI_Transform aTransform(aMoveTrsf*aScaleTrsf); - - aTransform.Perform(aFaces(1)); - aShape = aTransform; - - getAISContext()->Display (Texturize (aShape, "terrain.gif"), Standard_True); -} - - -//================================================================ -// Function : moveScale -// Purpose : move a shape a little left and scale it to 15%. -//================================================================ -static void moveScale(TopoDS_Shape& aShape) -{ - gp_Trsf aMoveTrsf; - gp_Ax3 New(gp_Pnt(-30,-30, -10),gp_Dir(0,0,1)); - gp_Ax3 Current(gp_Pnt(0,0,0),gp_Dir(0,0,1)); - aMoveTrsf.SetDisplacement(Current, New); - - gp_Trsf aScaleTrsf; - aScaleTrsf.SetScale(gp_Pnt(0,0,0),0.15); - - BRepBuilderAPI_Transform aTransform(aMoveTrsf*aScaleTrsf); - - aTransform.Perform(aShape); - aShape = aTransform; -} - -//================================================================ -// Function : TexturesExt_Presentation::sampleKitchen -// Purpose : kitchen with texturized items in it. -//================================================================ -void TexturesExt_Presentation::sampleKitchen() -{ - TopoDS_Shape aShape; - - if (!loadShape(aShape, "Room.brep")) - return; - - gp_Trsf aTrsf; - gp_Ax3 NewCoordSystem (gp_Pnt(-1,-1, -1),gp_Dir(0,0,1)); - gp_Ax3 CurrentCoordSystem(gp_Pnt(0,0,0),gp_Dir(0,0,1)); - aTrsf.SetDisplacement(CurrentCoordSystem, NewCoordSystem); - aShape.Location(TopLoc_Location(aTrsf)); - - moveScale(aShape); - - // draw kitchen room without one wall (to better see the insides) - TopTools_IndexedMapOfShape aFaces; - TopExp::MapShapes(aShape, TopAbs_FACE, aFaces); - Standard_Integer nbFaces = aFaces.Extent(); - - // create a wooden kitchen floor - // the floor's face will be textured with texture from chataignier.gif - DISP(Texturize(aFaces(5),"plancher.gif",1,1,2,1)); - - // texturize other faces of the room with texture from wallpaper.gif (walls) - DISP(Texturize(aFaces(1),"wallpaper.gif",1,1,8,6)); - DISP(Texturize(aFaces(3),"wallpaper.gif",1,1,8,6)); - DISP(Texturize(aFaces(4),"wallpaper.gif",1,1,8,6)); - -// DISP(drawShape(aFaces(1), Quantity_NOC_LIGHTPINK, Standard_False)); -// DISP(drawShape(aFaces(3), Quantity_NOC_LIGHTPINK, Standard_False)); -// DISP(drawShape(aFaces(4), Quantity_NOC_LIGHTPINK, Standard_False)); - - // texturize furniture items with "wooden" texture - if (loadShape(aShape, "MODERN_Table_1.brep")) - { - moveScale(aShape); - DISP(Texturize(aShape, "chataignier.gif")); - } - if (loadShape(aShape, "MODERN_Chair_1.brep")) - { - moveScale(aShape); - DISP(Texturize(aShape, "chataignier.gif")); - } - if (loadShape(aShape, "MODERN_Cooker_1.brep")) - { - moveScale(aShape); - - aFaces.Clear(); - TopExp::MapShapes(aShape, TopAbs_FACE, aFaces); - nbFaces = aFaces.Extent(); - - for (Standard_Integer i = 1; i <= nbFaces; i++) - { - if (i >= 59) - DISP(drawShape(aFaces(i), Graphic3d_NOM_STEEL, Standard_False)); - else if (i >= 29) - DISP(drawShape(aFaces(i), Graphic3d_NOM_ALUMINIUM, Standard_False)); - else if (i == 28) - DISP(Texturize(aFaces(i), "cookerplate.gif")); - else - DISP(Texturize(aFaces(i), "chataignier.gif")); - } - } - if (loadShape(aShape, "MODERN_Cooker_1_opened.brep")) - { - moveScale(aShape); - DISP(Texturize(aShape, "chataignier.gif")); - } - if (loadShape(aShape, "MODERN_Exhaust_1.brep")) - { - moveScale(aShape); - DISP(drawShape(aShape, Graphic3d_NOM_STONE, Standard_False)); - } - if (loadShape(aShape, "MODERN_MVCooker_1.brep")) - { - moveScale(aShape); - DISP(drawShape(aShape, Graphic3d_NOM_SILVER, Standard_False)); - } - if (loadShape(aShape, "MODERN_MVCooker_1_opened.brep")) - { - moveScale(aShape); - DISP(drawShape(aShape, Graphic3d_NOM_SILVER, Standard_False)); - } - if (loadShape(aShape, "MODERN_Sink_1.brep")) - { - moveScale(aShape); - - aFaces.Clear(); - TopExp::MapShapes(aShape, TopAbs_FACE, aFaces); - nbFaces = aFaces.Extent(); - - for (Standard_Integer i = 1; i <= nbFaces; i++) - { - if (i < 145) - DISP(drawShape(aFaces(i), Graphic3d_NOM_ALUMINIUM, Standard_False)); - else if (i == 145) - DISP(Texturize(aFaces(i), "cookerplate.gif")); - else - DISP(Texturize(aFaces(i), "chataignier.gif")); - } - } - if (loadShape(aShape, "MODERN_Sink_1_opened.brep")) - { - moveScale(aShape); - DISP(Texturize(aShape, "chataignier.gif")); - } - if (loadShape(aShape, "MODERN_Refrigerator_1.brep")) - { - moveScale(aShape); - DISP(drawShape(aShape, Graphic3d_NOM_CHROME, Standard_False)); - } - if (loadShape(aShape, "MODERN_Refrigerator_1_opened.brep")) - { - moveScale(aShape); - DISP(drawShape(aShape, Graphic3d_NOM_CHROME, Standard_False)); - } - - getViewer()->Update(); -} \ No newline at end of file diff --git a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.h b/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.h deleted file mode 100755 index 1c67a95be5..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.h +++ /dev/null @@ -1,59 +0,0 @@ -// TexturesExt_Presentation.h: interface for the TexturesExt_Presentation class. -// Creation of textural presentation of shape -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_TexturesExt_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_TexturesExt_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "OCCDemo_Presentation.h" -#include -class TopoDS_Shape; -class TCollection_AsciiString; - -class TexturesExt_Presentation : public OCCDemo_Presentation -{ -public: - // Construction - TexturesExt_Presentation(); - -public: - // Iteration on samples - virtual void DoSample(); - // one phase of iterations - - virtual void Init(); - -private: - // display an AIS_Shape based on a given shape with texture with given filename - // filename can also be an integer value ("2", "5", etc.), in this case - // a predefined texture from Graphic3d_NameOfTexture2D with number = this value - // is loaded. - Handle(AIS_Shape) Texturize( - const TopoDS_Shape& aShape, TCollection_AsciiString aTFileName, - Standard_Real toScaleU=1.0, Standard_Real toScaleV=1.0, - Standard_Real toRepeatU=1.0, Standard_Real toRepeatV=1.0, - Standard_Real originU=0.0, Standard_Real originV=0.0); - - // loads a shape from a given brep file from data dir into a given TopoDS_Shape object - Standard_Boolean loadShape(TopoDS_Shape&, TCollection_AsciiString); - - // turns 6 diretional lights on/off for brighter demonstration - void lightsOnOff(Standard_Boolean isOn); - - // Sample functions - void sampleBottle(); - void sampleTerrain(); - void sampleKitchen(); - -private: - // Array of pointers to sample functions - typedef void (TexturesExt_Presentation::*PSampleFuncType)(); - static const PSampleFuncType SampleFuncs[]; - -}; - -#endif // !defined(AFX_TexturesExt_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.cpp b/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.cpp deleted file mode 100755 index 6db2006ab1..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.cpp +++ /dev/null @@ -1,291 +0,0 @@ -// TrihedronDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "Viewer3dApp.h" -#include "Viewer3dView.h" -#include "TrihedronDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -void round(double &value, unsigned char digits) -{ -char neg = 1; -if(value < 0){ -neg = (-1); -value *= (-1); -} -double inc(1.0); -while(digits){ inc*=10; --digits; } -double dg(value*inc*100); -value = floor(floor(dg)/100); -if((dg-(value*100)) > 49.9) value+=1; -value = (value*neg)/inc; -} - - -///////////////////////////////////////////////////////////////////////////// -// CTrihedronDlg dialog - - -//CTrihedronDlg::CTrihedronDlg(CWnd* pParent /*=NULL*/) - //: CDialog(CTrihedronDlg::IDD, pParent) - -CTrihedronDlg::CTrihedronDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent /*=NULL*/) - : CDialog(CTrihedronDlg::IDD, pParent) - -{ - //{{AFX_DATA_INIT(CTrihedronDlg) - m_TrihedronScale = 0.1; - myDoc=pDoc; - myCurrent_V3d_View = Current_V3d_View; - /*m_*/Color = Quantity_NOC_WHITE; - /*m_*/Position = Aspect_TOTP_LEFT_UPPER; - - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void CTrihedronDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CTrihedronDlg) - DDX_Control(pDX, IDC_COMBOTRIHEDRPOS, m_ComboTrihedronPosList); - DDX_Control(pDX, IDC_COMBOTRIHEDRCOLOR, m_ComboTrihedronColorList); - DDX_Text(pDX, IDC_EDITTRIHEDRSCALE, m_TrihedronScale); - DDV_MinMaxDouble(pDX, m_TrihedronScale, 0., 1.); - DDX_Control(pDX, IDC_SPINTRIHEDRSCALE, m_SpinTrihedronScale); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CTrihedronDlg, CDialog) - //{{AFX_MSG_MAP(CTrihedronDlg) - ON_CBN_SELCHANGE(IDC_COMBOTRIHEDRCOLOR, OnSelchangeCombotrihedrcolor) - ON_CBN_SELCHANGE(IDC_COMBOTRIHEDRPOS, OnSelchangeCombotrihedrpos) - ON_EN_CHANGE(IDC_EDITTRIHEDRSCALE, OnChangeEdittrihedrscale) - ON_NOTIFY(UDN_DELTAPOS, IDC_SPINTRIHEDRSCALE, OnDeltaposSpintrihedrscale) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - - - - - -///////////////////////////////////////////////////////////////////////////// -// CTrihedronDlg message handlers - -void CTrihedronDlg::OnSelchangeCombotrihedrcolor() -{ - UpdateData(TRUE); - int a = m_ComboTrihedronColorList.GetCurSel(); - if( a==0) - Color=Quantity_NOC_BLACK; - else if(a==1) - Color=Quantity_NOC_MATRABLUE; - else if(a==2) - Color=Quantity_NOC_MATRAGRAY; -// else if(a==3) -// Color=Quantity_NOC_ALICEBLUE; - else if(a==3) - Color=Quantity_NOC_ANTIQUEWHITE; - //else if(a==4) - // Color=Quantity_NOC_BISQUE; - - UpdateData(FALSE); - - myCurrent_V3d_View->TriedronDisplay(Position, Color, m_TrihedronScale); - myCurrent_V3d_View->Update(); - -} - -void CTrihedronDlg::OnSelchangeCombotrihedrpos() -{ - UpdateData(TRUE); - int b = m_ComboTrihedronPosList.GetCurSel(); - - if( b==0) - Position=Aspect_TOTP_CENTER; - else if(b==1) - Position=Aspect_TOTP_LEFT_LOWER; - else if(b==2) - Position=Aspect_TOTP_LEFT_UPPER; - else if(b==3) - Position=Aspect_TOTP_RIGHT_LOWER; - else if(b==4) - Position=Aspect_TOTP_RIGHT_UPPER; - - UpdateData(FALSE); - - myCurrent_V3d_View->TriedronDisplay(Position, Color, m_TrihedronScale); - myCurrent_V3d_View->Update(); - -} - - -BOOL CTrihedronDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - UpdateData(TRUE); - -// Initializing the ComboBox : Position - m_ComboTrihedronPosList.InsertString(-1, L"Center"); - m_ComboTrihedronPosList.InsertString(-1, L"Left Lower"); - m_ComboTrihedronPosList.InsertString(-1, L"Left Upper"); - m_ComboTrihedronPosList.InsertString(-1, L"Right Lower"); - m_ComboTrihedronPosList.InsertString(-1, L"Right Upper"); - -// Initializing the ComboBox : Color - /* - m_ComboTrihedronColorList.InsertString(-1, L"BLACK"); - m_ComboTrihedronColorList.InsertString(-1, L"MATRABLUE"); - m_ComboTrihedronColorList.InsertString(-1, L"MATRAGRAY"); - m_ComboTrihedronColorList.InsertString(-1, L"ALICE BLUE"); - m_ComboTrihedronColorList.InsertString(-1, L"WHITE"); - m_ComboTrihedronColorList.InsertString(-1, L"BISQUE"); - */ - m_ComboTrihedronColorList.InsertString(-1, L"Black"); - m_ComboTrihedronColorList.InsertString(-1, L"Blue"); - m_ComboTrihedronColorList.InsertString(-1, L"Gray"); - m_ComboTrihedronColorList.InsertString(-1, L"White"); - //m_ComboTrihedronColorList.InsertString(-1, L"Bisque"); - - - - UpdateData(FALSE); - -/* if (CDemoVisualizationView::slinitialisation()) - { - AfxMessageBox("debut"); - - if(m_Position==Aspect_TOTP_CENTER) - m_ComboTrihedronPosList.SetCurSel(0); - else if(m_Position==Aspect_TOTP_LEFT_LOWER) - m_ComboTrihedronPosList.SetCurSel(1); - else if(m_Position==Aspect_TOTP_LEFT_UPPER) - m_ComboTrihedronPosList.SetCurSel(2); - else if(m_Position==Aspect_TOTP_RIGHT_LOWER) - m_ComboTrihedronPosList.SetCurSel(3); - else if(m_Position==Aspect_TOTP_RIGHT_UPPER) - m_ComboTrihedronPosList.SetCurSel(4); - - if(m_Color==Quantity_NOC_BLACK) - m_ComboTrihedronColorList.SetCurSel(0); - else if(m_Color==Quantity_NOC_MATRABLUE) - m_ComboTrihedronColorList.SetCurSel(1); - else if(m_Color==Quantity_NOC_MATRAGRAY) - m_ComboTrihedronColorList.SetCurSel(2); - else if(m_Color==Quantity_NOC_ALICEBLUE) - m_ComboTrihedronColorList.SetCurSel(3); - else if(m_Color==Quantity_NOC_WHITE) - m_ComboTrihedronColorList.SetCurSel(4); - else if(m_Color==Quantity_NOC_BISQUE) - m_ComboTrihedronColorList.SetCurSel(5); - Position = m_Position; - Color = m_Color; - myCurrent_V3d_View->TriedronDisplay(Position, Color, m_TrihedronScale); - myCurrent_V3d_View->Update(); - - Initialisation = Standard_False; - - } - else - {*/ - if(Position==Aspect_TOTP_CENTER) - m_ComboTrihedronPosList.SetCurSel(0); - else if(Position==Aspect_TOTP_LEFT_LOWER) - m_ComboTrihedronPosList.SetCurSel(1); - else if(Position==Aspect_TOTP_LEFT_UPPER) - m_ComboTrihedronPosList.SetCurSel(2); - else if(Position==Aspect_TOTP_RIGHT_LOWER) - m_ComboTrihedronPosList.SetCurSel(3); - else if(Position==Aspect_TOTP_RIGHT_UPPER) - m_ComboTrihedronPosList.SetCurSel(4); - - if(Color==Quantity_NOC_BLACK) - m_ComboTrihedronColorList.SetCurSel(0); - else if(Color==Quantity_NOC_MATRABLUE) - m_ComboTrihedronColorList.SetCurSel(1); - else if(Color==Quantity_NOC_MATRAGRAY) - m_ComboTrihedronColorList.SetCurSel(2); -// else if(Color==Quantity_NOC_ALICEBLUE) -// m_ComboTrihedronColorList.SetCurSel(3); - else if(Color==Quantity_NOC_WHITE) - m_ComboTrihedronColorList.SetCurSel(3); - //else if(Color==Quantity_NOC_BISQUE) - // m_ComboTrihedronColorList.SetCurSel(4); - - myCurrent_V3d_View->TriedronDisplay(Position, Color, m_TrihedronScale); - myCurrent_V3d_View->Update(); -// } - - - - - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - - -void CTrihedronDlg::OnDeltaposSpintrihedrscale(NMHDR* pNMHDR, LRESULT* pResult) -{ - NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR; - - if (pNMUpDown->iDelta >= 1) - pNMUpDown->iDelta = 1; - else - pNMUpDown->iDelta = -1; - - if ((pNMUpDown->iDelta > 0) && (m_TrihedronScale > 0)) - m_TrihedronScale = m_TrihedronScale - (pNMUpDown->iDelta)*0.01; - - if ((pNMUpDown->iDelta < 0) && (m_TrihedronScale < 1)) - m_TrihedronScale = m_TrihedronScale - (pNMUpDown->iDelta)*0.01; - - - m_TrihedronScale = m_TrihedronScale*100; - m_TrihedronScale = floor(m_TrihedronScale ); - m_TrihedronScale = m_TrihedronScale /100; - -// round(m_TrihedronScale,2); - - if (fabs(m_TrihedronScale) < 0.001) - m_TrihedronScale =0; - UpdateData(FALSE); - - myCurrent_V3d_View->TriedronDisplay(Position, Color, m_TrihedronScale); - *pResult = 0; - - myCurrent_V3d_View->Update(); - -} - -void CTrihedronDlg::OnChangeEdittrihedrscale() -{ - if (UpdateData()){ - myCurrent_V3d_View->TriedronDisplay(Position, Color, m_TrihedronScale); - myCurrent_V3d_View->Update(); - } -} - -void CTrihedronDlg::OnCancel() -{ - myCurrent_V3d_View->TriedronErase(); - myCurrent_V3d_View->Update(); - myDoc -> SetMyStaticTrihedronAxisIsDisplayed(FALSE); -// Initialisation = Standard_True; - CDialog::OnCancel(); -} - -void CTrihedronDlg::OnOK() -{ - myDoc -> SetMyStaticTrihedronAxisIsDisplayed(TRUE); - CDialog::OnOK(); -} - diff --git a/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.h b/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.h deleted file mode 100755 index bfe4056f9d..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.h +++ /dev/null @@ -1,82 +0,0 @@ -#if !defined(AFX_TRIHEDRONDLG_H__1917B30F_3102_11D6_BD0D_00A0C982B46F__INCLUDED_) -#define AFX_TRIHEDRONDLG_H__1917B30F_3102_11D6_BD0D_00A0C982B46F__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// TrihedronDlg.h : header file -// - -#include "Viewer3dDoc.h" - -#include -#include - -#include "..\res\resource.h" -///////////////////////////////////////////////////////////////////////////// -// CTrihedronDlg dialog - -class CTrihedronDlg : public CDialog -{ -// Construction -public: - CTrihedronDlg(CWnd* pParent = NULL); // standard constructor - CTrihedronDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent = NULL); // standard constructor - - -// Dialog Data - //{{AFX_DATA(CTrihedronDlg) - enum { IDD = IDD_TRIHEDRON }; - CComboBox m_ComboTrihedronPosList; - CComboBox m_ComboTrihedronColorList; - double m_TrihedronScale; - CSpinButtonCtrl m_SpinTrihedronScale; - Quantity_NameOfColor m_Color; - Aspect_TypeOfTriedronPosition m_Position; - - - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CTrihedronDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CTrihedronDlg) - afx_msg void OnSelchangeCombotrihedrcolor(); - afx_msg void OnSelchangeCombotrihedrpos(); - afx_msg void OnChangeEdittrihedrscale(); - afx_msg void OnDeltaposSpintrihedrscale(NMHDR* pNMHDR, LRESULT* pResult); - virtual BOOL OnInitDialog(); - virtual void OnCancel(); - virtual void OnOK(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - - Handle(V3d_View) myCurrent_V3d_View; - CViewer3dDoc* myDoc; - Quantity_NameOfColor Color ; - Aspect_TypeOfTriedronPosition Position; -/* -public: - -static Standard_Boolean Initialisation; -static Standard_Boolean GetInitialisation() {return Initialisation;}; -*/ - -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_TRIHEDRONDLG_H__1917B30F_3102_11D6_BD0D_00A0C982B46F__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.cpp b/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.cpp deleted file mode 100755 index 36834f8b2d..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.cpp +++ /dev/null @@ -1,93 +0,0 @@ -// Viewer3dApp.cpp : Defines the class behaviors for the application. -// - -#include "stdafx.h" -#include "Viewer3dApp.h" - -#include -#include -#include "Viewer3dDoc.h" -#include "Viewer3dView.h" - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dApp - -BEGIN_MESSAGE_MAP(CViewer3dApp, CWinApp) - //{{AFX_MSG_MAP(CViewer3dApp) - ON_COMMAND(ID_APP_ABOUT, OnAppAbout) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG_MAP - // Standard file based document commands - ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) - ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dApp construction - -CViewer3dApp::CViewer3dApp() : OCC_App() -{ - SampleName = "Viewer3d"; //for about dialog - SetSamplePath (L"..\\..\\03_Viewer3d"); -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only CViewer3dApp object - -CViewer3dApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dApp initialization - -BOOL CViewer3dApp::InitInstance() -{ - AfxEnableControlContainer(); - - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - - // Change the registry key under which our settings are stored. - // You should modify this string to be something appropriate - // such as the name of your company or organization. - SetRegistryKey(_T("Local AppWizard-Generated Applications")); - - LoadStdProfileSettings(); // Load standard INI file options (including MRU) - - // Register the application's document templates. Document templates - // serve as the connection between documents, frame windows and views. - - CMultiDocTemplate* pDocTemplate; - pDocTemplate = new CMultiDocTemplate( - IDR_3DTYPE, - RUNTIME_CLASS(CViewer3dDoc), - RUNTIME_CLASS(OCC_3dChildFrame), // custom MDI child frame - RUNTIME_CLASS(CViewer3dView)); - AddDocTemplate(pDocTemplate); - - // create main MDI Frame window - OCC_MainFrame* pMainFrame = new OCC_MainFrame(with_AIS_TB); - if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) - return FALSE; - m_pMainWnd = pMainFrame; - - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); - - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; - - // The main window has been initialized, so show and update it. - pMainFrame->ShowWindow(m_nCmdShow); - pMainFrame->UpdateWindow(); - - return TRUE; -} - - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dApp commands diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.h b/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.h deleted file mode 100755 index 31459e5184..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.h +++ /dev/null @@ -1,34 +0,0 @@ -// Viewer3dApp.h : main header file for the Viewer3d application -// - -#if !defined(AFX_VIEWER3DAPP_H__3045338E_3E75_11D7_8611_0060B0EE281E__INCLUDED_) -#define AFX_VIEWER3DAPP_H__3045338E_3E75_11D7_8611_0060B0EE281E__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include - -class CViewer3dApp : public OCC_App -{ -public: - - CViewer3dApp(); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CViewer3dApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL - - DECLARE_MESSAGE_MAP() -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_VIEWER3DAPP_H__3045338E_3E75_11D7_8611_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp b/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp deleted file mode 100755 index a29bfdc869..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp +++ /dev/null @@ -1,1039 +0,0 @@ -// Viewer3dDoc.cpp : implementation of the CViewer3dDoc class -// - -#include "stdafx.h" -#include "Viewer3dApp.h" -#include "BoxRadius.h" -#include "DlgIsos.h" - -#include "Viewer3dDoc.h" -#include "Viewer3dView.h" -#include "OffsetDlg.h" -#include "ResultDialog.h" -#include "User_Cylinder.hxx" - -#include "AIS_Trihedron.hxx" -#include "Geom_Axis2Placement.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dDoc - -IMPLEMENT_DYNCREATE(CViewer3dDoc, CDocument) - -BEGIN_MESSAGE_MAP(CViewer3dDoc, OCC_3dDoc) - //{{AFX_MSG_MAP(CViewer3dDoc) - ON_COMMAND(ID_BOX, OnBox) - ON_COMMAND(ID_Cylinder, OnCylinder) - ON_COMMAND(ID_SPHERE, OnSphere) - ON_COMMAND(ID_ERASEALL, OnRemoveAll) - ON_COMMAND(ID_NBISOS, OnNbisos) - ON_COMMAND(ID_FACES, OnFaces) - ON_COMMAND(ID_EDGES, OnEdges) - ON_COMMAND(ID_VERTICES, OnVertices) - ON_COMMAND(ID_NEUTRAL, OnNeutral) - ON_COMMAND(ID_USERCYLINDER_CHANGEFACECOLOR, OnUsercylinderChangefacecolor) - ON_COMMAND(ID_FILLET3D, OnFillet3d) - ON_COMMAND(ID_CIRCLE, OnCircle) - ON_COMMAND(ID_LINE, OnLine) - ON_COMMAND(ID_OVERLAPPED_BOX, OnOverlappedBox) - ON_COMMAND(ID_OVERLAPPED_CYLINDER, OnOverlappedCylinder) - ON_COMMAND(ID_OVERLAPPED_SPHERE, OnOverlappedSphere) - ON_COMMAND(ID_POLYGON_OFFSETS, OnPolygonOffsets) - ON_UPDATE_COMMAND_UI(ID_POLYGON_OFFSETS, OnUpdatePolygonOffsets) - ON_UPDATE_COMMAND_UI(ID_Cylinder, OnUpdateCylinder) - ON_UPDATE_COMMAND_UI(ID_SPHERE, OnUpdateSphere) - ON_UPDATE_COMMAND_UI(ID_BOX, OnUpdateBox) - ON_UPDATE_COMMAND_UI(ID_OVERLAPPED_CYLINDER, OnUpdateOverlappedCylinder) - ON_UPDATE_COMMAND_UI(ID_OVERLAPPED_SPHERE, OnUpdateOverlappedSphere) - ON_UPDATE_COMMAND_UI(ID_OVERLAPPED_BOX, OnUpdateOverlappedBox) - ON_COMMAND(ID_OBJECT_REMOVE, OnObjectRemove) - ON_COMMAND(ID_OBJECT_ERASE, OnObjectErase) - ON_COMMAND(ID_OBJECT_DISPLAYALL, OnObjectDisplayall) - ON_COMMAND(ID_OBJECT_COLORED_MESH, OnObjectColoredMesh) - ON_UPDATE_COMMAND_UI(ID_OBJECT_COLORED_MESH, OnUpdateObjectColoredMesh) - ON_UPDATE_COMMAND_UI(ID_OBJECT_SHADING, OnUpdateObjectShading) - ON_UPDATE_COMMAND_UI(ID_OBJECT_WIREFRAME, OnUpdateObjectWireframe) - ON_COMMAND(ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON, OnOptionsTrihedronDynamicTrihedron) - ON_UPDATE_COMMAND_UI(ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON, OnUpdateOptionsTrihedronDynamicTrihedron) - ON_UPDATE_COMMAND_UI(ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON, OnUpdateOptionsTrihedronStaticTrihedron) - ON_COMMAND(ID_OBJECT_MATERIAL, OnObjectMaterial) - ON_COMMAND(ID_TEXTURE_ON, OnTextureOn) - ON_COMMAND(ID_BUTTONNext, OnBUTTONNext) - ON_COMMAND(ID_BUTTONStart, OnBUTTONStart) - ON_COMMAND(ID_BUTTONRepeat, OnBUTTONRepeat) - ON_COMMAND(ID_BUTTONPrev, OnBUTTONPrev) - ON_COMMAND(ID_BUTTONEnd, OnBUTTONEnd) - ON_UPDATE_COMMAND_UI(ID_BUTTONNext, OnUpdateBUTTONNext) - ON_UPDATE_COMMAND_UI(ID_BUTTONPrev, OnUpdateBUTTONPrev) - ON_UPDATE_COMMAND_UI(ID_BUTTONStart, OnUpdateBUTTONStart) - ON_UPDATE_COMMAND_UI(ID_BUTTONRepeat, OnUpdateBUTTONRepeat) - ON_UPDATE_COMMAND_UI(ID_BUTTONEnd, OnUpdateBUTTONEnd) - ON_COMMAND(ID_FILE_NEW, OnFileNew) - ON_COMMAND(ID_DUMP_VIEW, OnDumpView) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dDoc construction/destruction - -CViewer3dDoc::CViewer3dDoc() -:OCC_3dDoc() -{ - myCylinder.Nullify(); - mySphere.Nullify(); - myBox.Nullify(); - myOverlappedCylinder.Nullify(); - myOverlappedSphere.Nullify(); - myOverlappedBox.Nullify(); - myOffsetDlg = NULL; - myStaticTrihedronAxisIsDisplayed = FALSE; - myState = -1; - - isTextureSampleStarted = FALSE; - - myPresentation = OCCDemo_Presentation::Current; - myPresentation->SetDocument(this); - - - myAISContext->DefaultDrawer()->ShadingAspect()->SetColor(Quantity_NOC_CHARTREUSE1); - myAISContext->DefaultDrawer()->ShadingAspect()->SetMaterial(Graphic3d_NOM_SILVER); - - strcpy_s(myDataDir, "Data"); - strcpy_s(myLastPath, "."); - - /* - Handle(AIS_Trihedron) myTrihedron; - Handle(Geom_Axis2Placement) myTrihedronAxis=new Geom_Axis2Placement(gp::XOY()); - myTrihedron=new AIS_Trihedron(myTrihedronAxis); - myAISContext->Display(myTrihedron); - */ -} - -CViewer3dDoc::~CViewer3dDoc() -{ -} - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dDoc diagnostics - -#ifdef _DEBUG -void CViewer3dDoc::AssertValid() const -{ - CDocument::AssertValid(); -} - -void CViewer3dDoc::Dump(CDumpContext& dc) const -{ - CDocument::Dump(dc); -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dDoc commands - -void CViewer3dDoc::UpdateResultMessageDlg (CString theTitle, const TCollection_AsciiString& theMessage) -{ - CString aText (theMessage.ToCString()); - myCResultDialog.SetText (aText); - myCResultDialog.SetTitle(theTitle); -} - -void CViewer3dDoc::UpdateResultMessageDlg(CString theTitle, CString theMessage) -{ - myCResultDialog.SetText (theMessage); - myCResultDialog.SetTitle(theTitle); -} - -void CViewer3dDoc::OnBox() -{ - if(myBox.IsNull()) - { - BRepPrimAPI_MakeBox B(gp_Pnt(0,-400,-100), 200.,150.,100.); - - - myBox = new AIS_Shape(B.Shape()); - - myAISContext->SetMaterial (myBox, Graphic3d_NOM_PEWTER, Standard_False); - myAISContext->SetDisplayMode (myBox, 1, Standard_False); - - myAISContext->Display (myBox, Standard_True); - TCollection_AsciiString Message("\ -BRepPrimAPI_MakeBox Box1(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\ - "); - - UpdateResultMessageDlg("Create Box",Message); - } -} - -void CViewer3dDoc::OnCylinder() -{ - if(myCylinder.IsNull()) - { - gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100)))); - myCylinder = new User_Cylinder(CylAx2, 80.,200.); - - myAISContext->SetDisplayMode (myCylinder, 1, Standard_False); - - myAISContext->Display (myCylinder, Standard_True); - - TCollection_AsciiString Message("\ -gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));\n\ -C = new User_Cylinder(CylAx2, 80.,200.);;\n\ - "); - - UpdateResultMessageDlg("Create Cylinder",Message); - } -} - -void CViewer3dDoc::OnSphere() -{ - if(mySphere.IsNull()) - { - BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.); - - mySphere = new AIS_Shape(S.Shape()); - - myAISContext->SetMaterial (mySphere, Graphic3d_NOM_BRONZE, Standard_False); - myAISContext->SetDisplayMode (mySphere, 1, Standard_False); - - myAISContext->Display (mySphere, Standard_True); - TCollection_AsciiString Message("\ -BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.);\n\ - "); - UpdateResultMessageDlg("Create Sphere",Message); - } -} - -void CViewer3dDoc::OnRemoveAll() - -{ - AIS_ListOfInteractive aListOfObjects; - myAISContext->ObjectsInside(aListOfObjects,AIS_KOI_Shape); - - AIS_ListIteratorOfListOfInteractive aListIterator; - for(aListIterator.Initialize(aListOfObjects);aListIterator.More();aListIterator.Next()){ - myAISContext->Remove (aListIterator.Value(), Standard_False); - } - - myAISContext->Remove (myCylinder, Standard_True); - - - myCylinder.Nullify(); - mySphere.Nullify(); - myBox.Nullify(); - myOverlappedCylinder.Nullify(); - myOverlappedSphere.Nullify(); - myOverlappedBox.Nullify(); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - -void CViewer3dDoc::OnOverlappedBox() -{ - OnBox(); - if(myOverlappedBox.IsNull()){ - BRepPrimAPI_MakeBox B(gp_Pnt(0,-400,-100), 200.,150.,100.); - - BRepBuilderAPI_NurbsConvert aNurbsConvert(B.Shape()); - TopoDS_Shape aBoxShape2 = aNurbsConvert.Shape(); - - - myOverlappedBox = new AIS_Shape(aBoxShape2); - - myAISContext->SetMaterial (myOverlappedBox, Graphic3d_NOM_GOLD, Standard_False); - myAISContext->SetDisplayMode (myOverlappedBox, 1, Standard_False); - - myAISContext->Display (myOverlappedBox, Standard_True); - TCollection_AsciiString Message("\ -BRepPrimAPI_MakeBox Box1(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\ -\n\ -BRepPrimAPI_MakeBox Box2(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\ -BRepBuilderAPI_NurbsConvert aNurbsConvert(Box2.Shape());\n\ - "); - UpdateResultMessageDlg("Create overlapped boxes",Message); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); - } -} - -void CViewer3dDoc::OnOverlappedCylinder() -{ - OnCylinder(); - - if(myOverlappedCylinder.IsNull()){ - gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100)))); - BRepPrimAPI_MakeCylinder C(CylAx2, 80.,200.); - - BRepBuilderAPI_NurbsConvert aNurbsConvert(C.Shape()); - TopoDS_Shape aCylShape2 = aNurbsConvert.Shape(); - - myOverlappedCylinder = new AIS_Shape(aCylShape2); - - - myAISContext->SetMaterial (myOverlappedCylinder, Graphic3d_NOM_GOLD, Standard_False); - myAISContext->SetDisplayMode (myOverlappedCylinder, 1, Standard_False); - - myAISContext->Display (myOverlappedCylinder, Standard_True); - - TCollection_AsciiString Message("\ -gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));\n\ -Cylinder1 = new User_Cylinder(CylAx2, 80.,200.);\n\ -\n\ -BRepPrimAPI_MakeCylinder Cylinder2(CylAx2, 80.,200.);\n\ -BRepBuilderAPI_NurbsConvert aNurbsConvert(Cylinder2.Shape());\n\ - "); - UpdateResultMessageDlg("Create overlapped cylinders",Message); - if (myOffsetDlg && myOffsetDlg->IsWindowVisible()) - { - myOffsetDlg->UpdateValues(); - } - } -} - -void CViewer3dDoc::OnOverlappedSphere() -{ - OnSphere(); - if(myOverlappedSphere.IsNull()){ - BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.); - - BRepBuilderAPI_NurbsConvert aNurbsConvert(S.Shape()); - TopoDS_Shape aSphereShape2 = aNurbsConvert.Shape(); - - myOverlappedSphere = new AIS_Shape(aSphereShape2); - - myAISContext->SetMaterial (myOverlappedSphere, Graphic3d_NOM_GOLD, Standard_False); - - myAISContext->SetDisplayMode (myOverlappedSphere, 1, Standard_False); - - myAISContext->Display (myOverlappedSphere, Standard_True); - - TCollection_AsciiString Message("\ -BRepPrimAPI_MakeSphere Sphere1(gp_Pnt(0,300,0), 100.);\n\ -\n\ -BRepPrimAPI_MakeSphere Sphere2(gp_Pnt(0,300,0), 100.);\n\ -BRepBuilderAPI_NurbsConvert aNurbsConvert(Sphere2.Shape());\n\ - "); - UpdateResultMessageDlg("Create overlapped spheres",Message); - if (myOffsetDlg && myOffsetDlg->IsWindowVisible()) - { - myOffsetDlg->UpdateValues(); - } - } -} - -void CViewer3dDoc::OnPolygonOffsets() -{ - myOffsetDlg = new COffsetDlg(this); - myOffsetDlg->Create(COffsetDlg::IDD,NULL); - myAISContext->UpdateCurrentViewer(); -} - -void CViewer3dDoc::OnUpdatePolygonOffsets(CCmdUI* pCmdUI) -{ - Standard_Integer aOffsetMode; - Standard_ShortReal aFactor; - Standard_ShortReal aCylUnits = 0; - Standard_ShortReal aSphereUnits = 0; - Standard_ShortReal aBoxUnits = 0; - - BOOL IsOverlappedCylinderDisplayed = myAISContext->IsDisplayed(myOverlappedCylinder); - BOOL IsOverlappedSphereDisplayed = myAISContext->IsDisplayed(myOverlappedSphere); - BOOL IsOverlappedBoxDisplayed = myAISContext->IsDisplayed(myOverlappedBox); - BOOL IsAnyOverlappedObjectDisplayed = - IsOverlappedCylinderDisplayed || IsOverlappedSphereDisplayed || IsOverlappedBoxDisplayed; - - if(!myOverlappedCylinder.IsNull() && IsOverlappedCylinderDisplayed){ - myOverlappedCylinder->PolygonOffsets(aOffsetMode,aFactor,aCylUnits); - } - - if(!myOverlappedSphere.IsNull() && IsOverlappedSphereDisplayed){ - myOverlappedSphere->PolygonOffsets(aOffsetMode,aFactor,aSphereUnits); - } - - if(!myOverlappedBox.IsNull() && IsOverlappedBoxDisplayed){ - myOverlappedBox->PolygonOffsets(aOffsetMode,aFactor,aBoxUnits); - } - - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - pCmdUI->SetCheck(TRUE); - else - pCmdUI->SetCheck(FALSE); - if (IsAnyOverlappedObjectDisplayed) - if(myOffsetDlg) - pCmdUI->Enable(!myOffsetDlg->IsWindowVisible()); - else - pCmdUI->Enable(TRUE); - else - pCmdUI->Enable(FALSE); -} - -void CViewer3dDoc::OnUpdateCylinder(CCmdUI* pCmdUI) -{ - pCmdUI->Enable(myCylinder.IsNull()); -} - -void CViewer3dDoc::OnUpdateSphere(CCmdUI* pCmdUI) -{ - pCmdUI->Enable(mySphere.IsNull()); -} - -void CViewer3dDoc::OnUpdateBox(CCmdUI* pCmdUI) -{ - pCmdUI->Enable(myBox.IsNull()); -} - -void CViewer3dDoc::OnUpdateOverlappedCylinder(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (myOverlappedCylinder.IsNull() - || myCylinder.IsNull()); - -} - -void CViewer3dDoc::OnUpdateOverlappedSphere(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (myOverlappedSphere.IsNull() - || mySphere.IsNull()); -} - -void CViewer3dDoc::OnUpdateOverlappedBox(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (myOverlappedBox.IsNull() - || myBox.IsNull()); -} - -void CViewer3dDoc::OnObjectRemove() -{ - // A small trick to avoid compiler error (C2668). - const Handle(AIS_InteractiveObject)& aBox = myBox; - if(myAISContext->IsSelected (aBox)) - myBox.Nullify(); - - const Handle(AIS_InteractiveObject)& aCylinder = myCylinder; - if(myAISContext->IsSelected (aCylinder)) - myCylinder.Nullify(); - - const Handle(AIS_InteractiveObject)& aSphere = mySphere; - if(myAISContext->IsSelected (aSphere)) - mySphere.Nullify(); - - const Handle(AIS_InteractiveObject)& anOverlappedBox = myOverlappedBox; - if(myAISContext->IsSelected (anOverlappedBox)) - myOverlappedBox.Nullify(); - - const Handle(AIS_InteractiveObject)& anOverlappedCylinder = myOverlappedCylinder; - if(myAISContext->IsSelected (anOverlappedCylinder)) - myOverlappedCylinder.Nullify(); - - const Handle(AIS_InteractiveObject)& anOverlappedSphere = myOverlappedSphere; - if(myAISContext->IsSelected (anOverlappedSphere)) - myOverlappedSphere.Nullify(); - - - for(myAISContext->InitSelected();myAISContext->MoreSelected();myAISContext->InitSelected()) - myAISContext->Remove(myAISContext->SelectedInteractive(),Standard_True); - - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - -void CViewer3dDoc::OnObjectErase() - -{ - OCC_3dBaseDoc::OnObjectErase(); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - -void CViewer3dDoc::OnObjectDisplayall() - -{ - OCC_3dBaseDoc::OnObjectDisplayall(); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - -Handle(User_Cylinder) CViewer3dDoc::GetCylinder() -{ - return myCylinder; -} - - -Handle(AIS_Shape) CViewer3dDoc::GetSphere() -{ - return mySphere; -} - -Handle(AIS_Shape) CViewer3dDoc::GetBox() -{ - return myBox; -} - -Handle(AIS_Shape) CViewer3dDoc::GetOverlappedCylinder() -{ - return myOverlappedCylinder; -} - - -Handle(AIS_Shape) CViewer3dDoc::GetOverlappedSphere() -{ - return myOverlappedSphere; -} - -Handle(AIS_Shape) CViewer3dDoc::GetOverlappedBox() -{ - return myOverlappedBox; -} - -void CViewer3dDoc::DragEvent (const Standard_Integer theX, - const Standard_Integer theY, - const Standard_Integer theState, - const Handle(V3d_View)& theView) -{ - OCC_3dBaseDoc::DragEvent (theX, theY, theState, theView); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - -//----------------------------------------------------------------------------------------- -// -//----------------------------------------------------------------------------------------- -void CViewer3dDoc::InputEvent(const Standard_Integer /*x*/, - const Standard_Integer /*y*/, - const Handle(V3d_View)& /*aView*/ ) -{ - if (myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); - - Quantity_Color CSFColor; - COLORREF MSColor; - myAISContext->SelectDetected(); - - // Change the color of a selected face in a user cylinder - if (myState == FACE_COLOR) - { - myAISContext->InitSelected(); - if (myAISContext->MoreSelected()) - { - Handle(AIS_InteractiveObject) Current = myAISContext->SelectedInteractive(); - if (Current->HasColor()) - { - myAISContext->Color (Current, CSFColor); - MSColor = RGB (CSFColor.Red()*255.0, CSFColor.Green()*255.0, CSFColor.Blue()*255.0); - } - else - { - MSColor = RGB (255, 255, 255); - } - - CColorDialog dlgColor(MSColor); - if (dlgColor.DoModal() == IDOK) - { - MSColor = dlgColor.GetColor(); - CSFColor = Quantity_Color (GetRValue (MSColor)/255.0, - GetGValue (MSColor)/255.0, - GetBValue (MSColor)/255.0, - Quantity_TOC_RGB); - - Handle(AIS_InteractiveObject) aSelectedObject = myAISContext->SelectedInteractive(); - Handle(User_Cylinder)::DownCast (aSelectedObject)->SetColor (CSFColor); - - myAISContext->Redisplay (aSelectedObject, Standard_True); - myState = -1; - } - } - - myCResultDialog.SetTitle("Change face color"); - myCResultDialog.SetText( " Handle(AIS_InteractiveObject) aSelectedObject = myAISContext->SelectedInteractive(); \n" - " Handle(User_Cylinder)::DownCast(aSelectedObject)->SetColor (CSFColor); \n" - " myAISContext->Redisplay (myAISContext->Current(), Standard_True); \n" - " \n" - " \n" - " NOTE: a User_Cylinder is an object defined by the user. \n" - " The User_Cylinder class inherit from the AIS_InteractiveObject \n" - " Cascade class, it's use is the same as an AIS_InteractiveObject. \n" - " \n"); - SetTitle (L"Change face color"); - } -} - -//----------------------------------------------------------------------------------------- -// -//----------------------------------------------------------------------------------------- -void CViewer3dDoc::ShiftDragEvent (const Standard_Integer theX, - const Standard_Integer theY, - const Standard_Integer theState, - const Handle(V3d_View)& theView) -{ - OCC_3dBaseDoc::ShiftDragEvent(theX, theY, theState, theView); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - - -//----------------------------------------------------------------------------------------- -// -//----------------------------------------------------------------------------------------- -void CViewer3dDoc::ShiftInputEvent (const Standard_Integer theX, - const Standard_Integer theY, - const Handle(V3d_View)& theView) -{ - OCC_3dBaseDoc::ShiftInputEvent (theX, theY, theView); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - -void CViewer3dDoc::OnObjectColoredMesh() -{ - for(myAISContext->InitSelected();myAISContext->MoreSelected();myAISContext->NextSelected()) - if (myAISContext->SelectedInteractive()->IsKind(STANDARD_TYPE(User_Cylinder))) - { - myAISContext->ClearPrs(myAISContext->SelectedInteractive(),6,Standard_False); - myAISContext->RecomputePrsOnly(myAISContext->SelectedInteractive(), Standard_False); - myAISContext->SetDisplayMode(myAISContext->SelectedInteractive(), 6, Standard_False); - } - - myAISContext->UpdateCurrentViewer(); -} - -void CViewer3dDoc::OnUpdateObjectColoredMesh(CCmdUI* pCmdUI) -{ - bool CylinderIsCurrentAndDisplayed = false; - for (myAISContext->InitSelected();myAISContext->MoreSelected ();myAISContext->NextSelected ()) - if(myAISContext->SelectedInteractive()->IsKind(STANDARD_TYPE(User_Cylinder))) - CylinderIsCurrentAndDisplayed=true; - pCmdUI->Enable (CylinderIsCurrentAndDisplayed); -} - -void CViewer3dDoc::OnUpdateObjectWireframe(CCmdUI* pCmdUI) -{ - bool OneOrMoreInShadingOrColoredMesh = false; - for (myAISContext->InitSelected();myAISContext->MoreSelected ();myAISContext->NextSelected ()) - if (myAISContext->IsDisplayed(myAISContext->SelectedInteractive(), 1) || myAISContext->IsDisplayed(myAISContext->SelectedInteractive(), 6)) - OneOrMoreInShadingOrColoredMesh=true; - pCmdUI->Enable (OneOrMoreInShadingOrColoredMesh); -} - - -void CViewer3dDoc::OnUpdateObjectShading(CCmdUI* pCmdUI) -{ - bool OneOrMoreInWireframeOrColoredMesh = false; - for (myAISContext->InitSelected();myAISContext->MoreSelected ();myAISContext->NextSelected ()) - if (myAISContext->IsDisplayed(myAISContext->SelectedInteractive(),0) || myAISContext->IsDisplayed(myAISContext->SelectedInteractive(),6)) - OneOrMoreInWireframeOrColoredMesh=true; - pCmdUI->Enable (OneOrMoreInWireframeOrColoredMesh); -} - -void CViewer3dDoc::OnOptionsTrihedronDynamicTrihedron() -{ - if (myAISContext -> IsDisplayed(myTrihedron)) - { - myAISContext->Remove(myTrihedron, Standard_True); - } - else - { - Handle(Geom_Axis2Placement) myTrihedronAxis=new Geom_Axis2Placement(gp::XOY()); - myTrihedron=new AIS_Trihedron(myTrihedronAxis); - myAISContext->SetTrihedronSize(200, Standard_False); - myAISContext->Display(myTrihedron, Standard_True); - } -} - -void CViewer3dDoc::OnUpdateOptionsTrihedronDynamicTrihedron(CCmdUI* pCmdUI) -{ - if (myAISContext->IsDisplayed(myTrihedron)) - pCmdUI->SetCheck(1); - else - pCmdUI->SetCheck(0); -} - -void CViewer3dDoc::SetMyStaticTrihedronAxisIsDisplayed(BOOL IsDisplayed) -{ - myStaticTrihedronAxisIsDisplayed = IsDisplayed; -} - -void CViewer3dDoc::OnUpdateOptionsTrihedronStaticTrihedron(CCmdUI* pCmdUI) -{ - if (myStaticTrihedronAxisIsDisplayed) - pCmdUI->SetCheck(1); - else - pCmdUI->SetCheck(0); - -} - -void CViewer3dDoc::Popup (const Standard_Integer x, - const Standard_Integer y , - const Handle(V3d_View)& aView) -{ - myPopupMenuNumber=0; - // Specified check for context menu number to call - myAISContext->InitSelected(); - if (myAISContext->MoreSelected()) - { - if (myAISContext->SelectedInteractive()->IsKind(STANDARD_TYPE(User_Cylinder))) - { - myPopupMenuNumber = 2; - //return; - } - } - OCC_3dBaseDoc::Popup(x,y, aView); -} - -//Set faces selection mode -void CViewer3dDoc::OnFaces() -{ - myAISContext->Deactivate(); - myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_FACE)); - - myCResultDialog.SetTitle("Standard mode: TopAbs_FACE"); - myCResultDialog.SetText(" myAISContext->Deactivate();\n" - " myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_FACE));\n\n"); - SetTitle (L"Standard mode: TopAbs_FACE"); -} - -//Set edges selection mode -void CViewer3dDoc::OnEdges() -{ - myAISContext->Deactivate(); - myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE)); - - myCResultDialog.SetTitle("Standard mode: TopAbs_EDGE"); - myCResultDialog.SetText(" myAISContext->Deactivate();\n" - " myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));\n\n"); - SetTitle (L"Standard mode: TopAbs_EDGE"); -} - -// Set vertices selection mode -void CViewer3dDoc::OnVertices() -{ - myAISContext->Deactivate(); - myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_VERTEX)); - - myCResultDialog.SetTitle("Standard mode: TopAbs_VERTEX"); - myCResultDialog.SetText(" myAISContext->Deactivate();\n" - " myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_VERTEX));\n\n"); - SetTitle (L"Standard mode: TopAbs_VERTEX"); -} - -//Neutral selection mode -void CViewer3dDoc::OnNeutral() -{ - myAISContext->Deactivate(); - myAISContext->Activate (0); - - myCResultDialog.SetTitle("Standard mode: Neutral"); - myCResultDialog.SetText(" myAISContext->Deactivate();\n" - " myAISContext->Activate (0);\n\n"); - SetTitle (L"Standard mode: Neutral"); -} - -// Change the color of faces on a user cylinder -void CViewer3dDoc::OnUsercylinderChangefacecolor() -{ - myAISContext->Activate (myAISContext->SelectedInteractive(), AIS_Shape::SelectionMode (TopAbs_FACE)); - myState = FACE_COLOR; - // see the following of treatment in inputevent -} - -// Make 3d fillets on solids -// It is necessary to activate the edges selection mode and select edges on an object -// before running this function -void CViewer3dDoc::OnFillet3d() -{ - myAISContext->InitSelected(); - if (myAISContext->MoreSelected()) - { - Handle(AIS_Shape) aSelInteractive (Handle(AIS_Shape)::DownCast (myAISContext->SelectedInteractive())); - if (aSelInteractive.IsNull()) - { - AfxMessageBox (L"It is necessary to activate the edges selection mode\n" - L"and select edges on an object before \nrunning this function"); - return; - } - - BRepFilletAPI_MakeFillet aFillet (aSelInteractive->Shape()); - - for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected()) - { - const TopoDS_Shape& aSelShape = myAISContext->SelectedShape(); - if (aSelShape.ShapeType() != TopAbs_EDGE) - { - AfxMessageBox (L"It is necessary to activate the edges selection mode\n" - L"and select edges on an object before \nrunning this function"); - return; - } - } - - BoxRadius aDialog (NULL,10.); - if (aDialog.DoModal() == IDOK) - { - for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected()) - { - // Selected shape has its own location, and sub-shapes in the solid shape for fillet building - // don't have own locations. Fillet builder needs to know that input edge is just the same one as - // some sub-shape in our target solid shape, so no location is to be in input edge for fillet builder. - TopoDS_Shape aSelShape = myAISContext->SelectedShape().Located (TopLoc_Location()); - aFillet.Add (aDialog.m_radius, TopoDS::Edge (aSelShape) ); - } - } - else - { - return; - } - - TopoDS_Shape aNewShape; - try - { - aNewShape = aFillet.Shape(); - } - catch (Standard_Failure) - { - AfxMessageBox (L"Error During Fillet computation"); - return; - } - - aSelInteractive ->Set (aNewShape); - myAISContext->Redisplay (aSelInteractive, Standard_True); - } - - myCResultDialog.SetTitle("Make a fillet"); - myCResultDialog.SetText(" Handle(AIS_Shape) S = Handle(AIS_Shape)::DownCast(myAISContext->Interactive()); \n" - " \n" - " BRepAPI_MakeFillet aFillet(S->Shape()); \n" - " \n" - " TopoDS_Edge anEdge=TopoDS::Edge(myAISContext->SelectedShape()); \n" - " \n" - " aFillet.Add(dlg.m_radius,anEdge); \n" - " \n" - " TopoDS_Shape aNewShape = aFillet.Shape(); \n" - " \n" - " S->Set(aNewShape); \n" - " \n" - " myAISContext->Redisplay(S); \n" - " \n"); - SetTitle (L"Make a fillet"); -} - -// Create and display a circle with standard tools -void CViewer3dDoc::OnCircle() -{ - gp_Ax2 anAx2 (gp_Pnt (0., 0., 0.), gp_Dir(0., 0., -1.)); - Handle(Geom_Circle) aGeomCircle = new Geom_Circle (anAx2, 300); - - // the lines above substitute - // GC_MakeCircle C(gp_Pnt(-100.,-300.,0.),gp_Pnt(-50.,-200.,0.),gp_Pnt(-10.,-250.,0.)); - // Handle(AIS_Circle) anAISCirc = new AIS_Circle(C.Value()); - - Handle(AIS_Circle) anAISCirc = new AIS_Circle(aGeomCircle); - myAISContext->Display (anAISCirc, Standard_True); - - myCResultDialog.SetTitle("Create a circle"); - myCResultDialog.SetText(" GC_MakeCircle C(gp_Pnt(-100.,-300.,0.),gp_Pnt(-50.,-200.,0.),gp_Pnt(-10.,-250.,0.)); \n" - " \n" - " Handle(AIS_Circle) anAISCirc = new AIS_Circle(C.Value()); \n" - " \n" - " myAISContext->Display(anAISCirc); \n" - " \n"); - SetTitle (L"Create a circle"); -} - -void CViewer3dDoc::OnLine() -{ - // TODO: Add your command handler code here - gp_Lin aGpLin (gp_Pnt (0., 0., 0.), gp_Dir(1., 0., 0.)); - Handle(Geom_Line) aGeomLin = new Geom_Line (aGpLin); - Handle(AIS_Line) anAISLine = new AIS_Line (aGeomLin); - myAISContext->Display (anAISLine, Standard_True); - - myCResultDialog.SetTitle("Create a line"); - myCResultDialog.SetText(" gp_Lin L(gp_Pnt(0.,0.,0.),gp_Dir(1.,0.,0.)); \n" - " \n" - " Handle(Geom_Line) aLine = new Geom_Line(L); \n" - " \n" - " Handle(AIS_Line) anAISLine = new AIS_Line(aLine); \n" - " \n" - " myAISContext->Display(anAISLine); \n" - " \n"); - SetTitle (L"Create a line"); -} - -void CViewer3dDoc::OnNbisos() -{ - int aNumU = myAISContext->DefaultDrawer()->UIsoAspect()->Number(); - int aNumV = myAISContext->DefaultDrawer()->VIsoAspect()->Number(); - - DlgIsos aDlg (NULL, aNumU, aNumV); - - if (aDlg.DoModal() == IDOK) - { - myAISContext->DefaultDrawer()->UIsoAspect()->SetNumber (aDlg.m_isou); - myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber (aDlg.m_isov); - - myCResultDialog.SetTitle("Iso Aspect"); - myCResultDialog.SetText(" myAISContext->DefaultDrawer()->UIsoAspect()->SetNumber(dlg.m_isou); \n" - " \n" - " myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber(dlg.m_isov); \n" - " \n"); - SetTitle (L"Iso Aspect"); - } -} - -BOOL CViewer3dDoc::OnNewDocument() -{ - if (!CDocument::OnNewDocument()) - return FALSE; - - // TODO: add reinitialization code here - // (SDI documents will reuse this document) - SetTitle(myPresentation->GetName()); - - myAISContext->EraseAll (Standard_False); - myAISContext->SetDisplayMode(AIS_Shaded, Standard_True); - - POSITION pos = GetFirstViewPosition(); - while (pos != NULL) - { - CViewer3dView* pView = (CViewer3dView*) GetNextView(pos); - pView->Reset(); - } - - return TRUE; -} - -void CViewer3dDoc::OnFileNew() -{ - OnNewDocument(); -} - -void CViewer3dDoc::InitViewButtons() -{ - POSITION pos = GetFirstViewPosition(); - while (pos != NULL) - { - CViewer3dView* pView = (CViewer3dView*) GetNextView(pos); - pView->InitButtons(); - } -} - -void CViewer3dDoc::OnTextureOn() -{ - isTextureSampleStarted = TRUE; - Start(); -} - -void CViewer3dDoc::DoSample() -{ - InitViewButtons(); - - HCURSOR hOldCursor = ::GetCursor(); - HCURSOR hNewCursor = AfxGetApp()->LoadStandardCursor(IDC_APPSTARTING); - - SetCursor(hNewCursor); - { - try - { - myPresentation->DoSample(); - } - catch (Standard_Failure const& anException) - { - Standard_SStream aSStream; - aSStream << "An exception was caught: " << anException << std::ends; - CString aMsg = aSStream.str().c_str(); - AfxMessageBox (aMsg); - } - } - SetCursor(hOldCursor); -} - -void CViewer3dDoc::OnBUTTONStart() -{ - myAISContext->EraseAll (Standard_True); - myPresentation->FirstSample(); - DoSample(); -} - -void CViewer3dDoc::OnBUTTONEnd() -{ - myAISContext->EraseAll (Standard_True); - myPresentation->LastSample(); - DoSample(); -} - -void CViewer3dDoc::OnBUTTONRepeat() -{ - DoSample(); -} - -void CViewer3dDoc::OnBUTTONNext() -{ - if (!myPresentation->AtLastSample()) - { - myPresentation->NextSample(); - DoSample(); - } -} - -void CViewer3dDoc::OnBUTTONPrev() -{ - if (!myPresentation->AtFirstSample()) - { - myPresentation->PrevSample(); - DoSample(); - } -} - -void CViewer3dDoc::OnUpdateBUTTONNext(CCmdUI* pCmdUI) -{ - if ( isTextureSampleStarted ) - pCmdUI->Enable (!myPresentation->AtLastSample()); - else - pCmdUI->Enable (FALSE); -} - -void CViewer3dDoc::OnUpdateBUTTONPrev(CCmdUI* pCmdUI) -{ - if ( isTextureSampleStarted ) - pCmdUI->Enable (!myPresentation->AtFirstSample()); - else - pCmdUI->Enable (FALSE); -} - -void CViewer3dDoc::OnUpdateBUTTONStart(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (isTextureSampleStarted); -} - -void CViewer3dDoc::OnUpdateBUTTONRepeat(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (isTextureSampleStarted); -} - -void CViewer3dDoc::OnUpdateBUTTONEnd(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (isTextureSampleStarted); -} - -void CViewer3dDoc::OnDumpView() -{ - for (POSITION aPos = GetFirstViewPosition(); aPos != NULL;) - { - CViewer3dView* pView = (CViewer3dView* )GetNextView (aPos); - pView->UpdateWindow(); - } - - Handle(V3d_View) aView = myViewer->ActiveViews().First(); - ExportView (aView); -} - -void CViewer3dDoc::Start() -{ - myPresentation->Init(); - OnBUTTONStart(); -} - -void CViewer3dDoc::Fit() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->FitAll(); -} diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.h b/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.h deleted file mode 100755 index 69a4a708a4..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.h +++ /dev/null @@ -1,159 +0,0 @@ -// Viewer3dDoc.h : interface of the CViewer3dDoc class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_) -#define AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include "OCCDemo_Presentation.h" -#include "OffsetDlg.h" -#include "OCC_3dDoc.h" -#include "ResultDialog.h" -#include "User_Cylinder.hxx" - - -#include -#include -#include - -class COffsetDlg; -class OCCDemo_Presentation; - -class CViewer3dDoc : public OCC_3dDoc -{ - DECLARE_DYNCREATE(CViewer3dDoc) - -protected: // create from serialization only - CViewer3dDoc(); - void InitViewButtons(); - void DoSample(); - -public: - void SetMyStaticTrihedronAxisIsDisplayed(BOOL IsDisplayed); - Handle(AIS_Shape) GetBox(); - Handle(AIS_Shape) GetSphere(); - Handle(User_Cylinder) GetCylinder(); - Handle(AIS_Shape) GetOverlappedBox(); - Handle(AIS_Shape) GetOverlappedSphere(); - Handle(AIS_Shape) GetOverlappedCylinder(); - void Start(); - Standard_CString GetDataDir() {return myDataDir;} - static void Fit(); - - virtual ~CViewer3dDoc(); - void UpdateResultMessageDlg (CString theTitle, const TCollection_AsciiString& theMessage); - void UpdateResultMessageDlg (CString theTitle, CString theMessage); - virtual BOOL OnNewDocument(); - virtual void Popup (const Standard_Integer x, - const Standard_Integer y, - const Handle(V3d_View)& aView); - - virtual void DragEvent (const Standard_Integer x, - const Standard_Integer y, - const Standard_Integer TheState, - const Handle(V3d_View)& aView); - - virtual void InputEvent (const Standard_Integer x, - const Standard_Integer y, - const Handle(V3d_View)& aView); - - virtual void ShiftDragEvent (const Standard_Integer x, - const Standard_Integer y, - const Standard_Integer TheState, - const Handle(V3d_View)& aView); - - virtual void ShiftInputEvent (const Standard_Integer x, - const Standard_Integer y, - const Handle(V3d_View)& aView); - -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - - // Generated message map functions -protected: - BOOL myStaticTrihedronAxisIsDisplayed; - //{{AFX_MSG(CViewer3dDoc) - afx_msg void OnBox(); - afx_msg void OnCylinder(); - afx_msg void OnSphere(); - afx_msg void OnRemoveAll(); - afx_msg void OnNbisos(); - afx_msg void OnFaces(); - afx_msg void OnEdges(); - afx_msg void OnVertices(); - afx_msg void OnNeutral(); - afx_msg void OnUsercylinderChangefacecolor(); - afx_msg void OnFillet3d(); - afx_msg void OnCircle(); - afx_msg void OnLine(); - afx_msg void OnOverlappedBox(); - afx_msg void OnOverlappedCylinder(); - afx_msg void OnOverlappedSphere(); - afx_msg void OnPolygonOffsets(); - afx_msg void OnUpdatePolygonOffsets(CCmdUI* pCmdUI); - afx_msg void OnUpdateCylinder(CCmdUI* pCmdUI); - afx_msg void OnUpdateSphere(CCmdUI* pCmdUI); - afx_msg void OnUpdateBox(CCmdUI* pCmdUI); - afx_msg void OnUpdateOverlappedCylinder(CCmdUI* pCmdUI); - afx_msg void OnUpdateOverlappedSphere(CCmdUI* pCmdUI); - afx_msg void OnUpdateOverlappedBox(CCmdUI* pCmdUI); - afx_msg void OnObjectRemove(); - afx_msg void OnObjectErase(); - afx_msg void OnObjectDisplayall(); - afx_msg void OnObjectColoredMesh(); - afx_msg void OnUpdateObjectColoredMesh(CCmdUI* pCmdUI); - afx_msg void OnUpdateObjectShading(CCmdUI* pCmdUI); - afx_msg void OnUpdateObjectWireframe(CCmdUI* pCmdUI); - afx_msg void OnOptionsTrihedronDynamicTrihedron(); - afx_msg void OnUpdateOptionsTrihedronDynamicTrihedron(CCmdUI* pCmdUI); - afx_msg void OnUpdateOptionsTrihedronStaticTrihedron(CCmdUI* pCmdUI); - afx_msg void OnTextureOn(); - afx_msg void OnBUTTONNext(); - afx_msg void OnBUTTONStart(); - afx_msg void OnBUTTONRepeat(); - afx_msg void OnBUTTONPrev(); - afx_msg void OnBUTTONEnd(); - afx_msg void OnUpdateBUTTONNext(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPrev(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONStart(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONRepeat(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONEnd(CCmdUI* pCmdUI); - afx_msg void OnFileNew(); - afx_msg void OnBUTTONShowResult(); - afx_msg void OnDumpView(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - - //Attributes -protected: - int myState; - -private: - COffsetDlg* myOffsetDlg; - - Handle(User_Cylinder) myCylinder; - Handle(AIS_Shape) mySphere; - Handle(AIS_Shape) myBox; - Handle(AIS_Shape) myOverlappedCylinder; - Handle(AIS_Shape) myOverlappedSphere; - Handle(AIS_Shape) myOverlappedBox; - Handle(AIS_Trihedron) myTrihedron; - - OCCDemo_Presentation *myPresentation; - char myDataDir[5]; // for "Data\0" - char myLastPath[MAX_PATH]; // directory of lastly saved file in DumpView() - bool isTextureSampleStarted; -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp b/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp deleted file mode 100755 index 62f5df3316..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp +++ /dev/null @@ -1,1180 +0,0 @@ -// Viewer3dView.cpp : implementation of the CViewer3dView class -// - -#include "stdafx.h" - -#include "Viewer3dView.h" - -#include "OCC_MainFrame.h" -#include "Viewer3dApp.h" -#include "Viewer3dDoc.h" -#include "ScaleDlg.h" -#include "ShadingModelDlg.h" -#include "ModelClippingDlg.h" -#include "TrihedronDlg.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define ValZWMin 1 -#define X_Key 0x58 -#define Y_Key 0x59 -#define Z_Key 0x5A - -#define ModelClipping - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -//gp_Pnt ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView); - - gp_Pnt p1,p2,p3; - Handle(AIS_Shape) spotConeShape=new AIS_Shape(TopoDS_Solid()); - Handle(AIS_Shape) directionalEdgeShape=new AIS_Shape(TopoDS_Edge()); - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dView - -IMPLEMENT_DYNCREATE(CViewer3dView, CView) - -BEGIN_MESSAGE_MAP(CViewer3dView, CView) - //{{AFX_MSG_MAP(CViewer3dView) - ON_COMMAND(ID_BUTTONAxo, OnBUTTONAxo) - ON_COMMAND(ID_BUTTONBack, OnBUTTONBack) - ON_COMMAND(ID_BUTTONBottom, OnBUTTONBottom) - ON_COMMAND(ID_BUTTONFront, OnBUTTONFront) - ON_COMMAND(ID_BUTTONHlrOff, OnBUTTONHlrOff) - ON_COMMAND(ID_BUTTONHlrOn, OnBUTTONHlrOn) - ON_COMMAND(ID_BUTTONLeft, OnBUTTONLeft) - ON_COMMAND(ID_BUTTONPan, OnBUTTONPan) - ON_COMMAND(ID_BUTTONPanGlo, OnBUTTONPanGlo) - ON_COMMAND(ID_BUTTONReset, OnBUTTONReset) - ON_COMMAND(ID_BUTTONRight, OnBUTTONRight) - ON_COMMAND(ID_BUTTONRot, OnBUTTONRot) - ON_COMMAND(ID_BUTTONTop, OnBUTTONTop) - ON_COMMAND(ID_BUTTONZoomAll, OnBUTTONZoomAll) - ON_WM_SIZE() - ON_COMMAND(ID_BUTTONZoomProg, OnBUTTONZoomProg) - ON_COMMAND(ID_BUTTONZoomWin, OnBUTTONZoomWin) - ON_WM_LBUTTONDOWN() - ON_WM_KEYDOWN() - ON_WM_LBUTTONUP() - ON_WM_MBUTTONDOWN() - ON_WM_MBUTTONUP() - ON_WM_MOUSEMOVE() - ON_WM_RBUTTONDOWN() - ON_WM_RBUTTONUP() - ON_UPDATE_COMMAND_UI(ID_BUTTONHlrOff, OnUpdateBUTTONHlrOff) - ON_UPDATE_COMMAND_UI(ID_BUTTONHlrOn, OnUpdateBUTTONHlrOn) - ON_UPDATE_COMMAND_UI(ID_BUTTONPanGlo, OnUpdateBUTTONPanGlo) - ON_UPDATE_COMMAND_UI(ID_BUTTONPan, OnUpdateBUTTONPan) - ON_UPDATE_COMMAND_UI(ID_BUTTONZoomProg, OnUpdateBUTTONZoomProg) - ON_UPDATE_COMMAND_UI(ID_BUTTONZoomWin, OnUpdateBUTTONZoomWin) - ON_UPDATE_COMMAND_UI(ID_BUTTONRot, OnUpdateBUTTONRot) - ON_COMMAND(ID_Modify_ChangeBackground , OnModifyChangeBackground) - ON_COMMAND(ID_DIRECTIONAL_LIGHT, OnDirectionalLight) - ON_COMMAND(ID_SPOT_LIGHT, OnSpotLight) - ON_COMMAND(ID_POSITIONAL_LIGHT, OnPositionalLight) - ON_COMMAND(ID_AMBIENT_LIGHT, OnAmbientLight) - ON_COMMAND(ID_SCALE, OnScale) - ON_COMMAND(ID_SHADINGMODEL, OnShadingmodel) - ON_COMMAND(ID_ANTIALIASINGONOFF, OnAntialiasingonoff) - ON_COMMAND(ID_CLEAR_LIGHTS, OnClearLights) - ON_COMMAND(ID_MODELCLIPPING, OnModelclipping) - ON_COMMAND(ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON, OnOptionsTrihedronStaticTrihedron) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dView construction/destruction - -CViewer3dView::CViewer3dView() -: scaleX (1), - scaleY (1), - scaleZ (1), - myVisMode (VIS_SHADE), - myCurrentMode (CurAction3d_Nothing), - myXmin (0), - myYmin (0), - myXmax (0), - myYmax (0), - myCurZoom (0.0), - NbActiveLights (2), // There are 2 default active lights - myHlrModeIsOn (Standard_False), - myRect (new AIS_RubberBand (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0)), - myAxisKey (0), - myScaleDirection (0) -{ - // TODO: add construction code here - myGraphicDriver = ((CViewer3dApp*)AfxGetApp())->GetGraphicDriver(); -} - -CViewer3dView::~CViewer3dView() -{ - myView->Remove(); -} - -BOOL CViewer3dView::PreCreateWindow(CREATESTRUCT& cs) -{ - // TODO: Modify the Window class or styles here by modifying - // the CREATESTRUCT cs - cs.lpszClass = ::AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC, ::LoadCursor(NULL, IDC_ARROW), NULL, NULL); - return CView::PreCreateWindow(cs); -} - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dView drawing -void CViewer3dView::OnInitialUpdate() -{ - CView::OnInitialUpdate(); - - myView = GetDocument()->GetViewer()->CreateView(); - - // store for restore state after rotation (witch is in Degenerated mode) - myHlrModeIsOn = Standard_False; - myView->SetComputedMode (myHlrModeIsOn); - - Handle(WNT_Window) aWNTWindow = new WNT_Window (GetSafeHwnd()); - myView->SetWindow(aWNTWindow); - if (!aWNTWindow->IsMapped()) aWNTWindow->Map(); - - // Standard_Integer w=100 , h=100 ; /* Debug Matrox */ - // aWNTWindow->Size (w,h) ; /* Keeps me unsatisfied (rlb)..... */ - /* Resize is not supposed to be done on */ - /* Matrox */ - /* I suspect another problem elsewhere */ - // ::PostMessage ( GetSafeHwnd () , WM_SIZE , SIZE_RESTORED , w + h*65536 ) ; - - // store the mode ( nothing , dynamic zooming, dynamic ... ) - myCurrentMode = CurAction3d_Nothing; - myVisMode = VIS_SHADE; - RedrawVisMode(); -} - -void CViewer3dView::OnDraw(CDC* /*pDC*/) -{ - CViewer3dDoc* pDoc = GetDocument(); - ASSERT_VALID(pDoc); - myView->Redraw(); -} - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dView diagnostics - -#ifdef _DEBUG -void CViewer3dView::AssertValid() const -{ - CView::AssertValid(); -} - -void CViewer3dView::Dump(CDumpContext& dc) const -{ - CView::Dump(dc); -} - -CViewer3dDoc* CViewer3dView::GetDocument() // non-debug version is inline -{ - ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CViewer3dDoc))); - return (CViewer3dDoc*)m_pDocument; -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dView message handlers - -gp_Pnt ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView) -{ - Standard_Real XEye,YEye,ZEye,XAt,YAt,ZAt; - aView->Eye(XEye,YEye,ZEye); - aView->At(XAt,YAt,ZAt); - gp_Pnt EyePoint(XEye,YEye,ZEye); - gp_Pnt AtPoint(XAt,YAt,ZAt); - - gp_Vec EyeVector(EyePoint,AtPoint); - gp_Dir EyeDir(EyeVector); - - gp_Pln PlaneOfTheView = gp_Pln(AtPoint,EyeDir); - Standard_Real X,Y,Z; - aView->Convert(int(x),int(y),X,Y,Z); - gp_Pnt ConvertedPoint(X,Y,Z); - gp_Pnt2d ConvertedPointOnPlane = ProjLib::Project(PlaneOfTheView,ConvertedPoint); - - gp_Pnt ResultPoint = ElSLib::Value(ConvertedPointOnPlane.X(), - ConvertedPointOnPlane.Y(), - PlaneOfTheView); - return ResultPoint; -} - -void CViewer3dView::OnSize(UINT nType, int cx, int cy) -{ - CView::OnSize (nType, cx, cy); - if (!myView.IsNull()) - myView->MustBeResized(); -} - -void CViewer3dView::OnBUTTONBack() -{ - myView->SetProj(V3d_Ypos); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_Ypos);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the back View -void CViewer3dView::OnBUTTONFront() -{ - myView->SetProj(V3d_Yneg); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_Yneg);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the front View - -void CViewer3dView::OnBUTTONBottom() -{ - myView->SetProj(V3d_Zneg); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_Zneg);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the bottom View -void CViewer3dView::OnBUTTONTop() -{ - myView->SetProj(V3d_Zpos); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_Zpos);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the top View - -void CViewer3dView::OnBUTTONLeft() -{ - myView->SetProj(V3d_Xneg); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_Xneg);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the left View -void CViewer3dView::OnBUTTONRight() -{ - myView->SetProj(V3d_Xpos); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_Xpos);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the right View - -void CViewer3dView::OnBUTTONAxo() -{ - myView->SetProj(V3d_XposYnegZpos); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_XposYnegZpos);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the axonometric View - -void CViewer3dView::OnBUTTONHlrOff() -{ - myHlrModeIsOn = Standard_False; - myView->SetComputedMode (myHlrModeIsOn); - myView->Redraw(); - - TCollection_AsciiString aMsg ("myView->SetComputedMode (Standard_False);\n" - " "); - - // Update The Result Message Dialog - GetDocument()->UpdateResultMessageDlg ("SetComputedMode", aMsg); -} - -void CViewer3dView::OnBUTTONHlrOn() -{ - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myHlrModeIsOn = Standard_True; - myView->SetComputedMode (myHlrModeIsOn); - myView->Redraw(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); - - TCollection_AsciiString aMsg ("myView->SetComputedMode (Standard_True);\n" - " "); - - // Update The Result Message Dialog - GetDocument()->UpdateResultMessageDlg ("SetComputedMode", aMsg); -} - -void CViewer3dView::OnBUTTONPan() -{ myCurrentMode = CurAction3d_DynamicPanning; } - -void CViewer3dView::OnBUTTONPanGlo() -{ - // save the current zoom value - myCurZoom = myView->Scale(); - // Do a Global Zoom - myView->FitAll(); - // Set the mode - myCurrentMode = CurAction3d_GlobalPanning; -} - -void CViewer3dView::OnBUTTONReset() -{ myView->Reset(); } - -void CViewer3dView::OnBUTTONRot() -{ myCurrentMode = CurAction3d_DynamicRotation; } - - -void CViewer3dView::OnBUTTONZoomAll() -{ - myView->FitAll(); - myView->ZFitAll(); -} - -void CViewer3dView::OnBUTTONZoomProg() -{ myCurrentMode = CurAction3d_DynamicZooming; } - -void CViewer3dView::OnBUTTONZoomWin() -{ myCurrentMode = CurAction3d_WindowZooming; } - -void CViewer3dView::OnLButtonDown(UINT nFlags, CPoint point) -{ - // save the current mouse coordinate in min - myXmin=point.x; myYmin=point.y; - myXmax=point.x; myYmax=point.y; - - if ( nFlags & MK_CONTROL ) - { - // Button MB1 down Control :start zomming - // SetCursor(AfxGetApp()->LoadStandardCursor()); - } - else // if ( Ctrl ) - { - switch (myCurrentMode) - { - case CurAction3d_Nothing : // start a drag - if (nFlags & MK_SHIFT) - GetDocument()->ShiftDragEvent(myXmax,myYmax,-1,myView); - else - GetDocument()->DragEvent(myXmax,myYmax,-1,myView); - break; - break; - case CurAction3d_DynamicZooming : // noting - break; - case CurAction3d_WindowZooming : - break; - case CurAction3d_DynamicPanning :// noting - break; - case CurAction3d_GlobalPanning :// noting - break; - case CurAction3d_DynamicRotation : - if (myHlrModeIsOn) - { - myView->SetComputedMode (Standard_False); - } - myView->StartRotation (point.x, point.y); - break; - case CurAction3d_BeginPositionalLight : - { - p1 = ConvertClickToPoint(point.x,point.y,myView); - myCurrent_PositionalLight->SetPosition(p1.X(),p1.Y(),p1.Z()) ; - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Ready"); - myCurrentMode = CurAction3d_Nothing; - -TCollection_AsciiString Message("\ -myCurrent_PositionalLight->SetPosition(Xp, Yp, Zp) ;\n\ -"); -// Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetPosition",Message); - } - break; - case CurAction3d_BeginSpotLight : - { - p1 = ConvertClickToPoint(point.x,point.y,myView); - myCurrent_SpotLight = new V3d_SpotLight (p1, gp_Dir (gp_XYZ (0.0, 0.0, 1.0) - p1.XYZ()), Quantity_NOC_RED); - myView->SetLightOn(myCurrent_SpotLight); - NbActiveLights++; - p2 = gp_Pnt(p1.X(),p1.Y(),p1.Z()+1.); - Standard_Real coneHeigth=p1.Distance(p2); - BRepPrimAPI_MakeCone MakeCone(gp_Ax2(p1, gp_Dir(gp_Vec(p1, p2))), - 0, (p1.Distance(p2))/tan(1.04), coneHeigth); - spotConeShape->Set(MakeCone.Solid()); - GetDocument()->GetAISContext()->Display (spotConeShape, 0, -1, false); - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick the target point"); - myCurrentMode = CurAction3d_TargetSpotLight; - -TCollection_AsciiString Message("\ -myCurrent_SpotLight->SetDirection(Xv, Yv, Zv);\n\ -"); -// Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetDirection",Message); - } - break; - case CurAction3d_TargetSpotLight : - { - p2 = ConvertClickToPoint(point.x,point.y,myView); - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick a third point (to define the angle)"); - myCurrentMode = CurAction3d_EndSpotLight; - -TCollection_AsciiString Message("\ -myCurrent_SpotLight->SetAngle(Angle) ;\n\ -"); -// Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetAngle",Message); - } - break; - case CurAction3d_EndSpotLight : - GetDocument()->GetAISContext()->Erase (spotConeShape, Standard_True); - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Ready"); - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_BeginDirectionalLight: - { - p1 = ConvertClickToPoint(point.x,point.y,myView); - p2 = gp_Pnt(p1.X(),p1.Y(),p1.Z()+1.); - BRepBuilderAPI_MakeEdge MakeEdge(p1, p2); - directionalEdgeShape->Set(MakeEdge.Edge()); - GetDocument()->GetAISContext()->Display (directionalEdgeShape, 0, -1, Standard_True); - // Create a directional light - myCurrent_DirectionalLight = new V3d_DirectionalLight (gp_Dir (p1.XYZ() - gp_XYZ (0.,0.,1.))); - myView->SetLightOn(myCurrent_DirectionalLight); - NbActiveLights++; - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick the target point"); - myCurrentMode = CurAction3d_EndDirectionalLight; - - -TCollection_AsciiString Message("\ -myCurrent_DirectionalLight->SetDirection(Xv, Yv, Zv);\n\ -"); -// Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetDirection",Message); - } - break; - case CurAction3d_EndDirectionalLight: - GetDocument()->GetAISContext()->Erase (directionalEdgeShape, Standard_True); - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Ready"); - myCurrentMode = CurAction3d_Nothing; - break; - } - } -} - -void CViewer3dView::OnKeyDown(UINT nChar, UINT /*nRepCnt*/, UINT /*nFlags*/) -{ - - if( nChar == X_Key || nChar == Y_Key || nChar == Z_Key ) - myAxisKey = nChar; - else if( (nChar == VK_ADD || nChar == VK_SUBTRACT) && myAxisKey ) - { - myScaleDirection = nChar; - if( myAxisKey && myScaleDirection ) - { - switch( myAxisKey ) - { - case X_Key: - if( myScaleDirection == VK_ADD ) scaleX ++; - if( myScaleDirection == VK_SUBTRACT ) scaleX --; - break; - case Y_Key: - if( myScaleDirection == VK_ADD ) scaleY ++; - if( myScaleDirection == VK_SUBTRACT ) scaleY --; - break; - case Z_Key: - if( myScaleDirection == VK_ADD ) scaleZ ++; - if( myScaleDirection == VK_SUBTRACT ) scaleZ --; - break; - default: - break; - } - if( scaleX < 1 ) scaleX = 1; - if( scaleY < 1 ) scaleY = 1; - if( scaleZ < 1 ) scaleZ = 1; - - myView->SetAxialScale( scaleX, scaleY, scaleZ ); - } - } -} - -void CViewer3dView::OnLButtonUp(UINT nFlags, CPoint point) -{ - if ( nFlags & MK_CONTROL ) - { - return; - } - else // if ( Ctrl ) - { - switch (myCurrentMode) - { - case CurAction3d_Nothing : - if (point.x == myXmin && point.y == myYmin) - { // no offset between down and up --> selectEvent - myXmax=point.x; - myYmax=point.y; - if (nFlags & MK_SHIFT ) - GetDocument()->ShiftInputEvent(point.x,point.y,myView); - else - GetDocument()->InputEvent (point.x,point.y,myView); - } else - { - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); - myXmax=point.x; - myYmax=point.y; - if (nFlags & MK_SHIFT) - GetDocument()->ShiftDragEvent(point.x,point.y,1,myView); - else - GetDocument()->DragEvent(point.x,point.y,1,myView); - } - break; - case CurAction3d_DynamicZooming : - // SetCursor(AfxGetApp()->LoadStandardCursor()); - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_WindowZooming : - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); - myXmax=point.x; - myYmax=point.y; - if ((abs(myXmin-myXmax)>ValZWMin) || (abs(myYmin-myYmax)>ValZWMin)) - // Test if the zoom window is greater than a minimale window. - { - // Do the zoom window between Pmin and Pmax - myView->WindowFitAll(myXmin,myYmin,myXmax,myYmax); - } - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_DynamicPanning : - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_GlobalPanning : - myView->Place(point.x,point.y,myCurZoom); - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_DynamicRotation : - myCurrentMode = CurAction3d_Nothing; - break; - } //switch (myCurrentMode) - } // else // if ( Ctrl ) -} - -void CViewer3dView::OnMButtonDown(UINT nFlags, CPoint /*point*/) -{ - if ( nFlags & MK_CONTROL ) - { - // Button MB2 down Control : panning init - // SetCursor(AfxGetApp()->LoadStandardCursor()); - } -} - -void CViewer3dView::OnMButtonUp(UINT nFlags, CPoint /*point*/) -{ - if ( nFlags & MK_CONTROL ) - { - // Button MB2 down Control : panning init - // SetCursor(AfxGetApp()->LoadStandardCursor()); - } -} - -void CViewer3dView::OnRButtonDown(UINT nFlags, CPoint point) -{ - if ( nFlags & MK_CONTROL ) - { - // SetCursor(AfxGetApp()->LoadStandardCursor()); - if (myHlrModeIsOn) - { - myView->SetComputedMode (Standard_False); - } - myView->StartRotation (point.x, point.y); - } - else // if ( Ctrl ) - { - GetDocument()->Popup (point.x, point.y, myView); - } -} - -void CViewer3dView::OnRButtonUp(UINT /*nFlags*/, CPoint /*point*/) -{ - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - if (myHlrModeIsOn) - { - myView->SetComputedMode (myHlrModeIsOn); - myView->Redraw(); - } - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); -} - -void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point) -{ - // ============================ LEFT BUTTON ======================= - if ( nFlags & MK_LBUTTON) - { - if ( nFlags & MK_CONTROL ) - { - // move with MB1 and Control : on the dynamic zooming - // Do the zoom in function of mouse's coordinates - myView->Zoom(myXmax,myYmax,point.x,point.y); - // save the current mouse coordinate in min - myXmax = point.x; - myYmax = point.y; - } - else // if ( Ctrl ) - { - switch (myCurrentMode) - { - case CurAction3d_Nothing : - - myXmax = point.x; myYmax = point.y; - if (nFlags & MK_SHIFT) - GetDocument()->ShiftDragEvent(myXmax,myYmax,0,myView); - else - GetDocument()->DragEvent(myXmax,myYmax,0,myView); - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True); - break; - case CurAction3d_DynamicZooming : - myView->Zoom(myXmax,myYmax,point.x,point.y); - // save the current mouse coordinate in min \n"; - myXmax=point.x; myYmax=point.y; - break; - case CurAction3d_WindowZooming : - myXmax = point.x; myYmax = point.y; - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True, Aspect_TOL_DASH); - - break; - case CurAction3d_DynamicPanning : - myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; - break; - case CurAction3d_GlobalPanning : // nothing - break; - case CurAction3d_DynamicRotation : - myView->Rotation(point.x,point.y); - myView->Redraw(); - break; - }// switch (myCurrentMode) - }// if ( nFlags & MK_CONTROL ) else - } else // if ( nFlags & MK_LBUTTON) - // ============================ MIDDLE BUTTON ======================= - if ( nFlags & MK_MBUTTON) - { - if ( nFlags & MK_CONTROL ) - { - myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; - - } - } else // if ( nFlags & MK_MBUTTON) - // ============================ RIGHT BUTTON ======================= - if ( nFlags & MK_RBUTTON) - { - if ( nFlags & MK_CONTROL ) - { - myView->Rotation(point.x,point.y); - } - }else //if ( nFlags & MK_RBUTTON) - // ============================ NO BUTTON ======================= - { // No buttons - myXmax = point.x; myYmax = point.y; - if (myCurrentMode == CurAction3d_EndDirectionalLight) - { - p2 = ConvertClickToPoint(point.x,point.y,myView); - //Update the light dynamically - if( p1.Distance(p2)>Precision::Confusion()) - { - BRepBuilderAPI_MakeEdge MakeEdge(p1, p2); - directionalEdgeShape->Set(MakeEdge.Edge()); - GetDocument()->GetAISContext()->Redisplay(directionalEdgeShape,0,Standard_True); - myCurrent_DirectionalLight->SetDirection(p2.X()-p1.X(),p2.Y()-p1.Y(),p2.Z()-p1.Z()); - myView->UpdateLights(); - myView->Redraw(); - } - } - else if (myCurrentMode == CurAction3d_BeginPositionalLight) - { - p2 = ConvertClickToPoint(point.x,point.y,myView); - //Update the light dynamically - myCurrent_PositionalLight->SetPosition(p2.X(),p2.Y(),p2.Z()); - myView->UpdateLights(); - myView->Redraw(); - } - else if (myCurrentMode == CurAction3d_TargetSpotLight) - { - p2 = ConvertClickToPoint(point.x,point.y,myView); - //Update the light dynamically - Standard_Real coneHeigth=p1.Distance(p2); - if( coneHeigth>Precision::Confusion()) - { - BRepPrimAPI_MakeCone MakeCone(gp_Ax2(p1, gp_Dir(gp_Vec(p1, p2))), - 0, (p1.Distance(p2))/tan(1.04), coneHeigth); - spotConeShape->Set(MakeCone.Solid()); - GetDocument()->GetAISContext()->Redisplay(spotConeShape,0,Standard_True); - myCurrent_SpotLight->SetDirection(p2.X()-p1.X(),p2.Y()-p1.Y(),p2.Z()-p1.Z()); - myView->UpdateLights(); - myView->Redraw(); - } - } - else if (myCurrentMode == CurAction3d_EndSpotLight) - { - p3 = ConvertClickToPoint(point.x,point.y,myView); - //Update the light dynamically - Standard_Real coneHeigth=p1.Distance(p2); - if( (p2.Distance(p3))>Precision::Confusion()) - { - BRepPrimAPI_MakeCone MakeCone(gp_Ax2(p1, gp_Dir(gp_Vec(p1, p2))), - 0, p2.Distance(p3), coneHeigth); - spotConeShape->Set(MakeCone.Solid()); - GetDocument()->GetAISContext()->Redisplay(spotConeShape,0,Standard_True); - myCurrent_SpotLight->SetAngle((float )atan(p2.Distance(p3)/p1.Distance(p2))) ; - myView->UpdateLights(); - myView->Redraw(); - } - } - else if (nFlags & MK_SHIFT) - { - GetDocument()->ShiftMoveEvent(point.x,point.y,myView); - } - else - { - GetDocument()->MoveEvent(point.x,point.y,myView); - } - } -} - -void CViewer3dView::OnUpdateBUTTONHlrOff (CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (!myHlrModeIsOn); - pCmdUI->Enable (myHlrModeIsOn); -} - -void CViewer3dView::OnUpdateBUTTONHlrOn (CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myHlrModeIsOn); - pCmdUI->Enable (!myHlrModeIsOn); -} - -void CViewer3dView::OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_GlobalPanning); - pCmdUI->Enable (myCurrentMode != CurAction3d_GlobalPanning); - -} - -void CViewer3dView::OnUpdateBUTTONPan(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicPanning); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicPanning ); -} - -void CViewer3dView::OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicZooming ); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicZooming); -} - -void CViewer3dView::OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_WindowZooming); - pCmdUI->Enable (myCurrentMode != CurAction3d_WindowZooming); -} - -void CViewer3dView::OnUpdateBUTTONRot(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicRotation); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicRotation); -} - -void CViewer3dView::DrawRectangle (Standard_Integer theMinX, - Standard_Integer theMinY, - Standard_Integer theMaxX, - Standard_Integer theMaxY, - Standard_Boolean theToDraw, - Aspect_TypeOfLine theLineType) -{ - const Handle(AIS_InteractiveContext)& aCtx = GetDocument()->GetAISContext(); - if (!theToDraw) - { - aCtx->Remove (myRect, false); - aCtx->CurrentViewer()->RedrawImmediate(); - return; - } - - CRect aRect; - GetWindowRect (aRect); - myRect->SetLineType (theLineType); - myRect->SetRectangle (theMinX, aRect.Height() - theMinY, theMaxX, aRect.Height() - theMaxY); - if (!aCtx->IsDisplayed (myRect)) - { - aCtx->Display (myRect, false); - } - else - { - aCtx->Redisplay (myRect, false); - } - aCtx->CurrentViewer()->RedrawImmediate(); -} - -void CViewer3dView::OnModifyChangeBackground() -{ - Standard_Real R1; - Standard_Real G1; - Standard_Real B1; - myView->BackgroundColor(Quantity_TOC_RGB,R1,G1,B1); - COLORREF m_clr ; - m_clr = RGB(R1*255,G1*255,B1*255); - - CColorDialog dlgColor(m_clr); - if (dlgColor.DoModal() == IDOK) - { - m_clr = dlgColor.GetColor(); - R1 = GetRValue(m_clr)/255.; - G1 = GetGValue(m_clr)/255.; - B1 = GetBValue(m_clr)/255.; - myView->SetBackgroundColor(Quantity_TOC_RGB,R1,G1,B1); - } - myView->Redraw(); -} - -void CViewer3dView::OnDirectionalLight() -{ -// Directional light source creation - -// Checking if the Active lights limit number is not reached - if( NbActiveLights>=myGraphicDriver->InquireLightLimit() ) - { - CString aMsg; - aMsg.Format (L"You have reach the limit number of active lights (%d).\n Clear lights to create new ones.", myGraphicDriver->InquireLightLimit()); - MessageBox (aMsg, L"Light creation", MB_OK); - return; - } - - UpdateData(TRUE); - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick a first point"); - myCurrentMode = CurAction3d_BeginDirectionalLight; - -TCollection_AsciiString Message("\ -myCurrent_DirectionalLight = new V3d_DirectionalLight (gp_Dir (theDirection));\n\ -\n\ -myView->SetLightOn(myCurrent_DirectionalLight);\n\ -\n\ -"); -// Update The Result Message Dialog - GetDocument()->UpdateResultMessageDlg("V3d_DirectionalLight",Message); -} - -void CViewer3dView::OnSpotLight() -{ -// Spot light source creation - -// Checking if the Active lights limit number is not reached - if( NbActiveLights>=myGraphicDriver->InquireLightLimit() ) - { - CString aMsg; - aMsg.Format(L"You have reach the limit number of active lights (%d).\n Clear lights to create new ones.", myGraphicDriver->InquireLightLimit()); - MessageBox (aMsg, L"Light creation", MB_OK); - return; - } - - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick the light position"); - myCurrentMode = CurAction3d_BeginSpotLight; - -TCollection_AsciiString Message("\ -myCurrent_SpotLight = new V3d_SpotLight (gp_Pnt (thePosition), gp_Dir (theDirection), Quantity_NOC_RED);\n\ -\n\ -myView->SetLightOn(myCurrent_SpotLight);\n\ -\n\ -"); -// Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("V3d_SpotLight",Message); -} - -void CViewer3dView::OnPositionalLight() -{ -// Positional light source creation - -// Checking if the Active lights limit number is not reached - if( NbActiveLights>=myGraphicDriver->InquireLightLimit() ) - { - CString aMsg; - aMsg.Format(L"You have reach the limit number of active lights (%d).\n Clear lights to create new ones.", myGraphicDriver->InquireLightLimit()); - MessageBox(aMsg, L"Light creation", MB_OK); - return; - } - - myCurrent_PositionalLight=new V3d_PositionalLight (gp_Pnt (0,0,0), Quantity_NOC_GREEN); - myCurrent_PositionalLight->SetAttenuation (1, 0); - myView->SetLightOn(myCurrent_PositionalLight); - NbActiveLights++; - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick the light position"); - myCurrentMode = CurAction3d_BeginPositionalLight; - -TCollection_AsciiString Message("\ -myCurrent_PositionalLight=new V3d_PositionalLight (gp_Pnt(thePosition),Quantity_NOC_GREEN);\n\ -myCurrent_PositionalLight->SetAttenuation (1, 0);\n\ -\n\ -myView->SetLightOn(myCurrent_PositionalLight) ;\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("V3d_PositionalLight",Message); -} - -void CViewer3dView::OnAmbientLight() -{ -// Ambiant light source creation - -// Checking if the Active lights limit number is not reached - if( NbActiveLights>=myGraphicDriver->InquireLightLimit() ) - { - CString aMsg; - aMsg.Format(L"You have reach the limit number of active lights (%d).\n Clear lights to create new ones.", myGraphicDriver->InquireLightLimit()); - MessageBox(aMsg, L"Light creation", MB_OK); - return; - } - - myCurrent_AmbientLight=new V3d_AmbientLight (Quantity_NOC_GRAY); - myView->SetLightOn(myCurrent_AmbientLight) ; - NbActiveLights++; - - myView->UpdateLights(); - myView->Redraw(); - -TCollection_AsciiString Message("\ -myCurrent_AmbientLight=new V3d_AmbientLight(Quantity_NOC_GRAY);\n\ -\n\ -myView->SetLightOn(myCurrent_AmbientLight) ;\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("V3d_AmbientLight",Message); -} - - -void CViewer3dView::OnScale() -{ - ScaleDlg Dlg(myView, this); - Dlg.DoModal(); - myView->Redraw(); -} - -//V3d_View.hxx - -void CViewer3dView::OnShadingmodel() -{ -TCollection_AsciiString Message("\ -myView->SetShadingModel(V3d_TypeOfShadingModel myTypeOfShadingModel);\n\ -\n\ -myCurrent_V3d_View->Update();\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetShadingModel",Message); - - CShadingModelDlg Dlg(myView); - Dlg.DoModal(); - myView->Redraw(); -} - - -void CViewer3dView::OnAntialiasingonoff() -{ - Graphic3d_RenderingParams& aParams = myView->ChangeRenderingParams(); - aParams.NbMsaaSamples = aParams.NbMsaaSamples == 0 ? 8 : 0; - myView->Update(); - -TCollection_AsciiString Message("\ -Graphic3d_RenderingParams& aParams = myView->ChangeRenderingParams();\n\ -aParams.NbMsaaSamples = aParams.NbMsaaSamples == 0 ? 8 : 0;\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetAntialiasingOn/SetAntialiasingOff",Message); -} - -void CViewer3dView::OnClearLights() -{ -// Setting Off all viewer active lights - V3d_ListOfLight lights; - for (V3d_ListOfLightIterator anIter = myView->Viewer()->ActiveLightIterator(); anIter.More(); anIter.Next()) - { - lights.Append (anIter.Value()); - } - V3d_ListOfLightIterator itrLights(lights); - for (; itrLights.More(); itrLights.Next()) - { - myView->Viewer()->SetLightOff (itrLights.Value()); - } - -// Setting Off all view active lights - lights.Clear(); - for (V3d_ListOfLightIterator anIter = myView->ActiveLightIterator(); anIter.More(); anIter.Next()) - { - lights.Append (anIter.Value()); - } - itrLights.Initialize (lights); - for (; itrLights.More(); itrLights.Next()) - { - myView->SetLightOff (itrLights.Value()); - } - - myView->Viewer()->SetDefaultLights(); // Setting the default lights on - - NbActiveLights = 2; // There are 2 default active lights - - myView->Update(); - -TCollection_AsciiString Message("\ -// Setting Off all viewer active lights\n\ -V3d_ListOfLight lights;\n\ -for (V3d_ListOfLightIterator anIter = myView->Viewer()->ActiveLightIterator(); anIter.More(); anIter.Next())\n\ -{\n\ - lights.Append (anIter.Value());\n\ -}\n\ -V3d_ListOfLightIterator itrLights(lights);\n\ -for (; itrLights.More(); itrLights.Next())\n\ -{\n\ - myView->Viewer()->SetLightOff (itrLights.Value())\n\ -}\n\ -\n\ -// Setting Off all view active lights\n\ -lights.Clear();\n\ -for (V3d_ListOfLightIterator anIter = myView->ActiveLightIterator(); anIter.More(); anIter.Next())\n\ -{\n\ - lights.Append (anIter.Value());\n\ -}\n\ -itrLights.Initialize(lights);\n\ -for (; itrLights.More(); itrLights.Next())\n\ -{\n\ - myView->SetLightOff (itrLights.Value());\n\ -}\n\ -\n\ -myView->Viewer()->SetDefaultLights();// Setting the default lights on\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetLightOff",Message); -} - -void CViewer3dView::OnModelclipping() -{ - if (myClippingPlane.IsNull()) - { - gp_Pln aClipPlane (gp_Pnt (0.0, 0.0, 0.0), gp_Dir (1.0, 0.0, 0.0)); - gp_Pln aFacePlane (gp_Pnt (0.1, 0.0, 0.0), gp_Dir (1.0, 0.0, 0.0)); - - // create clipping plane and add to view - myClippingPlane = new Graphic3d_ClipPlane (aClipPlane); - - // shape to represent clipping plane - BRepBuilderAPI_MakeFace aMakeFaceCommand (aFacePlane, 200.0, -200.0, 410.0, -410.0); - TopoDS_Face aShape = aMakeFaceCommand.Face(); - myShape = new AIS_Shape (aShape); - myShape->SetTransparency (0.5); - } - - CModelClippingDlg aClippingDlg (myView, myShape, myClippingPlane, GetDocument()); - - aClippingDlg.DoModal(); -} - -void CViewer3dView::OnOptionsTrihedronStaticTrihedron() -{ - CTrihedronDlg Dlg(myView, GetDocument()); - Dlg.DoModal(); -} - -void CViewer3dView::InitButtons() -{ - myXmin=0; - myYmin=0; - myXmax=0; - myYmax=0; - myCurZoom=0; - myCurrentMode = CurAction3d_Nothing; -} - -void CViewer3dView::Reset() -{ - InitButtons(); - myVisMode = VIS_SHADE; - if (!myView.IsNull()) - { - RedrawVisMode(); - myView->Reset(); - } -} - -void CViewer3dView::GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const -{ - myView->At (theX, theY, theZ); -} - -void CViewer3dView::SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ) -{ - myView->SetAt (theX, theY, theZ); -} - -void CViewer3dView::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) -{ - myView->Eye(X,Y,Z); -} - -void CViewer3dView::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) -{ - myView->SetEye(X,Y,Z); -} - -Standard_Real CViewer3dView::GetViewScale() -{ - return myView->Scale(); -} - -void CViewer3dView::SetViewScale(Standard_Real Coef) -{ - myView->SetScale(Coef); -} - -void CViewer3dView::RedrawVisMode() -{ - switch (myVisMode) - { - case VIS_WIREFRAME: - GetDocument()->GetAISContext()->SetDisplayMode (AIS_WireFrame, Standard_True); - myView->SetComputedMode (Standard_False); - myView->Redraw(); - break; - case VIS_SHADE: - GetDocument()->GetAISContext()->SetDisplayMode (AIS_Shaded, Standard_True); - myView->SetComputedMode (Standard_False); - myView->Redraw(); - break; - case VIS_HLR: - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myView->SetComputedMode (Standard_True); - myView->Redraw(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); - GetDocument()->GetAISContext()->SetDisplayMode (AIS_WireFrame, Standard_True); - break; - } -} diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h b/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h deleted file mode 100755 index 1f2d3495df..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h +++ /dev/null @@ -1,173 +0,0 @@ -// Viewer3dView.h : interface of the CViewer3dView class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_VIEWERVIEW_H__4EF39FBC_4EBB_11D1_8D67_0800369C8A03__INCLUDED_) -#define AFX_VIEWERVIEW_H__4EF39FBC_4EBB_11D1_8D67_0800369C8A03__INCLUDED_ - -#include - -#include -#include -#include -#include -#include - -#include - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -enum View3D_CurrentAction { - CurAction3d_Nothing, - CurAction3d_DynamicZooming, - CurAction3d_WindowZooming, - CurAction3d_DynamicPanning, - CurAction3d_GlobalPanning, - CurAction3d_DynamicRotation, - CurAction3d_BeginSpotLight, - CurAction3d_TargetSpotLight, - CurAction3d_EndSpotLight, - CurAction3d_BeginPositionalLight, - CurAction3d_BeginDirectionalLight, - CurAction3d_EndDirectionalLight -}; - -class AIS_RubberBand; - -class CViewer3dView : public CView -{ -protected: // create from serialization only - CViewer3dView(); - DECLARE_DYNCREATE(CViewer3dView) - -public: - CViewer3dDoc* GetDocument(); - void Redraw() { myView->Redraw(); }; - void InitButtons(); - void Reset(); - void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const; - void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ); - void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z); - void SetViewEye (const Standard_Real X,const Standard_Real Y,const Standard_Real Z); - Standard_Real GetViewScale(); - void SetViewScale (const Standard_Real Coef); - void FitAll() { myView->FitAll(); myView->ZFitAll(); }; - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CViewer3dView) - public: - virtual void OnDraw(CDC* pDC); // overridden to draw this view - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - virtual void OnInitialUpdate(); - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~CViewer3dView(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - - int scaleX; - int scaleY; - int scaleZ; - -protected: - -// Generated message map functions -protected: - //{{AFX_MSG(CViewer3dView) - afx_msg void OnBUTTONAxo(); - afx_msg void OnBUTTONBack(); - afx_msg void OnBUTTONBottom(); - afx_msg void OnBUTTONFront(); - afx_msg void OnBUTTONHlrOff(); - afx_msg void OnBUTTONHlrOn(); - afx_msg void OnBUTTONLeft(); - afx_msg void OnBUTTONPan(); - afx_msg void OnBUTTONPanGlo(); - afx_msg void OnBUTTONReset(); - afx_msg void OnBUTTONRight(); - afx_msg void OnBUTTONRot(); - afx_msg void OnBUTTONTop(); - afx_msg void OnBUTTONZoomAll(); - afx_msg void OnSize(UINT nType, int cx, int cy); - afx_msg void OnBUTTONZoomProg(); - afx_msg void OnBUTTONZoomWin(); - afx_msg void OnLButtonDown(UINT nFlags, CPoint point); - afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); - afx_msg void OnLButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMButtonDown(UINT nFlags, CPoint point); - afx_msg void OnMButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnRButtonDown(UINT nFlags, CPoint point); - afx_msg void OnRButtonUp(UINT nFlags, CPoint point); - afx_msg void OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPan(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONRot(CCmdUI* pCmdUI); - afx_msg void OnModifyChangeBackground(); - afx_msg void OnDirectionalLight(); - afx_msg void OnSpotLight(); - afx_msg void OnPositionalLight(); - afx_msg void OnAmbientLight(); - afx_msg void OnScale(); - afx_msg void OnShadingmodel(); - afx_msg void OnAntialiasingonoff(); - afx_msg void OnClearLights(); - afx_msg void OnModelclipping(); - afx_msg void OnOptionsTrihedronStaticTrihedron(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -private: - enum VisMode { VIS_WIREFRAME, VIS_SHADE, VIS_HLR }; - VisMode myVisMode; - - Handle(V3d_View) myView; - Handle(Graphic3d_GraphicDriver) myGraphicDriver; - View3D_CurrentAction myCurrentMode; - Standard_Integer myXmin; - Standard_Integer myYmin; - Standard_Integer myXmax; - Standard_Integer myYmax; - - Standard_Integer NbActiveLights; - Standard_Boolean myHlrModeIsOn; - Standard_Real myCurZoom; - Handle(V3d_AmbientLight) myCurrent_AmbientLight; - Handle(V3d_SpotLight) myCurrent_SpotLight; - Handle(V3d_PositionalLight) myCurrent_PositionalLight; - Handle(V3d_DirectionalLight) myCurrent_DirectionalLight; - Handle(Graphic3d_ClipPlane) myClippingPlane; - Handle(AIS_Shape) myShape; - Handle(AIS_RubberBand) myRect; //!< Rubber rectangle for selection - -private: - - void DrawRectangle (Standard_Integer theMinX, Standard_Integer theMinY, Standard_Integer theMaxX, Standard_Integer theMaxY, - Standard_Boolean theToDraw, Aspect_TypeOfLine theLineType = Aspect_TOL_SOLID); - - UINT myAxisKey; - UINT myScaleDirection; - void RedrawVisMode(); - -}; - -#ifndef _DEBUG // debug version in Viewer3dView.cpp -inline CViewer3dDoc* CViewer3dView::GetDocument() - { return (CViewer3dDoc*)m_pDocument; } -#endif - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_VIEWERVIEW_H__4EF39FBC_4EBB_11D1_8D67_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/CMakeLists.txt b/samples/mfc/standard/06_Ocaf/CMakeLists.txt deleted file mode 100644 index 8a45d105ef..0000000000 --- a/samples/mfc/standard/06_Ocaf/CMakeLists.txt +++ /dev/null @@ -1,70 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (Ocaf) - -add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE) -set (CMAKE_MFC_FLAG 2) - -set (Ocaf_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/06_Ocaf/src) -set (Ocaf_HEADER_FILES ${Ocaf_SRC_DIR}/NewBoxDlg.h - ${Ocaf_SRC_DIR}/NewCylDlg.h - ${Ocaf_SRC_DIR}/OcafApp.h - ${Ocaf_SRC_DIR}/OcafDoc.h - ${Ocaf_SRC_DIR}/OcafMainFrm.h - ${Ocaf_SRC_DIR}/TOcaf_Commands.hxx - ${Ocaf_SRC_DIR}/StdAfx.h ) -set (Ocaf_SOURCE_FILES ${Ocaf_SRC_DIR}/NewBoxDlg.cpp - ${Ocaf_SRC_DIR}/NewCylDlg.cpp - ${Ocaf_SRC_DIR}/OcafApp.cpp - ${Ocaf_SRC_DIR}/OcafDoc.cpp - ${Ocaf_SRC_DIR}/OcafMainFrm.cpp - ${Ocaf_SRC_DIR}/TOcaf_Application.cxx - ${Ocaf_SRC_DIR}/TOcaf_Commands.cxx - ${Ocaf_SRC_DIR}/TOcafFunction_BoxDriver.cxx - ${Ocaf_SRC_DIR}/TOcafFunction_CutDriver.cxx - ${Ocaf_SRC_DIR}/TOcafFunction_CylDriver.cxx - ${Ocaf_SRC_DIR}/StdAfx.cpp ) - -set (Ocaf_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/06_Ocaf/res) -set (Ocaf_RESOURCE_HEADER ${Ocaf_RESOURCE_DIR}/resource.h) -set (Ocaf_RESOURCE_FILES ${Ocaf_RESOURCE_DIR}/ActionsTB.bmp - ${Ocaf_RESOURCE_DIR}/AIS_TB.bmp - ${Ocaf_RESOURCE_DIR}/Toolbar.bmp - ${Ocaf_RESOURCE_DIR}/UndoRedoTB.bmp - ${Ocaf_RESOURCE_DIR}/Ocaf.rc) - -# groups in the VS solution -source_group ("Source Files" FILES ${Ocaf_SOURCE_FILES} - ${COMMON_WINMAIN_FILE}) - -source_group ("Header Files" FILES ${Ocaf_HEADER_FILES} - ${Ocaf_RESOURCE_HEADER}) - -source_group ("Resource Files" FILES ${Ocaf_RESOURCE_FILES}) - -add_executable (Ocaf WIN32 ${Ocaf_SOURCE_FILES} - ${Ocaf_HEADER_FILES} - ${COMMON_WINMAIN_FILE} - ${Ocaf_RESOURCE_HEADER} - ${Ocaf_RESOURCE_FILES} ) - - -set_property (TARGET Ocaf PROPERTY FOLDER "Samples/mfc") - -if (SINGLE_GENERATOR) - install (TARGETS Ocaf DESTINATION "${INSTALL_DIR_BIN}") -else() - install (TARGETS Ocaf - CONFIGURATIONS Release RelWithDebInfo - DESTINATION "${INSTALL_DIR_BIN}") - install (TARGETS Ocaf - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_BIN}d") -endif() - -include_directories (${CMAKE_BINARY_DIR}/inc - ${MFC_STANDARD_SAMPLES_DIR}/06_Ocaf - ${Ocaf_SRC_DIR} - ${MFC_STANDARD_SAMPLES_DIR}/Common) - -target_link_libraries (Ocaf mfcsample TKLCAF TKVCAF TKBO TKBin TKXml TKBinL TKXmlL) diff --git a/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj b/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj deleted file mode 100644 index a68e892151..0000000000 --- a/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj +++ /dev/null @@ -1,493 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B} - Ocaf - MFCProj - - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ../../../../win32\$(VCFMT)\bin\ - .\win32\obj\ - false - ../../../../win64\$(VCFMT)\bin\ - .\win64\obj\ - false - ../../../../win32\$(VCFMT)\bind\ - .\win32\objd\ - true - ../../../../win64\$(VCFMT)\bind\ - .\win64\objd\ - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\obj/Ocaf.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\;..\..\..\src;...\..\..\res;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win32\obj/Ocaf.pch - .\win32\obj/ - .\win32\obj/ - .\win32\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bin/Ocaf.exe - true - ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win32\$(VCFMT)\bin/Ocaf.pdb - Windows - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\obj/Ocaf.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\;..\..\..\src;...\..\..\res;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win64\obj/Ocaf.pch - .\win64\obj/ - .\win64\obj/ - .\win64\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bin/Ocaf.exe - true - ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win64\$(VCFMT)\bin/Ocaf.pdb - Windows - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\objd/Ocaf.tlb - - - - - Disabled - ..\..\..\;..\..\..\src;...\..\..\res;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win32\objd/Ocaf.pch - .\win32\objd/ - .\win32\objd/ - .\win32\objd/ - Level4 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bind/Ocaf.exe - true - ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win32\$(VCFMT)\bind/Ocaf.pdb - Windows - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\objd/Ocaf.tlb - - - - - Disabled - ..\..\..\;..\..\..\src;...\..\..\res;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win64\objd/Ocaf.pch - .\win64\objd/ - .\win64\objd/ - .\win64\objd/ - Level4 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bind/Ocaf.exe - true - ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win64\$(VCFMT)\bind/Ocaf.pdb - Windows - MachineX64 - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - - - - - - - - - - - - - - - - - - - - - - - - - {2d6cbbe8-6965-4016-b503-0d715ae26691} - false - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj.filters b/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj.filters deleted file mode 100644 index 976b07f05b..0000000000 --- a/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj.filters +++ /dev/null @@ -1,112 +0,0 @@ - - - - - {3c30d6ca-d9bc-459f-99b6-9cc644fb9093} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {84ea6fae-dd93-4f6d-b50f-ed88ccc5ce98} - h;hpp;hxx;hm;inl - - - {185b7bc3-efac-469b-960c-918d0e30bc03} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/samples/mfc/standard/06_Ocaf/res/AIS_TB.bmp b/samples/mfc/standard/06_Ocaf/res/AIS_TB.bmp deleted file mode 100755 index f104c7f53fc3de755d25a032745f04af9b156d5c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 838 zcma))uTsP?5XQqFbBaOX&lJZyAaJ|`&rrc;rsCp~nF?fYhX=Tsdx6|dO&tb-L!ogD zu65ztB<;am1>Yr`T=tjkW|Q0dyE7H_2z!nGfPR5~qRwHJdOMB7j4?`~DPz(Ai>d0m z4x>0iY$^nqq2nh@Fho_`dV;ibR>n!$k=B`6ky|j4#};Agw%tvvOnh?GRi%jp*TP2@ zF5N=-z~$A~CpW;eLwm>)@FK>qBuqcYCx@2!;BC1qoI!j^bB=HDy?sv_`Paf1MdAti z#mnC)-s6nmQ$A~?LovQM`$In4&Fjl{gY)ro;w#9~x?GmC@sIc^K6tlCWjKzH3g&!r zd@66kApCgVT|Ad$mo%Oi>(-K`)qn=x=X%P0q5j;o{^K26vLn~iuD%^n$oXK;cwYw| wdvM26AKc^9U@Qf9{2nI$?|X2;2o7HImr&_l$t){7(mK0AaPa>VvlE5In@06c&8Lk{LeW*xUM!t4zz2=qbWed_sDPxO)eRGg!Ff?m{+uo8)@C zAH?uLJ|ixO22sfoS>#z+*-51(%Ye)*TRj^O=0R<(2ZNi#~Y+>o4Bl{TF`r2Ff-xg8vtvlAX}?JNyh} z*tIm>Ie!9%EiXFKU_IZQ{r;<7hhPsto)5D;*}Fe@4A(byQyPo&*o^KUJt=IBs?G-p RPNVz7c9m0Rx8w?D$S>nq*vkL_ diff --git a/samples/mfc/standard/06_Ocaf/res/UndoRedoTB.bmp b/samples/mfc/standard/06_Ocaf/res/UndoRedoTB.bmp deleted file mode 100755 index 2876a290b8b80accc0c33e864e589c49c258a997..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 358 zcmb7+I}QRd3`A!oB$r%)l5^1SHMVwz+Z-)N+8cx!n@E7t;CP+yb)&A- zh6@Rt$rTzvM{5;Grs%yhYB16)!69ZQ1+z6R#A1ZNR01h^#4+E;aM V*1qO->67|2UANvR>u@&yzzbh=YY+ec diff --git a/samples/mfc/standard/06_Ocaf/res/resource.h b/samples/mfc/standard/06_Ocaf/res/resource.h deleted file mode 100755 index b9b6a86669..0000000000 --- a/samples/mfc/standard/06_Ocaf/res/resource.h +++ /dev/null @@ -1,35 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by Ocaf.rc -// -#define IDR_ACTIONS 500 -#define IDR_UNDOREDO 520 -#define IDD_NEWBOX 529 -#define IDD_NEWCYL 530 -#define ID_WINDOW_NEW3D 1151 -#define ID_OBJECT_DELETE 1202 -#define IDC_R 1650 -#define IDC_X 1659 -#define IDC_L 1660 -#define IDC_Y 1663 -#define IDC_Z 1664 -#define IDC_H 1665 -#define IDC_W 1666 -#define IDC_NAME 1673 -#define ID_CREATEBOX 3000 -#define ID_CUT 3002 -#define ID_CREATECYL 3003 -#define ID_MODIFY 3004 -//#define ID_DFBR 3007 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 504 -#define _APS_NEXT_COMMAND_VALUE 3007 -#define _APS_NEXT_CONTROL_VALUE 1658 -#define _APS_NEXT_SYMED_VALUE 600 -#endif -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/DebugBrowser.hxx b/samples/mfc/standard/06_Ocaf/src/DebugBrowser.hxx deleted file mode 100755 index f788826c18..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/DebugBrowser.hxx +++ /dev/null @@ -1,113 +0,0 @@ -// File generated by CPPExt (Value) -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. - -#ifndef _DebugBrowser_HeaderFile -#define _DebugBrowser_HeaderFile - -#ifndef _Standard_Integer_HeaderFile -#include -#endif -class TDocStd_Document; -class DebugBrowser_Attr; -class DebugBrowser_DFTree; -class DebugBrowser_DFNode; -class DebugBrowser_AttrNode; -class DebugBrowser_LabelNode; -class DebugBrowser_ListNode; -class DebugBrowser_NSNode; -class DebugBrowser_GUI; -class DebugBrowser_DataMapOfIntegerExtString; -class DebugBrowser_QTGUI; -class DebugBrowser_DataMapNodeOfDataMapOfIntegerExtString; -class DebugBrowser_DataMapIteratorOfDataMapOfIntegerExtString; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -class DebugBrowser { - -public: - - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - // Methods PUBLIC - // -Standard_EXPORT static Standard_Integer DFBrowser(const Handle(TDocStd_Document)& theDoc) ; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - -friend class DebugBrowser_Attr; -friend class DebugBrowser_DFTree; -friend class DebugBrowser_DFNode; -friend class DebugBrowser_AttrNode; -friend class DebugBrowser_LabelNode; -friend class DebugBrowser_ListNode; -friend class DebugBrowser_NSNode; -friend class DebugBrowser_GUI; -friend class DebugBrowser_DataMapOfIntegerExtString; -friend class DebugBrowser_QTGUI; -friend class DebugBrowser_DataMapNodeOfDataMapOfIntegerExtString; -friend class DebugBrowser_DataMapIteratorOfDataMapOfIntegerExtString; - -}; - - - - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/NewBoxDlg.cpp b/samples/mfc/standard/06_Ocaf/src/NewBoxDlg.cpp deleted file mode 100755 index b670c73ed4..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/NewBoxDlg.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// NewBoxDlg.cpp : implementation file -// - -#include "stdafx.h" - -#include "NewBoxDlg.h" - -//#include "OcafApp.h" - -///////////////////////////////////////////////////////////////////////////// -// CNewBoxDlg dialog - -CNewBoxDlg::CNewBoxDlg(CWnd* pParent /*=NULL*/) - : CDialog(CNewBoxDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(CNewBoxDlg) - m_h = 10.0; - m_l = 15.0; - m_Name = _T("Box"); - m_w = 10.0; - m_x = 0.0; - m_y = 0.0; - m_z = 0.0; - //}}AFX_DATA_INIT -} - -void CNewBoxDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CNewBoxDlg) - DDX_Text(pDX, IDC_H, m_h); - DDX_Text(pDX, IDC_L, m_l); - DDX_Text(pDX, IDC_NAME, m_Name); - DDX_Text(pDX, IDC_W, m_w); - DDX_Text(pDX, IDC_X, m_x); - DDX_Text(pDX, IDC_Y, m_y); - DDX_Text(pDX, IDC_Z, m_z); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CNewBoxDlg, CDialog) - //{{AFX_MSG_MAP(CNewBoxDlg) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CNewBoxDlg message handlers - -void CNewBoxDlg::OnOK() -{ - UpdateData(TRUE); - if( (m_h<=Precision::Confusion()) || (m_l<=Precision::Confusion()) || (m_w<=Precision::Confusion()) ) - { - MessageBox (L"Length, height and width of a box should be srictly positives.", L"New box", MB_ICONEXCLAMATION); - return; - } - - CDialog::OnOK(); -} - -void CNewBoxDlg::InitFields(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w, Standard_Real l, Standard_Real h, const TCollection_ExtendedString &Name) -{ - m_x=x; - m_y=y; - m_z=z; - m_w=w; - m_l=l; - m_h=h; - TCollection_AsciiString AsciiName(Name); - m_Name=AsciiName.ToCString(); -} diff --git a/samples/mfc/standard/06_Ocaf/src/NewBoxDlg.h b/samples/mfc/standard/06_Ocaf/src/NewBoxDlg.h deleted file mode 100755 index caec9e74c2..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/NewBoxDlg.h +++ /dev/null @@ -1,53 +0,0 @@ -#if !defined(AFX_NEWBOXDLG_H__5A881DC0_7A5F_11D4_8D45_00AA00D10994__INCLUDED_) -#define AFX_NEWBOXDLG_H__5A881DC0_7A5F_11D4_8D45_00AA00D10994__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// NewBoxDlg.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CNewBoxDlg dialog - -class CNewBoxDlg : public CDialog -{ -// Construction -public: - void InitFields(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w, Standard_Real l, Standard_Real h, const TCollection_ExtendedString &Name); - CNewBoxDlg(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CNewBoxDlg) - enum { IDD = IDD_NEWBOX }; - double m_h; - double m_l; - CString m_Name; - double m_w; - double m_x; - double m_y; - double m_z; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CNewBoxDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CNewBoxDlg) - virtual void OnOK(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_NEWBOXDLG_H__5A881DC0_7A5F_11D4_8D45_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/src/NewCylDlg.cpp b/samples/mfc/standard/06_Ocaf/src/NewCylDlg.cpp deleted file mode 100755 index a7f9a1822a..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/NewCylDlg.cpp +++ /dev/null @@ -1,69 +0,0 @@ -// NewCylDlg.cpp : implementation file -// - -#include "stdafx.h" - -#include "NewCylDlg.h" - -//#include "OcafApp.h" - -///////////////////////////////////////////////////////////////////////////// -// CNewCylDlg dialog - -CNewCylDlg::CNewCylDlg(CWnd* pParent /*=NULL*/) - : CDialog(CNewCylDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(CNewCylDlg) - m_h = 20.0; - m_Name = _T("Cylinder"); - m_r = 10.0; - m_x = 0.0; - m_y = 0.0; - m_z = 0.0; - //}}AFX_DATA_INIT -} - -void CNewCylDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CNewCylDlg) - DDX_Text(pDX, IDC_H, m_h); - DDX_Text(pDX, IDC_NAME, m_Name); - DDX_Text(pDX, IDC_R, m_r); - DDX_Text(pDX, IDC_X, m_x); - DDX_Text(pDX, IDC_Y, m_y); - DDX_Text(pDX, IDC_Z, m_z); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CNewCylDlg, CDialog) - //{{AFX_MSG_MAP(CNewCylDlg) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CNewCylDlg message handlers - -void CNewCylDlg::OnOK() -{ - UpdateData(TRUE); - if( (m_h<=Precision::Confusion()) || (m_r<=Precision::Confusion()) ) - { - MessageBox (L"Radius and height of a cylinder should be srictly positives.", L"New box", MB_ICONEXCLAMATION); - return; - } - - CDialog::OnOK(); -} - -void CNewCylDlg::InitFields(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real r, Standard_Real h, const TCollection_ExtendedString &Name) -{ - m_x=x; - m_y=y; - m_z=z; - m_r=r; - m_h=h; - TCollection_AsciiString AsciiName(Name); - m_Name=AsciiName.ToCString(); -} diff --git a/samples/mfc/standard/06_Ocaf/src/NewCylDlg.h b/samples/mfc/standard/06_Ocaf/src/NewCylDlg.h deleted file mode 100755 index 640a8cdbe8..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/NewCylDlg.h +++ /dev/null @@ -1,52 +0,0 @@ -#if !defined(AFX_NEWCYLDLG_H__FFA9686D_8580_11D4_8D47_00AA00D10994__INCLUDED_) -#define AFX_NEWCYLDLG_H__FFA9686D_8580_11D4_8D47_00AA00D10994__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// NewCylDlg.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CNewCylDlg dialog - -class CNewCylDlg : public CDialog -{ -// Construction -public: - void InitFields(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real r, Standard_Real h, const TCollection_ExtendedString &Name); - CNewCylDlg(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CNewCylDlg) - enum { IDD = IDD_NEWCYL }; - double m_h; - CString m_Name; - double m_r; - double m_x; - double m_y; - double m_z; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CNewCylDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CNewCylDlg) - virtual void OnOK(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_NEWCYLDLG_H__FFA9686D_8580_11D4_8D47_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.cxx b/samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.cxx deleted file mode 100755 index 6658540682..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.cxx +++ /dev/null @@ -1,94 +0,0 @@ -// File: OCAFSample_CommonDriver.cxx -// Created: Wed Feb 13 18:24:21 2002 -// Author: Michael KUZMITCHEV -// -//Modified by: Sergey RUIN (Naming) - -#include "stdafx.h" - -#include -#include -#include - -#include "Tags.h" - -#include -#include -#include -#include -#include -#include - -#include - -#include -//#include <.hxx> - -#include - -#define OK_OPERATION 0 -#define TREENODE_NOT_FOUND 1 -#define LABEL_NOT_FOUND 2 -#define NAMED_SHAPE_NOT_FOUND 3 -#define NAMED_SHAPE_EMPTY 4 -#define OPERATION_NOT_DONE 8 -#define NULL_OPERATION 9 - -// OCCT RTTI -IMPLEMENT_STANDARD_RTTIEXT (OCAFSample_CommonDriver, OCAFSample_Driver) - -//======================================================================= -//function : Constructor -//purpose : -//======================================================================= - -OCAFSample_CommonDriver::OCAFSample_CommonDriver() -{ -} - -//======================================================================= -//function : Execute -//purpose : -//======================================================================= - -Standard_Integer OCAFSample_CommonDriver::Execute(Handle(TFunction_Logbook)& theLogbook) const -{ - Handle(TDF_Reference) aReference; - TopoDS_Shape aMaster, aTool; - - Handle(TDataStd_TreeNode) aNode; - if(!Label().FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), aNode)) return TREENODE_NOT_FOUND; - - OCAFSample_ICommon anInterface(aNode); - aMaster = anInterface.GetContext(); - aTool = anInterface.GetTool(); - - BRepAlgoAPI_Common mkCommon(aMaster, aTool); - if (!mkCommon.IsDone()) return OPERATION_NOT_DONE; - if (mkCommon.Shape().IsNull()) return NULL_OPERATION; - if (!BRepAlgo::IsValid(mkCommon.Shape())) - return OPERATION_NOT_DONE; - - - // Name result - TDF_Label ResultLabel = Label().FindChild(RESULTS_TAG); - - BRepNaming_Common aNaming(ResultLabel); - aNaming.Load(mkCommon); - - OCAFSample_IShape::AddLabels(aNode, theLogbook); - - TDocStd_Modified::Add(aNode->Father()->Label()); - - theLogbook->SetImpacted(Label()); - TDocStd_Modified::Add(Label()); - - theLogbook->SetImpacted(ResultLabel); - - TDF_ChildIterator anIterator(ResultLabel); - for(; anIterator.More(); anIterator.Next()) { - theLogbook->SetImpacted(anIterator.Value()); - } - - return OK_OPERATION; -} diff --git a/samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.hxx b/samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.hxx deleted file mode 100755 index cc88a0a3b4..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.hxx +++ /dev/null @@ -1,37 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. -// -#ifndef _OCAFSample_CommonDriver_HeaderFile -#define _OCAFSample_CommonDriver_HeaderFile - -#include -#include - -class TFunction_Logbook; - - -class OCAFSample_CommonDriver : public OCAFSample_Driver -{ -public: - - Standard_EXPORT OCAFSample_CommonDriver (); - Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& theLogbook) const; - Standard_EXPORT ~OCAFSample_CommonDriver (); - - // OCCT RTTI - DEFINE_STANDARD_RTTIEXT (OCAFSample_CommonDriver, OCAFSample_Driver) -}; - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.hxx b/samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.hxx deleted file mode 100755 index fc6d35edc0..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. -// -#ifndef _OCAFSample_Driver_HeaderFile -#define _OCAFSample_Driver_HeaderFile - -#include -#include -#include - -class TFunction_Logbook; - -class OCAFSample_Driver : public TFunction_Driver -{ -public: - - Standard_EXPORT void Validate (TFunction_Logbook& log) const; - Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Boolean Arguments (TDF_LabelMap& theArgs) const; - Standard_EXPORT virtual Standard_Boolean Results (TDF_LabelMap& theRes) const; - Standard_EXPORT ~OCAFSample_Driver (); - - // OCCT RTTI - DEFINE_STANDARD_RTTIEXT(OCAFSample_Driver,TFunction_Driver) - -protected: - - Standard_EXPORT OCAFSample_Driver (); -}; - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/OcafApp.cpp b/samples/mfc/standard/06_Ocaf/src/OcafApp.cpp deleted file mode 100755 index ff43d3c36e..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OcafApp.cpp +++ /dev/null @@ -1,153 +0,0 @@ -// OcafApp.cpp : Defines the class behaviors for the application. -// - -#include "StdAfx.h" - -#include "OcafApp.h" - -#include "OcafMainFrm.h" -#include -#include "OcafDoc.h" -#include - -#include "direct.h" -#include - -#include -#include - -///////////////////////////////////////////////////////////////////////////// -// COcafApp - -BEGIN_MESSAGE_MAP(COcafApp, CWinApp) - //{{AFX_MSG_MAP(COcafApp) - ON_COMMAND(ID_APP_ABOUT, OnAppAbout) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG_MAP - // Standard file based document commands - ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) - ON_COMMAND(ID_FILE_OPEN, OnFileOpen) -// ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// - -///////////////////////////////////////////////////////////////////////////// -// COcafApp construction - -COcafApp::COcafApp() : OCC_App() -{ - myApp = new TOcaf_Application(); - SampleName = "OCAF"; //for about dialog - SetSamplePath (L"..\\..\\06_Ocaf"); - - // load persistence - BinDrivers::DefineFormat (myApp); - XmlDrivers::DefineFormat (myApp); - - try - { - UnitsAPI::SetLocalSystem(UnitsAPI_MDTV); - } - catch (Standard_Failure) - { - AfxMessageBox (L"Fatal Error in units initialisation"); - } -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only COcafApp object - -COcafApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// COcafApp initialization - -BOOL COcafApp::InitInstance() -{ - AfxEnableControlContainer(); - - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - - // Change the registry key under which our settings are stored. - // You should modify this string to be something appropriate - // such as the name of your company or organization. - // Modified by CasCade : - SetRegistryKey(_T("Local CasCade Applications")); - - LoadStdProfileSettings(); // Load standard INI file options (including MRU) - - // Register the application's document templates. Document templates - // serve as the connection between documents, frame windows and views. - - pDocTemplateForView3d = new CMultiDocTemplate( - IDR_3DTYPE, - RUNTIME_CLASS(COcafDoc), - RUNTIME_CLASS(OCC_3dChildFrame), - RUNTIME_CLASS(OCC_3dView)); - AddDocTemplate(pDocTemplateForView3d); - - // create main MDI Frame window - OcafMainFrame* pMainFrame = new OcafMainFrame; - if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) - return FALSE; - m_pMainWnd = pMainFrame; - - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); - - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; - - // The main window has been initialized, so show and update it. - pMainFrame->ShowWindow(m_nCmdShow); - pMainFrame->UpdateWindow(); - - return TRUE; -} - -///////////////////////////////////////////////////////////////////////////// -// COcafApp commands - -BOOL COcafApp::IsViewExisting(CDocument * pDoc, CRuntimeClass * pViewClass, CView * & pView) -{ - ASSERT_VALID(pDoc); - ASSERT(pViewClass != (CRuntimeClass *)NULL ); - - POSITION position = pDoc->GetFirstViewPosition(); - while (position != (POSITION)NULL) - { - CView* pCurrentView = pDoc->GetNextView(position); - ASSERT_VALID(pCurrentView); - if (pCurrentView->IsKindOf(pViewClass)) - { - pView = pCurrentView; - return TRUE; - } - } - return FALSE; -} - -///////////////////////////////////////////////////////////////////////////// -// COCcafApp message handlers - -//================================================================ -// Function : COcafApp::OnFileOpen() -// Purpose : -//================================================================ -void COcafApp::OnFileOpen() -{ - CFileDialog aDlg(TRUE, NULL, NULL, OFN_FILEMUSTEXIST|OFN_HIDEREADONLY, - L"OCAFSample(Binary) (*.cbf)|*.cbf|OCAFSample(XML) (*.xml)|*.xml||"); - - if (aDlg.DoModal() != IDOK) - return; - - OpenDocumentFile (aDlg.GetPathName()); -} diff --git a/samples/mfc/standard/06_Ocaf/src/OcafApp.h b/samples/mfc/standard/06_Ocaf/src/OcafApp.h deleted file mode 100755 index 37588967b9..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OcafApp.h +++ /dev/null @@ -1,45 +0,0 @@ -// OcafApp.h : main header file for the OCAF application -// - -#if !defined(AFX_OCAF_H__49324D74_7836_11D4_8D45_00AA00D10994__INCLUDED_) -#define AFX_OCAF_H__49324D74_7836_11D4_8D45_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include -#include "OcafDoc.h" -#include - - -class COcafApp : public OCC_App -{ -public: - - COcafApp(); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COcafApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL - void OnFileOpen(); -public: - Handle(TOcaf_Application) GetApp() {return myApp;} - -private : - BOOL IsViewExisting(CDocument* pDoc,CRuntimeClass* pViewClass,CView*& pView); - -private: - - Handle(TOcaf_Application) myApp; - CMultiDocTemplate* pDocTemplateForView3d; - - DECLARE_MESSAGE_MAP() -}; - -///////////////////////////////////////////////////////////////////////////// - -#endif // !defined(AFX_OCAF_H__49324D74_7836_11D4_8D45_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp b/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp deleted file mode 100755 index f82218600a..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp +++ /dev/null @@ -1,1209 +0,0 @@ -// OcafDoc.cpp : implementation of the COcafDoc class -// - -#include "StdAfx.h" - -#include "OcafDoc.h" - -#include "OcafApp.h" -#include -#include "AISDialogs.h" - -// Dialog boxes classes -#include -#include -#include - -#include - -#include - -#ifdef _DEBUG -//#define new DEBUG_NEW // by cascade -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// COcafDoc - -IMPLEMENT_DYNCREATE(COcafDoc, CDocument) - -BEGIN_MESSAGE_MAP(COcafDoc, OCC_3dBaseDoc) - //{{AFX_MSG_MAP(COcafDoc) - ON_COMMAND(ID_CREATEBOX, OnCreatebox) - ON_COMMAND(ID_EDIT_REDO, OnEditRedo) - ON_COMMAND(ID_EDIT_UNDO, OnEditUndo) - ON_UPDATE_COMMAND_UI(ID_EDIT_UNDO, OnUpdateEditUndo) - ON_COMMAND(ID_MODIFY, OnModify) - ON_UPDATE_COMMAND_UI(ID_MODIFY, OnUpdateModify) - ON_UPDATE_COMMAND_UI(ID_EDIT_REDO, OnUpdateEditRedo) - ON_COMMAND(ID_CUT, OnCut) - ON_COMMAND(ID_OBJECT_DELETE, OnObjectDelete) - ON_UPDATE_COMMAND_UI(ID_OBJECT_DELETE, OnUpdateObjectDelete) - ON_COMMAND(ID_FILE_SAVE, OnFileSave) - ON_COMMAND(ID_FILE_SAVE_AS, OnFileSaveAs) - ON_COMMAND(ID_CREATECYL, OnCreatecyl) -// ON_COMMAND(ID_DFBR, OnDfbr) - //}}AFX_MSG_MAP - -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// COcafDoc construction/destruction - -COcafDoc::COcafDoc() -{ -} - -COcafDoc::~COcafDoc() -{ -} - - BOOL COcafDoc::OnNewDocument() - { - if (!CDocument::OnNewDocument()) - return FALSE; - - // Get an Handle on the current TOcaf_Application (which is initialized in the "Ocaf.h" file) - Handle(TOcaf_Application) OcafApp = ((COcafApp*)AfxGetApp())->GetApp(); - - // Create a new Ocaf document - OcafApp->NewDocument("BinOcaf",myOcafDoc); - TPrsStd_AISViewer::New(myOcafDoc->Main(),myViewer); - - Handle(AIS_InteractiveContext) CTX; - TPrsStd_AISViewer::Find(myOcafDoc->Main(), CTX); - CTX->SetDisplayMode (AIS_Shaded, Standard_True); - myAISContext=CTX; - - // Set the maximum number of available "undo" actions - myOcafDoc->SetUndoLimit(10); - - - TCollection_AsciiString Message ("\ - // Creation of a new document \n\ - \n\ - Handle(TOcaf_Application) OcafApp= ((COcafApp*)AfxGetApp())->GetApp(); \n\ - \n\ - // Creating the new document \n\ - OcafApp->NewDocument(\"BinOcaf\", myOcafDoc); \n\ - \n\ - // Creation of a new TPrsStd_AISViewer connected to the current V3d_Viewer\n\ - TPrsStd_AISViewer::New(myOcafDoc->Main(),myViewer); \n\ - \n\ - // Setting the number of memorized undos \n\ - myOcafDoc->SetUndoLimit(10); \n\ - \n"); - - myCResultDialog.SetTitle("New document"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); - - PathName=""; - - return TRUE; - } - -void COcafDoc::ActivateFrame(CRuntimeClass* pViewClass,int nCmdShow) -{ - POSITION position = GetFirstViewPosition(); - while (position != (POSITION)NULL) - { - CView* pCurrentView = (CView*)GetNextView(position); - if(pCurrentView->IsKindOf(pViewClass) ) - { - ASSERT_VALID(pCurrentView); - CFrameWnd* pParentFrm = pCurrentView->GetParentFrame(); - ASSERT(pParentFrm != (CFrameWnd *)NULL); - // simply make the frame window visible - pParentFrm->ActivateFrame(nCmdShow); - } - } - -} - -///////////////////////////////////////////////////////////////////////////// -// COcafDoc diagnostics - -#ifdef _DEBUG -void COcafDoc::AssertValid() const -{ - CDocument::AssertValid(); -} - -void COcafDoc::Dump(CDumpContext& dc) const -{ - CDocument::Dump(dc); -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// COcafDoc commands - -void COcafDoc::OnEditRedo() -{ - myOcafDoc->Redo(); - myOcafDoc->CommitCommand(); - myAISContext->UpdateCurrentViewer(); - - UpdateAllViews(NULL); - - TCollection_AsciiString Message = TCollection_AsciiString("\ -// Redo last undoes operation \n\ - \n\ -myOcafDoc->Redo(); \n\ - \n\ -myOcafDoc->CommitCommand(); \n\ - \n\ -\n"); - - myCResultDialog.SetTitle("Redo"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -void COcafDoc::OnEditUndo() -{ - myOcafDoc->Undo(); - myOcafDoc->CommitCommand(); - myAISContext->UpdateCurrentViewer(); - - UpdateAllViews(NULL); - - TCollection_AsciiString Message = TCollection_AsciiString("\ -// Undo last operation \n\ - \n\ -myOcafDoc->Undo(); \n\ - \n\ -myOcafDoc->CommitCommand(); \n\ - \n\ -\n"); - - myCResultDialog.SetTitle("Undo"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -void COcafDoc::OnUpdateEditRedo(CCmdUI* pCmdUI) -{ - // Disable the "redo" button if there is no availlables redo actions - if (myOcafDoc->GetAvailableRedos()>0) pCmdUI->Enable(Standard_True); - else pCmdUI->Enable(Standard_False); -} - -void COcafDoc::OnUpdateEditUndo(CCmdUI* pCmdUI) -{ - // Disable the "undo" button if there is no availlables undo actions - if (myOcafDoc->GetAvailableUndos()>0) pCmdUI->Enable(Standard_True); - else pCmdUI->Enable(Standard_False); -} - -void COcafDoc::OnCreatebox() -{ - EraseAll(); - CNewBoxDlg Dlg; - if(Dlg.DoModal()!=IDOK) return; - - Handle(TDocStd_Document) D = GetOcafDoc(); - - // Open a new command (for undo) - D->NewCommand(); - TOcaf_Commands TSC(D->Main()); - - // Create a new box using the CNewBoxDlg Dialog parameters as attributes - TDF_Label L = TSC.CreateBox (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_w, Dlg.m_l, Dlg.m_h, - TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name)); - - // Get the TPrsStd_AISPresentation of the new box TNaming_NamedShape - Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID()); - // Display it - prs->Display(1); - Fit3DViews(); - // Attach an integer attribute to L to memorize it's displayed - TDataStd_Integer::Set(L, 1); - myAISContext->UpdateCurrentViewer(); - - // Close the command (for undo) - D->CommitCommand(); - - - TCollection_AsciiString Message ("\ -// Creation of a new box using Ocaf attributes \n\ - \n\ -Handle(TDocStd_Document) D = GetOcafDoc(); \n\ - \n\ -// Opening a new command (for undo/redo) \n\ -D->NewCommand(); \n\ - \n\ -TOcaf_Commands TSC(D->Main()); \n\ -// Look at the TOcaf_Commands::CreateBox() function \n\ -TDF_Label L=TSC.CreateBox(m_x, m_y, m_z, m_w, m_l, m_h, Name); \n\ - \n\ -// Set the TPrsStd_AISPresentation of the box \n\ -Handle(TPrsStd_AISPresentation) prs; \n\ -prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID()); \n\ - \n\ -// Displaying the box \n\ -prs->Display(1); \n\ - \n\ -// Commint the command (for undo/redo) \n\ -D->CommitCommand(); \n\ -\n"); - - myCResultDialog.SetTitle("Create box"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -void COcafDoc::OnCreatecyl() -{ - EraseAll(); - CNewCylDlg Dlg; - if(Dlg.DoModal()!=IDOK) return; - - Handle(TDocStd_Document) D = GetOcafDoc(); - - // Open a new command (for undo) - D->NewCommand(); - TOcaf_Commands TSC(D->Main()); - - // Create a new box using the CNewCylDlg Dialog parameters as attributes - TDF_Label L = TSC.CreateCyl (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_r, Dlg.m_h, - TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name)); - - // Get the TPrsStd_AISPresentation of the new cylinder TNaming_NamedShape - Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID()); - // Display it - prs->Display(1); - Fit3DViews(); - // Attach an integer attribute to L to memorize it's displayed - TDataStd_Integer::Set(L, 1); - myAISContext->UpdateCurrentViewer(); - - // Close the command (for undo) - D->CommitCommand(); - - - TCollection_AsciiString Message ("\ -// Creation of a new cylinder using Ocaf attributes \n\ - \n\ -Handle(TDocStd_Document) D = GetOcafDoc(); \n\ - \n\ -// Opening a new command (for undo/redo) \n\ -D->NewCommand(); \n\ - \n\ -TOcaf_Commands TSC(D->Main()); \n\ -// Look at the TOcaf_Commands::CreateCyl() function \n\ -TDF_Label L=TSC.CreateCyl(m_x, m_y, m_z, m_r, m_h, Name); \n\ - \n\ -// Set the TPrsStd_AISPresentation of the cylinder \n\ -Handle(TPrsStd_AISPresentation) prs; \n\ -prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID()); \n\ - \n\ -// Displaying the cylinder \n\ -prs->Display(1); \n\ - \n\ -// Commint the command (for undo/redo) \n\ -D->CommitCommand(); \n\ -\n"); - - myCResultDialog.SetTitle("Create cylinder"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -void COcafDoc::OnModify() -{ - // Get the selected interactive object - myAISContext->InitSelected(); - Handle(AIS_InteractiveObject) curAISObject = myAISContext->SelectedInteractive(); - - - // Get the main label of the selected object - Handle(TPrsStd_AISPresentation) ObjectPrs = - Handle(TPrsStd_AISPresentation)::DownCast(curAISObject->GetOwner()); - TDF_Label LabObject = ObjectPrs->Label(); - - // Get the TFunction_Function attribute of the selected object - Handle(TFunction_Function) TFF; - if ( !LabObject.FindAttribute(TFunction_Function::GetID(),TFF) ) - { - MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Object cannot be modify.", L"Modification", MB_ICONEXCLAMATION); - return; - } - // Get the Standard_GUID of the TFunction_FunctionDriver of the selected object TFunction_Function attribute - Standard_GUID myDriverID=TFF->GetDriverGUID(); - - Handle(TDocStd_Document) D = GetOcafDoc(); - Handle(TFunction_Logbook) log = TFunction_Logbook::Set(D->Main()); - - TCollection_AsciiString Message("\ -// Modification and recomputation of the selected object \n\ - \n\ -Handle(TDocStd_Document) D = GetOcafDoc(); \n\ - \n\ -// Getting the TPrsStd_AISPresentation of the selected object \n\ -Handle(TPrsStd_AISPresentation) ObjectPrs = \n\ - Handle(TPrsStd_AISPresentation)::DownCast(curAISObject->GetOwner()); \n\ - \n\ -// Getting the Label of the selected object using the TPrsStd_AISPresentation \n\ -TDF_Label LabObject = ObjectPrs->Label(); \n\ - \n\ -// Getting the TFunction_FunctionDriver ID attached to this label \n\ -Handle(TFunction_Function) TFF; \n\ -\n"); - TCollection_AsciiString Suite; - - // Case of a box created with the box function driver - if(myDriverID==TOcafFunction_BoxDriver::GetID()) - { - CNewBoxDlg Dlg; - Standard_Real x, y, z, w, l, h; - - // Get the attributes values of the current box - Handle(TDataStd_Real) curReal; - LabObject.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); - w=curReal->Get(); - LabObject.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); - l=curReal->Get(); - LabObject.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); - h=curReal->Get(); - LabObject.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); - x=curReal->Get(); - LabObject.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); - y=curReal->Get(); - LabObject.FindChild(6).FindAttribute(TDataStd_Real::GetID(),curReal); - z=curReal->Get(); - Handle(TDataStd_Name) stdName; - LabObject.FindAttribute(TDataStd_Name::GetID(),stdName); - - // Initialize the dialog box with the values of the current box - Dlg.InitFields(x, y, z, w, l, h, stdName->Get()); - - if(Dlg.DoModal()!=IDOK) return; - - // Open a new command (for undo) - D->NewCommand(); - - // Modify the box - TOcaf_Commands TSC(LabObject); - TSC.ModifyBox (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_w, Dlg.m_l, Dlg.m_h, - TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name), log); - - // Get the presentation of the box, display it and set it selected - Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID()); - TDataStd_Integer::Set(LabObject, 1); - prs->Display(1); - myAISContext->UpdateCurrentViewer(); - // Close the command (for undo) - D->CommitCommand(); - - Message+=("\ - \n\ -// In this case the TFunction_FunctionDriver ID is a BoxDriver \n\ -if(myDriverID==TOcafFunction_BoxDriver::GetID()){ \n\ - \n\ -// Getting values of box attributes \n\ -Handle(TDataStd_Real) curReal; \n\ -LabObject.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -w=curReal->Get(); \n\ -LabObject.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -l=curReal->Get(); \n\ -LabObject.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -h=curReal->Get(); \n\ -LabObject.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -x=curReal->Get(); \n\ -LabObject.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -y=curReal->Get(); \n\ -LabObject.FindChild(6).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -z=curReal->Get(); \n\ -Handle(TDataStd_Name) stdName; \n\ -LabObject.FindAttribute(TDataStd_Name::GetID(),stdName); \n\ - \n\ -// Opening a new command \n\ -D->NewCommand(); \n\ - \n\ -TOcaf_Commands TSC(LabObject); \n\ -// Look at the TOcaf_Commands::ModifyBox() function \n\ -TSC.ModifyBox(m_x, m_y, m_z, m_w, m_l, m_h, Name); \n\ - \n\ -// Set the TPrsStd_AISPresentation of the box \n\ -Handle(TPrsStd_AISPresentation) prs; \n\ -prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID()); \n\ - \n\ -// Display the box \n\ -prs->Display(1); \n\ - \n\ -// Commit the command \n\ -D->CommitCommand(); \n\ -} \n\ -\n"); - - myCResultDialog.SetTitle("Modify Box"); - } - // Case of a cylinder created with the box function driver - else if(myDriverID==TOcafFunction_CylDriver::GetID()) - { - CNewCylDlg Dlg; - Standard_Real x, y, z, r, h; - - // Get the attributes values of the current box - Handle(TDataStd_Real) curReal; - LabObject.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); - r=curReal->Get(); - LabObject.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); - h=curReal->Get(); - LabObject.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); - x=curReal->Get(); - LabObject.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); - y=curReal->Get(); - LabObject.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); - z=curReal->Get(); - Handle(TDataStd_Name) stdName; - LabObject.FindAttribute(TDataStd_Name::GetID(),stdName); - - // Initialize the dialog cylinder with the values of the current cylinder - Dlg.InitFields(x, y, z, r, h, stdName->Get()); - - if(Dlg.DoModal()!=IDOK) return; - - // Open a new command (for undo) - D->NewCommand(); - - // Modify the cylinder - TOcaf_Commands TSC(LabObject); - TSC.ModifyCyl (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_r, Dlg.m_h, - TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name), log); - - // Get the presentation of the cylinder, display it and set it selected - Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID()); - TDataStd_Integer::Set(LabObject, 1); - prs->Display(1); - myAISContext->UpdateCurrentViewer(); - // Close the command (for undo) - D->CommitCommand(); - - Message+=("\ - \n\ -// In this case the TFunction_FunctionDriver ID is a CylDriver \n\ -if(myDriverID==TOcafFunction_CylDriver::GetID()){ \n\ - \n\ -// Getting values of box cylinder \n\ -Handle(TDataStd_Real) curReal; \n\ -LabObject.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -r=curReal->Get(); \n\ -LabObject.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -h=curReal->Get(); \n\ -LabObject.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -x=curReal->Get(); \n\ -LabObject.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -y=curReal->Get(); \n\ -LabObject.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -z=curReal->Get(); \n\ -Handle(TDataStd_Name) stdName; \n\ -LabObject.FindAttribute(TDataStd_Name::GetID(),stdName); \n\ - \n\ -// Opening a new command \n\ -D->NewCommand(); \n\ - \n\ -TOcaf_Commands TSC(LabObject); \n\ -// Look at the TOcaf_Commands::ModifyCyl() function \n\ -TSC.ModifyCyl(m_x, m_y, m_z, m_r, m_h, Name); \n\ - \n\ -// Set the TPrsStd_AISPresentation of the cylinder \n\ -Handle(TPrsStd_AISPresentation) prs; \n\ -prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID()); \n\ - \n\ -// Display the cylinder \n\ -prs->Display(1); \n\ - \n\ -// Commit the command \n\ -D->CommitCommand(); \n\ -} \n\ -\n"); - - myCResultDialog.SetTitle("Modify cylinder"); - } - // Case of a cut solid created with the cut function driver - else if(myDriverID==TOcafFunction_CutDriver::GetID()) - { - // Open a new command (for undo) - D->NewCommand(); - - // Get the reference of the Original object used to make the cut object, - // this reference is here attached to the first child of the cut object label - Handle(TDF_Reference) OriginalRef; - LabObject.FindChild(1).FindAttribute(TDF_Reference::GetID(),OriginalRef); - - // Get the presentation of the Original object - Handle(TPrsStd_AISPresentation) OriginalPrs= TPrsStd_AISPresentation::Set(OriginalRef->Get(), TNaming_NamedShape::GetID()); - - // Get the reference of the Tool object used to make the cut object, - // this reference is here attached to the second child of the cut object label - Handle(TDF_Reference) ToolRef; - LabObject.FindChild(2).FindAttribute(TDF_Reference::GetID(),ToolRef); - TDF_Label ToolLab=ToolRef->Get(); - - - // Get the presentation of the Tool object - Handle(TPrsStd_AISPresentation) ToolPrs= TPrsStd_AISPresentation::Set(ToolLab, TNaming_NamedShape::GetID()); - - // Display the Original object and the Tool object, erase the cut object. - TDataStd_Integer::Set(OriginalRef->Get(), 1); - OriginalPrs->Display(1); - TDataStd_Integer::Set(ToolLab, 1); - ToolPrs->Display(1); - TDataStd_Integer::Set(LabObject, 0); - ObjectPrs->Erase(1); - myAISContext->UpdateCurrentViewer(); - - // In this we decided to modify the tool object which is a cylinder, - // so we open the cylinder parameters dialog box - CNewCylDlg Dlg; - Standard_Real x, y, z, h, r; - - // Get the attributes values of the tool cylinder - Handle(TDataStd_Real) curReal; - ToolLab.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); - r=curReal->Get(); - ToolLab.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); - h=curReal->Get(); - ToolLab.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); - x=curReal->Get(); - ToolLab.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); - y=curReal->Get(); - ToolLab.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); - z=curReal->Get(); - Handle(TDataStd_Name) stdName; - ToolLab.FindAttribute(TDataStd_Name::GetID(),stdName); - - // Initialize the dialog box with the values of the tool cylinder - Dlg.InitFields(x, y, z, r, h, stdName->Get()); - - if(Dlg.DoModal()!=IDOK) - { - D->AbortCommand(); - myAISContext->UpdateCurrentViewer(); - return; - } - - // Modify the cylinder - TOcaf_Commands ToolTSC(ToolLab); - ToolTSC.ModifyCyl (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_r, Dlg.m_h, - TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name), log); - - // Redisplay the modified Tool object - TDataStd_Integer::Set(ToolLab, 1); - ToolPrs->Display(1); - myAISContext->UpdateCurrentViewer(); - Sleep(1000); - - // Get the TOcafFunction_CutDriver using its Standard_GUID in the TFunction_DriverTable - Handle(TFunction_Driver) 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)) -// { - log->SetTouched(LabObject); - if(myCutDriver->Execute(log)) - MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Recompute failed", L"Modify cut", MB_ICONEXCLAMATION); -// } - - // Erase the Original object and the Tool objectedisplay the modified Tool object - TDataStd_Integer::Set(ToolLab, 0); - ToolPrs->Erase(0); - TDataStd_Integer::Set(OriginalRef->Get(), 0); - OriginalPrs->Erase(0); - ObjectPrs=TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID()); - TDataStd_Integer::Set(LabObject, 1); - ObjectPrs->Display(1); - myAISContext->UpdateCurrentViewer(); - // Close the command (for undo) - D->CommitCommand(); - - Message+=("\ - \n\ -// In this case the TFunction_FunctionDriver ID is a CutDriver \n\ -if(myDriverID==TOcafFunction_CutDriver::GetID()){ \n\ - \n\ -// Getting values of cut attributes (which are reference to the shapes)\n\ -Handle(TDF_Reference) OriginalRef; \n\ -LabObject.FindChild(1).FindAttribute(TDF_Reference::GetID(),OriginalRef); \n\ -Handle(TDF_Reference) ToolRef; \n\ -LabObject.FindChild(2).FindAttribute(TDF_Reference::GetID(),ToolRef); \n\ - \n\ -// Getting the label of the tool shape (to modify it)\n\ -TDF_Label ToolLab=ToolRef->Get(); \n\ - \n\ -TOcaf_Commands TSC(ToolLab); \n\ -// Look at the TOcaf_Commands::ModifyBox() function \n\ -TSC.ModifyBox(m_x, m_y, m_z, m_w, m_l, m_h, Name); \n\ - \n\ -// Getting the TOcafFunction_CutDriver used to create the cut\n\ -Handle(TFunction_Driver) myCutDriver; \n\ -TFunction_DriverTable::Get()->FindDriver(myDriverID, myCutDriver); \n\ - \n\ -// Recompute the cut if it must be (if an attribute was modified)\n\ -if (myCutDriver->MustExecute(log)) { \n\ - log.SetTouched(LabObject); \n\ - myCutDriver->Execute(log) \n\ -} \n\ -Handle(TPrsStd_AISPresentation) prs; \n\ - \n\ -// Setting the TPrsStd_AISPresentation of the cut object\n\ -prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID()); \n\ - \n\ -// Display the TPrsStd_AISPresentation of the cut object\n\ -prs->Display(1); \n\ - \n\ -// Commit the command\n\ -D->CommitCommand(); \n\ -} \n\ -\n"); - - myCResultDialog.SetTitle("Modify Cut"); - } - else - { - MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"No associated function driver", L"Modify", MB_OK); - } - - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -void COcafDoc::OnUpdateModify(CCmdUI* pCmdUI) -{ - // Disable the "modify" button if there is no selected object or several selected objects - myAISContext->InitSelected(); - if(myAISContext->NbSelected()!=1) - { - pCmdUI->Enable(Standard_False); - return; - } - - // Get the root label of the selected object using its TPrsStd_AISPresentation - myAISContext->InitSelected(); - Handle(TPrsStd_AISPresentation) ObjectPrs = - Handle(TPrsStd_AISPresentation)::DownCast(myAISContext->SelectedInteractive()->GetOwner()); - if (!ObjectPrs.IsNull()){ - TDF_Label LabObject = ObjectPrs->Label(); - - - // Disable the "modify" button if selected object don't have a TFunction_Function attribute - Handle(TFunction_Function) TFF; - pCmdUI->Enable(LabObject.FindAttribute(TFunction_Function::GetID(),TFF) ); - } - else - pCmdUI->Enable(FALSE); -} - - -void COcafDoc::OnCut() -{ - EraseAll(); - Handle(TDocStd_Document) D = GetOcafDoc(); - TDF_Label L = D->Main(); - - TOcaf_Commands TSC(L); - - // Open a new command (for undo) - D->NewCommand(); - - // Create a new cyl (10*20 dimensions) - TDF_Label L2=TSC.CreateCyl(0, 10, -10, 5, 80, "Cylinder"); - Handle(TPrsStd_AISPresentation) prs1= TPrsStd_AISPresentation::Set(L2, TNaming_NamedShape::GetID()); - prs1->SetColor(Quantity_NOC_MATRABLUE); - TDataStd_Integer::Set(L2, 1); - prs1->Display(1); - Fit3DViews(); - - // Wait a second to see the construction - Sleep(500); - - // Create a new box (20*20*20 dimensions, at the (-12,0,10) position) - TDF_Label L1=TSC.CreateBox(-12, 0, 10, 20, 30, 40, "Box"); - Handle(TPrsStd_AISPresentation) prs2= TPrsStd_AISPresentation::Set(L1, TNaming_NamedShape::GetID()); - prs2->SetColor(Quantity_NOC_YELLOW); - TDataStd_Integer::Set(L1, 1); - prs2->Display(1); - Fit3DViews(); - - Sleep(1000); - - // Cut the boxes - L=TSC.Cut(L1, L2); - Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID()); - - // Erase the two boxes and display the cut object - TDataStd_Integer::Set(L1, 0); - prs1->Erase(0); - TDataStd_Integer::Set(L2, 0); - prs2->Erase(0); - TDataStd_Integer::Set(L, 1); - prs->Display(1); - myAISContext->UpdateCurrentViewer(); - - // Close the cut operation command (for undo) - D->CommitCommand(); - - - TCollection_AsciiString Message ("\ -// Cut operation between a cylinder and a box \n\ - \n\ -Handle(TDocStd_Document) D = GetOcafDoc(); \n\ -TDF_Label L = D->Main(); \n\ - \n\ -// Opening a new command\n\ -D->NewCommand(); \n\ - \n\ -TOcaf_Commands TSC(D->Main()); \n\ - \n\ -// Create a box \n\ -// Look at the TOcaf_Commands::CreateBox() function \n\ -TDF_Label L1=TSC.CreateBox(-12, 0, 10, 24, 20, 20, '\"'Box'\"'); \n\ -// Look at the TOcaf_Commands::Cut() function \n\ - \n\ -// Create a cylinder \n\ -// Look at the TOcaf_Commands::CreateCyl() function \n\ -// Create two boxes \n\ -TDF_Label L2=TSC.CreateCyl(0, 0, 0, 10, 20, '\"'Cylinder'\"'); \n\ - \n\ -// Cut the cylinder with the box \n\ -L=TSC.Cut(L1, L2); \n\ -Handle(TPrsStd_AISPresentation) prs; \n\ - \n\ -// Setting the TPrsStd_AISPresentation of the cut object\n\ -prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID()); \n\ - \n\ -// Displaying the TPrsStd_AISPresentation of the cut object\n\ -prs->Display(1); \n\ - \n\ -// Commit the command\n\ -D->CommitCommand(); \n\ -\n"); - - myCResultDialog.SetTitle("Cut operation"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - - -void COcafDoc::Fit3DViews() -{ - POSITION position = GetFirstViewPosition(); - while (position != (POSITION)NULL) - { - CView* pCurrentView = (CView*)GetNextView(position); - if(pCurrentView->IsKindOf( RUNTIME_CLASS( OCC_3dView ) ) ) - { - ASSERT_VALID(pCurrentView); - OCC_3dView* aOCC_3dView = (OCC_3dView*)pCurrentView; - aOCC_3dView->FitAll(); - } - } - -} - -void COcafDoc::OnObjectDelete() -{ - Handle(TDocStd_Document) D = GetOcafDoc(); - - D->NewCommand(); - - AIS_ListOfInteractive aList; - for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected()) - { - aList.Append(myAISContext->SelectedInteractive()); - } - - for (AIS_ListOfInteractive::Iterator anIter (aList); anIter.More(); anIter.Next()) - { - Handle(AIS_InteractiveObject) aPrs = anIter.Value(); - if (myAISContext->DisplayStatus (aPrs) == AIS_DS_Displayed) - { - Handle(TPrsStd_AISPresentation) CurrentPrs = Handle(TPrsStd_AISPresentation)::DownCast(aPrs->GetOwner()); - TDataStd_Integer::Set(CurrentPrs->Label(), 0); - CurrentPrs->Erase(1); - } - } - - D->CommitCommand(); - myAISContext->UpdateCurrentViewer(); - - TCollection_AsciiString Message ("\ - // Delete selected object \n\ - \n\ - Handle(TDocStd_Document) D = GetOcafDoc(); \n\ - \n\ - // Opening a new command\n\ - D->NewCommand(); \n\ - \n\ - // Getting the TPrsStd_AISPresentation of the selected object\n\ - Handle(TPrsStd_AISPresentation) CurrentPrs \n\ - =Handle(TPrsStd_AISPresentation)::DownCast(myAISContext->Current()->GetOwner()); \n\ - \n\ - // Erasing the TPrsStd_AISPresentation of the selected object\n\ - CurrentPrs->Erase(1); \n\ - \n\ - // Commit the command\n\ - D->CommitCommand(); \n\ - \n"); - - myCResultDialog.SetTitle("Delete"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); - } - - void COcafDoc::OnUpdateObjectDelete(CCmdUI* pCmdUI) - { - myAISContext->InitSelected(); - pCmdUI->Enable (myAISContext->MoreSelected()); - } - - void COcafDoc::DisplayPrs() - { - TDF_Label LabSat = myOcafDoc->Main(); - - for (TDF_ChildIterator it(LabSat); it.More(); it.Next()) - { - TDF_Label L = it.Value(); - Handle(TNaming_NamedShape) TNS; - if (!L.FindAttribute(TNaming_NamedShape::GetID(), TNS)) continue; - Handle(TDataStd_Integer) TDI; - - // To know if the object was displayed - if (L.FindAttribute(TDataStd_Integer::GetID(), TDI)) - if(!TDI->Get()) continue; - - Handle(TPrsStd_AISPresentation) prs; - if (!L.FindAttribute(TPrsStd_AISPresentation::GetID(),prs)) - prs = TPrsStd_AISPresentation::Set(L,TNaming_NamedShape::GetID()); - prs->SetColor(Quantity_NOC_ORANGE); - prs->Display(1); - } - - myAISContext->UpdateCurrentViewer(); -} - -void COcafDoc::OnCloseDocument() -{ - Handle(TOcaf_Application) OcafApp = ((COcafApp*)AfxGetApp())->GetApp(); - OcafApp->Close(myOcafDoc); - CDocument::OnCloseDocument(); -} - -void COcafDoc::OnFileSaveAs() -{ - const wchar_t* SPathName = PathName; - TCollection_ExtendedString TPathName (SPathName); - - CString Filter; - - if (TPathName.SearchFromEnd(".xml") > 0){ - Filter = "OCAFSample(XML) (*.xml)|*.xml|OCAFSample(Binary) (*.cbf)|*.cbf||"; - } else { - Filter = "OCAFSample(Binary) (*.cbf)|*.cbf|OCAFSample(XML) (*.xml)|*.xml||"; - } - - CFileDialog dlg(FALSE, - L"cbf", - GetTitle(), - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - Filter, - NULL ); - - - Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); - if (dlg.DoModal() != IDOK) return; - - SetTitle(dlg.GetFileTitle()); - - CWaitCursor aWaitCursor; - CString CSPath = dlg.GetPathName(); - - std::cout << "Save As " << CSPath << std::endl; - PathName=CSPath; - const wchar_t* SPath = CSPath; - TCollection_ExtendedString TPath (SPath); - - if (TPath.SearchFromEnd(".xml") > 0) - { - // The document must be saved in XML format - myOcafDoc->ChangeStorageFormat("XmlOcaf"); - } - else if (TPath.SearchFromEnd(".cbf") > 0) - { - // The document must be saved in binary format - myOcafDoc->ChangeStorageFormat("BinOcaf"); - } - - try - { - // Saves the document in the current application - m_App->SaveAs(myOcafDoc,TPath); - } - catch(...) - { - AfxMessageBox (L"Error! The file wasn't saved."); - return; - } -// // save the document in the current application -// m_App->SaveAs(myOcafDoc,TPath); - - SetPathName(SPath); - - TCollection_AsciiString Message = TCollection_AsciiString("\ -// Storing the document as \n\ - \n\ -Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); \n\ - \n\ -// Saving current OCAF document at TPath \n\ -m_App->SaveAs(myOcafDoc,(TCollection_ExtendedString) TPath); \n\ -\n"); - - myCResultDialog.SetTitle("Save a document"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -void COcafDoc::OnFileSave() -{ - Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); - - - if (myOcafDoc.IsNull()) - { - AfxMessageBox (L"Error during saving! Empty document."); - return; - } - - if(PathName!="") - { - const wchar_t* SPath = PathName; - TCollection_ExtendedString TPath (SPath); - - if (TPath.SearchFromEnd(".xml") > 0) - { - // The document must be saved in XML format - myOcafDoc->ChangeStorageFormat("XmlOcaf"); - } - else if (TPath.SearchFromEnd(".cbf") > 0) - { - // The document must be saved in binary format - myOcafDoc->ChangeStorageFormat("BinOcaf"); - } - - try - { - // Saves the document in the current application - m_App->SaveAs(myOcafDoc,TPath); - } - catch(...) - { - AfxMessageBox (L"Error! The file wasn't saved."); - return; - } - - TCollection_AsciiString Message = TCollection_AsciiString("\ -// Storing the document \n\ - \n\ -Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); \n\ - \n\ -// Saving current OCAF document at TPath \n\ -m_App->SaveAs(myOcafDoc,(TCollection_ExtendedString) TPath); \n\ -\n"); - - myCResultDialog.SetTitle("Save a document"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); - return; - } - - CFileDialog dlg(FALSE, - L"cbf", - GetTitle(), - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - L"OCAFSample(Binary) (*.cbf)|*.cbf|OCAFSample(XML) (*.xml)|*.xml||", - NULL ); - - if (dlg.DoModal() != IDOK) return; - - SetTitle(dlg.GetFileTitle()); - - CWaitCursor aWaitCursor; - CString CSPath = dlg.GetPathName(); - - const wchar_t* SPath = CSPath; - TCollection_ExtendedString TPath (SPath); - - // Choose storage format - if (TPath.SearchFromEnd(".xml") > 0) - { - // The document must be saved in XML format - myOcafDoc->ChangeStorageFormat("XmlOcaf"); - } - else if (TPath.SearchFromEnd(".cbf") > 0) - { - // The document must be saved in binary format - myOcafDoc->ChangeStorageFormat("BinOcaf"); - } - - try - { - // Saves the document in the current application - m_App->SaveAs(myOcafDoc,TPath); - } - catch(...) - { - AfxMessageBox (L"Error! The file wasn't saved."); - return; - } - - SetPathName(SPath); - PathName=CSPath; - - - TCollection_AsciiString Message = TCollection_AsciiString("\ -// Storing the document as \n\ - \n\ -Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); \n\ - \n\ -// Saving current OCAF document at TPath \n\ -m_App->SaveAs(myOcafDoc,(TCollection_ExtendedString) TPath); \n\ -\n"); - - myCResultDialog.SetTitle("Save a document"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -BOOL COcafDoc::OnOpenDocument(LPCTSTR lpszPathName) -{ - if (!CDocument::OnOpenDocument(lpszPathName)) - { - return FALSE; - } - - Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); - - CWaitCursor aWaitCursor; - PathName = lpszPathName; - - const wchar_t* aPathName = lpszPathName; - TCollection_ExtendedString anOccPathName (aPathName); - - // Open the document in the current application - //PCDM_ReaderStatus RS = m_App->Open(TPath,myOcafDoc); - m_App->Open(anOccPathName, myOcafDoc); - //CDF_RetrievableStatus RS = m_App->Open(TPath,myOcafDoc); - - // Connect the document CAF (myDoc) with the AISContext (myAISContext) - TPrsStd_AISViewer::New (myOcafDoc->Main(), myViewer); - myOcafDoc->SetUndoLimit (10); - - Handle(AIS_InteractiveContext) aContext; - TPrsStd_AISViewer::Find (myOcafDoc->Main(), aContext); - aContext->SetDisplayMode (AIS_Shaded, Standard_True); - myAISContext = aContext; - - // Display the presentations (which was not stored in the document) - DisplayPrs(); - - TCollection_AsciiString Message = TCollection_AsciiString("\ -// Retrieve a document \n\ - \n\ - Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); \n\ - \n\ -// Opening the OCAF document from the TPath file\n\ -m_App->Open((TCollection_ExtendedString) TPath,myOcafDoc); \n\ - \n\ -// Creation of a new TPrsStd_AISViewer connected to the current V3d_Viewer\n\ -TPrsStd_AISViewer::New(myOcafDoc->Main(),myViewer); \n\ - \n\ -// Setting the number of memorized undos \n\ -myOcafDoc->SetUndoLimit(10); \n\ - \n\ -\n"); - - myCResultDialog.SetTitle ("Open a document"); - CString text (Message.ToCString()); - myCResultDialog.SetText (text); - - return TRUE; - -} - - -void COcafDoc::EraseAll() -{ - myOcafDoc->NewCommand(); - - TDF_Label LabSat = myOcafDoc->Main(); - - for (TDF_ChildIterator it(LabSat); it.More(); it.Next()) - { - TDF_Label L = it.Value(); - Handle(TNaming_NamedShape) TNS; - if (!L.FindAttribute(TNaming_NamedShape::GetID(), TNS)) continue; - Handle(TDataStd_Integer) TDI; - - // To know if the object was displayed - if (L.FindAttribute(TDataStd_Integer::GetID(), TDI)) - if(!TDI->Get()) continue; - - Handle(TPrsStd_AISPresentation) prs; - if (!L.FindAttribute(TPrsStd_AISPresentation::GetID(),prs)) - prs = TPrsStd_AISPresentation::Set(L,TNaming_NamedShape::GetID()); - prs->SetColor(Quantity_NOC_ORANGE); - prs->Erase(1); - } - - myAISContext->UpdateCurrentViewer(); - - myOcafDoc->CommitCommand(); -} - -void COcafDoc::Popup(const Standard_Integer x, - const Standard_Integer y , - const Handle(V3d_View)& aView ) -{ - Standard_Integer PopupMenuNumber=0; - myAISContext->InitSelected(); - if (myAISContext->MoreSelected()) - PopupMenuNumber=1; - - CMenu menu; - VERIFY(menu.LoadMenu(IDR_Popup3D)); - CMenu* pPopup = menu.GetSubMenu(PopupMenuNumber); - - ASSERT(pPopup != NULL); - if (PopupMenuNumber == 1) // more than 1 object. - { - bool OneOrMoreInShading = false; - for (myAISContext->InitSelected();myAISContext->MoreSelected ();myAISContext->NextSelected ()) - if (myAISContext->IsDisplayed(myAISContext->SelectedInteractive(),1)) OneOrMoreInShading=true; - if(!OneOrMoreInShading) - pPopup->EnableMenuItem(5, MF_BYPOSITION | MF_DISABLED | MF_GRAYED); - } - - POINT winCoord = { x , y }; - Handle(WNT_Window) aWNTWindow= - Handle(WNT_Window)::DownCast(aView->Window()); - ClientToScreen ( (HWND)(aWNTWindow->HWindow()),&winCoord); - pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON , winCoord.x, winCoord.y , - AfxGetMainWnd()); - - -} - - -//void COcafDoc::OnDfbr() -//{ -// // TODO: Add your command handler code here -// DebugBrowser::DFBrowser(myOcafDoc); -// -//} diff --git a/samples/mfc/standard/06_Ocaf/src/OcafDoc.h b/samples/mfc/standard/06_Ocaf/src/OcafDoc.h deleted file mode 100755 index d1704d215e..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OcafDoc.h +++ /dev/null @@ -1,86 +0,0 @@ -// OcafDoc.h : interface of the COcafDoc class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCAFDOC_H__49324D7C_7836_11D4_8D45_00AA00D10994__INCLUDED_) -#define AFX_OCAFDOC_H__49324D7C_7836_11D4_8D45_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include -#include - -class COcafDoc : public OCC_3dDoc -{ -protected: // create from serialization only - COcafDoc(); - DECLARE_DYNCREATE(COcafDoc) - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COcafDoc) - public: - virtual void OnCloseDocument(); - virtual BOOL OnOpenDocument(LPCTSTR lpszPathName); - virtual BOOL COcafDoc::OnNewDocument(); - - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~COcafDoc(); - virtual void Popup (const Standard_Integer x , - const Standard_Integer y , - const Handle(V3d_View)& aView ); - -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: - -// Generated message map functions -protected: - //{{AFX_MSG(COcafDoc) - afx_msg void OnCreatebox(); - afx_msg void OnEditRedo(); - afx_msg void OnEditUndo(); - afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI); - afx_msg void OnModify(); - afx_msg void OnUpdateModify(CCmdUI* pCmdUI); - afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI); - afx_msg void OnCut(); - afx_msg void OnObjectDelete(); - afx_msg void OnUpdateObjectDelete(CCmdUI* pCmdUI); - afx_msg void OnFileSave(); - afx_msg void OnFileSaveAs(); - afx_msg void OnCreatecyl(); - afx_msg void OnDfbr(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -public : -void ActivateFrame(CRuntimeClass* pViewClass, int nCmdShow = SW_RESTORE ); - Handle(TDocStd_Document) GetOcafDoc() {return myOcafDoc;}; - CString PathName; - -private: - Handle(TDocStd_Document) myOcafDoc; - -public : - void EraseAll(); - -private: - void DisplayPrs(); - void Fit3DViews(); - -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_OCAFDOC_H__49324D7C_7836_11D4_8D45_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/src/OcafMainFrm.cpp b/samples/mfc/standard/06_Ocaf/src/OcafMainFrm.cpp deleted file mode 100755 index 09a71246bb..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OcafMainFrm.cpp +++ /dev/null @@ -1,96 +0,0 @@ -// MainFrm.cpp : implementation of the OcafMainFrame class -// - -#include "StdAfx.h" - -#include "OcafMainFrm.h" - -#include "OcafApp.h" - -///////////////////////////////////////////////////////////////////////////// -// OcafMainFrame - -IMPLEMENT_DYNAMIC(OcafMainFrame, CMDIFrameWnd) - -BEGIN_MESSAGE_MAP(OcafMainFrame, CMDIFrameWnd) - //{{AFX_MSG_MAP(OcafMainFrame) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code ! - ON_WM_CREATE() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -static UINT indicators[] = -{ - ID_SEPARATOR, // status line indicator -// ID_INDICATOR_CAPS, -// ID_INDICATOR_NUM, -// ID_INDICATOR_SCRL, -}; - -///////////////////////////////////////////////////////////////////////////// -// OcafMainFrame construction/destruction - -OcafMainFrame::OcafMainFrame(): - OCC_MainFrame(true) -{ - // TODO: add member initialization code here - -} - -OcafMainFrame::~OcafMainFrame() -{ -} - -int OcafMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) -{ - if (OCC_MainFrame::OnCreate(lpCreateStruct) == -1) - return -1; - - if (!m_UndoRedoBar.Create(this) || - !m_UndoRedoBar.LoadToolBar(IDR_UNDOREDO) || - !m_ActionsBar.Create(this) || - !m_ActionsBar.LoadToolBar(IDR_ACTIONS)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } - - m_UndoRedoBar.SetBarStyle(m_UndoRedoBar.GetBarStyle() | - CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); - - m_ActionsBar.SetBarStyle(m_ActionsBar.GetBarStyle() | - CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); - - // TODO: Delete these three lines if you don't want the toolbar to - // be dockable - m_UndoRedoBar.EnableDocking(CBRS_ALIGN_ANY); - m_ActionsBar.EnableDocking(CBRS_ALIGN_ANY); - - EnableDocking(CBRS_ALIGN_ANY); - DockControlBarLeftOf(&m_UndoRedoBar,m_AISToolBar); - DockControlBarLeftOf(&m_ActionsBar,&m_UndoRedoBar); - -// SetTitle("Ocaf Sample"); - return 0; -} - - -///////////////////////////////////////////////////////////////////////////// -// OcafMainFrame diagnostics - -#ifdef _DEBUG -void OcafMainFrame::AssertValid() const -{ - CMDIFrameWnd::AssertValid(); -} - -void OcafMainFrame::Dump(CDumpContext& dc) const -{ - CMDIFrameWnd::Dump(dc); -} - -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// OcafMainFrame message handlers diff --git a/samples/mfc/standard/06_Ocaf/src/OcafMainFrm.h b/samples/mfc/standard/06_Ocaf/src/OcafMainFrm.h deleted file mode 100755 index 55abd74a13..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OcafMainFrm.h +++ /dev/null @@ -1,61 +0,0 @@ -// MainFrm.h : interface of the OcafMainFrame class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_MAINFRM_H__49324D78_7836_11D4_8D45_00AA00D10994__INCLUDED_) -#define AFX_MAINFRM_H__49324D78_7836_11D4_8D45_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include - -class OcafMainFrame : public OCC_MainFrame -{ - DECLARE_DYNAMIC(OcafMainFrame) -public: - OcafMainFrame(); - -// Attributes -public: - -// Operations -public: - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(OcafMainFrame) - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~OcafMainFrame(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - - -protected: // control bar embedded members - CToolBar m_UndoRedoBar; - CToolBar m_ActionsBar; - -// Generated message map functions -protected: - //{{AFX_MSG(OcafMainFrame) - afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private : -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_MAINFRM_H__49324D78_7836_11D4_8D45_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/src/StdAfx.cpp b/samples/mfc/standard/06_Ocaf/src/StdAfx.cpp deleted file mode 100755 index e189c88b67..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/StdAfx.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// StdAfx.cpp : source file that includes just the standard includes -// SampleOcaf.pch will be the pre-compiled header -// StdAfx.obj will contain the pre-compiled type information - -#include "StdAfx.h" - diff --git a/samples/mfc/standard/06_Ocaf/src/StdAfx.h b/samples/mfc/standard/06_Ocaf/src/StdAfx.h deleted file mode 100755 index a4fad16a3a..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/StdAfx.h +++ /dev/null @@ -1,153 +0,0 @@ -// StdAfx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if !defined(AFX_STDAFX_H__49324D76_7836_11D4_8D45_00AA00D10994__INCLUDED_) -#define AFX_STDAFX_H__49324D76_7836_11D4_8D45_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -#include // MFC OLE automation classes -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - - - -// CasCade : - -#ifdef MAINWIN -# define false FALSE -# define true TRUE -#endif - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// OCAF -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Ocaf -#include -#include -#include -#include - -//End CasCade - -#include - - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_STDAFX_H__49324D76_7836_11D4_8D45_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx deleted file mode 100755 index 40979bf567..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx +++ /dev/null @@ -1,122 +0,0 @@ -// File: TOcafFunction_BoxDriver.cxx -// Created: Mon Dec 27 10:37:13 1999 -// Author: Vladislav ROMASHKO -// - - -#include -#include -#include "Standard_GUID.hxx" -#include "TFunction_Logbook.hxx" -#include "TDataStd_Real.hxx" -#include "BRepPrimAPI_MakeBox.hxx" -#include "TNaming_Builder.hxx" - -IMPLEMENT_STANDARD_RTTIEXT (TOcafFunction_BoxDriver, TFunction_Driver) - -//======================================================================= -//function : GetID -//purpose : -//======================================================================= - -const Standard_GUID& TOcafFunction_BoxDriver::GetID() { - static Standard_GUID anID("22D22E51-D69A-11d4-8F1A-0060B0EE18E8"); - return anID; -} - - -//======================================================================= -//function : TPartStd_BoxDriver -//purpose : Creation of an instance of the driver. It's possible (and recommended) -// : to have only one instance of a driver for the whole session. -//======================================================================= - -TOcafFunction_BoxDriver::TOcafFunction_BoxDriver() -{} - -//======================================================================= -//function : Validate -//purpose : Validation of the object label, its arguments and its results. -//======================================================================= - -void TOcafFunction_BoxDriver::Validate(Handle(TFunction_Logbook)& log) const -{ - // We validate the object label ( Label() ), all the arguments and the results of the object: - log->SetValid(Label(), Standard_True); -} - -//======================================================================= -//function : MustExecute -//purpose : We call this method to check if the object was modified to -// : be invoked. If the object label or an argument is modified, -// : we must recompute the object - to call the method Execute(). -//======================================================================= -Standard_Boolean TOcafFunction_BoxDriver::MustExecute(const Handle(TFunction_Logbook)& log) const -{ - // If the object's label is modified: - if (log->IsModified(Label())) return Standard_True; - - // Cut (in our simple case) has two arguments: The original shape, and the tool shape. - // They are on the child labels of the box's label: - // So, OriginalNShape - is attached to the first child label - // ToolNShape - is attached to the second child label. - // - // Let's check them: - if (log->IsModified(Label().FindChild(1))) return Standard_True; // width. - if (log->IsModified(Label().FindChild(2))) return Standard_True; // length, - if (log->IsModified(Label().FindChild(3))) return Standard_True; // width. - if (log->IsModified(Label().FindChild(4))) return Standard_True; // length, - if (log->IsModified(Label().FindChild(5))) return Standard_True; // width. - if (log->IsModified(Label().FindChild(6))) return Standard_True; // length, - - // if there are no any modifications concerned the box, - // it's not necessary to recompute (to call the method Execute()): - return Standard_False; -} - -//======================================================================= -//function : Execute -//purpose : -// : We compute the object and topologically name it. -// : If during the execution we found something wrong, -// : we return the number of the failure. For example: -// : 1 - an attribute hasn't been found, -// : 2 - algorithm failed, -// : if there are no any mistakes occurred we return 0: -// : 0 - no mistakes were found. -//======================================================================= -Standard_Integer TOcafFunction_BoxDriver::Execute(Handle(TFunction_Logbook)& /*log*/) const -{ - // Get the values of dimension and position attributes - Handle(TDataStd_Real) TSR; - Standard_Real x,y,z,l,h,w; - if (!Label().FindChild(1).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - l=TSR->Get(); - - if (!Label().FindChild(2).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - h=TSR->Get(); - - if (!Label().FindChild(3).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - w=TSR->Get(); - - if (!Label().FindChild(4).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - x=TSR->Get(); - - if (!Label().FindChild(5).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - y=TSR->Get(); - - if (!Label().FindChild(6).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - z=TSR->Get(); - - // Build a box using the dimension and position attributes - BRepPrimAPI_MakeBox mkBox( gp_Pnt(x, y ,z), l, h ,w); - TopoDS_Shape ResultShape = mkBox.Shape(); - - - // Build a TNaming_NamedShape using built box - TNaming_Builder B(Label()); - B.Generated(ResultShape); -// That's all: - // If there are no any mistakes we return 0: - return 0; -} diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.hxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.hxx deleted file mode 100755 index 8a772e7289..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.hxx +++ /dev/null @@ -1,49 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. -// -#ifndef _TOcafFunction_BoxDriver_HeaderFile -#define _TOcafFunction_BoxDriver_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _TFunction_Driver_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -class TFunction_Logbook; - -class TOcafFunction_BoxDriver : public TFunction_Driver -{ -public: - - Standard_EXPORT static const Standard_GUID& GetID (); - Standard_EXPORT TOcafFunction_BoxDriver (); - Standard_EXPORT virtual void Validate (Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& log) const; - - // OCCT RTTI - DEFINE_STANDARD_RTTIEXT(TOcafFunction_BoxDriver,TFunction_Driver) -}; - - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx deleted file mode 100755 index 66cbebef26..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx +++ /dev/null @@ -1,143 +0,0 @@ -// File: TOcafFunction_CutDriver.cxx -// Created: Mon Dec 27 10:37:13 1999 -// Author: Vladislav ROMASHKO -// - - -#include -#include - -#include -#include - -#include -#include -#include -#include "Standard_GUID.hxx" -#include "TFunction_Logbook.hxx" -#include "TDF_Reference.hxx" - -IMPLEMENT_STANDARD_RTTIEXT (TOcafFunction_CutDriver, TFunction_Driver) - -//======================================================================= -//function : GetID -//purpose : -//======================================================================= - -const Standard_GUID& TOcafFunction_CutDriver::GetID() { - static Standard_GUID anID("22D22E52-D69A-11d4-8F1A-0060B0EE18E8"); - return anID; -} - - -//======================================================================= -//function : TPartStd_CutDriver -//purpose : Creation of an instance of the driver. It's possible (and recommended) -// : to have only one instance of a driver for the whole session. -//======================================================================= - -TOcafFunction_CutDriver::TOcafFunction_CutDriver() -{} - -//======================================================================= -//function : Validate -//purpose : Validation of the object label, its arguments and its results. -//======================================================================= - -void TOcafFunction_CutDriver::Validate(Handle(TFunction_Logbook)& log) const -{ - // We validate the object label ( Label() ), all the arguments and the results of the object: - log->SetValid(Label(), Standard_True); -} - -//======================================================================= -//function : MustExecute -//purpose : We call this method to check if the object was modified to -// : be invoked. If the object label or an argument is modified, -// : we must recompute the object - to call the method Execute(). -//======================================================================= - -Standard_Boolean TOcafFunction_CutDriver::MustExecute(const Handle(TFunction_Logbook)& log) const -{ - // If the object's label is modified: - if (log->IsModified(Label())) return Standard_True; - - // Cut (in our simple case) has two arguments: The original shape, and the tool shape. - // They are on the child labels of the cut's label: - // So, OriginalNShape - is attached to the first child label - // ToolNShape - is attached to the second child label, - // . - // Let's check them: - Handle(TDF_Reference) OriginalRef; - //TDF_Label aLabel = Label().FindChild(1); -/* - BOOL f = Label().IsNull(); - int a = Label().NbChildren(); -*/ - TCollection_AsciiString aEntry; - TDF_Tool::Entry(Label(), aEntry); - std::cout << "Entry: "<IsModified(OriginalRef->Get())) return Standard_True; // Original shape. - - Handle(TDF_Reference) ToolRef; - Label().FindChild(2).FindAttribute(TDF_Reference::GetID(),ToolRef); - if (log->IsModified(ToolRef->Get())) return Standard_True; // Tool shape. - - // if there are no any modifications concerned the cut, - // it's not necessary to recompute (to call the method Execute()): - return Standard_False; -} - -//======================================================================= -//function : Execute -//purpose : -// : We compute the object and topologically name it. -// : If during the execution we found something wrong, -// : we return the number of the failure. For example: -// : 1 - an attribute hasn't been found, -// : 2 - algorithm failed, -// : if there are no any mistakes occurred we return 0: -// : 0 - no mistakes were found. -//======================================================================= - -Standard_Integer TOcafFunction_CutDriver::Execute(Handle(TFunction_Logbook)& /*log*/) const -{ - // Let's get the arguments (OriginalNShape, ToolNShape of the object): - - // First, we have to retrieve the TDF_Reference attributes to obtain the root labels of the OriginalNShape and the ToolNShape: - Handle(TDF_Reference) OriginalRef, ToolRef; - if (!Label().FindChild(1).FindAttribute(TDF_Reference::GetID(), OriginalRef )) return 1; - TDF_Label OriginalLab = OriginalRef->Get(); - if (!Label().FindChild(2).FindAttribute(TDF_Reference::GetID(), ToolRef)) return 1; - TDF_Label ToolLab = ToolRef->Get(); - - // Get the TNaming_NamedShape attributes of these labels - Handle(TNaming_NamedShape) OriginalNShape, ToolNShape; - if (!( OriginalLab.FindAttribute(TNaming_NamedShape::GetID(),OriginalNShape) )) - throw Standard_Failure("TOcaf_Commands::CutObjects"); - if (!( ToolLab.FindAttribute(TNaming_NamedShape::GetID(),ToolNShape) )) - throw Standard_Failure("TOcaf_Commands::CutObjects"); - - // Now, let's get the TopoDS_Shape of these TNaming_NamedShape: - TopoDS_Shape OriginalShape = OriginalNShape->Get(); - TopoDS_Shape ToolShape = ToolNShape->Get(); - -// STEP 2: - // Let's call for algorithm computing a cut operation: - BRepAlgoAPI_Cut mkCut(OriginalShape, ToolShape); - // Let's check if the Cut has been successful: - if (!mkCut.IsDone()) - { - MessageBoxW (NULL, L"Cut not done.", L"Cut Function Driver", MB_ICONERROR); - return 2; - } - TopoDS_Shape ResultShape = mkCut.Shape(); - - // Build a TNaming_NamedShape using built cut - TNaming_Builder B(Label()); - B.Modify( OriginalShape, ResultShape); -// That's all: - // If there are no any mistakes we return 0: - return 0; -} diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.hxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.hxx deleted file mode 100755 index ae07f6a7e6..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.hxx +++ /dev/null @@ -1,49 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. -// -#ifndef _TOcafFunction_CutDriver_HeaderFile -#define _TOcafFunction_CutDriver_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _TFunction_Driver_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -class TFunction_Logbook; - - -class TOcafFunction_CutDriver : public TFunction_Driver -{ -public: - - Standard_EXPORT static const Standard_GUID& GetID() ; - Standard_EXPORT TOcafFunction_CutDriver (); - Standard_EXPORT virtual void Validate (Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& log) const; - - // OCCT RTTI - DEFINE_STANDARD_RTTIEXT(TOcafFunction_CutDriver,TFunction_Driver) -}; - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx deleted file mode 100755 index 44595ed01c..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx +++ /dev/null @@ -1,116 +0,0 @@ -// File: TOcafFunction_CylDriver.cxx -// Created: Mon Dec 27 10:37:13 1999 -// Author: Vladislav ROMASHKO -// - - -#include -#include -#include -#include -#include "Standard_GUID.hxx" -#include "TFunction_Logbook.hxx" -#include "TDataStd_Real.hxx" -#include "TNaming_Builder.hxx" - -IMPLEMENT_STANDARD_RTTIEXT (TOcafFunction_CylDriver, TFunction_Driver) - -//======================================================================= -//function : GetID -//purpose : -//======================================================================= - -const Standard_GUID& TOcafFunction_CylDriver::GetID() { - static Standard_GUID anID("22D22E53-D69A-11d4-8F1A-0060B0EE18E8"); - return anID; -} - - -//======================================================================= -//function : TPartStd_CylDriver -//purpose : Creation of an instance of the driver. It's possible (and recommended) -// : to have only one instance of a driver for the whole session. -//======================================================================= - -TOcafFunction_CylDriver::TOcafFunction_CylDriver() -{} - -//======================================================================= -//function : Validate -//purpose : Validation of the object label, its arguments and its results. -//======================================================================= - -void TOcafFunction_CylDriver::Validate(Handle(TFunction_Logbook)& log) const -{ - // We validate the object label ( Label() ), all the arguments and the results of the object: - log->SetValid(Label(), Standard_True); -} - -//======================================================================= -//function : MustExecute -//purpose : We call this method to check if the object was modified to -// : be invoked. If the object label or an argument is modified, -// : we must recompute the object - to call the method Execute(). -//======================================================================= -Standard_Boolean TOcafFunction_CylDriver::MustExecute(const Handle(TFunction_Logbook)& log) const -{ - // If the object's label is modified: - if (log->IsModified(Label())) return Standard_True; - - // Cylinder (in our simple case) has 5 arguments: - // - // Let's check them: - if (log->IsModified(Label().FindChild(1))) return Standard_True; // radius. - if (log->IsModified(Label().FindChild(2))) return Standard_True; // height, - if (log->IsModified(Label().FindChild(3))) return Standard_True; // x. - if (log->IsModified(Label().FindChild(4))) return Standard_True; // y, - if (log->IsModified(Label().FindChild(5))) return Standard_True; // z. - - // if there are no any modifications concerned the Cyl, - // it's not necessary to recompute (to call the method Execute()): - return Standard_False; -} - -//======================================================================= -//function : Execute -//purpose : -// : We compute the object and topologically name it. -// : If during the execution we found something wrong, -// : we return the number of the failure. For example: -// : 1 - an attribute hasn't been found, -// : 2 - algorithm failed, -// : if there are no any mistakes occurred we return 0: -// : 0 - no mistakes were found. -//======================================================================= -Standard_Integer TOcafFunction_CylDriver::Execute(Handle(TFunction_Logbook)& /*log*/) const -{ - // Get the values of dimension and position attributes - Handle(TDataStd_Real) TSR; - Standard_Real x,y,z,r,h; - if (!Label().FindChild(1).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - r=TSR->Get(); - - if (!Label().FindChild(2).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - h=TSR->Get(); - - if (!Label().FindChild(3).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - x=TSR->Get(); - - if (!Label().FindChild(4).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - y=TSR->Get(); - - if (!Label().FindChild(5).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - z=TSR->Get(); - - // Build a Cyl using the dimension and position attributes - BRepPrimAPI_MakeCylinder mkCyl( gp_Ax2(gp_Pnt(x, y ,z), gp_Dir(0,0,1)), r, h); - TopoDS_Shape ResultShape = mkCyl.Shape(); - - - // Build a TNaming_NamedShape using built Cyl - TNaming_Builder B(Label()); - B.Generated(ResultShape); -// That's all: - // If there are no any mistakes we return 0: - return 0; -} diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.hxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.hxx deleted file mode 100755 index 27ef1f14f2..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.hxx +++ /dev/null @@ -1,49 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. -// -#ifndef _TOcafFunction_CylDriver_HeaderFile -#define _TOcafFunction_CylDriver_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _TFunction_Driver_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -class TFunction_Logbook; - - -class TOcafFunction_CylDriver : public TFunction_Driver -{ -public: - - Standard_EXPORT static const Standard_GUID& GetID (); - Standard_EXPORT TOcafFunction_CylDriver (); - Standard_EXPORT virtual void Validate (Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& log) const; - - // OCCT RTTI - DEFINE_STANDARD_RTTIEXT(TOcafFunction_CylDriver,TFunction_Driver) -}; - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.cxx b/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.cxx deleted file mode 100755 index 8e05e69de5..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.cxx +++ /dev/null @@ -1,39 +0,0 @@ -// File: TOcaf_Application.cxx -// Created: Mon Jul 3 2000 -// Author: J Mazars - -//Modified by Sergey RUIN (An instantiation of the drivers) - -#include -#include -#include -#include -#include -#include -#include "TFunction_DriverTable.hxx" -#include "TOcafFunction_BoxDriver.hxx" -#include "TOcafFunction_CylDriver.hxx" -#include "TOcafFunction_CutDriver.hxx" - -IMPLEMENT_STANDARD_RTTIEXT (TOcaf_Application, TDocStd_Application) - -//======================================================================= -//function : TOcaf_Application -//purpose : -//======================================================================= - -TOcaf_Application::TOcaf_Application() -{ - // Instantiate a TOcafFunction_BoxDriver and add it to the TFunction_DriverTable - TFunction_DriverTable::Get()->AddDriver (TOcafFunction_BoxDriver::GetID(), - new TOcafFunction_BoxDriver()); - - // Instantiate a TOcafFunction_Cyl Driver and add it to the TFunction_DriverTable - TFunction_DriverTable::Get()->AddDriver (TOcafFunction_CylDriver::GetID(), - new TOcafFunction_CylDriver()); - - // Instantiate a TOcafFunction_CutDriver and add it to the TFunction_DriverTable - Handle(TOcafFunction_CutDriver) myCutDriver = new TOcafFunction_CutDriver(); - TFunction_DriverTable::Get()->AddDriver (TOcafFunction_CutDriver::GetID(), - new TOcafFunction_CutDriver()); -} diff --git a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.hxx b/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.hxx deleted file mode 100755 index c719daa1e8..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.hxx +++ /dev/null @@ -1,38 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. -// -#ifndef _TOcaf_Application_HeaderFile -#define _TOcaf_Application_HeaderFile - -#ifndef _TDocStd_Application_HeaderFile -#include -#endif -#ifndef _Standard_CString_HeaderFile -#include -#endif -#include -class TDocStd_Document; - - -class TOcaf_Application : public TDocStd_Application -{ -public: - Standard_EXPORT TOcaf_Application (); - - // OCCT RTTI - DEFINE_STANDARD_RTTIEXT (TOcaf_Application, TDocStd_Application) -}; - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.cxx b/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.cxx deleted file mode 100755 index 745668cbf5..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.cxx +++ /dev/null @@ -1,357 +0,0 @@ -// File: TOcaf_Commands.cxx -// Created: Tue Feb 8 17:56:02 2000 -// Author: Modelistation -// - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "TDataStd_Name.hxx" -#include "TFunction_Function.hxx" -#include "TOcafFunction_BoxDriver.hxx" -#include "TFunction_DriverTable.hxx" -#include "TOcafFunction_CylDriver.hxx" -#include "TDF_Reference.hxx" -#include "TOcafFunction_CutDriver.hxx" - -//======================================================================= -//function : TOcaf_Commands -//purpose : -//======================================================================= - -TOcaf_Commands::TOcaf_Commands(const TDF_Label& Main) -{ - MainLab = Main; -} - -//======================================================================= -//function : CreateBox -//purpose : Create a box containing a Named shape, a name, a Function -// and a Data structure containing box conctruction parameters -//======================================================================= - -TDF_Label TOcaf_Commands::CreateBox(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w, Standard_Real l, Standard_Real h, const TCollection_ExtendedString& Name) -{ - // A data structure for our box: - // the box itself is attached to the BoxLabel label (as his name and his function attribute) - // its arguments (dimensions: width, length and height; and position: x, y, z) - // are attached to the child labels of the box: - // - // 0:1 Box Label ---> Name ---> Named shape ---> Function - // | - // 0:1:1 -- Width Label - // | - // 0:1:2 -- Length Label - // | - // 0:1:3 -- Height Label - // | - // 0:1:4 -- X Label - // | - // 0:1:5 -- Y Label - // | - // 0:1:6 -- Z Label - - // Create a new label in the data structure for the box - TDF_Label L = TDF_TagSource::NewChild(MainLab); - - // Create the data structure : Set the dimensions, position and name attributes - TDataStd_Real::Set(L.FindChild(1), w); - TDataStd_Real::Set(L.FindChild(2), l); - TDataStd_Real::Set(L.FindChild(3), h); - TDataStd_Real::Set(L.FindChild(4), x); - TDataStd_Real::Set(L.FindChild(5), y); - TDataStd_Real::Set(L.FindChild(6), z); - TDataStd_Name::Set(L, Name); - - - // Instantiate a TFunction_Function attribute connected to the current box driver - // and attach it to the data structure as an attribute of the Box Label - Handle(TFunction_Function) myFunction = TFunction_Function::Set(L, TOcafFunction_BoxDriver::GetID()); - - // Initialize and execute the box driver (look at the "Execute()" code) - Handle(TFunction_Logbook) log = TFunction_Logbook::Set(L); - - Handle(TFunction_Driver) myBoxDriver; - // Find the TOcafFunction_BoxDriver in the TFunction_DriverTable using its GUID - if(!TFunction_DriverTable::Get()->FindDriver(TOcafFunction_BoxDriver::GetID(), myBoxDriver)) return L; - - myBoxDriver->Init(L); - if (myBoxDriver->Execute(log)) MessageBoxW (NULL, L"DFunction_Execute : failed", L"Box", MB_ICONERROR); - - return L; -} - - -//======================================================================= -//function : CreateCyl -//purpose : Create a cylinder containing a Named shape, a name, a Function -// and a Data structure containing cylinder conctruction parameters -//======================================================================= - -TDF_Label TOcaf_Commands::CreateCyl(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real r, Standard_Real h, const TCollection_ExtendedString& Name) -{ - // A data structure for our cylinder: - // the cylinder itself is attached to the CylinderLabel label (as his name and his function attribute) - // its arguments (dimensions: radius and height; and position: x, y, z) - // are attached to the child labels of the cylinder: - // - // 0:1 Cylinder Label ---> Name ---> Named shape ---> Function - // | - // 0:1:1 -- Radius Label - // | - // 0:1:2 -- Height Label - // | - // 0:1:3 -- X Label - // | - // 0:1:4 -- Y Label - // | - // 0:1:5 -- Z Label - - // Create a new label in the data structure for the cylinder - TDF_Label L = TDF_TagSource::NewChild(MainLab); - - // Create the data structure : Set the dimensions, position and name attributes - TDataStd_Real::Set(L.FindChild(1), r); - TDataStd_Real::Set(L.FindChild(2), h); - TDataStd_Real::Set(L.FindChild(3), x); - TDataStd_Real::Set(L.FindChild(4), y); - TDataStd_Real::Set(L.FindChild(5), z); - TDataStd_Name::Set(L, Name); - - - // Instantiate a TFunction_Function attribute connected to the current cylinder driver - // and attach it to the data structure as an attribute of the Cylinder Label - Handle(TFunction_Function) myFunction = TFunction_Function::Set(L, TOcafFunction_CylDriver::GetID()); - - // Initialize and execute the cylinder driver (look at the "Execute()" code) - Handle(TFunction_Logbook) log = TFunction_Logbook::Set(L); - - Handle(TFunction_Driver) myCylDriver; - // Find the TOcafFunction_CylDriver in the TFunction_DriverTable using its GUID - if(!TFunction_DriverTable::Get()->FindDriver(TOcafFunction_CylDriver::GetID(), myCylDriver)) return L; - - myCylDriver->Init(L); - if (myCylDriver->Execute(log)) MessageBoxW (NULL, L"DFunction_Execute : failed", L"Cylinder", MB_ICONERROR); - - return L; -} - - -TDF_Label TOcaf_Commands::ModifyBox(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w, Standard_Real l, Standard_Real h, const TCollection_ExtendedString &Name, Handle(TFunction_Logbook) &log) -{ - // Set the name attribute (if it's not null) - Handle(TDataStd_Name) myStdName; - if(Name.Length()) - TDataStd_Name::Set(MainLab, Name); - - // Set the dimensions and position attributes (if changed) - Handle(TDataStd_Real) curReal; - MainLab.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); - if(w!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(1), w); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); - if(l!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(2), l); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); - if(h!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(3), h); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); - if(x!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(4), x); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); - if(y!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(5), y); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(6).FindAttribute(TDataStd_Real::GetID(),curReal); - if(z!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(6), z); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - // Get the TFunction_Function used to create the box - Handle(TFunction_Function) TFF; - if ( !MainLab.FindAttribute(TFunction_Function::GetID(),TFF) ) - { - MessageBox (NULL, L"Object cannot be modify.", L"Modification", MB_ICONEXCLAMATION); - return MainLab; - } - - // Get the TFunction_FunctionDriver GUID used with the TFunction_Function - Standard_GUID myDriverID=TFF->GetDriverGUID(); - Handle(TFunction_Driver) myBoxDriver; - // Find the TOcafFunction_BoxDriver in the TFunction_DriverTable using its GUID - TFunction_DriverTable::Get()->FindDriver(myDriverID, myBoxDriver); - // Execute the cut if it must be (if an attribute changes) - myBoxDriver->Init(MainLab); - if (myBoxDriver->MustExecute(log)) - { - // Set the box touched, it will be useful to recompute an object which used this box as attribute - log->SetTouched(MainLab); - if(myBoxDriver->Execute(log)) - MessageBox (NULL, L"Recompute failed", L"Modify box", MB_ICONEXCLAMATION); - } - - return MainLab; -} - -TDF_Label TOcaf_Commands::ModifyCyl(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real r, Standard_Real h, const TCollection_ExtendedString &Name, Handle(TFunction_Logbook) &log) -{ - // Set the name attribute (if it's not null) - Handle(TDataStd_Name) myStdName; - if(Name.Length()) - TDataStd_Name::Set(MainLab, Name); - - // Set the dimensions and position attributes (if changed) - Handle(TDataStd_Real) curReal; - MainLab.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); - if(r!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(1), r); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); - if(h!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(2), h); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); - if(x!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(3), x); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); - if(y!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(4), y); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); - if(z!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(5), z); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - // Get the TFunction_Function used to create the cylinder - Handle(TFunction_Function) TFF; - if ( !MainLab.FindAttribute(TFunction_Function::GetID(),TFF) ) - { - MessageBoxW (NULL, L"Object cannot be modify.", L"Modification", MB_ICONEXCLAMATION); - return MainLab; - } - - // Get the TFunction_FunctionDriver GUID used with the TFunction_Function - Standard_GUID myDriverID=TFF->GetDriverGUID(); - Handle(TFunction_Driver) myCylDriver; - // Find the TOcafFunction_CylDriver in the TFunction_DriverTable using its GUID - TFunction_DriverTable::Get()->FindDriver(myDriverID, myCylDriver); - // Execute the cut if it must be (if an attribute changes) - myCylDriver->Init(MainLab); - if (myCylDriver->MustExecute(log)) - { - // Set the cylinder touched, it will be useful to recompute an object which used this cylinder as attribute - log->SetTouched(MainLab); - if(myCylDriver->Execute(log)) - MessageBoxW (NULL, L"Recompute failed", L"Modify cylinder", MB_ICONEXCLAMATION); - } - - return MainLab; -} - -TDF_Label TOcaf_Commands::Cut(TDF_Label ObjectLab, TDF_Label ToolObjectLab) -{ - // A data structure for our cut operation: - // the result itself is attached to the Result label (as his name and his function attribute) - // its arguments (Original object label; Tool object label) are attached to the child - // labels of the Result Label: - // - // 0:1 Result Label ---> Name ---> Named shape ---> Function - // | - // 0:1:1 -- Original object label Label - // | - // 0:1:2 -- object label Label - // - - // Create a new label in the data structure for the box - TDF_Label L = TDF_TagSource::NewChild(MainLab); - - // Create the data structure : Set a reference attribute on the Original and the Tool objects, set the name attribute - TDF_Reference::Set(L.FindChild(1), ObjectLab); - TDF_Reference::Set(L.FindChild(2), ToolObjectLab); - Handle(TDataStd_Name) ObjectName; - ObjectLab.FindAttribute(TDataStd_Name::GetID(),ObjectName); - TDataStd_Name::Set(L, ObjectName->Get()); - - - // Instantiate a TFunction_Function attribute connected to the current cut driver - // and attach it to the data structure as an attribute of the Result Label - Handle(TFunction_Function) myFunction = TFunction_Function::Set(L, TOcafFunction_CutDriver::GetID()); - - // Initialize and execute the cut driver (look at the "Execute()" code) - Handle(TFunction_Logbook) log = TFunction_Logbook::Set(L); - - Handle(TFunction_Driver) myCutDriver; - // Find the TOcafFunction_CutDriver in the TFunction_DriverTable using its GUID - if(!TFunction_DriverTable::Get()->FindDriver(TOcafFunction_CutDriver::GetID(), myCutDriver)) return L; - - myCutDriver->Init(L); - if (myCutDriver->Execute(log)) MessageBoxW (NULL, L"DFunction_Execute : failed", L"Cut", MB_ICONERROR); - - return L; -} diff --git a/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.hxx b/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.hxx deleted file mode 100755 index bf85d5df81..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.hxx +++ /dev/null @@ -1,85 +0,0 @@ -// File generated by CPPExt (Value) -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. - -#ifndef _TOcaf_Commands_HeaderFile -#define _TOcaf_Commands_HeaderFile - -#ifndef _TDF_Label_HeaderFile -#include -#endif -#ifndef _Standard_Real_HeaderFile -#include -#endif -#ifndef _TNaming_NamedShape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -class TDF_Label; -class gp_Pnt; -class TopoDS_Shape; -class TNaming_NamedShape; -class gp_XYZ; -class TOcaf_Object; - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#include "TFunction_Logbook.hxx" - -class TOcaf_Commands { - -public: - TDF_Label Cut( TDF_Label ObjectLab, TDF_Label ToolObjectLab); - TDF_Label ModifyBox(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w, Standard_Real l, Standard_Real h, const TCollection_ExtendedString& Name, Handle(TFunction_Logbook) &log); - TDF_Label CreateBox(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w, Standard_Real l, Standard_Real h, const TCollection_ExtendedString& Name); - TDF_Label ModifyCyl(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real r, Standard_Real h, const TCollection_ExtendedString &Name, Handle(TFunction_Logbook) &log); - TDF_Label CreateCyl(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real r, Standard_Real h, const TCollection_ExtendedString& Name); - - // Methods PUBLIC - // -Standard_EXPORT TOcaf_Commands(const TDF_Label& Main); -//Standard_EXPORT Handle(TDataStd_TreeNode) Graph() ; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -TDF_Label MainLab; -}; - - - - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/samples/mfc/standard/07_Triangulation/CMakeLists.txt b/samples/mfc/standard/07_Triangulation/CMakeLists.txt deleted file mode 100644 index 1cf8c5f8fe..0000000000 --- a/samples/mfc/standard/07_Triangulation/CMakeLists.txt +++ /dev/null @@ -1,60 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (Triangulation) - -add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE) -set (CMAKE_MFC_FLAG 2) - -set (Triangulation_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/07_Triangulation/src) -set (Triangulation_HEADER_FILES ${Triangulation_SRC_DIR}/ISession_Curve.h - ${Triangulation_SRC_DIR}/OCCDemo_Presentation.h - ${Triangulation_SRC_DIR}/Tesselate_Presentation.h - ${Triangulation_SRC_DIR}/TriangulationApp.h - ${Triangulation_SRC_DIR}/TriangulationDoc.h - ${Triangulation_SRC_DIR}/StdAfx.h ) -set (Triangulation_SOURCE_FILES ${Triangulation_SRC_DIR}/ISession_Curve.cpp - ${Triangulation_SRC_DIR}/OCCDemo_Presentation.cpp - ${Triangulation_SRC_DIR}/Tesselate_Presentation.cpp - ${Triangulation_SRC_DIR}/TriangulationApp.cpp - ${Triangulation_SRC_DIR}/TriangulationDoc.cpp - ${Triangulation_SRC_DIR}/StdAfx.cpp) - -set (Triangulation_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/07_Triangulation/res) -set (Triangulation_RESOURCE_HEADER ${Triangulation_RESOURCE_DIR}/resource.h) -set (Triangulation_RESOURCE_FILES ${Triangulation_RESOURCE_DIR}/Toolbar.bmp - ${Triangulation_RESOURCE_DIR}/Triangulation.rc) - -# groups in the VS solution -source_group ("Source Files" FILES ${Triangulation_SOURCE_FILES} - ${COMMON_WINMAIN_FILE}) - -source_group ("Header Files" FILES ${Triangulation_HEADER_FILES} - ${Triangulation_RESOURCE_HEADER}) - -source_group ("Resource Files" FILES ${Triangulation_RESOURCE_FILES}) - -add_executable (Triangulation WIN32 ${Triangulation_SOURCE_FILES} - ${Triangulation_HEADER_FILES} - ${COMMON_WINMAIN_FILE} - ${Triangulation_RESOURCE_HEADER} - ${Triangulation_RESOURCE_FILES}) - -set_property (TARGET Triangulation PROPERTY FOLDER "Samples/mfc") - -if (SINGLE_GENERATOR) - install (TARGETS Triangulation DESTINATION "${INSTALL_DIR_BIN}") -else() - install (TARGETS Triangulation - CONFIGURATIONS Release RelWithDebInfo - DESTINATION "${INSTALL_DIR_BIN}") - install (TARGETS Triangulation - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_BIN}d") -endif() - -include_directories (${CMAKE_BINARY_DIR}/inc - ${MFC_STANDARD_SAMPLES_DIR}/07_Triangulation - ${Triangulation_SRC_DIR} - ${MFC_STANDARD_SAMPLES_DIR}/Common) - -target_link_libraries (Triangulation mfcsample TKSTEP209 TKSTEPAttr TKBO) \ No newline at end of file diff --git a/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj b/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj deleted file mode 100644 index 9ba0b2c9a6..0000000000 --- a/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj +++ /dev/null @@ -1,321 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B50C10C8-5260-498B-A80F-48FFB4534360} - Triangulation - MFCProj - - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ../../../../win32\$(VCFMT)\bin\ - .\win32\obj\ - false - ../../../../win64\$(VCFMT)\bin\ - .\win64\obj\ - false - ../../../../win32\$(VCFMT)\bind\ - .\win32\objd\ - true - ../../../../win64\$(VCFMT)\bind\ - .\win64\objd\ - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\obj/Triangulation.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\Common;..\..\..\;$(CSF_OCCTIncludePath);..\..\..\src;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win32\obj/Triangulation.pch - .\win32\obj/ - .\win32\obj/ - .\win32\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bin/Triangulation.exe - true - ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win32\$(VCFMT)\bin/Triangulation.pdb - Windows - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\obj/Triangulation.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\Common;..\..\..\;$(CSF_OCCTIncludePath);..\..\..\src;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win64\obj/Triangulation.pch - .\win64\obj/ - .\win64\obj/ - .\win64\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bin/Triangulation.exe - true - ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win64\$(VCFMT)\bin/Triangulation.pdb - Windows - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\objd/Triangulation.tlb - - - - - Disabled - ..\..\..\..\Common;..\..\..\;$(CSF_OCCTIncludePath);..\..\..\src;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win32\objd/Triangulation.pch - .\win32\objd/ - .\win32\objd/ - .\win32\objd/ - Level4 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bind/Triangulation.exe - true - ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win32\$(VCFMT)\bind/Triangulation.pdb - Windows - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\objd/Triangulation.tlb - - - - - Disabled - ..\..\..\..\Common;..\..\..\;$(CSF_OCCTIncludePath);..\..\..\src;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win64\objd/Triangulation.pch - .\win64\objd/ - .\win64\objd/ - .\win64\objd/ - Level4 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bind/Triangulation.exe - true - ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win64\$(VCFMT)\bind/Triangulation.pdb - Windows - MachineX64 - - - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - {2d6cbbe8-6965-4016-b503-0d715ae26691} - false - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj.filters b/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj.filters deleted file mode 100644 index 91717b535c..0000000000 --- a/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj.filters +++ /dev/null @@ -1,67 +0,0 @@ - - - - - {1ffd2e2a-cb4e-4b01-93a8-1689da39afe5} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {f9d99f5f-32c4-422c-b52f-1e0132811a39} - h;hpp;hxx;hm;inl - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/07_Triangulation/res/RCa05792 b/samples/mfc/standard/07_Triangulation/res/RCa05792 deleted file mode 100755 index d21b55380d9760ffc3a0f036c45d1a73a7209089..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12346 zcmeI2Z%-RZ62|-WN%tLmMv6ANm5+bPF89tDl2}UsVIa9vB+E;HMIwN($#T+t_hr>d)a#a+8AcjL}o%dNS#``!KBebKe!cHOD}HE><` z(H*)yJsJ2Xx9&_AtvKwz37hhxe$+*WWLhB2XVaCzn=T6u9l=Y_hY>G zlAOD*dS+7Gsx6!t|JYNza(ANC@tomf5}>0q(R@%}+O}u2)F5Ow(QI zb0969NY8zDAdMYKgI)bQkS_P!KlEgv?~iU{8;phXJdBmI-1`v`jp>2Sj@6~!XZ9R;EZ@Dfz+H{}(j&)M*4A=A z$htc6q>g)?v9599r!gA-JoWtx_4rGnNAuyYqSqDreJ*@=AU{2ko%CeCLs{{jF8KUg zSF5(?v1lC0SBC1ful}zij$zh@LRS1^Lteq?_S9!zeNJ?L@4Y2FF)HuXqOWm&a6gLk zK<&1teX1>ndTZFSBGdyNFXaOx^*fWbBf(J5d3vt#u1SJ7`UEM#)UU!cw1Xv7C5p?^0j3VRithExc)^JVN$d;(plVX7nmEcx4ftL z8|Mhk7!2R$k#EXw(c8wtBTr-YaO&^-vQOeOIZP@# z#~-J3EE-**5q|XFk?l})4m4)y9s3OBX(?yNZ)owq!O}eU9IjSd21G3}cFUvbT4qKU z!Obe472#^Y(Ajr6|4BX1a^$uwyLy39p#Ma^3Wt#_k*pV7|0YZ)&w=+udCe^6SgL04 zdZT>baINeUWHA}$!T1=d-WI4BP<^3Gdb*X~z8>mA*h@!7T1+hXpPPs2f?py6;Q zcEw{0&$-7o^iz>5HR<|TXa?SHOS4B_v+J@vawhIjOylmhawV{y6V;9 ze%1DU!CtJ&?!5Gi^4nLh$AzWb^+@{k$aZ8YR7{4-Wc#v#Pkvm_u?Bn|I$hZ!>x*Mg zDWBnO6*eDyXZh}E4ynSO3Jy`@VfutOu^(?02-W1rASY|5mZy^X?4h)FsCOV|+r5&P zUU_>rEKJ)5I%IUalFWKwDZeX1PLxYcWTn@tC+&+CIMIC7WDMBwIrO6k3hALu=(8!t7$g3jDnaGaDnv-ph zX7ll_a-=2)R>uGeI$D+E5$5fK2RyNf?sZOP%NawE(6Uw=aJ!ws= zptpXmp+f$#p*wjz89ko(^1TQTC!SFcKCkF5^@Q9%({35ZsYf387@oJh|NAUjta{K( z@YzqoG}c773*nkYf|jCr-23S`5Oic!JSzO3gB^xlj{c`Zaiy+r^^6Z1^^yB$1Lv+{EA>Zew(Jb_{Yv#l zI(SN!9A`3mR#jxtHr^5ys}b(yAoylcLtVbiE=UAYrWxL;X7gUNXuE&$`!qUjx-D-V zr#|wYYSxbQi@mXZd5f)+4`dhVoA4aE0lCu_>}vk#*LAGztP*IIEVA^TBH+{Q1Lb$J zW@_#OMN9nY7s<1#Y-~f-&^<3bHO~w0vDC!b2iR2>aiTu4ge4v8zc%enEcBO;wVi^rP2iR0HS8x)m1X>GaU(AV6ECOvbzlE3gs-`* zG3~u7n_ku2bN^M}xgMv|HhY8QDeWnb9qB3Fu{8@bv}kKqEpNs8$ZpuDW(Vv}7d07> zHS9?n&pemZegk!E3LTf zHGQf5tdRe=HLmI#_PTn0_i0UL{(A%u0+(7!jN`8FPdG(=$aQ;{PJ` zRO+L3r&G+X1I2WORLywG|Lj5CG*IPj{OL$y&d@w~KLa6n+nRZ5($v|*mf{ZDSWHu_ zY7gYYrS$c`z!pwIV8!HQwv)haHfL<`<&hAH=Pkdcee~nl*4Q2kgs|MKr&d-6Czl0} z>#jvOo>i!#!z!n8KB*?emDM^4cy5?V&74&_Bew`=*=c&7sin~}cj$l)tFydA0^gQaMVFu^gdt{FD^vW2Z9X_4;7k^S6%W z$<>4Nvb9ySz%IwS(8{g8Fa5Xu4yTLme5>!0oq7vx$C@4Hl^H-%qf^&{IC?0`C+hJ! zvFKRVxC%WhZ%$TZ4|VJEEEIUa8i(J%96RG1&XI)yd_-$)O zbifJG+$lY>pqG0l>W`fS-H=AW#PsxKnm?N6uwbI(bI$45>@?G%tK|K zGdM=4Ja@1zZ;UN%nNKo?Q#LjR;`eh;BpL;5;!Frup4!fxpP9u@Lm-QncxKb-8RJx< a82^_Ke}Y6+X~WoU#5cls(0!gWJO2R#4?2bb diff --git a/samples/mfc/standard/07_Triangulation/res/Toolbar.bmp b/samples/mfc/standard/07_Triangulation/res/Toolbar.bmp deleted file mode 100755 index 19f56e05119bda195fce5ae9ddfc6550d27a4c36..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2358 zcmc(gJ&xNj5Jo3J07=+FF%Uq#o8$yJKwuzM?m`=jFr~Y=RO?%8zl{%)L+A#|`-Y?# z!QNswiw!N3R)O+3}b*Rz$m8 zF6{bY_RHp35|fWqEb&c;{ZF1*Kgs_X&AQRfNkZ4Z+ObxK%%(|~c;l!`l4aei#C^@1 zZR#-(xhsw+0 zj725?HiL}AYZu;~r)0&W9mMN7MmLJr=|Dw?dzH7n#mf$g=MIJ@oQ?!l?0Ac3y;3=g z(w#LV^%^=HR!Te%mAA|3!@qn6=M6kSNm^6ld5Z^*T)BT|x;^`sbx-)WtMR<@&zcYx z-gSM>6B+dUokud5>V=#ldGK%NZ>i7h-e37MYw<57E<9>q=g&)Du>(a5s{g>#4!Qr9 zc*a=sS9#deP&{2Aaq4n$!b9T?QFwj`%zArsi<&*XU*sIa4Pa?-Vd=K}9V4l3^`Aeg zdV$BK<0Dfdy*EFRQ}|F5O3c+{u0*x%VKNo>FDnlqPg}@cj!H$==uB1 zBdP;2TvyCJV-Lhrjxg>XYyPn4S`~&W#@{dcM?!KP`t;Px*N_VOczfO-ZdHU0 diff --git a/samples/mfc/standard/07_Triangulation/res/Triangulation.rc b/samples/mfc/standard/07_Triangulation/res/Triangulation.rc deleted file mode 100755 index ab6b27c663..0000000000 --- a/samples/mfc/standard/07_Triangulation/res/Triangulation.rc +++ /dev/null @@ -1,232 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" -#include "..\..\Common\res\OCC_Resource.h" -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "#include ""..\\..\\..\\Common\\res\\OCC_Resource.h""\0" -END - -3 TEXTINCLUDE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDR_MAINFRAME BITMAP "Toolbar.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Toolbar -// - -IDR_MAINFRAME TOOLBAR 20, 20 -BEGIN - BUTTON ID_FILE_NEW - SEPARATOR - BUTTON ID_TRIANGU - BUTTON ID_Visu - SEPARATOR - BUTTON ID_Clear - SEPARATOR - BUTTON ID_BUTTONStart - BUTTON ID_BUTTONPrev - BUTTON ID_BUTTONRepeat - BUTTON ID_BUTTONNext - BUTTON ID_BUTTONEnd - BUTTON ID_DUMP_VIEW - SEPARATOR - BUTTON ID_APP_ABOUT -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MAINFRAME MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Help" - BEGIN - MENUITEM "&About Triangulation...", ID_APP_ABOUT - END -END - -IDR_3DTYPE MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM "&Close", ID_FILE_CLOSE - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Window" - BEGIN - MENUITEM "&New Window", ID_WINDOW_NEW - MENUITEM "&Cascade", ID_WINDOW_CASCADE - MENUITEM "&Tile", ID_WINDOW_TILE_HORZ - MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE - END - POPUP "&Help" - BEGIN - MENUITEM "&About Triangulation...", ID_APP_ABOUT - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileDescription", "Viewer MFC Application" - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "Viewer" - VALUE "LegalCopyright", "Copyright (C) 1997" - VALUE "OriginalFilename", "Viewer.EXE" - VALUE "ProductName", "SampleTriangulation Application" - VALUE "ProductVersion", "1, 0, 0, 1" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDR_MAINFRAME "Triangulation" - IDR_3DTYPE "\nTriangulation\n\n\n\n.Document\n Document" -END - -STRINGTABLE -BEGIN - ID_BOX "Create and display a box\nBox" - ID_Cylinder "Create and display a cylinder\nCylinder" - ID_TRIANGU "Compute triangulation on a shape\nMesh " - ID_Clear "Remove triangulation from a shape\nClear" - ID_Visu "Display triangulation\nDisplay triangulation" - ID_BUTTONPrev "Press to go to the previous sample\nPrevious sample (PgUp)" - ID_BUTTONRepeat "Press to repeat the current sample\nRepeat sample (Space)" - ID_BUTTONStart "Press to go to the first sample\nFirst sample (Home)" - ID_BUTTONNext "Press to go to the next sample\nNext sample (PgDn)" - ID_BUTTONEnd "Press to go to the last sample\nLast sample (End)" - ID_DUMP_VIEW "Save current frame into an image file\nExport view (F12)" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif -#include "afxres.rc" // Standard components -#endif -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/samples/mfc/standard/07_Triangulation/res/resource.h b/samples/mfc/standard/07_Triangulation/res/resource.h deleted file mode 100755 index 1291556db0..0000000000 --- a/samples/mfc/standard/07_Triangulation/res/resource.h +++ /dev/null @@ -1,28 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by TopologyTriangulation.rc -// -#define ID_BOX 802 -#define ID_Cylinder 803 -#define ID_TRIANGU 804 -#define ID_Clear 805 -#define ID_Visu 806 -#define ID_BUTTONPrev 807 -#define ID_BUTTONRepeat 808 -#define ID_BUTTONStart 809 -#define ID_BUTTONNext 810 -#define ID_BUTTONEnd 811 -#define ID_BUTTON812 812 -#define ID_DUMP_VIEW 812 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 133 -#define _APS_NEXT_COMMAND_VALUE 813 -#define _APS_NEXT_CONTROL_VALUE 1002 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/samples/mfc/standard/07_Triangulation/src/ISession_Curve.cpp b/samples/mfc/standard/07_Triangulation/src/ISession_Curve.cpp deleted file mode 100755 index 6d6fb6de72..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/ISession_Curve.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// ISession_Curve.cpp: implementation of the ISession_Curve class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "ISession_Curve.h" -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[]=__FILE__; -#endif - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - - -ISession_Curve::ISession_Curve(const Handle(Geom_Curve)& aCurve) -:AIS_InteractiveObject(),myCurve(aCurve) -{ -} - -ISession_Curve::~ISession_Curve() -{ - -} -void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer /*aMode*/) -{ - GeomAdaptor_Curve anAdaptorCurve(myCurve); - if (hasOwnColor) - myDrawer->LineAspect()->SetColor (myDrawer->Color()); - myDrawer->Link()->SetDiscretisation(100); - myDrawer->Link()->SetMaximalParameterValue(500); - - StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer); -} - -void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, - const Standard_Integer /*aMode*/) -{ -} - - diff --git a/samples/mfc/standard/07_Triangulation/src/ISession_Curve.h b/samples/mfc/standard/07_Triangulation/src/ISession_Curve.h deleted file mode 100755 index c1c955fdf9..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/ISession_Curve.h +++ /dev/null @@ -1,32 +0,0 @@ -// ISession_Curve.h: interface for the ISession_Curve class. -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_) -#define AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -#include -#include -#include -#include -class ISession_Curve; -DEFINE_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject) - -class ISession_Curve : public AIS_InteractiveObject -{ -public: - ISession_Curve(const Handle(Geom_Curve)& aCurve); - virtual ~ISession_Curve(); -DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) -private: - -Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; -void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; - -Handle(Geom_Curve) myCurve; -}; - -#endif // !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.cpp b/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.cpp deleted file mode 100755 index fb4968a7f8..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.cpp +++ /dev/null @@ -1,331 +0,0 @@ -// OCCDemo_Presentation.cpp: implementation of the OCCDemo_Presentation class. -// This is a base class for all presentations -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "OCCDemo_Presentation.h" -#include -#include "TriangulationDoc.h" -#include "ISession_Curve.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAX_PARAM 1000 // if a surface parameter is infinite, it is assigned -// this value in order to display the "infinit" object in the viewer. - - -Standard_Boolean OCCDemo_Presentation::WaitForInput (unsigned long aMilliSeconds) -{ - //::WaitForSingleObject(::CreateEvent (NULL, FALSE, FALSE, NULL), aMilliSeconds); - if (::MsgWaitForMultipleObjects(0, NULL, FALSE, aMilliSeconds, - QS_KEY | QS_MOUSEBUTTON) != WAIT_TIMEOUT) - { - MSG msg; - if (::PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) - { - if (msg.message == WM_KEYUP) - { - ::PeekMessage (&msg, NULL, 0, 0, PM_REMOVE); - return WaitForInput (aMilliSeconds); - } - else - return Standard_True; - } - } - return Standard_False; -} - -//================================================================ -// Function : fixParam -// Purpose : assigns a finite value to theParam if it's infinite -// (equal to +- Precision::Infinite()) -//================================================================ -static Standard_Boolean fixParam(Standard_Real& theParam) -{ - Standard_Boolean aResult = Standard_False; - if (Precision::IsNegativeInfinite(theParam)) - { - theParam = -MAX_PARAM; - aResult = Standard_True; - } - if (Precision::IsPositiveInfinite(theParam)) - { - theParam = MAX_PARAM; - aResult = Standard_True; - } - return aResult; -} - -//================================================================ -// Function : DrawSurface -// Purpose : displays a given geometric surface in 3d viewer -// (creates a finite face and displays it) -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface - (const Handle(Geom_Surface)& theSurface, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Standard_Real u1, u2, v1, v2; - theSurface->Bounds(u1,u2,v1,v2); - fixParam(u1); - fixParam(u2); - fixParam(v1); - fixParam(v2); - - Handle(AIS_Shape) aGraphicSurface = - new AIS_Shape(BRepBuilderAPI_MakeFace (theSurface, u1, u2, v1, v2, Precision::Confusion())); - - getAISContext()->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay); - getAISContext()->SetColor(aGraphicSurface, theColor, toDisplay); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicSurface, Standard_False); - CTriangulationDoc::Fit(); - } - else - getAISContext()->Display (aGraphicSurface, Standard_True); - } - - return aGraphicSurface; -} - -//================================================================ -// Function : DrawCurve -// Purpose : displays a given curve 3d -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve - (const Handle(Geom_Curve)& theCurve, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(ISession_Curve) aGraphicCurve = new ISession_Curve (theCurve); - - getAISContext()->SetColor (aGraphicCurve, theColor, toDisplay); - aGraphicCurve->Attributes()->Link()->SetLineArrowDraw(Standard_False); - if (toDisplay){ - if (FitMode){ - getAISContext()->Display (aGraphicCurve, Standard_False); - CTriangulationDoc::Fit(); - } - else - getAISContext()->Display (aGraphicCurve, Standard_True); - } - - return aGraphicCurve; -} - -//================================================================ -// Function : DrawCurve -// Purpose : displays a given curve 2d -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve - (const Handle(Geom2d_Curve)& theCurve, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay, - const gp_Ax2& aPosition) -{ - // create 3D curve in plane - Handle(Geom_Curve) aCurve3d; - if (theCurve->IsKind(STANDARD_TYPE(Geom2d_OffsetCurve))) - { - Handle(Geom2d_OffsetCurve) aOffCurve = - Handle(Geom2d_OffsetCurve)::DownCast(theCurve); - Handle(Geom_Curve) aBasCurve3d = - GeomAPI::To3d (aOffCurve->BasisCurve(), gp_Pln(aPosition)); - Standard_Real aDist = aOffCurve->Offset(); - aCurve3d = new Geom_OffsetCurve (aBasCurve3d, aDist, aPosition.Direction()); - } - else - { - aCurve3d = GeomAPI::To3d (theCurve, gp_Pln(aPosition)); - } - return drawCurve (aCurve3d, theColor, toDisplay); -} - -//================================================================ -// Function : drawPoint -// Purpose : displays a given point -//================================================================ -Handle(AIS_Point) OCCDemo_Presentation::drawPoint - (const gp_Pnt& aPnt, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Point) aGraphicPoint = new AIS_Point (new Geom_CartesianPoint(aPnt)); - - getAISContext()->SetColor (aGraphicPoint, theColor, toDisplay); - if (toDisplay) { - getAISContext()->Display (aGraphicPoint, Standard_True); - //COCCDemoDoc::Fit(); - } - - return aGraphicPoint; -} - -//================================================================ -// Function : drawVector -// Purpose : displays a given vector in 3d viewer -// (segment of line starting at thePnt with the arrow at the end, -// the length of segment is the length of the vector) -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector - (const gp_Pnt& thePnt, - const gp_Vec& theVec, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Standard_Real aLength = theVec.Magnitude(); - if (aLength < Precision::Confusion()) - return Handle(AIS_InteractiveObject)(); - - Handle(Geom_Curve) aCurve = new Geom_Line (thePnt, theVec); - aCurve = new Geom_TrimmedCurve (aCurve, 0, aLength); - - Handle(ISession_Curve) aGraphicCurve = new ISession_Curve (aCurve); - - getAISContext()->SetColor (aGraphicCurve, theColor, toDisplay); - Handle(Prs3d_Drawer) aDrawer = aGraphicCurve->Attributes()->Link(); - aDrawer->SetLineArrowDraw(Standard_True); - aDrawer->ArrowAspect()->SetLength(aLength/10); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicCurve, Standard_False); - CTriangulationDoc::Fit(); - } - else - getAISContext()->Display (aGraphicCurve, Standard_True); - } - - return aGraphicCurve; -} - - -Handle(AIS_Shape) OCCDemo_Presentation::drawShape - (const TopoDS_Shape& theShape,const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape); - - getAISContext()->SetMaterial(aGraphicShape, Graphic3d_NOM_PLASTIC, toDisplay); - getAISContext()->SetColor (aGraphicShape, theColor, toDisplay); - if (toDisplay){ - if (FitMode){ - getAISContext()->Display (aGraphicShape, Standard_False); - CTriangulationDoc::Fit(); - } - else - getAISContext()->Display (aGraphicShape, Standard_True); - } - - return aGraphicShape; -} - -Handle(AIS_Shape) OCCDemo_Presentation::drawShape - (const TopoDS_Shape& theShape, - const Graphic3d_NameOfMaterial theMaterial, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape); - - getAISContext()->SetMaterial(aGraphicShape, theMaterial, toDisplay); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicShape, Standard_False); - CTriangulationDoc::Fit(); - } - else - getAISContext()->Display (aGraphicShape, Standard_True); - } - - return aGraphicShape; -} -/* -void OCCDemo_Presentation::GetViewCenter(Standard_Real& Xc, Standard_Real& Yc) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - OCC_3dView *pView = (OCC_3dView*)pChild->GetActiveView(); - pView->GetViewCenter(Xc,Yc); -} - -void OCCDemo_Presentation::SetViewCenter(Standard_Real Xc, Standard_Real Yc) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->SetViewCenter(Xc,Yc); -} - -void OCCDemo_Presentation::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->GetViewEye(X,Y,Z); -} - -void OCCDemo_Presentation::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->SetViewEye(X,Y,Z); -} - -Standard_Real OCCDemo_Presentation::GetViewScale() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - return pView->GetViewScale(); -} - -void OCCDemo_Presentation::SetViewScale(Standard_Real Coef) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->SetViewScale(Coef); -} - -void OCCDemo_Presentation::ResetView() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->Reset(); -} -*/ -Handle(AIS_InteractiveContext) OCCDemo_Presentation::getAISContext() const -{ - return myDoc->GetAISContext(); -} - -Handle(V3d_Viewer) OCCDemo_Presentation::getViewer() const -{ - return myDoc->GetViewer(); -} - - -Standard_CString OCCDemo_Presentation::GetDataDir() -{ - return myDoc->GetDataDir(); -} diff --git a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h b/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h deleted file mode 100755 index 4b6c3fa876..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h +++ /dev/null @@ -1,135 +0,0 @@ -// OCCDemo_Presentation.h: interface for the OCCDemo_Presentation class. -// This is a base class for all presentations -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - - -#define WAIT_A_LITTLE WaitForInput(500) -#define WAIT_A_SECOND WaitForInput(1000) - -//#include "TriangulationDoc.h" -//#include -class CTriangulationDoc; -#include -#include -#include -#include -#include -class Quantity_Color; - -class OCCDemo_Presentation -{ -public: - // Construction - OCCDemo_Presentation() : myIndex(0), myNbSamples(0), FitMode(false){} - virtual ~OCCDemo_Presentation() {} - -public: - static OCCDemo_Presentation* Current; - // this pointer must be initialized when realize a derivable class; - // it is used by application to access to a presentation class instance - - void SetDocument (CTriangulationDoc* theDoc) {myDoc = theDoc;} - // document must be set by the user of this class before first use of iterations - CTriangulationDoc* GetDocument () {return myDoc;} - -public: - // Titling - const CString& GetName() const {return myName;} - -public: - // Iteration on samples - void FirstSample() {myIndex=0;} - void LastSample() {myIndex=myNbSamples-1;} - Standard_Boolean AtFirstSample() const {return myIndex <= 0;} - Standard_Boolean AtLastSample() const {return myIndex >= myNbSamples-1;} - void NextSample() {myIndex++;} - void PrevSample() {myIndex--;} - virtual void DoSample() = 0; -/* - static void GetViewCenter(Standard_Real& Xc, Standard_Real& Yc); - static void SetViewCenter(const Standard_Real Xc, const Standard_Real Yc); - static void GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z); - static void SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z); - static Standard_Real GetViewScale(); - static void SetViewScale(Standard_Real Coef); - static void ResetView(); -*/ - - // place one-time initialization code in this function - virtual void Init() {} - -protected: - // Methods to call from a derivable class - void setName (const char* theName) {myName = CString(theName);} - Handle(AIS_InteractiveContext) getAISContext() const; - Handle(V3d_Viewer) getViewer() const; - Standard_CString GetDataDir(); - - Standard_Boolean WaitForInput (unsigned long aMilliSeconds); - // Waits for a user input or a period of time has been elapsed - - Handle(AIS_InteractiveObject) drawSurface (const Handle(Geom_Surface)& theSurface, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_LEMONCHIFFON3), - const Standard_Boolean toDisplay = Standard_True); - // creates a finite face based on the given geometric surface - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom_Curve)& theCurve, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED), - const Standard_Boolean toDisplay = Standard_True); - // creates an ISession_Curve based on the given geometric curve - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom2d_Curve)& theCurve, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED), - const Standard_Boolean toDisplay = Standard_True, - const gp_Ax2& aPosition = gp::XOY()); - // converts a given curve to 3d using aPosition and calls the previous method - - Handle(AIS_Point) drawPoint (const gp_Pnt& thePnt, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_GREEN), - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given point - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawVector (const gp_Pnt& thePnt, - const gp_Vec& theVec, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_YELLOW), - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given vector - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given shape - // with material PLASTIC and a given color - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape, - const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NameOfMaterial_Brass, - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given shape with the given material - // (color is default for a given material) - // and displays it in the viewer if toDisplay = Standard_True - -protected: - // Fields to use in a derivable class - BOOL FitMode; - int myIndex; - int myNbSamples; - -private: - CTriangulationDoc* myDoc; - CString myName; - -}; - -#endif // !defined(AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/07_Triangulation/src/StdAfx.cpp b/samples/mfc/standard/07_Triangulation/src/StdAfx.cpp deleted file mode 100755 index 2f73d9e052..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/StdAfx.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// SampleTriangulation.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - diff --git a/samples/mfc/standard/07_Triangulation/src/StdAfx.h b/samples/mfc/standard/07_Triangulation/src/StdAfx.h deleted file mode 100755 index a6a14f517f..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/StdAfx.h +++ /dev/null @@ -1,113 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -#include // MFC OLE automation classes -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - -#pragma warning( disable : 4244 ) // Issue warning 4244 -#include "Standard_ShortReal.hxx" -#pragma warning( default : 4244 ) // Issue warning 4244 - -#include -/* -#ifndef Version15B -# ifndef Version15D -# ifndef Version20 -# define Version15B -# endif // Version20 -# endif // Version15D -#endif // Version15B - -#pragma message ("=============================") -#ifdef Version15B -# pragma message ("Set the libs for version 1.5B") -#endif // Version15B - -#ifdef Version15D -# pragma message ("Set the libs for version 1.5D") -#endif // Version15D - -#ifdef Version20 -# pragma message ("Set the libs for version 2.0 ") -#endif // Version20 -#pragma message ("=============================") - -#ifdef Version15B -# pragma comment (lib,"TKTop.lib") -# pragma comment (lib,"TShort.lib") -# pragma comment (lib,"TColQuantity.lib") -#endif - -#ifdef Version15D -# pragma comment (lib,"TKTop.lib") -#endif - -#ifdef Version20 -# pragma comment (lib,"TKTop1.lib") -# pragma comment (lib,"TKTop2.lib") -#endif - -#pragma message ("Set the specific libs for the application") -# pragma comment (lib,"TKPrs.lib") -# pragma comment (lib,"TKGeom.lib") -# pragma comment (lib,"TKGlt.lib") -# pragma comment (lib,"TKGraphic.lib") -# pragma comment (lib,"TKPrsMgr.lib") -# pragma comment (lib,"TKViewers.lib") -# pragma comment (lib,"TKSession.lib") -# pragma comment (lib,"TColgp.lib") -# pragma comment (lib,"TKernel.lib") -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "TopoDS_Shape.hxx" -#include "BRepPrimAPI_MakeBox.hxx" -#include "BRepPrimAPI_MakeSphere.hxx" -#include "gp_Pnt.hxx" -#include "BRepAlgoAPI_Cut.hxx" -#include "TopExp_Explorer.hxx" -#include "TopoDS_Face.hxx" -#include "TopLoc_Location.hxx" -#include "Poly_Triangulation.hxx" -#include "BRep_Tool.hxx" -#include "TopoDS.hxx" -#include "TColgp_Array1OfPnt.hxx" -#include "Poly_Array1OfTriangle.hxx" -#include "Poly_Triangle.hxx" -#include "gp_Pnt.hxx" -#include "BRepBuilderAPI_MakeEdge.hxx" -#include "BRep_Builder.hxx" -#include "TopoDS_Compound.hxx" -#include "BRepAlgoAPI_Fuse.hxx" -#include "BRepBuilderAPI_MakeVertex.hxx" -#include "TopoDS.hxx" -#include "BRepTools.hxx" -#include "BRepMesh_IncrementalMesh.hxx" - -#include - -#include -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - diff --git a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp b/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp deleted file mode 100755 index b34e562e29..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp +++ /dev/null @@ -1,439 +0,0 @@ -// Tesselate_Presentation.cpp: implementation of the Tesselate_Presentation class. -// Tesselate shapes. -//////////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "Tesselate_Presentation.h" -#include "TriangulationApp.h" -#include "TriangulationDoc.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#define EOL "\r\n" - -// Initialization of global variable with an instance of this class -OCCDemo_Presentation* OCCDemo_Presentation::Current = new Tesselate_Presentation; - -// Initialization of array of samples -Standard_CString Tesselate_Presentation::myFileNames[] = -{ - "wedge_ok.brep", - "shell1.brep", - "Pump_Nut.brep", - "Pump_TopCover.brep", - 0 -}; - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -Tesselate_Presentation::Tesselate_Presentation() -{ - for (myNbSamples = 0; myFileNames[myNbSamples]; myNbSamples++); - setName ("Tesselate shapes"); -} - -////////////////////////////////////////////////////////////////////// -// Sample execution -////////////////////////////////////////////////////////////////////// - -void Tesselate_Presentation::DoSample() -{ - ((CTriangulationApp*) AfxGetApp())->SetSampleName (L"Tesselate"); - ((CTriangulationApp*) AfxGetApp())->SetSamplePath (L""); - getAISContext()->EraseAll (Standard_True); - if (myIndex >=0 && myIndex < myNbSamples) - sample (myFileNames[myIndex]); -} - -////////////////////////////////////////////////////////////////////// -// Sample functions -////////////////////////////////////////////////////////////////////// -//================================================================ - -inline Standard_Integer _key(Standard_Integer n1,Standard_Integer n2) -{ - - Standard_Integer key = - (n2>n1)?(n1<<16)+n2:(n2<<16)+n1; - return key; -} - -//DATA : [myIndex][{Deflection,NumberOfFace,NumberOfEdge}] -static const Standard_Real DATA [][3] = -{ - {0.2,1,2},{0.5,6,2},{0.7,16,2},{1,1,2} -}; - - -void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape) -{ -// setResultTitle("Tesselate shape"); - TCollection_AsciiString aText = ( - "/////////////////////////////////////////////////////////////////" EOL - "// Tesselate shape." EOL - "/////////////////////////////////////////////////////////////////" EOL EOL - ) ; - - Standard_Real aDeflection = DATA[myIndex][0]; - Standard_Integer aNumOfFace = (Standard_Integer)DATA[myIndex][1]; - Standard_Integer aNumOfEdge = (Standard_Integer)DATA[myIndex][2]; - - aText += - "Standard_Real aDeflection;" EOL - "// aDeflection = ... ;" EOL EOL - - "// removes all the triangulations of the faces ," EOL - "//and all the polygons on the triangulations of the edges:" EOL - "BRepTools::Clean(aShape);" EOL EOL - - "// adds a triangulation of the shape aShape with the deflection aDeflection:" EOL - "BRepMesh::Mesh(aShape,aDeflection);" EOL EOL - - "TopExp_Explorer aExpFace,aExpEdge;" EOL - "for(aExpFace.Init(aShape,TopAbs_FACE);aExpFace.More();aExpFace.Next())" EOL - "{ " EOL - " TopoDS_Face aFace = TopoDS::Face(aExpFace.Current());" EOL - " TopLoc_Location aLocation;" EOL EOL - - " // takes the triangulation of the face aFace:" EOL - " Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);" EOL EOL - - " if(!aTr.IsNull()) // if this triangulation is not NULL" EOL - " { " EOL - " // create array of node points in absolute coordinate system" EOL - " TColgp_Array1OfPnt aPoints(1, aTr->NbNodes());" EOL - " for( Standard_Integer i = 1; i < aTr->NbNodes()+1; i++)" EOL - " aPoints(i) = aTr->Node (i).Transformed (aLocation);" EOL EOL - - " // Takes the node points of each triangle of this triangulation." EOL - " // takes a number of triangles:" EOL - " Standard_Integer nnn = aTr->NbTriangles();" EOL - " Standard_Integer nt,n1,n2,n3;" EOL - " for( nt = 1 ; nt < nnn+1 ; nt++)" EOL - " {" EOL - " // takes the node indices of each triangle in n1,n2,n3:" EOL - " aTr->Triangle (nt).Get (n1,n2,n3);" EOL - " // takes the node points:" EOL - " gp_Pnt aPnt1 = aPoints(n1);" EOL - " gp_Pnt aPnt2 = aPoints(n2);" EOL - " gp_Pnt aPnt3 = aPoints(n3);" EOL - " } " EOL EOL - - " // Takes the polygon associated to an edge." EOL - " aExpEdge.Init(aFace,TopAbs_EDGE);" EOL - " TopoDS_Edge aEdge;" EOL - " // for example,working with the first edge:" EOL - " if(aExpEdge.More())" EOL - " aEdge = TopoDS::Edge(aExpEdge.Current());" EOL EOL - - " if(!aEdge.IsNull()) // if this edge is not NULL" EOL - " {" EOL - " // takes the polygon associated to the edge aEdge:" EOL - " Handle(Poly_PolygonOnTriangulation) aPol = " EOL - " BRep_Tool::PolygonOnTriangulation(aEdge,aTr,aEdge.Location());" EOL EOL - - " if(!aPol.IsNull()) // if this polygon is not NULL" EOL - " // takes the array of nodes for this polygon" EOL - " // (indexes in the array of nodes for triangulation of theFace):" EOL - " const TColStd_Array1OfInteger& aNodesOfPol = aPol->Nodes();" EOL - " }" EOL - " }" EOL - "}" EOL EOL - - "//==================================================" EOL EOL - - ; - aText += " Result with deflection = "; - aText += TCollection_AsciiString(aDeflection); - aText += " :" EOL; - - GetDocument()->PocessTextInDialog("Compute the triangulation on a shape", aText); -// setResultText(aText.ToCString()); - -//========================================================================== - - BRepTools::Clean(aShape); - BRepMesh_IncrementalMesh(aShape,aDeflection); - - BRep_Builder aBuilder,aBuild1,aBuild2; - TopoDS_Compound aCompound,aComp1,aComp2; - aBuilder.MakeCompound(aCompound); - aBuild1.MakeCompound(aComp1); - aBuild2.MakeCompound(aComp2); - - Standard_Integer aCount = 0; - Standard_Integer aNumOfNodes = 0; - Standard_Integer aNumOfTriangles = 0; - - Handle(AIS_InteractiveObject) aShowEdge,aShowFace,aShowShape; - - TopExp_Explorer aExpFace,aExpEdge; - - for(aExpFace.Init(aShape,TopAbs_FACE);aExpFace.More();aExpFace.Next()) - { - aCount++; - - TopoDS_Face aFace = TopoDS::Face(aExpFace.Current()); - TopLoc_Location aLocation; - - Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation); - - if(!aTr.IsNull()) - { - aNumOfNodes += aTr->NbNodes(); - //Standard_Integer aLower = aNodes.Lower(); - //Standard_Integer anUpper = aNodes.Upper(); - aNumOfTriangles += aTr->NbTriangles(); - - if(aCount == aNumOfFace) - { - Standard_Integer aNbOfNodesOfFace = aTr->NbNodes(); - Standard_Integer aNbOfTrianglesOfFace = aTr->NbTriangles(); - aExpEdge.Init(aFace,TopAbs_EDGE); - - TopoDS_Edge aEdge; - - for( Standard_Integer i = 0; aExpEdge.More() && i < aNumOfEdge ; aExpEdge.Next(), i++) - aEdge = TopoDS::Edge(aExpEdge.Current()); - - if(!aEdge.IsNull()) - { - Handle(Poly_PolygonOnTriangulation) aPol = - BRep_Tool::PolygonOnTriangulation(aEdge,aTr,aEdge.Location()); - - if(!aPol.IsNull()) - { - const TColStd_Array1OfInteger& aNodesOfPol = aPol->Nodes(); - Standard_Integer aNbOfNodesOfEdge = aPol->NbNodes(); - - aText += "Number of nodes of the edge = "; - aText += TCollection_AsciiString(aNbOfNodesOfEdge) + EOL; - aText += "Number of nodes of the face = "; - aText += TCollection_AsciiString(aNbOfNodesOfFace) + EOL; - aText += "Number of triangles of the face = "; - aText += TCollection_AsciiString(aNbOfTrianglesOfFace) + EOL; - GetDocument()->PocessTextInDialog("Compute the triangulation on a shape", aText); -// setResultText(aText.ToCString()); - - Standard_Integer aLower = aNodesOfPol.Lower(), anUpper = aNodesOfPol.Upper(); - for( int i = aLower; i < anUpper ; i++) - { - gp_Pnt aPnt1 = aTr->Node (aNodesOfPol (i)).Transformed (aLocation); - gp_Pnt aPnt2 = aTr->Node (aNodesOfPol (i+1)).Transformed (aLocation); - TopoDS_Vertex aVertex1 = BRepBuilderAPI_MakeVertex (aPnt1); - TopoDS_Vertex aVertex2 = BRepBuilderAPI_MakeVertex (aPnt2); - - if(!aVertex1.IsNull() && !aVertex2.IsNull() && // if vertices are "alive" - !BRep_Tool::Pnt(aVertex1).IsEqual( - BRep_Tool::Pnt(aVertex2),Precision::Confusion())) // if they are different - { - aEdge = BRepBuilderAPI_MakeEdge (aVertex1,aVertex2); - aBuild2.Add(aComp2,aVertex1); - if(!aEdge.IsNull()) - aBuild2.Add(aComp2,aEdge); - if(i == anUpper-1) - aBuild2.Add(aComp2,aVertex2); - } - } - - getAISContext()->EraseAll (Standard_False); - aShowShape = drawShape(aShape); - if(WAIT_A_SECOND) return; - aShowEdge = drawShape(aComp2,Quantity_NOC_GREEN); - getAISContext()->Erase (aShowShape, Standard_True); - if(WAIT_A_SECOND) return; - } - } - } - - - TopTools_DataMapOfIntegerShape aEdges; - TopTools_SequenceOfShape aVertices; - - for( Standard_Integer i = 1; i < aTr->NbNodes()+1; i++) - { - gp_Pnt aPnt = aTr->Node (i).Transformed (aLocation); - TopoDS_Vertex aVertex = BRepBuilderAPI_MakeVertex(aPnt); - - if(!aVertex.IsNull()) - { - aBuilder.Add(aCompound,aVertex); - if(aCount == aNumOfFace ) - aBuild1.Add(aComp1,aVertex); - aVertices.Append(aVertex); - } - } - - Standard_Integer nnn = aTr->NbTriangles(); - Standard_Integer nt,n1,n2,n3; - - for( nt = 1 ; nt < nnn+1 ; nt++) - { - aTr->Triangle (nt).Get (n1,n2,n3); - - Standard_Integer key[3]; - - TopoDS_Vertex aV1,aV2; - key[0] = _key(n1, n2); - if(!aEdges.IsBound(key[0])) - { - aV1 = TopoDS::Vertex(aVertices(n1)); - aV2 = TopoDS::Vertex(aVertices(n2)); - if(!aV1.IsNull() && !aV2.IsNull() && - !BRep_Tool::Pnt(aV1).IsEqual(BRep_Tool::Pnt(aV2),Precision::Confusion())) - { - TopoDS_Edge aEdge = BRepBuilderAPI_MakeEdge (aV1,aV2); - if(!aEdge.IsNull()) - { - aEdges.Bind(key[0], aEdge); - aBuilder.Add(aCompound,aEdges(key[0])); - if(aCount == aNumOfFace) - aBuild1.Add(aComp1,aEdges(key[0])); - } - } - } - - key[1] = _key(n2,n3); - if(!aEdges.IsBound(key[1])) - { - aV1 = TopoDS::Vertex(aVertices(n2)); - aV2 = TopoDS::Vertex(aVertices(n3)); - if(!aV1.IsNull() && !aV2.IsNull() && - !BRep_Tool::Pnt(aV1).IsEqual(BRep_Tool::Pnt(aV2),Precision::Confusion())) - { - TopoDS_Edge aEdge = BRepBuilderAPI_MakeEdge (aV1,aV2); - if(!aEdge.IsNull()) - { - aEdges.Bind(key[1],aEdge); - aBuilder.Add(aCompound,aEdges(key[1])); - if(aCount == aNumOfFace) - aBuild1.Add(aComp1,aEdges(key[1])); - } - } - } - - key[2] = _key(n3,n1); - if(!aEdges.IsBound(key[2])) - { - aV1 = TopoDS::Vertex(aVertices(n3)); - aV2 = TopoDS::Vertex(aVertices(n1)); - if(!aV1.IsNull() && !aV2.IsNull() && - !BRep_Tool::Pnt(aV1).IsEqual(BRep_Tool::Pnt(aV2),Precision::Confusion())) - { - TopoDS_Edge aEdge = BRepBuilderAPI_MakeEdge (aV1,aV2); - if(!aEdge.IsNull()) - { - aEdges.Bind(key[2],aEdge); - aBuilder.Add(aCompound,aEdges(key[2])); - if(aCount == aNumOfFace) - aBuild1.Add(aComp1,aEdges(key[2])); - } - } - } - } - - if(aCount == aNumOfFace) - { - aShowFace = drawShape(aComp1,Quantity_NOC_GREEN); - getAISContext()->Erase (aShowEdge, Standard_True); - } - } - else - { - aText += "Can't compute a triangulation on face "; - aText += TCollection_AsciiString(aCount) + EOL; - GetDocument()->PocessTextInDialog("Compute the triangulation on a shape", aText); -// setResultText(aText.ToCString()); - } - } - - aText += "Number of nodes of the shape = "; - aText += TCollection_AsciiString(aNumOfNodes) + EOL; - aText += "Number of triangles of the shape = "; - aText += TCollection_AsciiString(aNumOfTriangles) + EOL EOL; - GetDocument()->PocessTextInDialog("Compute the triangulation on a shape", aText); -// setResultText(aText.ToCString()); - - if(WAIT_A_SECOND) return; - drawShape(aCompound,Quantity_NOC_GREEN); - getAISContext()->Erase (aShowFace, Standard_True); - -} - -void Tesselate_Presentation::sample(const Standard_CString aFileName) -{ - CString anOCCTDataPathValue; - anOCCTDataPathValue.GetEnvironmentVariable(L"CSF_OCCTDataPath"); - CString initfile = (anOCCTDataPathValue + L"\\occ\\" + aFileName); - -/* - ResetView(); - - if (aFileName == "wedge_ok.brep"){ - SetViewCenter(6.3639597574916, 4.4907309380832); - SetViewScale(52.722555157077); - } - - if (aFileName == "shell1.brep"){ - SetViewCenter(60.457553053711, -20.351208944076); - SetViewScale(26.857478563027); - } - - if (aFileName == "Pump_Nut.brep"){ - SetViewCenter(248.77723166710, 77.249633819945); - SetViewScale(12.371719671833); - } - - if (aFileName == "Pump_TopCover.brep"){ - SetViewCenter(408.72474423160, 169.38361094986); - SetViewScale(2.1932732873087); - } -*/ - - std::filebuf aFileBuf; - std::istream aStream (&aFileBuf); - if (!aFileBuf.open (initfile, std::ios::in)) - { - initfile += L" was not found. The sample can not be shown."; - GetDocument()->PocessTextInDialog ("Compute the triangulation on a shape", initfile); - return; - } - - TopoDS_Shape aShape; - BRep_Builder aBld; - BRepTools::Read (aShape, aStream, aBld); - if (aShape.IsNull()) - { - initfile += L" was not found. The sample can not be shown."; - GetDocument()->PocessTextInDialog ("Compute the triangulation on a shape", initfile); - return; - } - - tesselateShape (aShape); -} diff --git a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.h b/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.h deleted file mode 100755 index 45dd5bc735..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.h +++ /dev/null @@ -1,34 +0,0 @@ -// Tesselate_Presentation.h: interface for the Tesselate_Presentation class. -// Presentation class: Tesselate shapes. -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_Tesselate_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_Tesselate_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include - -class Tesselate_Presentation : public OCCDemo_Presentation -{ -public: - // Construction - Tesselate_Presentation(); - -public: - // Iteration on samples - virtual void DoSample(); - // one phase of iterations - -private: - // Sample functions - void sample(const Standard_CString aFileName); - void tesselateShape(const TopoDS_Shape& aShape); - - static Standard_CString myFileNames[]; - -}; - -#endif // !defined(AFX_Tesselate_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/07_Triangulation/src/TriangulationApp.cpp b/samples/mfc/standard/07_Triangulation/src/TriangulationApp.cpp deleted file mode 100755 index 4925e24fde..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/TriangulationApp.cpp +++ /dev/null @@ -1,77 +0,0 @@ -// TriangulationApp.cpp : Defines the class behaviors for the application. -// - -#include "stdafx.h" - -#include "TriangulationApp.h" - -#include "OCC_MainFrame.h" -#include "OCC_3dChildFrame.h" -#include "TriangulationDoc.h" -#include "OCC_3dView.h" - -///////////////////////////////////////////////////////////////////////////// -// CTriangulationApp construction - -CTriangulationApp::CTriangulationApp() : OCC_App() -{ - SampleName = "TopologyTriangulation"; //for about dialog - SetSamplePath (L"..\\..\\07_Triangulation"); -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only CTriangulationApp object - -CTriangulationApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// CTriangulationApp initialization - -BOOL CTriangulationApp::InitInstance() -{ - AfxEnableControlContainer(); - - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - - // Change the registry key under which our settings are stored. - // You should modify this string to be something appropriate - // such as the name of your company or organization. - SetRegistryKey(_T("Local AppWizard-Generated Applications")); - - LoadStdProfileSettings(); // Load standard INI file options (including MRU) - - // Register the application's document templates. Document templates - // serve as the connection between documents, frame windows and views. - - CMultiDocTemplate* pDocTemplate; - pDocTemplate = new CMultiDocTemplate( - IDR_3DTYPE, - RUNTIME_CLASS(CTriangulationDoc), - RUNTIME_CLASS(OCC_3dChildFrame), // custom MDI child frame - RUNTIME_CLASS(OCC_3dView)); - AddDocTemplate(pDocTemplate); - - // create main MDI Frame window - OCC_MainFrame* pMainFrame = new OCC_MainFrame(with_AIS_TB); - if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) - return FALSE; - m_pMainWnd = pMainFrame; - - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); - - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; - - // The main window has been initialized, so show and update it. - pMainFrame->ShowWindow(m_nCmdShow); - pMainFrame->UpdateWindow(); - - return TRUE; -} - diff --git a/samples/mfc/standard/07_Triangulation/src/TriangulationApp.h b/samples/mfc/standard/07_Triangulation/src/TriangulationApp.h deleted file mode 100755 index 2630b7da34..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/TriangulationApp.h +++ /dev/null @@ -1,32 +0,0 @@ -// TriangulationApp.h : main header file for the TRIANGULATION application -// - -#if !defined(AFX_TRIANGULATIONAPP_H__3045338A_3E75_11D7_8611_0060B0EE281E__INCLUDED_) -#define AFX_TRIANGULATIONAPP_H__3045338A_3E75_11D7_8611_0060B0EE281E__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include - -class CTriangulationApp : public OCC_App -{ -public: - - CTriangulationApp(); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CTriangulationApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_TRIANGULATIONAPP_H__3045338A_3E75_11D7_8611_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp b/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp deleted file mode 100755 index 4b9841d442..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp +++ /dev/null @@ -1,418 +0,0 @@ -// TriangulationDoc.cpp : implementation of the CTriangulationDoc class -// - -#include "stdafx.h" - -#include "TriangulationDoc.h" - -#include "TriangulationApp.h" - -#include "OCCDemo_Presentation.h" - -#include - -#include "..\res\resource.h" - -#include -#include - -///////////////////////////////////////////////////////////////////////////// -// CTriangulationDoc - -IMPLEMENT_DYNCREATE(CTriangulationDoc, CDocument) - -BEGIN_MESSAGE_MAP(CTriangulationDoc, OCC_3dBaseDoc) - //{{AFX_MSG_MAP(CTriangulationDoc) - ON_COMMAND(ID_TRIANGU, OnTriangu) - ON_COMMAND(ID_Clear, OnClear) - ON_COMMAND(ID_Visu, OnVisu) - ON_COMMAND(ID_BUTTONNext, OnBUTTONNext) - ON_COMMAND(ID_BUTTONStart, OnBUTTONStart) - ON_COMMAND(ID_BUTTONRepeat, OnBUTTONRepeat) - ON_COMMAND(ID_BUTTONPrev, OnBUTTONPrev) - ON_COMMAND(ID_BUTTONEnd, OnBUTTONEnd) - ON_UPDATE_COMMAND_UI(ID_BUTTONNext, OnUpdateBUTTONNext) - ON_UPDATE_COMMAND_UI(ID_BUTTONPrev, OnUpdateBUTTONPrev) - ON_COMMAND(ID_FILE_NEW, OnFileNew) - ON_COMMAND(ID_DUMP_VIEW, OnDumpView) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CTriangulationDoc construction/destruction - -CTriangulationDoc::CTriangulationDoc() -{ - myPresentation = OCCDemo_Presentation::Current; - myPresentation->SetDocument(this); - - strcpy_s(myDataDir, "Data"); - strcpy_s(myLastPath, "."); -} - -CTriangulationDoc::~CTriangulationDoc() -{ -} - -///////////////////////////////////////////////////////////////////////////// -// CTriangulationDoc diagnostics - -#ifdef _DEBUG -void CTriangulationDoc::AssertValid() const -{ - CDocument::AssertValid(); -} - -void CTriangulationDoc::Dump(CDumpContext& dc) const -{ - CDocument::Dump(dc); -} -#endif //_DEBUG - -void CTriangulationDoc::OnTriangu() -{ - AIS_ListOfInteractive aList; - myAISContext->DisplayedObjects(aList); - AIS_ListIteratorOfListOfInteractive aListIterator; - for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){ - myAISContext->Remove (aListIterator.Value(), Standard_False); - } - - TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60); - TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80); - TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox); - BRepMesh_IncrementalMesh(ShapeFused,1); - - Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused); - myAISContext->SetDisplayMode (aSection, 1, Standard_False); - myAISContext->SetColor (aSection, Quantity_NOC_RED, Standard_False); - myAISContext->SetMaterial (aSection, Graphic3d_NOM_GOLD, Standard_False); - myAISContext->Display (aSection, Standard_False); - - Standard_Integer result(0); - - for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) { - TopoDS_Face F =TopoDS::Face(ex.Current()); - TopLoc_Location L; - Handle (Poly_Triangulation) facing = BRep_Tool::Triangulation(F,L); - result = result + facing->NbTriangles(); - } - Fit(); - - TCollection_AsciiString Message ("\ - \n\ -TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60); \n\ -TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80); \n\ - \n\ -TopoDS_Shape ShapeFused = BRepBuilderAPI_Fuse(theSphere,theBox); \n\ - \n\ -BRepMesh::Mesh(ShapeFused,1); \n\ - \n\ -Standard_Integer result(0); \n\ - \n\ -for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) { \n\ - TopoDS_Face F =TopoDS::Face(ex.Current()); \n\ - TopLoc_Location L; \n\ - Handle (Poly_Triangulation) facing = BRep_Tool::Triangulation(F,L); \n\ - result = result + facing->NbTriangles(); \n\ -} \n\ -\n\ ---- Number of created triangles ---\n"); - TCollection_AsciiString nombre(result); - Message += nombre; - Message +=("\ - \n\ - \n"); - PocessTextInDialog("Compute the triangulation on a shape", Message); -} - -void CTriangulationDoc::OnVisu() -{ - - AIS_ListOfInteractive aList; - myAISContext->DisplayedObjects(aList); - AIS_ListIteratorOfListOfInteractive aListIterator; - for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){ - myAISContext->Remove (aListIterator.Value(), Standard_False); - } - -TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60).Shape(); -TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100, 20, 20), 80).Shape(); -TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere, theBox).Shape(); -BRepMesh_IncrementalMesh(ShapeFused,1); - -Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused); -myAISContext->SetDisplayMode (aSection, 1, Standard_False); -myAISContext->SetColor (aSection, Quantity_NOC_RED, Standard_False); -myAISContext->SetMaterial (aSection, Graphic3d_NOM_GOLD, Standard_False); -myAISContext->SetTransparency (aSection, 0.1, Standard_False); -myAISContext->Display (aSection, Standard_False); - -BRep_Builder builder; -TopoDS_Compound Comp; -builder.MakeCompound(Comp); - -for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) { - - TopoDS_Face F =TopoDS::Face(ex.Current()); - TopLoc_Location L; - Handle (Poly_Triangulation) facing = BRep_Tool::Triangulation(F,L); - - for (Standard_Integer i=1;i<=(facing->NbTriangles());i++) { - const Poly_Triangle trian = facing->Triangle (i); - Standard_Integer index1,index2,index3,M = 0, N = 0; - trian.Get(index1,index2,index3); - - for (Standard_Integer j=1;j<=3;j++) { - switch (j) { - case 1 : - M = index1; - N = index2; - break; - case 2 : - N = index3; - break; - case 3 : - M = index2; - } - - BRepBuilderAPI_MakeEdge ME(facing->Node (M), facing->Node (N)); - if (ME.IsDone()) { - builder.Add(Comp,ME.Edge()); - } - } - } -} -Handle (AIS_Shape) atriangulation = new AIS_Shape(Comp); -myAISContext->SetDisplayMode (atriangulation, 0, Standard_False); -myAISContext->SetColor (atriangulation, Quantity_NOC_WHITE, Standard_False); -myAISContext->Display (atriangulation, Standard_False); - -Fit(); - - TCollection_AsciiString Message ("\ - \n\ -TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60); \n\ -TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80); \n\ -TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox); \n\ -BRepMesh::Mesh(ShapeFused,1); \n\ - \n\ -BRep_Builder builder; \n\ -TopoDS_Compound Comp; \n\ -builder.MakeCompound(Comp); \n\ - \n\ -for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) { \n\ - \n\ - TopoDS_Face F =TopoDS::Face(ex.Current()); \n\ - TopLoc_Location L; \n\ - Handle (Poly_Triangulation) facing = BRep_Tool::Triangulation(F,L); \n\ - \n\ - for (Standard_Integer i=1;i<=(facing->NbTriangles());i++) { \n\ - Poly_Triangle trian = facing->Triangle (i); \n\ - Standard_Integer index1,index2,index3,M,N; \n\ - trian.Get(index1,index2,index3); \n\ - \n\ - for (Standard_Integer j=1;j<=3;j++) { \n\ - switch (j) { \n\ - case 1 : \n\ - M = index1; \n\ - N = index2; \n\ - break; \n\ - case 2 : \n\ - N = index3; \n\ - break; \n\ - case 3 : \n\ - M = index2; \n\ - } \n\ - \n\ - BRepBuilderAPI_MakeEdge ME(facing->Node (M),facing->Node (N)); \n\ - if (ME.IsDone()) { \n\ - builder.Add(Comp,ME.Edge()); \n\ - } \n\ - } \n\ - } \n\ -} \n\ - \n\ -Warning : The visualisation of the mesh is not optimised.\n\ -The shared edges between triangles are dispayed twice.\n\ -The purpose here is only to show how to decode the data structure of triangulation.\n\ - \n"); - PocessTextInDialog("Visualize the triangulation on a shape", Message); - -} - - - - -void CTriangulationDoc::OnClear() -{ - AIS_ListOfInteractive aList; - myAISContext->DisplayedObjects(aList); - AIS_ListIteratorOfListOfInteractive aListIterator; - for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){ - myAISContext->Remove (aListIterator.Value(), Standard_False); - } - -TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200, 60, 60).Shape(); -TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100, 20, 20), 80).Shape(); -TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox); -BRepMesh_IncrementalMesh(ShapeFused,1); - - -Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused); -myAISContext->SetDisplayMode (aSection, 1, Standard_False); -myAISContext->SetColor (aSection, Quantity_NOC_RED, Standard_False); -myAISContext->SetMaterial (aSection, Graphic3d_NOM_GOLD, Standard_False); -myAISContext->Display (aSection, Standard_False); - -BRepTools::Clean(ShapeFused); - -TCollection_AsciiString test; -if (!BRepTools::Triangulation(ShapeFused,1)) { - test = ("In fact the triangulation has been removed\n"); -} - -Fit(); - TCollection_AsciiString Message ("\ - \n\ -TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60); \n\ -TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80); \n\ -TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox); \n\ -BRepMesh::Mesh(ShapeFused,1); \n\ - \n\ -BRepTools::Clean(ShapeFused); \n\ - \n\ -if (!BRepTools::Triangulation(ShapeFused,1)) { \n\ - TCollection_AsciiString test(); \n\ -} \n\ - \n\ - --- Result ---\n"); - - Message += test; - Message +=("\ - \n\ - \n"); - - PocessTextInDialog("Remove the triangulation", Message); - -} - -/******************************************************************************* -********************* T E S S E L A T E ************************************** -*******************************************************************************/ - -void CTriangulationDoc::Start() -{ - myPresentation->Init(); - OnBUTTONStart(); -} - -void CTriangulationDoc::OnFileNew() -{ - OnNewDocument(); - Start(); -} - -void CTriangulationDoc::InitViewButtons() -{ - //POSITION pos = GetFirstViewPosition(); -/* LLS - while (pos != NULL) - { - COCCDemoView* pView = (COCCDemoView*) GetNextView(pos); - pView->InitButtons(); - } -*/ -} - -void CTriangulationDoc::DoSample() -{ - InitViewButtons(); - - HCURSOR hOldCursor = ::GetCursor(); - HCURSOR hNewCursor = AfxGetApp()->LoadStandardCursor(IDC_APPSTARTING); - - SetCursor(hNewCursor); - { - try - { - myPresentation->DoSample(); - } - catch (Standard_Failure const& anException) - { - Standard_SStream aSStream; - aSStream << "An exception was caught: " << anException << std::ends; - CString aMsg = aSStream.str().c_str(); -// aSStream.rdbuf()->freeze(0); // allow deletion of dynamic array - AfxMessageBox (aMsg); - } - } - SetCursor(hOldCursor); -} - -void CTriangulationDoc::OnBUTTONStart() -{ - myAISContext->EraseAll (Standard_True); - myPresentation->FirstSample(); - DoSample(); -} - -void CTriangulationDoc::OnBUTTONEnd() -{ - myAISContext->EraseAll (Standard_True); - myPresentation->LastSample(); - DoSample(); -} - -void CTriangulationDoc::OnBUTTONRepeat() -{ - DoSample(); -} - -void CTriangulationDoc::OnBUTTONNext() -{ - if (!myPresentation->AtLastSample()) - { - myPresentation->NextSample(); - DoSample(); - } -} - -void CTriangulationDoc::OnBUTTONPrev() -{ - if (!myPresentation->AtFirstSample()) - { - myPresentation->PrevSample(); - DoSample(); - } -} - -void CTriangulationDoc::OnUpdateBUTTONNext(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (!myPresentation->AtLastSample()); -} - -void CTriangulationDoc::OnUpdateBUTTONPrev(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (!myPresentation->AtFirstSample()); -} - -void CTriangulationDoc::OnDumpView() -{ - for (POSITION aPos = GetFirstViewPosition(); aPos != NULL;) - { - OCC_3dView* pView = (OCC_3dView* )GetNextView (aPos); - pView->UpdateWindow(); - } - - Handle(V3d_View) aView = myViewer->ActiveViews().First(); - ExportView (aView); -} - -void CTriangulationDoc::Fit() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - OCC_3dView *pView = (OCC_3dView*)pChild->GetActiveView(); - pView->FitAll(); -} diff --git a/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.h b/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.h deleted file mode 100755 index 00d6ec3adb..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.h +++ /dev/null @@ -1,63 +0,0 @@ -// TriangulationDoc.h : interface of the CTopologyTriangulationDoc class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_TRIANGULATIONDOC_H__3045338B_3E75_11D7_8611_0060B0EE281E__INCLUDED_) -#define AFX_TRIANGULATIONDOC_H__3045338B_3E75_11D7_8611_0060B0EE281E__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include -//#include "OCCDemo_Presentation.h" -class OCCDemo_Presentation; - -class CTriangulationDoc : public OCC_3dDoc -{ - -protected: // create from serialization only - CTriangulationDoc(); - DECLARE_DYNCREATE(CTriangulationDoc) - void InitViewButtons(); - void DoSample(); -public: - virtual ~CTriangulationDoc(); - void Start(); - static void Fit(); - Standard_CString GetDataDir() {return myDataDir;} -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -// Generated message map functions -protected: - //{{AFX_MSG(CTriangulationDoc) - afx_msg void OnTriangu(); - afx_msg void OnClear(); - afx_msg void OnVisu(); - afx_msg void OnBUTTONNext(); - afx_msg void OnBUTTONStart(); - afx_msg void OnBUTTONRepeat(); - afx_msg void OnBUTTONPrev(); - afx_msg void OnBUTTONEnd(); - afx_msg void OnUpdateBUTTONNext(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPrev(CCmdUI* pCmdUI); - afx_msg void OnFileNew(); - afx_msg void OnDumpView(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -private: - OCCDemo_Presentation *myPresentation; - char myDataDir[5]; // for "Data\0" - char myLastPath[MAX_PATH]; // directory of lastly saved file in DumpView() - -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_TRIANGULATIONDOC_H__3045338B_3E75_11D7_8611_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/09_Animation/CMakeLists.txt b/samples/mfc/standard/09_Animation/CMakeLists.txt deleted file mode 100644 index 9cea604460..0000000000 --- a/samples/mfc/standard/09_Animation/CMakeLists.txt +++ /dev/null @@ -1,61 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (Animation) - -add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE) -set (CMAKE_MFC_FLAG 2) - -set (Animation_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/09_Animation/src) -set (Animation_HEADER_FILES ${Animation_SRC_DIR}/AnimationApp.h - ${Animation_SRC_DIR}/AnimationDoc.h - ${Animation_SRC_DIR}/AnimationView3D.h - ${Animation_SRC_DIR}/Fonc.hxx - ${Animation_SRC_DIR}/ShadingDialog.h - ${Animation_SRC_DIR}/ThreadDialog.h - ${Animation_SRC_DIR}/StdAfx.h ) -set (Animation_SOURCE_FILES ${Animation_SRC_DIR}/AnimationApp.cpp - ${Animation_SRC_DIR}/AnimationDoc.cpp - ${Animation_SRC_DIR}/AnimationView3D.cpp - ${Animation_SRC_DIR}/Fonc.cxx - ${Animation_SRC_DIR}/ShadingDialog.cpp - ${Animation_SRC_DIR}/ThreadDialog.cpp - ${Animation_SRC_DIR}/StdAfx.cpp ) - -set (Animation_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/09_Animation/res) -set (Animation_RESOURCE_HEADER ${Animation_RESOURCE_DIR}/resource.h) -set (Animation_RESOURCE_FILES ${Animation_RESOURCE_DIR}/child2.bmp - ${Animation_RESOURCE_DIR}/Toolbar.bmp - ${Animation_RESOURCE_DIR}/Animation.rc) - -# groups in the VS solution -source_group ("Source Files" FILES ${Animation_SOURCE_FILES} - ${COMMON_WINMAIN_FILE}) - -source_group ("Header Files" FILES ${Animation_HEADER_FILES}) - -source_group ("Resource Files" FILES ${Animation_RESOURCE_FILES}) - -add_executable (Animation WIN32 ${Animation_SOURCE_FILES} - ${Animation_HEADER_FILES} - ${COMMON_WINMAIN_FILE} - ${Animation_RESOURCE_FILES}) - -set_property (TARGET Animation PROPERTY FOLDER "Samples/mfc") - -if (SINGLE_GENERATOR) - install (TARGETS Animation DESTINATION "${INSTALL_DIR_BIN}") -else() - install (TARGETS Animation - CONFIGURATIONS Release RelWithDebInfo - DESTINATION "${INSTALL_DIR_BIN}") - install (TARGETS Animation - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_BIN}d") -endif() - -include_directories (${CMAKE_BINARY_DIR}/inc - ${Animation_RESOURCE_DIR} - ${Animation_SRC_DIR} - ${MFC_STANDARD_SAMPLES_DIR}/Common) - -target_link_libraries (Animation mfcsample TKBO) \ No newline at end of file diff --git a/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj b/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj deleted file mode 100644 index f22faa9356..0000000000 --- a/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj +++ /dev/null @@ -1,409 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {92492ACB-1F57-40BB-818F-33AD1C20273A} - Animation - MFCProj - - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ../../../../win32\$(VCFMT)\bind\ - .\win32\objd\ - true - ../../../../win64\$(VCFMT)\bind\ - .\win64\objd\ - true - ../../../../win32\$(VCFMT)\bin\ - .\win32\obj\ - false - ../../../../win64\$(VCFMT)\bin\ - .\win64\obj\ - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\objd/Animation.tlb - - - - - Disabled - ..\..\..\;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win32\objd/Animation.pch - .\win32\objd/ - .\win32\objd/ - .\win32\objd/ - Level4 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bind/Animation.exe - true - ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win32\$(VCFMT)\bind/Animation.pdb - Windows - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\objd/Animation.tlb - - - - - Disabled - ..\..\..\;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win64\objd/Animation.pch - .\win64\objd/ - .\win64\objd/ - .\win64\objd/ - Level4 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bind/Animation.exe - true - ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win64\$(VCFMT)\bind/Animation.pdb - Windows - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\obj/Animation.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win32\obj/Animation.pch - .\win32\obj/ - .\win32\obj/ - .\win32\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bin/Animation.exe - true - ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win32\$(VCFMT)\bin/Animation.pdb - Windows - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\obj/Animation.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win64\obj/Animation.pch - .\win64\obj/ - .\win64\obj/ - .\win64\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - true - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bin/Animation.exe - true - ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win64\$(VCFMT)\bin/Animation.pdb - Windows - MachineX64 - - - - - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - {2d6cbbe8-6965-4016-b503-0d715ae26691} - false - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj.filters b/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj.filters deleted file mode 100644 index 2be10d511f..0000000000 --- a/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj.filters +++ /dev/null @@ -1,82 +0,0 @@ - - - - - {d5298b93-c300-4e09-b89c-a7e7077e364f} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {44848e1a-ccd0-42de-b2d7-989ef24a56a9} - h;hpp;hxx;hm;inl - - - {ac89cece-2b9f-4975-ad38-a1fc83f2b2b3} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/samples/mfc/standard/09_Animation/res/Animation.rc b/samples/mfc/standard/09_Animation/res/Animation.rc deleted file mode 100755 index f7147777e9..0000000000 --- a/samples/mfc/standard/09_Animation/res/Animation.rc +++ /dev/null @@ -1,271 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" -#include "..\..\Common\res\OCC_Resource.h" -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "#include ""..\\..\\Common\\res\\OCC_Resource.h""\0" -END - -3 TEXTINCLUDE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDR_MAINFRAME BITMAP "Toolbar.bmp" -IDR_3dCHILDFRAME BITMAP "child2.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Toolbar -// - -IDR_MAINFRAME TOOLBAR 21, 20 -BEGIN - BUTTON ID_FILE_NEW - SEPARATOR - BUTTON ID_RESTART - BUTTON ID_STOP - BUTTON ID_Thread - BUTTON ID_SHADING - SEPARATOR - BUTTON ID_FILE_LOADGRID - SEPARATOR - BUTTON ID_APP_ABOUT -END - -IDR_3dCHILDFRAME TOOLBAR 20, 20 -BEGIN - BUTTON ID_BUTTONZoomAll - BUTTON ID_BUTTONZoomWin - BUTTON ID_BUTTONZoomProg - SEPARATOR - BUTTON ID_BUTTONPan - BUTTON ID_BUTTONPanGlo - SEPARATOR - BUTTON ID_BUTTONFly - BUTTON ID_BUTTONTurn - SEPARATOR - BUTTON ID_BUTTONRot - BUTTON ID_BUTTONReset - SEPARATOR - BUTTON ID_BUTTONHlrOff - BUTTON ID_BUTTONHlrOn -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MAINFRAME MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Help" - BEGIN - MENUITEM "&About DisplayAnimation...", ID_APP_ABOUT - END -END - -IDR_3DTYPE MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM "&Close", ID_FILE_CLOSE - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Window" - BEGIN - MENUITEM "&New Window", ID_WINDOW_NEW - MENUITEM "&Cascade", ID_WINDOW_CASCADE - MENUITEM "&Tile", ID_WINDOW_TILE_HORZ - MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE - END - POPUP "&Help" - BEGIN - MENUITEM "&About DisplayAnimation...", ID_APP_ABOUT - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ShadingBoxDialog DIALOG 0, 0, 186, 95 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Deviation Coefficient" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,21,65,50,14 - PUSHBUTTON "Cancel",IDCANCEL,111,65,50,14 - CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_TOP | TBS_NOTICKS | WS_BORDER | WS_TABSTOP,29,30,125,17 - LTEXT "Fine Default Unpolished",IDC_STATIC,35,14,118,13 -END - -IDD_ThreadBoxDialog DIALOG 0, 0, 186, 95 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Change the animation thread" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,22,65,50,14 - PUSHBUTTON "Cancel",IDCANCEL,107,65,50,14 - GROUPBOX "Angle increment ",IDC_STATIC,7,7,172,49 - EDITTEXT IDC_Angle,65,27,48,16,ES_AUTOHSCROLL -END - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "Matra Datavision" - VALUE "FileDescription", "Sample Animation MFC Application" - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "SampleAnimation" - VALUE "LegalCopyright", "Copyright (C) 1998" - VALUE "OriginalFilename", "SampleAnimation.EXE" - VALUE "ProductName", "SampleAnimation Application" - VALUE "ProductVersion", "1, 0, 0, 1" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDR_MAINFRAME "Animation" - IDR_SAMPLE3DTYPE "\nAnimation\nAnimation\n\n\nAnimation.Document\nAnimation Document" -END - -STRINGTABLE -BEGIN - ID_ANIMATION "Build the model and start the animation\nStart the animation" - ID_STOP "Stop the animation\nStop the animation" - ID_RESTART "Restart the animation\nRestart the animation" - ID_SHADING "Deviation coefficient\nDeviation coefficient" - ID_Thread "Change the animation thread\nAnimation thread" - ID_DESTRUCT "Destruct the presentation\nDestruct the presentation" - ID_FILE_LOADGRID "Load Grid Files\nLoad Grid File" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif -#include "afxres.rc" // Standard components -#endif -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/samples/mfc/standard/09_Animation/res/Toolbar.bmp b/samples/mfc/standard/09_Animation/res/Toolbar.bmp deleted file mode 100755 index d4c5b993392a47fa1fa43effd5ebf68849d792db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2278 zcmchXzi!(w5XP@S0V?p28Yp0N>e}b%-gn_ts*|;u1q`&A3=KtIA)5ywfJYCSx&%Ss zwR1Kmllt9}JpHMf7DdpbM4u^=zx(bez5no|AhD0=-{Jm_`!((t^b$RhP0!hXm2UQl zD!Hht*u#wm=WsaSmq$9esO#9njmAUh++W*LZ8f(h=-^ttp#$#l@6*1bmaDmm0fUA2 z8|R*x<&zDdU|FQFcox>hGPj*YLfEje8dwDv#s9OeHI{cl`ZsDT>x^8HMPxt>&VIq% z`y#SR4Z_J|htQy0LhK)nymj|j*E{KJwTZ6aB8z1~*hcDA={B~JLlId#<6a-h!uZc3 z_rh}A_qH4BN-UAZ!kASO4oTYO_bjS7N;Z3jfFf%>V%JqE3rN~M-9O<&&XZdG! z&Dc-%4*lo)R@*3tD5pC|7g*O@>?N$qDa&3-@Z%g>7?H4yF+>yAH??67E26+LZ-jM` zS>!Z{vn&7%zmDE8)maqiD->;8Fa7N)w_y%T?*lJ#%zAu;FxF*_v$ygMU4T zh$@Gsz`u~+s*>^K{`OqJ|utH%nT{nzTF_%D^9zj zMl#7EDcV1Ne*F+MenEc5{Ehhu^Idok8Ny}OBJmND)5a+T{KM&F3nXB;TrODo;HrPP zUWqXA;}Jx9(-GdDuT^Haw2`OwWA_&@-JbuC9rAM`EIH*;${A?gdt1h4L-DpQOFLK% zqXPin^EaL>@D(lSn$p3W6@W?uMKl2q4x{G778_^<^Vt#2zEG`Fm=A>M%sfLRJ*^E5 zKJ#WWWmwXnX@QtA%_lX8$hSE+L@Uz*!02>))i!c}CYfF_~N)rwyJ)U=4}1vZrJIVFo`&j%){9QmNmy9S>l=f_Q0F)0_ul)boKPx%5N9;b6nR+4}6 zF)ZHossMHC65o+uV^6whj-Y;rZ$$xA8ug15Cd7XyKWT}tBPQA^v%Q-iyIY;U&yUrS zJ**JV1o;Rbk|7^b1Z5TK_s6$^!wcz4o^l+og8InbKgC3KW~%-y>FH%X6{$C)r3l92 z{kid}@6>&$#=4f&Thrcxh={$VU`|B7g?Vs#zpVU@urgkq!RN)LmEwg8t7dX8(c{yJ z(agY>DiwjiSLOU{RRe`xI`|m^#`aa&Q12J(OjYbO-d7q;Mx#n_4+9MGHF(DRj@ECb z@PlnJZ|^%h)W(LqKNYimmHcC7iZKj@Zfh$z%?WS19-sByZ9VbCf&%DY -#include -#include "AnimationDoc.h" -#include "AnimationView3D.h" -#include "..\..\Common\res\OCC_Resource.h" - -BEGIN_MESSAGE_MAP(CAnimationApp, OCC_App) - //{{AFX_MSG_MAP(CAnimationApp) - ON_COMMAND(ID_APP_ABOUT, OnAppAbout) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG_MAP - // Standard file based document commands -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CAnimationApp construction - -CAnimationApp::CAnimationApp() : OCC_App() -{ - SampleName = "Animation"; //for about dialog - SetSamplePath (L"..\\..\\09_Animation"); -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only CAnimationApp object - -CAnimationApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// CAnimationApp initialization - -BOOL CAnimationApp::InitInstance() -{ - AfxEnableControlContainer(); - - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - - // Change the registry key under which our settings are stored. - // You should modify this string to be something appropriate - // such as the name of your company or organization. - // Modified by CasCade : - SetRegistryKey(_T("Local CasCade Applications")); - - LoadStdProfileSettings(); // Load standard INI file options (including MRU) - - // Register the application's document templates. Document templates - // serve as the connection between documents, frame windows and views. - - CMultiDocTemplate* pDocTemplateForView3d; - pDocTemplateForView3d = new CMultiDocTemplate( - IDR_3DTYPE, - RUNTIME_CLASS(CAnimationDoc), - RUNTIME_CLASS(OCC_3dChildFrame), // custom MDI child frame - RUNTIME_CLASS(CAnimationView3D)); - AddDocTemplate(pDocTemplateForView3d); - - - // create main MDI Frame window - OCC_MainFrame* pMainFrame = new OCC_MainFrame; - if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) - return FALSE; - m_pMainWnd = pMainFrame; - - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); - - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; - - // The main window has been initialized, so show and update it. - pMainFrame->ShowWindow(m_nCmdShow); - pMainFrame->UpdateWindow(); - - return TRUE; -} - -void CAnimationApp::OnAppAbout() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CAnimationView3D *pView = (CAnimationView3D *) pChild->GetActiveView(); - pView -> OnStop(); - OCC_App::OnAppAbout(); - pView -> OnRestart(); -} - diff --git a/samples/mfc/standard/09_Animation/src/AnimationApp.h b/samples/mfc/standard/09_Animation/src/AnimationApp.h deleted file mode 100755 index a05ecb3b86..0000000000 --- a/samples/mfc/standard/09_Animation/src/AnimationApp.h +++ /dev/null @@ -1,38 +0,0 @@ -// AnimationApp.h : main header file for the Animation application -// - -#if !defined(AFX_ANIMATION_H__79840E7E_1001_11D2_B8C1_0000F87A77C1__INCLUDED_) -#define AFX_ANIMATION_H__79840E7E_1001_11D2_B8C1_0000F87A77C1__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include - -class CAnimationApp : public OCC_App -{ -public: - - CAnimationApp(); - -//{{AFX_MSG(CAnimationApp) - afx_msg void OnAppAbout(); - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code ! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CAnimationApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_ANIMATION_H__79840E7E_1001_11D2_B8C1_0000F87A77C1__INCLUDED_) diff --git a/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp b/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp deleted file mode 100755 index 182857643f..0000000000 --- a/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp +++ /dev/null @@ -1,344 +0,0 @@ -// AnimationDocApp.cpp : implementation of the CAnimationDoc class -// - -#include "stdafx.h" - -#include "AnimationApp.h" -#include "AnimationDoc.h" -#include "AnimationView3D.h" -#include "AISDialogs.h" -#include "ShadingDialog.h" -#include "ThreadDialog.h" -#include "Fonc.hxx" - -#define DEFAULT_COLOR Quantity_NOC_CYAN1 -#define DEFAULT_MATERIAL Graphic3d_NameOfMaterial_Plastered -#define DEFAULT_DEVIATIONCOEFFICIENT 0.001 -#define DEFAULT_HILIGHTCOLOR Quantity_NOC_YELLOW - - -#ifdef _DEBUG -//#define new DEBUG_NEW // by cascade -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CAnimationDoc - -IMPLEMENT_DYNCREATE(CAnimationDoc, CDocument) - -BEGIN_MESSAGE_MAP(CAnimationDoc, CDocument) - //{{AFX_MSG_MAP(CAnimationDoc) - ON_COMMAND(ID_SHADING, OnShading) - ON_COMMAND(ID_Thread, OnThread) - ON_COMMAND(ID_FILE_LOADGRID, OnFileLoadgrid) - ON_UPDATE_COMMAND_UI(ID_WALK_WALKTHRU, OnUpdateWalkWalkthru) - //}}AFX_MSG_MAP - -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CAnimationDoc construction/destruction - -CAnimationDoc::CAnimationDoc() -{ - // TODO: add one-time construction code here - - Handle(Graphic3d_GraphicDriver) aGraphicDriver = - ((CAnimationApp*)AfxGetApp())->GetGraphicDriver(); - - myViewer = new V3d_Viewer(aGraphicDriver); - myViewer->SetDefaultLights(); - myViewer->SetLightOn(); - - myAISContext =new AIS_InteractiveContext(myViewer); - - myDeviation = 0.0008; - thread = 4; - - BRep_Builder B; - TopoDS_Shape CrankArm; - TopoDS_Shape CylinderHead; - TopoDS_Shape Propeller; - TopoDS_Shape Piston; - TopoDS_Shape EngineBlock; - - /*wchar_t AbloluteExecutableFileName[200]; - HMODULE hModule = GetModuleHandleW (NULL); - GetModuleFileNameW (hModule, AbloluteExecutableFileName, 200); - CString aDataDirPath (AbloluteExecutableFileName); - int index = aDataDirPath.ReverseFind ('\\'); - aDataDirPath.Delete (index + 1, aDataDirPath.GetLength() - index - 1);*/ - - CString SHAREPATHValue; - SHAREPATHValue.GetEnvironmentVariable (L"CSF_OCCTDataPath"); - CString aDataDirPath = (SHAREPATHValue + "\\occ"); - - std::filebuf aFileBuf; - std::istream aStream (&aFileBuf); - CString aPathCrankArm = aDataDirPath + "\\CrankArm.rle"; - if (aFileBuf.open (aPathCrankArm, std::ios::in)) - { - BRepTools::Read (CrankArm, aStream, B); - aFileBuf.close(); - } - - CString aPathCylinderHead = aDataDirPath + "\\CylinderHead.rle"; - if (aFileBuf.open (aPathCylinderHead, std::ios::in)) - { - BRepTools::Read (CylinderHead, aStream, B); - aFileBuf.close(); - } - - CString aPathPropeller = aDataDirPath + "\\Propeller.rle"; - if (aFileBuf.open (aPathPropeller, std::ios::in)) - { - BRepTools::Read (Propeller, aStream, B); - aFileBuf.close(); - } - - CString aPathPiston = aDataDirPath + "\\Piston.rle"; - if (aFileBuf.open (aPathPiston, std::ios::in)) - { - BRepTools::Read (Piston, aStream, B); - aFileBuf.close(); - } - - CString aPathEngineBlock = aDataDirPath + "\\EngineBlock.rle"; - if (aFileBuf.open (aPathEngineBlock, std::ios::in)) - { - BRepTools::Read (EngineBlock, aStream, B); - aFileBuf.close(); - } - - if (CrankArm.IsNull() || CylinderHead.IsNull() || - Propeller.IsNull() || Piston.IsNull() || EngineBlock.IsNull()) - { - int rep = MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Shape(s) not found.\nCheck the Data directory path!", L"Error", MB_OK | MB_ICONERROR); - if (rep == IDOK) - exit(0); - } - myAISContext->SetDeviationCoefficient(myDeviation); - - myAisCylinderHead = new AIS_Shape (CylinderHead); - myAISContext->SetColor (myAisCylinderHead, Quantity_NOC_WHITE, Standard_False); - myAISContext->SetMaterial (myAisCylinderHead, Graphic3d_NameOfMaterial_Plastified, Standard_False); - myAisEngineBlock = new AIS_Shape (EngineBlock); - myAISContext->SetColor(myAisEngineBlock, Quantity_NOC_WHITE, Standard_False); - myAISContext->SetMaterial(myAisEngineBlock,Graphic3d_NameOfMaterial_Plastified, Standard_False); - - myAISContext->Display(myAisCylinderHead ,1,-1,Standard_False); - myAISContext->Display(myAisEngineBlock ,1,-1,Standard_False); - - myAisCrankArm = new AIS_Shape (CrankArm); - myAISContext->SetColor (myAisCrankArm, Quantity_NOC_HOTPINK, Standard_False); - myAISContext->SetMaterial(myAisCrankArm, Graphic3d_NameOfMaterial_Plastified, Standard_False); - myAisPiston = new AIS_Shape (Piston); - myAISContext->SetColor (myAisPiston , Quantity_NOC_WHITE, Standard_False); - myAISContext->SetMaterial(myAisPiston , Graphic3d_NameOfMaterial_Plastified, Standard_False); - myAisPropeller = new AIS_Shape (Propeller); - myAISContext->SetColor (myAisPropeller, Quantity_NOC_RED, Standard_False); - myAISContext->SetMaterial(myAisPropeller, Graphic3d_NameOfMaterial_Plastified, Standard_False); - - myAISContext->Display(myAisCrankArm, 1,-1,Standard_False); - myAISContext->Display(myAisPropeller, 1,-1,Standard_False); - myAISContext->Display(myAisPiston, 1,-1,Standard_True); - - m_Xmin = -300. ; - m_Ymin = -300. ; - m_Zmin = -300. ; - m_Xmax = +300. ; - m_Ymax = +300. ; - m_Zmax = +300. ; - - m_bIsGridLoaded = FALSE; -} - -CAnimationDoc::~CAnimationDoc() -{ -} - -///////////////////////////////////////////////////////////////////////////// -// CAnimationDoc diagnostics - -#ifdef _DEBUG -void CAnimationDoc::AssertValid() const -{ - CDocument::AssertValid(); -} - -void CAnimationDoc::Dump(CDumpContext& dc) const -{ - CDocument::Dump(dc); -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// CAnimationDoc commands -//----------------------------------------------------------------------------------------- -// -//----------------------------------------------------------------------------------------- - -//----------------------------------------------------------------------------------------- -// -//----------------------------------------------------------------------------------------- -void CAnimationDoc::Popup(const Standard_Integer /*x*/, - const Standard_Integer /*y*/ , - const Handle(V3d_View)& /*aView*/) -{ -} - -void CAnimationDoc::OnMyTimer (double theTimeSec) -{ - // TODO: Add your message handler code here and/or call default - - Standard_Real angleA; - Standard_Real angleB; - Standard_Real X; - gp_Ax1 Ax1(gp_Pnt(0,0,0),gp_Vec(0,0,1)); - - angleA = thread * theTimeSec; - X = Sin(angleA)*3/8; - angleB = atan(X / Sqrt(-X * X + 1)); - Standard_Real decal(25*0.6); - - - //Build a transformation on the display - gp_Trsf aPropellerTrsf; - aPropellerTrsf.SetRotation(Ax1,angleA); - myAISContext->SetLocation(myAisPropeller,aPropellerTrsf); - - gp_Ax3 base(gp_Pnt(3*decal*(1-Cos(angleA)),-3*decal*Sin(angleA),0),gp_Vec(0,0,1),gp_Vec(1,0,0)); - gp_Trsf aCrankArmTrsf; - aCrankArmTrsf.SetTransformation( base.Rotated(gp_Ax1(gp_Pnt(3*decal,0,0),gp_Dir(0,0,1)),angleB)); - myAISContext->SetLocation(myAisCrankArm,aCrankArmTrsf); - - gp_Trsf aPistonTrsf; - aPistonTrsf.SetTranslation(gp_Vec(-3*decal*(1-Cos(angleA))-8*decal*(1-Cos(angleB)),0,0)); - myAISContext->SetLocation(myAisPiston,aPistonTrsf); -} - -void CAnimationDoc::OnShading() -{ - - POSITION position = GetFirstViewPosition(); - CView* pCurrentView = (CView*)GetNextView(position); - ((CAnimationView3D *)pCurrentView) ->OnStop(); - - CShadingDialog aDial(NULL); - - aDial.myvalue=int((myDeviation-0.00003)/0.00003); - - if (aDial.DoModal()==IDOK) { - Standard_Real dev(aDial.myvalue); - myDeviation = 0.00003+0.00003*dev; - - myAISContext->SetDeviationCoefficient(myDeviation); - TopoDS_Shape Propeller=myAisPropeller->Shape(); - BRepTools::Clean(Propeller); - - myAisPropeller->Set(Propeller); - myAISContext->Deactivate(myAisPropeller); - myAISContext->Redisplay (myAisPropeller, Standard_True); - } - ((CAnimationView3D *)pCurrentView)->OnRestart(); -} - - -void CAnimationDoc::OnThread() -{ - POSITION position = GetFirstViewPosition(); - CView* pCurrentView = (CView*)GetNextView(position); - ((CAnimationView3D *)pCurrentView) ->OnStop(); - CThreadDialog aThreadDial(NULL); - if (aThreadDial.DoModal()==IDOK) { - thread = aThreadDial.m_Angle; - } - - ((CAnimationView3D *)pCurrentView)->OnRestart(); -} - - -void CAnimationDoc::OnFileLoadgrid() -{ - // TODO: Add your command handler code here - - CFileDialog dlg(TRUE, - NULL, - NULL, - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - L"Points Files (*.pnt;*.pnts)|*.pnt; *.pnts|All Files (*.*)|*.*||", - NULL ); - - CString initdir; - initdir.GetEnvironmentVariable (L"CSF_OCCTDataPath"); - initdir += L"\\occ\\"; - - dlg.m_ofn.lpstrInitialDir = initdir; - - - if (dlg.DoModal() == IDOK) - { - CString C = dlg.GetPathName(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - - Handle(Geom_BSplineSurface) mySurface; - - if(grid2surf(C,mySurface )) - { - //To set the minimum value of the surface to Z=0 - Standard_Real Tolerance = 0.0; - Bnd_Box B; - TopoDS_Face myFace; - GeomAdaptor_Surface GAS(mySurface); - - - BndLib_AddSurface::Add(GAS,Tolerance,B); - - Standard_Real Xmin,Xmax,Ymin,Ymax,Zmin,Zmax; - B.Get(Xmin,Ymin,Zmin,Xmax,Ymax,Zmax); - TopoDS_Solid Box = BRepPrimAPI_MakeBox(gp_Pnt(Xmin,Ymin,0),Xmax-Xmin,Ymax-Ymin,50).Solid(); - - gp_Vec V(gp_Pnt(0,0,Zmin),gp_Pnt(0,0,0)); - - gp_Trsf T; - T.SetTranslation(V); - mySurface->Transform(T); - BRepBuilderAPI_MakeFace aMkFace(mySurface, Precision::Confusion()); - myFace = aMkFace.Face(); - - // Remove all other shapes - myAISContext->RemoveAll (Standard_False); - - Handle(AIS_Shape) myAISSurface = new AIS_Shape(myFace); - - myAISContext->Display(myAISSurface, Standard_False); - myAISContext->Deactivate(myAISSurface,Standard_False); - myAISContext->SetColor (myAISSurface,Quantity_NOC_WHITE,Standard_False); - myAISContext->SetMaterial (myAISSurface,Graphic3d_NameOfMaterial_Stone,Standard_False); - myAISContext->SetDisplayMode (myAISSurface,1,Standard_False); - myAISContext->SetDeviationCoefficient (0.001); - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CAnimationView3D *pView = (CAnimationView3D *) pChild->GetActiveView(); - pView->FitAll(); - - Bnd_Box Boite; - BRepBndLib::Add(myFace, Boite); - Boite.Get(m_Xmin, m_Ymin, m_Zmin, m_Xmax, m_Ymax, m_Zmax); - - m_bIsGridLoaded = TRUE; - } - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); -} - - -} - -void CAnimationDoc::OnUpdateWalkWalkthru(CCmdUI* pCmdUI) -{ - // TODO: Add your command update UI handler code here - CString aValue; - pCmdUI->SetCheck (aValue.GetEnvironmentVariable (L"CSF_WALKTHROUGH") ? 1 : 0); -} diff --git a/samples/mfc/standard/09_Animation/src/AnimationDoc.h b/samples/mfc/standard/09_Animation/src/AnimationDoc.h deleted file mode 100755 index ce27112b3b..0000000000 --- a/samples/mfc/standard/09_Animation/src/AnimationDoc.h +++ /dev/null @@ -1,67 +0,0 @@ -// Animation.h : interface of the CAnimationDoc class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_ANIMATIONDOC_H__79840E86_1001_11D2_B8C1_0000F87A77C1__INCLUDED_) -#define AFX_ANIMATIONDOC_H__79840E86_1001_11D2_B8C1_0000F87A77C1__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include "OCC_BaseDoc.h" -#include "AIS_ConnectedInteractive.hxx" -#include "Geom_Transformation.hxx" - - -class CAnimationDoc : public OCC_BaseDoc -{ -public: - void Popup (const Standard_Integer x, - const Standard_Integer y, - const Handle(V3d_View)& aView); - -protected: // create from serialization only - CAnimationDoc(); - DECLARE_DYNCREATE(CAnimationDoc) - -// Implementation -public: - virtual ~CAnimationDoc(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -// Generated message map functions -protected: - //{{AFX_MSG(CAnimationDoc) - afx_msg void OnShading(); - afx_msg void OnThread(); - afx_msg void OnFileLoadgrid(); - afx_msg void OnUpdateWalkWalkthru(CCmdUI* pCmdUI); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - Handle(AIS_Shape) myAisCrankArm ; - Handle(AIS_Shape) myAisCylinderHead ; - Handle(AIS_Shape) myAisPropeller ; - Handle(AIS_Shape) myAisPiston ; - Handle(AIS_Shape) myAisEngineBlock ; - - Standard_Real myDeviation; - -public: - void OnMyTimer (double theTimeSec); - Standard_Integer thread; - double m_Xmin, m_Ymin, m_Zmin, m_Xmax, m_Ymax, m_Zmax; - BOOL m_bIsGridLoaded; -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_ANIMATIONDOC_H__79840E86_1001_11D2_B8C1_0000F87A77C1__INCLUDED_) diff --git a/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp b/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp deleted file mode 100755 index 1cc55b62e7..0000000000 --- a/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp +++ /dev/null @@ -1,568 +0,0 @@ -// AnimationView3D.cpp : implementation of the CAnimationView3D class -// - -#include "stdafx.h" - -#include "AnimationView3D.h" - -#include "AnimationApp.h" -#include "ShadingDialog.h" -#include "AnimationDoc.h" - -#include - -#ifdef _DEBUG -//#define new DEBUG_NEW by CasCade -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif -static int rotCount = 0; - -// for elastic bean selection -#define ValZWMin 1 - - -///////////////////////////////////////////////////////////////////////////// -// CAnimationView3D - -IMPLEMENT_DYNCREATE(CAnimationView3D, CView) - -BEGIN_MESSAGE_MAP(CAnimationView3D, CView) - //{{AFX_MSG_MAP(CAnimationView3D) - ON_COMMAND(ID_BUTTONAxo, OnBUTTONAxo) - ON_COMMAND(ID_BUTTONBack, OnBUTTONBack) - ON_COMMAND(ID_BUTTONBottom, OnBUTTONBottom) - ON_COMMAND(ID_BUTTONFront, OnBUTTONFront) - ON_COMMAND(ID_BUTTONHlrOff, OnBUTTONHlrOff) - ON_COMMAND(ID_BUTTONHlrOn, OnBUTTONHlrOn) - ON_COMMAND(ID_BUTTONLeft, OnBUTTONLeft) - ON_COMMAND(ID_BUTTONPan, OnBUTTONPan) - ON_COMMAND(ID_BUTTONPanGlo, OnBUTTONPanGlo) - ON_COMMAND(ID_BUTTONReset, OnBUTTONReset) - ON_COMMAND(ID_BUTTONRight, OnBUTTONRight) - ON_COMMAND(ID_BUTTONRot, OnBUTTONRot) - ON_COMMAND(ID_BUTTONTop, OnBUTTONTop) - ON_COMMAND(ID_BUTTONZoomAll, OnBUTTONZoomAll) - ON_COMMAND(ID_FILE_EXPORT_IMAGE, OnFileExportImage) - ON_WM_SIZE() - ON_COMMAND(ID_BUTTONZoomProg, OnBUTTONZoomProg) - ON_COMMAND(ID_BUTTONZoomWin, OnBUTTONZoomWin) - ON_WM_MOUSEWHEEL() - ON_WM_LBUTTONDOWN() - ON_WM_LBUTTONUP() - ON_WM_MBUTTONDOWN() - ON_WM_MBUTTONUP() - ON_WM_MOUSEMOVE() - ON_WM_RBUTTONDOWN() - ON_WM_RBUTTONUP() - ON_UPDATE_COMMAND_UI(ID_BUTTONHlrOff, OnUpdateBUTTONHlrOff) - ON_UPDATE_COMMAND_UI(ID_BUTTONHlrOn, OnUpdateBUTTONHlrOn) - ON_UPDATE_COMMAND_UI(ID_BUTTONPanGlo, OnUpdateBUTTONPanGlo) - ON_UPDATE_COMMAND_UI(ID_BUTTONPan, OnUpdateBUTTONPan) - ON_UPDATE_COMMAND_UI(ID_BUTTONZoomProg, OnUpdateBUTTONZoomProg) - ON_UPDATE_COMMAND_UI(ID_BUTTONZoomWin, OnUpdateBUTTONZoomWin) - ON_UPDATE_COMMAND_UI(ID_BUTTONRot, OnUpdateBUTTONRot) - - ON_COMMAND(ID_Modify_ChangeBackground , OnChangeBackground) - ON_WM_TIMER() - ON_COMMAND(ID_STOP, OnStop) - ON_COMMAND(ID_RESTART, OnRestart) - - ON_COMMAND(ID_BUTTONFly, OnBUTTONFly) - ON_COMMAND(ID_BUTTONTurn, OnBUTTONTurn) - ON_UPDATE_COMMAND_UI(ID_BUTTONFly, OnUpdateBUTTONFly) - ON_UPDATE_COMMAND_UI(ID_BUTTONTurn, OnUpdateBUTTONTurn) - //}}AFX_MSG_MAP -// CasCade - -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CAnimationView3D construction/destruction - -CAnimationView3D::CAnimationView3D() -: myCurZoom (0.0), - myHlrModeIsOn (Standard_False), - myIsTurnStarted (Standard_False), - myUpdateRequests (0), - myCurrentMode (CurrentAction3d_Nothing) -{ - myDefaultGestures = myMouseGestureMap; -} - -CAnimationView3D::~CAnimationView3D() -{ - myView->Remove(); -} - -BOOL CAnimationView3D::PreCreateWindow(CREATESTRUCT& cs) -{ - // TODO: Modify the Window class or styles here by modifying - // the CREATESTRUCT cs - cs.lpszClass = ::AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC, ::LoadCursor(NULL, IDC_ARROW), NULL, NULL); - return CView::PreCreateWindow(cs); -} - -///////////////////////////////////////////////////////////////////////////// -// CAnimationView3D drawing - - -// ================================================================ -// Function : update3dView -// Purpose : -// ================================================================ -void CAnimationView3D::update3dView() -{ - if (myView.IsNull()) - { - return; - } - - if (++myUpdateRequests == 1) - { - Invalidate (FALSE); - UpdateWindow(); - } -} - -// ================================================================ -// Function : redraw3dView -// Purpose : -// ================================================================ -void CAnimationView3D::redraw3dView() -{ - if (!myView.IsNull()) - { - FlushViewEvents (GetDocument()->GetAISContext(), myView, true); - } -} - -// ================================================================ -// Function : handleViewRedraw -// Purpose : -// ================================================================ -void CAnimationView3D::handleViewRedraw (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView) -{ - myUpdateRequests = 0; - if (myAnimTimer.IsStarted()) - { - GetDocument()->OnMyTimer (myAnimTimer.ElapsedTime()); - setAskNextFrame(); - } - AIS_ViewController::handleViewRedraw (theCtx, theView); -} - -void CAnimationView3D::OnDraw(CDC* /*pDC*/) -{ - // always redraw immediate layer (dynamic highlighting) on Paint event, - // and redraw entire view content only when it is explicitly invalidated (V3d_View::Invalidate()) - myView->InvalidateImmediate(); - FlushViewEvents (GetDocument()->GetInteractiveContext(), myView, true); -} - -void CAnimationView3D::OnInitialUpdate() -{ - CView::OnInitialUpdate(); - - // TODO: Add your specialized code here and/or call the base class - // myView = GetDocument()->GetViewer()->CreateView(); - Handle(V3d_Viewer) aViewer = GetDocument()->GetViewer(); - aViewer->SetDefaultTypeOfView (V3d_PERSPECTIVE); - - myView = aViewer->CreateView(); - myView->SetImmediateUpdate (false); - - // store for restore state after rotation (witch is in Degenerated mode) - myHlrModeIsOn = myView->ComputedMode(); - - Handle(WNT_Window) aWNTWindow = new WNT_Window (GetSafeHwnd()); - myView->SetWindow(aWNTWindow); - if (!aWNTWindow->IsMapped()) aWNTWindow->Map(); - - // store the mode ( nothing , dynamic zooming, dynamic ... ) - myCurrentMode = CurrentAction3d_Nothing; - - CFrameWnd* pParentFrm = GetParentFrame(); - pParentFrm->ActivateFrame(SW_SHOWMAXIMIZED); -} - -// ======================================================================= -// function : defineMouseGestures -// purpose : -// ======================================================================= -void CAnimationView3D::defineMouseGestures() -{ - myMouseGestureMap.Clear(); - switch (myCurrentMode) - { - case CurrentAction3d_Nothing: - { - myMouseGestureMap = myDefaultGestures; - break; - } - case CurrentAction3d_DynamicZooming: - { - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_Zoom); - break; - } - case CurrentAction3d_GlobalPanning: - { - break; - } - case CurrentAction3d_WindowZooming: - { - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_ZoomWindow); - break; - } - case CurrentAction3d_DynamicPanning: - { - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_Pan); - break; - } - case CurrentAction3d_DynamicRotation: - { - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_RotateOrbit); - break; - } - case CurrentAction3d_Fly: - { - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_RotateView); - break; - } - } -} - -///////////////////////////////////////////////////////////////////////////// -// CAnimationView3D diagnostics - -#ifdef _DEBUG -void CAnimationView3D::AssertValid() const -{ - CView::AssertValid(); -} - -void CAnimationView3D::Dump(CDumpContext& dc) const -{ - CView::Dump(dc); -} - -CAnimationDoc* CAnimationView3D::GetDocument() // non-debug version is inline -{ - ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CAnimationDoc))); - return (CAnimationDoc*)m_pDocument; -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// CAnimationView3D message handlers -void CAnimationView3D::OnFileExportImage() -{ - GetDocument()->ExportView (myView); -} - -void CAnimationView3D::OnSize(UINT nType, int cx, int cy) -{ - CView::OnSize (nType, cx, cy); - if (cx != 0 - && cy != 0 - && !myView.IsNull()) - { - myView->Window()->DoResize(); - myView->MustBeResized(); - myView->Invalidate(); - update3dView(); - } -} - -void CAnimationView3D::OnBUTTONBack() -{ myView->SetProj(V3d_Ypos); } // See the back View -void CAnimationView3D::OnBUTTONFront() -{ myView->SetProj(V3d_Yneg); } // See the front View - -void CAnimationView3D::OnBUTTONBottom() -{ myView->SetProj(V3d_Zneg); } // See the bottom View -void CAnimationView3D::OnBUTTONTop() -{ myView->SetProj(V3d_Zpos); } // See the top View - -void CAnimationView3D::OnBUTTONLeft() -{ myView->SetProj(V3d_Xneg); } // See the left View -void CAnimationView3D::OnBUTTONRight() -{ myView->SetProj(V3d_Xpos); } // See the right View - -void CAnimationView3D::OnBUTTONAxo() -{ myView->SetProj(V3d_XposYnegZpos); } // See the axonometric View - -void CAnimationView3D::OnBUTTONHlrOff() -{ - myHlrModeIsOn = Standard_False; - myView->SetComputedMode (myHlrModeIsOn); - myView->Redraw(); -} - -void CAnimationView3D::OnBUTTONHlrOn() -{ - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myHlrModeIsOn = Standard_True; - myView->SetComputedMode (myHlrModeIsOn); - myView->Redraw(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); -} - -void CAnimationView3D::OnBUTTONPan() -{ - setCurrentAction (CurrentAction3d_DynamicPanning); -} - -void CAnimationView3D::OnBUTTONPanGlo() -{ - // save the current zoom value - myCurZoom = myView->Scale(); - // Do a Global Zoom - myView->FitAll(); - // Set the mode - setCurrentAction (CurrentAction3d_GlobalPanning); -} - -void CAnimationView3D::OnBUTTONReset() -{ - myView->Reset(); -} - -void CAnimationView3D::OnBUTTONRot() -{ setCurrentAction (CurrentAction3d_DynamicRotation); } - - -void CAnimationView3D::OnBUTTONZoomAll() -{ - FitAll(); -} - -void CAnimationView3D::OnBUTTONZoomProg() -{ setCurrentAction (CurrentAction3d_DynamicZooming); } - -void CAnimationView3D::OnBUTTONZoomWin() -{ setCurrentAction (CurrentAction3d_WindowZooming); } - -void CAnimationView3D::OnBUTTONFly() -{ setCurrentAction (CurrentAction3d_Fly); } - -void CAnimationView3D::OnBUTTONTurn() -{ setCurrentAction (CurrentAction3d_Turn); } - - -void CAnimationView3D::OnLButtonDown(UINT theFlags, CPoint thePoint) -{ - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - PressMouseButton (Graphic3d_Vec2i (thePoint.x, thePoint.y), Aspect_VKeyMouse_LeftButton, aFlags, false); - myClickPos.SetValues (thePoint.x, thePoint.y); - myIsTurnStarted = myCurrentMode == CurrentAction3d_Turn && aFlags == Aspect_VKeyFlags_NONE; - update3dView(); -} - -void CAnimationView3D::OnLButtonUp(UINT theFlags, CPoint thePoint) -{ - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - ReleaseMouseButton (Graphic3d_Vec2i (thePoint.x, thePoint.y), Aspect_VKeyMouse_LeftButton, aFlags, false); - if (myCurrentMode == CurrentAction3d_GlobalPanning) - { - myView->Place (thePoint.x, thePoint.y, myCurZoom); - myView->Invalidate(); - } - if (myCurrentMode != CurrentAction3d_Nothing) - { - setCurrentAction (CurrentAction3d_Nothing); - myIsTurnStarted = false; - } - update3dView(); -} - -void CAnimationView3D::OnMButtonDown(UINT theFlags, CPoint thePoint) -{ - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - PressMouseButton (Graphic3d_Vec2i (thePoint.x, thePoint.y), Aspect_VKeyMouse_MiddleButton, aFlags, false); - update3dView(); -} - -void CAnimationView3D::OnMButtonUp(UINT theFlags, CPoint thePoint) -{ - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - ReleaseMouseButton (Graphic3d_Vec2i (thePoint.x, thePoint.y), Aspect_VKeyMouse_MiddleButton, aFlags, false); - update3dView(); - if (myCurrentMode != CurrentAction3d_Nothing) - { - setCurrentAction (CurrentAction3d_Nothing); - } -} - -void CAnimationView3D::OnRButtonDown(UINT theFlags, CPoint thePoint) -{ - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - PressMouseButton (Graphic3d_Vec2i (thePoint.x, thePoint.y), Aspect_VKeyMouse_RightButton, aFlags, false); - update3dView(); - myClickPos.SetValues (thePoint.x, thePoint.y); -} - -void CAnimationView3D::OnRButtonUp(UINT theFlags, CPoint thePoint) -{ - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - ReleaseMouseButton (Graphic3d_Vec2i (thePoint.x, thePoint.y), Aspect_VKeyMouse_RightButton, aFlags, false); - update3dView(); - if (myCurrentMode != CurrentAction3d_Nothing) - { - setCurrentAction (CurrentAction3d_Nothing); - } - if (aFlags == Aspect_VKeyFlags_NONE - && (myClickPos - Graphic3d_Vec2i (thePoint.x, thePoint.y)).cwiseAbs().maxComp() <= 4) - { - GetDocument()->Popup (thePoint.x, thePoint.y, myView); - } -} - -// ======================================================================= -// function : OnMouseWheel -// purpose : -// ======================================================================= -BOOL CAnimationView3D::OnMouseWheel (UINT theFlags, short theDelta, CPoint thePoint) -{ - const Standard_Real aDeltaF = Standard_Real(theDelta) / Standard_Real(WHEEL_DELTA); - CPoint aCursorPnt = thePoint; - ScreenToClient (&aCursorPnt); - const Graphic3d_Vec2i aPos (aCursorPnt.x, aCursorPnt.y); - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - if (UpdateMouseScroll (Aspect_ScrollDelta (aPos, aDeltaF, aFlags))) - { - update3dView(); - } - return true; -} - -void CAnimationView3D::OnMouseMove(UINT theFlags, CPoint thePoint) -{ - TRACKMOUSEEVENT aMouseEvent; // for WM_MOUSELEAVE - aMouseEvent.cbSize = sizeof(aMouseEvent); - aMouseEvent.dwFlags = TME_LEAVE; - aMouseEvent.hwndTrack = m_hWnd; - aMouseEvent.dwHoverTime = HOVER_DEFAULT; - if (!::_TrackMouseEvent (&aMouseEvent)) { TRACE("Track ERROR!\n"); } - - const Graphic3d_Vec2i aNewPnt (thePoint.x, thePoint.y); - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - if (UpdateMousePosition (aNewPnt, PressedMouseButtons(), aFlags, false)) - { - update3dView(); - } - - if (myIsTurnStarted) - { - Graphic3d_Vec2i aWinSize; - myView->Window()->Size (aWinSize.x(), aWinSize.y()); - const Graphic3d_Vec2i aCenter = aWinSize / 2; - if (myClickPos != aCenter - && aNewPnt != aCenter - && aNewPnt != myClickPos) - { - const Graphic3d_Vec2i aVecFrom = myClickPos - aCenter; - const Graphic3d_Vec2i aVecTo = aNewPnt - aCenter; - const gp_Dir aDirFrom (aVecFrom.x() / double(aWinSize.x() / 2), aVecFrom.y() / double(aWinSize.y() / 2), 0.0); - const gp_Dir aDirTo (aVecTo.x() / double(aWinSize.x() / 2), aVecTo.y() / double(aWinSize.y() / 2), 0.0); - double anAngle = aDirFrom.AngleWithRef (aDirTo, gp::DZ()); - - myView->SetTwist (myView->Twist() + anAngle); - myView->Invalidate(); - update3dView(); - myClickPos = aNewPnt; - } - } -} - -void CAnimationView3D::OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (!myHlrModeIsOn); - pCmdUI->Enable (myHlrModeIsOn); -} - -void CAnimationView3D::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myHlrModeIsOn); - pCmdUI->Enable (!myHlrModeIsOn); -} - -void CAnimationView3D::OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_GlobalPanning); - pCmdUI->Enable (myCurrentMode != CurrentAction3d_GlobalPanning); - -} - -void CAnimationView3D::OnUpdateBUTTONPan(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_DynamicPanning); - pCmdUI->Enable (myCurrentMode != CurrentAction3d_DynamicPanning ); -} - -void CAnimationView3D::OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_DynamicZooming ); - pCmdUI->Enable (myCurrentMode != CurrentAction3d_DynamicZooming); -} - -void CAnimationView3D::OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_WindowZooming); - pCmdUI->Enable (myCurrentMode != CurrentAction3d_WindowZooming); -} - -void CAnimationView3D::OnUpdateBUTTONRot(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_DynamicRotation); - pCmdUI->Enable (myCurrentMode != CurrentAction3d_DynamicRotation); -} - -void CAnimationView3D::OnUpdateBUTTONFly(CCmdUI* pCmdUI) -{ - pCmdUI->Enable(true); - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_Fly); -} - -void CAnimationView3D::OnUpdateBUTTONTurn(CCmdUI* pCmdUI) -{ - pCmdUI->Enable(true); - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_Turn); -} - -void CAnimationView3D::OnChangeBackground() -{ - Standard_Real R1; - Standard_Real G1; - Standard_Real B1; - myView->BackgroundColor(Quantity_TOC_RGB,R1,G1,B1); - COLORREF m_clr ; - m_clr = RGB(R1*255,G1*255,B1*255); - - CColorDialog dlgColor(m_clr); - if (dlgColor.DoModal() == IDOK) - { - m_clr = dlgColor.GetColor(); - R1 = GetRValue(m_clr)/255.; - G1 = GetGValue(m_clr)/255.; - B1 = GetBValue(m_clr)/255.; - myView->SetBackgroundColor(Quantity_TOC_RGB,R1,G1,B1); - } - myView->Redraw(); -} - -//========================================================================================== -//========================================================================================== -//========================================================================================== - -void CAnimationView3D::OnStop() -{ - myAnimTimer.Pause(); -} - -void CAnimationView3D::OnRestart() -{ - myAnimTimer.Start(); - update3dView(); -} diff --git a/samples/mfc/standard/09_Animation/src/AnimationView3D.h b/samples/mfc/standard/09_Animation/src/AnimationView3D.h deleted file mode 100755 index 30db5da030..0000000000 --- a/samples/mfc/standard/09_Animation/src/AnimationView3D.h +++ /dev/null @@ -1,173 +0,0 @@ -// AnimationView.h : interface of the CAnimationView3D class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_ANIMATIONVIEW3D_H__79840E88_1001_11D2_B8C1_0000F87A77C1_3D_INCLUDED_) -#define AFX_ANIMATIONVIEW3D_H__79840E88_1001_11D2_B8C1_0000F87A77C1_3D_INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include "AnimationDoc.h" -#include "..\..\Common\res\OCC_Resource.h" - -#include -#include - -class AIS_RubberBand; - -enum View3D_CurrentAction { - CurrentAction3d_Nothing, - CurrentAction3d_DynamicZooming, - CurrentAction3d_WindowZooming, - CurrentAction3d_DynamicPanning, - CurrentAction3d_GlobalPanning, - CurrentAction3d_DynamicRotation, - CurrentAction3d_Fly, - CurrentAction3d_Turn -}; - -class CAnimationView3D : public CView, public AIS_ViewController -{ -protected: // create from serialization only - CAnimationView3D(); - DECLARE_DYNCREATE(CAnimationView3D) - -// Attributes -public: - CAnimationDoc* GetDocument(); - -// Operations -public: - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CAnimationView3D) - public: - void FitAll() { if ( !myView.IsNull() ) myView->FitAll(); myView->ZFitAll(); }; - virtual void OnDraw(CDC* pDC); // overridden to draw this view - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - virtual void OnInitialUpdate(); // CasCade - protected: - - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~CAnimationView3D(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: - double m_dAngle; - BOOL m_bShift; - -// Generated message map functions -protected: - //{{AFX_MSG(CAnimationView3D) - afx_msg void OnBUTTONAxo(); - afx_msg void OnBUTTONBack(); - afx_msg void OnBUTTONBottom(); - afx_msg void OnBUTTONFront(); - afx_msg void OnBUTTONHlrOff(); - afx_msg void OnBUTTONHlrOn(); - afx_msg void OnBUTTONLeft(); - afx_msg void OnBUTTONPan(); - afx_msg void OnBUTTONPanGlo(); - afx_msg void OnBUTTONReset(); - afx_msg void OnBUTTONRight(); - afx_msg void OnBUTTONRot(); - afx_msg void OnBUTTONTop(); - afx_msg void OnBUTTONZoomAll(); - afx_msg void OnFileExportImage(); - afx_msg void OnSize(UINT nType, int cx, int cy); - afx_msg void OnBUTTONZoomProg(); - afx_msg void OnBUTTONZoomWin(); - afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint point); - afx_msg void OnLButtonDown(UINT nFlags, CPoint point); - afx_msg void OnLButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMButtonDown(UINT nFlags, CPoint point); - afx_msg void OnMButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnRButtonDown(UINT nFlags, CPoint point); - afx_msg void OnRButtonUp(UINT nFlags, CPoint point); - afx_msg void OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPan(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONRot(CCmdUI* pCmdUI); - - afx_msg void OnChangeBackground(); - - afx_msg void OnBUTTONFly(); - afx_msg void OnBUTTONTurn(); - afx_msg void OnUpdateBUTTONFly(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTurn(CCmdUI* pCmdUI); - //}}AFX_MSG - -public : - afx_msg void OnStop(); - afx_msg void OnRestart(); -protected: - - DECLARE_MESSAGE_MAP() -private: - Handle(V3d_View) myView; -public: - Handle(V3d_View)& GetView() { return myView;}; - - //! Request view redrawing. - void update3dView(); - - //! Flush events and redraw view. - void redraw3dView(); - -protected: - - //! Handle view redraw. - virtual void handleViewRedraw (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView) Standard_OVERRIDE; - -protected: - - //! Setup mouse gestures. - void defineMouseGestures(); - - //! Get current action. - View3D_CurrentAction getCurrentAction() const { return myCurrentMode; } - - //! Set current action. - void setCurrentAction (View3D_CurrentAction theAction) - { - myCurrentMode = theAction; - defineMouseGestures(); - } - -private: - AIS_AnimationTimer myAnimTimer; - AIS_MouseGestureMap myDefaultGestures; - Graphic3d_Vec2i myClickPos; - Standard_Real myCurZoom; - Standard_Boolean myHlrModeIsOn; - Standard_Boolean myIsTurnStarted; - unsigned int myUpdateRequests; //!< counter for unhandled update requests - - View3D_CurrentAction myCurrentMode; -}; - -#ifndef _DEBUG // debug version in AnimationView.cpp -inline CAnimationDoc* CAnimationView3D::GetDocument() - { return (CAnimationDoc*)m_pDocument; } -#endif - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_ANIMATIONVIEW3D_H__79840E88_1001_11D2_B8C1_0000F87A77C1_3D_INCLUDED_) diff --git a/samples/mfc/standard/09_Animation/src/Fonc.cxx b/samples/mfc/standard/09_Animation/src/Fonc.cxx deleted file mode 100755 index e003e51a2d..0000000000 --- a/samples/mfc/standard/09_Animation/src/Fonc.cxx +++ /dev/null @@ -1,96 +0,0 @@ -#include "stdafx.h" - -#include "Fonc.hxx" - -//======================================================================= -//function : grid2surf -//purpose : grid2surf S FileName -// cf jm-oliva@paris3.matra-dtv.fr ( Merci JMO ) -//======================================================================= - -Standard_Boolean grid2surf(CString ShapeName, Handle(Geom_BSplineSurface)& S) -{ - CString aFileName = ShapeName; - aFileName.Replace(L'\\', L'/'); - - Handle(TColStd_HArray2OfReal) H; - - Standard_Real xmin, ymin, Dx, Dy; - H = ReadRegularGrid (aFileName, xmin, ymin, Dx, Dy); - GeomAPI_PointsToBSplineSurface MkSurf; - MkSurf.Interpolate(H->Array2(), xmin, Dx, ymin, Dy); - S = MkSurf.Surface(); - return Standard_True; -} - -//======================================================================= -//function : ReadRegularGrid -//purpose : -// cf jm-oliva@paris3.matra-dtv.fr ( Merci JMO ) -//======================================================================= -Handle(TColStd_HArray2OfReal) ReadRegularGrid(CString FileName, - Standard_Real& xmin, - Standard_Real& ymin, - Standard_Real& Deltax, - Standard_Real& Deltay) -{ - CString aFileName = FileName; - aFileName.Replace (L'\\', L'/'); - - Handle(TColStd_HArray2OfReal) H; - Standard_Integer R1 = 1, R2, C1 = 1, C2, R, C; - Standard_Real x, y, z; - - xmin = ymin = 10000000; - - FILE *fp = NULL; - _wfopen_s (&fp, aFileName, L"r"); - - if (fp) - { - fscanf_s(fp, "%d %d", &R2, &C2); - std::cout << "Reading Grid : ( " << R2 << " , " << C2 << " )." << std::endl; - - H = new TColStd_HArray2OfReal(C1, C2, R1, R2); - - Standard_Real FirstX = 0.0; - Standard_Real FirstY = 0.0; - - for(R = R1; R <= R2; R++) - { - for(C = C1; C <= C2; C++) - { - fscanf_s(fp, "%lf %lf %lf ", &x, &y, &z); - - if(R == 1 && C == 1) - { - FirstX=x; - FirstY=y; - } - - // First step for X - if(R == 1 && C == 2) - Deltax = x - FirstX; - - // First step for Y - if(R == 2 && C == 1) - Deltay = y - FirstY; - - // H->SetValue(R, C, z); - H->SetValue(C, R, z); - if(x < xmin) xmin = x; - if(y < ymin) ymin = y; - } - } - - std::cout << "Deltax = " << Deltax << std::endl; - std::cout << "Deltay = " << Deltay << std::endl; - - fclose(fp); - } - else - { - std::cout << "cannot open file : " << FileName << std::endl; - } - return H; -} diff --git a/samples/mfc/standard/09_Animation/src/Fonc.hxx b/samples/mfc/standard/09_Animation/src/Fonc.hxx deleted file mode 100755 index 85c0825827..0000000000 --- a/samples/mfc/standard/09_Animation/src/Fonc.hxx +++ /dev/null @@ -1,46 +0,0 @@ -// File: Functions.hxx -// Created: Tue Oct 07 09:23:55 1997 -// Author: Stephane ROUTELOUS -// - - -#include "StdAfx.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "GeomAPI_PointsToBSplineSurface.hxx" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -Standard_Boolean grid2surf(CString ShapeName, Handle(Geom_BSplineSurface)& S); -Handle(Geom_BSplineCurve) SetTransfo(Handle(Geom_BSplineCurve) aBSCurve); -Handle(Geom_BSplineCurve) BuildBSplineCurve(Standard_Boolean DisplayPoints = Standard_True); -Handle(TColStd_HArray2OfReal) ReadRegularGrid(CString FileName, - Standard_Real& xmin, - Standard_Real& ymin, - Standard_Real& Deltax, - Standard_Real& Deltay); diff --git a/samples/mfc/standard/09_Animation/src/ShadingDialog.cpp b/samples/mfc/standard/09_Animation/src/ShadingDialog.cpp deleted file mode 100755 index 646e89e97e..0000000000 --- a/samples/mfc/standard/09_Animation/src/ShadingDialog.cpp +++ /dev/null @@ -1,97 +0,0 @@ -// ShadingDialog.cpp : implementation file -// - -#include "stdafx.h" -#include "AnimationApp.h" -#include "ShadingDialog.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CShadingDialog dialog - - -CShadingDialog::CShadingDialog(CWnd* pParent /*=NULL*/) - : CDialog(CShadingDialog::IDD, pParent) -{ -// EnableAutomation(); - - //{{AFX_DATA_INIT(CShadingDialog) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void CShadingDialog::OnFinalRelease() -{ - // When the last reference for an automation object is released - // OnFinalRelease is called. The base class will automatically - // deletes the object. Add additional cleanup required for your - // object before calling the base class. - - CDialog::OnFinalRelease(); -} - -void CShadingDialog::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CShadingDialog) - DDX_Control(pDX, IDC_SLIDER1, m_Slide); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CShadingDialog, CDialog) - //{{AFX_MSG_MAP(CShadingDialog) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -BEGIN_DISPATCH_MAP(CShadingDialog, CDialog) - //{{AFX_DISPATCH_MAP(CShadingDialog) - // NOTE - the ClassWizard will add and remove mapping macros here. - //}}AFX_DISPATCH_MAP -END_DISPATCH_MAP() - -// Note: we add support for IID_IShadingDialog to support typesafe binding -// from VBA. This IID must match the GUID that is attached to the -// dispinterface in the .ODL file. - -// {02819A09-10F2-11D2-B8C4-0000F87A77C1} -static const IID IID_IShadingDialog = -{ 0x2819a09, 0x10f2, 0x11d2, { 0xb8, 0xc4, 0x0, 0x0, 0xf8, 0x7a, 0x77, 0xc1 } }; - -BEGIN_INTERFACE_MAP(CShadingDialog, CDialog) - INTERFACE_PART(CShadingDialog, IID_IShadingDialog, Dispatch) -END_INTERFACE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CShadingDialog message handlers - -BOOL CShadingDialog::OnInitDialog() -{ - CDialog::OnInitDialog(); - - m_Slide.SetRange(0,100); - m_Slide.SetTicFreq(100); - m_Slide.SetPos(myvalue); - - //UpdateData(false); - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - - - -void CShadingDialog::OnOK() -{ - // TODO: Add extra validation here - UpdateData(TRUE); - // store the position in my variable - myvalue= m_Slide.GetPos(); - - CDialog::OnOK(); -} diff --git a/samples/mfc/standard/09_Animation/src/ShadingDialog.h b/samples/mfc/standard/09_Animation/src/ShadingDialog.h deleted file mode 100755 index 9f519e6050..0000000000 --- a/samples/mfc/standard/09_Animation/src/ShadingDialog.h +++ /dev/null @@ -1,56 +0,0 @@ -#if !defined(AFX_SHADINGDIALOG_H__02819A0A_10F2_11D2_B8C4_0000F87A77C1__INCLUDED_) -#define AFX_SHADINGDIALOG_H__02819A0A_10F2_11D2_B8C4_0000F87A77C1__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// ShadingDialog.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CShadingDialog dialog - -class CShadingDialog : public CDialog -{ -// Construction -public: - CShadingDialog(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CShadingDialog) - enum { IDD = IDD_ShadingBoxDialog }; - CSliderCtrl m_Slide; - int myvalue; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CShadingDialog) - public: - virtual void OnFinalRelease(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CShadingDialog) - virtual BOOL OnInitDialog(); - virtual void OnOK(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - // Generated OLE dispatch map functions - //{{AFX_DISPATCH(CShadingDialog) - // NOTE - the ClassWizard will add and remove member functions here. - //}}AFX_DISPATCH - DECLARE_DISPATCH_MAP() - DECLARE_INTERFACE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_SHADINGDIALOG_H__02819A0A_10F2_11D2_B8C4_0000F87A77C1__INCLUDED_) diff --git a/samples/mfc/standard/09_Animation/src/StdAfx.cpp b/samples/mfc/standard/09_Animation/src/StdAfx.cpp deleted file mode 100755 index f40034aae7..0000000000 --- a/samples/mfc/standard/09_Animation/src/StdAfx.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// SampleDisplayAnimation.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - diff --git a/samples/mfc/standard/09_Animation/src/StdAfx.h b/samples/mfc/standard/09_Animation/src/StdAfx.h deleted file mode 100755 index 65c608ae67..0000000000 --- a/samples/mfc/standard/09_Animation/src/StdAfx.h +++ /dev/null @@ -1,214 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if !defined(AFX_STDAFX_H__79840E80_1001_11D2_B8C1_0000F87A77C1__INCLUDED_) -#define AFX_STDAFX_H__79840E80_1001_11D2_B8C1_0000F87A77C1__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -#include // MFC OLE automation classes -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - - - -// CasCade : - -enum CurrentAction3d { - CurAction3d_Nothing, - CurAction3d_DynamicZooming, - CurAction3d_WindowZooming, - CurAction3d_DynamicPanning, - CurAction3d_GlobalPanning, - CurAction3d_DynamicRotation -}; - - -#define DEFAULT_DEVIATIONCOEFFICIENT 0.001 -#define DEFAULT_DCBIG 0.005 -#define DEFAULT_DCVBIG 0.01 -#define DEFAULT_DCSMALL 0.0002 -#define DEFAULT_DCVSMALL 0.00004 -#define DEFAULT_COLOR Quantity_NOC_CYAN1 -#define DEFAULT_MATERIAL Graphic3d_NameOfMaterial_Plastered -#define DEFAULT_BACKGROUNDCOLOR Quantity_NOC_MATRAGRAY -#define DEFAULT_HILIGHTCOLOR Quantity_NOC_YELLOW - -#pragma warning( disable : 4244 ) // Issue warning 4244 -#include -#pragma warning( default : 4244 ) // Issue warning 4244 - -#include -/* -#ifndef Version15B -# ifndef Version15D -# ifndef Version20 -# define Version15B -# endif // Version20 -# endif // Version15D -#endif // Version15B - -#pragma message ("=============================") -#ifdef Version15B -# pragma message ("Set the libs for version 1.5B") -#endif // Version15B - -#ifdef Version15D -# pragma message ("Set the libs for version 1.5D") -#endif // Version15D - -#ifdef Version20 -# pragma message ("Set the libs for version 2.0 ") -#endif // Version20 -#pragma message ("=============================") - -#ifdef Version15B -# pragma comment (lib,"TKTop.lib") -# pragma comment (lib,"TShort.lib") -# pragma comment (lib,"TColQuantity.lib") -#endif - -#ifdef Version15D -# pragma comment (lib,"TKTop.lib") -#endif - -#ifdef Version20 -# pragma comment (lib,"TKTop1.lib") -# pragma comment (lib,"TKTop2.lib") -#endif - -#pragma message ("Set the specific libs for the application") -# pragma comment (lib,"TKPrs.lib") -# pragma comment (lib,"TKGeom.lib") -# pragma comment (lib,"TKGlt.lib") -# pragma comment (lib,"TKGraphic.lib") -# pragma comment (lib,"TKPrsMgr.lib") -# pragma comment (lib,"TKViewers.lib") -# pragma comment (lib,"TKSession.lib") -# pragma comment (lib,"gp.lib") -# pragma comment (lib,"TKernel.lib") -# pragma comment (lib,"UnitsAPI.lib") -# pragma comment (lib,"PTColStd.lib") -# pragma comment (lib,"TKMgtShape.lib") -# pragma comment (lib,"TKPShape.lib") -# pragma comment (lib,"ShapeSchema.lib") -# pragma comment (lib,"FSD.lib") -# pragma comment (lib,"OSDriver.lib") -# pragma comment (lib,"ObjMgt.lib") -# pragma comment (lib,"TKXSBase.lib") -# pragma comment (lib,"TKXSIGES.lib") -# pragma comment (lib,"TKXS214.lib") -*/ - - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// had for opencascade -//#include -//#include -//#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "HLRAlgo_Projector.hxx" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "..\res\resource.h" - -//End CasCade - - - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_STDAFX_H__79840E80_1001_11D2_B8C1_0000F87A77C1__INCLUDED_) diff --git a/samples/mfc/standard/09_Animation/src/ThreadDialog.cpp b/samples/mfc/standard/09_Animation/src/ThreadDialog.cpp deleted file mode 100755 index 77af262ae4..0000000000 --- a/samples/mfc/standard/09_Animation/src/ThreadDialog.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// ThreadDialog.cpp : implementation file -// - -#include "stdafx.h" -#include "AnimationApp.h" -#include "ThreadDialog.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CThreadDialog dialog - - -CThreadDialog::CThreadDialog(CWnd* pParent /*=NULL*/) - : CDialog(CThreadDialog::IDD, pParent) -{ -// EnableAutomation(); - - //{{AFX_DATA_INIT(CThreadDialog) - m_Angle = 4; - //}}AFX_DATA_INIT -} - - -void CThreadDialog::OnFinalRelease() -{ - // When the last reference for an automation object is released - // OnFinalRelease is called. The base class will automatically - // deletes the object. Add additional cleanup required for your - // object before calling the base class. - - CDialog::OnFinalRelease(); -} - -void CThreadDialog::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CThreadDialog) - DDX_Text(pDX, IDC_Angle, m_Angle); - DDV_MinMaxUInt(pDX, m_Angle, 1, 60); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CThreadDialog, CDialog) - //{{AFX_MSG_MAP(CThreadDialog) - // NOTE: the ClassWizard will add message map macros here - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -BEGIN_DISPATCH_MAP(CThreadDialog, CDialog) - //{{AFX_DISPATCH_MAP(CThreadDialog) - // NOTE - the ClassWizard will add and remove mapping macros here. - //}}AFX_DISPATCH_MAP -END_DISPATCH_MAP() - -// Note: we add support for IID_IThreadDialog to support typesafe binding -// from VBA. This IID must match the GUID that is attached to the -// dispinterface in the .ODL file. - -// {539445D7-1182-11D2-B8C9-0000F87A77C1} -static const IID IID_IThreadDialog = -{ 0x539445d7, 0x1182, 0x11d2, { 0xb8, 0xc9, 0x0, 0x0, 0xf8, 0x7a, 0x77, 0xc1 } }; - -BEGIN_INTERFACE_MAP(CThreadDialog, CDialog) - INTERFACE_PART(CThreadDialog, IID_IThreadDialog, Dispatch) -END_INTERFACE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CThreadDialog message handlers diff --git a/samples/mfc/standard/09_Animation/src/ThreadDialog.h b/samples/mfc/standard/09_Animation/src/ThreadDialog.h deleted file mode 100755 index 2a0a2a5346..0000000000 --- a/samples/mfc/standard/09_Animation/src/ThreadDialog.h +++ /dev/null @@ -1,54 +0,0 @@ -#if !defined(AFX_THREADDIALOG_H__539445D8_1182_11D2_B8C9_0000F87A77C1__INCLUDED_) -#define AFX_THREADDIALOG_H__539445D8_1182_11D2_B8C9_0000F87A77C1__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// ThreadDialog.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CThreadDialog dialog - -class CThreadDialog : public CDialog -{ -// Construction -public: - CThreadDialog(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CThreadDialog) - enum { IDD = IDD_ThreadBoxDialog }; - UINT m_Angle; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CThreadDialog) - public: - virtual void OnFinalRelease(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CThreadDialog) - // NOTE: the ClassWizard will add member functions here - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - // Generated OLE dispatch map functions - //{{AFX_DISPATCH(CThreadDialog) - // NOTE - the ClassWizard will add and remove member functions here. - //}}AFX_DISPATCH - DECLARE_DISPATCH_MAP() - DECLARE_INTERFACE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_THREADDIALOG_H__539445D8_1182_11D2_B8C9_0000F87A77C1__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/CMakeLists.txt b/samples/mfc/standard/10_Convert/CMakeLists.txt deleted file mode 100644 index d6f6735ecb..0000000000 --- a/samples/mfc/standard/10_Convert/CMakeLists.txt +++ /dev/null @@ -1,83 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (Convert) - -add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE) -set (CMAKE_MFC_FLAG 2) - -set (Convert_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/10_Convert/src) -set (Convert_HEADER_FILES ${Convert_SRC_DIR}/Convert_Presentation.h - ${Convert_SRC_DIR}/OCCDemo_Presentation.h) -set (Convert_SOURCE_FILES ${Convert_SRC_DIR}/Convert_Presentation.cpp - ${Convert_SRC_DIR}/OCCDemo_Presentation.cpp ) - -set (ISESSION_SUBDIR ${Convert_SRC_DIR}/ISession) -set (ISESSION_HEADER_FILES ${ISESSION_SUBDIR}/ISession_Curve.h) -set (ISESSION_SOURCE_FILES ${ISESSION_SUBDIR}/ISession_Curve.cpp) - -set (WNT_SUBDIR ${Convert_SRC_DIR}/WNT) -set (WNT_HEADER_FILES ${WNT_SUBDIR}/resource.h - ${WNT_SUBDIR}/MainFrm.h - ${WNT_SUBDIR}/OCCDemo.h - ${WNT_SUBDIR}/OCCDemoDoc.h - ${WNT_SUBDIR}/OCCDemoView.h - ${WNT_SUBDIR}/ResultDialog.h - ${WNT_SUBDIR}/StdAfx.h) -set (WNT_SOURCE_FILES ${WNT_SUBDIR}/MainFrm.cpp - ${WNT_SUBDIR}/OCCDemo.cpp - ${WNT_SUBDIR}/OCCDemoDoc.cpp - ${WNT_SUBDIR}/OCCDemoView.cpp - ${WNT_SUBDIR}/ResultDialog.cpp - ${WNT_SUBDIR}/StdAfx.cpp) - -set (WNT_RESOURCE_DIR ${WNT_SUBDIR}/res) -set (WNT_RESOURCE_FILES ${WNT_RESOURCE_DIR}/OCCDemo.ico - ${WNT_RESOURCE_DIR}/occlogo.bmp - ${WNT_RESOURCE_DIR}/toolbar.bmp - ${WNT_RESOURCE_DIR}/toolbar1.bmp - ${WNT_RESOURCE_DIR}/logopen.bmp - ${WNT_RESOURCE_DIR}/OCCDemo.rc2 - ${WNT_SUBDIR}/OCCDemo.rc) - -# groups in the VS solution -source_group ("Source Files" FILES ${Convert_SOURCE_FILES} - ${COMMON_WINMAIN_FILE}) - -source_group ("Source Files\\ISession" FILES ${ISESSION_SOURCE_FILES}) -source_group ("Source Files\\WNT" FILES ${WNT_SOURCE_FILES}) - -source_group ("Header Files" FILES ${Convert_HEADER_FILES} ) -source_group ("Header Files\\ISession" FILES ${ISESSION_HEADER_FILES} ) -source_group ("Header Files\\WNT" FILES ${WNT_HEADER_FILES}) - -source_group ("Resource Files" FILES ${WNT_RESOURCE_FILES}) - -add_executable (Convert WIN32 ${Convert_SOURCE_FILES} - ${Convert_HEADER_FILES} - ${ISESSION_SOURCE_FILES} - ${ISESSION_HEADER_FILES} - ${WNT_SOURCE_FILES} - ${WNT_HEADER_FILES} - ${COMMON_WINMAIN_FILE} - ${WNT_RESOURCE_FILES} ) - -set_property (TARGET Convert PROPERTY FOLDER "Samples/mfc") - -if (SINGLE_GENERATOR) - install (TARGETS Convert DESTINATION "${INSTALL_DIR_BIN}") -else() - install (TARGETS Convert - CONFIGURATIONS Release RelWithDebInfo - DESTINATION "${INSTALL_DIR_BIN}") - install (TARGETS Convert - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_BIN}d") -endif() - -include_directories (${CMAKE_BINARY_DIR}/inc - ${Convert_SRC_DIR} - ${ISESSION_SUBDIR} - ${WNT_SUBDIR} - ${MFC_STANDARD_SAMPLES_DIR}/Common) - -target_link_libraries (Convert mfcsample) \ No newline at end of file diff --git a/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj b/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj deleted file mode 100644 index 858193bf91..0000000000 --- a/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj +++ /dev/null @@ -1,467 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C527B648-F98D-42E5-9F59-251FD95D15A0} - Convert - MFCProj - - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ../../../../win32\$(VCFMT)\bin\ - .\win32\obj\ - false - ../../../../win64\$(VCFMT)\bin\ - .\win64\obj\ - false - ../../../../win32\$(VCFMT)\bind\ - .\win32\objd\ - true - ../../../../win64\$(VCFMT)\bind\ - .\win64\objd\ - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\obj/Convert.tlb - - - - - MaxSpeed - OnlyExplicitInline - ../../../../;../../../../Common;../../../src/WNT;../../../src;../../../src/ISession;$(CSF_OCCTIncludePath);../../../Common;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - StdAfx.h - .\win32\obj/Convert.pch - .\win32\obj/ - .\win32\obj/ - .\win32\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bin/Convert.exe - true - ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - .\win32\obj\$(TargetFileName).intermediate.manifest - ../../../../win32\$(VCFMT)\bin/Convert.pdb - Windows - false - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\obj/Convert.tlb - - - - - MaxSpeed - OnlyExplicitInline - ../../../../;../../../../Common;../../../src/WNT;../../../src;../../../src/ISession;$(CSF_OCCTIncludePath);../../../Common;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - StdAfx.h - .\win64\obj/Convert.pch - .\win64\obj/ - .\win64\obj/ - .\win64\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bin/Convert.exe - true - ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - .\win64\obj\$(TargetFileName).intermediate.manifest - ../../../../win64\$(VCFMT)\bin/Convert.pdb - Windows - false - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\objd/Convert.tlb - - - - - Disabled - ../../../../;../../../../Common;../../../src/WNT;../../../src;../../../src/ISession;$(CSF_OCCTIncludePath);../../../Common;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - StdAfx.h - .\win32\objd/Convert.pch - .\win32\objd/ - .\win32\objd/ - .\win32\objd/ - Level4 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bind/Convert.exe - true - ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - .\win32\objd\$(TargetFileName).intermediate.manifest - true - ../../../../win32\$(VCFMT)\bind/Convert.pdb - Windows - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\objd/Convert.tlb - - - - - Disabled - ../../../../;../../../../Common;../../../src/WNT;../../../src;../../../src/ISession;$(CSF_OCCTIncludePath);../../../Common;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - StdAfx.h - .\win64\objd/Convert.pch - .\win64\objd/ - .\win64\objd/ - .\win64\objd/ - Level4 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bind/Convert.exe - true - ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - .\win64\objd\$(TargetFileName).intermediate.manifest - true - ../../../../win64\$(VCFMT)\bind/Convert.pdb - Windows - MachineX64 - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - %(PreprocessorDefinitions) - \mfc\15_AdditionalSamples\Common\WNT;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - \mfc\15_AdditionalSamples\Common\WNT;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - \mfc\15_AdditionalSamples\Common\WNT;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - \mfc\15_AdditionalSamples\Common\WNT;%(AdditionalIncludeDirectories) - - - - - - - - - - - - - {2d6cbbe8-6965-4016-b503-0d715ae26691} - false - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj.filters b/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj.filters deleted file mode 100644 index 2423254399..0000000000 --- a/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj.filters +++ /dev/null @@ -1,112 +0,0 @@ - - - - - {b2e6cca6-ebc5-4e7e-b06c-1e047a9e5013} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {3f765fb2-98a9-4f66-b536-0f09b68eefce} - h;hpp;hxx;hm;inl - - - {44a1d1d0-2210-4fc3-9d12-694b98b3e218} - - - {40f21a32-e9bf-4885-95d3-c8ee7a07c9ad} - - - {8cb29cb9-5584-4028-9405-cd74b6d71fb5} - - - {83444696-f610-4476-9d6b-1fed4444557f} - - - - - Source Files - - - Source Files - - - Common Files\Sources - - - Common Files\Sources - - - Common Files\Sources - - - Common Files\Sources - - - Common Files\Sources - - - Common Files\Sources - - - Common Files\Sources - - - Common Files\Sources - - - - - Header Files - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - - - Common Files\Sources - - - - - Common Files\Resource Files - - - Common Files\Resource Files - - - Common Files\Resource Files - - - Common Files\Resource Files - - - Common Files\Resource Files - - - - \ No newline at end of file diff --git a/samples/mfc/standard/10_Convert/src/Convert_Presentation.cpp b/samples/mfc/standard/10_Convert/src/Convert_Presentation.cpp deleted file mode 100755 index bbc65b1155..0000000000 --- a/samples/mfc/standard/10_Convert/src/Convert_Presentation.cpp +++ /dev/null @@ -1,459 +0,0 @@ -// Convert_Presentation.cpp: implementation of the Convert_Presentation class. -// Conversion of elementary geometry to BSpline curves and surfaces -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "Convert_Presentation.h" - -#include - -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -// Initialization of global variable with an instance of this class -OCCDemo_Presentation* OCCDemo_Presentation::Current = new Convert_Presentation; - -// Initialization of array of samples -const Convert_Presentation::PSampleFuncType Convert_Presentation::SampleFuncs[] = -{ - &Convert_Presentation::sampleCircle, - &Convert_Presentation::sampleEllipse, - &Convert_Presentation::sampleBezier, - &Convert_Presentation::sampleBezierSurface, - &Convert_Presentation::sampleCylindricalSurface, - &Convert_Presentation::sampleRevolSurface, - &Convert_Presentation::sampleToroidalSurface, - &Convert_Presentation::sampleConicalSurface, - &Convert_Presentation::sampleSphericalSurface -}; - -// Colors of objects -static const Quantity_Color CurveColor (1,1,0, Quantity_TOC_RGB); // yellow -static const Quantity_Color SurfaceColor (1,1,0, Quantity_TOC_RGB); // yellow -static const Quantity_Color BSplineColor (1,0.647,0, Quantity_TOC_RGB); // orange -static const Quantity_Color BSplineSurfaceColor (0,0,1, Quantity_TOC_RGB); // blue - -#define EOL "\r\n" - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -Convert_Presentation::Convert_Presentation() -{ - setName ("Conversion to BSpline curves and surfaces"); - myIndex = 0; - myNbFuncs = sizeof(SampleFuncs)/sizeof(PSampleFuncType); - myNbSamples = myNbFuncs; - FitMode = true; -} - -////////////////////////////////////////////////////////////////////// -// Sample execution -////////////////////////////////////////////////////////////////////// - -void Convert_Presentation::DoSample() -{ - ((COCCDemoApp*) AfxGetApp())->SetSampleName (L"Convert"); - ((COCCDemoApp*) AfxGetApp())->SetSamplePath (L"..\\..\\10_Convert"); - getAISContext()->EraseAll (Standard_True); - if (myIndex >=0 && myIndex < myNbFuncs) - (this->*SampleFuncs[myIndex])(); -} - -//================================================================ -// Function : Convert_Presentation::drawSurfaceAndItsBSpline -// Purpose : -//================================================================ -void Convert_Presentation::drawSurfaceAndItsBSpline(const Handle(Geom_Surface) & theSurface, - const Standard_CString theName, - TCollection_AsciiString& theText) -{ - TCollection_AsciiString aTitle ("Converting "); - aTitle += theName; - aTitle += " to BSpline surface"; - - theText += EOL - " Handle(Geom_BSplineSurface) aBSplineSurface = " EOL - " GeomConvert::SurfaceToBSplineSurface(aSurface);" EOL; - - setResultTitle (aTitle.ToCString()); - setResultText (theText.ToCString()); - - drawSurface (theSurface, SurfaceColor); - - if (WAIT_A_LITTLE) return; - - Handle(Geom_BSplineSurface) aBSplineSurface = GeomConvert::SurfaceToBSplineSurface(theSurface); - - _ASSERTE(!aBSplineSurface.IsNull()); - - drawSurface (aBSplineSurface, BSplineSurfaceColor); -} - -//================================================================ -// Function : Convert_Presentation::drawCurveAndItsBSpline -// Purpose : -//================================================================ -void Convert_Presentation::drawCurveAndItsBSpline(Handle(Geom_Curve) theCurve, - const Standard_CString theName, - TCollection_AsciiString& theText) -{ - TCollection_AsciiString aTitle ("Converting "); - aTitle += theName; - aTitle += " to BSpline curve"; - - theText += EOL - " Handle(Geom_BSplineCurve) aBSpline = " EOL - " GeomConvert::CurveToBSplineCurve(aCurve);" EOL; - - setResultTitle (aTitle.ToCString()); - setResultText (theText.ToCString()); - - drawCurve (theCurve, CurveColor); - - if (WAIT_A_LITTLE) return; - - Handle(Geom_Curve) aBSpline = GeomConvert::CurveToBSplineCurve(theCurve); - - drawCurve (aBSpline, BSplineColor); -} - - -////////////////////////////////////////////////////////////////////// -// Sample functions -////////////////////////////////////////////////////////////////////// - -//================================================================ -// Function : Convert_Presentation::sampleCircle -// Purpose : -//================================================================ -void Convert_Presentation::sampleCircle() -{ - gp_Pnt aOrigin (0,0,0); - gp_Dir aDir (1,0,0); - gp_Ax2 aAxis (aOrigin, aDir); - Standard_Real aRadius = 300; - Handle(Geom_Circle) aCurve = new Geom_Circle (aAxis, aRadius); - - TCollection_AsciiString aText ( - " gp_Pnt aOrigin (0,0,0);" EOL - " gp_Dir aDir (1,0,0);" EOL - " gp_Ax2 aAxis (aOrigin, aDir);" EOL - " Standard_Real aRadius = 300;" EOL - " Handle(Geom_Circle) aCurve = new Geom_Circle (aAxis, aRadius);" EOL - ); - drawCurveAndItsBSpline (aCurve, "Circle", aText); -} - -//================================================================ -// Function : Convert_Presentation::sampleEllipse -// Purpose : -//================================================================ -void Convert_Presentation::sampleEllipse() -{ - gp_Pnt aOrigin (0,0,0); - gp_Dir aDir (1,0,0); - gp_Ax2 aMajorAxis (aOrigin, aDir); - Standard_Real aMajorRadius = 300; - Standard_Real aMinorRadius = 150; - Handle(Geom_Ellipse) aCurve = - new Geom_Ellipse (aMajorAxis, aMajorRadius, aMinorRadius); - - TCollection_AsciiString aText ( - " gp_Pnt aOrigin (0,0,0);" EOL - " gp_Dir aDir (1,0,0);" EOL - " gp_Ax2 aAxis (aOrigin, aDir);" EOL - " Standard_Real aMajorRadius = 300;" EOL - " Standard_Real aMinorRadius = 150;" EOL - " Handle(Geom_Ellipse) aCurve = " EOL - " new Geom_Ellipse (aAxis, aMajorRadius, aMinorRadius);" EOL - ); - drawCurveAndItsBSpline (aCurve, "Ellipse", aText); -} - -//================================================================ -// Function : Convert_Presentation::sampleBezier -// Purpose : -//================================================================ -void Convert_Presentation::sampleBezier() -{ - TCollection_AsciiString aText ( - " Standard_Real aPolesCoords[][3] = {" EOL - " {0,0,0},{0,1,0},{1,1,0},{1,2,0},{2,2,0},{2,1,0},{3,1,0},{3,0,0},{2,0,0},{2,-1,0}," EOL - " {3,-1,0},{3,-2,0},{4,-2,0},{4,-1,0},{5,-1,0},{5,0,0},{6,0,0},{6,-1,0},{7,-1,0}," EOL - " {7,0,0},{8,0,0},{8,1,0}" EOL - " };" EOL - " TColgp_Array1OfPnt aPoles (1, sizeof(aPolesCoords)/(sizeof(Standard_Real)*2));" EOL - " " EOL - " for (Standard_Integer i=1; i <= aPoles.Upper(); i++)" EOL - " aPoles(i) = gp_Pnt (aPolesCoords[i-1][0]*100, " EOL - " aPolesCoords[i-1][1]*100, " EOL - " aPolesCoords[i-1][2]*100);" EOL - " " EOL - " Handle(Geom_BezierCurve) aCurve = new Geom_BezierCurve (aPoles);" EOL - ); - - Standard_Real aPolesCoords[][3] = { - {0,0,0},{0,1,0},{1,1,0},{1,2,0},{2,2,0},{2,1,0},{3,1,0},{3,0,0},{2,0,0},{2,-1,0}, - {3,-1,0},{3,-2,0},{4,-2,0},{4,-1,0},{5,-1,0},{5,0,0},{6,0,0},{6,-1,0},{7,-1,0}, - {7,0,0},{8,0,0},{8,1,0} - }; - TColgp_Array1OfPnt aPoles (1, sizeof(aPolesCoords)/(sizeof(Standard_Real)*3)); - - for (Standard_Integer i=1; i <= aPoles.Upper(); i++) - aPoles(i) = gp_Pnt (aPolesCoords[i-1][0]*150-500, - aPolesCoords[i-1][1]*150, - aPolesCoords[i-1][2]*150); - - Handle(Geom_BezierCurve) aCurve = new Geom_BezierCurve (aPoles); - - drawCurveAndItsBSpline (aCurve, "BezierCurve", aText); -} - -//================================================================ -// Function : Convert_Presentation::sampleBezierSurface -// Purpose : -//================================================================ -void Convert_Presentation::sampleBezierSurface() -{ - getAISContext()->EraseAll (Standard_True); - - Standard_CString aName = "BezierSurface"; - // Create a BezierSurface - TColgp_Array2OfPnt aPoles(1,2,1,4); // 8 points - TColStd_Array2OfReal aWeights(1,2,1,4); - // initializing array of points - aPoles.SetValue(1,1,gp_Pnt(0,10,0)); aPoles.SetValue(1,2,gp_Pnt(3.3,6.6,3)); - aPoles.SetValue(1,3,gp_Pnt(6.6,6.6,-3)); aPoles.SetValue(1,4,gp_Pnt(10,10,0)); - aPoles.SetValue(2,1,gp_Pnt(0,0,0)); aPoles.SetValue(2,2,gp_Pnt(3.3,3.3,-3)); - aPoles.SetValue(2,3,gp_Pnt(6.6,3.3,3)); aPoles.SetValue(2,4,gp_Pnt(10,0,0)); - // scaling poles - for (Standard_Integer i=1; i <= aPoles.ColLength(); i++) - for (Standard_Integer j=1; j <= aPoles.RowLength(); j++) - aPoles(i,j).ChangeCoord() = aPoles(i,j).Coord() * 100 + gp_XYZ(-500,-500,0); - //initializing array of weights - aWeights.SetValue(1,1,1); aWeights.SetValue(1,2,3); - aWeights.SetValue(1,3,9); aWeights.SetValue(1,4,1); - aWeights.SetValue(2,1,1); aWeights.SetValue(2,2,2); - aWeights.SetValue(2,3,5); aWeights.SetValue(2,4,1); - Handle(Geom_BezierSurface) aSurface = - new Geom_BezierSurface(aPoles, aWeights); - - TCollection_AsciiString aText ( - " // Create a BezierSurface" EOL - " TColgp_Array2OfPnt aPoles(1,2,1,4); // 8 points" EOL - " TColStd_Array2OfReal aWeights(1,2,1,4);" EOL - " // initializing array of points" EOL - " aPoles.SetValue(1,1,gp_Pnt(0,10,0)); aPoles.SetValue(1,2,gp_Pnt(3.3,6.6,3));" EOL - " aPoles.SetValue(1,3,gp_Pnt(6.6,6.6,-3)); aPoles.SetValue(1,4,gp_Pnt(10,10,0));" EOL - " aPoles.SetValue(2,1,gp_Pnt(0,0,0)); aPoles.SetValue(2,2,gp_Pnt(3.3,3.3,-3));" EOL - " aPoles.SetValue(2,3,gp_Pnt(6.6,3.3,3)); aPoles.SetValue(2,4,gp_Pnt(10,0,0)); " EOL - " // scaling poles" EOL - " for (Standard_Integer i=1; i <= aPoles.ColLength(); i++)" EOL - " for (Standard_Integer j=1; j <= aPoles.RowLength(); j++)" EOL - " aPoles(i,j).ChangeCoord() = aPoles(i,j).Coord() * 100 + gp_XYZ(-500,-500,0);" EOL - " //initializing array of weights" EOL - " aWeights.SetValue(1,1,1); aWeights.SetValue(1,2,3);" EOL - " aWeights.SetValue(1,3,9); aWeights.SetValue(1,4,1);" EOL - " aWeights.SetValue(2,1,1); aWeights.SetValue(2,2,2);" EOL - " aWeights.SetValue(2,3,5); aWeights.SetValue(2,4,1);" EOL - " Handle(Geom_BezierSurface) aSurface =" EOL - " new Geom_BezierSurface(aPoles, aWeights);" EOL - ); - - drawSurfaceAndItsBSpline (aSurface, aName, aText); -} - -//================================================================ -// Function : OCCDemo_Presentation::sampleCylindricalSurface -// Purpose : -//================================================================ -void Convert_Presentation::sampleCylindricalSurface() -{ - getAISContext()->EraseAll (Standard_True); - - Standard_CString aName = "Cylindrical Surface"; - TCollection_AsciiString aText ( - " // creating an axis parallel to Y axis" EOL - " gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,1,0));" EOL EOL - - " // creating a cylindrical surface along anAx with radius = 100" EOL - " Handle(Geom_CylindricalSurface) aCylSurface = new Geom_CylindricalSurface(anAx, 100);" EOL EOL - - " // only finit surfaces can be converted to BSpline surfaces, " EOL - " // cylindrical surface is infinite, it must be trimmed" EOL - " Handle(Geom_RectangularTrimmedSurface) aSurface = " EOL - " new Geom_RectangularTrimmedSurface(aCylSurface, 0, 2*PI, -1000, 1000, Standard_True, Standard_True);" EOL); - - // creating an axis parallel to Y axis - gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,1,0)); - - // creating a cylindrical surface along anAx with radius = 4 - Handle(Geom_CylindricalSurface) aCylSurface = new Geom_CylindricalSurface(anAx, 100); - - // only finit surfaces can be converted to BSpline surfaces, - // cylindrical surface is infinite, it must be trimmed - Handle(Geom_RectangularTrimmedSurface) aSurface = - new Geom_RectangularTrimmedSurface(aCylSurface, 0, 2*M_PI, -1000, 1000, Standard_True, Standard_True); - - drawSurfaceAndItsBSpline(aSurface, aName, aText); -} - -//================================================================ -// Function : OCCDemo_Presentation::sampleRevolSurface -// Purpose : -//================================================================ -void Convert_Presentation::sampleRevolSurface() -{ - FitMode=false; - ResetView(); - TranslateView(-176.84682, -102.12892); - SetViewScale(0.69326); - - getAISContext()->EraseAll (Standard_True); - - Standard_CString aName = "Surface of revolution"; - TCollection_AsciiString aText ( - " // creating a curve for revolution. Let it be a Bezier curve." EOL - " Handle(Geom_BezierCurve) aBezierCurve;" EOL EOL - - " // array of the bezier curve poles" EOL - " TColgp_Array1OfPnt aPoles(1,4);" EOL - " // array of the poles' weights" EOL - " TColStd_Array1OfReal aWeights(1,4);" EOL EOL - - " aPoles(1) = gp_Pnt(0, 0, 0); aWeights(1) = 1;" EOL - " aPoles(2) = gp_Pnt(150, 250, 0); aWeights(2) =75;" EOL - " aPoles(3) = gp_Pnt(350, 150, 0); aWeights(3) =120;" EOL - " aPoles(4) = gp_Pnt(500, 500, 0); aWeights(4) = 1;" EOL EOL - - " // creating a bezier curve" EOL - " aBezierCurve = new Geom_BezierCurve(aPoles, aWeights);" EOL EOL - - " // creating a surface of revolution of the bezier curve around Y axis" EOL - " gp_Ax1 anAx(gp_Pnt(0, 0, 0), gp_Dir(0,1,0));" EOL - " Handle(Geom_SurfaceOfRevolution) aSurface = new Geom_SurfaceOfRevolution(aBezierCurve, anAx);" EOL - ); - - // array of the bezier curve poles - TColgp_Array1OfPnt aPoles(1,4); - // array of the poles' weights - TColStd_Array1OfReal aWeights(1,4); - - aPoles(1) = gp_Pnt(0, 0, 0); aWeights(1) = 1; - aPoles(2) = gp_Pnt(150, 250, 0); aWeights(2) =75; - aPoles(3) = gp_Pnt(350, 150, 0); aWeights(3) =120; - aPoles(4) = gp_Pnt(500, 500, 0); aWeights(4) = 1; - - Handle(Geom_Curve) aBezierCurve = new Geom_BezierCurve(aPoles, aWeights); - drawCurve(aBezierCurve); - - // creating a surface of revolution of the bezier curve around Y axis - gp_Ax1 anAx(gp_Pnt(0,0,0), gp_Dir(0,1,0)); - Handle(Geom_SurfaceOfRevolution) aSurface = new Geom_SurfaceOfRevolution(aBezierCurve, anAx); - - drawSurfaceAndItsBSpline (aSurface, aName, aText); - FitMode=true; -} - -//================================================================ -// Function : Convert_Presentation::sampleToroidalSurface -// Purpose : -//================================================================ -void Convert_Presentation::sampleToroidalSurface() -{ - getAISContext()->EraseAll (Standard_True); - - Standard_CString aName = "Toroidal surface"; - TCollection_AsciiString aText ( - " // creating an axis parallel to Y axis" EOL - " gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,1,0));" EOL - " // creating a toroidal surface with major radius = 240 and minor radius = 120" EOL - " Handle(Geom_ToroidalSurface) aSurface = new Geom_ToroidalSurface(anAx, 240, 120);" EOL); - - // creating an axis parallel to Y axis - gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,1,0)); - // creating a toroidal surface with major radius = 240 and minor radius = 120 - Handle(Geom_ToroidalSurface) aSurface = new Geom_ToroidalSurface(anAx, 240, 120); - - drawSurfaceAndItsBSpline(aSurface, aName, aText); -} - -//================================================================ -// Function : Convert_Presentation::sampleConicalSurface -// Purpose : -//================================================================ -void Convert_Presentation::sampleConicalSurface() -{ - getAISContext()->EraseAll (Standard_True); - - Standard_CString aName = "Conical surface"; - TCollection_AsciiString aText ( - " // creating an axis parallel to Z axis" EOL - " gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,0,1)); " EOL - " // creating a conical surface with base radius = 10 and angle = 20 deg" EOL - " Handle(Geom_ConicalSurface) aConicalSurface = new Geom_ConicalSurface(anAx,PI/9., 10);" EOL EOL - - " // only finit surfaces can be converted to BSpline surfaces, " EOL - " // conical surface is infinite, it must be trimmed" EOL - " Handle(Geom_RectangularTrimmedSurface) aSurface = " EOL - " new Geom_RectangularTrimmedSurface(aConicalSurface, 0, 2*PI, -1000, 1000, Standard_True, Standard_True);" EOL); - - // creating an axis parallel to Z axis - gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,0,1)); - // creating a conical surface with base radius = 10 and angle = 20 deg - Handle(Geom_ConicalSurface) aConicalSurface = new Geom_ConicalSurface(anAx,M_PI/9., 10); - - // only finit surfaces can be converted to BSpline surfaces, - // conical surface is infinite, it must be trimmed - Handle(Geom_RectangularTrimmedSurface) aSurface = - new Geom_RectangularTrimmedSurface(aConicalSurface, 0, 2*M_PI, -1000, 1000, Standard_True, Standard_True); - - drawSurfaceAndItsBSpline(aSurface, aName, aText); -} - -//================================================================ -// Function : Convert_Presentation::sampleSphericalSurface -// Purpose : -//================================================================ -void Convert_Presentation::sampleSphericalSurface() -{ - getAISContext()->EraseAll (Standard_True); - - Standard_CString aName = "Spherical surface"; - TCollection_AsciiString aText ( - "// creating an axis parallel to Z axis" EOL - "gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,0,1));" EOL - "// creating a spherical surface with radius = 300" EOL - "Handle(Geom_SphericalSurface) aSurface = new Geom_SphericalSurface(anAx,300);" EOL); - - // creating an axis parallel to Z axis - gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,0,1)); - // creating a spherical surface with radius = 300 - Handle(Geom_SphericalSurface) aSurface = new Geom_SphericalSurface(anAx,300); - - drawSurfaceAndItsBSpline(aSurface, aName, aText); -} - diff --git a/samples/mfc/standard/10_Convert/src/Convert_Presentation.h b/samples/mfc/standard/10_Convert/src/Convert_Presentation.h deleted file mode 100755 index 1652113044..0000000000 --- a/samples/mfc/standard/10_Convert/src/Convert_Presentation.h +++ /dev/null @@ -1,55 +0,0 @@ -// Convert_Presentation.h: interface for the Convert_Presentation class. -// Conversion of elementary geometry to BSpline curves and surfaces -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_Convert_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_Convert_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include -#include -#include - -class Quantity_Color; - -class Convert_Presentation : public OCCDemo_Presentation -{ -public: - // Construction - Convert_Presentation(); - -public: - // Iteration on samples - virtual void DoSample(); - // one phase of iterations - -private: - // Sample functions - void sampleCircle(); - void sampleEllipse(); - void sampleBezier(); - void sampleBezierSurface(); - void sampleCylindricalSurface(); - void sampleRevolSurface(); - void sampleToroidalSurface(); - void sampleConicalSurface(); - void sampleSphericalSurface(); - - void drawCurveAndItsBSpline (Handle(Geom_Curve) theCurve, - const Standard_CString theName, TCollection_AsciiString& theText); - - void drawSurfaceAndItsBSpline (const Handle(Geom_Surface) & theSurface, - const Standard_CString theName, TCollection_AsciiString& theText); - -private: - // Array of pointers to sample functions - typedef void (Convert_Presentation::*PSampleFuncType)(); - static const PSampleFuncType SampleFuncs[]; - - int myNbFuncs; -}; - -#endif // !defined(AFX_Convert_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.cpp b/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.cpp deleted file mode 100755 index 6d6fb6de72..0000000000 --- a/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// ISession_Curve.cpp: implementation of the ISession_Curve class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "ISession_Curve.h" -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[]=__FILE__; -#endif - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - - -ISession_Curve::ISession_Curve(const Handle(Geom_Curve)& aCurve) -:AIS_InteractiveObject(),myCurve(aCurve) -{ -} - -ISession_Curve::~ISession_Curve() -{ - -} -void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer /*aMode*/) -{ - GeomAdaptor_Curve anAdaptorCurve(myCurve); - if (hasOwnColor) - myDrawer->LineAspect()->SetColor (myDrawer->Color()); - myDrawer->Link()->SetDiscretisation(100); - myDrawer->Link()->SetMaximalParameterValue(500); - - StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer); -} - -void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, - const Standard_Integer /*aMode*/) -{ -} - - diff --git a/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.h b/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.h deleted file mode 100755 index c1c955fdf9..0000000000 --- a/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.h +++ /dev/null @@ -1,32 +0,0 @@ -// ISession_Curve.h: interface for the ISession_Curve class. -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_) -#define AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -#include -#include -#include -#include -class ISession_Curve; -DEFINE_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject) - -class ISession_Curve : public AIS_InteractiveObject -{ -public: - ISession_Curve(const Handle(Geom_Curve)& aCurve); - virtual ~ISession_Curve(); -DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) -private: - -Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; -void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; - -Handle(Geom_Curve) myCurve; -}; - -#endif // !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.cpp b/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.cpp deleted file mode 100755 index ed10730739..0000000000 --- a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.cpp +++ /dev/null @@ -1,324 +0,0 @@ -// OCCDemo_Presentation.cpp: implementation of the OCCDemo_Presentation class. -// This is a base class for all presentations -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "OCCDemo_Presentation.h" -#include "OCCDemoView.h" -#include "ISession_Curve.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAX_PARAM 1000 // if a surface parameter is infinite, it is assigned -// this value in order to display the "infinit" object in the viewer. - - -Standard_Boolean OCCDemo_Presentation::WaitForInput (unsigned long aMilliSeconds) -{ - //::WaitForSingleObject(::CreateEvent (NULL, FALSE, FALSE, NULL), aMilliSeconds); - if (::MsgWaitForMultipleObjects(0, NULL, FALSE, aMilliSeconds, - QS_KEY | QS_MOUSEBUTTON) != WAIT_TIMEOUT) - { - MSG msg; - if (::PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) - { - if ( msg.message == WM_KEYUP || - msg.message == WM_MOUSEFIRST || - msg.message == WM_PAINT ) - { - ::PeekMessage (&msg, NULL, 0, 0, PM_REMOVE); - return WaitForInput (aMilliSeconds); - } - else - return Standard_True; - } - } - return Standard_False; -} - -//================================================================ -// Function : fixParam -// Purpose : assigns a finite value to theParam if it's infinite -// (equal to +- Precision::Infinite()) -//================================================================ -static Standard_Boolean fixParam(Standard_Real& theParam) -{ - Standard_Boolean aResult = Standard_False; - if (Precision::IsNegativeInfinite(theParam)) - { - theParam = -MAX_PARAM; - aResult = Standard_True; - } - if (Precision::IsPositiveInfinite(theParam)) - { - theParam = MAX_PARAM; - aResult = Standard_True; - } - return aResult; -} - -//================================================================ -// Function : DrawSurface -// Purpose : displays a given geometric surface in 3d viewer -// (creates a finite face and displays it) -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface - (const Handle(Geom_Surface)& theSurface, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Standard_Real u1, u2, v1, v2; - theSurface->Bounds(u1,u2,v1,v2); - fixParam(u1); - fixParam(u2); - fixParam(v1); - fixParam(v2); - - Handle(AIS_Shape) aGraphicSurface = - new AIS_Shape(BRepBuilderAPI_MakeFace (theSurface, u1, u2, v1, v2, Precision::Confusion())); - - getAISContext()->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay); - getAISContext()->SetColor(aGraphicSurface, theColor, toDisplay); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicSurface, Standard_False); - COCCDemoDoc::Fit(); - } - else - getAISContext()->Display (aGraphicSurface, Standard_True); - } - - return aGraphicSurface; -} - -//================================================================ -// Function : DrawCurve -// Purpose : displays a given curve 3d -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve - (const Handle(Geom_Curve)& theCurve, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(ISession_Curve) aGraphicCurve = new ISession_Curve (theCurve); - - getAISContext()->SetColor (aGraphicCurve, theColor, toDisplay); - aGraphicCurve->Attributes()->Link()->SetLineArrowDraw(Standard_False); - if (toDisplay){ - if (FitMode){ - getAISContext()->Display (aGraphicCurve, Standard_False); - COCCDemoDoc::Fit(); - } - else - getAISContext()->Display (aGraphicCurve, Standard_True); - } - - return aGraphicCurve; -} - -//================================================================ -// Function : DrawCurve -// Purpose : displays a given curve 2d -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve - (const Handle(Geom2d_Curve)& theCurve, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay, - const gp_Ax2& aPosition) -{ - // create 3D curve in plane - Handle(Geom_Curve) aCurve3d; - if (theCurve->IsKind(STANDARD_TYPE(Geom2d_OffsetCurve))) - { - Handle(Geom2d_OffsetCurve) aOffCurve = - Handle(Geom2d_OffsetCurve)::DownCast(theCurve); - Handle(Geom_Curve) aBasCurve3d = - GeomAPI::To3d (aOffCurve->BasisCurve(), gp_Pln(aPosition)); - Standard_Real aDist = aOffCurve->Offset(); - aCurve3d = new Geom_OffsetCurve (aBasCurve3d, aDist, aPosition.Direction()); - } - else - { - aCurve3d = GeomAPI::To3d (theCurve, gp_Pln(aPosition)); - } - return drawCurve (aCurve3d, theColor, toDisplay); -} - -//================================================================ -// Function : drawPoint -// Purpose : displays a given point -//================================================================ -Handle(AIS_Point) OCCDemo_Presentation::drawPoint - (const gp_Pnt& aPnt, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Point) aGraphicPoint = new AIS_Point (new Geom_CartesianPoint(aPnt)); - - getAISContext()->SetColor (aGraphicPoint, theColor, toDisplay); - if (toDisplay) { - getAISContext()->Display (aGraphicPoint, Standard_True); - //COCCDemoDoc::Fit(); - } - - return aGraphicPoint; -} - -//================================================================ -// Function : drawVector -// Purpose : displays a given vector in 3d viewer -// (segment of line starting at thePnt with the arrow at the end, -// the length of segment is the length of the vector) -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector - (const gp_Pnt& thePnt, - const gp_Vec& theVec, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Standard_Real aLength = theVec.Magnitude(); - if (aLength < Precision::Confusion()) - return Handle(AIS_InteractiveObject)(); - - Handle(Geom_Curve) aCurve = new Geom_Line (thePnt, theVec); - aCurve = new Geom_TrimmedCurve (aCurve, 0, aLength); - - Handle(ISession_Curve) aGraphicCurve = new ISession_Curve (aCurve); - - getAISContext()->SetColor (aGraphicCurve, theColor, toDisplay); - Handle(Prs3d_Drawer) aDrawer = aGraphicCurve->Attributes()->Link(); - aDrawer->SetLineArrowDraw(Standard_True); - aDrawer->ArrowAspect()->SetLength(aLength/10); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicCurve, Standard_False); - COCCDemoDoc::Fit(); - } - else - getAISContext()->Display (aGraphicCurve, Standard_True); - } - - return aGraphicCurve; -} - - -Handle(AIS_Shape) OCCDemo_Presentation::drawShape - (const TopoDS_Shape& theShape,const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape); - - getAISContext()->SetMaterial(aGraphicShape, Graphic3d_NOM_PLASTIC, toDisplay); - getAISContext()->SetColor (aGraphicShape, theColor, toDisplay); - if (toDisplay){ - if (FitMode){ - getAISContext()->Display (aGraphicShape, Standard_False); - COCCDemoDoc::Fit(); - } - else - getAISContext()->Display (aGraphicShape, Standard_True); - } - - return aGraphicShape; -} - -Handle(AIS_Shape) OCCDemo_Presentation::drawShape - (const TopoDS_Shape& theShape, - const Graphic3d_NameOfMaterial theMaterial, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape); - - getAISContext()->SetMaterial(aGraphicShape, theMaterial, toDisplay); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicShape, Standard_False); - COCCDemoDoc::Fit(); - } - else - getAISContext()->Display (aGraphicShape, Standard_True); - } - - return aGraphicShape; -} - -void OCCDemo_Presentation::GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->GetViewAt (theX, theY, theZ); -} - -void OCCDemo_Presentation::SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->SetViewAt (theX, theY, theZ); -} - -void OCCDemo_Presentation::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->GetViewEye(X,Y,Z); -} - -void OCCDemo_Presentation::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->SetViewEye(X,Y,Z); -} - -Standard_Real OCCDemo_Presentation::GetViewScale() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - return pView->GetViewScale(); -} - -void OCCDemo_Presentation::SetViewScale(Standard_Real Coef) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->SetViewScale(Coef); -} - -void OCCDemo_Presentation::ResetView() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->Reset(); -} - -void OCCDemo_Presentation::TranslateView (const Standard_Real theX, const Standard_Real theY) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->Translate (theX, theY); -} diff --git a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h b/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h deleted file mode 100755 index 5cf9390f5d..0000000000 --- a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h +++ /dev/null @@ -1,134 +0,0 @@ -// OCCDemo_Presentation.h: interface for the OCCDemo_Presentation class. -// This is a base class for all presentations -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - - -#define WAIT_A_LITTLE WaitForInput(500) -#define WAIT_A_SECOND WaitForInput(1000) - -#include -#include -#include -#include -#include -#include -#include -class Quantity_Color; - -class OCCDemo_Presentation -{ -public: - // Construction - OCCDemo_Presentation() : myIndex(0), myNbSamples(0), FitMode(false){} - virtual ~OCCDemo_Presentation() {} - -public: - static OCCDemo_Presentation* Current; - // this pointer must be initialized when realize a derivable class; - // it is used by application to access to a presentation class instance - - void SetDocument (COCCDemoDoc* theDoc) {myDoc = theDoc;} - // document must be set by the user of this class before first use of iterations - -public: - // Titling - const CString& GetName() const {return myName;} - -public: - // Iteration on samples - void FirstSample() {myIndex=0;} - void LastSample() {myIndex=myNbSamples-1;} - Standard_Boolean AtFirstSample() const {return myIndex <= 0;} - Standard_Boolean AtLastSample() const {return myIndex >= myNbSamples-1;} - void NextSample() {myIndex++;} - void PrevSample() {myIndex--;} - virtual void DoSample() = 0; - static void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ); - static void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ); - static void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z); - static void SetViewEye (Standard_Real X, Standard_Real Y, Standard_Real Z); - static Standard_Real GetViewScale(); - static void SetViewScale(Standard_Real Coef); - static void ResetView(); - static void TranslateView (const Standard_Real theX, const Standard_Real theY); - - // place one-time initialization code in this function - virtual void Init() {} - -protected: - // Methods to call from a derivable class - void setName (const char* theName) {myName = CString(theName);} - Handle(AIS_InteractiveContext) getAISContext() const {return myDoc->GetAISContext();} - Handle(V3d_Viewer) getViewer() const {return myDoc->GetViewer();} - void setResultTitle (const char* theTitle) {myDoc->GetResultDialog()->SetTitle(theTitle);} - void setResultText (const char* theText) {myDoc->GetResultDialog()->SetText(theText);} - Standard_CString GetDataDir() {return myDoc->GetDataDir();} - - Standard_Boolean WaitForInput (unsigned long aMilliSeconds); - // Waits for a user input or a period of time has been elapsed - - Handle(AIS_InteractiveObject) drawSurface (const Handle(Geom_Surface)& theSurface, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_LEMONCHIFFON3), - const Standard_Boolean toDisplay = Standard_True); - // creates a finite face based on the given geometric surface - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom_Curve)& theCurve, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED), - const Standard_Boolean toDisplay = Standard_True); - // creates an ISession_Curve based on the given geometric curve - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom2d_Curve)& theCurve, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED), - const Standard_Boolean toDisplay = Standard_True, - const gp_Ax2& aPosition = gp::XOY()); - // converts a given curve to 3d using aPosition and calls the previous method - - Handle(AIS_Point) drawPoint (const gp_Pnt& thePnt, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_GREEN), - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given point - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawVector (const gp_Pnt& thePnt, - const gp_Vec& theVec, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_YELLOW), - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given vector - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given shape - // with material PLASTIC and a given color - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape, - const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NameOfMaterial_Brass, - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given shape with the given material - // (color is default for a given material) - // and displays it in the viewer if toDisplay = Standard_True - -protected: - // Fields to use in a derivable class - BOOL FitMode; - int myIndex; - int myNbSamples; - -private: - COCCDemoDoc* myDoc; - CString myName; - -}; - -#endif // !defined(AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/MainFrm.cpp b/samples/mfc/standard/10_Convert/src/WNT/MainFrm.cpp deleted file mode 100755 index 7135610a1e..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/MainFrm.cpp +++ /dev/null @@ -1,113 +0,0 @@ -// MainFrm.cpp : implementation of the CMainFrame class -// - -#include "stdafx.h" -#include "OCCDemo.h" - -#include "MainFrm.h" -#include "OCCDemoDoc.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CMainFrame - -IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) - -BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) - //{{AFX_MSG_MAP(CMainFrame) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code ! - ON_WM_CREATE() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -static UINT indicators[] = -{ - ID_SEPARATOR // status line indicator -}; - -///////////////////////////////////////////////////////////////////////////// -// CMainFrame construction/destruction - -CMainFrame::CMainFrame() -{ - // TODO: add member initialization code here - -} - -CMainFrame::~CMainFrame() -{ -} - -int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) -{ - if (CFrameWnd::OnCreate(lpCreateStruct) == -1) - return -1; - - if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP - /* | CBRS_GRIPPER */| CBRS_TOOLTIPS | CBRS_FLYBY) || - !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } - - if (!m_wndToolBar1.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP - | CBRS_TOOLTIPS | CBRS_FLYBY) || - !m_wndToolBar1.LoadToolBar(IDR_TOOLBAR1)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } - - if (!m_wndStatusBar.Create(this) || - !m_wndStatusBar.SetIndicators(indicators, - sizeof(indicators)/sizeof(UINT))) - { - TRACE0("Failed to create status bar\n"); - return -1; // fail to create - } - - // TODO: Delete these three lines if you don't want the toolbar to - // be dockable - //m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); - //EnableDocking(CBRS_ALIGN_ANY); - //DockControlBar(&m_wndToolBar); - - return 0; -} - -BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) -{ - if( !CFrameWnd::PreCreateWindow(cs) ) - return FALSE; - // TODO: Modify the Window class or styles here by modifying - // the CREATESTRUCT cs - - return TRUE; -} - -///////////////////////////////////////////////////////////////////////////// -// CMainFrame diagnostics - -#ifdef _DEBUG -void CMainFrame::AssertValid() const -{ - CFrameWnd::AssertValid(); -} - -void CMainFrame::Dump(CDumpContext& dc) const -{ - CFrameWnd::Dump(dc); -} - -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// CMainFrame message handlers - diff --git a/samples/mfc/standard/10_Convert/src/WNT/MainFrm.h b/samples/mfc/standard/10_Convert/src/WNT/MainFrm.h deleted file mode 100755 index 51a368edeb..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/MainFrm.h +++ /dev/null @@ -1,59 +0,0 @@ -// MainFrm.h : interface of the CMainFrame class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_MAINFRM_H__57A6A22C_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_MAINFRM_H__57A6A22C_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -class CMainFrame : public CFrameWnd -{ - -protected: // create from serialization only - CMainFrame(); - DECLARE_DYNCREATE(CMainFrame) - -// Attributes -public: - -// Operations -public: - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CMainFrame) - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~CMainFrame(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: // control bar embedded members - CStatusBar m_wndStatusBar; - CToolBar m_wndToolBar; - CToolBar m_wndToolBar1; - -// Generated message map functions -protected: - //{{AFX_MSG(CMainFrame) - afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_MAINFRM_H__57A6A22C_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.cpp b/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.cpp deleted file mode 100755 index f43f375f7a..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.cpp +++ /dev/null @@ -1,178 +0,0 @@ -// OCCDemo.cpp : Defines the class behaviors for the application. -// - -#include "stdafx.h" -#include "OCCDemo.h" - -#include "MainFrm.h" -#include "OCCDemoDoc.h" -#include "OCCDemoView.h" - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoApp - -BEGIN_MESSAGE_MAP(COCCDemoApp, CWinApp) - //{{AFX_MSG_MAP(COCCDemoApp) - ON_COMMAND(ID_APP_ABOUT, OnAppAbout) - //}}AFX_MSG_MAP - // Standard file based document commands -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoApp construction - -COCCDemoApp::COCCDemoApp() : OCC_App() -{ - SampleName = ""; - try - { - Handle(Aspect_DisplayConnection) aDisplayConnection; - myGraphicDriver = new OpenGl_GraphicDriver (aDisplayConnection); - } - catch (Standard_Failure) - { - AfxMessageBox (L"Fatal Error During Graphic Initialisation"); - } -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only COCCDemoApp object - -COCCDemoApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoApp initialization - -BOOL COCCDemoApp::InitInstance() -{ - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - - // Change the registry key under which our settings are stored. - // TODO: You should modify this string to be something appropriate - // such as the name of your company or organization. - SetRegistryKey(_T("Local AppWizard-Generated Applications")); - - LoadStdProfileSettings(); // Load standard INI file options (including MRU) - - // Register the application's document templates. Document templates - // serve as the connection between documents, frame windows and views. - - CSingleDocTemplate* pDocTemplate; - pDocTemplate = new CSingleDocTemplate( - IDR_MAINFRAME, - RUNTIME_CLASS(COCCDemoDoc), - RUNTIME_CLASS(CMainFrame), // main SDI frame window - RUNTIME_CLASS(COCCDemoView)); - AddDocTemplate(pDocTemplate); - - - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); - - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; - - - // Create result dialog - AfxInitRichEdit(); - CMainFrame* cFrame = (CMainFrame*) GetMainWnd(); - COCCDemoDoc* aDoc = (COCCDemoDoc*) cFrame->GetActiveDocument(); - - // pass cFrame->GetDesktopWindow() as parent to have an independent dialog - // pass cFrame as parent to have the result dialog always above the main window - if (!aDoc->GetResultDialog()->Create(CResultDialog::IDD, cFrame->GetDesktopWindow())) - TRACE0("Failed to create result dialog\n"); - - aDoc->GetResultDialog()->SetIcon(AfxGetApp()->LoadIcon(IDR_MAINFRAME), FALSE); - aDoc->GetResultDialog()->ShowWindow(SW_HIDE); - aDoc->GetResultDialog()->Initialize(); - - // resize the result dialog, so no clipping occurs when user - // resizes the dialog manually - // position the result dialog to the left bottom corner of the view - CRect aDlgRect, aViewRect; - aDoc->GetResultDialog()->GetWindowRect(&aDlgRect); - cFrame->GetActiveView()->GetWindowRect(&aViewRect); - - int x = aViewRect.left; - int y = aViewRect.bottom - aDlgRect.Size().cy; - int cx = aDlgRect.Size().cx+1; - int cy = aDlgRect.Size().cy+1; - aDoc->GetResultDialog()->SetWindowPos(NULL, x, y, cx, cy, SWP_NOREDRAW | SWP_NOZORDER); - - m_pMainWnd->ShowWindow(SW_SHOW); - m_pMainWnd->UpdateWindow(); - m_pMainWnd->SetFocus(); - aDoc->Start(); - - return TRUE; -} - -/* -///////////////////////////////////////////////////////////////////////////// -// CAboutDlg dialog used for App About - -class CAboutDlg : public CDialog -{ -public: - CAboutDlg(); - -// Dialog Data - //{{AFX_DATA(CAboutDlg) - enum { IDD = IDD_ABOUTBOX }; - //}}AFX_DATA - - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CAboutDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - //{{AFX_MSG(CAboutDlg) - // No message handlers - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) -{ - //{{AFX_DATA_INIT(CAboutDlg) - //}}AFX_DATA_INIT -} - -void CAboutDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CAboutDlg) - //}}AFX_DATA_MAP -} - -BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) - //{{AFX_MSG_MAP(CAboutDlg) - // No message handlers - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -// App command to run the dialog -void COCCDemoApp::OnAppAbout() -{ - CAboutDlg aboutDlg; - aboutDlg.DoModal(); -} - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoApp message handlers - -*/ \ No newline at end of file diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.h b/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.h deleted file mode 100755 index 180976da8a..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.h +++ /dev/null @@ -1,57 +0,0 @@ -// OCCDemo.h : main header file for the OCCDEMO application -// - -#if !defined(AFX_OCCDEMO_H__57A6A228_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_OCCDEMO_H__57A6A228_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#ifndef __AFXWIN_H__ - #error include 'stdafx.h' before including this file for PCH -#endif - -#include "resource.h" // main symbols - -#include - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoApp: -// See OCCDemo.cpp for the implementation of this class -// - -class COCCDemoApp : public OCC_App -{ -public: - - COCCDemoApp(); - - Handle(Graphic3d_GraphicDriver) GetGraphicDriver() const { return myGraphicDriver; } - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COCCDemoApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL - -// Implementation - //{{AFX_MSG(COCCDemoApp) - //afx_msg void OnAppAbout(); - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code ! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - - Handle(Graphic3d_GraphicDriver) myGraphicDriver; -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_OCCDEMO_H__57A6A228_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.rc b/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.rc deleted file mode 100755 index 352d2b678a..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.rc +++ /dev/null @@ -1,388 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" -#include "..\..\..\Common\res\OCC_Resource.h" -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "#include ""..\\..\\..\\Common\\res\\OCC_Resource.h""\0" - -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif //_WIN32\r\n" - "#include ""res\\OCCDemo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDR_MAINFRAME ICON DISCARDABLE "res\\OCCDemo.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" -IDR_TOOLBAR1 BITMAP DISCARDABLE "res\\Toolbar1.bmp" -IDB_OCCLOGO BITMAP DISCARDABLE "res\\occlogo.bmp" -IDB_OPENLOGO BITMAP DISCARDABLE "res\\logopen.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Toolbar -// - -IDR_MAINFRAME TOOLBAR DISCARDABLE 20, 20 -BEGIN - BUTTON ID_BUTTONStart - BUTTON ID_BUTTONPrev - BUTTON ID_BUTTONRepeat - BUTTON ID_BUTTONNext - BUTTON ID_BUTTONEnd - SEPARATOR - BUTTON ID_BUTTONShowResult - BUTTON ID_DUMP_VIEW -END - -IDR_TOOLBAR1 TOOLBAR DISCARDABLE 20, 20 -BEGIN - BUTTON ID_BUTTONZoomAll - BUTTON ID_BUTTONZoomWin - BUTTON ID_BUTTONZoomProg - SEPARATOR - BUTTON ID_BUTTONPan - BUTTON ID_BUTTONPanGlo - SEPARATOR - BUTTON ID_BUTTONFront - BUTTON ID_BUTTONTop - BUTTON ID_BUTTONLeft - BUTTON ID_BUTTONBack - BUTTON ID_BUTTONRight - BUTTON ID_BUTTONBottom - BUTTON ID_BUTTONAxo - SEPARATOR - BUTTON ID_BUTTONRot - BUTTON ID_BUTTONReset - SEPARATOR - BUTTON ID_BUTTONWire - BUTTON ID_BUTTONShade - BUTTON ID_BUTTONHlrOn -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MAINFRAME MENU PRELOAD DISCARDABLE -BEGIN - POPUP "&File" - BEGIN - MENUITEM "Reset", ID_FILE_NEW - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&Help" - BEGIN - MENUITEM "&About OCCDemo...", ID_APP_ABOUT - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE -BEGIN - "A", ID_BUTTONAxo, VIRTKEY, CONTROL, NOINVERT - "B", ID_BUTTONBack, VIRTKEY, CONTROL, NOINVERT - "F", ID_BUTTONZoomAll, VIRTKEY, NOINVERT - "F", ID_BUTTONFront, VIRTKEY, CONTROL, NOINVERT - "H", ID_BUTTONHlrOn, VIRTKEY, SHIFT, NOINVERT - "L", ID_BUTTONLeft, VIRTKEY, CONTROL, NOINVERT - "M", ID_BUTTONBottom, VIRTKEY, CONTROL, NOINVERT - "R", ID_BUTTONReset, VIRTKEY, NOINVERT - "R", ID_BUTTONRight, VIRTKEY, CONTROL, NOINVERT - "S", ID_BUTTONShade, VIRTKEY, SHIFT, NOINVERT - "T", ID_BUTTONTop, VIRTKEY, CONTROL, NOINVERT - VK_END, ID_BUTTONEnd, VIRTKEY, NOINVERT - VK_F11, ID_BUTTONShowResult, VIRTKEY, NOINVERT - VK_F12, ID_DUMP_VIEW, VIRTKEY, NOINVERT - VK_HOME, ID_BUTTONStart, VIRTKEY, NOINVERT - VK_NEXT, ID_BUTTONNext, VIRTKEY, NOINVERT - VK_PRIOR, ID_BUTTONPrev, VIRTKEY, NOINVERT - VK_SPACE, ID_BUTTONRepeat, VIRTKEY, NOINVERT - "W", ID_BUTTONWire, VIRTKEY, SHIFT, NOINVERT - "X", ID_APP_EXIT, VIRTKEY, CONTROL, NOINVERT -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 229, 170 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About OCCDemo" -FONT 8, "MS Sans Serif" -BEGIN - CTEXT "Copyright (C) 2003, OpenCASCADE Company",IDC_STATIC,42, - 106,145,8,SS_NOPREFIX - DEFPUSHBUTTON "OK",IDOK,90,132,50,14,WS_GROUP - CONTROL 142,IDC_STATIC,"Static",SS_BITMAP,50,35,129,62 - LTEXT "OCCDemo, OpenCASCADE 5.0",IDC_STATIC,64,20,101,8 -END - -IDD_ResultDialog DIALOG DISCARDABLE 0, 0, 244, 231 -STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME -CAPTION "Result Dialog" -FONT 8, "MS Sans Serif" -BEGIN - CONTROL "",IDC_RICHEDIT_ResultDialog,"RICHEDIT",ES_MULTILINE | - ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_NOHIDESEL | - ES_READONLY | WS_BORDER | WS_VSCROLL | WS_HSCROLL | - WS_TABSTOP,0,7,243,192 - PUSHBUTTON "Copy selection",IDC_CopySelectionToClipboard,0,206,60, - 18 - PUSHBUTTON "Copy all",IDC_CopyAllToClipboard,65,206,60,18 - PUSHBUTTON "Close",IDCANCEL,183,206,60,18 -END - - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "Open CASCADE Technology Demonstration Application\0" - VALUE "CompanyName", "Open CASCADE, France\0" - VALUE "FileDescription", "OCCDemo MFC Application\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "OCCDemo\0" - VALUE "LegalCopyright", "Copyright (C) 2001, Open CASCADE Company\0" - VALUE "LegalTrademarks", "Open CASCADE\0" - VALUE "OriginalFilename", "OCCDemo.EXE\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "OCCDemo Application\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_ABOUTBOX, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 222 - TOPMARGIN, 7 - BOTTOMMARGIN, 162 - END - - IDD_ResultDialog, DIALOG - BEGIN - RIGHTMARGIN, 243 - TOPMARGIN, 7 - BOTTOMMARGIN, 224 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE PRELOAD DISCARDABLE -BEGIN - IDR_MAINFRAME "OCCDemo\n\nOCCDem\n\n\nOCCDemo.Document\nOCCDem Document" -END - -STRINGTABLE PRELOAD DISCARDABLE -BEGIN - AFX_IDS_APP_TITLE "OCCDemo" - AFX_IDS_IDLEMESSAGE "Ready" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_FILE_NEW "Start demo a new\nReset" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_APP_ABOUT "Display program information, version number and copyright\nAbout" - ID_APP_EXIT "Quit the application\nExit" -END - -STRINGTABLE DISCARDABLE -BEGIN - AFX_IDS_SCSIZE "Change the window size" - AFX_IDS_SCMOVE "Change the window position" - AFX_IDS_SCMINIMIZE "Reduce the window to an icon" - AFX_IDS_SCMAXIMIZE "Enlarge the window to full size" - AFX_IDS_SCNEXTWINDOW "Switch to the next document window" - AFX_IDS_SCPREVWINDOW "Switch to the previous document window" - AFX_IDS_SCCLOSE "Close the active window" -END - -STRINGTABLE DISCARDABLE -BEGIN - AFX_IDS_SCRESTORE "Restore the window to normal size" - AFX_IDS_SCTASKLIST "Activate Task List" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_BUTTONZoomAll "Press to zoom the application objects in the view\nFitAll (F)" - ID_BUTTONZoomWin "Press and drag MB1 to select a zoom window\nZoom Window" - ID_BUTTONZoomProg "Press and drag MB1 to zoom\nDynamic Zooming" - ID_BUTTONPan "Press and drag MB1 to pan\nDynamic Panning" - ID_BUTTONPanGlo "Press and select a new view center t\nGlobal Panning" - ID_BUTTONFront "Press to select a front View\nFront (Ctrl+F)" - ID_BUTTONLeft "Press to select a left View\nLeft (Ctrl+L)" - ID_BUTTONTop "Press to select a top View\nTop (Ctrl+T)" - ID_BUTTONBack "Press to select a back View\nBack (Ctrl+B)" - ID_BUTTONRight "Press to select a right View\nRight (Ctrl+R)" - ID_BUTTONBottom "Press to select a bottom View\nBottom (Ctrl+M)" - ID_BUTTONAxo "Press to select axonometric View\nAxo (Ctrl+A)" - ID_BUTTONRot "Press and drag MB1 to rotate\nDynamic Rotation" - ID_BUTTONReset "Press to reset view\nReset (R)" - ID_BUTTONWire "Press to switch to wireframe mode\nWireframe mode (Shift+W)" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_BUTTONShade "Press to switch to shading mode\nShading mode (Shift+S)" - ID_BUTTONHlrOn "Press to switch to HLR mode\nHLR mode (Shift+H)" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_BUTTONStart "Press to go to the first sample\nFirst sample (Home)" - ID_BUTTONNext "Press to go to the next sample\nNext sample (PgDn)" - ID_BUTTONShowResult "Press to toggle show of source code on/off\nSource code (F11)" - ID_DUMP_VIEW "Save current frame into an image file\nExport view (F12)" - ID_BUTTONEnd "Press to go to the last sample\nLast sample (End)" - ID_BUTTONPrev "Press to go to the previous sample\nPrevious sample (PgUp)" - ID_BUTTONRepeat "Press to repeat the current sample\nRepeat sample (Space)" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif //_WIN32 -#include "res\OCCDemo.rc2" // non-Microsoft Visual C++ edited resources -#include "afxres.rc" // Standard components -#include "..\\..\\..\\Common\\res\\OCC_Resource.h" -#endif - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp deleted file mode 100755 index ae16d93428..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp +++ /dev/null @@ -1,243 +0,0 @@ -// OCCDemoDoc.cpp : implementation of the COCCDemoDoc class -// - -#include "stdafx.h" -#include "OCCDemo.h" - -#include "OCCDemoDoc.h" -#include "OCCDemo_Presentation.h" -#include "OCCDemoView.h" - -#include -#include - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoDoc - -IMPLEMENT_DYNCREATE(COCCDemoDoc, CDocument) - -BEGIN_MESSAGE_MAP(COCCDemoDoc, CDocument) - //{{AFX_MSG_MAP(COCCDemoDoc) - ON_COMMAND(ID_BUTTONNext, OnBUTTONNext) - ON_COMMAND(ID_BUTTONStart, OnBUTTONStart) - ON_COMMAND(ID_BUTTONRepeat, OnBUTTONRepeat) - ON_COMMAND(ID_BUTTONPrev, OnBUTTONPrev) - ON_COMMAND(ID_BUTTONEnd, OnBUTTONEnd) - ON_UPDATE_COMMAND_UI(ID_BUTTONNext, OnUpdateBUTTONNext) - ON_UPDATE_COMMAND_UI(ID_BUTTONPrev, OnUpdateBUTTONPrev) - ON_COMMAND(ID_FILE_NEW, OnFileNew) - ON_COMMAND(ID_BUTTONShowResult, OnBUTTONShowResult) - ON_UPDATE_COMMAND_UI(ID_BUTTONShowResult, OnUpdateBUTTONShowResult) - ON_COMMAND(ID_DUMP_VIEW, OnDumpView) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoDoc construction/destruction - -COCCDemoDoc::COCCDemoDoc() -{ - // TODO: add one-time construction code here - Handle(Graphic3d_GraphicDriver) aGraphicDriver = - ((COCCDemoApp*)AfxGetApp())->GetGraphicDriver(); - - myViewer = new V3d_Viewer(aGraphicDriver); - myViewer->SetDefaultLights(); - myViewer->SetLightOn(); - myViewer->SetDefaultBackgroundColor (Quantity_NOC_BLACK); - - myAISContext = new AIS_InteractiveContext(myViewer); - myShowResult = FALSE; - myPresentation = OCCDemo_Presentation::Current; - myPresentation->SetDocument(this); - - strcpy_s(myDataDir, "Data"); - strcpy_s(myLastPath, "."); -} - -COCCDemoDoc::~COCCDemoDoc() -{ -} - -BOOL COCCDemoDoc::OnNewDocument() -{ - if (!CDocument::OnNewDocument()) - return FALSE; - - // TODO: add reinitialization code here - // (SDI documents will reuse this document) - SetTitle(myPresentation->GetName()); - - myAISContext->EraseAll (Standard_False); - myAISContext->SetDisplayMode (AIS_Shaded, Standard_True); - - POSITION pos = GetFirstViewPosition(); - while (pos != NULL) - { - COCCDemoView* pView = (COCCDemoView*) GetNextView(pos); - pView->Reset(); - } - - return TRUE; -} - -void COCCDemoDoc::Start() -{ - myPresentation->Init(); - OnBUTTONStart(); -} - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoDoc serialization - -void COCCDemoDoc::Serialize(CArchive& ar) -{ - if (ar.IsStoring()) - {}// TODO: add storing code here - else - {}// TODO: add loading code here -} - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoDoc diagnostics - -#ifdef _DEBUG -void COCCDemoDoc::AssertValid() const -{ - CDocument::AssertValid(); -} - -void COCCDemoDoc::Dump(CDumpContext& dc) const -{ - CDocument::Dump(dc); -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoDoc commands - -void COCCDemoDoc::OnFileNew() -{ - OnNewDocument(); - Start(); -} - -void COCCDemoDoc::InitViewButtons() -{ - POSITION pos = GetFirstViewPosition(); - while (pos != NULL) - { - COCCDemoView* pView = (COCCDemoView*) GetNextView(pos); - pView->InitButtons(); - } -} - -void COCCDemoDoc::DoSample() -{ - InitViewButtons(); - - HCURSOR hOldCursor = ::GetCursor(); - HCURSOR hNewCursor = AfxGetApp()->LoadStandardCursor(IDC_APPSTARTING); - - SetCursor(hNewCursor); - { - try - { - myPresentation->DoSample(); - } - catch (Standard_Failure const& anException) - { - Standard_SStream aSStream; - aSStream << "An exception was caught: " << anException << std::ends; - CString aMsg = aSStream.str().c_str(); - AfxMessageBox (aMsg); - } - } - SetCursor(hOldCursor); -} - -void COCCDemoDoc::OnBUTTONStart() -{ - myAISContext->EraseAll (Standard_True); - myPresentation->FirstSample(); - DoSample(); -} - -void COCCDemoDoc::OnBUTTONEnd() -{ - myAISContext->EraseAll (Standard_True); - myPresentation->LastSample(); - DoSample(); -} - -void COCCDemoDoc::OnBUTTONRepeat() -{ - DoSample(); -} - -void COCCDemoDoc::OnBUTTONNext() -{ - if (!myPresentation->AtLastSample()) - { - myPresentation->NextSample(); - DoSample(); - } -} - -void COCCDemoDoc::OnBUTTONPrev() -{ - if (!myPresentation->AtFirstSample()) - { - myPresentation->PrevSample(); - DoSample(); - } -} - -void COCCDemoDoc::OnUpdateBUTTONNext(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (!myPresentation->AtLastSample()); -} - -void COCCDemoDoc::OnUpdateBUTTONPrev(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (!myPresentation->AtFirstSample()); -} - -void COCCDemoDoc::OnBUTTONShowResult() -{ - myShowResult = !myShowResult; - if (myShowResult) - myCResultDialog.ShowWindow(SW_SHOWNORMAL); - else - myCResultDialog.ShowWindow(SW_HIDE); -} - -void COCCDemoDoc::OnUpdateBUTTONShowResult(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myShowResult); -} - -void COCCDemoDoc::OnDumpView() -{ - for (POSITION aPos = GetFirstViewPosition(); aPos != NULL;) - { - COCCDemoView* pView = (COCCDemoView* )GetNextView (aPos); - pView->UpdateWindow(); - } - - Handle(V3d_View) aView = myViewer->ActiveViews().First(); - ExportView (aView); -} - -void COCCDemoDoc::Fit() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->FitAll(); -} diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.h b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.h deleted file mode 100755 index 0907c148c0..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.h +++ /dev/null @@ -1,86 +0,0 @@ -// OCCDemoDoc.h : interface of the COCCDemoDoc class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCCDEMODOC_H__57A6A22E_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_OCCDEMODOC_H__57A6A22E_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include -#include "ResultDialog.h" -class OCCDemo_Presentation; - -class COCCDemoDoc : public OCC_BaseDoc -{ -public: - CResultDialog* GetResultDialog () {return &myCResultDialog;} - Standard_CString GetDataDir() {return myDataDir;} - -protected: // create from serialization only - COCCDemoDoc(); - DECLARE_DYNCREATE(COCCDemoDoc) - -// Attributes -public: - BOOL& IsShowResult() {return myShowResult;} - -// Operations -public: - void Start(); - static void Fit(); - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COCCDemoDoc) - public: - virtual BOOL OnNewDocument(); - virtual void Serialize(CArchive& ar); - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~COCCDemoDoc(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: - void InitViewButtons(); - void DoSample(); - -// Generated message map functions -protected: - //{{AFX_MSG(COCCDemoDoc) - afx_msg void OnBUTTONNext(); - afx_msg void OnBUTTONStart(); - afx_msg void OnBUTTONRepeat(); - afx_msg void OnBUTTONPrev(); - afx_msg void OnBUTTONEnd(); - afx_msg void OnUpdateBUTTONNext(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPrev(CCmdUI* pCmdUI); - afx_msg void OnFileNew(); - afx_msg void OnBUTTONShowResult(); - afx_msg void OnUpdateBUTTONShowResult(CCmdUI* pCmdUI); - afx_msg void OnDumpView(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - OCCDemo_Presentation *myPresentation; - CResultDialog myCResultDialog; - BOOL myShowResult; - char myDataDir[5]; // for "Data\0" - char myLastPath[MAX_PATH]; // directory of lastly saved file in DumpView() -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_OCCDEMODOC_H__57A6A22E_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp deleted file mode 100755 index e16f537eba..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp +++ /dev/null @@ -1,552 +0,0 @@ -// OCCDemoView.cpp : implementation of the COCCDemoView class -// - -#include "stdafx.h" -#include "MainFrm.h" -#include "OCCDemo.h" -#include "OCCDemoDoc.h" -#include "OCCDemoView.h" - -#include -#include - -#define ValZWMin 1 - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoView - -IMPLEMENT_DYNCREATE(COCCDemoView, CView) - -BEGIN_MESSAGE_MAP(COCCDemoView, CView) - //{{AFX_MSG_MAP(COCCDemoView) - ON_COMMAND(ID_BUTTONAxo, OnBUTTONAxo) - ON_COMMAND(ID_BUTTONBack, OnBUTTONBack) - ON_COMMAND(ID_BUTTONBottom, OnBUTTONBottom) - ON_COMMAND(ID_BUTTONFront, OnBUTTONFront) - ON_COMMAND(ID_BUTTONHlrOn, OnBUTTONHlrOn) - ON_COMMAND(ID_BUTTONLeft, OnBUTTONLeft) - ON_COMMAND(ID_BUTTONPan, OnBUTTONPan) - ON_COMMAND(ID_BUTTONPanGlo, OnBUTTONPanGlo) - ON_COMMAND(ID_BUTTONReset, OnBUTTONReset) - ON_COMMAND(ID_BUTTONRight, OnBUTTONRight) - ON_COMMAND(ID_BUTTONRot, OnBUTTONRot) - ON_COMMAND(ID_BUTTONTop, OnBUTTONTop) - ON_COMMAND(ID_BUTTONZoomAll, OnBUTTONZoomAll) - ON_WM_SIZE() - ON_COMMAND(ID_BUTTONZoomProg, OnBUTTONZoomProg) - ON_COMMAND(ID_BUTTONZoomWin, OnBUTTONZoomWin) - ON_WM_LBUTTONDOWN() - ON_WM_LBUTTONUP() - ON_WM_MOUSEMOVE() - ON_WM_RBUTTONDOWN() - ON_WM_RBUTTONUP() - ON_UPDATE_COMMAND_UI(ID_BUTTONPanGlo, OnUpdateBUTTONPanGlo) - ON_UPDATE_COMMAND_UI(ID_BUTTONPan, OnUpdateBUTTONPan) - ON_UPDATE_COMMAND_UI(ID_BUTTONZoomProg, OnUpdateBUTTONZoomProg) - ON_UPDATE_COMMAND_UI(ID_BUTTONZoomWin, OnUpdateBUTTONZoomWin) - ON_UPDATE_COMMAND_UI(ID_BUTTONRot, OnUpdateBUTTONRot) - ON_COMMAND(ID_BUTTONWire, OnBUTTONWire) - ON_COMMAND(ID_BUTTONShade, OnBUTTONShade) - ON_UPDATE_COMMAND_UI(ID_BUTTONHlrOn, OnUpdateBUTTONHlrOn) - ON_UPDATE_COMMAND_UI(ID_BUTTONShade, OnUpdateBUTTONShade) - ON_UPDATE_COMMAND_UI(ID_BUTTONWire, OnUpdateBUTTONWire) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoView construction/destruction - -COCCDemoView::COCCDemoView() -{ - myXmin=0; - myYmin=0; - myXmax=0; - myYmax=0; - myCurZoom=0; - myCurrentMode = CurAction3d_Nothing; - myVisMode = VIS_SHADE; - myRect = new AIS_RubberBand (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0); - myGraphicDriver = ((COCCDemoApp*)AfxGetApp())->GetGraphicDriver(); -} - -COCCDemoView::~COCCDemoView() -{ - if (!myView.IsNull()) - myView->Remove(); -} - -BOOL COCCDemoView::PreCreateWindow(CREATESTRUCT& cs) -{ - // TODO: Modify the Window class or styles here by modifying - // the CREATESTRUCT cs - cs.lpszClass = ::AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC, ::LoadCursor(NULL, IDC_ARROW), NULL, NULL); - return CView::PreCreateWindow(cs); -} - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoView drawing - -void COCCDemoView::OnInitialUpdate() -{ - CView::OnInitialUpdate(); - - myView = GetDocument()->GetViewer()->CreateView(); - myView->SetViewMappingDefault(); - myView->SetViewOrientationDefault(); - - Handle(WNT_Window) aWNTWindow = new WNT_Window(GetSafeHwnd ()); - myView->SetWindow(aWNTWindow); - if (!aWNTWindow->IsMapped()) aWNTWindow->Map(); - - myCurrentMode = CurAction3d_Nothing; - myVisMode = VIS_SHADE; - RedrawVisMode(); -} - -void COCCDemoView::OnDraw(CDC* /*pDC*/) -{ - COCCDemoDoc* pDoc = GetDocument(); - ASSERT_VALID(pDoc); - // TODO: add draw code for native data here - myView->Redraw(); -} - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoView diagnostics - -#ifdef _DEBUG -void COCCDemoView::AssertValid() const -{ - CView::AssertValid(); -} - -void COCCDemoView::Dump(CDumpContext& dc) const -{ - CView::Dump(dc); -} - -COCCDemoDoc* COCCDemoView::GetDocument() // non-debug version is inline -{ - ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(COCCDemoDoc))); - return (COCCDemoDoc*)m_pDocument; -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoView message handlers - -void COCCDemoView::OnSize(UINT nType, int cx, int cy) -{ - CView::OnSize (nType, cx, cy); - if (!myView.IsNull()) - myView->MustBeResized(); -} - -void COCCDemoView::OnBUTTONBack() -{ - myView->SetProj(V3d_Ypos); -} - -void COCCDemoView::OnBUTTONFront() -{ - myView->SetProj(V3d_Yneg); -} - -void COCCDemoView::OnBUTTONBottom() -{ - myView->SetProj(V3d_Zneg); -} - -void COCCDemoView::OnBUTTONTop() -{ - myView->SetProj(V3d_Zpos); -} - -void COCCDemoView::OnBUTTONLeft() -{ - myView->SetProj(V3d_Xneg); -} - -void COCCDemoView::OnBUTTONRight() -{ - myView->SetProj(V3d_Xpos); -} - -void COCCDemoView::OnBUTTONAxo() -{ - myView->SetProj(V3d_XposYnegZpos); -} - -void COCCDemoView::OnBUTTONPan() -{ - myCurrentMode = CurAction3d_DynamicPanning; -} - -void COCCDemoView::OnBUTTONPanGlo() -{ - // save the current zoom value - myCurZoom = myView->Scale(); - // Do a Global Zoom - myView->FitAll(); - // Set the mode - myCurrentMode = CurAction3d_GlobalPanning; -} - -void COCCDemoView::OnBUTTONReset() -{ - myView->Reset(); -} - -void COCCDemoView::OnBUTTONRot() -{ - myCurrentMode = CurAction3d_DynamicRotation; -} - -void COCCDemoView::OnBUTTONZoomAll() -{ - myView->FitAll(); - myView->ZFitAll(); -} - -void COCCDemoView::OnBUTTONZoomProg() -{ - myCurrentMode = CurAction3d_DynamicZooming; -} - -void COCCDemoView::OnBUTTONZoomWin() -{ - myCurrentMode = CurAction3d_WindowZooming; -} - -void COCCDemoView::OnLButtonDown(UINT nFlags, CPoint point) -{ - // save the current mouse coordinate in min - myXmin=point.x; myYmin=point.y; - myXmax=point.x; myYmax=point.y; - - if ( ! (nFlags & MK_CONTROL) ) - { - if (myCurrentMode == CurAction3d_DynamicRotation) - { - myView->SetComputedMode(Standard_False); - myView->StartRotation(point.x,point.y); - } - } -} - -void COCCDemoView::OnLButtonUp(UINT nFlags, CPoint point) -{ - if ( !(nFlags & MK_CONTROL) ) - { - switch (myCurrentMode) - { - case CurAction3d_Nothing : - myXmax=point.x; - myYmax=point.y; - break; - case CurAction3d_DynamicZooming : - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_WindowZooming : - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); - myXmax=point.x; - myYmax=point.y; - if ((abs(myXmin-myXmax)>ValZWMin) || (abs(myYmin-myYmax)>ValZWMin)) - // Test if the zoom window is greater than a minimale window. - { - // Do the zoom window between Pmin and Pmax - myView->WindowFitAll(myXmin,myYmin,myXmax,myYmax); - } - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_DynamicPanning : - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_GlobalPanning : - myView->Place(point.x,point.y,myCurZoom); - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_DynamicRotation : - if (myVisMode == VIS_HLR) - { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myView->SetComputedMode(Standard_True); - myView->Redraw(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); - } - myCurrentMode = CurAction3d_Nothing; - break; - } //switch (myCurrentMode) - } -} - -void COCCDemoView::OnRButtonDown(UINT nFlags, CPoint point) -{ - if ( nFlags & MK_CONTROL ) - { - myView->SetComputedMode(Standard_False); - myView->StartRotation(point.x,point.y); - } -} - -void COCCDemoView::OnRButtonUp(UINT /*nFlags*/, CPoint /*point*/) -{ - if (myVisMode == VIS_HLR) - { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myView->SetComputedMode(Standard_True); - myView->Redraw(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); - } -} - -void COCCDemoView::OnMouseMove(UINT nFlags, CPoint point) -{ - // ============================ LEFT BUTTON ======================= - if ( nFlags & MK_LBUTTON) - { - if ( nFlags & MK_CONTROL ) - { - // move with MB1 and Control : on the dynamic zooming - // Do the zoom in function of mouse's coordinates - myView->Zoom(myXmax,myYmax,point.x,point.y); - // save the current mouse coordinate in max - myXmax = point.x; - myYmax = point.y; - } - else // if ( Ctrl ) - { - switch (myCurrentMode) - { - case CurAction3d_Nothing : - myXmax = point.x; - myYmax = point.y; - break; - case CurAction3d_DynamicZooming : - myView->Zoom(myXmax,myYmax,point.x,point.y); - // save the current mouse coordinate in max; - myXmax=point.x; - myYmax=point.y; - break; - case CurAction3d_WindowZooming : - myXmax = point.x; myYmax = point.y; - DrawRectangle (myXmin, myYmin, myXmax, myYmax, Standard_True, Aspect_TOL_DASH); - break; - case CurAction3d_DynamicPanning : - myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; - break; - case CurAction3d_GlobalPanning : // nothing - break; - case CurAction3d_DynamicRotation : - myView->Rotation(point.x,point.y); - myView->Redraw(); - break; - } - } - } - // ============================ MIDDLE BUTTON ======================= - else if ( nFlags & MK_MBUTTON) - { - if ( nFlags & MK_CONTROL ) - { - myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; - } - } - // ============================ RIGHT BUTTON ======================= - else if ( nFlags & MK_RBUTTON) - { - if ( nFlags & MK_CONTROL ) - { - myView->Rotation(point.x,point.y); - } - } - // ============================ NO BUTTON ======================= - else - { - myXmax = point.x; - myYmax = point.y; - } -} - -void COCCDemoView::OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_GlobalPanning); - pCmdUI->Enable (myCurrentMode != CurAction3d_GlobalPanning); -} - -void COCCDemoView::OnUpdateBUTTONPan(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicPanning); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicPanning ); -} - -void COCCDemoView::OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicZooming ); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicZooming); -} - -void COCCDemoView::OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_WindowZooming); - pCmdUI->Enable (myCurrentMode != CurAction3d_WindowZooming); -} - -void COCCDemoView::OnUpdateBUTTONRot(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicRotation); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicRotation); -} - -void COCCDemoView::DrawRectangle (Standard_Integer theMinX, - Standard_Integer theMinY, - Standard_Integer theMaxX, - Standard_Integer theMaxY, - Standard_Boolean theToDraw, - Aspect_TypeOfLine theLineType) -{ - const Handle(AIS_InteractiveContext)& aCtx = GetDocument()->GetAISContext(); - if (!theToDraw) - { - aCtx->Remove (myRect, false); - aCtx->CurrentViewer()->RedrawImmediate(); - return; - } - - CRect aRect; - GetWindowRect (aRect); - myRect->SetLineType (theLineType); - myRect->SetRectangle (theMinX, aRect.Height() - theMinY, theMaxX, aRect.Height() - theMaxY); - if (!aCtx->IsDisplayed (myRect)) - { - aCtx->Display (myRect, false); - } - else - { - aCtx->Redisplay (myRect, false); - } - aCtx->CurrentViewer()->RedrawImmediate(); -} - -void COCCDemoView::InitButtons() -{ - myXmin=0; - myYmin=0; - myXmax=0; - myYmax=0; - myCurZoom=0; - myCurrentMode = CurAction3d_Nothing; -} - -void COCCDemoView::Reset() -{ - InitButtons(); - myVisMode = VIS_SHADE; - if (!myView.IsNull()) - { - RedrawVisMode(); - myView->Reset(); - } -} - -void COCCDemoView::RedrawVisMode() -{ - switch (myVisMode) - { - case VIS_WIREFRAME: - GetDocument()->GetAISContext()->SetDisplayMode (AIS_WireFrame, Standard_True); - myView->SetComputedMode (Standard_False); - myView->Redraw(); - break; - case VIS_SHADE: - GetDocument()->GetAISContext()->SetDisplayMode (AIS_Shaded, Standard_True); - myView->SetComputedMode (Standard_False); - myView->Redraw(); - break; - case VIS_HLR: - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myView->SetComputedMode (Standard_True); - myView->Redraw(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); - GetDocument()->GetAISContext()->SetDisplayMode (AIS_WireFrame, Standard_True); - break; - } -} - -void COCCDemoView::OnBUTTONWire() -{ - myVisMode = VIS_WIREFRAME; - RedrawVisMode(); -} - -void COCCDemoView::OnBUTTONShade() -{ - myVisMode = VIS_SHADE; - RedrawVisMode(); -} - -void COCCDemoView::OnBUTTONHlrOn() -{ - myVisMode = VIS_HLR; - RedrawVisMode(); -} - -void COCCDemoView::OnUpdateBUTTONWire(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myVisMode == VIS_WIREFRAME); - pCmdUI->Enable (myVisMode != VIS_WIREFRAME); -} - -void COCCDemoView::OnUpdateBUTTONShade(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myVisMode == VIS_SHADE); - pCmdUI->Enable (myVisMode != VIS_SHADE); -} - -void COCCDemoView::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myVisMode == VIS_HLR); - pCmdUI->Enable (myVisMode != VIS_HLR); -} - -void COCCDemoView::GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const -{ - myView->At (theX, theY, theZ); -} - -void COCCDemoView::SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ) -{ - myView->SetAt (theX, theY, theZ); -} - -void COCCDemoView::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) -{ - myView->Eye(X,Y,Z); -} - -void COCCDemoView::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) -{ - myView->SetEye(X,Y,Z); -} - -Standard_Real COCCDemoView::GetViewScale() -{ - return myView->Scale(); -} - -void COCCDemoView::SetViewScale(Standard_Real Coef) -{ - myView->SetScale(Coef); -} - -void COCCDemoView::Translate (const Standard_Real theX, const Standard_Real theY) -{ - myView->Panning (theX, theY); -} diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.h b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.h deleted file mode 100755 index d8379b6bb5..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.h +++ /dev/null @@ -1,144 +0,0 @@ -// OCCDemoView.h : interface of the COCCDemoView class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCCDEMOVIEW_H__57A6A230_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_OCCDEMOVIEW_H__57A6A230_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -enum View3D_CurrentAction { - CurAction3d_Nothing, - CurAction3d_DynamicZooming, - CurAction3d_WindowZooming, - CurAction3d_DynamicPanning, - CurAction3d_GlobalPanning, - CurAction3d_DynamicRotation -}; - -class AIS_RubberBand; - -class COCCDemoView : public CView -{ -protected: // create from serialization only - COCCDemoView(); - DECLARE_DYNCREATE(COCCDemoView) - -// Attributes -public: - COCCDemoDoc* GetDocument(); - void FitAll() - { - myView->FitAll(); - myView->ZFitAll(); - }; - void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const; - void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ); - void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z); - void SetViewEye (const Standard_Real X,const Standard_Real Y,const Standard_Real Z); - Standard_Real GetViewScale(); - void SetViewScale(const Standard_Real Coef); - void Translate (const Standard_Real theX, const Standard_Real theY); - - -// Operations -public: - void InitButtons(); - void Reset(); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COCCDemoView) - public: - virtual void OnDraw(CDC* pDC); // overridden to draw this view - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - virtual void OnInitialUpdate(); - protected: - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~COCCDemoView(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: - -// Generated message map functions -protected: - //{{AFX_MSG(COCCDemoView) - afx_msg void OnBUTTONAxo(); - afx_msg void OnBUTTONBack(); - afx_msg void OnBUTTONBottom(); - afx_msg void OnBUTTONFront(); - afx_msg void OnBUTTONHlrOn(); - afx_msg void OnBUTTONLeft(); - afx_msg void OnBUTTONPan(); - afx_msg void OnBUTTONPanGlo(); - afx_msg void OnBUTTONReset(); - afx_msg void OnBUTTONRight(); - afx_msg void OnBUTTONRot(); - afx_msg void OnBUTTONTop(); - afx_msg void OnBUTTONZoomAll(); - afx_msg void OnSize(UINT nType, int cx, int cy); - afx_msg void OnBUTTONZoomProg(); - afx_msg void OnBUTTONZoomWin(); - afx_msg void OnLButtonDown(UINT nFlags, CPoint point); - afx_msg void OnLButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnRButtonDown(UINT nFlags, CPoint point); - afx_msg void OnRButtonUp(UINT nFlags, CPoint point); - afx_msg void OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPan(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONRot(CCmdUI* pCmdUI); - afx_msg void OnBUTTONWire(); - afx_msg void OnBUTTONShade(); - afx_msg void OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONShade(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONWire(CCmdUI* pCmdUI); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - void RedrawVisMode(); - -private: - enum VisMode { VIS_WIREFRAME, VIS_SHADE, VIS_HLR }; - Handle(V3d_View) myView; - Handle(Graphic3d_GraphicDriver) myGraphicDriver; - View3D_CurrentAction myCurrentMode; - VisMode myVisMode; - Standard_Integer myXmin; - Standard_Integer myYmin; - Standard_Integer myXmax; - Standard_Integer myYmax; - Standard_Real myCurZoom; - -private: - Handle(AIS_RubberBand) myRect; //!< Rubber rectangle for selection - virtual void DrawRectangle (const Standard_Integer MinX , - const Standard_Integer MinY , - const Standard_Integer MaxX , - const Standard_Integer MaxY , - const Standard_Boolean Draw , - Aspect_TypeOfLine theLineType = Aspect_TOL_SOLID); - -}; - -#ifndef _DEBUG // debug version in OCCDemoView.cpp -inline COCCDemoDoc* COCCDemoView::GetDocument() - { return (COCCDemoDoc*)m_pDocument; } -#endif - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_OCCDEMOVIEW_H__57A6A230_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/ResultDialog.cpp b/samples/mfc/standard/10_Convert/src/WNT/ResultDialog.cpp deleted file mode 100755 index 90d6ab9421..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/ResultDialog.cpp +++ /dev/null @@ -1,206 +0,0 @@ -// ResultDialog.cpp : implementation file -// - -#include "stdafx.h" -#include "OCCDemo.h" -#include "ResultDialog.h" -#include "MainFrm.h" -#include "OCCDemoDoc.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -// minimum distance between buttons, button and dialog border -#define d 5 - -///////////////////////////////////////////////////////////////////////////// -// CResultDialog dialog - - -CResultDialog::CResultDialog(CWnd* pParent /*=NULL*/) - : CDialog(CResultDialog::IDD, pParent) -{ - //{{AFX_DATA_INIT(CResultDialog) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - -void CResultDialog::Empty() -{ - CRichEditCtrl *pEd = (CRichEditCtrl *) GetDlgItem (IDC_RICHEDIT_ResultDialog); - pEd->Clear(); -} - -void CResultDialog::SetText(LPCSTR aText) -{ - CRichEditCtrl *pEd = (CRichEditCtrl *) GetDlgItem (IDC_RICHEDIT_ResultDialog); - CString aCStr(aText); - pEd->SetWindowText(aCStr); -} - -void CResultDialog::SetTitle(LPCSTR aTitle) -{ - CString aCStr(aTitle); - SetWindowText(aCStr); -} - -void CResultDialog::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CResultDialog) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CResultDialog, CDialog) - //{{AFX_MSG_MAP(CResultDialog) - ON_BN_CLICKED(IDC_CopySelectionToClipboard, OnCopySelectionToClipboard) - ON_BN_CLICKED(IDC_CopyAllToClipboard, OnCopyAllToClipboard) - ON_WM_SIZE() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CResultDialog message handlers - -void CResultDialog::OnCopySelectionToClipboard() -{ - CRichEditCtrl *pEd = (CRichEditCtrl *) GetDlgItem (IDC_RICHEDIT_ResultDialog); - pEd->Copy( ); -} - -void CResultDialog::OnCopyAllToClipboard() -{ - CRichEditCtrl *pEd = (CRichEditCtrl *) GetDlgItem (IDC_RICHEDIT_ResultDialog); - long nStartChar, nEndChar; - pEd->GetSel (nStartChar, nEndChar); - pEd->SetSel (0, -1); - pEd->Copy(); - pEd->SetSel (nStartChar, nEndChar); -} - -void CResultDialog::OnCancel() -{ - CMainFrame* cFrame = (CMainFrame*) AfxGetApp()->GetMainWnd(); - COCCDemoDoc* aDoc = (COCCDemoDoc*) cFrame->GetActiveDocument(); - aDoc->IsShowResult() = FALSE; - - CDialog::OnCancel(); -} - -void CResultDialog::Initialize() -{ - // Set Fixed Width Font for rich edit control - CRichEditCtrl *pEd = (CRichEditCtrl *) GetDlgItem (IDC_RICHEDIT_ResultDialog); - CFont aFixedWidthFont; - VERIFY(aFixedWidthFont.CreateFont( - 15, // nHeight - 5, // nWidth - 0, // nEscapement - 0, // nOrientation - FW_NORMAL, // nWeight - FALSE, // bItalic - FALSE, // bUnderline - 0, // cStrikeOut - ANSI_CHARSET, // nCharSet - OUT_DEFAULT_PRECIS, // nOutPrecision - CLIP_DEFAULT_PRECIS, // nClipPrecision - DEFAULT_QUALITY, // nQuality - FF_MODERN, // Fix width fonts are FF_MODERN - L"Courier New")); // lpszFacename - pEd->SetFont(&aFixedWidthFont, false); - - // save button's width and height, so they are calculated only once - RECT rect; - CWnd *pBCopy = (CWnd *) GetDlgItem (IDC_CopySelectionToClipboard); - pBCopy->GetWindowRect(&rect); - bw = rect.right - rect.left; // a button's width (they are all equal) - bh = rect.bottom - rect.top; // a button's height -} - - -// OnSize is a message handler of WM_SIZE message, -// it is reimplemented in order to reposition the buttons -// (keep them always in the bottom part of the dialog) -// and resize the rich edit controls as user resized THIS dialog. -void CResultDialog::OnSize(UINT nType, int cx, int cy) -{ - // call the base class handler - CDialog::OnSize(nType, cx, cy); - - //resizes internal GUI controls (rich edit control and 3 buttons) - //according to given values of this dialog width (cx) and height (cy). - //the method is called from OnSize message handler and - //from InitInstance of OCCDemo to do initial resize - CWnd *pEd = (CWnd *) GetDlgItem (IDC_RICHEDIT_ResultDialog); - CWnd *pBCopy = (CWnd *) GetDlgItem (IDC_CopySelectionToClipboard); - CWnd *pBCopyAll = (CWnd *) GetDlgItem (IDC_CopyAllToClipboard); - CWnd *pBClose = (CWnd *) GetDlgItem (IDCANCEL); - - if (pEd != NULL) // it is NULL when dialog is being created and OnSize is called - { - int butY = cy-bh-d; // y coordinate of buttons' top left corner - - pEd->SetWindowPos(&wndTop, 0, 0, cx, butY-4*d, SWP_NOMOVE); - pBCopy->SetWindowPos(&wndTop, d, butY, 0, 0, SWP_NOSIZE); - pBCopyAll->SetWindowPos(&wndTop, d+bw+d, butY, 0, 0, SWP_NOSIZE); - pBClose->SetWindowPos(&wndTop, cx-bw-d, butY, 0, 0, SWP_NOSIZE); - } - - RedrawWindow(); -} - -LRESULT CResultDialog::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) -{ - if (message != WM_SIZING) - return CDialog::WindowProc(message, wParam, lParam); - - LPRECT pRect = (LPRECT) lParam; - int cx = pRect->right - pRect->left; - int cy = pRect->bottom - pRect->top; - - int minCx = 3*bw+5*d; - int minCy = 2*d+bh+200; - - if (cx < minCx || cy < minCy) - { - switch (wParam) - { - case WMSZ_BOTTOM: - pRect->bottom = pRect->top + minCy; - break; - case WMSZ_TOP: - pRect->top = pRect->bottom - minCy; - break; - case WMSZ_LEFT: - pRect->left = pRect->right - minCx; - break; - case WMSZ_RIGHT: - pRect->right = pRect->left + minCx; - break; - case WMSZ_TOPLEFT: - if (cx < minCx) pRect->left = pRect->right - minCx; - if (cy < minCy) pRect->top = pRect->bottom - minCy; - break; - case WMSZ_BOTTOMRIGHT: - if (cx < minCx) pRect->right = pRect->left + minCx; - if (cy < minCy) pRect->bottom = pRect->top + minCy; - break; - case WMSZ_TOPRIGHT: - if (cx < minCx) pRect->right = pRect->left + minCx; - if (cy < minCy) pRect->top = pRect->bottom - minCy; - break; - case WMSZ_BOTTOMLEFT: - if (cx < minCx) pRect->left = pRect->right - minCx; - if (cy < minCy) pRect->bottom = pRect->top + minCy; - break; - } - } - - return CDialog::WindowProc(message, wParam, lParam); -} - diff --git a/samples/mfc/standard/10_Convert/src/WNT/ResultDialog.h b/samples/mfc/standard/10_Convert/src/WNT/ResultDialog.h deleted file mode 100755 index 688fb14bb2..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/ResultDialog.h +++ /dev/null @@ -1,67 +0,0 @@ -#if !defined(AFX_RESULTDIALOG_H__6597303D_7F5B_11D5_BA4D_0060B0EE18EA__INCLUDED_) -#define AFX_RESULTDIALOG_H__6597303D_7F5B_11D5_BA4D_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// ResultDialog.h : header file -// - -#include "resource.h" -#include - -///////////////////////////////////////////////////////////////////////////// -// CResultDialog dialog - -class CResultDialog : public CDialog -{ -// Construction -public: - void Initialize(); - CResultDialog(CWnd* pParent = NULL); // standard constructor - void SetTitle(LPCSTR aTitle); - void SetText(LPCSTR aText); - void Empty(); - -// Dialog Data - //{{AFX_DATA(CResultDialog) - enum { IDD = IDD_ResultDialog }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CResultDialog) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CResultDialog) - afx_msg void OnCopySelectionToClipboard(); - afx_msg void OnCopyAllToClipboard(); - virtual void OnCancel(); - - // OnSize is a message handler of WM_SIZE message, - // it is reimplemented in order to reposition the buttons - // (keep them always in the bottom part of the dialog) - // and resize the rich edit controls as user resized THIS dialog. - afx_msg void OnSize(UINT nType, int cx, int cy); - //}}AFX_MSG - - DECLARE_MESSAGE_MAP() - -private: - int bw, bh; // button width and height - -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_RESULTDIALOG_H__6597303D_7F5B_11D5_BA4D_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/StdAfx.cpp b/samples/mfc/standard/10_Convert/src/WNT/StdAfx.cpp deleted file mode 100755 index 24876baa40..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/StdAfx.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// OCCDemo.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - diff --git a/samples/mfc/standard/10_Convert/src/WNT/StdAfx.h b/samples/mfc/standard/10_Convert/src/WNT/StdAfx.h deleted file mode 100755 index 43eaa4062d..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/StdAfx.h +++ /dev/null @@ -1,41 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if !defined(AFX_STDAFX_H__57A6A22A_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_STDAFX_H__57A6A22A_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -//#include // MFC support for Internet Explorer 4 Common Controls -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - -#pragma warning( disable : 4244 ) // Issue warning 4244 -#include "Standard_ShortReal.hxx" -#pragma warning( default : 4244 ) // Issue warning 4244 - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_STDAFX_H__57A6A22A_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/res/OCCDemo.ico b/samples/mfc/standard/10_Convert/src/WNT/res/OCCDemo.ico deleted file mode 100755 index 99dbceb637ed9b2f5faa709d3ec109868688f6dc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3774 zcmeH~v1=Sh6o;QUfkjp%2!Sdsv4$<8&U;hb3IqoA!p0!b7O_&zzn~_NBY~?00l{2j z6-kJTG%8Y^;P62TYig;9LO_K<97O5_F`9gD&T&E4$V`Q3Z-zIih%Rw5I8 z9z2lLe*RQsj=L}DDt$$tkSVSr?N5?<&!x?e$nEyXaOGC|{l4^n@5|}SpJZ}!Ql_S+ zWO{m9W@ct&Zf;KI=jX*3Ba4fRvbMG+tE;QBva%veOH0!JI?Ch6QNEW0iNhej9sDH+ zuU^U4^Iu40>5lH{VKlU87R{nr)#Av-p*wVk?$8~&hIw?4?iqM=kB*Um9?%1NKnUoO zabz4r%51q>@>?dd1X+oa(sQveSQsn}7KVfbgN4DuU}3N@Bup4A3>F3pgM}fX!(d^s zFjyEY3^t;{Vd1dK5o4+V3RXX!9_Z-0WLO-@9f=&1I#^N}_|b9WU~#advcTcsaBw&{ z92}`sa5xwo3=Re@orA-{;9v;kid<6($us&ePUY3=Kt*nkS1L8RJxrdYo&+8yPj1hT zo=H5pJ-O3%q}=G__vH8F*Ddno_teJ2;9>C8LAQ;nq}8Kfx#~7jgFwCjTYw{wFKw-I zP=f$RP!1NBwws^;OMoQ+5lEPh04#yPfKxySu<)fb4|@_|30jZDqNhQ30S$%-Lxds1 z5MhWgq~iobfFZ&VVF)lV4IO_NA`B6R2m@2o(P4-%L>M9fk^F(lB7qSn#~hBagCnN7 z)yK(#{3sh68?w2%DVgcZBRp7%_VD_>ZvtpL>JuUM^w#bX(S(x_Z)c)o2}C1*-hO=%4T_UXFN0TZ!x{}%7VWFw`i4--Ywj> z%HrnB?PXb>o1B2zo20;5@Yj}S<05)laxRKSQD}hq{|s6~((xL`OK!@ttg7|8I~WX}JzFP$GnWfjQ#7)?QvW|V z@mZD`Qvy|%tK_u_S^2S^`Tr`maT}L;w<4!qE~8K8FOBaP&E(xI|+K zM@ty^91>W<(dUrj5{)GsEn(nuNMH#^pF@gEG?s9*gn`c?fh8P$4k<3tSi;c~20n)b zmT>erq_{-m>eVF~EJ@(Mm%tK^{(BiNQQ-5JaI}Pi&mn;&9DNQcF40)R(GmtehXg(e zMl5S9i}}QF=>l7E0h# zaD=kF7Cv7(EJfymbyiMZT4qjlb=@SjlKwB-N0dA{ePlf}>wEI@K#2VJj$^@tdABIW z?&qZv&Ul#IN#cSB;&r^|k$5&rjq>--0(cQ7>=zgkn~*XwMI1>cwb|L(y!_%9ubr%K+1NaM8W0@b-P=c= z3Z<4`RN~_w7#0x?4^+IC{Gw9dfS~ZGn8D!@q}Mh!`vwGtMMm}a53+2mPqK3J{QLuh zLZkWzhmkHc7Wv%KvH0Y)C(mAAzlnOE_y>i-EujVH`Z6^m+b=LQAS5CvGy>uVI44*$VJRFyh^!VA!>$h!eY@d4h z1=ZCz3bNr3>8CjcatjN+N!w#axnnHPC!9YGN0gV+S^g&15JgMtuEm`+fDgAAeoG zUtVc&g!DX)-oC!e*0(lo+x7cuiDfI+{I+WC>UA4b)sMv`rmze+U%7tk$7L&a?3QV4 zf~K82u3F#z>9-X-_Q=%KH6Yc)+yB?)tGDjlTUcC1Gm+k?Z*1NzBe#6@I*E>(wdIo0eHg6-mtz3(GSFM*+R5=t76h`xq6Z&4y$Q+EVUcU(xZ~^{*UnQ}8&ARV@ z{r$4lO_pGT42+c|ONk~pTq@}xd<5tl5 zZN=JUt5NSpDOq`|n|CX#Yem^mH6woI`i&o!t=PI#s=1|A^prjN`12>>h%&$%;PcOy zxBO^y-Xkb9E-5uPzo>6uK)~C_Gw`9DUOxT+%Z4pGvh(s;UM7I-+=A`9_epNqE`2~z z=2b5F|Of57tbtE?v0B+kU zg-Mywym|M*@-^%C?N@AUX+w%g#@4s*uUNZYT26^|m#<&&s&yOo$Q&pwt7HYy!xt`J zTfLrexOLaQ%4&uqer|r@UKzQS5|R=dwkoQq8=IdxqNTTK+n&|yHm=>U*@fdFXbYcj zdgAO_$xYk$NP&O#!W@q8dea^$nJ7AT>M#(KZ zvvUcKP^kzNMHY8-vE9?R@fSe*3{nF&z2$2VrdQm6aHB6M93Hs zbi}7|C05D<`bc8K2H+@1ppRH5XXh4e+al>Po2pjl*T7q2oniwOGo24KcnA+f>s@pG1FYH?=8nsrCD z^@fH8q7!9i7pKo%hW6aFZFfRaDobIln4Fr@);A`K6{w{1sr`#LFaR*$xq135AOh2G z?S?HIx9yINPr@VMNF)mD+xO6RDOrV<7KS6ylLa*1cl*b2M5ytIOM(Lca69C5kRsz4?Vj z#D-eG(f09+xkprj6;;)K0l|$;&C@faDb{yvFtBCh4tCDB=5O2BtysHG=D@+adV(Ww zzu-0NH|~~}D=n|Wt^JGFm~J-j*rlm$uzC9~f}gm&#* zn-Q=zG_kU zT}k~2RGXgh31LqDYX_Gfe_a73wMr6p*_O4Nwnaq8v!_fHlao`1W)?vGmYsVuvU5cR z|LDaZ#}Qh=8bVbPZ;Z!x9-R93ofoDz?2?i*l9JQlzrgzZql~;OKf%%Zcj_Y;CK%g4 zEnD%^@2h_KedW);ulVV=r>>m|CE= zY{lwdeqZ(TZy>euC%8tEn=y>{$zfh2ZV?;*07z9$1aBk2+gHKJLICB9V3#~LTNP-7sURw(s=`YYnEMie!S+jkQG!)j2+cv@` zF!7VS(y|H|W#IDZi#P3^-SW!nD_5^GJ9S=|lOGxpqjp5=n69Cgu923m@o_z)^lau@ z2#8>&UbkT@+!YKs0~7NR?x?8jAG)}Do4J~27J zplB|yxUuTg(($3e9tW)^3R%q)z|P8yn@!r92|RDDx3GAE~| zV-NyI9$tQ|EZ7wYP@EQ@5Bmr+6#7KR&=kHEBVuZC`hcRc#D*=>1V?mU^M}8-QSPAX z!$;4z?UI5QZu9UlC08Wb>j|Oxe2J36j2G?Usc;g64Hy%t#PXd(Xum*GC`*a4=3NQ@jZt&u4V@2Yc6} zS8gOHrzR$+*VQ*nO-;?U_dN`J=+WG~CiMGR388(o`L&}fY@CV7sfo$y@yTgyKES~` zp}M9HgL&mT$!pekg!KrR!mLzQUX7?DHRgaLo8@aI;jc9`wm@Z2YE#$}bK~{{^x?k! z2kROLFui?)0Zia!`)(;%(u&F&UEL%)ijWYLCc1-7WS9_v6wDQ25mBsOq5|oVYH4lT zBP|CVYIf?}Gj_N>vDQg_<>qn?%-Z*&i#t9X{ppQu)*0br! zv(SUE@|s)QS-qk&qQtEoof8w2SWy>&3eE6^7sk>8|tHteAGcH*OpjvIF#u3WQD zq>p_3gC#a@+q7*b95kpeM4(wt|DaGX2^=vy8&RaqJNCf;KBA?IIE08Ans)br-5SZw ztJZDec>A(+6N_^&e-0lPFUhPjHn`lXwl8PFBZemAL@CUnVcfV_!6!mdrn=Bi%*71s;sIVpO`?!jEg@+v%IP{ zCO#=XDJ?N2^XA=$Pyy&82Pb#G zaj76qh;+oB;AAPQYrIt^!bGX9Z-RLoaiWV?uR|==wGFB1S*OokL@)p*xR#Fo==eA?4-O6;I;w@7 zyZ0R^s}Mx8V9G;LVxUAu#WI2)e_jkn;-x(1Dp#Q&-Qj!J_$P`6`$RjZGw0NoH<( zT(w5}YFIk(n~>n?6M%wi(J8y7%Bbtl#))rW&@w#OvJ>G1RuEA{7+HYQiZvTx!Xh?+ zCct>XPeDn&q_l!%Lp5-(VAHE$+UgS^i@-<70Lup5v4eVTC@#5q+a?m9-UO=(=bLx$ z!{ve4Q8BS_;tr}E78)1i38L&TUprxO0`aD8yQOzY z$sSZWeEXiQXl7xx+t@xitf_U`>K5_~XwC-_(@G`f6=yB4$SSC8-zx(YBmAtRXN(2v zX~Di`Qiheog7$+)_K?!9eFsqQPK4i;)GuDOsuZmK@vCd=RWvlw3LSkDm>-M{R`~gA zCzw}K`wzZ$auqaB)JQ?T#s64ceLJ0&q^GIr;lYvij_y{NhfOU#ZSB2XUA_JNBjaOm z1VjaqmD;sD?kxYs$n1~y9BGS-;n9dDC6`rJj|wB)qWtf<04e;iG}hhI-`(5aLx1#Q zpr?1Br*D8IVgiRXjHkGrdx{L?*ALs5F3+O_SRarIK^9&(R^{>wO3)(41Fa4x{?G_& z#1?`98kS@Q$$5BW6hU#=I3%6N8yla%T~|;4jL`f*!*Ps{k9T+XB4~wP#VvDVSrxvB&5*quvojO}IMGDGS->QN2fb-+@60bOhWS}lQ^z8xNTx9i zK}l8|iC7fD@M91(57wV?Fr%w>rgltfZ)`E6*_w+)5IMXhs5)zes z_k|USZXq*J!HVFFqjP-Pqhsh)d5dOtxkhZJMp)u;zwldr;r=m+MR|p_m9?bClj;YyKgR?)o25mAr9T*ms5SNrySlrhSLum;|Um${5lZ19QwRU*i z8NOZjLPyO1YagTfBOaNxY)$Z^o+9d^4@_#9$PGf%Hr|hvo(%R2KP_g?wVGq?Ec9o z_Sk07&tvnFtk6i|nZ{MSe@| zU=p}W<~61xMrZl=yGFmZer)IHmX(&7kz3H&3BP7Bn}#>rGBFi6FnOk9QYy3RpH{Z} z&R*j91SF?q=4Edgk*_}LRew< z!c?(aVUox{T#%EsW5M}-T2J^4bcC04rG>RE+U&V(OIHgdAeh&P_!_Y(EwASHQ`Z8a zT@q3XOUgz@7T;OLXiU%Ya=24Z`li%tdjIpvdztw;n^!KW*r}bJ+tSiHIX>1rG5ffG zW*H}RjowKwzhLONf`a1SzJ6xVqYtTZkIp3hNqSZ2HiEvWKcU)?jXhaEi9 z?257W&NCy$N>O*2P@t8QBA_hvze!cBB1TL6nx!nA#U(&-M1;oY*U$2gCKgCqTnUSg zk4s3wTJ;27*bvVyx)$|X$MkH-!1S4p@m~XzzA-#={n4}d_@s=Cocj6(>|m`NpSJ3m z{N^cVhv`}GkcilL0?$6WUjn4ilfV>#!~BDGB0UK^lW|A@M-j$u=NF<679_oO%gU2V zg~%0w=&ihS38;>8vuL$*+5XB`OdnAxVYB$rlp+bUOTn;=6H>4R`CT|db~c!qU?*mH z$s@Cud#Bb!XMbgQ=BlkdR>u<4bE@ka0Ga#=o<%G7n_ExzpRf!Ji-n5^gbs7ZD17F6 zW@>U`VtjmZViJo}qEyj^po;(l?1F%mH9a*xJ&mZ~*!cL^#027&V0B(-6gd|=#8btu zSzfS&@Fr;Dm>dIH?D7~FC%YKQr8FV|F@1y;W9_WU)n=Cd*hd(jR8&$1IW8(C^nmye zcT=;x+_9OvebbwgivE4#%E`O7aghnh=^0g3HSN6v(WCss)g51*yQ6dCUPKgjcBYnA z)r^gd%*@WzaHo80n?mzTa|%k!ic702s~Vb{+IxGkotlTWIaus4&Bw>FZy%xD;@XCS zimIxzit_UEvf{Gx;_|Yxii*k_MEt9(sv8=chDJu%q`4^DWH-*_#K_(sIROpFDff8C@IV-z)@6IR^QSJ%q~uIDV0h+md1+LOLl%4#D5bao(H3*_|0>e>bxPErN43_H#_<%zH+_c=oK0gm6w`PR)DB^ zb#;AnctiWO@@CE4YPs~XZLxXV{bLlJeJmW^pSpN@1q5><;#?yVI3ZDC;jwWs@ySUk zB_(C8Ep2!MYHFHjJiuydYGwkOYjhMF#iE-!ZBla`Ln0$1VpCJGDWSTh14n0jLvv$g zOO-|{R_^gvLsm8&v7hHYqoIL|VBO~JybBjx%oM>a0PK!uDOdnyuz3ChO`r@4% zFB}u`vP)(zK1%bB`C%R<(Wpk|#_^da1JfJR%m0trWk4w=A}%H+vl@}gz9CO8e_v+B z-%Tw~+1SNJ$E0QFW{*x??;PD&(=AcbzAUG1S#dC#h%mLF2fzVnTha1GiSlP#HDxgw!Z!Y69CgSWb)x0!>xofF5; zKO{ab3GbI++bPy08}JTDdq;n7Z$;m*Mf1q7$tAzO@!Ed#@r5UEg8U;g;*!!cvO8*0XDkeTLE-9_9u0iyftoKU^HVxHDL{n8y%-Rm{HY64QOaIIj+h=jn zN%1LZRW&u016+rp*}a+N|2b`?Z+$yDDkh=4?s?akQ8QPqVR(1r@XETu<>ehK(kp(< ztogdM^L;(;9;uY_g%U|Xxo7c$9M1asd!`DnJ{ng-+e4>f50?m z9uRWE1h0k1-!rv3I_q2gQ#b8jCqyTvq-WIC*H;XTxD4~9b8G%_+DiM{?TE0*khm1j zyox6^ofdUH2Wol_)eo38bB{ERNYxK)uIXDIohAF|_30OmcV2n9c?SeV$0y_zX0~?Q zcTGw(^slV$k*w-olUTSbBK=5Zhi=D&LNj-3N$c;iIp4kXleDrkv$1n@_YMn+NQg&h zE30~dYuhuvs;qNWMfb*rA=%2Fb?KGAWmj*g9@>gE#HgHA-jT-wVy=ZJ+9hN>NzZ*& zSaBn#+&UmKEG`Ll5|rAM*cZdzFO$F8Q=vYh`UE?z`7gVM0Wd8;`t??y-*7gp8 zs(H6$1lAFPFG5QRDK+D~`vbGT`$YewZT7^~BO*32D>J9Hsi}5k!f}ANE2riw(~A~2 z?*U55QL$;6*+u2G1vSluO>H@y{qCJ3XWO{S^+PKXOIDq+I&tBO^BYGGPru~EjM9?Q zhVDMA_7REFcI_svT>Ze$zVUm_&Rn;Bb~`5By14#!$EZoim{d*gs<^^$pL?voZKrMX z_^G3NuuniIkv zcY{MBViFUw^NQN)n+E%OCr8J)W0S=rQ_kI!IxXB^!;=54f5P(qBUn8#F$pCVl~rTY zs(Do!t|5UfeUFED+p=r_X>!W&+$C2>cVGXoxXi+!x=!0R?#cGC1GW8Y(kj1k@?U+^ z_JqBYe`1E;;Pj6Cx*twmJ$=Rc4afI!Zu#lr<}0arVVQY#m3190tsUJx14F}zCBQTv z2PdOrLqqru#~AkTz18YZOn{{E2FE89ez*KTf!Jp*BG5-97|7VfmmY4mbH6@qedX!1 zgv69YsH8Sn+vMR#wgcH_NM0U7L~+Bj1}%gCbM2wh=}RHl+Ln+~UQvn70Tml>cWYOiL0up9mo5Kv%IP4naRnC>FG%<>P%0N&&w@1 zCPqhF5e^9P&GdMk?fyE?*SRt_yr;en`2{&icvB!H_E&hvpBfu&D=jPx_R4a77XRo@ zjNQ$Y*AH`jTwC(9$A<*lX$cX05NLdSYGPtqIDvu!eL0780K=Y0Cn9BHcxY^RXnbUN za*Rt?H7O0Gb4Mmd@Z*B#$9<+&{FZk&>d+c%w7C zs1d$gant{txNLswK3>a9NKLD(t(zR>wvA6a4@@7a8~D#_-_@oU?!0hJh)>MT$}O)! z^m1sHZhgaM-t>_f!}f`<9y#tdJmKLN>ip_edTHtT>W*)Y=pI`C%N;|V$dL)9viASz zpOxOa-eB8mYc16X=hq{BJ-o@On5Pe3IljDAR)4N%O0#`pXKnwc+Clh+U!T0HZFx03 zECw%b57OZJP-lCj%|*ZShCvsNf-jl)p4BT36TI>UIS=>tl!SQ)Uoq$CDZ6U#ch!+~ z*WT}}CGDiMpJSpHa_wYkOeh3TdW7}~9h5}5;{Z6zV?%>37`y4qyBy!|tSRGkOvX)H z&RJ`}qo$0zu6)25oeZZZy^XcJ>6u(lNB^_B0p|_4S%uP)uYVEZgJDJ?ZEtGT7^kA!te+rc0kKLgWz*P+=h z$;JQFHoyMNAu=XDBO|v3Yq^t?{S(u^gOf&W+~2~}zPa*1{f3>ZcR*TddI5H!G`98+ z3?jVUKROXT#y?Qf^tIu617lm{^!aA<-I!%*8LI?5Ma;c{pE{jt58 zNiQC}KD5I_U%^#R&dor<;mF>YM>ik}48_7AZ?99woiz91k-LeCyNRl&sj9b`x|gxK zhp~o-k+Pefywg$X;7exBB?Tw~Hv?yaC#n~sA76Jqx{sqL?_sLuX`^D!Y$uT_0F*xXMaL`F}Z}>e+r04oLztY&@qA$l!(3{~Tv-0Z3-BZS1%T*5P(SBH1H8K9Jco1UUOe!B9w=8$Wo$h+w(xYD2Fk=@0S z{;W7VpCNaYGx1b@(KKH^x#(BDQ(l2#sfj6g*9G5#K@J9ud0F4OL5m5>3D)UI;`16O zc=!5ee)Nox)G>GU@Q;d$&n_tH>LWYM$7guiL(|s1Q_>}E-@fsaxO)H8<5#}H;TdU} zWksb8we`)-EiJ=ice^IPyZwCI_H9}cKii!$kDlPI3rkzBq@uI_r@IEn{RStNJ#^eF zwaaY#+A{}s-j?5(;Z648mxlSf9N*_`puo}G=b$6!>BaHo&e-KwMPwB<*0*4f^7s__ zQo~?Rx2J`sr@=uV($#9-rW#Ndwb?1q>LItzzCOCgT}R%_L>)g56E#m`6*pZuS7;)A zc>uxFSk=Qs)!Rhf8G1@ju`xfJ$b&W?^IiOt+pmu70pdK3HQbF=NPZJlj=lmYxTCm{ z3LxoWuE8--47^}C!5yv5Omfva0D?ZI>aNFSGTmPhYV;rz5Q7llIXV(}-Tw?9)<@Uk4d{5D;J0PQdUX- z&rZ+8J-F_wr{Ha-;YDboQ9wFS53nmEg)xs56n8UL?ryASjIr~Td9T(HMM93*5xliO zGW&zAv#RBd=)~lNa>ooO|Sgc!Dr)R2dx(_cEE6SLP~OKQBBj+!I|%$xNeb>*4?)H z?7oeuIoWsnXTGv|zDGsH`nuJf_Mz|2-;mq1)_mLQOS0>q=qL{LkoN+68|pm_pg~kT zjn$xKI68_=*~yGg#viV6k?Ho*O?y9N514out9ck4^g4NTf;-e!R^oJIFTmxF{)YxJ zB9oe@>7h{Tb5V9TLav{5*H`i~RQ5ur8L9wEF1q_Ur;d;I^f2P}=}E7T?)5ZRM~85X zl%a!&b}&^BzG@zR^Gv`610+Jtx$DX~9^O?PK?d}2Z?Dg(<6rX>jUp_oPKxsJ&bo>z4o@5NvO8-ldg^LgOAC`7pStKNknx6r3dEVJxoFA8+1~=w(~}d?wpK0} zx~8f`0hy|$yS?adZotMq`gF1`GnHe02;Gjc>TRg(ZmQ;}DOD0ezCDE1%#%Zs(OcF{h7kwma*sKPPR zC=Bs$&Q5R6&1}xeY|hPU%FS%d$!sYu#6lB_h#%(#A9N8)q zzt%pg-oo8p-Scy4+doP>zb$C_-XnbL;iIN|HeZq7c3)$UoyxZO@G$RD{>H|^e?(;M zvVG+j5m#1LjWv*tmL|NFL|CM37KI1Eob@(U_cBuDn5%P)l-zXo!(ISnF!0>;mEE)t zaG?K9R5+NSh=5fvv(zNVvKEf?^#xtGc%!)wMrvnmm8jVm`AiDAzAnzkWngVX_5hlb z*8Uh<^6JDuOA{s?3}EymD02*yIOdvz-Q=}<6cjfP#s-JRs2juLbamM&E&#rXiWfM9 z4P~z3d`t#O{TH)~%pWSiQmL@>J1Ztw{pe0)v zG&ki8b#){@zw3%A9^=MT-3_WrQ!1D923(QuwzI|~qLES7K*`hM*ibi7>x&)>U?B3> z#4?K-IyB3-ADsTq_Kk|=b@Bm-)O0vg*sCFy_rsT{5Mm>e(i65$u6#!8&%hYx1hQ^yUE%t1rUh99wj;hda$z%67|C9GSL8zJPa|%slsD&IU?nB zbT8}_juD%)fFLy}6i-7%UyEbIbXsIs;SLV8mS6;u^?s1Vpr`T?*eZ2tagN$DfTS1c zST*!R)XlT#l*a5d*cw2Vr?E0dKIW9D2XyNx?J-6QaU{m1fHH;V_+Y=!2~7ad-AEZz zs)w0|w~4B|mMn~Q2hF{%T4YRsRcIW*1V6xyW2oF!SHp-vA7P*nW?;x*a@5*iof^X) z;f!N)Y%KWNNjGf;4|8=dL+EIQpi8DO<(tb=q|8k6#WmsE)(a*{al+!)O#Dc}CrFYfcxt81 zUm2ah_Vi_FWDJ%o+S@xIK>{}bj&?rlFnEalqvP#^qn+(-uM7@7P}%Y9_*m}^$ zD(y9M+5!2QJIP9;i$w|vgFNox6(}8ujZAGusvai}$Jt&_dU89-{%*+4)9!{!bVefz z#RED^OE&S@U9bvL(?V{9Z6VF2I1+#e>8UQy-Lz$Vpv%kv8Q|zZl+9)INoi!To7R42 zg`-z7o20xTA20%N2n~8BV~aJFI`rg{KFe^nhmIpY9TXXCaq~maao{%b$(^XX7s(t= zO?H46wvVfxJQ7832&TTc?*b!^Ow&Z;xM)dNC6aHR(7FU{mqZ4-9FqaMkqz#i=ZT{T zlORvrLu+@P1JtR6Goa`V9JLV~k?x~ET(eu+0(K`jUss=ZOK*gQ1bQTYntvdz^n1f| z4&FhDDXAHG1wGw;M4lgapasNzBN8G7@cmDRVcu_^;gWh59RHArsQ99i@=@+6c}S&5 z^Ag5I#}s#jV{!bY&VDyTn4TDZ2i;87x*Hpif%%5GKz?Brq%JZ?FhYEOWm1fjmMk0= zh}KzWf8vXKBFa7WH9!`|v*(FJ@I<^!)!rPJtxky}lqt)EdCEPZPpTkvMa4U-D?H2& zxf>}FHD?Y-PYo7r>YMw>P!!^aXc0BIpzkzbpr^ikfOHh5lnJ-OzNJJ3gbDG6yi819 z-k@owhK`N6e??U3P-lmig(f^Tf_=mfOw{0c6;e-)5l?*y9Lb`kL<^g$Vv4Lxh-8lh z?DP4pML7;I_duVTV3^!{8tafJ=D~G0odYo034RR}d@PO*cP#w=4YHvPb0Q%3h(wfCctK?Hp`&7gXVNRGx=}>jt|y1*xBiGN)zbA@Ix>#^!h2- z-;DFBga{Wl^38~+>t>{cUK;46!lV66&`9J@Y7wsp(c;RK7*BIePjF?5C=!V%!GwV? zQyCKsu1Z4voVCf=hUEq43w@jJ@R;)ZPL`?UNG0Q=+#pLM4}C=r+)Q0XztdXWUcuLN z8gfz)!=!T-lo1pb8CU~NO+w22q!;&Hp$CB@n9FbvbPrU-govK9i_XeY7+fUk08!JzgPBjF63+uDq8iF^GW_5O>j$^F5<8IzqnsSQP3DokElXx|C3s z$#8f=DkaAvB0~~Q6%4~1_m=>;2Z{I)ozjq<#!4nTK0;gxdK0LJg$+{(lbYbgFq$Lj zg^d75ge5gM9l7%8P*zrS?kq2LArUcEm~X&7!Up|KL>~c1@KqsU$~M7Q#I1{&E>F{5 z+oryLoa*=_!{aqWoQRa@Vln$j^icewW{Q8IdElRxcTU(m%}7nh3Ozni2KQAw&qrO; z0p2ymztubOwas(ob60}Gqu~u!Ro7x~^r957I0YQJ>J#rAtpuQa%{2ZHju78t5&{Ld zKLr8Ag~3{gr#V!K5nT+A;R z{9dMqV4=F`$~Wd^vL+N`USs+Q#G#Kq0!MWI6ja?&UgWAxTqmeG*JCm%FUXuYJ~HHg zP7js~Q8&c=QFYalE{h0YH8QqEI3fcM8kXQFOq79LbXJtQ>c|5uz>&KV;)=jgJs!o` z0Y@@akrDF>RY08q#jpzCnK&Qc=cu{c?}G8z$Rb;bJ_bibo-jmsB~$!Er7izBdDZr{ zYer^vT2?N;IwkyW$^u^BeM>tA>qZ&lJjI;4f9ajN^};bUA~r1}x2Lyvv8k6Vazf7| zkcg(El|&zzeiV*S6;manLj%4ik9!y$g!{wMm5;c78vNBHMgtU7Uyv98`p5UA<`|8# zQy$T3!QYDLP{`XwQyN|jOk2{8=IRJ4p%ihE^%R_rNpUQW)aRsWVSdNN*Gs1)QZKDJ z5&jy&1_Zp&H7c&!2g(-FMZ3&9e!z}{nxnQP!lwwmD!~xPP;)m>_S8G* zuDc(xw&Cu1pR8k5e+-Toi+Guq$B&!jD`ZrBZ+Zb6ms3+SGjsFs!61?Q#z=nf%zCGN znt!iv=9_2kJ55jf2ZduzxC~oD7JJhP_EErj19wA=Ly9AVgJ@zOU3+?eU8qQa1Z?$m zc#P2tmkpA0(?2-e)sf+1kHsc9#{?H}*^f&n+7nN04nMSXd18dqQ7J42Kmj2ei80Z6 z(8EX(UXQ!BJOYUbCo-!Fuw}?CW%d!(bYx!Bmd*Gejs#wtfah!<7vdfO4koIw4LfQo z^ZZ<(RlzNT34FuwI~T;)J%Rfq;E3o!XcM#);nT(JqY5&w0cD7h!rDeyU4$c;^%SIl zs;Unn3i?W9UBv7V#}s~us>jJ=#gT&e_X5e&_h}cTEw~l*2I&#r_$)t=%io%i`>pXA ztdymtN}gM-oculQfkb2la{ z5M%_Jz}1qePESN3=1;NG!<`)-rbnIi<;lti5M-i;m<}cjCrxR;vwGPsFBEqIS(^a87WnQC(FPFy&ypKqa{wC`R1147_AS zrXd!hG(i+hx`@WkMMA&@v9qycLS|bybm|C@Rm2iIo8%Gxk9m#Zh{QRK;Qy)!aAbD_ z`7u_=l!th^`QfUxx?2Uoe>u#(Y>Yeu;C2{_*>5JbjdX4JE(J?Z^_Zj7H2~S;S zex4H)mYtbhScHGaub1HioggCeE`fPk#XrhVQ$LJ#g9m)sx-~?cD)Kx&YPzzPwO&@sF04ezEWKy%x9O=P( z=yUyv>%tHpOlKrEL{>OeJj^h{<*-kqA|YaIkVN9yK}AHxBy2wHY|Lx${@|+WP6hX>_hFsu+mc?OUJ_f=x?*PAmtNC3wWFwp9s2Wik%N+sK8Yr>scxtwbcuYvMRiPr%r7qessSb8517&DYW)~(F1bI6hXNw#FJDI15$B)%_Ojx>dkvGrH z&@spKJ1d<0^1d4hmJvZA)|WK)0h2%Lc?O>>S`Mn7+kmwy?G8IAt1tNF;d2MnEHHy zXY}rR$P-$ZVEDI}ls`|vtT!pWDDkyD%)aD+LO&1)pOqwbNO)91LFs~jodB6roF2Pk zp_QF-@4hco6BOCYJ22bHd!S5&2sAyiZG{iPOR>cR;A2F{nE=X16fASwWk%QMW z#eX?Cvm!9zmlIdqd;;@w@e*!vTYEeE5-%-Ca?*07fZ$-EVoC#~s%QAdHNF3^xO)EH zld!Pp#I$UD0#le(P*Y_>I6}oNw1FKoSX2tSWHKuJ-h?Rg#MoGKS?Smi*>Wd12)iPN z`FS1=4hTHbxDOOK3FsNAI~vHvJ|f@AB!^h1%uY{*-L!PUl9RcHH|!BJRRoxlp52|K zyWd!Lobh3T?z(!>E^S5tbFu$<12=t`W7tVXO(bo(@|cC892AEk+codsbQHjoiMS}# z&+(WHhzR^jxanr<*rphM^Bn$xKgNT&c!49bzDD#H)E3#hfDPp=8#bNSWF~o@(Z>Ep zPYXmim9dr0`KWX=9U1t?1!C-Oz&;|zx3M}jet@MRime$rcpglUewF19Gsk$O+3ys8&gu;F`+3XO{nNDQ>Mdzv10#WoCVw;?kH_N6HX-8|cvn>o_@LfW;|Q=7{tyvp=(bk(7Y&F>4 z4AZtEE;jb@ZQm1z-A#`$w=BZpL^Mh?|?#3Ek%(jM+O(NOqj>n~ogu6j#E|MQV z=*N^-4-hjV?Si%i=n(C)I2vnrJ@)a?WFi>HjBT@S%Zc4#tmaIj zyt2;Pa`(1RC0&RZW4E1_fV<`*0b z95pskWk((gVT2IxX!xCrjz{;BU0g=$B&JWcYLI0h40T^bcFYkjLtsDy3kk7LZZXnt zpL6}(u`9#dj99A}-gx;V?%7?|`9glg3i0>_!9I>hq^P$|BbM0Sk6FW1#m5+1{YhNe z2WGmKZ0y4;V#NfPRmpJR82y(vmowH8P=7HxOrB5#-SZSx&m4_mBq7(9Ej!u@bSY2ajdVvJHrHxxFS3j zL{P)-UL0&|W~In^h8OeT8ri@}Z-3&%35zVvE5sYB z9i5%9q{%<2N`*B!GZQ(=U+WUM)#$W;Xe9n!Nzq63Ni9^KOrj%wy(!P`J8DUjWof8r zBUNl-CYy1fy;f^oQjbKDLzHIR3Hj>}+MK3pN}b*xOJmMH5# zu>!P}NVv{$d+|bTn>+S=>dIjm8FQQ~-gkob)HwjKJ0FuKJ05PFsfY^~ zeXEli9Hgy?%D+m<)%Xhu4{@&}vO2KH~FB4cv$i#-~8B2c>AZ1iD7XR1_Dt z)i?BZbdL1)4fphx4o#fy8vE{wjoIyoaf#$j`r#qsCI|@A$^;_Cu$i50%1n-Zc-71N z2%L2^4z>w|1W_Tj=5ty*{<%#@Ss}JZGYTS}MHkpDR~8o${qS1Y6?1oEb>GV-%u^#P zh@wpNf-oRV>#i!r)Z>3v56i`XD(Z#r=A?tZItY6-JCK79tJtZq=1oKA#mjVOo*yUiES>(!#k^@3=1wq-Hdd^hOtAwE+wu! zI;1GXzal!kE-kUUx=QpO?1Hjy-%d@8_cu2Q_x!&7{PU#1OU0xK;ovttK0Y%(j<;vA zv7cOwkKr0;)I^atSEJSCx$Dn(#hY!L;(H9v9IfvDKA~XwE3Xp|?Bn7R(#va|n!1ha zdv}(!uPAEWSkd#J@{S+F(`4+O{37GZODh|j+t@#3^)6lr5ZK6jM-F5VjOw>CkVk9~ z&woUQB|U_H=RX$Sz4xhzhA_9-UvV^vCC^=g@_UKTuPJqzXv1Qh4L=hLxl7ohB#|N**#sqp1jxPUdR}4S4HE_7n#A46-G|h*u%z(sf+`q6;lp`< z#dE$V8$>5^gjjj23-joFmK!uwAQ|!p|Jqmm_;hkhXJbeAICqS`$HBS~%*^odkp=SE zP<(t(7*!J%UX&NsP%2a^P`ag`RVc28AOmu{7%5O7Z#UDYgg=%IDT`$m=V7jDT7*_d z3bAzYoQq%6d^9^@j2z-c87qsIB&p1NLzx8~$Vw1m?>;`vAuWv)li>&Q3p0yX_(}en zIDtj3Xb%Q&bdZJOi{xdp zXT@ph_x6R53@at7ZNaTD7x^oyLX=4A!XadjUWy)m-~w#Zk4DTD|3HCvJVxzrAL5B3 z_TJ9MQWnkde*;JFVqhu#%ay&-`ZJ~d<<_-?qc68_|IC&x;poql_Lp1N|K9TDwr#0pf1U)o1e?JB zyc(Bk`Vu8jw&zQ1)l!@OYzdtG;m@vdslG2!0^k4rOKjCroBnJGDE`?MF4gx%O5mF1 I-~RUh1H>Jzy8r+H diff --git a/samples/mfc/standard/10_Convert/src/WNT/res/occlogo.bmp b/samples/mfc/standard/10_Convert/src/WNT/res/occlogo.bmp deleted file mode 100755 index bf12607e3c6931faf2b87f7c8acbeeb1e73c7611..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9190 zcmd6s3s_Xu7RUcH1A+`XKxQf^2xtacT*Dq{W`&P5Z$c(%Nt&R6O4>C9#7rv8tEP#m zB$Q87(lW~o-;voSaS)LA01giC;WfOU=dOJQN$m=J_oB5v_L+V5T4$}_S$pk0XE@JK zFR+6sPZ$6rs24%anVJN~;`lLZV1f^4&lSz8hrfp&xm=y7~YcOxRFo^ZE-mcEl5W6p|8QVtB`hHjn<|%IAJVS zN;hG$>{V=>y&cgXd`~|7@R8*X1lg`feO*1WRoOUq_8gjOs_^PRBv|G?94GyOO|zv4 z@p8hFX%c*~*a)lV_DAIEr;!{z11h!))n(UlYP~UvzA->;+A18~6O8(rLR6F}(b8Ov z1G_yS2u)~fYeh=ham1X7#M~e$R_!)|>l_2T?q`c5KQBgF)@8i4;7u&@e+FY-lp^Sp z*Wfq-XliZ30A z!h;t-gL&i%Jd_X)$CSO8AGH;R^QXXQ)f~vzdBNiNM;P>}AH35}!v5$MjE@dSX?-2e zXl`J`i4zpJ71=elkYv?Dn%4p;eacjIkfl|@Ag2L_blyu<3$vVhT-4PAS=2J>sMP`o zP6K;SLK<}z60dh5i!XreYzkyFF54Fa+4=}b-}Z-LQW*@sW9StY1$p#2m>;5191XJgi^S(rI?CcCjM@QJ%*lFUwZsK?*RpG0-M8o#TbvIY{g3YZ>?zCcu#t_l|ET*9*Bv&-9ygN6Mm^V4 z`RJ~nuGz@KsUIxtWW%LYbY0tbH*(i@-HG*^K`*m@b~c8?9%nw?vF|!+_bj>*>$hIL z6=oK8LkMm}_nh{SRhMjIoY7k@H|=X@V{K#jAi;HcMGuj66)BEgbcU(i)Rfo;T3T8g zn>=8Ek85V`*z`Z6bTL=c0G+sZ%y5NpC7Pxx&oc-oe4jmdN;m7(S+R zmp!KKoUIqJ$ra`nR*sGi4kK+uIOD$!8_lVCpOHl7;NUpYib~Gbc=)9r%S`8vy2_iv z%(Rb#i00tvXk|Zm$lr&})U2=lKr1nCjt=&6(>^vsOoshU@@C%8Zty_6p(AJmz(voA9lZ<IdA8_KX~+5RMh?h$4_r%PdzqFW@2M&%h}{|d2b?nq{m`+<>*gr z+m0SQ%Go&Gi8H5|^w9?l2Uribr=0bMh4W~}e7f@4Q~EpEwh@`0Em}`UKNdzA8xxx; z44mny{65MZY?n@QHmWz0=>2?RPcioNh~b9zl3ou#ejmAbsQ<=x@a(tWejOdPe?Q?7 z8<|{sY}mt2KKB{zPPVO-w}VFx?c8lvjSg?SA<%4PI`) zIR1(<{xDk|16 z_q6s4ldcmIjn*~Q>(W_zRe5OwW53_1sL-$!K3J`$a~7njX=tp`Tus!LSMn=eD$2EK z#pPvXWm=6p;pbLTm!v8~@3w<2cV=Yf)ZJlTJPj)O$Bvs(7%tkXwvAQPIYl@qJDa-I40C2vXpv#w>G&(5OnS? zsg;6I=R!uJlqp$xdsoQUyX|1x_UZc7TiL~9hj#7=59fb7!XqNSIedI8W7=H3t){Sp zEk_(_XG^HeFJvs8JU8fg{H*GmL7Fq^yrHDLSrGE#YXzaLrlw60%GEdZLV+8pn(A9< zpqQ1BK|M)h-tBDL-rulh&6dq!yJLRbvyae-Ei!V)p0Cb)&eDtZrtES>in2X#x3XQS z$aV{0iJamZbE^}CDh-8dX`zf&yX$mSsZ2>&WtlWcK??+-IlHl4FSxrARsl;PgXW}C zL1sM`D}IAnV7Hk?%P4K@2eR8ty<{P&c-tHu2kyh^cJ>2 zt(qkjGgk^7K!zFG5{-L{(3YM=lso~6uK5&MC=H;DGjW- zqft@8m6}X`pm9o zINPmqO-HxOB}f;Pz}G@?EGdHJ1+*T=X@j7y^PRyV^p_H*IIuRP(SP-2SvXq+I zy0jD;(Is7@>85eMsL7m(Y~`uBw2&IzD94;F)kO~%#~y!j+=THzefSZft)m0s@j1Os z)a88VWNx|){T`xC&C;`_*A?lP6tS`72HFCeX^Uv0TIMq>lrzRFubFQV#KWhzg}Qv| zukyX7IZ4k(U6LDo57A4OKD^TtPmCKk?%~)i1h$s&)~#K;dDU%Xbds%8ySm=cxsuPC z>)F}@mR+gJ$<1ULRqYu~rc^O^T9_maWX20h5Ynl0O+VN~eWg~^3jzFoX#RvM`s8bY zOFiwO9eb~e6eP|f+k^?@M#X;i$=VM-Si8A>3Fy`B$Hc6>ybPYaK$=FE%Pc7;huD0A z#C+1QGL;)9r~=B0vc**$m!`_fRPt}jgsj4{QZ;2Lj>Wm>muYWM&5UBCR~G6uT_59Cc5U;2SOhyiIrf>cW5;s7 z@%#(*l?AWAvB1~smSuVu?><3`-+O0~_w7#=cd`B7hJ9XmhNJPrgz-L%Eq-<8Y!45Q zIg32S{r|2`moNC2-wJ=fB}P^Ja4wpciEz4zTULo&3Ji^x>QdXLsj`8#&Jk#couW2J7XBtWIYGg6G4fDp>S{_ z=#i;$7{yIjQnFJbr*L9^2UIzoar&Q}zVMjS6|%Q>ISzyQwXNsC z@gWzHuaog<`BFKX@gefi^M`!ljk6w>gep8yKX6QP^Gp3eO!F(H8fV@O59{q-7h%r z%}A@=^Et)@0@mGWN2Afq)7#PLK79Q3veEV#{Tuu~oixoWJWrYzs`q(b2di$=H25}~ zjXlsqY;JCD@Z`juew({HO8DVJ6*_q~t@&?Q`+w#HSW~2zKFz*#Jdge=gb{66n;g@@ zqF`MFlDJ;^$cR|Y1dkw$vxT$@U!v4_yK^)y3lq9g9dreD)hTMHvvn=v`POuOTE)qR z4?ckP`Wz?S}w%n)W+u}Y3*smH6 zQ)4?B*mSPwn6GcCiR{b=EXvNQEKwGci@?e_LH7Iox8F4DI&}0Ngsc;yqIQmx)KD;1 zTZ01&LsRqO6eflupn0wk8dFEC6_`m}Z}t$-?&pB(`~B@6c0ncpRCYRfZLotl=!jf* za&}9};hhk^#P0~*8VIBuV_^e*)F)=3u$_?B5w?bvI%1UuiACjL64(2-o|zfz={Bex zz$EFI)C;UTg$US7tdodS)E#y_I5>_Ty7sCi!(j;IafKC7PB+vkuPVV-cc)kbMgtUs zs6%iu+9B31I(RsOm0PWO5&aL5vx)K3bvc&{Ug5x4S6+21w586l zsyD@&rHmbrj8yg@20?Y~aHQ5)`?O2$IM$u|oNTgBK22bi@nsvulHeHD2YBU+WtIvo6951J diff --git a/samples/mfc/standard/10_Convert/src/WNT/resource.h b/samples/mfc/standard/10_Convert/src/WNT/resource.h deleted file mode 100755 index 5a9e788ed4..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/resource.h +++ /dev/null @@ -1,30 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by OCCDemo.rc -// -#define IDD_ABOUTBOX 100 -#define IDR_MAINFRAME 128 -#define IDR_TOOLBAR1 130 -#define IDB_OCCLOGO 138 -#define IDB_OPENLOGO 142 -#define ID_BUTTONWire 50015 -#define ID_BUTTONShade 50016 -#define ID_BUTTONStart 50103 -#define ID_BUTTONNext 50104 -#define ID_BUTTONShowResult 50105 -#define ID_DUMP_VIEW 50106 -#define ID_BUTTONEnd 50107 -#define ID_BUTTONPrev 50109 -#define ID_BUTTONRepeat 50110 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 143 -#define _APS_NEXT_COMMAND_VALUE 40111 -#define _APS_NEXT_CONTROL_VALUE 1007 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/samples/mfc/standard/All-vc10.sln b/samples/mfc/standard/All-vc10.sln index 74cead69d4..882e279641 100644 --- a/samples/mfc/standard/All-vc10.sln +++ b/samples/mfc/standard/All-vc10.sln @@ -4,24 +4,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geometry", "01_Geometry\adm EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modeling", "02_Modeling\adm\win\vc10\Modeling.vcxproj", "{B10FC678-B9AF-4B05-B3DC-8F790C610CC3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer2d", "03_Viewer2d\adm\win\vc10\Viewer2d.vcxproj", "{6B905DC2-4E72-4EDA-99C2-7473634690FE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "03_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer3d", "04_Viewer3d\adm\win\vc10\Viewer3d.vcxproj", "{949DFBDF-9007-4C88-8925-43209C36A5D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "05_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ocaf", "06_Ocaf\adm\win\vc10\Ocaf.vcxproj", "{B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Triangulation", "07_Triangulation\adm\win\vc10\Triangulation.vcxproj", "{B50C10C8-5260-498B-A80F-48FFB4534360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "08_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Animation", "09_Animation\adm\win\vc10\Animation.vcxproj", "{92492ACB-1F57-40BB-818F-33AD1C20273A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "04_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcsample", "mfcsample\adm\win\vc10\mfcsample.vcxproj", "{2D6CBBE8-6965-4016-B503-0D715AE26691}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Convert", "10_Convert\adm\win\vc10\Convert.vcxproj", "{C527B648-F98D-42E5-9F59-251FD95D15A0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -46,22 +34,6 @@ Global {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|Win32.Build.0 = Release|Win32 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.ActiveCfg = Release|x64 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.Build.0 = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.Build.0 = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.ActiveCfg = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.Build.0 = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.ActiveCfg = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.Build.0 = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.ActiveCfg = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.Build.0 = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.Build.0 = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.ActiveCfg = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.Build.0 = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.ActiveCfg = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.Build.0 = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.ActiveCfg = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.Build.0 = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.ActiveCfg = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.Build.0 = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|x64.ActiveCfg = Debug|x64 @@ -70,22 +42,6 @@ Global {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|Win32.Build.0 = Release|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.ActiveCfg = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.Build.0 = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.Build.0 = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.ActiveCfg = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.Build.0 = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.ActiveCfg = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.Build.0 = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.ActiveCfg = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.Build.0 = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.ActiveCfg = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.Build.0 = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.ActiveCfg = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.Build.0 = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.ActiveCfg = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.Build.0 = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.ActiveCfg = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.Build.0 = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.ActiveCfg = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.Build.0 = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|x64.ActiveCfg = Debug|x64 @@ -94,14 +50,6 @@ Global {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|Win32.Build.0 = Release|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.ActiveCfg = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.Build.0 = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.ActiveCfg = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.Build.0 = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.ActiveCfg = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.Build.0 = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.ActiveCfg = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.Build.0 = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.ActiveCfg = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.Build.0 = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.ActiveCfg = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.Build.0 = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|x64.ActiveCfg = Debug|x64 @@ -110,14 +58,6 @@ Global {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|Win32.Build.0 = Release|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.ActiveCfg = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.Build.0 = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.Build.0 = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.ActiveCfg = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.Build.0 = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.ActiveCfg = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.Build.0 = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.ActiveCfg = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/mfc/standard/All-vc11.sln b/samples/mfc/standard/All-vc11.sln index 655e05c602..08aac37cc4 100644 --- a/samples/mfc/standard/All-vc11.sln +++ b/samples/mfc/standard/All-vc11.sln @@ -4,24 +4,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geometry", "01_Geometry\adm EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modeling", "02_Modeling\adm\win\vc10\Modeling.vcxproj", "{B10FC678-B9AF-4B05-B3DC-8F790C610CC3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer2d", "03_Viewer2d\adm\win\vc10\Viewer2d.vcxproj", "{6B905DC2-4E72-4EDA-99C2-7473634690FE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "03_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer3d", "04_Viewer3d\adm\win\vc10\Viewer3d.vcxproj", "{949DFBDF-9007-4C88-8925-43209C36A5D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "05_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ocaf", "06_Ocaf\adm\win\vc10\Ocaf.vcxproj", "{B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Triangulation", "07_Triangulation\adm\win\vc10\Triangulation.vcxproj", "{B50C10C8-5260-498B-A80F-48FFB4534360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "08_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Animation", "09_Animation\adm\win\vc10\Animation.vcxproj", "{92492ACB-1F57-40BB-818F-33AD1C20273A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "04_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcsample", "mfcsample\adm\win\vc10\mfcsample.vcxproj", "{2D6CBBE8-6965-4016-B503-0D715AE26691}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Convert", "10_Convert\adm\win\vc10\Convert.vcxproj", "{C527B648-F98D-42E5-9F59-251FD95D15A0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -46,22 +34,6 @@ Global {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|Win32.Build.0 = Release|Win32 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.ActiveCfg = Release|x64 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.Build.0 = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.Build.0 = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.ActiveCfg = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.Build.0 = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.ActiveCfg = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.Build.0 = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.ActiveCfg = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.Build.0 = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.Build.0 = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.ActiveCfg = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.Build.0 = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.ActiveCfg = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.Build.0 = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.ActiveCfg = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.Build.0 = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.ActiveCfg = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.Build.0 = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|x64.ActiveCfg = Debug|x64 @@ -70,22 +42,6 @@ Global {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|Win32.Build.0 = Release|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.ActiveCfg = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.Build.0 = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.Build.0 = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.ActiveCfg = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.Build.0 = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.ActiveCfg = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.Build.0 = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.ActiveCfg = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.Build.0 = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.ActiveCfg = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.Build.0 = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.ActiveCfg = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.Build.0 = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.ActiveCfg = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.Build.0 = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.ActiveCfg = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.Build.0 = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.ActiveCfg = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.Build.0 = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|x64.ActiveCfg = Debug|x64 @@ -94,14 +50,6 @@ Global {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|Win32.Build.0 = Release|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.ActiveCfg = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.Build.0 = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.ActiveCfg = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.Build.0 = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.ActiveCfg = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.Build.0 = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.ActiveCfg = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.Build.0 = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.ActiveCfg = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.Build.0 = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.ActiveCfg = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.Build.0 = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|x64.ActiveCfg = Debug|x64 @@ -110,14 +58,6 @@ Global {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|Win32.Build.0 = Release|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.ActiveCfg = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.Build.0 = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.Build.0 = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.ActiveCfg = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.Build.0 = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.ActiveCfg = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.Build.0 = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.ActiveCfg = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/mfc/standard/All-vc12.sln b/samples/mfc/standard/All-vc12.sln index ab1f09712b..cc84cf8abb 100644 --- a/samples/mfc/standard/All-vc12.sln +++ b/samples/mfc/standard/All-vc12.sln @@ -4,24 +4,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geometry", "01_Geometry\adm EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modeling", "02_Modeling\adm\win\vc10\Modeling.vcxproj", "{B10FC678-B9AF-4B05-B3DC-8F790C610CC3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer2d", "03_Viewer2d\adm\win\vc10\Viewer2d.vcxproj", "{6B905DC2-4E72-4EDA-99C2-7473634690FE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "03_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer3d", "04_Viewer3d\adm\win\vc10\Viewer3d.vcxproj", "{949DFBDF-9007-4C88-8925-43209C36A5D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "05_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ocaf", "06_Ocaf\adm\win\vc10\Ocaf.vcxproj", "{B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Triangulation", "07_Triangulation\adm\win\vc10\Triangulation.vcxproj", "{B50C10C8-5260-498B-A80F-48FFB4534360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "08_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Animation", "09_Animation\adm\win\vc10\Animation.vcxproj", "{92492ACB-1F57-40BB-818F-33AD1C20273A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "04_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcsample", "mfcsample\adm\win\vc10\mfcsample.vcxproj", "{2D6CBBE8-6965-4016-B503-0D715AE26691}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Convert", "10_Convert\adm\win\vc10\Convert.vcxproj", "{C527B648-F98D-42E5-9F59-251FD95D15A0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -46,22 +34,6 @@ Global {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|Win32.Build.0 = Release|Win32 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.ActiveCfg = Release|x64 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.Build.0 = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.Build.0 = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.ActiveCfg = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.Build.0 = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.ActiveCfg = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.Build.0 = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.ActiveCfg = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.Build.0 = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.Build.0 = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.ActiveCfg = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.Build.0 = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.ActiveCfg = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.Build.0 = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.ActiveCfg = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.Build.0 = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.ActiveCfg = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.Build.0 = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|x64.ActiveCfg = Debug|x64 @@ -70,22 +42,6 @@ Global {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|Win32.Build.0 = Release|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.ActiveCfg = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.Build.0 = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.Build.0 = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.ActiveCfg = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.Build.0 = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.ActiveCfg = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.Build.0 = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.ActiveCfg = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.Build.0 = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.ActiveCfg = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.Build.0 = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.ActiveCfg = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.Build.0 = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.ActiveCfg = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.Build.0 = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.ActiveCfg = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.Build.0 = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.ActiveCfg = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.Build.0 = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|x64.ActiveCfg = Debug|x64 @@ -94,14 +50,6 @@ Global {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|Win32.Build.0 = Release|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.ActiveCfg = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.Build.0 = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.ActiveCfg = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.Build.0 = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.ActiveCfg = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.Build.0 = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.ActiveCfg = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.Build.0 = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.ActiveCfg = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.Build.0 = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.ActiveCfg = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.Build.0 = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|x64.ActiveCfg = Debug|x64 @@ -110,14 +58,6 @@ Global {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|Win32.Build.0 = Release|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.ActiveCfg = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.Build.0 = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.Build.0 = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.ActiveCfg = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.Build.0 = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.ActiveCfg = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.Build.0 = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.ActiveCfg = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/mfc/standard/All-vc14.sln b/samples/mfc/standard/All-vc14.sln index 60d3c7cf26..40128526cc 100644 --- a/samples/mfc/standard/All-vc14.sln +++ b/samples/mfc/standard/All-vc14.sln @@ -4,24 +4,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geometry", "01_Geometry\adm EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modeling", "02_Modeling\adm\win\vc10\Modeling.vcxproj", "{B10FC678-B9AF-4B05-B3DC-8F790C610CC3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer2d", "03_Viewer2d\adm\win\vc10\Viewer2d.vcxproj", "{6B905DC2-4E72-4EDA-99C2-7473634690FE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "03_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer3d", "04_Viewer3d\adm\win\vc10\Viewer3d.vcxproj", "{949DFBDF-9007-4C88-8925-43209C36A5D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "05_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ocaf", "06_Ocaf\adm\win\vc10\Ocaf.vcxproj", "{B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Triangulation", "07_Triangulation\adm\win\vc10\Triangulation.vcxproj", "{B50C10C8-5260-498B-A80F-48FFB4534360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "08_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Animation", "09_Animation\adm\win\vc10\Animation.vcxproj", "{92492ACB-1F57-40BB-818F-33AD1C20273A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "04_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcsample", "mfcsample\adm\win\vc10\mfcsample.vcxproj", "{2D6CBBE8-6965-4016-B503-0D715AE26691}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Convert", "10_Convert\adm\win\vc10\Convert.vcxproj", "{C527B648-F98D-42E5-9F59-251FD95D15A0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -46,22 +34,6 @@ Global {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|Win32.Build.0 = Release|Win32 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.ActiveCfg = Release|x64 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.Build.0 = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.Build.0 = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.ActiveCfg = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.Build.0 = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.ActiveCfg = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.Build.0 = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.ActiveCfg = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.Build.0 = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.Build.0 = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.ActiveCfg = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.Build.0 = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.ActiveCfg = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.Build.0 = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.ActiveCfg = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.Build.0 = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.ActiveCfg = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.Build.0 = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|x64.ActiveCfg = Debug|x64 @@ -70,22 +42,6 @@ Global {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|Win32.Build.0 = Release|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.ActiveCfg = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.Build.0 = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.Build.0 = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.ActiveCfg = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.Build.0 = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.ActiveCfg = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.Build.0 = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.ActiveCfg = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.Build.0 = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.ActiveCfg = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.Build.0 = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.ActiveCfg = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.Build.0 = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.ActiveCfg = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.Build.0 = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.ActiveCfg = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.Build.0 = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.ActiveCfg = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.Build.0 = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|x64.ActiveCfg = Debug|x64 @@ -94,14 +50,6 @@ Global {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|Win32.Build.0 = Release|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.ActiveCfg = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.Build.0 = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.ActiveCfg = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.Build.0 = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.ActiveCfg = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.Build.0 = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.ActiveCfg = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.Build.0 = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.ActiveCfg = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.Build.0 = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.ActiveCfg = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.Build.0 = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|x64.ActiveCfg = Debug|x64 @@ -110,14 +58,6 @@ Global {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|Win32.Build.0 = Release|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.ActiveCfg = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.Build.0 = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.Build.0 = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.ActiveCfg = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.Build.0 = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.ActiveCfg = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.Build.0 = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.ActiveCfg = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/mfc/standard/All-vc141.sln b/samples/mfc/standard/All-vc141.sln index 0ff8e8fac0..627eea28c0 100644 --- a/samples/mfc/standard/All-vc141.sln +++ b/samples/mfc/standard/All-vc141.sln @@ -4,24 +4,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geometry", "01_Geometry\adm EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modeling", "02_Modeling\adm\win\vc10\Modeling.vcxproj", "{B10FC678-B9AF-4B05-B3DC-8F790C610CC3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer2d", "03_Viewer2d\adm\win\vc10\Viewer2d.vcxproj", "{6B905DC2-4E72-4EDA-99C2-7473634690FE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "03_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer3d", "04_Viewer3d\adm\win\vc10\Viewer3d.vcxproj", "{949DFBDF-9007-4C88-8925-43209C36A5D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "05_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ocaf", "06_Ocaf\adm\win\vc10\Ocaf.vcxproj", "{B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Triangulation", "07_Triangulation\adm\win\vc10\Triangulation.vcxproj", "{B50C10C8-5260-498B-A80F-48FFB4534360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "08_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Animation", "09_Animation\adm\win\vc10\Animation.vcxproj", "{92492ACB-1F57-40BB-818F-33AD1C20273A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "04_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcsample", "mfcsample\adm\win\vc10\mfcsample.vcxproj", "{2D6CBBE8-6965-4016-B503-0D715AE26691}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Convert", "10_Convert\adm\win\vc10\Convert.vcxproj", "{C527B648-F98D-42E5-9F59-251FD95D15A0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -46,22 +34,6 @@ Global {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|Win32.Build.0 = Release|Win32 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.ActiveCfg = Release|x64 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.Build.0 = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.Build.0 = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.ActiveCfg = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.Build.0 = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.ActiveCfg = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.Build.0 = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.ActiveCfg = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.Build.0 = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.Build.0 = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.ActiveCfg = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.Build.0 = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.ActiveCfg = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.Build.0 = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.ActiveCfg = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.Build.0 = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.ActiveCfg = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.Build.0 = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|x64.ActiveCfg = Debug|x64 @@ -70,22 +42,6 @@ Global {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|Win32.Build.0 = Release|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.ActiveCfg = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.Build.0 = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.Build.0 = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.ActiveCfg = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.Build.0 = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.ActiveCfg = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.Build.0 = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.ActiveCfg = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.Build.0 = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.ActiveCfg = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.Build.0 = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.ActiveCfg = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.Build.0 = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.ActiveCfg = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.Build.0 = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.ActiveCfg = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.Build.0 = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.ActiveCfg = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.Build.0 = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|x64.ActiveCfg = Debug|x64 @@ -94,14 +50,6 @@ Global {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|Win32.Build.0 = Release|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.ActiveCfg = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.Build.0 = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.ActiveCfg = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.Build.0 = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.ActiveCfg = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.Build.0 = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.ActiveCfg = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.Build.0 = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.ActiveCfg = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.Build.0 = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.ActiveCfg = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.Build.0 = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|x64.ActiveCfg = Debug|x64 @@ -110,14 +58,6 @@ Global {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|Win32.Build.0 = Release|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.ActiveCfg = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.Build.0 = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.Build.0 = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.ActiveCfg = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.Build.0 = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.ActiveCfg = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.Build.0 = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.ActiveCfg = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/mfc/standard/All-vc142.sln b/samples/mfc/standard/All-vc142.sln index 7fdda1fe8d..d4ef1b6938 100644 --- a/samples/mfc/standard/All-vc142.sln +++ b/samples/mfc/standard/All-vc142.sln @@ -4,24 +4,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geometry", "01_Geometry\adm EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modeling", "02_Modeling\adm\win\vc10\Modeling.vcxproj", "{B10FC678-B9AF-4B05-B3DC-8F790C610CC3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer2d", "03_Viewer2d\adm\win\vc10\Viewer2d.vcxproj", "{6B905DC2-4E72-4EDA-99C2-7473634690FE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "03_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer3d", "04_Viewer3d\adm\win\vc10\Viewer3d.vcxproj", "{949DFBDF-9007-4C88-8925-43209C36A5D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "05_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ocaf", "06_Ocaf\adm\win\vc10\Ocaf.vcxproj", "{B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Triangulation", "07_Triangulation\adm\win\vc10\Triangulation.vcxproj", "{B50C10C8-5260-498B-A80F-48FFB4534360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "08_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Animation", "09_Animation\adm\win\vc10\Animation.vcxproj", "{92492ACB-1F57-40BB-818F-33AD1C20273A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "04_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcsample", "mfcsample\adm\win\vc10\mfcsample.vcxproj", "{2D6CBBE8-6965-4016-B503-0D715AE26691}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Convert", "10_Convert\adm\win\vc10\Convert.vcxproj", "{C527B648-F98D-42E5-9F59-251FD95D15A0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -46,22 +34,6 @@ Global {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|Win32.Build.0 = Release|Win32 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.ActiveCfg = Release|x64 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.Build.0 = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.Build.0 = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.ActiveCfg = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.Build.0 = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.ActiveCfg = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.Build.0 = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.ActiveCfg = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.Build.0 = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.Build.0 = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.ActiveCfg = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.Build.0 = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.ActiveCfg = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.Build.0 = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.ActiveCfg = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.Build.0 = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.ActiveCfg = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.Build.0 = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|x64.ActiveCfg = Debug|x64 @@ -70,22 +42,6 @@ Global {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|Win32.Build.0 = Release|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.ActiveCfg = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.Build.0 = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.Build.0 = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.ActiveCfg = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.Build.0 = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.ActiveCfg = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.Build.0 = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.ActiveCfg = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.Build.0 = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.ActiveCfg = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.Build.0 = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.ActiveCfg = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.Build.0 = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.ActiveCfg = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.Build.0 = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.ActiveCfg = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.Build.0 = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.ActiveCfg = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.Build.0 = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|x64.ActiveCfg = Debug|x64 @@ -94,14 +50,6 @@ Global {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|Win32.Build.0 = Release|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.ActiveCfg = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.Build.0 = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.ActiveCfg = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.Build.0 = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.ActiveCfg = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.Build.0 = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.ActiveCfg = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.Build.0 = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.ActiveCfg = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.Build.0 = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.ActiveCfg = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.Build.0 = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|x64.ActiveCfg = Debug|x64 @@ -110,14 +58,6 @@ Global {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|Win32.Build.0 = Release|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.ActiveCfg = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.Build.0 = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.Build.0 = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.ActiveCfg = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.Build.0 = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.ActiveCfg = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.Build.0 = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.ActiveCfg = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp deleted file mode 100755 index acbaf9c666..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp +++ /dev/null @@ -1,440 +0,0 @@ -#include "stdafx.h" - -#include "Sample2D_Face.h" - -IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Face,AIS_InteractiveObject) - -Sample2D_Face::Sample2D_Face (const TopoDS_Shape& theFace) -:AIS_InteractiveObject() -{ - myshape = theFace; - myFORWARDColor = Quantity_NOC_BLUE1; - myREVERSEDColor = Quantity_NOC_YELLOW; - myINTERNALColor = Quantity_NOC_RED1; - myEXTERNALColor = Quantity_NOC_MAGENTA1; - myWidthIndex = 1; - myTypeIndex = 1; - - myForwardNum=0; - myReversedNum=0; - myInternalNum=0; - myExternalNum=0; - - SetAutoHilight(Standard_False); - - FillData(Standard_True); -} - -void Sample2D_Face::DrawMarker(const Handle(Geom2d_TrimmedCurve)& theCurve, const Handle(Prs3d_Presentation)& thePresentation) -{ - Standard_Real aCenterParam = (theCurve->FirstParameter()+theCurve->LastParameter())/2; - gp_Pnt2d p; - gp_Vec2d v; - theCurve->D1(aCenterParam,p,v); - if (v.Magnitude() > gp::Resolution()) - { - gp_Vec aDir(v.X(),v.Y(),0.); - gp_Pnt aPoint(p.X(),p.Y(),0.); - aDir.Normalize(); - aDir.Reverse(); - gp_Dir aZ(0,0,1); - gp_Pnt aLeft(aPoint.Translated(aDir.Rotated(gp_Ax1(aPoint,aZ), M_PI/6)*5)) ; - gp_Pnt aRight(aPoint.Translated(aDir.Rotated(gp_Ax1(aPoint,aZ), M_PI*11/6)*5)); - - Handle(Graphic3d_ArrayOfPolylines) anArrow = new Graphic3d_ArrayOfPolylines(3); - anArrow->AddVertex(aLeft); - anArrow->AddVertex(aPoint); - anArrow->AddVertex(aRight); - - thePresentation->CurrentGroup()->AddPrimitiveArray(anArrow); - } -} - -void Sample2D_Face::FillData(Standard_Boolean isSizesRecompute) -{ - if(myshape.IsNull() || myshape.ShapeType()!=TopAbs_FACE) return; - - Standard_Real f,l; - TopExp_Explorer ex; - TopoDS_Face aFace = TopoDS::Face(myshape); - - //count number of verteces and bounds in primitive arrays - if(isSizesRecompute) - { - mySeq_FORWARD.Clear(); - mySeq_REVERSED.Clear(); - mySeq_INTERNAL.Clear(); - mySeq_EXTERNAL.Clear(); - - myshape.Orientation(TopAbs_FORWARD); - ex.Init(myshape,TopAbs_EDGE); - while (ex.More()) - { - BRepAdaptor_Curve2d aCurveOnEdge(TopoDS::Edge(ex.Current()),aFace); - GCPnts_QuasiUniformDeflection anEdgeDistrib(aCurveOnEdge,1.e-2); - if(anEdgeDistrib.IsDone()) - switch (ex.Current().Orientation()) - { - case TopAbs_FORWARD: { - myForwardNum+=anEdgeDistrib.NbPoints(); - myForwardBounds++; - break; - } - case TopAbs_REVERSED: { - myReversedNum+=anEdgeDistrib.NbPoints(); - myReversedBounds++; - break; - } - case TopAbs_INTERNAL: { - myInternalNum+=anEdgeDistrib.NbPoints(); - myInternalBounds++; - break; - } - case TopAbs_EXTERNAL: { - myExternalNum+=anEdgeDistrib.NbPoints(); - myExternalBounds++; - break; - } - default : break; - }//end switch - ex.Next(); - } - } - - myForwardArray = new Graphic3d_ArrayOfPolylines(myForwardNum,myForwardBounds); - myReversedArray = new Graphic3d_ArrayOfPolylines(myReversedNum, myReversedBounds); - myInternalArray = new Graphic3d_ArrayOfPolylines(myInternalNum, myInternalBounds); - myExternalArray = new Graphic3d_ArrayOfPolylines(myExternalNum, myExternalBounds); - - //fill primitive arrays - ex.Init(myshape,TopAbs_EDGE); - while (ex.More()) { - const Handle(Geom2d_Curve) aCurve = BRep_Tool::CurveOnSurface - (TopoDS::Edge(ex.Current()),aFace,f,l); - - Handle(Geom2d_TrimmedCurve) aTrimmedCurve = new Geom2d_TrimmedCurve(aCurve,f,l); - TopoDS_Edge CurrentEdge= TopoDS::Edge(ex.Current()); - if(!aTrimmedCurve.IsNull()) - { - Handle(Geom_Curve) aCurve3d = GeomLib::To3d(gp_Ax2(gp_Pnt(0,0,0),gp_Dir(0,0,1)),aTrimmedCurve); - BRepAdaptor_Curve2d aCurveOnEdge(CurrentEdge,aFace); - GCPnts_QuasiUniformDeflection anEdgeDistrib(aCurveOnEdge,1.e-2); - if(anEdgeDistrib.IsDone()) - { - switch (ex.Current().Orientation()) - { - case TopAbs_FORWARD: { - myForwardArray->AddBound(anEdgeDistrib.NbPoints()); - for(Standard_Integer i=1;i<=anEdgeDistrib.NbPoints();++i) - { - myForwardArray->AddVertex(anEdgeDistrib.Value(i)); - } - if(isSizesRecompute) - mySeq_FORWARD.Append(aCurve3d); - break; - } - case TopAbs_REVERSED: { - myReversedArray->AddBound(anEdgeDistrib.NbPoints()); - for(Standard_Integer i=1;i<=anEdgeDistrib.NbPoints();++i) - { - myReversedArray->AddVertex(anEdgeDistrib.Value(i)); - } - if(isSizesRecompute) - mySeq_REVERSED.Append(aCurve3d); - break; - } - case TopAbs_INTERNAL: { - myInternalArray->AddBound(anEdgeDistrib.NbPoints()); - for(Standard_Integer i=1;i<=anEdgeDistrib.NbPoints();++i) - { - myInternalArray->AddVertex(anEdgeDistrib.Value(i)); - } - if(isSizesRecompute) - mySeq_INTERNAL.Append(aCurve3d); - break; - } - case TopAbs_EXTERNAL: { - myExternalArray->AddBound(anEdgeDistrib.NbPoints()); - for(Standard_Integer i=1;i<=anEdgeDistrib.NbPoints();++i) - { - myExternalArray->AddVertex(anEdgeDistrib.Value(i)); - } - if(isSizesRecompute) - mySeq_EXTERNAL.Append(aCurve3d); - break; - } - default : break; - }//end switch - } - }//end else - ex.Next(); - } -} - -void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager)& /*thePresentationManager*/, - const Handle(Prs3d_Presentation)& thePresentation, - const Standard_Integer /*theMode*/) -{ - thePresentation->Clear(); - myDrawer->SetWireDraw(1); - - if(myshape.IsNull() || myshape.ShapeType()!=TopAbs_FACE) return; - - Handle(Graphic3d_AspectLine3d) aLineAspect_FORWARD = - new Graphic3d_AspectLine3d(myFORWARDColor, Aspect_TOL_SOLID,1); - Handle(Graphic3d_AspectLine3d) aLineAspect_REVERSED = - new Graphic3d_AspectLine3d(myREVERSEDColor, Aspect_TOL_SOLID,1); - Handle(Graphic3d_AspectLine3d) aLineAspect_INTERNAL = - new Graphic3d_AspectLine3d(myINTERNALColor, Aspect_TOL_SOLID,1); - Handle(Graphic3d_AspectLine3d) aLineAspect_EXTERNAL = - new Graphic3d_AspectLine3d(myEXTERNALColor, Aspect_TOL_SOLID,1); - - Standard_Real f,l; - TopoDS_Face aFace = TopoDS::Face(myshape); - //estimating number of verteces in primitive arrays - TopExp_Explorer ex(myshape,TopAbs_EDGE); - ex.Init(myshape,TopAbs_EDGE); - while (ex.More()) - { - const Handle(Geom2d_Curve) aCurve = BRep_Tool::CurveOnSurface - (TopoDS::Edge(ex.Current()),aFace,f,l); - - Handle(Geom2d_TrimmedCurve) aTrimmedCurve = new Geom2d_TrimmedCurve(aCurve,f,l); - TopoDS_Edge aCurrentEdge= TopoDS::Edge(ex.Current()); - //make a 3D curve from 2D trimmed curve to display it - Handle(Geom_Curve) aCurve3d = GeomLib::To3d(gp_Ax2(gp_Pnt(0,0,0),gp_Dir(0,0,1)),aTrimmedCurve); - //make distribution of points - BRepAdaptor_Curve2d aCurveOnEdge(aCurrentEdge,aFace); - GCPnts_QuasiUniformDeflection anEdgeDistrib(aCurveOnEdge,1.e-2); - if(anEdgeDistrib.IsDone()) - { - switch (ex.Current().Orientation()) - { - case TopAbs_FORWARD: { - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_FORWARD); - DrawMarker(aTrimmedCurve, thePresentation); - break; - } - case TopAbs_REVERSED: { - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_REVERSED); - DrawMarker(aTrimmedCurve, thePresentation); - break; - } - case TopAbs_INTERNAL: { - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_INTERNAL); - DrawMarker(aTrimmedCurve, thePresentation); - - mySeq_INTERNAL.Append(aCurve3d); - break; - } - case TopAbs_EXTERNAL: { - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_EXTERNAL); - DrawMarker(aTrimmedCurve, thePresentation); - break; - } - default : break; - }//end switch - } - ex.Next(); - } - //add all primitives to the presentation - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_FORWARD); - thePresentation->CurrentGroup()->AddPrimitiveArray(myForwardArray); - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_REVERSED); - thePresentation->CurrentGroup()->AddPrimitiveArray(myReversedArray); - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_INTERNAL); - thePresentation->CurrentGroup()->AddPrimitiveArray(myInternalArray); - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_EXTERNAL); - thePresentation->CurrentGroup()->AddPrimitiveArray(myExternalArray); -} - -//Method for advanced customizable selection of picked object -void Sample2D_Face::HilightSelected -( const Handle(PrsMgr_PresentationManager)& thePM, - const SelectMgr_SequenceOfOwner& theOwners) -{ - Handle( Prs3d_Presentation ) aSelectionPrs; - - aSelectionPrs = GetSelectPresentation( thePM ); - - Handle(Graphic3d_AspectLine3d) aLineAspect = - new Graphic3d_AspectLine3d(Quantity_NOC_ANTIQUEWHITE, Aspect_TOL_SOLID,2); - if( HasPresentation() ) - aSelectionPrs->SetTransformPersistence (Presentation()->TransformPersistence()); - - Standard_Integer aLength = theOwners.Length(); - Handle (SelectMgr_EntityOwner) anOwner; - - aSelectionPrs->Clear(); - FillData(); - - Handle (Graphic3d_Group) aSelectGroup = aSelectionPrs->NewGroup(); - - for(Standard_Integer i=1; i<=aLength; ++i) - { - anOwner = theOwners.Value(i); - //check priority of owner to add primitives in one of array - //containing primitives with certain type of orientation - switch(anOwner->Priority()) - { - case 7: - { - //add to objects with forward orientation - aSelectGroup->SetGroupPrimitivesAspect(aLineAspect); - aSelectGroup->AddPrimitiveArray(myForwardArray); - break; - } - case 6: - { - //add to objects with reversed orientation - aSelectGroup->SetGroupPrimitivesAspect(aLineAspect); - aSelectGroup->AddPrimitiveArray(myReversedArray); - break; - } - case 5: - { - //add to objects with internal orientation - aSelectGroup->SetGroupPrimitivesAspect(aLineAspect); - aSelectGroup->AddPrimitiveArray(myInternalArray); - break; - } - case 4: - { - //add to objects with external orientation - aSelectGroup->SetGroupPrimitivesAspect(aLineAspect); - aSelectGroup->AddPrimitiveArray(myExternalArray); - break; - } - } - - } - aSelectionPrs->Display(); - -} - -void Sample2D_Face::ClearSelected () -{ - Handle( Prs3d_Presentation ) aSelectionPrs = GetSelectPresentation( NULL ); - if( !aSelectionPrs.IsNull() ) - aSelectionPrs->Clear(); -} - - - -//Method for advanced customizable highlighting of picked object -void Sample2D_Face::HilightOwnerWithColor ( const Handle(PrsMgr_PresentationManager)& thePM, - const Handle(Prs3d_Drawer)& theStyle, - const Handle(SelectMgr_EntityOwner)& theOwner) -{ - Handle( Prs3d_Presentation ) aHighlightPrs; - aHighlightPrs = GetHilightPresentation( thePM ); - if( HasPresentation() ) - aHighlightPrs->SetTransformPersistence (Presentation()->TransformPersistence()); - if(theOwner.IsNull()) - return; - aHighlightPrs->Clear(); - FillData(); - - //Direct highlighting - Handle (Graphic3d_Group) aHilightGroup = aHighlightPrs->NewGroup(); - Handle(Graphic3d_AspectLine3d) aLineAspect = - new Graphic3d_AspectLine3d(theStyle->Color(), Aspect_TOL_SOLID,2); - switch(theOwner->Priority()) - { - case 7: - { - aHilightGroup->SetGroupPrimitivesAspect(aLineAspect); - aHilightGroup->AddPrimitiveArray(myForwardArray); - break; - } - case 6: - { - aHilightGroup->SetGroupPrimitivesAspect(aLineAspect); - aHilightGroup->AddPrimitiveArray(myReversedArray); - break; - } - case 5: - { - aHilightGroup->SetGroupPrimitivesAspect(aLineAspect); - aHilightGroup->AddPrimitiveArray(myInternalArray); - break; - } - case 4: - { - aHilightGroup->SetGroupPrimitivesAspect(aLineAspect); - aHilightGroup->AddPrimitiveArray(myExternalArray); - break; - } - } - if( thePM->IsImmediateModeOn() ) - thePM->AddToImmediateList( aHighlightPrs ); - -} - - - -//for auto select -void Sample2D_Face::ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, - const Standard_Integer /*theMode*/) -{ - if(myshape.IsNull()) - return; - - if(mySeq_FORWARD.Length()==0 && - mySeq_REVERSED.Length()==0 && - mySeq_INTERNAL.Length()==0 && - mySeq_EXTERNAL.Length()==0) return; - - //create entity owner for every part of the face - //set different priorities for primitives of different orientation - Handle(SelectMgr_EntityOwner) anOwner_Forward = new SelectMgr_EntityOwner(this,7); - Handle(SelectMgr_EntityOwner) anOwner_Reversed = new SelectMgr_EntityOwner(this,6); - Handle(SelectMgr_EntityOwner) anOwner_Internal = new SelectMgr_EntityOwner(this,5); - Handle(SelectMgr_EntityOwner) anOwner_External = new SelectMgr_EntityOwner(this,4); - - //create a sensitive for every part - Handle(Select3D_SensitiveGroup) aForwardGroup = new Select3D_SensitiveGroup(anOwner_Forward); - Handle(Select3D_SensitiveGroup) aReversedGroup = new Select3D_SensitiveGroup(anOwner_Reversed); - Handle(Select3D_SensitiveGroup) aInternalGroup = new Select3D_SensitiveGroup(anOwner_Internal); - Handle(Select3D_SensitiveGroup) aExternalGroup = new Select3D_SensitiveGroup(anOwner_External); - - Standard_Integer aLength = mySeq_FORWARD.Length(); - for(Standard_Integer i=1;i<=aLength;++i) - { - Handle(Select3D_SensitiveCurve) aSensitveCurve = new Select3D_SensitiveCurve(anOwner_Forward,mySeq_FORWARD(i)); - aForwardGroup->Add(aSensitveCurve); - } - theSelection->Add(aForwardGroup); - - aLength = mySeq_REVERSED.Length(); - for(Standard_Integer i=1;i<=aLength;++i) - { - Handle(Select3D_SensitiveCurve) aSensitveCurve = new Select3D_SensitiveCurve(anOwner_Reversed,mySeq_REVERSED(i)); - aReversedGroup->Add(aSensitveCurve); - } - theSelection->Add(aReversedGroup); - - aLength = mySeq_INTERNAL.Length(); - for(Standard_Integer i=1;i<=aLength;++i) - { - Handle(Select3D_SensitiveCurve) aSensitveCurve = new Select3D_SensitiveCurve(anOwner_Internal,mySeq_INTERNAL(i)); - aInternalGroup->Add(aSensitveCurve); - } - theSelection->Add(aInternalGroup); - - aLength = mySeq_EXTERNAL.Length(); - for(Standard_Integer i=1;i<=aLength;++i) - { - Handle(Select3D_SensitiveCurve) aSensitveCurve = new Select3D_SensitiveCurve(anOwner_External,mySeq_EXTERNAL(i)); - aExternalGroup->Add(aSensitveCurve); - } - theSelection->Add(aExternalGroup); -} - diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Face.h b/samples/mfc/standard/Common/Primitive/Sample2D_Face.h deleted file mode 100755 index 53cecc6f99..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Face.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _Sample2D_Face_HeaderFile -#define _Sample2D_Face_HeaderFile - -#include -#include -#include "TopoDS_Face.hxx" -#include -#include - -#include -class Sample2D_Face; -DEFINE_STANDARD_HANDLE(Sample2D_Face,AIS_InteractiveObject) -class Sample2D_Face : public AIS_InteractiveObject { - - - - -public: - - // Methods PUBLIC - // -Standard_EXPORT Sample2D_Face (const TopoDS_Shape& theFace); - -DEFINE_STANDARD_RTTIEXT(Sample2D_Face,AIS_InteractiveObject) - -private: - -//private fields - TopoDS_Shape myshape; - TColGeom_SequenceOfCurve mySeq_FORWARD; - TColGeom_SequenceOfCurve mySeq_REVERSED; - TColGeom_SequenceOfCurve mySeq_INTERNAL; - TColGeom_SequenceOfCurve mySeq_EXTERNAL; - - Handle(Graphic3d_ArrayOfPolylines) myForwardArray; - Handle(Graphic3d_ArrayOfPolylines) myReversedArray; - Handle(Graphic3d_ArrayOfPolylines) myInternalArray; - Handle(Graphic3d_ArrayOfPolylines) myExternalArray; - - Standard_Integer myForwardNum, - myReversedNum, - myInternalNum, - myExternalNum, - myForwardBounds, - myReversedBounds, - myInternalBounds, - myExternalBounds; - -//private methods - void FillData(Standard_Boolean isSizesRecomputed = Standard_False); - void ClearSelected (); - void HilightSelected( const Handle(PrsMgr_PresentationManager)& thePM, - const SelectMgr_SequenceOfOwner& theOwners); - - void HilightOwnerWithColor( const Handle(PrsMgr_PresentationManager)& thePM, - const Handle(Prs3d_Drawer)& theStyle, - const Handle(SelectMgr_EntityOwner)& theOwner); - - void Compute ( const Handle(PrsMgr_PresentationManager)& thePresentationManager, - const Handle(Prs3d_Presentation)& thePresentation, - const Standard_Integer theMode); - - void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, - const Standard_Integer theMode); - - void DrawMarker(const Handle(Geom2d_TrimmedCurve)& theCurve, const Handle(Prs3d_Presentation)& thePresentation); - -public: - Quantity_Color myFORWARDColor; - Quantity_Color myREVERSEDColor; - Quantity_Color myINTERNALColor; - Quantity_Color myEXTERNALColor; - Standard_Integer myWidthIndex; - Standard_Integer myTypeIndex ; - - TopoDS_Shape& Shape(){return myshape;} - void SetFace (const TopoDS_Shape& theFace){myshape = theFace;} - -}; - -#endif diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp deleted file mode 100755 index 957791b9a1..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include "stdafx.h" - -#include "Sample2D_Image.h" - -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Image,AIS_Shape) - -Sample2D_Image::Sample2D_Image(TCollection_AsciiString& aFileName, - const Standard_Real X, - const Standard_Real Y, - const Standard_Real aScale) - :AIS_Shape(TopoDS_Shape()) -{ - myFilename = aFileName; - myX = X; - myY = Y; - myScale = aScale; -} -void Sample2D_Image::MakeShape() -{ - Standard_Real coeff = 1.0; - Handle(Image_AlienPixMap) anImage = new Image_AlienPixMap(); - if (anImage->Load (myFilename)) - { - coeff = Standard_Real(anImage->Height()) / Standard_Real(anImage->Width()) * myScale; - } - - TopoDS_Edge E1 = BRepBuilderAPI_MakeEdge(gp_Pnt(myX,myY,0.), gp_Pnt(100*myScale+myX,myY,0.)); - TopoDS_Edge E2 = BRepBuilderAPI_MakeEdge(gp_Pnt(100*myScale+myX,myY,0.), gp_Pnt(100*myScale+myX,100*coeff+myY,0.)); - TopoDS_Edge E3 = BRepBuilderAPI_MakeEdge(gp_Pnt(100*myScale+myX,100*coeff+myY,0.), gp_Pnt(myX,100*coeff+myY,0.)); - TopoDS_Edge E4 = BRepBuilderAPI_MakeEdge(gp_Pnt(myX,100*coeff+myY,0.), gp_Pnt(myX,myY,0.)); - TopoDS_Wire anImageBounds = BRepBuilderAPI_MakeWire(E1,E2,E3,E4); - myFace = BRepBuilderAPI_MakeFace(gp_Pln(gp_Pnt(0,0,0),gp_Dir(0,0,1)),anImageBounds); -} - -void Sample2D_Image::SetContext(const Handle(AIS_InteractiveContext)& theContext) -{ - if(theContext.IsNull() || theContext->CurrentViewer().IsNull()) return; - AIS_InteractiveObject::SetContext(theContext); - MakeShape(); - this->Set(TopoDS_Shape(myFace)); - myDrawer->SetShadingAspect (new Prs3d_ShadingAspect()); - Handle(Graphic3d_Texture2Dmanual) aTexture = new Graphic3d_Texture2Dmanual (myFilename); - aTexture->DisableModulate(); - myDrawer->ShadingAspect()->Aspect()->SetTextureMap (aTexture); - myDrawer->ShadingAspect()->Aspect()->SetTextureMapOn(); -} diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Image.h b/samples/mfc/standard/Common/Primitive/Sample2D_Image.h deleted file mode 100755 index 0de9ef8311..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Image.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef _Sample2D_Image_HeaderFile -#define _Sample2D_Image_HeaderFile -#include -#include - -#include -#include -#include -#include -#include -#include -#include -class Sample2D_Image; -DEFINE_STANDARD_HANDLE(Sample2D_Image,AIS_Shape) -class Sample2D_Image : public AIS_Shape { - -public: - -Standard_EXPORT Sample2D_Image(TCollection_AsciiString& aFileName, - const Standard_Real X = 0.0, - const Standard_Real Y = 0.0, - const Standard_Real aScale = 1.0); -Standard_EXPORT inline virtual void GetCoord(Standard_Real& X,Standard_Real& Y) const; -Standard_EXPORT inline virtual void SetCoord(const Standard_Real X,const Standard_Real Y) ; -Standard_EXPORT inline Standard_Real GetScale() const; -Standard_EXPORT inline void SetScale(const Standard_Real aNewScale) ; -Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& theContext) ; - -DEFINE_STANDARD_RTTIEXT(Sample2D_Image,AIS_Shape) -private: - void MakeShape(); -protected: -TopoDS_Face myFace; -TCollection_AsciiString myFilename; -Standard_Real myX; -Standard_Real myY; -Standard_Real myScale; - -}; - -// other inline functions and methods (like "C++: function call" methods) -// - -inline void Sample2D_Image::GetCoord(Standard_Real& X, Standard_Real& Y) const -{ - X = myX; - Y = myY; -} - -inline void Sample2D_Image::SetCoord(const Standard_Real X, const Standard_Real Y) -{ - myX = X; - myY = Y; -} - -inline Standard_Real Sample2D_Image::GetScale() const -{ - return myScale; -} - -inline void Sample2D_Image::SetScale(const Standard_Real aNewScale) -{ - myScale = aNewScale; -} - - - -#endif diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp deleted file mode 100755 index 8485517693..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "stdafx.h" - -#include "Sample2D_Markers.h" - -IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Markers,AIS_InteractiveObject) - -// generic marker -Sample2D_Markers::Sample2D_Markers (const Standard_Real theXPosition, - const Standard_Real theYPosition, - const Aspect_TypeOfMarker theMarkerType, - const Quantity_Color theColor, - const Standard_Real theScaleOrId) - :AIS_InteractiveObject(),myArrayOfPoints (new Graphic3d_ArrayOfPoints (1)) -{ - myXPosition = theXPosition; - myYPosition = theYPosition; - myMarkerType = theMarkerType; - myColor = theColor; - myIndex = theScaleOrId; -} - -Sample2D_Markers::Sample2D_Markers (const Standard_Real theXPosition, - const Standard_Real theYPosition, - const Handle(Graphic3d_ArrayOfPoints)& theArrayOfPoints, - const Aspect_TypeOfMarker theMarkerType, - const Quantity_Color theColor, - const Standard_Real theScaleOrId) - :AIS_InteractiveObject(),myArrayOfPoints (new Graphic3d_ArrayOfPoints (6)) -{ - myXPosition = theXPosition; - myYPosition = theYPosition; - myMarkerType = theMarkerType; - myColor = theColor; - myIndex = theScaleOrId; - myArrayOfPoints = theArrayOfPoints; -} - - -void Sample2D_Markers::Compute (const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer /*aMode*/) -{ - if(myMarkerType == Aspect_TOM_USERDEFINED) - { - Handle(Graphic3d_AspectMarker3d) aMarker = new Graphic3d_AspectMarker3d(Aspect_TOM_POINT,myColor,myIndex); - aPresentation->CurrentGroup()->SetGroupPrimitivesAspect(aMarker); - aPresentation->CurrentGroup()->AddPrimitiveArray (myArrayOfPoints); - } - else - { - Handle(Graphic3d_AspectMarker3d) aMarker = new Graphic3d_AspectMarker3d(myMarkerType,myColor,myIndex); - aPresentation->CurrentGroup()->SetPrimitivesAspect(aMarker); - Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1); - anArrayOfPoints->AddVertex (myXPosition, myYPosition, 0); - aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints); - } -} diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h deleted file mode 100755 index 0aa3b20333..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef _Sample2D_Markers_HeaderFile -#define _Sample2D_Markers_HeaderFile - -#include -#include -#include -class Sample2D_Markers; -DEFINE_STANDARD_HANDLE(Sample2D_Markers,AIS_InteractiveObject) -class Sample2D_Markers : public AIS_InteractiveObject { - -enum Sample2D_CurrentTypeOfMarker { -Sample2D_CTOM_Generic, -Sample2D_CTOM_Polyline, -Sample2D_CTOM_Circle, -Sample2D_CTOM_Ellips -} ; - -public: - - // Generic marker - Standard_EXPORT Sample2D_Markers (const Standard_Real theXPosition, - const Standard_Real theYPosition, - const Aspect_TypeOfMarker theMarkerType, - const Quantity_Color theColor, - const Standard_Real theScaleOrId=5.0); - - // Polyline marker - Standard_EXPORT Sample2D_Markers (const Standard_Real theXPosition, - const Standard_Real theYPosition, - const Handle(Graphic3d_ArrayOfPoints)& theArrayOfPoints, - const Aspect_TypeOfMarker theMarkerType, - const Quantity_Color theColor, - const Standard_Real theScaleOrId=2.0); - - -DEFINE_STANDARD_RTTIEXT(Sample2D_Markers,AIS_InteractiveObject) - -private: - -virtual void Compute (const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/, - const Handle(Prs3d_Presentation)& /*aPresentation*/, - const Standard_Integer /*aMode*/); - -virtual void ComputeSelection (const Handle(SelectMgr_Selection)& /*aSelection*/, - const Standard_Integer /*aMode*/) {} - - -Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& /*theContext*/) {} - - - -Sample2D_CurrentTypeOfMarker myCurrentTypeOfMarker; -Standard_Real myXPosition; -Standard_Real myYPosition; -Aspect_TypeOfMarker myMarkerType; -Quantity_Color myColor; -Standard_Real myWidth; -Standard_Real myHeight; -Standard_Real myIndex;//myScaleOrId -// specific polyline marker -Handle(Graphic3d_ArrayOfPoints) myArrayOfPoints; -}; - - - -// other inCurve functions and methods (like "C++: function call" methods) -// - - - -#endif diff --git a/samples/mfc/standard/Common/User_Cylinder.cxx b/samples/mfc/standard/Common/User_Cylinder.cxx deleted file mode 100755 index 815b73858f..0000000000 --- a/samples/mfc/standard/Common/User_Cylinder.cxx +++ /dev/null @@ -1,478 +0,0 @@ -#include - -#include - -// Implementation of Handle and type mgt -// - -IMPLEMENT_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject) - -#include "ColoredMeshDlg.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -// Constructors implementation -// - -User_Cylinder::User_Cylinder(const Standard_Real R, const Standard_Real H) : -AIS_InteractiveObject(PrsMgr_TOP_ProjectorDependent) -{ - BRepPrimAPI_MakeCylinder S(R,H); - myShape = S.Shape(); - SetHilightMode(0); - myDrawer->SetShadingAspect(new Prs3d_ShadingAspect()); - myColor = Quantity_NOC_GRAY; -} - -User_Cylinder::User_Cylinder(const gp_Ax2 CylAx2, const Standard_Real R, const Standard_Real H) : -AIS_InteractiveObject(PrsMgr_TOP_ProjectorDependent) - -{ - BRepPrimAPI_MakeCylinder S(CylAx2,R,H); - BRepBuilderAPI_NurbsConvert aNurbsConvert(S.Shape()); - myShape = aNurbsConvert.Shape(); - SetHilightMode(0); - myDrawer->SetShadingAspect(new Prs3d_ShadingAspect()); - myColor = Quantity_NOC_KHAKI4; -} - -void User_Cylinder::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode ) -{ - switch (aMode) { -case AIS_WireFrame: - { - StdPrs_WFShape::Add(aPresentation,myShape, myDrawer ); - break; - } -case AIS_Shaded: - { - Standard_Real aTransparency = Transparency(); - Graphic3d_NameOfMaterial aMaterial = Material(); - myDrawer->ShadingAspect()->SetMaterial(aMaterial); - myDrawer->ShadingAspect()->SetColor(myColor); - myDrawer->ShadingAspect()->SetTransparency (aTransparency); - StdPrs_ShadedShape::Add(aPresentation,myShape, myDrawer); - break; - } -case 6: //color - { - BRepTools::Clean(myShape); - BRepTools::Update(myShape); - - Handle(Graphic3d_StructureManager) aStrucMana = GetContext()->MainPrsMgr()->StructureManager(); - - Handle(Graphic3d_Group) mygroup = aPresentation->CurrentGroup(); - myAspect = (new Prs3d_ShadingAspect())->Aspect(); - Graphic3d_MaterialAspect material = myAspect->FrontMaterial(); - material.SetAmbientColor (Quantity_NOC_BLACK); - material.SetDiffuseColor (Quantity_NOC_BLACK); - material.SetSpecularColor(Quantity_NOC_BLACK); - material.SetEmissiveColor(Quantity_NOC_BLACK); - myAspect->SetFrontMaterial(material); - - mygroup->SetPrimitivesAspect(myAspect); - myAspect->SetEdgeOn(); - - myDeflection = StdPrs_ToolTriangulatedShape::GetDeflection(myShape,myDrawer); - BRepMesh_IncrementalMesh(myShape,myDeflection); - - myX1OnOff = Standard_False; - myXBlueOnOff = Standard_False; - myXGreenOnOff =Standard_False; - myXRedOnOff = Standard_False; - myY1OnOff = Standard_False; - myYBlueOnOff = Standard_False; - myYGreenOnOff = Standard_False; - myYRedOnOff = Standard_False; - myZ1OnOff = Standard_False; - myZBlueOnOff =Standard_False; - myZGreenOnOff = Standard_False; - myZRedOnOff = Standard_False; - - CColoredMeshDlg Dlg(NULL); - Dlg.DoModal(); - - myX1OnOff = Dlg.X1OnOff; - - myXBlueOnOff = Dlg.m_CheckXBlueOnOff != 0; - myXGreenOnOff = Dlg.m_CheckXGreenOnOff != 0; - myXRedOnOff = Dlg.m_CheckXRedOnOff != 0; - - myY1OnOff = Dlg.Y1OnOff; - - myYBlueOnOff = Dlg.m_CheckYBlueOnOff != 0; - myYGreenOnOff = Dlg.m_CheckYGreenOnOff != 0; - myYRedOnOff = Dlg.m_CheckYRedOnOff != 0; - - myZ1OnOff = Dlg.Z1OnOff; - - myZBlueOnOff = Dlg.m_CheckZBlueOnOff != 0; - myZGreenOnOff = Dlg.m_CheckZGreenOnOff != 0; - myZRedOnOff = Dlg.m_CheckZRedOnOff != 0; - - // Adds a triangulation of the shape myShape to its topological data structure. - // This triangulation is computed with the deflection myDeflection. - -#ifdef DEBUG - std::cout <<"Deflection = " << myDeflection << "\n" << std::endl; -#endif - - Standard_Integer NumFace; - TopExp_Explorer ExpFace; - - //khr --> - - gp_Pnt H (0,0,0); - gp_Pnt B (0,0,1000000000); - for( NumFace=0,ExpFace.Init(myShape,TopAbs_FACE); ExpFace.More(); ExpFace.Next(),NumFace++ ) - { - TopoDS_Face myFace = TopoDS::Face(ExpFace.Current()); - TopLoc_Location myLocation = myFace.Location(); - -#ifdef DEBUG - std::cout << "J\'explore actuellement la face " << NumFace << "\n" << std::endl; -#endif - Handle(Poly_Triangulation) myT = BRep_Tool::Triangulation(myFace, myLocation); - // Returns the Triangulation of the face. It is a null handle if there is no triangulation. - - if (myT.IsNull()) - { -#ifdef DEBUG - // std::cout << "Triangulation of the face "<< i <<" is null \n"<< std::endl; -#endif - return; - } - - Standard_Integer nnn = myT->NbTriangles(); // nnn : nombre de triangles - Standard_Integer nt, n1, n2, n3 = 0;// nt : triangle courant - // ni : sommet i du triangle courant - //recherche du pt "haut" et du pt "bas - for (nt = 1; nt <= nnn; nt++) - { - // triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3 - - if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed" - myT->Triangle (nt).Get (n1,n3,n2); // le triangle est n1,n3,n2 - else - myT->Triangle (nt).Get (n1,n2,n3); // le triangle est n1,n2,n3 - - if (TriangleIsValid (myT->Node (n1), myT->Node (n2), myT->Node (n3)) ) - { // Associates a vertexNT to each node - gp_Pnt p = myT->Node (n1).Transformed (myLocation.Transformation()); - gp_Pnt q = myT->Node (n2).Transformed (myLocation.Transformation()); - gp_Pnt r = myT->Node (n3).Transformed (myLocation.Transformation()); - - if (p.Z() > H.Z()) H=p; - if (q.Z() > H.Z()) H=q; - if (r.Z() > H.Z()) H=r; - if (p.Z() < B.Z()) B=p; - if (q.Z() < B.Z()) B=q; - if (r.Z() < B.Z()) B=r; - } - } - } - - //khr <-- - - - for( NumFace=0,ExpFace.Init(myShape,TopAbs_FACE); ExpFace.More(); ExpFace.Next(),NumFace++ ) - { - TopoDS_Face myFace = TopoDS::Face(ExpFace.Current()); - TopLoc_Location myLocation = myFace.Location(); - -#ifdef DEBUG - std::cout << "J\'explore actuellement la face " << NumFace << "\n" << std::endl; -#endif - Handle(Poly_Triangulation) myT = BRep_Tool::Triangulation(myFace, myLocation); - // Returns the Triangulation of the face. It is a null handle if there is no triangulation. - - if (myT.IsNull()) - { -#ifdef DEBUG - //std::cout << "Triangulation of the face "<< i <<" is null \n"<< std::endl; -#endif - return; - } - Poly_Connect pc(myT); - TColgp_Array1OfPnt Nodes (1, myT->NbNodes()); - for (Standard_Integer in = 1; in <= myT->NbNodes(); in++) - { - Nodes.SetValue(in, myT->Node (in)); - } - BAR = GProp_PGProps::Barycentre(Nodes); - - TColgp_Array1OfDir myNormal(Nodes.Lower(), Nodes.Upper()); - - StdPrs_ToolTriangulatedShape::Normal(myFace, pc, myNormal); - BRepTools::UVBounds(myFace,Umin, Umax, Vmin, Vmax); - dUmax = (Umax - Umin); - dVmax = (Vmax - Vmin); - - Standard_Integer nnn = myT->NbTriangles(); // nnn : nombre de triangles - Standard_Integer nt, n1, n2, n3 = 0;// nt : triangle courant - // ni : sommet i du triangle courant - - //recherche du pt "haut" et du pt "bas - // gp_Pnt H (0,0,0); - // gp_Pnt B (0,0,1000000000); - - for (nt = 1; nt <= nnn; nt++) - { - // triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3 - if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed" - myT->Triangle (nt).Get (n1,n3,n2); // le triangle est n1,n3,n2 - else - myT->Triangle (nt).Get (n1,n2,n3); // le triangle est n1,n2,n3 - - if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) ) - { // Associates a vertexNT to each node - gp_Pnt p = myT->Node(n1).Transformed(myLocation.Transformation()); - gp_Pnt q = myT->Node(n2).Transformed(myLocation.Transformation()); - gp_Pnt r = myT->Node(n3).Transformed(myLocation.Transformation()); - } - } - - Handle(Graphic3d_ArrayOfTriangles) aOP = new Graphic3d_ArrayOfTriangles(3 * nnn, 0, Standard_True, Standard_True); - - for (nt = 1; nt <= nnn; nt++) - { -#ifdef DEBUG - std::cout << "On traite actuellement le triangle : "<< nt <<"\n"; -#endif - if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed" - myT->Triangle (nt).Get (n1,n3,n2); // le triangle est n1,n3,n2 - else - myT->Triangle (nt).Get (n1,n2,n3); // le triangle est n1,n2,n3 - - if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) ) - { // Associates a vertexNT to each node - - TColgp_Array1OfPnt Points(1,3); - - gp_Pnt p = myT->Node(n1).Transformed(myLocation.Transformation()); - gp_Pnt q = myT->Node(n2).Transformed(myLocation.Transformation()); - gp_Pnt r = myT->Node(n3).Transformed(myLocation.Transformation()); - - Points(1).SetCoord(p.X(), p.Y(), p.Z()); - Points(2).SetCoord(q.X(), q.Y(), q.Z()); - Points(3).SetCoord(r.X(), r.Y(), r.Z()); - - aOP->AddVertex(Points(1), myNormal(n1), Color(p,B.Z(),H.Z(),Dlg.Colorization)); - aOP->AddVertex(Points(2), myNormal(n2), Color(q,B.Z(),H.Z(),Dlg.Colorization)); - aOP->AddVertex(Points(3), myNormal(n3), Color(r,B.Z(),H.Z(),Dlg.Colorization)); - } // end of "if the triangle is valid - } // end of the "parcours" of the triangles - - aPresentation->CurrentGroup()->AddPrimitiveArray (aOP); - - mygroup->SetGroupPrimitivesAspect(myAspect); - }// end of the exploration of the shape in faces - - break; - } - } -} - -void User_Cylinder::computeHLR (const Handle(Graphic3d_Camera)& aProjector, - const Handle(TopLoc_Datum3D)& , - const Handle(Prs3d_Presentation)& aPresentation) -{ - Handle (Prs3d_Drawer) aDefDrawer = GetContext()->DefaultDrawer(); - if (aDefDrawer->DrawHiddenLine()) - myDrawer->EnableDrawHiddenLine(); - else - myDrawer->DisableDrawHiddenLine(); - StdPrs_HLRPolyShape aTool; - aTool.ComputeHLR (aPresentation,myShape,myDrawer,aProjector); -} - -void User_Cylinder::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) -{ - switch(aMode) - { - case 0: - StdSelect_BRepSelectionTool::Load(aSelection,this,myShape,TopAbs_SHAPE, 0.01, 0.1); - break; - case 4: - StdSelect_BRepSelectionTool::Load(aSelection,this,myShape,TopAbs_FACE, 0.01, 0.1); - break; - } -} - -Standard_Integer User_Cylinder::NbPossibleSelection() const -{ - return 2; -} - -Standard_Boolean User_Cylinder::AcceptShapeDecomposition() const -{ - return Standard_True; -} - -Standard_Boolean User_Cylinder::TriangleIsValid(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3) const -{ - gp_Vec V1(P1,P2);// V1=(P1,P2) - gp_Vec V2(P2,P3);// V2=(P2,P3) - gp_Vec V3(P3,P1);// V3=(P3,P1) - - if ((V1.SquareMagnitude() > 1.e-10) && (V2.SquareMagnitude() > 1.e-10) && (V3.SquareMagnitude() > 1.e-10)) - { - V1.Cross(V2);// V1 = Normal - if (V1.SquareMagnitude() > 1.e-10) - return Standard_True; - else - return Standard_False; - } - else - return Standard_False; -} - -Quantity_Color User_Cylinder::Color(gp_Pnt& thePoint,Standard_Real AltMin,Standard_Real AltMax, - const Standard_Integer ColorizationMode) -{ - red =1; //initializing colors parameters - green=1; - blue =1; - switch ( ColorizationMode) - { - case 0 : //normal, vert/maron - { - Standard_Real Alt= thePoint.Z(); - - Standard_Real AltDelta; - - AltDelta = AltMax-AltMin; - - red = 0.5- ((0.5*(AltMax-Alt))/(AltDelta)); - //Standard_Real A = 7*Alt-7*AltMin; - green = (3*AltMax-AltMin)/(3*AltMax-AltMin+(7*Alt-7*AltMin)); - blue = 0 ; - - Quantity_Color color; - color.SetValues(red,green,blue, Quantity_TOC_RGB); - return color; - break; - }//end case 0 - - case 1 : //mer-neige - { - Standard_Real Alt= thePoint.Z(); - - Standard_Real b =AltMax-AltMin; - Standard_Real a= AltMax-thePoint.Z(); - - red =1; - green=1; - blue =1; - if (0 -#endif - -#include -#include -#include -#include -// Handle definition -// -class User_Cylinder; -DEFINE_STANDARD_HANDLE(User_Cylinder,AIS_InteractiveObject) - -class User_Cylinder: public AIS_InteractiveObject { -public: - Standard_EXPORT User_Cylinder(const Standard_Real R, const Standard_Real H); - Standard_EXPORT User_Cylinder(const gp_Ax2 CylAx2, const Standard_Real R, const Standard_Real H); - - ~User_Cylinder(){}; - - Standard_Boolean AcceptShapeDecomposition() const; - Standard_Integer NbPossibleSelection() const; - void SetColor(const Quantity_Color &aColor); - -private: - void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode = 0) ; - void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) ; - void computeHLR (const Handle(Graphic3d_Camera)& aProjector, const Handle(TopLoc_Datum3D)& theTrsf, const Handle(Prs3d_Presentation)& aPresentation); - Standard_Boolean TriangleIsValid(const gp_Pnt& P1,const gp_Pnt& P2,const gp_Pnt& P3) const; - Quantity_Color Color(gp_Pnt& thePoint,Standard_Real AltMin,Standard_Real AltMax, const Standard_Integer ColorizationMode) ; - -// some methods like DynamicType() or IsKind() -// -DEFINE_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject) -private: - Quantity_Color myColor; - TopoDS_Shape myShape; - - Handle(Graphic3d_AspectFillArea3d) myAspect; - Standard_Real myDeflection; - - Standard_Boolean myX1OnOff; - Standard_Boolean myXBlueOnOff; - Standard_Boolean myXGreenOnOff; - Standard_Boolean myXRedOnOff; - Standard_Boolean myY1OnOff; - Standard_Boolean myYBlueOnOff; - Standard_Boolean myYGreenOnOff; - Standard_Boolean myYRedOnOff; - Standard_Boolean myZ1OnOff; - Standard_Boolean myZBlueOnOff; - Standard_Boolean myZGreenOnOff; - Standard_Boolean myZRedOnOff; - - gp_Pnt BAR; - - Standard_Real Umin; - Standard_Real Umax; - Standard_Real Vmin; - Standard_Real Vmax; - Standard_Real dUmax; - Standard_Real dVmax; - - Standard_Real red; - Standard_Real green; - Standard_Real blue; - - - -//Handle(Graphic3d_Texture2Dmanual) mytexture; - -}; -#endif diff --git a/samples/mfc/standard/ReadMe.md b/samples/mfc/standard/ReadMe.md index 4ab75edf4f..2b2b9a19aa 100644 --- a/samples/mfc/standard/ReadMe.md +++ b/samples/mfc/standard/ReadMe.md @@ -5,14 +5,8 @@ Visual C++ programming samples for Windows platform containing illustrating how * Geometry * Modeling - * Viewer2d - * Viewer3d * ImportExport - * Ocaf - * Triangulation * HLR - * Animation - * Convert @figure{samples_mvc.png} @@ -39,10 +33,10 @@ To run the Open CASCADE Technology samples, use command: execute run.bat [vc10|vc11|vc12|vc14] [win32|win64] [Release|Debug] [SampleName] ~~~~ -To run the **Animation** sample, use command: +To run the **Geometry** sample, use command: ~~~~ -execute run.bat vc10 win64 Debug Animation +execute run.bat vc10 win64 Debug Geometry ~~~~ @@ -61,4 +55,4 @@ To run all sample projects in MS Visual C++ at once, use command: execute msvc.bat vc10 win64 Debug ~~~~ -Note: make sure that your *PATH* environment variable contains a directory, where *msdev.exe* is located. \ No newline at end of file +Note: make sure that your *PATH* environment variable contains a directory, where *msdev.exe* is located. diff --git a/samples/mfc/standard/mfcsample/CMakeLists.txt b/samples/mfc/standard/mfcsample/CMakeLists.txt index ee9c8b20c5..8b759a89d8 100644 --- a/samples/mfc/standard/mfcsample/CMakeLists.txt +++ b/samples/mfc/standard/mfcsample/CMakeLists.txt @@ -31,7 +31,6 @@ set (COMMON_SOURCE_FILES ${MFC_STANDARD_COMMON_SAMPLES_DIR}/AISDialogs.cpp ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_StereoConfigDlg.cpp ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ParamsFacesPage.cpp ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ResultDialog.cpp - ${MFC_STANDARD_COMMON_SAMPLES_DIR}/User_Cylinder.cxx ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ColoredMeshDlg.cpp ${MFC_STANDARD_COMMON_SAMPLES_DIR}/DimensionDlg.cpp ${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsEdgePage.cpp @@ -53,15 +52,6 @@ set (COMMON_ISESSION2D_DIR ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ISession2 set (COMMON_ISESSION2D_HEADER_FILES ${COMMON_ISESSION2D_DIR}/ISession2D_Shape.h ) set (COMMON_ISESSION2D_SOURCE_FILES ${COMMON_ISESSION2D_DIR}/ISession2D_Shape.cpp ) -# Common Primitive -set (COMMON_PRIMITIVE_DIR ${MFC_STANDARD_COMMON_SAMPLES_DIR}/Primitive) -set (COMMON_PRIMITIVE_HEADER_FILES ${COMMON_PRIMITIVE_DIR}/Sample2D_Face.h - ${COMMON_PRIMITIVE_DIR}/Sample2D_Image.h - ${COMMON_PRIMITIVE_DIR}/Sample2D_Markers.h ) -set (COMMON_PRIMITIVE_SOURCE_FILES ${COMMON_PRIMITIVE_DIR}/Sample2D_Face.cpp - ${COMMON_PRIMITIVE_DIR}/Sample2D_Image.cpp - ${COMMON_PRIMITIVE_DIR}/Sample2D_Markers.cpp ) - # Common Resource2D set (COMMON_RESOURCE2D_DIR ${MFC_STANDARD_COMMON_SAMPLES_DIR}/Resource2D) set (COMMON_RESOURCE2D_HEADER_FILES ${COMMON_RESOURCE2D_DIR}/CircularGrid.h @@ -112,14 +102,12 @@ set (COMMON_RESOURCE_FILES ${COMMON_RESOURCE_DIR}/2dChildFrameTB.bmp # groups in the VS solution source_group ( "Header Files" FILES ${COMMON_HEADER_FILES} ${COMMON_IE_HEADER_FILES} - ${COMMON_PRIMITIVE_HEADER_FILES} ${COMMON_RESOURCE2D_HEADER_FILES} ${COMMON_ISESSION2D_HEADER_FILES}) source_group ("Source Files" FILES ${mfcsample_SOURCE_FILES} ${COMMON_SOURCE_FILES} ${COMMON_IE_SOURCE_FILES} - ${COMMON_PRIMITIVE_SOURCE_FILES} ${COMMON_RESOURCE2D_SOURCE_FILES} ${COMMON_ISESSION2D_SOURCE_FILES}) @@ -131,8 +119,6 @@ add_library ( mfcsample ${mfcsample_SOURCE_FILES} ${COMMON_SOURCE_FILES} ${COMMON_IE_HEADER_FILES} ${COMMON_IE_SOURCE_FILES} - ${COMMON_PRIMITIVE_HEADER_FILES} - ${COMMON_PRIMITIVE_SOURCE_FILES} ${COMMON_RESOURCE2D_HEADER_FILES} ${COMMON_RESOURCE2D_SOURCE_FILES} ${COMMON_ISESSION2D_HEADER_FILES} @@ -163,7 +149,6 @@ include_directories( ${CMAKE_BINARY_DIR}/inc ${MFC_STANDARD_COMMON_SAMPLES_DIR} ${COMMON_IE_DIR} ${COMMON_ISESSION2D_DIR} - ${COMMON_PRIMITIVE_DIR} ${COMMON_RESOURCE2D_DIR}) # OCCT libraries for using diff --git a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj index 52e741b35b..4394b3b834 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj +++ b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj @@ -576,22 +576,6 @@ Create ..\Common\stdafx.h - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Disabled %(AdditionalIncludeDirectories) @@ -640,39 +624,6 @@ %(AdditionalIncludeDirectories) %(PreprocessorDefinitions) - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Disabled %(AdditionalIncludeDirectories) @@ -729,13 +680,9 @@ - - - - diff --git a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj.filters b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj.filters index 9a0cc52520..712ec1084b 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj.filters +++ b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj.filters @@ -9,10 +9,6 @@ {c0619ee9-00d5-4587-ac1c-7f8e97f7d314} cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - {6c21e485-b17c-4b50-a64e-8032b8867916} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - {5cef5b98-dbfe-4dc1-9030-6333f582b9e6} @@ -24,9 +20,6 @@ {da6f5036-6fe5-479c-9407-d4c6bb3bc83f} h;hpp;hxx;hm;inl - - {f0d2a1cd-637f-4375-8949-9c5bc227c1a6} - {cad0c56e-8d9f-4728-9d66-f7188c6080d7} @@ -90,9 +83,6 @@ Source Files - - Source Files - Source Files\Resource2D-src @@ -102,15 +92,6 @@ Source Files\Resource2D-src - - Source Files\Primitive-src - - - Source Files\Primitive-src - - - Source Files\Primitive-src - Source Files\ISession2D-src @@ -199,9 +180,6 @@ Header Files - - Header Files - Header Files\Resource2D-headers @@ -211,15 +189,6 @@ Header Files\Resource2D-headers - - Header Files\Primitive-headers - - - Header Files\Primitive-headers - - - Header Files\Primitive-headers - Header Files\ISession2D-headers