From 5c1f974e17a224e1897b3be528af624bc7ed471e Mon Sep 17 00:00:00 2001 From: aba <aba@opencascade.com> Date: Tue, 12 Mar 2013 09:19:35 +0400 Subject: [PATCH] 0023776: Redesign of MFC samples after V2d viewer removing --- .gitignore | 7 + .../01_Geometry/adm/win/vc10/Geometry.vcxproj | 31 +- .../adm/win/vc10/Geometry.vcxproj.filters | 10 +- .../01_Geometry/adm/win/vc11/Geometry.vcxproj | 31 +- .../adm/win/vc11/Geometry.vcxproj.filters | 10 +- .../01_Geometry/adm/win/vc8/Geometry.vcproj | 64 +- .../01_Geometry/adm/win/vc9/Geometry.vcproj | 64 +- .../mfc/standard/01_Geometry/src/ChildFrm.cpp | 82 +- .../mfc/standard/01_Geometry/src/ChildFrm.h | 38 +- .../standard/01_Geometry/src/ChildFrm2d.cpp | 70 +- .../mfc/standard/01_Geometry/src/ChildFrm2d.h | 42 +- .../standard/01_Geometry/src/GeoAlgo_Sol.cxx | 23 +- .../standard/01_Geometry/src/GeoAlgo_Sol.hxx | 32 +- .../standard/01_Geometry/src/GeomSources.cpp | 4779 +++++++++-------- .../standard/01_Geometry/src/GeomSources.h | 182 +- .../standard/01_Geometry/src/GeometryApp.cpp | 94 +- .../standard/01_Geometry/src/GeometryApp.h | 34 +- .../standard/01_Geometry/src/GeometryDoc.cpp | 1497 +++--- .../standard/01_Geometry/src/GeometryDoc.h | 376 +- .../standard/01_Geometry/src/GeometryView.cpp | 562 +- .../standard/01_Geometry/src/GeometryView.h | 111 +- .../01_Geometry/src/GeometryView2D.cpp | 396 +- .../standard/01_Geometry/src/GeometryView2D.h | 70 +- .../src/ISession2D/ISession2D_Curve.cpp | 142 +- .../src/ISession2D/ISession2D_Curve.h | 134 +- .../ISession2D_InteractiveContext.cpp | 166 - .../ISession2D_InteractiveContext.h | 98 - .../ISession2D/ISession2D_SensitiveCurve.cpp | 15 +- .../ISession2D/ISession2D_SensitiveCurve.h | 65 +- .../src/ISession2D/ISession_Curve.cpp | 3 - .../src/ISession2D/ISession_Curve.h | 16 +- .../src/ISession2D/ISession_Direction.cpp | 30 - .../src/ISession2D/ISession_Direction.h | 21 +- .../src/ISession2D/ISession_Point.cpp | 11 - .../src/ISession2D/ISession_Point.h | 33 +- .../src/ISession2D/ISession_Surface.cpp | 9 - .../src/ISession2D/ISession_Surface.h | 6 +- .../src/ISession2D/ISession_Text.cpp | 42 +- .../src/ISession2D/ISession_Text.h | 39 +- .../mfc/standard/01_Geometry/src/MainFrm.cpp | 105 +- .../mfc/standard/01_Geometry/src/MainFrm.h | 40 +- samples/mfc/standard/01_Geometry/src/StdAfx.h | 338 +- .../02_Modeling/adm/win/vc10/Modeling.vcxproj | 8 +- .../02_Modeling/adm/win/vc11/Modeling.vcxproj | 8 +- .../02_Modeling/adm/win/vc8/Modeling.vcproj | 8 +- .../02_Modeling/adm/win/vc9/Modeling.vcproj | 8 +- .../standard/02_Modeling/src/ModelingApp.cpp | 4 +- .../standard/02_Modeling/src/ModelingApp.h | 27 +- .../standard/02_Modeling/src/ModelingDoc.cpp | 2 +- samples/mfc/standard/03_Viewer2d/README.txt | 16 + .../03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj | 144 +- .../adm/win/vc10/Viewer2d.vcxproj.filters | 48 - .../03_Viewer2d/adm/win/vc11/Viewer2d.vcxproj | 144 +- .../adm/win/vc11/Viewer2d.vcxproj.filters | 48 - .../03_Viewer2d/adm/win/vc8/Viewer2d.vcproj | 408 +- .../03_Viewer2d/adm/win/vc9/Viewer2d.vcproj | 408 +- .../mfc/standard/03_Viewer2d/res/Viewer2d.aps | Bin 41036 -> 41208 bytes .../mfc/standard/03_Viewer2d/res/Viewer2d.rc | 6 +- .../ColorNewColorCubeColorMapDialog.cpp | 63 - .../ColorNewColorCubeColorMapDialog.h | 57 - .../ColorNewColorRampColorMapDialog.cpp | 144 - .../src/Properties/ColorPropertyPage.cpp | 286 - .../src/Properties/ColorPropertyPage.h | 83 - .../src/Properties/FontPropertyPage.cpp | 267 - .../src/Properties/FontPropertyPage.h | 76 - .../src/Properties/MarkPropertyPage.cpp | 172 - .../src/Properties/MarkPropertyPage.h | 78 - .../src/Properties/PropertiesDialog.rc2 | 236 - .../src/Properties/PropertiesSheet.cpp | 55 - .../src/Properties/PropertiesSheet.h | 68 - .../src/Properties/TypePropertyPage.cpp | 287 - .../src/Properties/TypePropertyPage.h | 81 - .../src/Properties/WidthPropertyPage.cpp | 184 - .../src/Properties/WidthPropertyPage.h | 73 - .../colornewcolorrampcolormapDialog.h | 61 - samples/mfc/standard/03_Viewer2d/src/StdAfx.h | 234 +- .../standard/03_Viewer2d/src/Viewer2dApp.cpp | 5 +- .../standard/03_Viewer2d/src/Viewer2dApp.h | 18 +- .../standard/03_Viewer2d/src/Viewer2dDoc.cpp | 1096 +--- .../standard/03_Viewer2d/src/Viewer2dDoc.h | 6 +- .../04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj | 8 +- .../04_Viewer3d/adm/win/vc11/Viewer3d.vcxproj | 8 +- .../04_Viewer3d/adm/win/vc8/Viewer3d.vcproj | 8 +- .../04_Viewer3d/adm/win/vc9/Viewer3d.vcproj | 8 +- .../src/TexturesExt_Presentation.cpp | 4 +- .../standard/04_Viewer3d/src/Viewer3dApp.cpp | 4 +- .../standard/04_Viewer3d/src/Viewer3dApp.h | 20 +- .../standard/04_Viewer3d/src/Viewer3dDoc.cpp | 602 +-- .../adm/win/vc10/ImportExport.vcxproj | 8 +- .../adm/win/vc11/ImportExport.vcxproj | 8 +- .../adm/win/vc8/ImportExport.vcproj | 8 +- .../adm/win/vc9/ImportExport.vcproj | 8 +- .../05_ImportExport/src/ImportExportApp.cpp | 25 +- .../05_ImportExport/src/ImportExportApp.h | 30 +- .../06_Ocaf/adm/win/vc10/Ocaf.vcxproj | 8 +- .../06_Ocaf/adm/win/vc11/Ocaf.vcxproj | 8 +- .../standard/06_Ocaf/adm/win/vc8/Ocaf.vcproj | 8 +- .../standard/06_Ocaf/adm/win/vc9/Ocaf.vcproj | 8 +- samples/mfc/standard/06_Ocaf/src/OcafApp.cpp | 30 +- samples/mfc/standard/06_Ocaf/src/OcafApp.h | 37 +- .../adm/win/vc10/Triangulation.vcxproj | 8 +- .../adm/win/vc11/Triangulation.vcxproj | 8 +- .../adm/win/vc8/Triangulation.vcproj | 8 +- .../adm/win/vc9/Triangulation.vcproj | 8 +- .../src/Tesselate_Presentation.cpp | 2 +- .../07_Triangulation/src/TriangulationApp.cpp | 4 +- .../07_Triangulation/src/TriangulationApp.h | 18 +- .../07_Triangulation/src/TriangulationDoc.cpp | 51 +- .../standard/08_HLR/adm/win/vc10/HLR.vcxproj | 144 +- .../08_HLR/adm/win/vc10/HLR.vcxproj.filters | 51 - .../standard/08_HLR/adm/win/vc11/HLR.vcxproj | 144 +- .../08_HLR/adm/win/vc11/HLR.vcxproj.filters | 51 - .../standard/08_HLR/adm/win/vc8/HLR.vcproj | 412 +- .../standard/08_HLR/adm/win/vc9/HLR.vcproj | 412 +- samples/mfc/standard/08_HLR/res/HLR.APS | Bin 54136 -> 78304 bytes samples/mfc/standard/08_HLR/res/HLR.rc | 368 +- samples/mfc/standard/08_HLR/src/HLRApp.cpp | 96 +- samples/mfc/standard/08_HLR/src/HLRApp.h | 28 +- samples/mfc/standard/08_HLR/src/HLRDoc.cpp | 157 +- samples/mfc/standard/08_HLR/src/HLRDoc.h | 44 +- samples/mfc/standard/08_HLR/src/HLRView2D.cpp | 68 +- samples/mfc/standard/08_HLR/src/HLRView2D.h | 62 +- .../ColorNewColorCubeColorMapDialog.cpp | 70 - .../ColorNewColorCubeColorMapDialog.h | 59 - .../ColorNewColorRampColorMapDialog.cpp | 151 - .../src/Properties/ColorPropertyPage.cpp | 294 - .../08_HLR/src/Properties/ColorPropertyPage.h | 86 - .../src/Properties/FontPropertyPage.cpp | 275 - .../08_HLR/src/Properties/FontPropertyPage.h | 80 - .../src/Properties/MarkPropertyPage.cpp | 180 - .../08_HLR/src/Properties/MarkPropertyPage.h | 82 - .../src/Properties/PropertiesDialog.rc2 | 236 - .../08_HLR/src/Properties/PropertiesSheet.cpp | 63 - .../08_HLR/src/Properties/PropertiesSheet.h | 68 - .../src/Properties/TypePropertyPage.cpp | 294 - .../08_HLR/src/Properties/TypePropertyPage.h | 84 - .../src/Properties/WidthPropertyPage.cpp | 191 - .../08_HLR/src/Properties/WidthPropertyPage.h | 78 - .../colornewcolorrampcolormapDialog.h | 64 - .../standard/08_HLR/src/SelectionDialog.cpp | 245 +- .../mfc/standard/08_HLR/src/SelectionDialog.h | 156 +- samples/mfc/standard/08_HLR/src/StdAfx.h | 30 - .../adm/win/vc10/Animation.vcxproj | 8 +- .../adm/win/vc11/Animation.vcxproj | 8 +- .../09_Animation/adm/win/vc8/Animation.vcproj | 8 +- .../09_Animation/adm/win/vc9/Animation.vcproj | 8 +- .../09_Animation/src/AnimationApp.cpp | 8 +- .../standard/09_Animation/src/AnimationApp.h | 28 +- .../09_Animation/src/AnimationDoc.cpp | 2 +- .../09_Animation/src/AnimationView3D.cpp | 27 +- .../10_Convert/adm/win/vc10/Convert.vcxproj | 8 +- .../10_Convert/adm/win/vc11/Convert.vcxproj | 8 +- .../10_Convert/adm/win/vc8/Convert.vcproj | 8 +- .../10_Convert/adm/win/vc9/Convert.vcproj | 8 +- .../standard/10_Convert/src/WNT/OCCDemo.cpp | 12 +- .../mfc/standard/10_Convert/src/WNT/OCCDemo.h | 34 +- .../10_Convert/src/WNT/OCCDemoDoc.cpp | 51 +- .../ISession2D_InteractiveContext.cpp | 461 -- .../ISession2D_InteractiveContext.h | 149 - .../ISession2D/ISession2D_ObjectOwner.cpp | 43 - .../ISession2D/ISession2D_ObjectOwner.h | 62 - .../Common/ISession2D/ISession2D_Shape.cpp | 359 +- .../Common/ISession2D/ISession2D_Shape.h | 13 +- .../Common/ImportExport/ImportExport.cpp | 2 +- samples/mfc/standard/Common/OCC_2dApp.cpp | 23 - samples/mfc/standard/Common/OCC_2dApp.h | 28 - .../mfc/standard/Common/OCC_2dChildFrame.cpp | 34 +- samples/mfc/standard/Common/OCC_2dDoc.cpp | 97 +- samples/mfc/standard/Common/OCC_2dDoc.h | 33 +- samples/mfc/standard/Common/OCC_2dView.cpp | 738 +-- samples/mfc/standard/Common/OCC_2dView.h | 183 +- samples/mfc/standard/Common/OCC_3dApp.cpp | 26 - samples/mfc/standard/Common/OCC_3dApp.h | 28 - samples/mfc/standard/Common/OCC_3dBaseDoc.cpp | 227 +- samples/mfc/standard/Common/OCC_3dBaseDoc.h | 122 +- .../mfc/standard/Common/OCC_3dChildFrame.cpp | 28 +- samples/mfc/standard/Common/OCC_3dView.cpp | 500 +- samples/mfc/standard/Common/OCC_3dView.h | 8 +- samples/mfc/standard/Common/OCC_App.cpp | 176 + .../Common/{OCC_BaseApp.h => OCC_App.h} | 14 +- samples/mfc/standard/Common/OCC_BaseApp.cpp | 143 - .../standard/Common/OCC_BaseChildFrame.cpp | 44 +- samples/mfc/standard/Common/OCC_BaseDoc.h | 44 +- samples/mfc/standard/Common/OCC_MainFrame.cpp | 179 +- samples/mfc/standard/Common/OCC_MainFrame.h | 2 +- .../Common/Primitive/Sample2D_Curve.cpp | 66 - .../Common/Primitive/Sample2D_Curve.h | 123 - .../Common/Primitive/Sample2D_Face.cpp | 572 +- .../standard/Common/Primitive/Sample2D_Face.h | 121 +- .../Common/Primitive/Sample2D_Image.cpp | 106 +- .../Common/Primitive/Sample2D_Image.h | 99 +- .../Common/Primitive/Sample2D_Line.cpp | 41 - .../standard/Common/Primitive/Sample2D_Line.h | 47 - .../Common/Primitive/Sample2D_Markers.cpp | 144 +- .../Common/Primitive/Sample2D_Markers.h | 92 +- .../Common/Primitive/Sample2D_Rectagle.cpp | 57 - .../Common/Primitive/Sample2D_Rectangle.h | 62 - .../Common/Primitive/Sample2D_Text.cpp | 85 +- .../standard/Common/Primitive/Sample2D_Text.h | 113 +- .../standard/Common/Resource2D/CircularGrid.h | 4 +- .../Common/Resource2D/RectangularGrid.h | 4 +- samples/mfc/standard/Common/StdAfx.h | 100 +- samples/mfc/standard/Common/User_Cylinder.cxx | 783 ++- .../mfc/standard/Common/res/OCC_Resource.aps | Bin 113108 -> 133212 bytes .../mfc/standard/Common/res/OCC_Resource.h | 6 +- .../mfc/standard/Common/res/OCC_Resource.rc | 254 +- .../mfcsample/adm/win/vc10/mfcsample.vcxproj | 131 +- .../adm/win/vc10/mfcsample.vcxproj.filters | 46 +- .../mfcsample/adm/win/vc11/mfcsample.vcxproj | 131 +- .../adm/win/vc11/mfcsample.vcxproj.filters | 46 +- .../mfcsample/adm/win/vc8/mfcsample.vcproj | 366 +- .../mfcsample/adm/win/vc9/mfcsample.vcproj | 362 +- 212 files changed, 9053 insertions(+), 19513 deletions(-) delete mode 100755 samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_InteractiveContext.cpp delete mode 100755 samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_InteractiveContext.h create mode 100644 samples/mfc/standard/03_Viewer2d/README.txt delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/ColorNewColorCubeColorMapDialog.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/ColorNewColorCubeColorMapDialog.h delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/ColorNewColorRampColorMapDialog.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/ColorPropertyPage.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/ColorPropertyPage.h delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/FontPropertyPage.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/FontPropertyPage.h delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/MarkPropertyPage.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/MarkPropertyPage.h delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/PropertiesDialog.rc2 delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/PropertiesSheet.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/PropertiesSheet.h delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/TypePropertyPage.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/TypePropertyPage.h delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/WidthPropertyPage.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/WidthPropertyPage.h delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Properties/colornewcolorrampcolormapDialog.h delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/ColorNewColorCubeColorMapDialog.cpp delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/ColorNewColorCubeColorMapDialog.h delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/ColorNewColorRampColorMapDialog.cpp delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/ColorPropertyPage.cpp delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/ColorPropertyPage.h delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/FontPropertyPage.cpp delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/FontPropertyPage.h delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/MarkPropertyPage.cpp delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/MarkPropertyPage.h delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/PropertiesDialog.rc2 delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/PropertiesSheet.cpp delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/PropertiesSheet.h delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/TypePropertyPage.cpp delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/TypePropertyPage.h delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/WidthPropertyPage.cpp delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/WidthPropertyPage.h delete mode 100755 samples/mfc/standard/08_HLR/src/Properties/colornewcolorrampcolormapDialog.h delete mode 100755 samples/mfc/standard/Common/ISession2D/ISession2D_InteractiveContext.cpp delete mode 100755 samples/mfc/standard/Common/ISession2D/ISession2D_InteractiveContext.h delete mode 100755 samples/mfc/standard/Common/ISession2D/ISession2D_ObjectOwner.cpp delete mode 100755 samples/mfc/standard/Common/ISession2D/ISession2D_ObjectOwner.h delete mode 100755 samples/mfc/standard/Common/OCC_2dApp.cpp delete mode 100755 samples/mfc/standard/Common/OCC_2dApp.h delete mode 100755 samples/mfc/standard/Common/OCC_3dApp.cpp delete mode 100755 samples/mfc/standard/Common/OCC_3dApp.h create mode 100644 samples/mfc/standard/Common/OCC_App.cpp rename samples/mfc/standard/Common/{OCC_BaseApp.h => OCC_App.h} (67%) mode change 100755 => 100644 delete mode 100755 samples/mfc/standard/Common/OCC_BaseApp.cpp delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Curve.cpp delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Curve.h delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Line.cpp delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Line.h delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Rectagle.cpp delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Rectangle.h diff --git a/.gitignore b/.gitignore index 5c04544c31..63daa70aeb 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,12 @@ win32 win64 +# standard names of directories for objects and binaries for samples +bin +obj +Debug +Release + # project files and artifacts /adm/msvc /adm/wnt @@ -23,6 +29,7 @@ win64 /adm/make /adm/cmake *.vcproj*user +*.csproj*user *.ncb *.suo *.sdf diff --git a/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj b/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj index aba0eca726..b4385ec57d 100644 --- a/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj +++ b/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj @@ -112,7 +112,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bin/Geometry.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -155,7 +155,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bin/Geometry.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -198,7 +198,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bind/Geometry.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -242,7 +242,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../..\win64\vc10\bind/Geometry.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -457,24 +457,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\src\ISession2D\ISession2D_InteractiveContext.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BrowseInformation> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\src\ISession2D\ISession2D_SensitiveCurve.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -599,14 +581,13 @@ <ItemGroup> <ClInclude Include="..\..\..\src\ChildFrm.h" /> <ClInclude Include="..\..\..\src\ChildFrm2d.h" /> - <ClInclude Include="src\GeoAlgo_Sol.hxx" /> + <ClInclude Include="..\..\..\src\GeoAlgo_Sol.hxx" /> <ClInclude Include="..\..\..\src\GeometryApp.h" /> <ClInclude Include="..\..\..\src\GeometryDoc.h" /> <ClInclude Include="..\..\..\src\GeometryView.h" /> <ClInclude Include="..\..\..\src\GeometryView2D.h" /> <ClInclude Include="..\..\..\src\GeomSources.h" /> <ClInclude Include="..\..\..\src\ISession2D\ISession2D_Curve.h" /> - <ClInclude Include="..\..\..\src\ISession2D\ISession2D_InteractiveContext.h" /> <ClInclude Include="..\..\..\src\ISession2D\ISession2D_SensitiveCurve.h" /> <ClInclude Include="..\..\..\src\ISession2D\ISession_Curve.h" /> <ClInclude Include="..\..\..\src\ISession2D\ISession_Direction.h" /> @@ -614,7 +595,7 @@ <ClInclude Include="..\..\..\src\ISession2D\ISession_Surface.h" /> <ClInclude Include="..\..\..\src\ISession2D\ISession_Text.h" /> <ClInclude Include="..\..\..\src\MainFrm.h" /> - <ClInclude Include="res\resource.h" /> + <ClInclude Include="..\..\..\res\resource.h" /> <ClInclude Include="..\..\..\src\StdAfx.h" /> </ItemGroup> <ItemGroup> diff --git a/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj.filters b/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj.filters index ac4ea16e81..812b3b1160 100644 --- a/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj.filters +++ b/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj.filters @@ -54,9 +54,6 @@ <ClCompile Include="..\..\..\src\ISession2D\ISession2D_Curve.cpp"> <Filter>Source Files\ISession2d</Filter> </ClCompile> - <ClCompile Include="..\..\..\src\ISession2D\ISession2D_InteractiveContext.cpp"> - <Filter>Source Files\ISession2d</Filter> - </ClCompile> <ClCompile Include="..\..\..\src\ISession2D\ISession2D_SensitiveCurve.cpp"> <Filter>Source Files\ISession2d</Filter> </ClCompile> @@ -88,7 +85,7 @@ <ClInclude Include="..\..\..\src\ChildFrm2d.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="src\GeoAlgo_Sol.hxx"> + <ClInclude Include="..\..\..\src\GeoAlgo_Sol.hxx"> <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\..\..\src\GeometryApp.h"> @@ -109,9 +106,6 @@ <ClInclude Include="..\..\..\src\ISession2D\ISession2D_Curve.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\ISession2D\ISession2D_InteractiveContext.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\src\ISession2D\ISession2D_SensitiveCurve.h"> <Filter>Header Files</Filter> </ClInclude> @@ -133,7 +127,7 @@ <ClInclude Include="..\..\..\src\MainFrm.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="res\resource.h"> + <ClInclude Include="..\..\..\res\resource.h"> <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\..\..\src\StdAfx.h"> diff --git a/samples/mfc/standard/01_Geometry/adm/win/vc11/Geometry.vcxproj b/samples/mfc/standard/01_Geometry/adm/win/vc11/Geometry.vcxproj index 84f33ebed4..368497488d 100644 --- a/samples/mfc/standard/01_Geometry/adm/win/vc11/Geometry.vcxproj +++ b/samples/mfc/standard/01_Geometry/adm/win/vc11/Geometry.vcxproj @@ -116,7 +116,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bin/Geometry.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -159,7 +159,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bin/Geometry.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -202,7 +202,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bind/Geometry.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -246,7 +246,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../..\win64\vc11\bind/Geometry.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -461,24 +461,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\src\ISession2D\ISession2D_InteractiveContext.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BrowseInformation> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\src\ISession2D\ISession2D_SensitiveCurve.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -603,14 +585,13 @@ <ItemGroup> <ClInclude Include="..\..\..\src\ChildFrm.h" /> <ClInclude Include="..\..\..\src\ChildFrm2d.h" /> - <ClInclude Include="src\GeoAlgo_Sol.hxx" /> + <ClInclude Include="..\..\..\src\GeoAlgo_Sol.hxx" /> <ClInclude Include="..\..\..\src\GeometryApp.h" /> <ClInclude Include="..\..\..\src\GeometryDoc.h" /> <ClInclude Include="..\..\..\src\GeometryView.h" /> <ClInclude Include="..\..\..\src\GeometryView2D.h" /> <ClInclude Include="..\..\..\src\GeomSources.h" /> <ClInclude Include="..\..\..\src\ISession2D\ISession2D_Curve.h" /> - <ClInclude Include="..\..\..\src\ISession2D\ISession2D_InteractiveContext.h" /> <ClInclude Include="..\..\..\src\ISession2D\ISession2D_SensitiveCurve.h" /> <ClInclude Include="..\..\..\src\ISession2D\ISession_Curve.h" /> <ClInclude Include="..\..\..\src\ISession2D\ISession_Direction.h" /> @@ -618,7 +599,7 @@ <ClInclude Include="..\..\..\src\ISession2D\ISession_Surface.h" /> <ClInclude Include="..\..\..\src\ISession2D\ISession_Text.h" /> <ClInclude Include="..\..\..\src\MainFrm.h" /> - <ClInclude Include="res\resource.h" /> + <ClInclude Include="..\..\..\res\resource.h" /> <ClInclude Include="..\..\..\src\StdAfx.h" /> </ItemGroup> <ItemGroup> diff --git a/samples/mfc/standard/01_Geometry/adm/win/vc11/Geometry.vcxproj.filters b/samples/mfc/standard/01_Geometry/adm/win/vc11/Geometry.vcxproj.filters index ac4ea16e81..812b3b1160 100644 --- a/samples/mfc/standard/01_Geometry/adm/win/vc11/Geometry.vcxproj.filters +++ b/samples/mfc/standard/01_Geometry/adm/win/vc11/Geometry.vcxproj.filters @@ -54,9 +54,6 @@ <ClCompile Include="..\..\..\src\ISession2D\ISession2D_Curve.cpp"> <Filter>Source Files\ISession2d</Filter> </ClCompile> - <ClCompile Include="..\..\..\src\ISession2D\ISession2D_InteractiveContext.cpp"> - <Filter>Source Files\ISession2d</Filter> - </ClCompile> <ClCompile Include="..\..\..\src\ISession2D\ISession2D_SensitiveCurve.cpp"> <Filter>Source Files\ISession2d</Filter> </ClCompile> @@ -88,7 +85,7 @@ <ClInclude Include="..\..\..\src\ChildFrm2d.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="src\GeoAlgo_Sol.hxx"> + <ClInclude Include="..\..\..\src\GeoAlgo_Sol.hxx"> <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\..\..\src\GeometryApp.h"> @@ -109,9 +106,6 @@ <ClInclude Include="..\..\..\src\ISession2D\ISession2D_Curve.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\ISession2D\ISession2D_InteractiveContext.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\src\ISession2D\ISession2D_SensitiveCurve.h"> <Filter>Header Files</Filter> </ClInclude> @@ -133,7 +127,7 @@ <ClInclude Include="..\..\..\src\MainFrm.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="res\resource.h"> + <ClInclude Include="..\..\..\res\resource.h"> <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\..\..\src\StdAfx.h"> diff --git a/samples/mfc/standard/01_Geometry/adm/win/vc8/Geometry.vcproj b/samples/mfc/standard/01_Geometry/adm/win/vc8/Geometry.vcproj index 2bb157a274..234bba341a 100644 --- a/samples/mfc/standard/01_Geometry/adm/win/vc8/Geometry.vcproj +++ b/samples/mfc/standard/01_Geometry/adm/win/vc8/Geometry.vcproj @@ -81,7 +81,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKMesh.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKMesh.lib" OutputFile="../../../..\win32\vc8\bin/Geometry.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -179,7 +179,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKMesh.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKMesh.lib" OutputFile="../../../..\win64\vc8\bin/Geometry.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -277,7 +277,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKMesh.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKMesh.lib" OutputFile="../../../..\win32\vc8\bind/Geometry.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -376,7 +376,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKMesh.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKMesh.lib" OutputFile="../../../..\\win64\vc8\bind/Geometry.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -999,54 +999,6 @@ /> </FileConfiguration> </File> - <File - RelativePath="..\..\..\src\ISession2D\ISession2D_InteractiveContext.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - BrowseInformation="1" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - BrowseInformation="1" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\src\ISession2D\ISession2D_SensitiveCurve.cpp" > @@ -1350,7 +1302,7 @@ > </File> <File - RelativePath=".\src\GeoAlgo_Sol.hxx" + RelativePath="..\..\..\src\GeoAlgo_Sol.hxx" > </File> <File @@ -1377,10 +1329,6 @@ RelativePath="..\..\..\src\ISession2D\ISession2D_Curve.h" > </File> - <File - RelativePath="..\..\..\src\ISession2D\ISession2D_InteractiveContext.h" - > - </File> <File RelativePath="..\..\..\src\ISession2D\ISession2D_SensitiveCurve.h" > @@ -1410,7 +1358,7 @@ > </File> <File - RelativePath="res\resource.h" + RelativePath="..\..\..\res\resource.h" > </File> <File diff --git a/samples/mfc/standard/01_Geometry/adm/win/vc9/Geometry.vcproj b/samples/mfc/standard/01_Geometry/adm/win/vc9/Geometry.vcproj index e5b45fd44b..966d5fb430 100644 --- a/samples/mfc/standard/01_Geometry/adm/win/vc9/Geometry.vcproj +++ b/samples/mfc/standard/01_Geometry/adm/win/vc9/Geometry.vcproj @@ -82,7 +82,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKMesh.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKMesh.lib" OutputFile="../../../..\win32\vc9\bin/Geometry.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -179,7 +179,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKMesh.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKMesh.lib" OutputFile="../../../..\win64\vc9\bin/Geometry.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -276,7 +276,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKMesh.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKMesh.lib" OutputFile="../../../..\win32\vc9\bind/Geometry.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -374,7 +374,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKMesh.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKMesh.lib" OutputFile="../../../..\\win64\vc9\bind/Geometry.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -996,54 +996,6 @@ /> </FileConfiguration> </File> - <File - RelativePath="..\..\..\src\ISession2D\ISession2D_InteractiveContext.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - BrowseInformation="1" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - BrowseInformation="1" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\src\ISession2D\ISession2D_SensitiveCurve.cpp" > @@ -1347,7 +1299,7 @@ > </File> <File - RelativePath=".\src\GeoAlgo_Sol.hxx" + RelativePath="..\..\..\src\GeoAlgo_Sol.hxx" > </File> <File @@ -1374,10 +1326,6 @@ RelativePath="..\..\..\src\ISession2D\ISession2D_Curve.h" > </File> - <File - RelativePath="..\..\..\src\ISession2D\ISession2D_InteractiveContext.h" - > - </File> <File RelativePath="..\..\..\src\ISession2D\ISession2D_SensitiveCurve.h" > @@ -1407,7 +1355,7 @@ > </File> <File - RelativePath="res\resource.h" + RelativePath="..\..\..\res\resource.h" > </File> <File diff --git a/samples/mfc/standard/01_Geometry/src/ChildFrm.cpp b/samples/mfc/standard/01_Geometry/src/ChildFrm.cpp index dc640dbf85..237dbe561b 100755 --- a/samples/mfc/standard/01_Geometry/src/ChildFrm.cpp +++ b/samples/mfc/standard/01_Geometry/src/ChildFrm.cpp @@ -12,9 +12,9 @@ IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) - //{{AFX_MSG_MAP(CChildFrame) - ON_WM_CREATE() - //}}AFX_MSG_MAP + //{{AFX_MSG_MAP(CChildFrame) + ON_WM_CREATE() + //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// @@ -22,8 +22,8 @@ END_MESSAGE_MAP() CChildFrame::CChildFrame() { - // TODO: add member initialization code here - + // TODO: add member initialization code here + } CChildFrame::~CChildFrame() @@ -36,61 +36,59 @@ CChildFrame::~CChildFrame() #ifdef _DEBUG void CChildFrame::AssertValid() const { - CMDIChildWnd::AssertValid(); + CMDIChildWnd::AssertValid(); } void CChildFrame::Dump(CDumpContext& dc) const { - CMDIChildWnd::Dump(dc); + CMDIChildWnd::Dump(dc); } #endif //_DEBUG void CChildFrame::ActivateFrame(int nCmdShow) { - // TODO: Add your specialized code here and/or call the base class - - static BOOL first=true; - if(first){ - first=false; - CMDIChildWnd::ActivateFrame(SW_SHOWMAXIMIZED); - return; - } -/* - POSITION pos=AfxGetApp()->GetFirstDocTemplatePosition(); - CDocTemplate* DocT=AfxGetApp()->GetNextDocTemplate(pos); - POSITION p=DocT->GetFirstDocPosition(); - DocT->GetNextDoc(p); - if(p==NULL) - nCmdShow = SW_SHOWMAXIMIZED; -*/ - CMDIChildWnd::ActivateFrame(nCmdShow); + // TODO: Add your specialized code here and/or call the base class + + static BOOL first=true; + if(first){ + first=false; + CMDIChildWnd::ActivateFrame(SW_SHOWMAXIMIZED); + return; + } + /* + POSITION pos=AfxGetApp()->GetFirstDocTemplatePosition(); + CDocTemplate* DocT=AfxGetApp()->GetNextDocTemplate(pos); + POSITION p=DocT->GetFirstDocPosition(); + DocT->GetNextDoc(p); + if(p==NULL) + nCmdShow = SW_SHOWMAXIMIZED; + */ + CMDIChildWnd::ActivateFrame(nCmdShow); } int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { - if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) - return -1; - - if (!m_wndToolBar.Create(this) || !m_wndToolBar.LoadToolBar(IDR_3dCHILDFRAME)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } + if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) + return -1; - m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); - m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); - EnableDocking(CBRS_ALIGN_ANY); - DockControlBar(&m_wndToolBar); + if (!m_wndToolBar.Create(this) || !m_wndToolBar.LoadToolBar(IDR_3dCHILDFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } - return 0; + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); + EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndToolBar); + + return 0; } - - BOOL CChildFrame::DestroyWindow() { - // TODO: Add your specialized code here and/or call the base class - - return CMDIChildWnd::DestroyWindow(); + // TODO: Add your specialized code here and/or call the base class + + return CMDIChildWnd::DestroyWindow(); } diff --git a/samples/mfc/standard/01_Geometry/src/ChildFrm.h b/samples/mfc/standard/01_Geometry/src/ChildFrm.h index 596852c081..85b38d511c 100755 --- a/samples/mfc/standard/01_Geometry/src/ChildFrm.h +++ b/samples/mfc/standard/01_Geometry/src/ChildFrm.h @@ -8,32 +8,32 @@ class CChildFrame : public OCC_BaseChildFrame { - DECLARE_DYNCREATE(CChildFrame) + DECLARE_DYNCREATE(CChildFrame) public: - CChildFrame(); + CChildFrame(); -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CChildFrame) - public: - virtual void ActivateFrame(int nCmdShow = -1); - virtual BOOL DestroyWindow(); - //}}AFX_VIRTUAL - -// Implementation + // Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame) public: - virtual ~CChildFrame(); + virtual void ActivateFrame(int nCmdShow = -1); + virtual BOOL DestroyWindow(); + //}}AFX_VIRTUAL + + // Implementation +public: + virtual ~CChildFrame(); #ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; #endif -// Generated message map functions + // Generated message map functions protected: - //{{AFX_MSG(CChildFrame) - afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() + //{{AFX_MSG(CChildFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/01_Geometry/src/ChildFrm2d.cpp b/samples/mfc/standard/01_Geometry/src/ChildFrm2d.cpp index 16b773dfa1..a26eecba61 100755 --- a/samples/mfc/standard/01_Geometry/src/ChildFrm2d.cpp +++ b/samples/mfc/standard/01_Geometry/src/ChildFrm2d.cpp @@ -1,25 +1,23 @@ // ChildFrm2D.cpp : implementation of the CChildFrame2D class/ #include "stdafx.h" - #include "ChildFrm2d.h" - #include "GeometryApp.h" IMPLEMENT_DYNCREATE(CChildFrame2D, CMDIChildWnd) BEGIN_MESSAGE_MAP(CChildFrame2D, CMDIChildWnd) - //{{AFX_MSG_MAP(CChildFrame2D) - ON_WM_CREATE() - //}}AFX_MSG_MAP + //{{AFX_MSG_MAP(CChildFrame2D) + 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, + ID_SEPARATOR, // status line indicator + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL, }; @@ -28,8 +26,8 @@ static UINT indicators[] = CChildFrame2D::CChildFrame2D() { - // TODO: add member initialization code here - + // TODO: add member initialization code here + } CChildFrame2D::~CChildFrame2D() @@ -42,12 +40,12 @@ CChildFrame2D::~CChildFrame2D() #ifdef _DEBUG void CChildFrame2D::AssertValid() const { - CMDIChildWnd::AssertValid(); + CMDIChildWnd::AssertValid(); } void CChildFrame2D::Dump(CDumpContext& dc) const { - CMDIChildWnd::Dump(dc); + CMDIChildWnd::Dump(dc); } #endif //_DEBUG @@ -57,35 +55,35 @@ void CChildFrame2D::Dump(CDumpContext& dc) const int CChildFrame2D::OnCreate(LPCREATESTRUCT lpCreateStruct) { - - if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) - return -1; - - if (!m_wndToolBar.Create(this) || - !m_wndToolBar.LoadToolBar(IDR_2dCHILDFRAME)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } - // TODO: Remove this if you don't want tool tips or a resizeable toolbar - m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | - CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) + return -1; - // 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; + if (!m_wndToolBar.Create(this) || + !m_wndToolBar.LoadToolBar(IDR_2dCHILDFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + + // 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; } void CChildFrame2D::ActivateFrame(int nCmdShow) { - // TODO: Add your specialized code here and/or call the base class - - CMDIChildWnd::ActivateFrame(nCmdShow); + // TODO: Add your specialized code here and/or call the base class + + CMDIChildWnd::ActivateFrame(nCmdShow); } diff --git a/samples/mfc/standard/01_Geometry/src/ChildFrm2d.h b/samples/mfc/standard/01_Geometry/src/ChildFrm2d.h index 2cf26c62bc..525912f9fc 100755 --- a/samples/mfc/standard/01_Geometry/src/ChildFrm2d.h +++ b/samples/mfc/standard/01_Geometry/src/ChildFrm2d.h @@ -8,38 +8,38 @@ class CChildFrame2D : public OCC_BaseChildFrame { - DECLARE_DYNCREATE(CChildFrame2D) + DECLARE_DYNCREATE(CChildFrame2D) public: - CChildFrame2D(); + CChildFrame2D(); -// Attributes + // Attributes public: -// Operations + // Operations public: -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CChildFrame2D) - public: - virtual void ActivateFrame(int nCmdShow = -1); - //}}AFX_VIRTUAL - -// Implementation + // Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CChildFrame2D) public: - virtual ~CChildFrame2D(); + virtual void ActivateFrame(int nCmdShow = -1); + //}}AFX_VIRTUAL + + // Implementation +public: + virtual ~CChildFrame2D(); #ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; #endif -// Generated message map functions + // Generated message map functions protected: - //CToolBar m_wndToolBar; - //{{AFX_MSG(CChildFrame2D) - afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() + //CToolBar m_wndToolBar; + //{{AFX_MSG(CChildFrame2D) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/01_Geometry/src/GeoAlgo_Sol.cxx b/samples/mfc/standard/01_Geometry/src/GeoAlgo_Sol.cxx index 48dd6c4115..a7e3552638 100755 --- a/samples/mfc/standard/01_Geometry/src/GeoAlgo_Sol.cxx +++ b/samples/mfc/standard/01_Geometry/src/GeoAlgo_Sol.cxx @@ -34,7 +34,7 @@ //============================================================================= GeoAlgo_Sol::GeoAlgo_Sol():myIsDone(Standard_False) { - + } @@ -115,7 +115,6 @@ void GeoAlgo_Sol::Build(const TColgp_SequenceOfXYZ& seqOfXYZ) //============================================================================= Handle(Geom_BSplineSurface) GeoAlgo_Sol::Surface() const { - return myGround; } @@ -139,15 +138,15 @@ Standard_Boolean GeoAlgo_Sol::IsDone() const //============================================================================= Handle(Geom_BSplineSurface) GeoAlgo_Sol::Read(const Standard_CString aGroundName) { -// This methods read a file of points ans build a surface using plate algorithm + // This methods read a file of points ans build a surface using plate algorithm myIsDone = Standard_True; Standard_Integer nbPnt=0; -// Read points from the file + // Read points from the file filebuf fic; istream in(&fic); - + if (!fic.open(aGroundName,ios::in)){ cout << " impossible to open a file : "<<aGroundName<<endl; myIsDone = Standard_False; @@ -159,9 +158,9 @@ Handle(Geom_BSplineSurface) GeoAlgo_Sol::Read(const Standard_CString aGroundName Standard_Real x,y,z; while (!in.fail()|| !in.eof()){ if (in >> x && in >> y && in >> z){ - pntXYZ.SetX(x); - pntXYZ.SetY(y); - pntXYZ.SetZ(z); + pntXYZ.SetX(x); + pntXYZ.SetY(y); + pntXYZ.SetZ(z); nbPnt++; seqOfXYZ.Append(pntXYZ); } @@ -169,12 +168,4 @@ Handle(Geom_BSplineSurface) GeoAlgo_Sol::Read(const Standard_CString aGroundName fic.close(); Build(seqOfXYZ); return myGround; - } - - - - - - - diff --git a/samples/mfc/standard/01_Geometry/src/GeoAlgo_Sol.hxx b/samples/mfc/standard/01_Geometry/src/GeoAlgo_Sol.hxx index b14e8f5d7c..334300e8c6 100755 --- a/samples/mfc/standard/01_Geometry/src/GeoAlgo_Sol.hxx +++ b/samples/mfc/standard/01_Geometry/src/GeoAlgo_Sol.hxx @@ -33,32 +33,19 @@ class Geom_BSplineSurface; #include <Standard_Macro.hxx> #endif -class GeoAlgo_Sol { +class GeoAlgo_Sol +{ public: // Methods PUBLIC // -Standard_EXPORT GeoAlgo_Sol(); -Standard_EXPORT GeoAlgo_Sol(const Standard_CString aGroundName); -Standard_EXPORT void Build(const Standard_CString aGroundName) ; -Standard_EXPORT void Build(const TColgp_SequenceOfXYZ& aSeqofPoints) ; -Standard_EXPORT Handle_Geom_BSplineSurface Surface() const; -Standard_EXPORT Standard_Boolean IsDone() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - + Standard_EXPORT GeoAlgo_Sol(); + Standard_EXPORT GeoAlgo_Sol(const Standard_CString aGroundName); + Standard_EXPORT void Build(const Standard_CString aGroundName) ; + Standard_EXPORT void Build(const TColgp_SequenceOfXYZ& aSeqofPoints) ; + Standard_EXPORT Handle_Geom_BSplineSurface Surface() const; + Standard_EXPORT Standard_Boolean IsDone() const; private: @@ -66,14 +53,11 @@ private: // Standard_EXPORT Handle_Geom_BSplineSurface Read(const Standard_CString aGroundName) ; - - // Fields PRIVATE // Handle_Geom_BSplineSurface myGround; Standard_Boolean myIsDone; - }; diff --git a/samples/mfc/standard/01_Geometry/src/GeomSources.cpp b/samples/mfc/standard/01_Geometry/src/GeomSources.cpp index 12b8f81b01..6ac43ba82b 100755 --- a/samples/mfc/standard/01_Geometry/src/GeomSources.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeomSources.cpp @@ -6,7 +6,6 @@ #include "GeomSources.h" #include "GeometryApp.h" #include "MainFrm.h" -//#include "Geom_Axis2Placement.hxx" GeomSources::GeomSources() { @@ -15,47 +14,43 @@ GeomSources::GeomSources() GeomSources::~GeomSources() { } - - void GeomSources::PreProcess(CGeometryDoc* aDoc,DisplayType aDisplayType) { - if (aDisplayType == No2D3D ) - { - aDoc->GetAISContext()->EraseAll(Standard_False); - aDoc->Put3DOnTop(); - } + if (aDisplayType == No2D3D ) + { + aDoc->GetAISContext()->EraseAll(Standard_False); + aDoc->Put3DOnTop(); + } - if (aDisplayType == a2DNo3D) - { - aDoc->GetISessionContext()->EraseAll(); - aDoc->Put2DOnTop(); - } + if (aDisplayType == a2DNo3D) + { + aDoc->GetISessionContext()->EraseAll(); + aDoc->Put2DOnTop(); + } - if (aDisplayType != No2D3D && aDisplayType != a2D3D) - { - aDoc->Minimize3D(); - } + if (aDisplayType != No2D3D && aDisplayType != a2D3D) + { + aDoc->Minimize3D(); + } - if (aDisplayType != a2DNo3D && aDisplayType != a2D3D) - { - aDoc->Minimize2D(); - } + if (aDisplayType != a2DNo3D && aDisplayType != a2D3D) + { + aDoc->Minimize2D(); + } - if (aDisplayType == a2D3D) - { - aDoc->GetAISContext()->EraseAll(Standard_False); - aDoc->GetISessionContext()->EraseAll(); - aDoc->Put3DOnTop(false); - aDoc->Put2DOnTop(false); + if (aDisplayType == a2D3D) + { + aDoc->GetAISContext()->EraseAll(Standard_False); + aDoc->GetISessionContext()->EraseAll(); + aDoc->Put3DOnTop(false); + aDoc->Put2DOnTop(false); - // both on top - // send the message Title Horizontaly to the child of doc main frame - CGeometryApp* TheAppli = (CGeometryApp*)AfxGetApp(); - CMainFrame* TheMainFrame= (CMainFrame*)TheAppli->m_pMainWnd; - ::SendMessage(TheMainFrame->m_hWndMDIClient, WM_MDITILE, 0, 0); - } - - //aDoc->myCResultDialog.Empty(); + // both on top + // send the message Title Horizontaly to the child of doc main frame + CGeometryApp* TheAppli = (CGeometryApp*)AfxGetApp(); + CMainFrame* TheMainFrame= (CMainFrame*)TheAppli->m_pMainWnd; + ::SendMessage(TheMainFrame->m_hWndMDIClient, WM_MDITILE, 0, 0); + } } void GeomSources::PostProcess(CGeometryDoc* aDoc, @@ -65,52 +60,48 @@ void GeomSources::PostProcess(CGeometryDoc* aDoc, Quantity_Coefficient Coef /* = -1 */ /* double Zoom = -1 */) { - if (aDisplayType == No2D3D || aDisplayType == a2D3D) - { - aDoc->Fit3DViews(Coef); - //if (Zoom != -1) aDoc->Set3DViewsZoom(Zoom); - } + if (aDisplayType == No2D3D || aDisplayType == a2D3D) + { + aDoc->Fit3DViews(Coef); + } - if (aDisplayType == a2DNo3D || aDisplayType == a2D3D) - { - aDoc->Fit2DViews(); - //if (Zoom != -1) MessageBox(0,"Set 2D Zoom Not Yet Implemented","CasCade Error",MB_ICONERROR);// aDoc->Set2DViewsZoom(Zoom); - } + if (aDisplayType == a2DNo3D || aDisplayType == a2D3D) + { + aDoc->Fit2DViews(); + } - TCollection_AsciiString Message("Results are "); + TCollection_AsciiString Message("Results are "); switch (aDisplayType) { - case No2DNo3D: Message = "All results are in this box \n"; + case No2DNo3D: Message = "All results are in this box \n"; break; - case No2D3D: Message += "only in 3D \n"; + case No2D3D: Message += "only in 3D \n"; break; - case a2DNo3D: Message += "only in 2d \n"; + case a2DNo3D: Message += "only in 2d \n"; break; - case a2D3D: Message += "in both 2D and 3D \n"; + case a2D3D: Message += "in both 2D and 3D \n"; break; - } - Message += "====================================\n"; - Message += aString; - // MessageBox(0,Message.ToCString(),aTitle,MB_OK); - //aDoc->myCResultDialog.ShowWindow(SW_RESTORE); + } + Message += "====================================\n"; + Message += aString; - CString text(Message.ToCString()); - aDoc->myCResultDialog.SetText(text); + CString text(Message.ToCString()); + aDoc->myCResultDialog.SetText(text); - CString s; - if (! s.LoadString( anID )) - AfxMessageBox("Error Loading String: "); + CString s; + if (! s.LoadString( anID )) + AfxMessageBox("Error Loading String: "); - CString Title = s.Left( s.Find( '\n' )); + CString Title = s.Left( s.Find( '\n' )); - aDoc->myCResultDialog.SetTitle(Title); - aDoc->SetTitle(Title); + aDoc->myCResultDialog.SetTitle(Title); + aDoc->SetTitle(Title); } void GeomSources::AddSeparator(CGeometryDoc* aDoc,TCollection_AsciiString& aMessage) { - aMessage+= "------------------------------------------------------------------------\n"; + aMessage+= "------------------------------------------------------------------------\n"; } void GeomSources::DisplayPoint(CGeometryDoc* aDoc, gp_Pnt2d& aPoint, @@ -120,11 +111,11 @@ void GeomSources::DisplayPoint(CGeometryDoc* aDoc, Standard_Real anYoffset, Standard_Real TextScale) { - Handle(ISession_Point) aGraphicPoint = new ISession_Point(aPoint); - aDoc->GetISessionContext()->Display(aGraphicPoint,UpdateViewer); - Handle(ISession_Text) aGraphicText = new ISession_Text(aText,aPoint.X()+anXoffset,aPoint.Y()+anYoffset); - aGraphicText->SetScale (TextScale); - aDoc->GetISessionContext()->Display(aGraphicText,UpdateViewer); + Handle(ISession_Point) aGraphicPoint = new ISession_Point(aPoint); + aDoc->GetISessionContext()->Display(aGraphicPoint,UpdateViewer); + Handle(ISession_Text) aGraphicText = new ISession_Text(aText,aPoint.X()+anXoffset,aPoint.Y()+anYoffset); + aGraphicText->SetScale (TextScale); + aDoc->GetISessionContext()->Display(aGraphicText,UpdateViewer); } void GeomSources::DisplayPoint(CGeometryDoc* aDoc, @@ -136,11 +127,11 @@ void GeomSources::DisplayPoint(CGeometryDoc* aDoc, Standard_Real aZoffset, Standard_Real TextScale) { - Handle(ISession_Point) aGraphicPoint = new ISession_Point(aPoint); - aDoc->GetAISContext()->Display(aGraphicPoint,UpdateViewer); - Handle(ISession_Text) aGraphicText = new ISession_Text(aText,aPoint.X()+anXoffset,aPoint.Y()+anYoffset,aPoint.Z()+aZoffset); - aGraphicText->SetScale (TextScale); - aDoc->GetAISContext()->Display(aGraphicText,UpdateViewer); + Handle(ISession_Point) aGraphicPoint = new ISession_Point(aPoint); + aDoc->GetAISContext()->Display(aGraphicPoint,UpdateViewer); + Handle(ISession_Text) aGraphicText = new ISession_Text(aText,aPoint.X()+anXoffset,aPoint.Y()+anYoffset,aPoint.Z()+aZoffset); + aGraphicText->SetScale (TextScale); + aDoc->GetAISContext()->Display(aGraphicText,UpdateViewer); } void GeomSources::DisplayCurve(CGeometryDoc* aDoc, @@ -148,9 +139,9 @@ void GeomSources::DisplayCurve(CGeometryDoc* aDoc, Standard_Integer aColorIndex, Standard_Boolean UpdateViewer) { - Handle(ISession2D_Curve) aGraphicCurve = new ISession2D_Curve(aCurve); - aGraphicCurve->SetColorIndex(aColorIndex) ; - aDoc->GetISessionContext()->Display(aGraphicCurve,UpdateViewer); + Handle(ISession2D_Curve) aGraphicCurve = new ISession2D_Curve(aCurve); + aGraphicCurve->SetColorIndex(aColorIndex) ; + aDoc->GetISessionContext()->Display(aGraphicCurve,UpdateViewer); } void GeomSources::DisplayCurveAndCurvature(CGeometryDoc* aDoc, @@ -158,11 +149,11 @@ void GeomSources::DisplayCurveAndCurvature(CGeometryDoc* aDoc, Standard_Integer aColorIndex, Standard_Boolean UpdateViewer) { - Handle(ISession2D_Curve) aGraphicCurve = new ISession2D_Curve(aCurve); - aGraphicCurve->SetDisplayCurbure(Standard_True) ; - aGraphicCurve->SetDiscretisation(20); - aGraphicCurve->SetColorIndex(aColorIndex) ; - aDoc->GetISessionContext()->Display(aGraphicCurve,UpdateViewer); + Handle(ISession2D_Curve) aGraphicCurve = new ISession2D_Curve(aCurve); + aGraphicCurve->SetDisplayCurbure(Standard_True) ; + aGraphicCurve->SetDiscretisation(20); + aGraphicCurve->SetColorIndex(aColorIndex) ; + aDoc->GetISessionContext()->Display(aGraphicCurve,UpdateViewer); } void GeomSources::DisplayCurve(CGeometryDoc* aDoc, @@ -170,10 +161,10 @@ void GeomSources::DisplayCurve(CGeometryDoc* aDoc, Quantity_NameOfColor aNameOfColor, Standard_Boolean UpdateViewer) { - Handle(ISession_Curve) aGraphicCurve = new ISession_Curve(aCurve); - aDoc->GetAISContext()->SetColor(aGraphicCurve,aNameOfColor, Standard_False); - aGraphicCurve->Attributes()->LineAspect()->SetColor(aNameOfColor); - aDoc->GetAISContext()->Display(aGraphicCurve,UpdateViewer); + Handle(ISession_Curve) aGraphicCurve = new ISession_Curve(aCurve); + aDoc->GetAISContext()->SetColor(aGraphicCurve,aNameOfColor, Standard_False); + aGraphicCurve->Attributes()->LineAspect()->SetColor(aNameOfColor); + aDoc->GetAISContext()->Display(aGraphicCurve,UpdateViewer); } void GeomSources::DisplayCurve(CGeometryDoc* aDoc, @@ -192,20 +183,20 @@ void GeomSources::DisplaySurface(CGeometryDoc* aDoc, Quantity_NameOfColor aNameOfColor, Standard_Boolean UpdateViewer) { - Handle(ISession_Surface) aGraphicalSurface = new ISession_Surface(aSurface); - aDoc->GetAISContext()->SetColor(aGraphicalSurface,aNameOfColor, Standard_False); - aGraphicalSurface->Attributes()->FreeBoundaryAspect()->SetColor(aNameOfColor); - aGraphicalSurface->Attributes()->UIsoAspect()->SetColor(aNameOfColor); - aGraphicalSurface->Attributes()->VIsoAspect()->SetColor(aNameOfColor); - aDoc->GetAISContext()->Display(aGraphicalSurface,UpdateViewer); + Handle(ISession_Surface) aGraphicalSurface = new ISession_Surface(aSurface); + aDoc->GetAISContext()->SetColor(aGraphicalSurface,aNameOfColor, Standard_False); + aGraphicalSurface->Attributes()->FreeBoundaryAspect()->SetColor(aNameOfColor); + aGraphicalSurface->Attributes()->UIsoAspect()->SetColor(aNameOfColor); + aGraphicalSurface->Attributes()->VIsoAspect()->SetColor(aNameOfColor); + aDoc->GetAISContext()->Display(aGraphicalSurface,UpdateViewer); } void GeomSources::DisplaySurface(CGeometryDoc* aDoc, Handle(Geom_Surface) aSurface, Standard_Boolean UpdateViewer) { - Handle(ISession_Surface) aGraphicalSurface = new ISession_Surface(aSurface); - aDoc->GetAISContext()->Display(aGraphicalSurface,UpdateViewer); + Handle(ISession_Surface) aGraphicalSurface = new ISession_Surface(aSurface); + aDoc->GetAISContext()->Display(aGraphicalSurface,UpdateViewer); } // Function name : GeomSources::gpTest1 @@ -216,34 +207,33 @@ void GeomSources::gpTest1(CGeometryDoc* aDoc) { DisplayType TheDisplayType = No2D3D; PreProcess(aDoc,TheDisplayType); -//============================================================== - -gp_XYZ A(1,2,3); -gp_XYZ B(2,2,2); -gp_XYZ C(3,2,3); -Standard_Real result = A.DotCross(B,C); + //============================================================== + + gp_XYZ A(1,2,3); + gp_XYZ B(2,2,2); + gp_XYZ C(3,2,3); + Standard_Real result = A.DotCross(B,C); //============================================================== - TCollection_AsciiString Message ("\ + TCollection_AsciiString Message ("\ \n\ gp_XYZ A(1,2,3); \n\ gp_XYZ B(2,2,2); \n\ gp_XYZ C(3,2,3); \n\ Standard_Real result = A.DotCross(B,C); \n\ \n"); - AddSeparator(aDoc,Message); + AddSeparator(aDoc,Message); //-------------------------------------------------------------- DisplayPoint(aDoc,gp_Pnt(A),"A (1,2,3)",false,0.1); DisplayPoint(aDoc,gp_Pnt(B),"B (2,2,2)",false,0.1); DisplayPoint(aDoc,gp_Pnt(C),"C (3,2,3)", false,0.1); // to add a numeric value in a TCollectionAsciiString - TCollection_AsciiString Message2 (result); + TCollection_AsciiString Message2 (result); - Message+= " result = "; - Message+= Message2; - - PostProcess(aDoc,ID_BUTTON_Test_1,TheDisplayType,Message.ToCString()); + Message+= " result = "; + Message+= Message2; + PostProcess(aDoc,ID_BUTTON_Test_1,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest2 @@ -256,17 +246,17 @@ void GeomSources::gpTest2(CGeometryDoc* aDoc) PreProcess(aDoc,TheDisplayType); //============================================================== -gp_Pnt P1(1,2,3); + gp_Pnt P1(1,2,3); //============================================================== -TCollection_AsciiString Message ("\ + TCollection_AsciiString Message ("\ \n\ gp_Pnt P1(1,2,3); \n\ \n"); -AddSeparator(aDoc,Message); + AddSeparator(aDoc,Message); //-------------------------------------------------------------- -DisplayPoint(aDoc,P1,"P1 (1,2,3)",false,0.5); -PostProcess(aDoc,ID_BUTTON_Test_2,TheDisplayType,Message.ToCString(),1.0); + DisplayPoint(aDoc,P1,"P1 (1,2,3)",false,0.5); + PostProcess(aDoc,ID_BUTTON_Test_2,TheDisplayType,Message.ToCString(),1.0); } @@ -276,24 +266,23 @@ PostProcess(aDoc,ID_BUTTON_Test_2,TheDisplayType,Message.ToCString(),1.0); // Argument : CGeometryDoc* aDoc void GeomSources::gpTest3(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); //============================================================== -gp_XYZ A(1,2,3); -gp_Pnt P2(A); + gp_XYZ A(1,2,3); + gp_Pnt P2(A); //============================================================== - TCollection_AsciiString Message ("\ + TCollection_AsciiString Message ("\ \n\ gp_XYZ A(1,2,3); \n\ gp_Pnt P2(A); \n\ \n"); -AddSeparator(aDoc,Message); + AddSeparator(aDoc,Message); //-------------------------------------------------------------- -DisplayPoint(aDoc,P2,"P2 (1,2,3)",false,0.5); - -PostProcess(aDoc,ID_BUTTON_Test_3,TheDisplayType,Message.ToCString(),1.0 /*0.02*/); + DisplayPoint(aDoc,P2,"P2 (1,2,3)",false,0.5); + PostProcess(aDoc,ID_BUTTON_Test_3,TheDisplayType,Message.ToCString(),1.0 /*0.02*/); } @@ -303,14 +292,14 @@ PostProcess(aDoc,ID_BUTTON_Test_3,TheDisplayType,Message.ToCString(),1.0 /*0.02* // Argument : CGeometryDoc* aDoc void GeomSources::gpTest4(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); //============================================================== -gp_Pnt P3 = gp::Origin(); -Standard_Real TheX = P3.X(); -Standard_Real TheY = P3.Y(); -Standard_Real TheZ = P3.Z(); + gp_Pnt P3 = gp::Origin(); + Standard_Real TheX = P3.X(); + Standard_Real TheY = P3.Y(); + Standard_Real TheZ = P3.Z(); //============================================================== @@ -321,23 +310,23 @@ Standard_Real TheX = P3.X(); \n\ Standard_Real TheY = P3.Y(); \n\ Standard_Real TheZ = P3.Z(); \n\ \n"); -AddSeparator(aDoc,Message); + AddSeparator(aDoc,Message); //-------------------------------------------------------------- -DisplayPoint(aDoc,P3,"P3 = gp::Origin()",false,0.5); + DisplayPoint(aDoc,P3,"P3 = gp::Origin()",false,0.5); -TCollection_AsciiString Message2 (TheX); -TCollection_AsciiString Message3 (TheY); -TCollection_AsciiString Message4 (TheZ); - - Message += " TheX = "; - Message += Message2; - Message += " TheY = "; - Message += Message3; - Message += " TheZ = "; - Message4 = TheZ; - Message += Message4; + TCollection_AsciiString Message2 (TheX); + TCollection_AsciiString Message3 (TheY); + TCollection_AsciiString Message4 (TheZ); -PostProcess(aDoc,ID_BUTTON_Test_4,TheDisplayType,Message.ToCString(),1.0 /*0.02*/); + Message += " TheX = "; + Message += Message2; + Message += " TheY = "; + Message += Message3; + Message += " TheZ = "; + Message4 = TheZ; + Message += Message4; + + PostProcess(aDoc,ID_BUTTON_Test_4,TheDisplayType,Message.ToCString(),1.0 /*0.02*/); } @@ -347,19 +336,19 @@ PostProcess(aDoc,ID_BUTTON_Test_4,TheDisplayType,Message.ToCString(),1.0 /*0.02* // Argument : CGeometryDoc* aDoc void GeomSources::gpTest5(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); //============================================================== -gp_Pnt P1(1,2,3); -gp_Pnt P2(3,4,5); -gp_Pnt PB = P1; -Standard_Real alpha = 3; -Standard_Real beta = 7; -PB.BaryCenter(alpha,P2,beta); + gp_Pnt P1(1,2,3); + gp_Pnt P2(3,4,5); + gp_Pnt PB = P1; + Standard_Real alpha = 3; + Standard_Real beta = 7; + PB.BaryCenter(alpha,P2,beta); //============================================================== - TCollection_AsciiString Message ("\ + TCollection_AsciiString Message ("\ \n\ gp_Pnt P1(1,2,3); \n\ gp_Pnt P2(3,4,5); \n\ @@ -369,27 +358,25 @@ Standard_Real beta = 7; \n\ PB.BaryCenter(alpha,P2,beta); \n\ \n"); - AddSeparator(aDoc,Message); + AddSeparator(aDoc,Message); //-------------------------------------------------------------- - DisplayPoint(aDoc,P1,"P1",false,0.2); - DisplayPoint(aDoc,P2,"P2",false,0.2); - DisplayPoint(aDoc,PB,"PB = barycenter ( 3 * P1 , 7 * P2) ",false,0.2); + DisplayPoint(aDoc,P1,"P1",false,0.2); + DisplayPoint(aDoc,P2,"P2",false,0.2); + DisplayPoint(aDoc,PB,"PB = barycenter ( 3 * P1 , 7 * P2) ",false,0.2); - TCollection_AsciiString Message2 (PB.X()); - TCollection_AsciiString Message3 (PB.Y()); - TCollection_AsciiString Message4 (PB.Z()); + TCollection_AsciiString Message2 (PB.X()); + TCollection_AsciiString Message3 (PB.Y()); + TCollection_AsciiString Message4 (PB.Z()); - - - Message += " PB ( "; - Message += Message2; - Message += " , "; - Message += Message3; - Message += " , "; - Message += Message4; - Message += " ); "; - PostProcess(aDoc,ID_BUTTON_Test_5,TheDisplayType,Message.ToCString()); + Message += " PB ( "; + Message += Message2; + Message += " , "; + Message += Message3; + Message += " , "; + Message += Message4; + Message += " ); "; + PostProcess(aDoc,ID_BUTTON_Test_5,TheDisplayType,Message.ToCString()); } @@ -399,43 +386,45 @@ PB.BaryCenter(alpha,P2,beta); \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest6(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); //============================================================== // Compute a 3d point P as BaryCenter of an array of point -gp_Pnt P1(0,0,5); -gp_Pnt P2(1,2,3); -gp_Pnt P3(2,3,-2); -gp_Pnt P4(4,3,5); -gp_Pnt P5(5,5,4); -TColgp_Array1OfPnt array (1,5); // sizing array -array.SetValue(1,P1); -array.SetValue(2,P2); -array.SetValue(3,P3); -array.SetValue(4,P4); -array.SetValue(5,P5); - -Standard_Real Tolerance = 8; // ajout de la tolerance -GProp_PEquation PE (array,Tolerance); - -gp_Pnt P; // P declaration -Standard_Boolean IsPoint; + gp_Pnt P1(0,0,5); + gp_Pnt P2(1,2,3); + gp_Pnt P3(2,3,-2); + gp_Pnt P4(4,3,5); + gp_Pnt P5(5,5,4); + TColgp_Array1OfPnt array (1,5); // sizing array + array.SetValue(1,P1); + array.SetValue(2,P2); + array.SetValue(3,P3); + array.SetValue(4,P4); + array.SetValue(5,P5); -if (PE.IsPoint()){ - IsPoint = true; + Standard_Real Tolerance = 8; // ajout de la tolerance + GProp_PEquation PE (array,Tolerance); + + gp_Pnt P; // P declaration + Standard_Boolean IsPoint; + + if (PE.IsPoint()) + { + IsPoint = true; P = PE .Point(); - } -else { - IsPoint = false; - } + } + else + { + IsPoint = false; + } -if (PE.IsLinear()){ /*... */ } -if (PE.IsPlanar()){ /*... */ } -if (PE.IsSpace()) { /*... */ } + if (PE.IsLinear()){ /*... */ } + if (PE.IsPlanar()){ /*... */ } + if (PE.IsSpace()) { /*... */ } //============================================================== - TCollection_AsciiString Message ("\ + TCollection_AsciiString Message ("\ \n\ \n\ // Compute a 3d point P as BaryCenter of an array of point \n\ @@ -463,39 +452,55 @@ if (PE.IsLinear()){ /*... */ } \n\ if (PE.IsPlanar()){ /*... */ } \n\ if (PE.IsSpace()) { /*... */ } \n\ \n"); - AddSeparator(aDoc,Message); + AddSeparator(aDoc,Message); //-------------------------------------------------------------- - TCollection_AsciiString PointName("P"); + TCollection_AsciiString PointName("P"); for(Standard_Integer i= array.Lower();i <= array.Upper(); i++) - { - - TCollection_AsciiString TheString (i); - TheString = PointName+ TheString; - DisplayPoint(aDoc,array(i),TheString.ToCString(),false,0.5); - } + { + TCollection_AsciiString TheString (i); + TheString = PointName+ TheString; + DisplayPoint(aDoc,array(i),TheString.ToCString(),false,0.5); + } - DisplayPoint(aDoc,P,"P",false,0.5); - TCollection_AsciiString Message2 (P.X()); - TCollection_AsciiString Message3 (P.Y()); - TCollection_AsciiString Message4 (P.Z()); + DisplayPoint(aDoc,P,"P",false,0.5); + TCollection_AsciiString Message2 (P.X()); + TCollection_AsciiString Message3 (P.Y()); + TCollection_AsciiString Message4 (P.Z()); + Message += " IsPoint = "; + if (IsPoint) + { + Message += "True --> "; + Message += " P ( "; - Message += " IsPoint = "; if (IsPoint) { - Message += "True --> "; - Message += " P ( "; - - Message += Message2; Message += " , "; - Message += Message3; Message += " , "; - Message += Message4; Message += " ); \n"; - - - } else Message += "False\n"; - Message += " IsLinear = "; if (PE.IsLinear()) Message += "True \n"; else Message += "False\n"; - Message += " IsPlanar = "; if (PE.IsPlanar()) Message += "True \n"; else Message += "False\n"; - Message += " IsSpace = "; if (PE.IsSpace() ) Message += "True \n"; else Message += "False\n"; + Message += Message2; Message += " , "; + Message += Message3; Message += " , "; + Message += Message4; Message += " ); \n"; + } + else + Message += "False\n"; + + Message += " IsLinear = "; + if (PE.IsLinear()) + Message += "True \n"; + else + Message += "False\n"; + + Message += " IsPlanar = "; + if (PE.IsPlanar()) + Message += "True \n"; + else + Message += "False\n"; + + Message += " IsSpace = "; + if + (PE.IsSpace()) + Message += "True \n"; + else + Message += "False\n"; PostProcess(aDoc,ID_BUTTON_Test_6,TheDisplayType,Message.ToCString()); } @@ -506,29 +511,29 @@ if (PE.IsSpace()) { /*... */ } \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest7(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); //============================================================== -gp_Pnt2d P1(0,5); -gp_Pnt2d P2(5.5,1); -gp_Pnt2d P3(-2,2); - -Handle(Geom2d_TrimmedCurve) C = + gp_Pnt2d P1(0,5); + gp_Pnt2d P2(5.5,1); + gp_Pnt2d P3(-2,2); + + Handle(Geom2d_TrimmedCurve) C = GCE2d_MakeArcOfCircle (P1,P2,P3).Value(); -Standard_Real FirstParameter = C->FirstParameter(); -Standard_Real LastParameter = C->LastParameter(); -Standard_Real MiddleParameter = (FirstParameter+LastParameter)/2; -Standard_Real param = MiddleParameter; //in radians + Standard_Real FirstParameter = C->FirstParameter(); + Standard_Real LastParameter = C->LastParameter(); + Standard_Real MiddleParameter = (FirstParameter+LastParameter)/2; + Standard_Real param = MiddleParameter; //in radians -gp_Pnt2d P; -gp_Vec2d V; -C->D1(param,P,V); + gp_Pnt2d P; + gp_Vec2d V; + C->D1(param,P,V); // we recover point P and the vector V //============================================================== - TCollection_AsciiString Message ("\ + TCollection_AsciiString Message ("\ \n\ \n\ gp_Pnt2d P1(0,5); \n\ @@ -549,17 +554,16 @@ gp_Vec2d V; \n\ C->D1(param,P,V); \n\ // we recover point P and the vector V \n\ \n"); + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + DisplayCurve(aDoc,C); + Handle(ISession_Direction) aDirection = new ISession_Direction(P,V); + aDoc->GetISessionContext()->Display(aDirection, Standard_False); - DisplayCurve(aDoc,C); - Handle(ISession_Direction) aDirection = new ISession_Direction(P,V); - aDoc->GetISessionContext()->Display(aDirection, Standard_False); + DisplayPoint(aDoc,P,"P",false,0.5); - DisplayPoint(aDoc,P,"P",false,0.5); - - PostProcess(aDoc,ID_BUTTON_Test_7,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_7,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest8 @@ -568,22 +572,22 @@ C->D1(param,P,V); \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest8(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); //============================================================== -Standard_Real radius = 5; -Handle(Geom2d_Circle) C = + Standard_Real radius = 5; + Handle(Geom2d_Circle) C = new Geom2d_Circle(gp::OX2d(),radius); -Standard_Real param = 1.2*M_PI; -Geom2dLProp_CLProps2d CLP + Standard_Real param = 1.2*M_PI; + Geom2dLProp_CLProps2d CLP (C,param,2,Precision::PConfusion()); - gp_Dir2d D; -CLP.Tangent(D); + gp_Dir2d D; + CLP.Tangent(D); // D is the Tangent direction at parameter 1.2*PI //============================================================== - TCollection_AsciiString Message (" \ + TCollection_AsciiString Message (" \ \n\ Standard_Real radius = 5; \n\ Handle(Geom2d_Circle) C = \n\ @@ -595,53 +599,50 @@ Geom2dLProp_CLProps2d CLP \n\ CLP.Tangent(D); \n\ // D is the Tangent direction at parameter 1.2*PI \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(C); - aDoc->GetISessionContext()->Display(aCurve,Standard_False); - Handle(ISession_Direction) aDirection = new ISession_Direction(gp_Pnt2d(0,0),D,2); - aDoc->GetISessionContext()->Display(aDirection,Standard_False); - - TCollection_AsciiString Message2 (D.X()); - TCollection_AsciiString Message3 (D.Y()); - + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(C); + aDoc->GetISessionContext()->Display(aCurve,Standard_False); + Handle(ISession_Direction) aDirection = new ISession_Direction(gp_Pnt2d(0,0),D,2); + aDoc->GetISessionContext()->Display(aDirection,Standard_False); - - Message += " D ( "; - Message += Message2; Message += " , "; - Message += Message3; Message += " ); \n"; + TCollection_AsciiString Message2 (D.X()); + TCollection_AsciiString Message3 (D.Y()); - PostProcess(aDoc,ID_BUTTON_Test_8,TheDisplayType,Message.ToCString()); + Message += " D ( "; + Message += Message2; Message += " , "; + Message += Message3; Message += " ); \n"; + + PostProcess(aDoc,ID_BUTTON_Test_8,TheDisplayType,Message.ToCString()); } - - // Function name : GeomSources::gpTest9 // Description : // Return type : void // Argument : CGeometryDoc* aDoc void GeomSources::gpTest9(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); - //============================================================== + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== -Standard_Real radius = 5; -Handle(Geom2d_Circle) C = + Standard_Real radius = 5; + Handle(Geom2d_Circle) C = new Geom2d_Circle(gp::OX2d(),radius); -Geom2dAdaptor_Curve GAC (C); -Standard_Real startparam = 10*M_PI/180; -Standard_Real abscissa = 45*M_PI/180; -gp_Pnt2d P1; -C->D0(startparam,P1); -// abscissa is the distance along the curve from startparam -GCPnts_AbscissaPoint AP (GAC, abscissa, startparam); -gp_Pnt2d P2; -if (AP.IsDone()){C->D0(AP.Parameter(),P2);} -// P is now correctly set - - //============================================================== - TCollection_AsciiString Message (" \n\ + Geom2dAdaptor_Curve GAC (C); + Standard_Real startparam = 10*M_PI/180; + Standard_Real abscissa = 45*M_PI/180; + gp_Pnt2d P1; + C->D0(startparam,P1); + // abscissa is the distance along the curve from startparam + GCPnts_AbscissaPoint AP (GAC, abscissa, startparam); + gp_Pnt2d P2; + if (AP.IsDone()){C->D0(AP.Parameter(),P2);} + // P is now correctly set + + //============================================================== + TCollection_AsciiString Message (" \n\ \n\ \n\ Standard_Real radius = 5; \n\ @@ -659,66 +660,64 @@ if (AP.IsDone()){C->D0(AP.Parameter(),P2);} \n\ // P is now correctly set \n\ \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(C); - aDoc->GetISessionContext()->Display(aCurve,Standard_False); + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(C); + aDoc->GetISessionContext()->Display(aCurve,Standard_False); - DisplayPoint(aDoc,P1,"P1"); -if (AP.IsDone()) DisplayPoint(aDoc,P2,"P2"); - - TCollection_AsciiString Message2 (P1.X()); - TCollection_AsciiString Message3 (P1.Y()); - - TCollection_AsciiString Message4 (P2.X()); - TCollection_AsciiString Message5 (P2.Y()); - + DisplayPoint(aDoc,P1,"P1"); + if (AP.IsDone()) DisplayPoint(aDoc,P2,"P2"); - Message += " P1 ( "; - Message += Message2; Message += " , "; - Message += Message3; Message += " ); \n"; + TCollection_AsciiString Message2 (P1.X()); + TCollection_AsciiString Message3 (P1.Y()); - Message += " P2 ( "; - Message += Message4; Message += " , "; - Message += Message5; Message += " ); \n"; - PostProcess(aDoc,ID_BUTTON_Test_9,TheDisplayType,Message.ToCString()); + TCollection_AsciiString Message4 (P2.X()); + TCollection_AsciiString Message5 (P2.Y()); + + Message += " P1 ( "; + Message += Message2; Message += " , "; + Message += Message3; Message += " ); \n"; + + Message += " P2 ( "; + Message += Message4; Message += " , "; + Message += Message5; Message += " ); \n"; + PostProcess(aDoc,ID_BUTTON_Test_9,TheDisplayType,Message.ToCString()); } - // Function name : GeomSources::gpTest10 // Description : // Return type : void // Argument : CGeometryDoc* aDoc void GeomSources::gpTest10(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== -gp_Pnt2d P; -Standard_Real radius = 5; -Handle(Geom2d_Circle) C = - new Geom2d_Circle(gp::OX2d(),radius); -Geom2dAdaptor_Curve GAC (C); -Standard_Real abscissa = 3; -GCPnts_UniformAbscissa UA (GAC,abscissa); -TColgp_SequenceOfPnt2d aSequence; -if (UA.IsDone()) + gp_Pnt2d P; + Standard_Real radius = 5; + Handle(Geom2d_Circle) C = + new Geom2d_Circle(gp::OX2d(),radius); + Geom2dAdaptor_Curve GAC (C); + Standard_Real abscissa = 3; + GCPnts_UniformAbscissa UA (GAC,abscissa); + TColgp_SequenceOfPnt2d aSequence; + if (UA.IsDone()) { - Standard_Real N = UA.NbPoints(); - Standard_Integer count = 1; - for(;count<=N;count++) - { - C->D0(UA.Parameter(count),P); - Standard_Real Parameter = UA.Parameter(count); - // append P in a Sequence - aSequence.Append(P); + Standard_Real N = UA.NbPoints(); + Standard_Integer count = 1; + for(;count<=N;count++) + { + C->D0(UA.Parameter(count),P); + Standard_Real Parameter = UA.Parameter(count); + // append P in a Sequence + aSequence.Append(P); } -} -Standard_Real Abscissa = UA.Abscissa(); + } + Standard_Real Abscissa = UA.Abscissa(); -//============================================================== - TCollection_AsciiString Message (" \ + //============================================================== + TCollection_AsciiString Message (" \ \n\ gp_Pnt2d P; \n\ Standard_Real radius = 5; \n\ @@ -742,56 +741,58 @@ if (UA.IsDone()) \n\ } \n\ Standard_Real Abscissa = UA.Abscissa(); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(C); - aDoc->GetISessionContext()->Display(aCurve,Standard_False); + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(C); + aDoc->GetISessionContext()->Display(aCurve,Standard_False); - TCollection_AsciiString aString; - for (Standard_Integer i=1;i<= aSequence.Length();i++) - { - - TCollection_AsciiString Message2 (i); - TCollection_AsciiString Message3 (UA.Parameter(i)); + TCollection_AsciiString aString; + for (Standard_Integer i=1;i<= aSequence.Length();i++) + { - aString = "P"; - aString += Message2; - aString +=": Parameter : "; - aString += Message3; - - // First and Last texts are displayed with an Y offset, point 4 is upper - Standard_Real YOffset = -0.3; - YOffset += 0.2 * ( i == 1 ) ; - YOffset += 0.4 * ( i == 4 ) ; - YOffset += -0.2 * ( i == aSequence.Length() ); + TCollection_AsciiString Message2 (i); + TCollection_AsciiString Message3 (UA.Parameter(i)); - DisplayPoint(aDoc,aSequence(i),aString.ToCString(),false,0.5,YOffset,0.04); - } - - TCollection_AsciiString Message3 (Abscissa); + aString = "P"; + aString += Message2; + aString +=": Parameter : "; + aString += Message3; - Message += "Abscissa = "; Message += Message3; Message += " \n"; - PostProcess(aDoc,ID_BUTTON_Test_10,TheDisplayType,Message.ToCString()); + // First and Last texts are displayed with an Y offset, point 4 is upper + Standard_Real YOffset = -0.3; + YOffset += 0.2 * ( i == 1 ); + YOffset += 0.4 * ( i == 4 ); + YOffset += -0.2 * ( i == aSequence.Length() ); + + DisplayPoint(aDoc,aSequence(i),aString.ToCString(),false,0.5,YOffset,0.04); + } + + TCollection_AsciiString Message3 (Abscissa); + + Message += "Abscissa = "; + Message += Message3; + Message += " \n"; + + PostProcess(aDoc,ID_BUTTON_Test_10,TheDisplayType,Message.ToCString()); } - // Function name : GeomSources::gpTest11 // Description : // Return type : void // Argument : CGeometryDoc* aDoc void GeomSources::gpTest11(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -Standard_Real radius = 5; -Handle(Geom_SphericalSurface) SP = - new Geom_SphericalSurface(gp_Ax3(gp::XOY()),radius); -Standard_Real u = 2; -Standard_Real v = 3; -gp_Pnt P = SP->Value(u,v); - + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + Standard_Real radius = 5; + Handle(Geom_SphericalSurface) SP = + new Geom_SphericalSurface(gp_Ax3(gp::XOY()),radius); + Standard_Real u = 2; + Standard_Real v = 3; + gp_Pnt P = SP->Value(u,v); + //============================================================== TCollection_AsciiString Message (" \ \n\ @@ -802,51 +803,52 @@ Standard_Real u = 2; \n\ Standard_Real v = 3; \n\ gp_Pnt P = SP->Value(u,v); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplaySurface(aDoc,SP); - DisplayPoint(aDoc,P,"P",false,0.5); - TCollection_AsciiString Message2 (P.X()); - TCollection_AsciiString Message3 (P.Y()); + DisplaySurface(aDoc,SP); + DisplayPoint(aDoc,P,"P",false,0.5); + TCollection_AsciiString Message2 (P.X()); + TCollection_AsciiString Message3 (P.Y()); + Message += " P ( "; + Message += Message2; + Message += " , "; + Message += Message3; + Message += " ); \n"; - Message += " P ( "; - Message += Message2; - Message += " , "; - Message += Message3; - Message += " ); \n"; - PostProcess(aDoc,ID_BUTTON_Test_11,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_11,TheDisplayType,Message.ToCString()); } - // Function name : GeomSources::gpTest12 // Description : // Return type : void // Argument : CGeometryDoc* aDoc void GeomSources::gpTest12(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -gp_Pnt N,Q,P(1,2,3); -Standard_Real distance, radius = 5; -Handle(Geom_Circle) C = new Geom_Circle(gp::XOY(),radius); -GeomAPI_ProjectPointOnCurve PPC (P,C); -N = PPC.NearestPoint(); -Standard_Integer NbResults = PPC.NbPoints(); - -if(NbResults>0){ - for(Standard_Integer i = 1;i<=NbResults;i++){ - Q = PPC.Point(i); - distance = PPC.Distance(i); - // do something with Q or distance here - } - } - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + gp_Pnt N,Q,P(1,2,3); + Standard_Real distance, radius = 5; + Handle(Geom_Circle) C = new Geom_Circle(gp::XOY(),radius); + GeomAPI_ProjectPointOnCurve PPC (P,C); + N = PPC.NearestPoint(); + Standard_Integer NbResults = PPC.NbPoints(); + + if(NbResults>0) + { + for(Standard_Integer i = 1;i<=NbResults;i++) + { + Q = PPC.Point(i); + distance = PPC.Distance(i); + // do something with Q or distance here + } + } + + //============================================================== + TCollection_AsciiString Message (" \ \n\ gp_Pnt N,Q,P(1,2,3); \n\ Standard_Real distance, radius = 5; \n\ @@ -866,37 +868,36 @@ if(NbResults>0){ \n\ AddSeparator(aDoc,Message); //-------------------------------------------------------------- - TCollection_AsciiString aString; + TCollection_AsciiString aString; - DisplayPoint(aDoc,P,"P",false,0.5); - - TCollection_AsciiString Message2 (PPC.LowerDistance()); + DisplayPoint(aDoc,P,"P",false,0.5); - aString = "N : at Distance : "; - aString += Message2; - - DisplayPoint(aDoc,N,aString.ToCString(),false,0.5,0,-0.5); + TCollection_AsciiString Message2 (PPC.LowerDistance()); - DisplayCurve(aDoc,C,false); + aString = "N : at Distance : "; + aString += Message2; - if(NbResults>0){ - for(Standard_Integer i = 1;i<=NbResults;i++){ - - - Q = PPC.Point(i); - distance = PPC.Distance(i); - TCollection_AsciiString Message3 (i); - TCollection_AsciiString Message4 (distance); + DisplayPoint(aDoc,N,aString.ToCString(),false,0.5,0,-0.5); + DisplayCurve(aDoc,C,false); - aString = "Q"; - aString += Message3; - aString +=": at Distance : "; - aString += Message4; - DisplayPoint(aDoc,Q,aString.ToCString(),false,0.5); - } - } + if(NbResults>0) + { + for(Standard_Integer i = 1;i<=NbResults;i++) + { + Q = PPC.Point(i); + distance = PPC.Distance(i); + TCollection_AsciiString Message3 (i); + TCollection_AsciiString Message4 (distance); - PostProcess(aDoc,ID_BUTTON_Test_12,TheDisplayType,Message.ToCString()); + aString = "Q"; + aString += Message3; + aString +=": at Distance : "; + aString += Message4; + DisplayPoint(aDoc,Q,aString.ToCString(),false,0.5); + } + } + + PostProcess(aDoc,ID_BUTTON_Test_12,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest13 @@ -905,26 +906,29 @@ if(NbResults>0){ \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest13(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== + + gp_Pnt N,Q,P(7,8,9); + Standard_Real distance, radius = 5; + Handle(Geom_SphericalSurface) SP = + new Geom_SphericalSurface(gp_Ax3(gp::XOY()),radius); + GeomAPI_ProjectPointOnSurf PPS(P,SP); + N = PPS.NearestPoint(); + Standard_Integer NbResults = PPS.NbPoints(); + if(NbResults>0) + { + for(Standard_Integer i = 1;i<=NbResults;i++) + { + Q = PPS.Point(i); + distance = PPS.Distance(i); + // do something with Q or distance here + } + } -gp_Pnt N,Q,P(7,8,9); -Standard_Real distance, radius = 5; -Handle(Geom_SphericalSurface) SP = - new Geom_SphericalSurface(gp_Ax3(gp::XOY()),radius); -GeomAPI_ProjectPointOnSurf PPS(P,SP); -N = PPS.NearestPoint(); -Standard_Integer NbResults = PPS.NbPoints(); -if(NbResults>0){ - for(Standard_Integer i = 1;i<=NbResults;i++){ - Q = PPS.Point(i); - distance = PPS.Distance(i); - // do something with Q or distance here - } -} - -//============================================================== + //============================================================== TCollection_AsciiString Message (" \ \n\ gp_Pnt N,Q,P(7,8,9); \n\ @@ -942,43 +946,42 @@ if(NbResults>0){ \n\ } \n\ } \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- - TCollection_AsciiString aString; + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- + TCollection_AsciiString aString; - DisplayPoint(aDoc,P,"P",false,0.5); - TCollection_AsciiString Message2 (PPS.LowerDistance()); + DisplayPoint(aDoc,P,"P",false,0.5); + TCollection_AsciiString Message2 (PPS.LowerDistance()); - aString = "N : at Distance : "; aString += Message2; - DisplayPoint(aDoc,N,aString.ToCString(),false,0.5,0,-0.6); + aString = "N : at Distance : "; aString += Message2; + DisplayPoint(aDoc,N,aString.ToCString(),false,0.5,0,-0.6); + Handle(ISession_Surface) aSurface = new ISession_Surface(SP); + Handle (AIS_Drawer) CurDrawer = aSurface->Attributes(); + CurDrawer->UIsoAspect()->SetNumber(10); + CurDrawer->VIsoAspect()->SetNumber(10); + aDoc->GetAISContext()->SetLocalAttributes(aSurface, CurDrawer); + aDoc->GetAISContext()->Display(aSurface, Standard_False); + if(NbResults>0) + { + for(Standard_Integer i = 1;i<=NbResults;i++) + { - Handle(ISession_Surface) aSurface = new ISession_Surface(SP); - Handle (AIS_Drawer) CurDrawer = aSurface->Attributes(); - CurDrawer->UIsoAspect()->SetNumber(10); - CurDrawer->VIsoAspect()->SetNumber(10); - aDoc->GetAISContext()->SetLocalAttributes(aSurface, CurDrawer); - aDoc->GetAISContext()->Display(aSurface, Standard_False); + Q = PPS.Point(i); + distance = PPS.Distance(i); + TCollection_AsciiString Message3 (i); + TCollection_AsciiString Message4 (distance); - if(NbResults>0){ - for(Standard_Integer i = 1;i<=NbResults;i++){ - - Q = PPS.Point(i); - distance = PPS.Distance(i); - TCollection_AsciiString Message3 (i); - TCollection_AsciiString Message4 (distance); + aString = "Q"; + aString += Message3; + aString +=": at Distance : "; + aString += Message4; - aString = "Q"; - aString += Message3; - aString +=": at Distance : "; - aString += Message4; - - DisplayPoint(aDoc,Q,aString.ToCString(),false,0.5); - } - } - - PostProcess(aDoc,ID_BUTTON_Test_13,TheDisplayType,Message.ToCString()); + DisplayPoint(aDoc,Q,aString.ToCString(),false,0.5); + } + } + PostProcess(aDoc,ID_BUTTON_Test_13,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest14 @@ -987,30 +990,30 @@ if(NbResults>0){ \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest14(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== -gp_Pnt P; -gp_Ax3 theAxe(gp::XOY()); -gp_Pln PL(theAxe); -Standard_Real MinorRadius = 5; -Standard_Real MajorRadius = 8; -gp_Elips EL (gp::YOZ(),MajorRadius,MinorRadius); -IntAna_IntConicQuad ICQ + gp_Pnt P; + gp_Ax3 theAxe(gp::XOY()); + gp_Pln PL(theAxe); + Standard_Real MinorRadius = 5; + Standard_Real MajorRadius = 8; + gp_Elips EL (gp::YOZ(),MajorRadius,MinorRadius); + IntAna_IntConicQuad ICQ (EL,PL,Precision::Angular(),Precision::Confusion()); -if (ICQ.IsDone()){ + if (ICQ.IsDone()){ Standard_Integer NbResults = ICQ.NbPoints(); if (NbResults>0){ - for(Standard_Integer i = 1;i<=NbResults;i++){ + for(Standard_Integer i = 1;i<=NbResults;i++){ P = ICQ.Point(i); // do something with P here - } - } -} + } + } + } -//============================================================== - TCollection_AsciiString Message (" \ + //============================================================== + TCollection_AsciiString Message (" \ \n\ gp_Pnt P; \n\ gp_Pln PL (gp_Ax3(gp::XOY())); \n\ @@ -1029,35 +1032,37 @@ if (ICQ.IsDone()){ \n\ } \n\ } \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - Handle(Geom_Plane) aPlane = GC_MakePlane(PL).Value(); - Handle(Geom_RectangularTrimmedSurface) aSurface= new Geom_RectangularTrimmedSurface(aPlane,-8.,8.,-12.,12.); - - DisplaySurface(aDoc,aSurface); + Handle(Geom_Plane) aPlane = GC_MakePlane(PL).Value(); + Handle(Geom_RectangularTrimmedSurface) aSurface= new Geom_RectangularTrimmedSurface(aPlane,-8.,8.,-12.,12.); + DisplaySurface(aDoc,aSurface); - Handle(Geom_Ellipse) anEllips = GC_MakeEllipse(EL).Value(); - DisplayCurve(aDoc,anEllips,false); + Handle(Geom_Ellipse) anEllips = GC_MakeEllipse(EL).Value(); + DisplayCurve(aDoc,anEllips,false); - TCollection_AsciiString aString; + TCollection_AsciiString aString; - if (ICQ.IsDone()){ - Standard_Integer NbResults = ICQ.NbPoints(); - if (NbResults>0){ - for(Standard_Integer i = 1;i<=NbResults;i++){ - - TCollection_AsciiString Message2(i); - - P = ICQ.Point(i); - aString = "P";aString += Message2; - DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); - } - } - } + if (ICQ.IsDone()) + { + Standard_Integer NbResults = ICQ.NbPoints(); + if (NbResults>0) + { + for(Standard_Integer i = 1;i<=NbResults;i++) + { - PostProcess(aDoc,ID_BUTTON_Test_14,TheDisplayType,Message.ToCString()); + TCollection_AsciiString Message2(i); + + P = ICQ.Point(i); + aString = "P";aString += Message2; + DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); + } + } + } + + PostProcess(aDoc,ID_BUTTON_Test_14,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest15 @@ -1066,18 +1071,18 @@ if (ICQ.IsDone()){ \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest15(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -gp_Pnt P1(1,2,3); -gp_Pnt P1Copy = P1; -gp_Pnt P2(5,4,6); -gp_Trsf TRSF; -TRSF.SetMirror(P2); -P1Copy.Transform(TRSF); - -//============================================================== + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + gp_Pnt P1(1,2,3); + gp_Pnt P1Copy = P1; + gp_Pnt P2(5,4,6); + gp_Trsf TRSF; + TRSF.SetMirror(P2); + P1Copy.Transform(TRSF); + + //============================================================== TCollection_AsciiString Message (" \ \n\ gp_Pnt P1(1,2,3); \n\ @@ -1087,41 +1092,40 @@ gp_Trsf TRSF; \n\ TRSF.SetMirror(P2); \n\ P1Copy.Transform(TRSF); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplayPoint(aDoc,P1Copy,"P1Copy",false,0.5); - DisplayPoint(aDoc,P1,"P1",false,0.5); - DisplayPoint(aDoc,P2,"P2",false,0.5); + DisplayPoint(aDoc,P1Copy,"P1Copy",false,0.5); + DisplayPoint(aDoc,P1,"P1",false,0.5); + DisplayPoint(aDoc,P2,"P2",false,0.5); - PostProcess(aDoc,ID_BUTTON_Test_15,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_15,TheDisplayType,Message.ToCString()); } - // Function name : GeomSources::gpTest16 // Description : // Return type : void // Argument : CGeometryDoc* aDoc void GeomSources::gpTest16(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); //============================================================== -gp_Pnt P1(1,2,3); -gp_Pnt P2(5,4,6); -gp_Vec V1 (P1,P2); - -gp_Pnt P3(10,4,7); -gp_Pnt P4(2,0,1); -gp_Vec V2 (P3,P4); - -Standard_Boolean result = -V1.IsOpposite(V2,Precision::Angular()); -// result should be true + gp_Pnt P1(1,2,3); + gp_Pnt P2(5,4,6); + gp_Vec V1 (P1,P2); + + gp_Pnt P3(10,4,7); + gp_Pnt P4(2,0,1); + gp_Vec V2 (P3,P4); + + Standard_Boolean result = + V1.IsOpposite(V2,Precision::Angular()); + // result should be true //============================================================== - TCollection_AsciiString Message (" \ + TCollection_AsciiString Message (" \ \n\ gp_Pnt P1(1,2,3); \n\ gp_Pnt P2(5,4,6); \n\ @@ -1135,24 +1139,24 @@ Standard_Boolean result = \n\ V1.IsOpposite(V2,Precision::Angular()); \n\ // result should be true \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplayPoint(aDoc,P1,"P1",false,0.5); - DisplayPoint(aDoc,P2,"P2",false,0.5); - DisplayPoint(aDoc,P3,"P3",false,0.5); - DisplayPoint(aDoc,P4,"P4",false,0.5); + DisplayPoint(aDoc,P1,"P1",false,0.5); + DisplayPoint(aDoc,P2,"P2",false,0.5); + DisplayPoint(aDoc,P3,"P3",false,0.5); + DisplayPoint(aDoc,P4,"P4",false,0.5); - Handle(ISession_Direction) aDirection1 = new ISession_Direction(P1,V1); - aDoc->GetAISContext()->Display(aDirection1, Standard_False); + Handle(ISession_Direction) aDirection1 = new ISession_Direction(P1,V1); + aDoc->GetAISContext()->Display(aDirection1, Standard_False); - Handle(ISession_Direction) aDirection2 = new ISession_Direction(P3,V2); - aDoc->GetAISContext()->Display(aDirection2, Standard_False); + Handle(ISession_Direction) aDirection2 = new ISession_Direction(P3,V2); + aDoc->GetAISContext()->Display(aDirection2, Standard_False); - Message += "result = "; - if (result) Message += "True \n"; else Message += "False \n"; + Message += "result = "; + if (result) Message += "True \n"; else Message += "False \n"; - PostProcess(aDoc,ID_BUTTON_Test_16,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_16,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest17 @@ -1161,45 +1165,45 @@ V1.IsOpposite(V2,Precision::Angular()); \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest17(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + gp_Dir D1(1,2,3); + gp_Dir D2(3,4,5); + Standard_Real ang = D1.Angle(D2); + // the result is in radians in the range [0,PI] -gp_Dir D1(1,2,3); -gp_Dir D2(3,4,5); -Standard_Real ang = D1.Angle(D2); -// the result is in radians in the range [0,PI] - -//============================================================== - TCollection_AsciiString Message (" \ + //============================================================== + TCollection_AsciiString Message (" \ \n\ gp_Dir D1(1,2,3); \n\ gp_Dir D2(3,4,5); \n\ Standard_Real ang = D1.Angle(D2); \n\ // the result is in radians in the range [0,PI] \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - Handle(ISession_Direction) aDirection1 = new ISession_Direction(gp_Pnt(0,0,0),D1,3); - aDoc->GetAISContext()->Display(aDirection1, Standard_False); + Handle(ISession_Direction) aDirection1 = new ISession_Direction(gp_Pnt(0,0,0),D1,3); + aDoc->GetAISContext()->Display(aDirection1, Standard_False); - Handle(ISession_Direction) aDirection2 = new ISession_Direction(gp_Pnt(0,0,0),D2,3); - aDoc->GetAISContext()->Display(aDirection2, Standard_False); - - cout<<" D1.Angle(D2) : "<<ang<<endl; + Handle(ISession_Direction) aDirection2 = new ISession_Direction(gp_Pnt(0,0,0),D2,3); + aDoc->GetAISContext()->Display(aDirection2, Standard_False); - TCollection_AsciiString Message2 (ang); - TCollection_AsciiString Message3 (ang/M_PI/180); - - Message += " ang = "; - Message += Message2; - Message += " radian \n"; - Message += " ang/PI180 = "; - Message += Message3; - Message += " degree \n"; + cout<<" D1.Angle(D2) : "<<ang<<endl; - PostProcess(aDoc,ID_BUTTON_Test_17,TheDisplayType,Message.ToCString()); + TCollection_AsciiString Message2 (ang); + TCollection_AsciiString Message3 (ang/M_PI/180); + + Message += " ang = "; + Message += Message2; + Message += " radian \n"; + Message += " ang/PI180 = "; + Message += Message3; + Message += " degree \n"; + + PostProcess(aDoc,ID_BUTTON_Test_17,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest18 @@ -1208,20 +1212,20 @@ Standard_Real ang = D1.Angle(D2); \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest18(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -gp_Pnt2d P(2,3); -gp_Dir2d D(4,5); -gp_Ax22d A(P,D); -gp_Parab2d Para(A,6); -// P is the vertex point -// P and D give the axis of symmetry -// 6 is the focal length of the parabola - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + gp_Pnt2d P(2,3); + gp_Dir2d D(4,5); + gp_Ax22d A(P,D); + gp_Parab2d Para(A,6); + // P is the vertex point + // P and D give the axis of symmetry + // 6 is the focal length of the parabola + + //============================================================== + TCollection_AsciiString Message (" \ \n\ gp_Pnt2d P(2,3); \n\ gp_Dir2d D(4,5); \n\ @@ -1231,22 +1235,22 @@ gp_Parab2d Para(A,6); \n\ // P and D give the axis of symmetry \n\ // 6 is the focal length of the parabola \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplayPoint(aDoc,P,"P",false,0.5,0,3); + DisplayPoint(aDoc,P,"P",false,0.5,0,3); - Handle(ISession_Direction) aDirection = new ISession_Direction(P,D,200); - aDoc->GetISessionContext()->Display(aDirection,Standard_False); - Handle(Geom2d_Parabola) aParabola = GCE2d_MakeParabola(Para); - Handle(Geom2d_TrimmedCurve) aTrimmedCurve = new Geom2d_TrimmedCurve(aParabola,-100,100); - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aTrimmedCurve); - //aCurve->SetColorIndex(3); - aDoc->GetISessionContext()->Display(aCurve, Standard_False); + Handle(ISession_Direction) aDirection = new ISession_Direction(P,D,200); + aDoc->GetISessionContext()->Display(aDirection,Standard_False); + Handle(Geom2d_Parabola) aParabola = GCE2d_MakeParabola(Para); + Handle(Geom2d_TrimmedCurve) aTrimmedCurve = new Geom2d_TrimmedCurve(aParabola,-100,100); + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aTrimmedCurve); + //aCurve->SetColorIndex(3); + aDoc->GetISessionContext()->Display(aCurve, Standard_False); - Message += " The entity A of type gp_Ax22d is not displayable \n "; - Message += " The entity D of type gp_Dir2d is displayed as a vector \n ( mean with a length != 1 ) \n "; - PostProcess(aDoc,ID_BUTTON_Test_18,TheDisplayType,Message.ToCString()); + Message += " The entity A of type gp_Ax22d is not displayable \n "; + Message += " The entity D of type gp_Dir2d is displayed as a vector \n ( mean with a length != 1 ) \n "; + PostProcess(aDoc,ID_BUTTON_Test_18,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest19 @@ -1255,29 +1259,29 @@ gp_Parab2d Para(A,6); \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest19(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -gp_Pnt P1(2,3,4); -gp_Dir D(4,5,6); -gp_Ax3 A(P1,D); -Standard_Boolean IsDirectA = A.Direct(); - -gp_Dir AXDirection = A.XDirection() ; -gp_Dir AYDirection = A.YDirection() ; - -gp_Pnt P2(5,3,4); -gp_Ax3 A2(P2,D); -A2.YReverse(); -// axis3 is now left handed -Standard_Boolean IsDirectA2 = A2.Direct(); - -gp_Dir A2XDirection = A2.XDirection() ; -gp_Dir A2YDirection = A2.YDirection() ; - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + gp_Pnt P1(2,3,4); + gp_Dir D(4,5,6); + gp_Ax3 A(P1,D); + Standard_Boolean IsDirectA = A.Direct(); + + gp_Dir AXDirection = A.XDirection() ; + gp_Dir AYDirection = A.YDirection() ; + + gp_Pnt P2(5,3,4); + gp_Ax3 A2(P2,D); + A2.YReverse(); + // axis3 is now left handed + Standard_Boolean IsDirectA2 = A2.Direct(); + + gp_Dir A2XDirection = A2.XDirection() ; + gp_Dir A2YDirection = A2.YDirection() ; + + //============================================================== + TCollection_AsciiString Message (" \ \n\ gp_Pnt P1(2,3,4); \n\ gp_Dir D(4,5,6); \n\ @@ -1296,38 +1300,44 @@ Standard_Boolean IsDirectA2 = A2.Direct(); \n\ gp_Dir A2XDirection = A2.XDirection() ; \n\ gp_Dir A2YDirection = A2.YDirection() ; \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplayPoint(aDoc,P1,"P1",false,0.1); - Handle(ISession_Direction) aDirection = new ISession_Direction(P1,D,2); - aDoc->GetAISContext()->Display(aDirection, Standard_False); + DisplayPoint(aDoc,P1,"P1",false,0.1); + Handle(ISession_Direction) aDirection = new ISession_Direction(P1,D,2); + aDoc->GetAISContext()->Display(aDirection, Standard_False); - Handle(ISession_Direction) aDirection2 = new ISession_Direction(P1,AXDirection,2); - aDirection2->SetText(TCollection_ExtendedString("A.XDirection")); - aDoc->GetAISContext()->Display(aDirection2, Standard_False); - Handle(ISession_Direction) aDirection3 = new ISession_Direction(P1,AYDirection,2); - aDirection3->SetText(TCollection_ExtendedString("A.YDirection")); - aDoc->GetAISContext()->Display(aDirection3, Standard_False); + Handle(ISession_Direction) aDirection2 = new ISession_Direction(P1,AXDirection,2); + aDirection2->SetText(TCollection_ExtendedString("A.XDirection")); + aDoc->GetAISContext()->Display(aDirection2, Standard_False); + Handle(ISession_Direction) aDirection3 = new ISession_Direction(P1,AYDirection,2); + aDirection3->SetText(TCollection_ExtendedString("A.YDirection")); + aDoc->GetAISContext()->Display(aDirection3, Standard_False); - DisplayPoint(aDoc,P2,"P2",false,0.1); - Handle(ISession_Direction) aDirection4 = new ISession_Direction(P2,D,2); - aDoc->GetAISContext()->Display(aDirection4, Standard_False); + DisplayPoint(aDoc,P2,"P2",false,0.1); + Handle(ISession_Direction) aDirection4 = new ISession_Direction(P2,D,2); + aDoc->GetAISContext()->Display(aDirection4, Standard_False); - Handle(ISession_Direction) aDirection5 = new ISession_Direction(P2,A2XDirection,2); - aDirection5->SetText(TCollection_ExtendedString("A2 XDirection")); - aDoc->GetAISContext()->Display(aDirection5, Standard_False); - Handle(ISession_Direction) aDirection6 = new ISession_Direction(P2,A2YDirection,2); - aDirection6->SetText(TCollection_ExtendedString("A2 YDirection")); - aDoc->GetAISContext()->Display(aDirection6, Standard_False); + Handle(ISession_Direction) aDirection5 = new ISession_Direction(P2,A2XDirection,2); + aDirection5->SetText(TCollection_ExtendedString("A2 XDirection")); + aDoc->GetAISContext()->Display(aDirection5, Standard_False); + Handle(ISession_Direction) aDirection6 = new ISession_Direction(P2,A2YDirection,2); + aDirection6->SetText(TCollection_ExtendedString("A2 YDirection")); + aDoc->GetAISContext()->Display(aDirection6, Standard_False); - Message += "IsDirectA = "; - if (IsDirectA) Message += "True = Right Handed \n"; else Message += "False = Left Handed \n"; + Message += "IsDirectA = "; + if(IsDirectA) + Message += "True = Right Handed \n"; + else + Message += "False = Left Handed \n"; - Message += "IsDirectA2 = "; - if (IsDirectA2) Message += "True = Right Handed \n"; else Message += "False = Left Handed \n"; + Message += "IsDirectA2 = "; + if(IsDirectA2) + Message += "True = Right Handed \n"; + else + Message += "False = Left Handed \n"; - PostProcess(aDoc,ID_BUTTON_Test_19,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_19,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest20 @@ -1336,44 +1346,44 @@ gp_Dir A2YDirection = A2.YDirection() ; \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest20(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + TColgp_Array1OfPnt2d array (1,5); // sizing array + array.SetValue(1,gp_Pnt2d (0,0)); + array.SetValue(2,gp_Pnt2d (1,2)); + array.SetValue(3,gp_Pnt2d (2,3)); + array.SetValue(4,gp_Pnt2d (4,3)); + array.SetValue(5,gp_Pnt2d (5,5)); + Handle(Geom2d_BSplineCurve) SPL1 = + Geom2dAPI_PointsToBSpline(array); -TColgp_Array1OfPnt2d array (1,5); // sizing array -array.SetValue(1,gp_Pnt2d (0,0)); -array.SetValue(2,gp_Pnt2d (1,2)); -array.SetValue(3,gp_Pnt2d (2,3)); -array.SetValue(4,gp_Pnt2d (4,3)); -array.SetValue(5,gp_Pnt2d (5,5)); -Handle(Geom2d_BSplineCurve) SPL1 = - Geom2dAPI_PointsToBSpline(array); - -Handle(TColgp_HArray1OfPnt2d) harray = - new TColgp_HArray1OfPnt2d (1,5); // sizing harray -harray->SetValue(1,gp_Pnt2d (7+ 0,0)); -harray->SetValue(2,gp_Pnt2d (7+ 1,2)); -harray->SetValue(3,gp_Pnt2d (7+ 2,3)); -harray->SetValue(4,gp_Pnt2d (7+ 4,3)); -harray->SetValue(5,gp_Pnt2d (7+ 5,5)); -Geom2dAPI_Interpolate anInterpolation(harray,Standard_False,0.01); -anInterpolation.Perform(); -Handle(Geom2d_BSplineCurve) SPL2 = anInterpolation.Curve(); - -Handle(TColgp_HArray1OfPnt2d) harray2 = - new TColgp_HArray1OfPnt2d (1,5); // sizing harray -harray2->SetValue(1,gp_Pnt2d (11+ 0,0)); -harray2->SetValue(2,gp_Pnt2d (11+ 1,2)); -harray2->SetValue(3,gp_Pnt2d (11+ 2,3)); -harray2->SetValue(4,gp_Pnt2d (11+ 4,3)); -harray2->SetValue(5,gp_Pnt2d (11+ 5,5)); -Geom2dAPI_Interpolate anInterpolation2(harray2,Standard_True,0.01); -anInterpolation2.Perform(); -Handle(Geom2d_BSplineCurve) SPL3 = anInterpolation2.Curve(); -// redefined C++ operator allows these assignments - -//============================================================== - TCollection_AsciiString Message (" \ + Handle(TColgp_HArray1OfPnt2d) harray = + new TColgp_HArray1OfPnt2d (1,5); // sizing harray + harray->SetValue(1,gp_Pnt2d (7+ 0,0)); + harray->SetValue(2,gp_Pnt2d (7+ 1,2)); + harray->SetValue(3,gp_Pnt2d (7+ 2,3)); + harray->SetValue(4,gp_Pnt2d (7+ 4,3)); + harray->SetValue(5,gp_Pnt2d (7+ 5,5)); + Geom2dAPI_Interpolate anInterpolation(harray,Standard_False,0.01); + anInterpolation.Perform(); + Handle(Geom2d_BSplineCurve) SPL2 = anInterpolation.Curve(); + + Handle(TColgp_HArray1OfPnt2d) harray2 = + new TColgp_HArray1OfPnt2d (1,5); // sizing harray + harray2->SetValue(1,gp_Pnt2d (11+ 0,0)); + harray2->SetValue(2,gp_Pnt2d (11+ 1,2)); + harray2->SetValue(3,gp_Pnt2d (11+ 2,3)); + harray2->SetValue(4,gp_Pnt2d (11+ 4,3)); + harray2->SetValue(5,gp_Pnt2d (11+ 5,5)); + Geom2dAPI_Interpolate anInterpolation2(harray2,Standard_True,0.01); + anInterpolation2.Perform(); + Handle(Geom2d_BSplineCurve) SPL3 = anInterpolation2.Curve(); + // redefined C++ operator allows these assignments + + //============================================================== + TCollection_AsciiString Message (" \ \n\ TColgp_Array1OfPnt2d array (1,5); // sizing array \n\ array.SetValue(1,gp_Pnt2d (0,0)); \n\ @@ -1397,7 +1407,7 @@ Handle(Geom2d_BSplineCurve) SPL2 = anInterpolation.Curve(); \n\ \n\ Handle(TColgp_HArray1OfPnt2d) harray2 = \n\ new TColgp_HArray1OfPnt2d (1,5); // sizing harray \n"); - Message += "\ + Message += "\ harray2->SetValue(1,gp_Pnt2d (11+ 0,0)); \n\ harray2->SetValue(2,gp_Pnt2d (11+ 1,2)); \n\ harray2->SetValue(3,gp_Pnt2d (11+ 2,3)); \n\ @@ -1408,81 +1418,85 @@ anInterpolation2.Perform(); \n\ Handle(Geom2d_BSplineCurve) SPL3 = anInterpolation2.Curve(); \n\ // redefined C++ operator allows these assignments \n\ \n"; - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- - TCollection_AsciiString aString; + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- + TCollection_AsciiString aString; Standard_Integer i; - for(i = array.Lower();i<=array.Upper();i++){ - gp_Pnt2d P = array(i); - TCollection_AsciiString Message2 (i); - aString = "array ";aString += Message2; - DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); - } - for( int i = harray->Lower();i<=harray->Upper();i++){ - gp_Pnt2d P = harray->Value(i); - TCollection_AsciiString Message2 (i); - aString = "harray ";aString += Message2; - DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); - } - for( i = harray2->Lower();i<=harray2->Upper();i++){ - gp_Pnt2d P = harray2->Value(i); - TCollection_AsciiString Message2 (i); - aString = "harray2 ";aString += Message2; - DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); - } + for(i = array.Lower();i<=array.Upper();i++) + { + gp_Pnt2d P = array(i); + TCollection_AsciiString Message2 (i); + aString = "array ";aString += Message2; + DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); + } + for( int i = harray->Lower();i<=harray->Upper();i++) + { + gp_Pnt2d P = harray->Value(i); + TCollection_AsciiString Message2 (i); + aString = "harray ";aString += Message2; + DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); + } + for( i = harray2->Lower();i<=harray2->Upper();i++) + { + gp_Pnt2d P = harray2->Value(i); + TCollection_AsciiString Message2 (i); + aString = "harray2 ";aString += Message2; + DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); + } - if (!SPL1.IsNull()) - { - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(SPL1); - aCurve->SetColorIndex(3); - aDoc->GetISessionContext()->Display(aCurve, Standard_False); - } - else - MessageBox(0,"SPL1.IsNull()","CasCade Error",MB_ICONERROR); - - if (!SPL2.IsNull()) - { - Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(SPL2); - aCurve2->SetColorIndex(5); - aDoc->GetISessionContext()->Display(aCurve2, Standard_False); - } - else - MessageBox(0,"SPL2.IsNull()","CasCade Error",MB_ICONERROR); + if (!SPL1.IsNull()) + { + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(SPL1); + aCurve->SetColorIndex(3); + aDoc->GetISessionContext()->Display(aCurve, Standard_False); + } + else + MessageBox(0,"SPL1.IsNull()","CasCade Error",MB_ICONERROR); - if (!SPL3.IsNull()) - { - Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(SPL3); - aCurve2->SetColorIndex(6); - aDoc->GetISessionContext()->Display(aCurve2, Standard_False); - } - else - MessageBox(0,"SPL3.IsNull()","CasCade Error",MB_ICONERROR); + if (!SPL2.IsNull()) + { + Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(SPL2); + aCurve2->SetColorIndex(5); + aDoc->GetISessionContext()->Display(aCurve2, Standard_False); + } + else + MessageBox(0,"SPL2.IsNull()","CasCade Error",MB_ICONERROR); - Message += " SPL1 is Red \n"; - Message += " SPL2 is Blue \n"; - Message += " SPL3 is Yellow \n"; + if (!SPL3.IsNull()) + { + Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(SPL3); + aCurve2->SetColorIndex(6); + aDoc->GetISessionContext()->Display(aCurve2, Standard_False); + } + else + MessageBox(0,"SPL3.IsNull()","CasCade Error",MB_ICONERROR); - PostProcess(aDoc,ID_BUTTON_Test_20,TheDisplayType,Message.ToCString()); + Message += " SPL1 is Red \n"; + Message += " SPL2 is Blue \n"; + Message += " SPL3 is Yellow \n"; + + PostProcess(aDoc,ID_BUTTON_Test_20,TheDisplayType,Message.ToCString()); } void GeomSources::gpTest21(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -gp_Pnt2d P1(-184, 101); -gp_Pnt2d P2(20 ,84); -Standard_Real aheight = 1; -FairCurve_Batten B (P1,P2,aheight); -B.SetAngle1(22*M_PI/180); -B.SetAngle2(44*M_PI/180); -FairCurve_AnalysisCode anAnalysisCode; -B.Compute(anAnalysisCode); -Handle(Geom2d_BSplineCurve) C = B.Curve(); - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== + + gp_Pnt2d P1(-184, 101); + gp_Pnt2d P2(20 ,84); + Standard_Real aheight = 1; + FairCurve_Batten B (P1,P2,aheight); + B.SetAngle1(22*M_PI/180); + B.SetAngle2(44*M_PI/180); + FairCurve_AnalysisCode anAnalysisCode; + B.Compute(anAnalysisCode); + Handle(Geom2d_BSplineCurve) C = B.Curve(); + + //============================================================== + TCollection_AsciiString Message (" \ \n\ gp_Pnt2d P1(-184, 101); \n\ gp_Pnt2d P2(20 ,84); \n\ @@ -1494,34 +1508,35 @@ FairCurve_AnalysisCode anAnalysisCode; \n\ B.Compute(anAnalysisCode); \n\ Handle(Geom2d_BSplineCurve) C = B.Curve(); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplayCurveAndCurvature(aDoc,C,6,Standard_False); + DisplayCurveAndCurvature(aDoc,C,6,Standard_False); - PostProcess(aDoc,ID_BUTTON_Test_21,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_21,TheDisplayType,Message.ToCString()); } void GeomSources::gpTest22(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== -gp_Pnt2d P1(-184, 41); -gp_Pnt2d P2(20 ,24); -Standard_Real aheight = 1; -FairCurve_MinimalVariation MV (P1,P2,aheight); -MV.SetAngle1(22*M_PI/180); -MV.SetAngle2(44*M_PI/180); - -FairCurve_AnalysisCode anAnalysisCode; -MV.Compute(anAnalysisCode); - -Handle(Geom2d_BSplineCurve) C = MV.Curve(); - -//============================================================== - TCollection_AsciiString Message (" \ + gp_Pnt2d P1(-184, 41); + gp_Pnt2d P2(20 ,24); + Standard_Real aheight = 1; + FairCurve_MinimalVariation MV (P1,P2,aheight); + MV.SetAngle1(22*M_PI/180); + MV.SetAngle2(44*M_PI/180); + + FairCurve_AnalysisCode anAnalysisCode; + MV.Compute(anAnalysisCode); + + Handle(Geom2d_BSplineCurve) C = MV.Curve(); + + //============================================================== + TCollection_AsciiString Message (" \ \n\ gp_Pnt2d P1(-184, 41); \n\ gp_Pnt2d P2(20 ,24); \n\ @@ -1535,42 +1550,40 @@ MV.Compute(anAnalysisCode); \n\ \n\ Handle(Geom2d_BSplineCurve) C = MV.Curve(); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplayCurveAndCurvature(aDoc,C,7,Standard_False); - DisplayPoint(aDoc,P1,"P1",false,0.5); - DisplayPoint(aDoc,P2,"P2",false,0.5); + DisplayCurveAndCurvature(aDoc,C,7,Standard_False); + DisplayPoint(aDoc,P1,"P1",false,0.5); + DisplayPoint(aDoc,P2,"P2",false,0.5); - PostProcess(aDoc,ID_BUTTON_Test_22,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_22,TheDisplayType,Message.ToCString()); } - // Function name : GeomSources::gpTest23 // Description : // Return type : void // Argument : CGeometryDoc* aDoc void GeomSources::gpTest23(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -Standard_Real major = 12; -Standard_Real minor = 4; -gp_Ax2d axis = gp::OX2d(); -Handle(Geom2d_Ellipse) E = GCE2d_MakeEllipse (axis,major,minor); - -Handle(Geom2d_TrimmedCurve) TC = new Geom2d_TrimmedCurve(E,-1,2); - -// The segment goes in the direction Vfrom P1 -// to the point projected on this line by P2 -// In the example (0,6). -Handle(Geom2d_BSplineCurve) SPL = - Geom2dConvert::CurveToBSplineCurve(TC); - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + Standard_Real major = 12; + Standard_Real minor = 4; + gp_Ax2d axis = gp::OX2d(); + Handle(Geom2d_Ellipse) E = GCE2d_MakeEllipse (axis,major,minor); + Handle(Geom2d_TrimmedCurve) TC = new Geom2d_TrimmedCurve(E,-1,2); + + // The segment goes in the direction Vfrom P1 + // to the point projected on this line by P2 + // In the example (0,6). + Handle(Geom2d_BSplineCurve) SPL = + Geom2dConvert::CurveToBSplineCurve(TC); + + //============================================================== + TCollection_AsciiString Message (" \ \n\ Standard_Real major = 12; \n\ Standard_Real minor = 4; \n\ @@ -1585,61 +1598,59 @@ Handle(Geom2d_TrimmedCurve) TC = new Geom2d_TrimmedCurve(E,-1,2); \n\ Handle(Geom2d_BSplineCurve) SPL = \n\ Geom2dConvert::CurveToBSplineCurve(TC); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(E); - aCurve->SetColorIndex(3); // Red - aCurve->SetTypeOfLine(Aspect_TOL_DOTDASH); - aDoc->GetISessionContext()->Display(aCurve, Standard_False); + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(E); + aCurve->SetColorIndex(3); // Red + aCurve->SetTypeOfLine(Aspect_TOL_DOTDASH); + aDoc->GetISessionContext()->Display(aCurve, Standard_False); - Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(SPL); - aDoc->GetISessionContext()->Display(aCurve2, Standard_False); + Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(SPL); + aDoc->GetISessionContext()->Display(aCurve2, Standard_False); - PostProcess(aDoc,ID_BUTTON_Test_23,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_23,TheDisplayType,Message.ToCString()); } - - // Function name : GeomSources::gpTest24 // Description : // Return type : void // Argument : CGeometryDoc* aDoc void GeomSources::gpTest24(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -Standard_Real radius = 5; -gp_Ax2d ax2d(gp_Pnt2d(2,3),gp_Dir2d(1,0)); - -Handle(Geom2d_Circle) circ2d = - new Geom2d_Circle(ax2d,radius); - -gp_Ax2d circ2dXAxis = circ2d->XAxis(); - -// create a 3D curve in a given plane -Handle(Geom_Curve) C3D = - GeomAPI::To3d(circ2d,gp_Pln(gp_Ax3(gp::XOY()))); -Handle(Geom_Circle) C3DCircle = - Handle(Geom_Circle)::DownCast(C3D); - -gp_Ax1 C3DCircleXAxis = C3DCircle->XAxis(); - -// project it to a 2D curve in another plane - -gp_Pln ProjectionPlane(gp_Pnt(1,1,0),gp_Dir( 1,1,1 )); - -Handle(Geom2d_Curve) C2D = - GeomAPI::To2d(C3D,ProjectionPlane); - -Handle(Geom2d_Circle) C2DCircle = - Handle(Geom2d_Circle)::DownCast(C2D); -gp_Ax2d C2DCircleXAxis = C2DCircle->XAxis(); - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = a2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + Standard_Real radius = 5; + gp_Ax2d ax2d(gp_Pnt2d(2,3),gp_Dir2d(1,0)); + + Handle(Geom2d_Circle) circ2d = + new Geom2d_Circle(ax2d,radius); + + gp_Ax2d circ2dXAxis = circ2d->XAxis(); + + // create a 3D curve in a given plane + Handle(Geom_Curve) C3D = + GeomAPI::To3d(circ2d,gp_Pln(gp_Ax3(gp::XOY()))); + Handle(Geom_Circle) C3DCircle = + Handle(Geom_Circle)::DownCast(C3D); + + gp_Ax1 C3DCircleXAxis = C3DCircle->XAxis(); + + // project it to a 2D curve in another plane + + gp_Pln ProjectionPlane(gp_Pnt(1,1,0),gp_Dir( 1,1,1 )); + + Handle(Geom2d_Curve) C2D = + GeomAPI::To2d(C3D,ProjectionPlane); + + Handle(Geom2d_Circle) C2DCircle = + Handle(Geom2d_Circle)::DownCast(C2D); + gp_Ax2d C2DCircleXAxis = C2DCircle->XAxis(); + + //============================================================== + TCollection_AsciiString Message (" \ \n\ Standard_Real radius = 5; \n\ gp_Ax2d ax2d(gp_Pnt2d(2,3),gp_Dir2d(1,0)); \n\ @@ -1668,90 +1679,90 @@ Handle(Geom2d_Circle) C2DCircle = \n\ Handle(Geom2d_Circle)::DownCast(C2D); \n\ gp_Ax2d C2DCircleXAxis = C2DCircle->XAxis(); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- - Handle(Geom_Plane) aPlane = GC_MakePlane(gp_Pln(gp_Ax3(gp::XOY()))).Value(); - Handle(Geom_RectangularTrimmedSurface) aSurface= new Geom_RectangularTrimmedSurface(aPlane,-8.,8.,-12.,12.); - DisplaySurface(aDoc,aSurface); + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- + Handle(Geom_Plane) aPlane = GC_MakePlane(gp_Pln(gp_Ax3(gp::XOY()))).Value(); + Handle(Geom_RectangularTrimmedSurface) aSurface= new Geom_RectangularTrimmedSurface(aPlane,-8.,8.,-12.,12.); + DisplaySurface(aDoc,aSurface); - Handle(Geom_Plane) aProjectionPlane = GC_MakePlane(ProjectionPlane).Value(); - Handle(Geom_RectangularTrimmedSurface) aProjectionPlaneSurface= - new Geom_RectangularTrimmedSurface(aProjectionPlane,-8.,8.,-12.,12.); - - DisplaySurface(aDoc,aProjectionPlaneSurface); + Handle(Geom_Plane) aProjectionPlane = GC_MakePlane(ProjectionPlane).Value(); + Handle(Geom_RectangularTrimmedSurface) aProjectionPlaneSurface= + new Geom_RectangularTrimmedSurface(aProjectionPlane,-8.,8.,-12.,12.); - Standard_CString aC3DEntityTypeName = C3D->DynamicType()->Name(); - Standard_CString aC2DEntityTypeName = C2D->DynamicType()->Name(); + DisplaySurface(aDoc,aProjectionPlaneSurface); - Message += " C3D->DynamicType()->Name() = "; - Message += aC3DEntityTypeName; Message += " \n"; - Message += " C2D->DynamicType()->Name() = "; - Message += aC2DEntityTypeName; Message += " \n"; + Standard_CString aC3DEntityTypeName = C3D->DynamicType()->Name(); + Standard_CString aC2DEntityTypeName = C2D->DynamicType()->Name(); - DisplayCurve(aDoc,circ2d,4,false); - DisplayCurve(aDoc,C3D,false); - DisplayCurve(aDoc,C2D,5,false); + Message += " C3D->DynamicType()->Name() = "; + Message += aC3DEntityTypeName; Message += " \n"; + Message += " C2D->DynamicType()->Name() = "; + Message += aC2DEntityTypeName; Message += " \n"; - Handle(ISession_Direction) aC3DCircleXAxisDirection = new ISession_Direction((gp_Pnt)C3DCircleXAxis.Location(), - (gp_Dir)C3DCircleXAxis.Direction(), - 5.2); - aDoc->GetAISContext()->Display(aC3DCircleXAxisDirection, Standard_False); + DisplayCurve(aDoc,circ2d,4,false); + DisplayCurve(aDoc,C3D,false); + DisplayCurve(aDoc,C2D,5,false); - Handle(ISession_Direction) acirc2dXAxisDirection = new ISession_Direction((gp_Pnt2d)circ2dXAxis.Location(), - (gp_Dir2d)circ2dXAxis.Direction(), - 5.2); - aDoc->GetISessionContext()->Display(acirc2dXAxisDirection, Standard_False); + Handle(ISession_Direction) aC3DCircleXAxisDirection = new ISession_Direction((gp_Pnt)C3DCircleXAxis.Location(), + (gp_Dir)C3DCircleXAxis.Direction(), + 5.2); + aDoc->GetAISContext()->Display(aC3DCircleXAxisDirection, Standard_False); - Handle(ISession_Direction) aC2DCircleXAxisDirection = new ISession_Direction((gp_Pnt2d)C2DCircleXAxis.Location(), - (gp_Dir2d)C2DCircleXAxis.Direction(), - 5.2); - aDoc->GetISessionContext()->Display(aC2DCircleXAxisDirection, Standard_False); + Handle(ISession_Direction) acirc2dXAxisDirection = new ISession_Direction((gp_Pnt2d)circ2dXAxis.Location(), + (gp_Dir2d)circ2dXAxis.Direction(), + 5.2); + aDoc->GetISessionContext()->Display(acirc2dXAxisDirection, Standard_False); + Handle(ISession_Direction) aC2DCircleXAxisDirection = new ISession_Direction((gp_Pnt2d)C2DCircleXAxis.Location(), + (gp_Dir2d)C2DCircleXAxis.Direction(), + 5.2); + aDoc->GetISessionContext()->Display(aC2DCircleXAxisDirection, Standard_False); - PostProcess(aDoc,ID_BUTTON_Test_24,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_24,TheDisplayType,Message.ToCString()); } - // Function name : GeomSources::gpTest25 // Description : // Return type : void // Argument : CGeometryDoc* aDoc void GeomSources::gpTest25(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -Handle(TColgp_HArray1OfPnt2d) harray = - new TColgp_HArray1OfPnt2d (1,5); // sizing harray -harray->SetValue(1,gp_Pnt2d (0,0)); -harray->SetValue(2,gp_Pnt2d (-3,1)); -harray->SetValue(3,gp_Pnt2d (-2,5)); -harray->SetValue(4,gp_Pnt2d (2,9)); -harray->SetValue(5,gp_Pnt2d (-4,14)); - -Geom2dAPI_Interpolate anInterpolation(harray,Standard_False,0.01); -anInterpolation.Perform(); -Handle(Geom2d_BSplineCurve) SPL = anInterpolation.Curve(); - -gp_Pnt2d P1(-1,-2); -gp_Pnt2d P2(0,15); -gp_Dir2d V1 = gp::DY2d(); -Handle(Geom2d_TrimmedCurve) TC1= - GCE2d_MakeSegment(P1,V1,P2); - -Standard_Real tolerance = Precision::Confusion(); -Geom2dAPI_InterCurveCurve ICC (SPL,TC1,tolerance); -Standard_Integer NbPoints =ICC.NbPoints(); -gp_Pnt2d PK; -for (Standard_Integer k = 1;k<=NbPoints;k++) - { - PK = ICC.Point(k); - // do something with each intersection point - } - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== + + Handle(TColgp_HArray1OfPnt2d) harray = + new TColgp_HArray1OfPnt2d (1,5); // sizing harray + harray->SetValue(1,gp_Pnt2d (0,0)); + harray->SetValue(2,gp_Pnt2d (-3,1)); + harray->SetValue(3,gp_Pnt2d (-2,5)); + harray->SetValue(4,gp_Pnt2d (2,9)); + harray->SetValue(5,gp_Pnt2d (-4,14)); + +Geom2dAPI_Interpolate anInterpolation(harray,Standard_False,0.01); +anInterpolation.Perform(); +Handle(Geom2d_BSplineCurve) SPL = anInterpolation.Curve(); + +gp_Pnt2d P1(-1,-2); +gp_Pnt2d P2(0,15); +gp_Dir2d V1 = gp::DY2d(); +Handle(Geom2d_TrimmedCurve) TC1 = + GCE2d_MakeSegment(P1,V1,P2); + +Standard_Real tolerance = Precision::Confusion(); +Geom2dAPI_InterCurveCurve ICC (SPL,TC1,tolerance); +Standard_Integer NbPoints =ICC.NbPoints(); +gp_Pnt2d PK; + +for (Standard_Integer k = 1;k<=NbPoints;k++) +{ + PK = ICC.Point(k); + // do something with each intersection point +} + + //============================================================== + TCollection_AsciiString Message (" \ \n\ Handle(TColgp_HArray1OfPnt2d) harray = \n\ new TColgp_HArray1OfPnt2d (1,5); // sizing harray \n\ @@ -1781,38 +1792,38 @@ for (Standard_Integer k = 1;k<=NbPoints;k++) \n\ // do something with each intersection point \n\ } \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - Handle(ISession2D_Curve) aCurve1 = new ISession2D_Curve(SPL); - aCurve1->SetDisplayPole(Standard_False); - aDoc->GetISessionContext()->Display(aCurve1, Standard_False); - Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(TC1); - aDoc->GetISessionContext()->Display(aCurve2, Standard_False); + Handle(ISession2D_Curve) aCurve1 = new ISession2D_Curve(SPL); + aCurve1->SetDisplayPole(Standard_False); + aDoc->GetISessionContext()->Display(aCurve1, Standard_False); + Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(TC1); + aDoc->GetISessionContext()->Display(aCurve2, Standard_False); - TCollection_AsciiString aString; - for (Standard_Integer i = 1;i<=NbPoints;i++) - { - PK = ICC.Point(i); - // do something with each intersection point - TCollection_AsciiString Message2 (i); - TCollection_AsciiString Message3 (PK.X()); - TCollection_AsciiString Message4 (PK.Y()); - aString = "PK_"; - aString += Message2; - - DisplayPoint(aDoc,PK,aString.ToCString(),false,0.5); - - Message += "PK_"; - Message += Message2; - Message += " ( "; - Message += Message3; - Message += " , "; - Message += Message4; - Message += " )\n"; - } + TCollection_AsciiString aString; + for (Standard_Integer i = 1;i<=NbPoints;i++) + { + PK = ICC.Point(i); + // do something with each intersection point + TCollection_AsciiString Message2 (i); + TCollection_AsciiString Message3 (PK.X()); + TCollection_AsciiString Message4 (PK.Y()); + aString = "PK_"; + aString += Message2; - PostProcess(aDoc,ID_BUTTON_Test_25,TheDisplayType,Message.ToCString()); + DisplayPoint(aDoc,PK,aString.ToCString(),false,0.5); + + Message += "PK_"; + Message += Message2; + Message += " ( "; + Message += Message3; + Message += " , "; + Message += Message4; + Message += " )\n"; + } + + PostProcess(aDoc,ID_BUTTON_Test_25,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest26 @@ -1821,46 +1832,50 @@ for (Standard_Integer k = 1;k<=NbPoints;k++) \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest26(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -//----------- Build TC1 ----------------------- -gp_Pnt2d P1(0,0); gp_Pnt2d P2(2,6); -gp_Dir2d V1 = gp::DY2d(); -Handle(Geom2d_TrimmedCurve) TC1 = GCE2d_MakeSegment(P1,V1,P2); -Standard_Real FP1 = TC1->FirstParameter(); -Standard_Real LP1 = TC1->LastParameter(); -//----------- Build TC2 ----------------------- -gp_Pnt2d P3(-9,6.5); gp_Dir2d V2 = gp::DX2d(); -Handle(Geom2d_TrimmedCurve) TC2 = GCE2d_MakeSegment(P3,V2,P2); -Standard_Real FP2 = TC1->FirstParameter(); -Standard_Real LP2 = TC1->LastParameter(); -//----------- Extrema TC1 / TC2 --------------- -Geom2dAPI_ExtremaCurveCurve ECC (TC1,TC2, FP1,LP1, FP2,LP2); -Standard_Real shortestdistance =-1; -if (ECC.NbExtrema() != 0) shortestdistance = ECC.LowerDistance(); -//----------- Build SPL1 ---------------------- -TColgp_Array1OfPnt2d array (1,5); // sizing array -array.SetValue(1,gp_Pnt2d (-4,0)); array.SetValue(2,gp_Pnt2d (-7,2)); -array.SetValue(3,gp_Pnt2d (-6,3)); array.SetValue(4,gp_Pnt2d (-4,3)); -array.SetValue(5,gp_Pnt2d (-3,5)); -Handle(Geom2d_BSplineCurve) SPL1 = Geom2dAPI_PointsToBSpline(array); -Standard_Real FPSPL1 = SPL1->FirstParameter(); -Standard_Real LPSPL1 = SPL1->LastParameter(); -//----------- Extrema TC1 / SPL1 ------------- -Geom2dAPI_ExtremaCurveCurve ECC2 (TC1,SPL1, FP1,LP1, FPSPL1,LPSPL1); -Standard_Real SPL1shortestdistance =-1; -if (ECC2.NbExtrema()!=0) SPL1shortestdistance = ECC2.LowerDistance(); -Standard_Integer NbExtrema = ECC2.NbExtrema(); -TColgp_Array2OfPnt2d aSolutionArray(1,NbExtrema,1,2); -for(int i=1;i <= NbExtrema; i++) { - gp_Pnt2d P1,P2; - ECC2.Points(i,P1,P2); - aSolutionArray(i,1) = P1; aSolutionArray(i,2) = P2; } - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== + + //----------- Build TC1 ----------------------- + gp_Pnt2d P1(0,0); gp_Pnt2d P2(2,6); + gp_Dir2d V1 = gp::DY2d(); + Handle(Geom2d_TrimmedCurve) TC1 = GCE2d_MakeSegment(P1,V1,P2); + Standard_Real FP1 = TC1->FirstParameter(); + Standard_Real LP1 = TC1->LastParameter(); + //----------- Build TC2 ----------------------- + gp_Pnt2d P3(-9,6.5); gp_Dir2d V2 = gp::DX2d(); + Handle(Geom2d_TrimmedCurve) TC2 = GCE2d_MakeSegment(P3,V2,P2); + Standard_Real FP2 = TC1->FirstParameter(); + Standard_Real LP2 = TC1->LastParameter(); + //----------- Extrema TC1 / TC2 --------------- + Geom2dAPI_ExtremaCurveCurve ECC (TC1,TC2, FP1,LP1, FP2,LP2); + Standard_Real shortestdistance =-1; + if (ECC.NbExtrema() != 0) shortestdistance = ECC.LowerDistance(); + //----------- Build SPL1 ---------------------- + TColgp_Array1OfPnt2d array (1,5); // sizing array + array.SetValue(1,gp_Pnt2d (-4,0)); array.SetValue(2,gp_Pnt2d (-7,2)); + array.SetValue(3,gp_Pnt2d (-6,3)); array.SetValue(4,gp_Pnt2d (-4,3)); + array.SetValue(5,gp_Pnt2d (-3,5)); + Handle(Geom2d_BSplineCurve) SPL1 = Geom2dAPI_PointsToBSpline(array); + Standard_Real FPSPL1 = SPL1->FirstParameter(); + Standard_Real LPSPL1 = SPL1->LastParameter(); + //----------- Extrema TC1 / SPL1 ------------- + Geom2dAPI_ExtremaCurveCurve ECC2 (TC1,SPL1, FP1,LP1, FPSPL1,LPSPL1); + Standard_Real SPL1shortestdistance =-1; + if (ECC2.NbExtrema()!=0) SPL1shortestdistance = ECC2.LowerDistance(); + Standard_Integer NbExtrema = ECC2.NbExtrema(); + TColgp_Array2OfPnt2d aSolutionArray(1,NbExtrema,1,2); + for(int i=1;i <= NbExtrema; i++) + { + gp_Pnt2d P1,P2; + ECC2.Points(i,P1,P2); + aSolutionArray(i,1) = P1; + aSolutionArray(i,2) = P2; + } + + //============================================================== + TCollection_AsciiString Message (" \ //----------- Build TC1 ----------------------- \n\ gp_Pnt2d P1(0,0); gp_Pnt2d P2(2,6); \n\ gp_Dir2d V1 = gp::DY2d(); \n\ @@ -1895,60 +1910,66 @@ for(int i=1;i <= NbExtrema; i++) { \n\ gp_Pnt2d P1,P2; \n\ ECC2.Points(i,P1,P2); \n\ aSolutionArray(i,1) = P1; aSolutionArray(i,2) = P2; } \n"; - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - TCollection_AsciiString aString; - for(int i = array.Lower();i<=array.Upper();i++){ - TCollection_AsciiString Message2 (i); - gp_Pnt2d P = array(i); - aString = "array "; - aString += Message2; - DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); - } + TCollection_AsciiString aString; + for(int i = array.Lower();i<=array.Upper();i++) + { + TCollection_AsciiString Message2 (i); + gp_Pnt2d P = array(i); + aString = "array "; + aString += Message2; + DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); + } - if (!SPL1.IsNull()) - { - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(SPL1); - aCurve->SetDisplayPole(Standard_False); - aCurve->SetColorIndex(3); - aDoc->GetISessionContext()->Display(aCurve, Standard_False); - } - else - MessageBox(0,"SPL1.IsNull()","CasCade Error",MB_ICONERROR); + if (!SPL1.IsNull()) + { + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(SPL1); + aCurve->SetDisplayPole(Standard_False); + aCurve->SetColorIndex(3); + aDoc->GetISessionContext()->Display(aCurve, Standard_False); + } + else + MessageBox(0,"SPL1.IsNull()","CasCade Error",MB_ICONERROR); - Handle(ISession2D_Curve) aCurve1 = new ISession2D_Curve(TC1); - aCurve1->SetColorIndex(6); - aDoc->GetISessionContext()->Display(aCurve1, Standard_False); - Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(TC2); - aCurve2->SetColorIndex(5); - aDoc->GetISessionContext()->Display(aCurve2, Standard_False); + Handle(ISession2D_Curve) aCurve1 = new ISession2D_Curve(TC1); + aCurve1->SetColorIndex(6); + aDoc->GetISessionContext()->Display(aCurve1, Standard_False); + Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(TC2); + aCurve2->SetColorIndex(5); + aDoc->GetISessionContext()->Display(aCurve2, Standard_False); + for(int i=1;i <= NbExtrema; i++) + { + gp_Pnt2d P1 =aSolutionArray(i,1); - for(int i=1;i <= NbExtrema; i++) - { - gp_Pnt2d P1 =aSolutionArray(i,1); - - TCollection_AsciiString Message2 (i); - aString = "P1_"; - aString += Message2; - DisplayPoint(aDoc,P1,aString.ToCString(),false,0.7*i); + TCollection_AsciiString Message2 (i); + aString = "P1_"; + aString += Message2; + DisplayPoint(aDoc,P1,aString.ToCString(),false,0.7*i); - gp_Pnt2d P2 = aSolutionArray(i,2); - - Handle(Geom2d_TrimmedCurve) SolutionCurve = - GCE2d_MakeSegment(P1,P2); - Handle(ISession2D_Curve) aSolutionCurve = new ISession2D_Curve(SolutionCurve); - aDoc->GetISessionContext()->Display(aSolutionCurve, Standard_False); - } + gp_Pnt2d P2 = aSolutionArray(i,2); - Message += "TC1 is Yellow ,TC2 is Blue ,SPL1 is Red \n"; - Message += "ECC.NbExtrema() = "; Message += ECC.NbExtrema(); - Message += " shortestdistance = "; Message+= shortestdistance; Message += "\n"; - Message += "ECC2.NbExtrema() = "; Message += NbExtrema; - Message += " SPL1shortestdistance = "; Message+= SPL1shortestdistance; Message += "\n"; + Handle(Geom2d_TrimmedCurve) SolutionCurve = + GCE2d_MakeSegment(P1,P2); + Handle(ISession2D_Curve) aSolutionCurve = new ISession2D_Curve(SolutionCurve); + aDoc->GetISessionContext()->Display(aSolutionCurve, Standard_False); + } - PostProcess(aDoc,ID_BUTTON_Test_26,TheDisplayType,Message.ToCString()); + Message += "TC1 is Yellow ,TC2 is Blue ,SPL1 is Red \n"; + Message += "ECC.NbExtrema() = "; + Message += ECC.NbExtrema(); + Message += " shortestdistance = "; + Message+= shortestdistance; + Message += "\n"; + Message += "ECC2.NbExtrema() = "; + Message += NbExtrema; + Message += " SPL1shortestdistance = "; + Message+= SPL1shortestdistance; + Message += "\n"; + + PostProcess(aDoc,ID_BUTTON_Test_26,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest27 @@ -1957,28 +1978,27 @@ for(int i=1;i <= NbExtrema; i++) { \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest27(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -TColgp_Array1OfPnt2d array (1,5); // sizing array -array.SetValue(1,gp_Pnt2d (-4,0)); array.SetValue(2,gp_Pnt2d (-7,2)); -array.SetValue(3,gp_Pnt2d (-6,3)); array.SetValue(4,gp_Pnt2d (-4,3)); -array.SetValue(5,gp_Pnt2d (-3,5)); -Handle(Geom2d_BSplineCurve) SPL1 = Geom2dAPI_PointsToBSpline(array); - -Standard_Real dist = 1; -Handle(Geom2d_OffsetCurve) OC = - new Geom2d_OffsetCurve(SPL1,dist); -Standard_Boolean result = OC->IsCN(2); - -Standard_Real dist2 = 1.5; -Handle(Geom2d_OffsetCurve) OC2 = - new Geom2d_OffsetCurve(SPL1,dist2); -Standard_Boolean result2 = OC2->IsCN(2); - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + TColgp_Array1OfPnt2d array (1,5); // sizing array + array.SetValue(1,gp_Pnt2d (-4,0)); array.SetValue(2,gp_Pnt2d (-7,2)); + array.SetValue(3,gp_Pnt2d (-6,3)); array.SetValue(4,gp_Pnt2d (-4,3)); + array.SetValue(5,gp_Pnt2d (-3,5)); + Handle(Geom2d_BSplineCurve) SPL1 = Geom2dAPI_PointsToBSpline(array); + + Standard_Real dist = 1; + Handle(Geom2d_OffsetCurve) OC = + new Geom2d_OffsetCurve(SPL1,dist); + Standard_Boolean result = OC->IsCN(2); + Standard_Real dist2 = 1.5; + Handle(Geom2d_OffsetCurve) OC2 = + new Geom2d_OffsetCurve(SPL1,dist2); + Standard_Boolean result2 = OC2->IsCN(2); + + //============================================================== + TCollection_AsciiString Message (" \ \n\ TColgp_Array1OfPnt2d array (1,5); // sizing array \n\ array.SetValue(1,gp_Pnt2d (-4,0)); array.SetValue(2,gp_Pnt2d (-7,2)); \n\ @@ -1996,29 +2016,33 @@ Handle(Geom2d_OffsetCurve) OC2 = \n\ new Geom2d_OffsetCurve(SPL1,dist2); \n\ Standard_Boolean result2 = OC2->IsCN(2); \n\ \n"); - AddSeparator(aDoc,Message); -//-------------------------------------------------------------- - Handle(ISession2D_Curve) aCurve1 = new ISession2D_Curve(SPL1); - aCurve1->SetColorIndex(6); - aDoc->GetISessionContext()->Display(aCurve1, Standard_False); - Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(OC); - aCurve2->SetColorIndex(5); - aDoc->GetISessionContext()->Display(aCurve2, Standard_False); - Handle(ISession2D_Curve) aCurve3 = new ISession2D_Curve(OC2); - aCurve3->SetColorIndex(3); - aDoc->GetISessionContext()->Display(aCurve3, Standard_False); + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- + Handle(ISession2D_Curve) aCurve1 = new ISession2D_Curve(SPL1); + aCurve1->SetColorIndex(6); + aDoc->GetISessionContext()->Display(aCurve1, Standard_False); + Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(OC); + aCurve2->SetColorIndex(5); + aDoc->GetISessionContext()->Display(aCurve2, Standard_False); + Handle(ISession2D_Curve) aCurve3 = new ISession2D_Curve(OC2); + aCurve3->SetColorIndex(3); + aDoc->GetISessionContext()->Display(aCurve3, Standard_False); - Message += "SPL1 is Yellow \n"; - Message += "OC is Blue \n"; - Message += "OC2 is Red \n\n"; - Message += " Warning, Continuity is not guaranteed : \n "; - if(result) Message += " result = True \n"; - else Message += " result = False \n"; - if(result2) Message += " result2 = True \n"; - else Message += " result2 = False \n"; + Message += "SPL1 is Yellow \n"; + Message += "OC is Blue \n"; + Message += "OC2 is Red \n\n"; + Message += " Warning, Continuity is not guaranteed : \n "; + if(result) + Message += " result = True \n"; + else + Message += " result = False \n"; + if(result2) + Message += " result2 = True \n"; + else + Message += " result2 = False \n"; - PostProcess(aDoc,ID_BUTTON_Test_27,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_27,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest28 @@ -2027,34 +2051,34 @@ Standard_Boolean result2 = OC2->IsCN(2); \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest28(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -gp_Pnt2d P1(1,2); -gp_Pnt2d P2(4,5); -gp_Lin2d L = gce_MakeLin2d(P1,P2); -// assignment by overloaded operator - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + gp_Pnt2d P1(1,2); + gp_Pnt2d P2(4,5); + gp_Lin2d L = gce_MakeLin2d(P1,P2); + // assignment by overloaded operator + + //============================================================== + TCollection_AsciiString Message (" \ \n\ gp_Pnt2d P1(1,2); \n\ gp_Pnt2d P2(4,5); \n\ gp_Lin2d L = gce_MakeLin2d(P1,P2); \n\ // assignment by overloaded operator \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- - - DisplayPoint(aDoc,P1,"P1",false,0.5); - DisplayPoint(aDoc,P2,"P2",false,0.5); + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - Handle(Geom2d_TrimmedCurve) aLine = GCE2d_MakeSegment(L,-3,8); - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aLine); - aDoc->GetISessionContext()->Display(aCurve, Standard_False); + DisplayPoint(aDoc,P1,"P1",false,0.5); + DisplayPoint(aDoc,P2,"P2",false,0.5); - PostProcess(aDoc,ID_BUTTON_Test_28,TheDisplayType,Message.ToCString()); + Handle(Geom2d_TrimmedCurve) aLine = GCE2d_MakeSegment(L,-3,8); + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aLine); + aDoc->GetISessionContext()->Display(aCurve, Standard_False); + + PostProcess(aDoc,ID_BUTTON_Test_28,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest29 @@ -2063,21 +2087,22 @@ gp_Lin2d L = gce_MakeLin2d(P1,P2); \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest29(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== -gp_Pnt2d P1(1,2); -gp_Pnt2d P2(4,5); -gp_Lin2d L; -GccAna_Pnt2dBisec B(P1,P2); -if (B.IsDone()) - { - L = B.ThisSolution(); - } - -//============================================================== - TCollection_AsciiString Message (" \ + gp_Pnt2d P1(1,2); + gp_Pnt2d P2(4,5); + gp_Lin2d L; + GccAna_Pnt2dBisec B(P1,P2); + if (B.IsDone()) + { + L = B.ThisSolution(); + } + + //============================================================== + TCollection_AsciiString Message (" \ \n\ gp_Pnt2d P1(1,2); \n\ gp_Pnt2d P2(4,5); \n\ @@ -2088,22 +2113,22 @@ if (B.IsDone()) \n\ L = B.ThisSolution(); \n\ } \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplayPoint(aDoc,P1,"P1",false,0.5); - DisplayPoint(aDoc,P2,"P2",false,0.5); + DisplayPoint(aDoc,P1,"P1",false,0.5); + DisplayPoint(aDoc,P2,"P2",false,0.5); - if (B.IsDone()) - { - Handle(Geom2d_TrimmedCurve) aLine = GCE2d_MakeSegment(L,-8,8); - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aLine); - aDoc->GetISessionContext()->Display(aCurve, Standard_False); - } + if (B.IsDone()) + { + Handle(Geom2d_TrimmedCurve) aLine = GCE2d_MakeSegment(L,-8,8); + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aLine); + aDoc->GetISessionContext()->Display(aCurve, Standard_False); + } - if (B.IsDone()) Message += " \n B Is Done "; - else Message += " \n B Is not Done "; - PostProcess(aDoc,ID_BUTTON_Test_29,TheDisplayType,Message.ToCString()); + if (B.IsDone()) Message += " \n B Is Done "; + else Message += " \n B Is not Done "; + PostProcess(aDoc,ID_BUTTON_Test_29,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest30 @@ -2112,30 +2137,31 @@ if (B.IsDone()) \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest30(CGeometryDoc* aDoc) { - DisplayType TheDisplayType =a2DNo3D ; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -gp_Pnt2d P1 (2,3); -gp_Pnt2d P2 (4,4); -gp_Pnt2d P3 (6,7); -gp_Pnt2d P4 (10,10); -gp_Circ2d C = gce_MakeCirc2d (P1,P2,P3); -GccEnt_QualifiedCirc QC = GccEnt::Outside(C); -GccAna_Lin2d2Tan LT (QC,P4,Precision::Confusion()); -Standard_Integer NbSol; -if (LT.IsDone()) - { - NbSol = LT.NbSolutions(); - for(Standard_Integer k=1; k<=NbSol; k++) - { - gp_Lin2d L = LT.ThisSolution(k); - // do something with L - } - } - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType =a2DNo3D ; + PreProcess(aDoc,TheDisplayType); + + //============================================================== + + gp_Pnt2d P1 (2,3); + gp_Pnt2d P2 (4,4); + gp_Pnt2d P3 (6,7); + gp_Pnt2d P4 (10,10); + gp_Circ2d C = gce_MakeCirc2d (P1,P2,P3); + GccEnt_QualifiedCirc QC = GccEnt::Outside(C); + GccAna_Lin2d2Tan LT (QC,P4,Precision::Confusion()); + Standard_Integer NbSol; + if (LT.IsDone()) + { + NbSol = LT.NbSolutions(); + for(Standard_Integer k=1; k<=NbSol; k++) + { + gp_Lin2d L = LT.ThisSolution(k); + // do something with L + } + } + + //============================================================== + TCollection_AsciiString Message (" \ \n\ gp_Pnt2d P1 (2,3); \n\ gp_Pnt2d P2 (4,4); \n\ @@ -2155,81 +2181,81 @@ if (LT.IsDone()) \n\ } \n\ } \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplayPoint(aDoc,P1,"P1",false,0.5,-1,0.1); - DisplayPoint(aDoc,P2,"P2",false,0.5,-0.7,0.1); - DisplayPoint(aDoc,P3,"P3",false,0.5,-0.5,0.1); - DisplayPoint(aDoc,P4,"P4",false,0.5,0,0.1); - - Handle(Geom2d_Circle) aCircle = new Geom2d_Circle(C); - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aCircle); - aCurve->SetColorIndex(5); - aDoc->GetISessionContext()->Display(aCurve, Standard_False); + DisplayPoint(aDoc,P1,"P1",false,0.5,-1,0.1); + DisplayPoint(aDoc,P2,"P2",false,0.5,-0.7,0.1); + DisplayPoint(aDoc,P3,"P3",false,0.5,-0.5,0.1); + DisplayPoint(aDoc,P4,"P4",false,0.5,0,0.1); - if (LT.IsDone()) - { - Standard_Integer NbSol = LT.NbSolutions(); - for(Standard_Integer k=1; k<=NbSol; k++) - { - gp_Lin2d L = LT.ThisSolution(k); - Handle(Geom2d_TrimmedCurve) aLine = GCE2d_MakeSegment(L,-10,20); - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aLine); - aDoc->GetISessionContext()->Display(aCurve, Standard_False); - } - } - Message += " C is Blue \n\n"; - Message += "LT.IsDone() = "; - if (LT.IsDone()) Message += "True \n"; else Message += "False \n"; - TCollection_AsciiString Message2 (NbSol); - Message += "NbSol = "; Message += Message2 ; Message += "\n"; + Handle(Geom2d_Circle) aCircle = new Geom2d_Circle(C); + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aCircle); + aCurve->SetColorIndex(5); + aDoc->GetISessionContext()->Display(aCurve, Standard_False); - PostProcess(aDoc,ID_BUTTON_Test_30,TheDisplayType,Message.ToCString()); + if (LT.IsDone()) + { + Standard_Integer NbSol = LT.NbSolutions(); + for(Standard_Integer k=1; k<=NbSol; k++) + { + gp_Lin2d L = LT.ThisSolution(k); + Handle(Geom2d_TrimmedCurve) aLine = GCE2d_MakeSegment(L,-10,20); + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aLine); + aDoc->GetISessionContext()->Display(aCurve, Standard_False); + } + } + Message += " C is Blue \n\n"; + Message += "LT.IsDone() = "; + if (LT.IsDone()) Message += "True \n"; else Message += "False \n"; + TCollection_AsciiString Message2 (NbSol); + Message += "NbSol = "; Message += Message2 ; Message += "\n"; + + PostProcess(aDoc,ID_BUTTON_Test_30,TheDisplayType,Message.ToCString()); } - // Function name : GeomSources::gpTest31 // Description : // Return type : void // Argument : CGeometryDoc* aDoc void GeomSources::gpTest31(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -gp_Pnt2d P1 (9,6); -gp_Pnt2d P2 (10,4); -gp_Pnt2d P3 (6,7); -gp_Circ2d C = gce_MakeCirc2d (P1,P2,P3); -GccEnt_QualifiedCirc QC = GccEnt::Outside(C); -gp_Pnt2d P4 (-2,7); -gp_Pnt2d P5 (12,-3); -gp_Lin2d L = GccAna_Lin2d2Tan(P4,P5,Precision::Confusion()).ThisSolution(1); -GccEnt_QualifiedLin QL = GccEnt::Unqualified(L); -Standard_Real radius = 2; -GccAna_Circ2d2TanRad TR (QC,QL,radius,Precision::Confusion()); -Standard_Real parsol,pararg; -gp_Pnt2d tangentpoint1,tangentpoint2; -gp_Circ2d circ; -if (TR.IsDone()) - { - Standard_Integer NbSol = TR.NbSolutions(); - for (Standard_Integer k=1; k<=NbSol; k++) - { - circ = TR.ThisSolution(k); - // find the solution circle - TR.Tangency1(k,parsol,pararg,tangentpoint1); - // find the first tangent point - TR.Tangency2(k,parsol,pararg,tangentpoint2); - // find the second tangent point - } - } - -//============================================================== - TCollection_AsciiString Message; -Message = "\ + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== + +gp_Pnt2d P1 (9,6); +gp_Pnt2d P2 (10,4); +gp_Pnt2d P3 (6,7); +gp_Circ2d C = gce_MakeCirc2d (P1,P2,P3); +GccEnt_QualifiedCirc QC = GccEnt::Outside(C); +gp_Pnt2d P4 (-2,7); +gp_Pnt2d P5 (12,-3); +gp_Lin2d L = GccAna_Lin2d2Tan(P4,P5,Precision::Confusion()).ThisSolution(1); +GccEnt_QualifiedLin QL = GccEnt::Unqualified(L); +Standard_Real radius = 2; +GccAna_Circ2d2TanRad TR (QC,QL,radius,Precision::Confusion()); +Standard_Real parsol,pararg; +gp_Pnt2d tangentpoint1,tangentpoint2; +gp_Circ2d circ; +if (TR.IsDone()) +{ + Standard_Integer NbSol = TR.NbSolutions(); + for (Standard_Integer k=1; k<=NbSol; k++) + { + circ = TR.ThisSolution(k); + // find the solution circle + TR.Tangency1(k,parsol,pararg,tangentpoint1); + // find the first tangent point + TR.Tangency2(k,parsol,pararg,tangentpoint2); + // find the second tangent point + } +} + + //============================================================== + TCollection_AsciiString Message; + Message = "\ \n\ gp_Pnt2d P1 (9,6); \n\ gp_Pnt2d P2 (10,4); \n\ @@ -2250,7 +2276,7 @@ if (TR.IsDone()) \n Standard_Integer NbSol = TR.NbSolutions(); \n\ for (Standard_Integer k=1; k<=NbSol; k++) \n\ { \n"; - Message += "\ + Message += "\ circ = TR.ThisSolution(k); \n\ // find the solution circle \n\ TR.Tangency1(k,parsol,pararg,tangentpoint1); \n\ @@ -2260,46 +2286,47 @@ if (TR.IsDone()) \n } \n\ } \n\ \n"; - AddSeparator(aDoc,Message); -//-------------------------------------------------------------- - DisplayPoint(aDoc,P1,"P1",false,0.3); - DisplayPoint(aDoc,P2,"P2",false,0.3); - DisplayPoint(aDoc,P3,"P3",false,0.3); - DisplayPoint(aDoc,P4,"P4",false,0.3); - DisplayPoint(aDoc,P5,"P5",false,0.3); + AddSeparator(aDoc,Message); - Handle(Geom2d_Circle) aCircle = new Geom2d_Circle(C); - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aCircle); - aCurve->SetColorIndex(3); + //-------------------------------------------------------------- + DisplayPoint(aDoc,P1,"P1",false,0.3); + DisplayPoint(aDoc,P2,"P2",false,0.3); + DisplayPoint(aDoc,P3,"P3",false,0.3); + DisplayPoint(aDoc,P4,"P4",false,0.3); + DisplayPoint(aDoc,P5,"P5",false,0.3); - aDoc->GetISessionContext()->Display(aCurve, Standard_False); - Handle(Geom2d_TrimmedCurve) aLine = GCE2d_MakeSegment(L,-2,20); - Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(aLine); - aCurve2->SetColorIndex(5); - aDoc->GetISessionContext()->Display(aCurve2, Standard_False); + Handle(Geom2d_Circle) aCircle = new Geom2d_Circle(C); + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aCircle); + aCurve->SetColorIndex(3); - if (TR.IsDone()) - { - Standard_Integer NbSol = TR.NbSolutions(); - for (Standard_Integer k=1; k<=NbSol; k++) - { - circ = TR.ThisSolution(k); - Handle(Geom2d_Circle) aCircle = new Geom2d_Circle(circ); - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aCircle); - aDoc->GetISessionContext()->Display(aCurve, Standard_False); + aDoc->GetISessionContext()->Display(aCurve, Standard_False); + Handle(Geom2d_TrimmedCurve) aLine = GCE2d_MakeSegment(L,-2,20); + Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(aLine); + aCurve2->SetColorIndex(5); + aDoc->GetISessionContext()->Display(aCurve2, Standard_False); - // find the solution circle - TR.Tangency1(k,parsol,pararg,tangentpoint1); - // find the first tangent point - TR.Tangency2(k,parsol,pararg,tangentpoint2); - // find the second tangent point - DisplayPoint(aDoc,tangentpoint1,"tangentpoint1",false,0.3); - DisplayPoint(aDoc,tangentpoint2,"tangentpoint2",false,0.3); - } - } - Message += "C is Red \n"; - Message += "L is Blue \n"; - PostProcess(aDoc,ID_BUTTON_Test_31,TheDisplayType,Message.ToCString()); + if (TR.IsDone()) + { + Standard_Integer NbSol = TR.NbSolutions(); + for (Standard_Integer k=1; k<=NbSol; k++) + { + circ = TR.ThisSolution(k); + Handle(Geom2d_Circle) aCircle = new Geom2d_Circle(circ); + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aCircle); + aDoc->GetISessionContext()->Display(aCurve, Standard_False); + + // find the solution circle + TR.Tangency1(k,parsol,pararg,tangentpoint1); + // find the first tangent point + TR.Tangency2(k,parsol,pararg,tangentpoint2); + // find the second tangent point + DisplayPoint(aDoc,tangentpoint1,"tangentpoint1",false,0.3); + DisplayPoint(aDoc,tangentpoint2,"tangentpoint2",false,0.3); + } + } + Message += "C is Red \n"; + Message += "L is Blue \n"; + PostProcess(aDoc,ID_BUTTON_Test_31,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest32 @@ -2308,18 +2335,19 @@ if (TR.IsDone()) \n // Argument : CGeometryDoc* aDoc void GeomSources::gpTest32(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -Standard_Real major = 12; -Standard_Real minor = 4; -gp_Ax2d axis = gp::OX2d(); -gp_Elips2d EE(axis,major,minor);; -Handle(Geom2d_TrimmedCurve) arc = GCE2d_MakeArcOfEllipse(EE,0.0,M_PI/4); - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== + + Standard_Real major = 12; + Standard_Real minor = 4; + gp_Ax2d axis = gp::OX2d(); + gp_Elips2d EE(axis,major,minor); + Handle(Geom2d_TrimmedCurve) arc = GCE2d_MakeArcOfEllipse(EE,0.0,M_PI/4); + + //============================================================== + TCollection_AsciiString Message (" \ \n\ Standard_Real major = 12; \n\ Standard_Real minor = 4; \n\ @@ -2327,19 +2355,20 @@ gp_Ax2d axis = gp::OX2d(); \n\ gp_Elips2d EE(axis,major,minor); \n\ Handle(Geom2d_TrimmedCurve) arc = GCE2d_MakeArcOfEllipse(EE,0.0,PI/4); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- - Handle(Geom2d_Curve) E = GCE2d_MakeEllipse(EE); - Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(E); - aCurve->SetColorIndex(3); - aCurve->SetTypeOfLine(Aspect_TOL_DOTDASH); - //SetWidthOfLine - aDoc->GetISessionContext()->Display(aCurve, Standard_False); - Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(arc); - aDoc->GetISessionContext()->Display(aCurve2, Standard_False); - TCollection_AsciiString Message2 (M_PI); - Message += " PI = ";Message+= Message2; - PostProcess(aDoc,ID_BUTTON_Test_32,TheDisplayType,Message.ToCString()); + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- + Handle(Geom2d_Curve) E = GCE2d_MakeEllipse(EE); + Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(E); + aCurve->SetColorIndex(3); + aCurve->SetTypeOfLine(Aspect_TOL_DOTDASH); + //SetWidthOfLine + aDoc->GetISessionContext()->Display(aCurve, Standard_False); + Handle(ISession2D_Curve) aCurve2 = new ISession2D_Curve(arc); + aDoc->GetISessionContext()->Display(aCurve2, Standard_False); + TCollection_AsciiString Message2 (M_PI); + Message += " PI = ";Message+= Message2; + + PostProcess(aDoc,ID_BUTTON_Test_32,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest33 @@ -2348,42 +2377,43 @@ Handle(Geom2d_TrimmedCurve) arc = GCE2d_MakeArcOfEllipse(EE,0.0,PI/4); \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest33(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -gp_Pnt P1(0,0,1); -gp_Pnt P2(1,2,2); -gp_Pnt P3(2,3,3); -gp_Pnt P4(4,3,4); -gp_Pnt P5(5,5,5); -TColgp_Array1OfPnt array (1,5); // sizing array -array.SetValue(1,P1); -array.SetValue(2,P2); -array.SetValue(3,P3); -array.SetValue(4,P4); -array.SetValue(5,P5); -Handle(TColgp_HArray1OfPnt) harray = - new TColgp_HArray1OfPnt (1,5); // sizing harray -harray->SetValue(1,P1.Translated(gp_Vec(4,0,0))); -harray->SetValue(2,P2.Translated(gp_Vec(4,0,0))); -harray->SetValue(3,P3.Translated(gp_Vec(4,0,0))); -harray->SetValue(4,P4.Translated(gp_Vec(4,0,0))); -harray->SetValue(5,P5.Translated(gp_Vec(4,0,0))); -Handle(Geom_BSplineCurve) SPL1 = - GeomAPI_PointsToBSpline(array).Curve(); - -GeomAPI_Interpolate anInterpolation(harray,Standard_False,Precision::Approximation()); -anInterpolation.Perform(); - -Handle(Geom_BSplineCurve) SPL2; -if (anInterpolation.IsDone()) - SPL2 = anInterpolation.Curve(); -else - MessageBox(0,"The Interpolation is Not done","CasCade Warning",MB_ICONWARNING); - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== + + gp_Pnt P1(0,0,1); + gp_Pnt P2(1,2,2); + gp_Pnt P3(2,3,3); + gp_Pnt P4(4,3,4); + gp_Pnt P5(5,5,5); + TColgp_Array1OfPnt array (1,5); // sizing array + array.SetValue(1,P1); + array.SetValue(2,P2); + array.SetValue(3,P3); + array.SetValue(4,P4); + array.SetValue(5,P5); + Handle(TColgp_HArray1OfPnt) harray = + new TColgp_HArray1OfPnt (1,5); // sizing harray + harray->SetValue(1,P1.Translated(gp_Vec(4,0,0))); + harray->SetValue(2,P2.Translated(gp_Vec(4,0,0))); + harray->SetValue(3,P3.Translated(gp_Vec(4,0,0))); + harray->SetValue(4,P4.Translated(gp_Vec(4,0,0))); + harray->SetValue(5,P5.Translated(gp_Vec(4,0,0))); + Handle(Geom_BSplineCurve) SPL1 = + GeomAPI_PointsToBSpline(array).Curve(); + + GeomAPI_Interpolate anInterpolation(harray,Standard_False,Precision::Approximation()); + anInterpolation.Perform(); + + Handle(Geom_BSplineCurve) SPL2; + if (anInterpolation.IsDone()) + SPL2 = anInterpolation.Curve(); + else + MessageBox(0,"The Interpolation is Not done","CasCade Warning",MB_ICONWARNING); + + //============================================================== + TCollection_AsciiString Message (" \ \n\ gp_Pnt P1(0,0,1); \n\ gp_Pnt P2(1,2,2); \n\ @@ -2405,7 +2435,7 @@ harray->SetValue(4,P4.Translated(gp_Vec(4,0,0))); harray->SetValue(5,P5.Translated(gp_Vec(4,0,0))); \n\ Handle(Geom_BSplineCurve) SPL1 = \n\ GeomAPI_PointsToBSpline(array).Curve(); \n"); - Message += "\ + Message += "\ \n\ GeomAPI_Interpolate anInterpolation(harray,Standard_False,Precision::Approximation()); \n\ anInterpolation.Perform(); \n\ @@ -2416,36 +2446,41 @@ if (anInterpolation.IsDone()) else \n\ MessageBox(0,\"The Interpolation is Not done\",\"CasCade Warning\",MB_ICONWARNING); \n\ \n"; - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- - TCollection_AsciiString aString; - for(Standard_Integer i = array.Lower();i<=array.Upper();i++){ - - TCollection_AsciiString Message2 (i); - gp_Pnt P = array(i); - - aString = "P"; - aString += Message2; - if (i == 1) aString += " (array) "; - DisplayPoint(aDoc,P,aString.ToCString(),false,0.5);\ - - aString = "P"; - aString += Message2; - if (i == 1) aString += " (harray) "; - DisplayPoint(aDoc,P.Translated(gp_Vec(4,0,0)),aString.ToCString(),false,0.5);\ - - } + AddSeparator(aDoc,Message); - Handle(ISession_Curve) aCurve = new ISession_Curve(SPL1); - aDoc->GetAISContext()->SetDisplayMode(aCurve,1); - aDoc->GetAISContext()->Display(aCurve, Standard_False); + //-------------------------------------------------------------- - if (anInterpolation.IsDone()) { - Handle(ISession_Curve) aCurve2 = new ISession_Curve(SPL2); - aDoc->GetAISContext()->SetDisplayMode(aCurve2,1); - aDoc->GetAISContext()->Display(aCurve2, Standard_False); - } - PostProcess(aDoc,ID_BUTTON_Test_33,TheDisplayType,Message.ToCString()); + TCollection_AsciiString aString; + for(Standard_Integer i = array.Lower();i<=array.Upper();i++) + { + + TCollection_AsciiString Message2 (i); + gp_Pnt P = array(i); + + aString = "P"; + aString += Message2; + if (i == 1) aString += " (array) "; + DisplayPoint(aDoc,P,aString.ToCString(),false,0.5);\ + + aString = "P"; + aString += Message2; + if (i == 1) aString += " (harray) "; + DisplayPoint(aDoc,P.Translated(gp_Vec(4,0,0)),aString.ToCString(),false,0.5);\ + + } + + Handle(ISession_Curve) aCurve = new ISession_Curve(SPL1); + aDoc->GetAISContext()->SetDisplayMode(aCurve,1); + aDoc->GetAISContext()->Display(aCurve, Standard_False); + + if (anInterpolation.IsDone()) + { + Handle(ISession_Curve) aCurve2 = new ISession_Curve(SPL2); + aDoc->GetAISContext()->SetDisplayMode(aCurve2,1); + aDoc->GetAISContext()->Display(aCurve2, Standard_False); + } + + PostProcess(aDoc,ID_BUTTON_Test_33,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest34 @@ -2454,27 +2489,34 @@ else // Argument : CGeometryDoc* aDoc void GeomSources::gpTest34(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== + + TColgp_Array1OfPnt array (1,5); // sizing array + array.SetValue(1,gp_Pnt(0,0,1)); + array.SetValue(2,gp_Pnt(1,2,2)); + array.SetValue(3,gp_Pnt(2,3,3)); + array.SetValue(4,gp_Pnt(4,4,4)); + array.SetValue(5,gp_Pnt(5,5,5)); + + GProp_PEquation PE (array,1.5 ); + + if (PE.IsPoint()) + {/* ... */} + gp_Lin L; + if (PE.IsLinear()) + { + L = PE.Line(); + } + if (PE.IsPlanar()) + {/* ... */} + if (PE.IsSpace()) + {/* ... */} -TColgp_Array1OfPnt array (1,5); // sizing array -array.SetValue(1,gp_Pnt(0,0,1)); -array.SetValue(2,gp_Pnt(1,2,2)); -array.SetValue(3,gp_Pnt(2,3,3)); -array.SetValue(4,gp_Pnt(4,4,4)); -array.SetValue(5,gp_Pnt(5,5,5)); - -GProp_PEquation PE (array,1.5 ); - -if (PE.IsPoint()){ /* ... */ } -gp_Lin L; -if (PE.IsLinear()) { L = PE.Line(); } -if (PE.IsPlanar()){ /* ... */ } -if (PE.IsSpace()) { /* ... */ } - -//============================================================== - TCollection_AsciiString Message (" \ + //============================================================== + TCollection_AsciiString Message (" \ \n\ TColgp_Array1OfPnt array (1,5); // sizing array \n\ array.SetValue(1,gp_Pnt(0,0,1)); \n\ @@ -2491,35 +2533,49 @@ if (PE.IsLinear()) { L = PE.Line(); } \n\ if (PE.IsPlanar()){ /* ... */ } \n\ if (PE.IsSpace()) { /* ... */ } \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- - TCollection_AsciiString aString; - for(Standard_Integer i = array.Lower();i<=array.Upper();i++){ - TCollection_AsciiString Message2 (i); - gp_Pnt P = array(i); - - aString = "P"; - aString += Message2; - DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); - } + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- + TCollection_AsciiString aString; + for(Standard_Integer i = array.Lower();i<=array.Upper();i++) + { + TCollection_AsciiString Message2 (i); + gp_Pnt P = array(i); - Message += " PE.IsPoint() = "; if (PE.IsPoint()) Message += "True \n"; else Message += "False\n"; + aString = "P"; + aString += Message2; + DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); + } - if (PE.IsLinear()) { - Message += " PE.IsLinear() = True \n"; - L = PE.Line(); - Handle(Geom_Line) aLine = new Geom_Line(L); - Handle(Geom_TrimmedCurve) aTrimmedCurve = new Geom_TrimmedCurve(aLine,-10,10); - Handle(ISession_Curve) aCurve = new ISession_Curve(aTrimmedCurve); - aDoc->GetAISContext()->Display(aCurve, Standard_False); - } - else + Message += " PE.IsPoint() = "; + if (PE.IsPoint()) + Message += "True \n"; + else + Message += "False\n"; + + if (PE.IsLinear()) { + Message += " PE.IsLinear() = True \n"; + L = PE.Line(); + Handle(Geom_Line) aLine = new Geom_Line(L); + Handle(Geom_TrimmedCurve) aTrimmedCurve = new Geom_TrimmedCurve(aLine,-10,10); + Handle(ISession_Curve) aCurve = new ISession_Curve(aTrimmedCurve); + aDoc->GetAISContext()->Display(aCurve, Standard_False); + } + else Message += "PE.IsLinear() = False \n"; - Message += " PE.IsPlanar() = "; if (PE.IsPlanar()) Message += "True \n"; else Message += "False\n"; - Message += " PE.IsSpace() = "; if (PE.IsSpace() ) Message += "True \n"; else Message += "False\n"; + Message += " PE.IsPlanar() = "; + if (PE.IsPlanar()) + Message += "True \n"; + else + Message += "False\n"; - PostProcess(aDoc,ID_BUTTON_Test_34,TheDisplayType,Message.ToCString()); + Message += " PE.IsSpace() = "; + if (PE.IsSpace()) + Message += "True \n"; + else + Message += "False\n"; + + PostProcess(aDoc,ID_BUTTON_Test_34,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest35 @@ -2528,43 +2584,44 @@ if (PE.IsSpace()) { /* ... */ } \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest35(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -gp_Pnt P1(-5,-5,0); -gp_Pnt P2(9,9,9); -Handle(Geom_Curve) aCurve = GC_MakeSegment(P1,P2).Value(); -gp_Pnt P3(3,0,0); -gp_Pnt P4(3,0,10); -Standard_Real radius1 = 3; -Standard_Real radius2 = 2; -Handle(Geom_Surface) aSurface = - GC_MakeConicalSurface(P3,P4,radius1,radius2).Value(); -GeomAPI_IntCS CS (aCurve,aSurface); -Handle(Geom_Curve) segment; - -Standard_Integer NbSeg; -Standard_Integer NbPoints; -if(CS.IsDone()) - { - NbSeg = CS.NbSegments(); - for (Standard_Integer k=1; k<=NbSeg; k++) - { - segment = CS.Segment(k); - // do something with the segment - } - - NbPoints = CS.NbPoints(); - for (int k=1; k<=NbPoints; k++) - { - gp_Pnt aPoint=CS.Point(k); - // do something with the point - } - } - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== + + gp_Pnt P1(-5,-5,0); + gp_Pnt P2(9,9,9); + Handle(Geom_Curve) aCurve = GC_MakeSegment(P1,P2).Value(); + gp_Pnt P3(3,0,0); + gp_Pnt P4(3,0,10); + Standard_Real radius1 = 3; + Standard_Real radius2 = 2; + Handle(Geom_Surface) aSurface = + GC_MakeConicalSurface(P3,P4,radius1,radius2).Value(); + GeomAPI_IntCS CS (aCurve,aSurface); + Handle(Geom_Curve) segment; + + Standard_Integer NbSeg; + Standard_Integer NbPoints; + if(CS.IsDone()) + { + NbSeg = CS.NbSegments(); + for (Standard_Integer k=1; k<=NbSeg; k++) + { + segment = CS.Segment(k); + // do something with the segment + } + + NbPoints = CS.NbPoints(); + for (int k=1; k<=NbPoints; k++) + { + gp_Pnt aPoint=CS.Point(k); + // do something with the point + } + } + + //============================================================== + TCollection_AsciiString Message (" \ \n\ gp_Pnt P1(-5,-5,0); \n\ gp_Pnt P2(9,9,9); \n\ @@ -2597,46 +2654,47 @@ if(CS.IsDone()) \n\ } \n\ } \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + + //-------------------------------------------------------------- - Handle(ISession_Curve) aCurve2 = new ISession_Curve(aCurve); - aDoc->GetAISContext()->Display(aCurve2, Standard_False); + Handle(ISession_Curve) aCurve2 = new ISession_Curve(aCurve); + aDoc->GetAISContext()->Display(aCurve2, Standard_False); - Handle(Geom_RectangularTrimmedSurface) aTrimmedSurface= new Geom_RectangularTrimmedSurface(aSurface,-50.,50.,false); + Handle(Geom_RectangularTrimmedSurface) aTrimmedSurface= new Geom_RectangularTrimmedSurface(aSurface,-50.,50.,false); - DisplaySurface(aDoc,aTrimmedSurface); + DisplaySurface(aDoc,aTrimmedSurface); - TCollection_AsciiString aString; - Standard_Integer k; - if(CS.IsDone()) - { - Standard_Integer NbSeg = CS.NbSegments(); - for (k=1; k<=NbSeg; k++) - { - TCollection_AsciiString Message2 (k); - segment = CS.Segment(k); - aString = "S_";aString += Message2; - Handle(ISession_Curve) aCurve = new ISession_Curve(segment); - aDoc->GetAISContext()->Display(aCurve, Standard_False); - } - - for ( k=1; k<=NbPoints; k++) - { - TCollection_AsciiString Message2 (k); - gp_Pnt aPoint=CS.Point(k); - aString = "P_";aString += Message2; - DisplayPoint(aDoc,aPoint,aString.ToCString(),false,0.5); - // do something with the point - } - } - TCollection_AsciiString Message2 (NbSeg); - TCollection_AsciiString Message3 (NbPoints); + TCollection_AsciiString aString; + Standard_Integer k; + if(CS.IsDone()) + { + Standard_Integer NbSeg = CS.NbSegments(); + for (k=1; k<=NbSeg; k++) + { + TCollection_AsciiString Message2 (k); + segment = CS.Segment(k); + aString = "S_";aString += Message2; + Handle(ISession_Curve) aCurve = new ISession_Curve(segment); + aDoc->GetAISContext()->Display(aCurve, Standard_False); + } - Message += "NbSeg = "; Message += Message2 ; Message += "\n"; - Message += "NbPoints = "; Message += Message3 ; Message += "\n"; + for ( k=1; k<=NbPoints; k++) + { + TCollection_AsciiString Message2 (k); + gp_Pnt aPoint=CS.Point(k); + aString = "P_";aString += Message2; + DisplayPoint(aDoc,aPoint,aString.ToCString(),false,0.5); + // do something with the point + } + } + TCollection_AsciiString Message2 (NbSeg); + TCollection_AsciiString Message3 (NbPoints); - PostProcess(aDoc,ID_BUTTON_Test_35,TheDisplayType,Message.ToCString()); + Message += "NbSeg = "; Message += Message2 ; Message += "\n"; + Message += "NbPoints = "; Message += Message3 ; Message += "\n"; + + PostProcess(aDoc,ID_BUTTON_Test_35,TheDisplayType,Message.ToCString()); } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -2647,38 +2705,38 @@ if(CS.IsDone()) \n\ // Argument : CGeometryDoc* aDoc void GeomSources::gpTest36(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); //============================================================== - -gp_Pnt centre (5,5,0); gp_Pnt axispoint (9,9,0); -Standard_Real radius = 3; -Handle(Geom_Circle) circle = - GC_MakeCircle(centre,axispoint,radius); - -Handle(Geom_Geometry) aRotatedEntity = circle->Rotated(gp::OZ(),M_PI/4); -Standard_CString aRotatedEntityTypeName = aRotatedEntity->DynamicType()->Name(); - -Handle(Geom_Geometry) aMirroredEntity = aRotatedEntity->Mirrored(gp::ZOX()); -Standard_CString aMirroredEntityTypeName = aMirroredEntity->DynamicType()->Name(); - -gp_Pnt scalepoint (4,8,0); -Standard_Real scalefactor = 0.2; -Handle(Geom_Geometry) aScaledEntity = - aMirroredEntity->Scaled(scalepoint, scalefactor); -Standard_CString aScaledEntityTypeName = aScaledEntity->DynamicType()->Name(); - -Handle (Geom_Transformation) GT = GC_MakeTranslation (centre, scalepoint); -gp_Trsf TR = GT->Trsf(); - -gp_Vec aTranslationVector(TR.TranslationPart ()); -Handle(Geom_Geometry) aTranslatedEntity = - aScaledEntity->Translated( aTranslationVector ); -Standard_CString aTranslatedEntityTypeName = aTranslatedEntity->DynamicType()->Name(); - -gp_Mat matrix = TR.HVectorialPart(); -Standard_Real value = matrix.Determinant(); - + + gp_Pnt centre (5,5,0); gp_Pnt axispoint (9,9,0); + Standard_Real radius = 3; + Handle(Geom_Circle) circle = + GC_MakeCircle(centre,axispoint,radius); + + Handle(Geom_Geometry) aRotatedEntity = circle->Rotated(gp::OZ(),M_PI/4); + Standard_CString aRotatedEntityTypeName = aRotatedEntity->DynamicType()->Name(); + + Handle(Geom_Geometry) aMirroredEntity = aRotatedEntity->Mirrored(gp::ZOX()); + Standard_CString aMirroredEntityTypeName = aMirroredEntity->DynamicType()->Name(); + + gp_Pnt scalepoint (4,8,0); + Standard_Real scalefactor = 0.2; + Handle(Geom_Geometry) aScaledEntity = + aMirroredEntity->Scaled(scalepoint, scalefactor); + Standard_CString aScaledEntityTypeName = aScaledEntity->DynamicType()->Name(); + + Handle (Geom_Transformation) GT = GC_MakeTranslation (centre, scalepoint); + gp_Trsf TR = GT->Trsf(); + + gp_Vec aTranslationVector(TR.TranslationPart ()); + Handle(Geom_Geometry) aTranslatedEntity = + aScaledEntity->Translated( aTranslationVector ); + Standard_CString aTranslatedEntityTypeName = aTranslatedEntity->DynamicType()->Name(); + + gp_Mat matrix = TR.HVectorialPart(); + Standard_Real value = matrix.Determinant(); + //============================================================== TCollection_AsciiString Message (" \ \n\ @@ -2711,50 +2769,48 @@ Standard_CString aTranslatedEntityTypeName = aTranslatedEntity->DynamicType()->N gp_Mat matrix = TR.HVectorialPart(); \n\ Standard_Real value = matrix.Determinant(); \n\ \n"; - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplayPoint(aDoc,centre,"centre",false,0.5); - DisplayPoint(aDoc,axispoint,"axispoint",false,0.5); - DisplayPoint(aDoc,scalepoint,"scalepoint",false,0.5); + DisplayPoint(aDoc,centre,"centre",false,0.5); + DisplayPoint(aDoc,axispoint,"axispoint",false,0.5); + DisplayPoint(aDoc,scalepoint,"scalepoint",false,0.5); - DisplayCurve(aDoc,circle, Quantity_NOC_RED,false); - DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(aRotatedEntity),Quantity_NOC_PEACHPUFF, false); - DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(aMirroredEntity), Quantity_NOC_YELLOWGREEN,false); - DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(aScaledEntity), Quantity_NOC_GREEN,false); - DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(aTranslatedEntity),Quantity_NOC_WHITE,false); + DisplayCurve(aDoc,circle, Quantity_NOC_RED,false); + DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(aRotatedEntity),Quantity_NOC_PEACHPUFF, false); + DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(aMirroredEntity), Quantity_NOC_YELLOWGREEN,false); + DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(aScaledEntity), Quantity_NOC_GREEN,false); + DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(aTranslatedEntity),Quantity_NOC_WHITE,false); - TCollection_AsciiString Message0 (M_PI); - Message += " PI = "; - Message+= Message0; - Message += "\n"; - Message += " circle is Red; aRotatedEntity is Peach; aMirroredEntity is Yellow Green\n"; - Message += " aScaleEntity is Green; aTranslatedEntity is White\n\n"; + TCollection_AsciiString Message0 (M_PI); + Message += " PI = "; + Message+= Message0; + Message += "\n"; + Message += " circle is Red; aRotatedEntity is Peach; aMirroredEntity is Yellow Green\n"; + Message += " aScaleEntity is Green; aTranslatedEntity is White\n\n"; - - TCollection_AsciiString Message2 (aTranslationVector.X()); - TCollection_AsciiString Message3 (aTranslationVector.Y()); - TCollection_AsciiString Message4 (aTranslationVector.Z()); - Message += " aTranslationVector ( "; - Message += Message2; Message += " , "; - Message += Message3; Message += " , "; - Message += Message4; Message += " ); \n"; - - TCollection_AsciiString Message5 (value); - Message += " value = ";Message+= Message5; Message += "\n"; - - TCollection_AsciiString Message6 (aRotatedEntityTypeName); - TCollection_AsciiString Message7 (aMirroredEntityTypeName); - TCollection_AsciiString Message8 (aScaledEntityTypeName); - TCollection_AsciiString Message9 (aTranslatedEntityTypeName); + TCollection_AsciiString Message2 (aTranslationVector.X()); + TCollection_AsciiString Message3 (aTranslationVector.Y()); + TCollection_AsciiString Message4 (aTranslationVector.Z()); + Message += " aTranslationVector ( "; + Message += Message2; Message += " , "; + Message += Message3; Message += " , "; + Message += Message4; Message += " ); \n"; - Message += " aRotatedEntityTypeName = ";Message+= Message6; Message += "\n"; - Message += " aMirroredEntityTypeName = ";Message+= Message7; Message += "\n"; - Message += " aScaledEntityTypeName = ";Message+= Message8; Message += "\n"; - Message += " aTranslatedEntityTypeName = ";Message+= Message9; Message += "\n"; + TCollection_AsciiString Message5 (value); + Message += " value = ";Message+= Message5; Message += "\n"; + TCollection_AsciiString Message6 (aRotatedEntityTypeName); + TCollection_AsciiString Message7 (aMirroredEntityTypeName); + TCollection_AsciiString Message8 (aScaledEntityTypeName); + TCollection_AsciiString Message9 (aTranslatedEntityTypeName); - PostProcess(aDoc,ID_BUTTON_Test_36,TheDisplayType,Message.ToCString()); + Message += " aRotatedEntityTypeName = ";Message+= Message6; Message += "\n"; + Message += " aMirroredEntityTypeName = ";Message+= Message7; Message += "\n"; + Message += " aScaledEntityTypeName = ";Message+= Message8; Message += "\n"; + Message += " aTranslatedEntityTypeName = ";Message+= Message9; Message += "\n"; + + PostProcess(aDoc,ID_BUTTON_Test_36,TheDisplayType,Message.ToCString()); } // Function name : GeomSources::gpTest37 @@ -2763,29 +2819,29 @@ Standard_Real value = matrix.Determinant(); // Argument : CGeometryDoc* aDoc void GeomSources::gpTest37(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -TColgp_Array1OfPnt anArrayofPnt (1,5); // sizing array -anArrayofPnt.SetValue(1,gp_Pnt(0,0,1)); -anArrayofPnt.SetValue(2,gp_Pnt(1,2,2)); -anArrayofPnt.SetValue(3,gp_Pnt(2,3,3)); -anArrayofPnt.SetValue(4,gp_Pnt(4,3,4)); -anArrayofPnt.SetValue(5,gp_Pnt(5,5,5)); - -Standard_Real Tolerance = 1; - -gp_Pln P; -GProp_PEquation PE (anArrayofPnt,Tolerance); -if (PE.IsPlanar()) { P = PE.Plane();} - -if (PE.IsPoint()) { /* ... */ } -if (PE.IsLinear()) { /* ... */ } -if (PE.IsPlanar()) { P = PE.Plane();} -if (PE.IsSpace()) { /* ... */ } - -//============================================================== + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + TColgp_Array1OfPnt anArrayofPnt (1,5); // sizing array + anArrayofPnt.SetValue(1,gp_Pnt(0,0,1)); + anArrayofPnt.SetValue(2,gp_Pnt(1,2,2)); + anArrayofPnt.SetValue(3,gp_Pnt(2,3,3)); + anArrayofPnt.SetValue(4,gp_Pnt(4,3,4)); + anArrayofPnt.SetValue(5,gp_Pnt(5,5,5)); + + Standard_Real Tolerance = 1; + + gp_Pln P; + GProp_PEquation PE (anArrayofPnt,Tolerance); + if (PE.IsPlanar()) { P = PE.Plane();} + + if (PE.IsPoint()) { /* ... */ } + if (PE.IsLinear()) { /* ... */ } + if (PE.IsPlanar()) { P = PE.Plane();} + if (PE.IsSpace()) { /* ... */ } + + //============================================================== TCollection_AsciiString Message (" \ \n\ TColgp_Array1OfPnt anArrayofPnt (1,5); // sizing array \n\ @@ -2806,72 +2862,72 @@ if (PE.IsLinear()) { /* ... */ } \n\ if (PE.IsPlanar()) { P = PE.Plane();} \n\ if (PE.IsSpace()) { /* ... */ } \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - TCollection_AsciiString aString; - for(Standard_Integer i = anArrayofPnt.Lower();i<=anArrayofPnt.Upper();i++){ - TCollection_AsciiString Message2(i); - gp_Pnt P = anArrayofPnt(i); - aString = "P";aString += Message2; - DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); - } + TCollection_AsciiString aString; + for(Standard_Integer i = anArrayofPnt.Lower();i<=anArrayofPnt.Upper();i++){ + TCollection_AsciiString Message2(i); + gp_Pnt P = anArrayofPnt(i); + aString = "P";aString += Message2; + DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); + } - Message += " PE.IsPoint() = "; if (PE.IsPoint()) Message += "True \n"; else Message += "False\n"; - Message += " PE.IsLinear() = "; if (PE.IsLinear()) Message += "True \n"; else Message += "False\n"; + Message += " PE.IsPoint() = "; if (PE.IsPoint()) Message += "True \n"; else Message += "False\n"; + Message += " PE.IsLinear() = "; if (PE.IsLinear()) Message += "True \n"; else Message += "False\n"; - if (PE.IsPlanar()) { - Message += " PE.IsPlanar() = True \n"; - P = PE.Plane(); - Handle(Geom_Plane) aPlane = new Geom_Plane(P); - Handle(Geom_RectangularTrimmedSurface) aSurface= new Geom_RectangularTrimmedSurface(aPlane,-4.,4.,-4.,4.); + if (PE.IsPlanar()) { + Message += " PE.IsPlanar() = True \n"; + P = PE.Plane(); + Handle(Geom_Plane) aPlane = new Geom_Plane(P); + Handle(Geom_RectangularTrimmedSurface) aSurface= new Geom_RectangularTrimmedSurface(aPlane,-4.,4.,-4.,4.); - DisplaySurface(aDoc,aSurface); + DisplaySurface(aDoc,aSurface); - } - else + } + else Message += " PE.IsPlanar() = False \n"; - Message += " PE.IsSpace() = "; if (PE.IsSpace() ) Message += "True \n"; else Message += "False\n"; + Message += " PE.IsSpace() = "; if (PE.IsSpace() ) Message += "True \n"; else Message += "False\n"; - PostProcess(aDoc,ID_BUTTON_Test_37,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_37,TheDisplayType,Message.ToCString()); } void GeomSources::gpTest38(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -TColgp_Array1OfPnt array1 (1,5); // sizing array -array1.SetValue(1,gp_Pnt (-4,0,2 )); array1.SetValue(2,gp_Pnt (-7,2,2 )); -array1.SetValue(3,gp_Pnt (-6,3,1 )); array1.SetValue(4,gp_Pnt (-4,3,-1)); -array1.SetValue(5,gp_Pnt (-3,5,-2)); -Handle(Geom_BSplineCurve) SPL1 = GeomAPI_PointsToBSpline(array1).Curve(); - -TColgp_Array1OfPnt array2 (1,5); // sizing array -array2.SetValue(1,gp_Pnt (-4,0, 2)); array2.SetValue(2,gp_Pnt (-2,2,0 )); -array2.SetValue(3,gp_Pnt (2 ,3,-1)); array2.SetValue(4,gp_Pnt (3 ,7,-2)); -array2.SetValue(5,gp_Pnt (4 ,9,-1)); -Handle(Geom_BSplineCurve) SPL2 = GeomAPI_PointsToBSpline(array2).Curve(); - -GeomFill_FillingStyle Type = GeomFill_StretchStyle; -GeomFill_BSplineCurves aGeomFill1(SPL1,SPL2,Type); -Handle(Geom_BSplineSurface) aBSplineSurface1 = aGeomFill1.Surface(); - -Type = GeomFill_CoonsStyle; -GeomFill_BSplineCurves aGeomFill2( - Handle(Geom_BSplineCurve)::DownCast(SPL1->Translated(gp_Vec(10,0,0))), - Handle(Geom_BSplineCurve)::DownCast(SPL2->Translated(gp_Vec(10,0,0))),Type); -Handle(Geom_BSplineSurface) aBSplineSurface2 = aGeomFill2.Surface(); -Type = GeomFill_CurvedStyle; -GeomFill_BSplineCurves aGeomFill3( - Handle(Geom_BSplineCurve)::DownCast(SPL1->Translated(gp_Vec(20,0,0))), - Handle(Geom_BSplineCurve)::DownCast(SPL2->Translated(gp_Vec(20,0,0))),Type); -Handle(Geom_BSplineSurface) aBSplineSurface3 = aGeomFill3.Surface(); - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + TColgp_Array1OfPnt array1 (1,5); // sizing array + array1.SetValue(1,gp_Pnt (-4,0,2 )); array1.SetValue(2,gp_Pnt (-7,2,2 )); + array1.SetValue(3,gp_Pnt (-6,3,1 )); array1.SetValue(4,gp_Pnt (-4,3,-1)); + array1.SetValue(5,gp_Pnt (-3,5,-2)); + Handle(Geom_BSplineCurve) SPL1 = GeomAPI_PointsToBSpline(array1).Curve(); + + TColgp_Array1OfPnt array2 (1,5); // sizing array + array2.SetValue(1,gp_Pnt (-4,0, 2)); array2.SetValue(2,gp_Pnt (-2,2,0 )); + array2.SetValue(3,gp_Pnt (2 ,3,-1)); array2.SetValue(4,gp_Pnt (3 ,7,-2)); + array2.SetValue(5,gp_Pnt (4 ,9,-1)); + Handle(Geom_BSplineCurve) SPL2 = GeomAPI_PointsToBSpline(array2).Curve(); + + GeomFill_FillingStyle Type = GeomFill_StretchStyle; + GeomFill_BSplineCurves aGeomFill1(SPL1,SPL2,Type); + Handle(Geom_BSplineSurface) aBSplineSurface1 = aGeomFill1.Surface(); + + Type = GeomFill_CoonsStyle; + GeomFill_BSplineCurves aGeomFill2( + Handle(Geom_BSplineCurve)::DownCast(SPL1->Translated(gp_Vec(10,0,0))), + Handle(Geom_BSplineCurve)::DownCast(SPL2->Translated(gp_Vec(10,0,0))),Type); + Handle(Geom_BSplineSurface) aBSplineSurface2 = aGeomFill2.Surface(); + Type = GeomFill_CurvedStyle; + GeomFill_BSplineCurves aGeomFill3( + Handle(Geom_BSplineCurve)::DownCast(SPL1->Translated(gp_Vec(20,0,0))), + Handle(Geom_BSplineCurve)::DownCast(SPL2->Translated(gp_Vec(20,0,0))),Type); + Handle(Geom_BSplineSurface) aBSplineSurface3 = aGeomFill3.Surface(); + + //============================================================== + TCollection_AsciiString Message (" \ \n\ TColgp_Array1OfPnt array1 (1,5); // sizing array \n\ array1.SetValue(1,gp_Pnt (-4,0,2 )); array1.SetValue(2,gp_Pnt (-7,2,2 )); \n\ @@ -2901,79 +2957,79 @@ GeomFill_BSplineCurves aGeomFill3( Handle(Geom_BSplineCurve)::DownCast(SPL2->Translated(gp_Vec(20,0,0))),Type); \n\ Handle(Geom_BSplineSurface) aBSplineSurface3 = aGeomFill3.Surface(); \n\ \n"; - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - // Trace des frontieres. -> FreeBoundaryAspect - // Trace des isoparametriques. --> UIsoAspect() - - DisplaySurface(aDoc,aBSplineSurface1,Quantity_NOC_YELLOW); - DisplaySurface(aDoc,aBSplineSurface2,Quantity_NOC_SALMON); - DisplaySurface(aDoc,aBSplineSurface3,Quantity_NOC_HOTPINK); + // Trace des frontieres. -> FreeBoundaryAspect + // Trace des isoparametriques. --> UIsoAspect() - for (int i=0;i<=2;i++) - { - DisplayCurve(aDoc,Handle(Geom_BSplineCurve)::DownCast(SPL1->Translated(gp_Vec(i*10,0,0))), Quantity_NOC_RED,false); - DisplayCurve(aDoc,Handle(Geom_BSplineCurve)::DownCast(SPL2->Translated(gp_Vec(i*10,0,0))), Quantity_NOC_GREEN,false); - } + DisplaySurface(aDoc,aBSplineSurface1,Quantity_NOC_YELLOW); + DisplaySurface(aDoc,aBSplineSurface2,Quantity_NOC_SALMON); + DisplaySurface(aDoc,aBSplineSurface3,Quantity_NOC_HOTPINK); - Message += "SPL1 is Red; \n"; - Message += "SPL2 is Green; \n"; - Message += "aBSplineSurface1 is Yellow; ( GeomFill_StretchStyle )\n"; - Message += "aBSplineSurface2 is Salmon; ( GeomFill_CoonsStyle ) \n"; - Message += "aBSplineSurface3 is Hot pink; ( GeomFill_CurvedStyle ) \n"; + for (int i=0;i<=2;i++) + { + DisplayCurve(aDoc,Handle(Geom_BSplineCurve)::DownCast(SPL1->Translated(gp_Vec(i*10,0,0))), Quantity_NOC_RED,false); + DisplayCurve(aDoc,Handle(Geom_BSplineCurve)::DownCast(SPL2->Translated(gp_Vec(i*10,0,0))), Quantity_NOC_GREEN,false); + } - PostProcess(aDoc,ID_BUTTON_Test_38,TheDisplayType,Message.ToCString()); + Message += "SPL1 is Red; \n"; + Message += "SPL2 is Green; \n"; + Message += "aBSplineSurface1 is Yellow; ( GeomFill_StretchStyle )\n"; + Message += "aBSplineSurface2 is Salmon; ( GeomFill_CoonsStyle ) \n"; + Message += "aBSplineSurface3 is Hot pink; ( GeomFill_CurvedStyle ) \n"; + + PostProcess(aDoc,ID_BUTTON_Test_38,TheDisplayType,Message.ToCString()); } void GeomSources::gpTest39(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -TColgp_Array1OfPnt array1 (1,5); // sizing array -array1.SetValue(1,gp_Pnt (-4,0,2 )); -array1.SetValue(2,gp_Pnt (-5,1,0 )); -array1.SetValue(3,gp_Pnt (-6,2,-2 )); -array1.SetValue(4,gp_Pnt (-5,4,-7)); -array1.SetValue(5,gp_Pnt (-3,5,-12)); - -TColgp_Array1OfPnt array2 (1,5); // sizing array -array2.SetValue(1,gp_Pnt (-4,0, 2)); -array2.SetValue(2,gp_Pnt (-3,2,1 )); -array2.SetValue(3,gp_Pnt (-1,5,0)); -array2.SetValue(4,gp_Pnt (2 ,7,-1)); -array2.SetValue(5,gp_Pnt (4 ,9,-1)); - -TColgp_Array1OfPnt array3 (1,4); // sizing array -array3.SetValue(1,gp_Pnt (-3,5, -12)); -array3.SetValue(2,gp_Pnt (-2,6,-7 )); -array3.SetValue(3,gp_Pnt (0 ,8,-3)); -array3.SetValue(4,gp_Pnt (4 ,9,-1)); - -Handle(Geom_BSplineCurve) SPL1 = GeomAPI_PointsToBSpline(array1).Curve(); -Handle(Geom_BSplineCurve) SPL2 = GeomAPI_PointsToBSpline(array2).Curve(); -Handle(Geom_BSplineCurve) SPL3 = GeomAPI_PointsToBSpline(array3).Curve(); - -Handle(GeomAdaptor_HCurve) SPL1Adaptor = new GeomAdaptor_HCurve(SPL1); -Handle(GeomFill_SimpleBound) B1 = - new GeomFill_SimpleBound(SPL1Adaptor,Precision::Approximation(),Precision::Angular()); -Handle(GeomAdaptor_HCurve) SPL2Adaptor = new GeomAdaptor_HCurve(SPL2); -Handle(GeomFill_SimpleBound) B2 = - new GeomFill_SimpleBound(SPL2Adaptor,Precision::Approximation(),Precision::Angular()); -Handle(GeomAdaptor_HCurve) SPL3Adaptor = new GeomAdaptor_HCurve(SPL3); -Handle(GeomFill_SimpleBound) B3 = - new GeomFill_SimpleBound(SPL3Adaptor,Precision::Approximation(),Precision::Angular()); -Standard_Boolean NoCheck= Standard_False; - -Standard_Integer MaxDeg = 8; -Standard_Integer MaxSeg = 2; -GeomFill_ConstrainedFilling aConstrainedFilling(MaxDeg, MaxSeg); - -aConstrainedFilling.Init(B1,B2,B3,NoCheck); - -Handle(Geom_BSplineSurface) aBSplineSurface = aConstrainedFilling.Surface(); - + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + TColgp_Array1OfPnt array1 (1,5); // sizing array + array1.SetValue(1,gp_Pnt (-4,0,2 )); + array1.SetValue(2,gp_Pnt (-5,1,0 )); + array1.SetValue(3,gp_Pnt (-6,2,-2 )); + array1.SetValue(4,gp_Pnt (-5,4,-7)); + array1.SetValue(5,gp_Pnt (-3,5,-12)); + + TColgp_Array1OfPnt array2 (1,5); // sizing array + array2.SetValue(1,gp_Pnt (-4,0, 2)); + array2.SetValue(2,gp_Pnt (-3,2,1 )); + array2.SetValue(3,gp_Pnt (-1,5,0)); + array2.SetValue(4,gp_Pnt (2 ,7,-1)); + array2.SetValue(5,gp_Pnt (4 ,9,-1)); + + TColgp_Array1OfPnt array3 (1,4); // sizing array + array3.SetValue(1,gp_Pnt (-3,5, -12)); + array3.SetValue(2,gp_Pnt (-2,6,-7 )); + array3.SetValue(3,gp_Pnt (0 ,8,-3)); + array3.SetValue(4,gp_Pnt (4 ,9,-1)); + + Handle(Geom_BSplineCurve) SPL1 = GeomAPI_PointsToBSpline(array1).Curve(); + Handle(Geom_BSplineCurve) SPL2 = GeomAPI_PointsToBSpline(array2).Curve(); + Handle(Geom_BSplineCurve) SPL3 = GeomAPI_PointsToBSpline(array3).Curve(); + + Handle(GeomAdaptor_HCurve) SPL1Adaptor = new GeomAdaptor_HCurve(SPL1); + Handle(GeomFill_SimpleBound) B1 = + new GeomFill_SimpleBound(SPL1Adaptor,Precision::Approximation(),Precision::Angular()); + Handle(GeomAdaptor_HCurve) SPL2Adaptor = new GeomAdaptor_HCurve(SPL2); + Handle(GeomFill_SimpleBound) B2 = + new GeomFill_SimpleBound(SPL2Adaptor,Precision::Approximation(),Precision::Angular()); + Handle(GeomAdaptor_HCurve) SPL3Adaptor = new GeomAdaptor_HCurve(SPL3); + Handle(GeomFill_SimpleBound) B3 = + new GeomFill_SimpleBound(SPL3Adaptor,Precision::Approximation(),Precision::Angular()); + Standard_Boolean NoCheck= Standard_False; + + Standard_Integer MaxDeg = 8; + Standard_Integer MaxSeg = 2; + GeomFill_ConstrainedFilling aConstrainedFilling(MaxDeg, MaxSeg); + + aConstrainedFilling.Init(B1,B2,B3,NoCheck); + + Handle(Geom_BSplineSurface) aBSplineSurface = aConstrainedFilling.Surface(); + //============================================================== TCollection_AsciiString Message (" \ \n\ @@ -3003,74 +3059,72 @@ aConstrainedFilling.Init(B1,B2,B3,NoCheck); \n\ Handle(Geom_BSplineSurface) aBSplineSurface = aConstrainedFilling.Surface(); \n\ \n"; - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - TCollection_AsciiString aString; + TCollection_AsciiString aString; - DisplaySurface(aDoc,aBSplineSurface,Quantity_NOC_YELLOW); + DisplaySurface(aDoc,aBSplineSurface,Quantity_NOC_YELLOW); + DisplayCurve(aDoc,SPL1,Quantity_NOC_RED ,false); + DisplayCurve(aDoc,SPL2,Quantity_NOC_GREEN ,false); + DisplayCurve(aDoc,SPL3,Quantity_NOC_BLUE1 ,false); - DisplayCurve(aDoc,SPL1,Quantity_NOC_RED ,false); - DisplayCurve(aDoc,SPL2,Quantity_NOC_GREEN ,false); - DisplayCurve(aDoc,SPL3,Quantity_NOC_BLUE1 ,false); + Message += "SPL1 is Red; \n"; + Message += "SPL2 is Green; \n"; + Message += "SPL3 is Blue; \n"; - Message += "SPL1 is Red; \n"; - Message += "SPL2 is Green; \n"; - Message += "SPL3 is Blue; \n"; + Message += "aBSplineSurface is Yellow; \n"; - Message += "aBSplineSurface is Yellow; \n"; - - - PostProcess(aDoc,ID_BUTTON_Test_39,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_39,TheDisplayType,Message.ToCString()); } void GeomSources::gpTest40(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -TColgp_Array1OfPnt array1 (1,5); // sizing array -array1.SetValue(1,gp_Pnt (-4,0,2 )); -array1.SetValue(2,gp_Pnt (-5,1,0 )); -array1.SetValue(3,gp_Pnt (-6,2,-2 )); -array1.SetValue(4,gp_Pnt (-5,4,-7)); -array1.SetValue(5,gp_Pnt (-3,5,-12)); - -Handle(Geom_BSplineCurve) SPL1 = - GeomAPI_PointsToBSpline(array1).Curve(); - -GeomFill_Pipe aPipe(SPL1,1); -aPipe.Perform(); -Handle(Geom_Surface) aSurface= aPipe.Surface(); -Standard_CString aSurfaceEntityTypeName="Not Computed"; -if (!aSurface.IsNull()) - aSurfaceEntityTypeName = aSurface->DynamicType()->Name(); - -Handle(Geom_Ellipse) E = GC_MakeEllipse( gp::XOY() ,3,1).Value(); -GeomFill_Pipe aPipe2(SPL1,E); -aPipe2.Perform(); -Handle(Geom_Surface) aSurface2= aPipe2.Surface(); -Standard_CString aSurfaceEntityTypeName2="Not Computed"; -if (!aSurface2.IsNull()) { - aSurfaceEntityTypeName2 = aSurface2->DynamicType()->Name(); - aSurface2->Translate(gp_Vec(5,0,0)); } - -Handle(Geom_TrimmedCurve) TC1 = - GC_MakeSegment(gp_Pnt(1,1,1),gp_Pnt(5,5,5)); -Handle(Geom_TrimmedCurve) TC2 = - GC_MakeSegment(gp_Pnt(1,1,0),gp_Pnt(4,5,6)); -GeomFill_Pipe aPipe3(SPL1,TC1,TC2); -aPipe3.Perform(); -Handle(Geom_Surface) aSurface3 = aPipe3.Surface(); -Standard_CString aSurfaceEntityTypeName3="Not Computed"; -if (!aSurface3.IsNull()) - { - aSurfaceEntityTypeName3 = aSurface3->DynamicType()->Name(); - aSurface3->Translate(gp_Vec(10,0,0)); - } - -//============================================================== + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + TColgp_Array1OfPnt array1 (1,5); // sizing array + array1.SetValue(1,gp_Pnt (-4,0,2 )); + array1.SetValue(2,gp_Pnt (-5,1,0 )); + array1.SetValue(3,gp_Pnt (-6,2,-2 )); + array1.SetValue(4,gp_Pnt (-5,4,-7)); + array1.SetValue(5,gp_Pnt (-3,5,-12)); + + Handle(Geom_BSplineCurve) SPL1 = + GeomAPI_PointsToBSpline(array1).Curve(); + + GeomFill_Pipe aPipe(SPL1,1); + aPipe.Perform(); + Handle(Geom_Surface) aSurface= aPipe.Surface(); + Standard_CString aSurfaceEntityTypeName="Not Computed"; + if (!aSurface.IsNull()) + aSurfaceEntityTypeName = aSurface->DynamicType()->Name(); + + Handle(Geom_Ellipse) E = GC_MakeEllipse( gp::XOY() ,3,1).Value(); + GeomFill_Pipe aPipe2(SPL1,E); + aPipe2.Perform(); + Handle(Geom_Surface) aSurface2= aPipe2.Surface(); + Standard_CString aSurfaceEntityTypeName2="Not Computed"; + if (!aSurface2.IsNull()) { + aSurfaceEntityTypeName2 = aSurface2->DynamicType()->Name(); + aSurface2->Translate(gp_Vec(5,0,0)); } + + Handle(Geom_TrimmedCurve) TC1 = + GC_MakeSegment(gp_Pnt(1,1,1),gp_Pnt(5,5,5)); + Handle(Geom_TrimmedCurve) TC2 = + GC_MakeSegment(gp_Pnt(1,1,0),gp_Pnt(4,5,6)); + GeomFill_Pipe aPipe3(SPL1,TC1,TC2); + aPipe3.Perform(); + Handle(Geom_Surface) aSurface3 = aPipe3.Surface(); + Standard_CString aSurfaceEntityTypeName3="Not Computed"; + if (!aSurface3.IsNull()) + { + aSurfaceEntityTypeName3 = aSurface3->DynamicType()->Name(); + aSurface3->Translate(gp_Vec(10,0,0)); + } + + //============================================================== TCollection_AsciiString Message (" \ \n\ \n\ @@ -3115,67 +3169,66 @@ if (!aSurface3.IsNull()) \n\ aSurface3->Translate(gp_Vec(10,0,0)); \n\ } \n\ \n"; - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- + + if (!aSurface.IsNull()) + { + DisplaySurface(aDoc,aSurface,Quantity_NOC_YELLOW); + } + if (!aSurface2.IsNull()) + { + DisplaySurface(aDoc,aSurface2,Quantity_NOC_YELLOW); + } + if (!aSurface3.IsNull()) + { + DisplaySurface(aDoc,aSurface3,Quantity_NOC_YELLOW); + } + + DisplayCurve(aDoc,SPL1,Quantity_NOC_RED ,false); + + Message += "SPL1 is Red; \n"; - if (!aSurface.IsNull()) - { - DisplaySurface(aDoc,aSurface,Quantity_NOC_YELLOW); - } - if (!aSurface2.IsNull()) - { - DisplaySurface(aDoc,aSurface2,Quantity_NOC_YELLOW); - } - if (!aSurface3.IsNull()) - { - DisplaySurface(aDoc,aSurface3,Quantity_NOC_YELLOW); - } + TCollection_AsciiString Message2(aSurfaceEntityTypeName); + TCollection_AsciiString Message3(aSurfaceEntityTypeName2); + TCollection_AsciiString Message4(aSurfaceEntityTypeName3); - DisplayCurve(aDoc,SPL1,Quantity_NOC_RED ,false); + Message += " aSurfaceEntityTypeName = ";Message+= Message2; Message += "\n"; + Message += " aSurfaceEntityTypeName2 = ";Message+= Message3; Message += "\n"; + Message += " aSurfaceEntityTypeName3 = ";Message+= Message4; Message += "\n"; - Message += "SPL1 is Red; \n"; - - - TCollection_AsciiString Message2(aSurfaceEntityTypeName); - TCollection_AsciiString Message3(aSurfaceEntityTypeName2); - TCollection_AsciiString Message4(aSurfaceEntityTypeName3); - - Message += " aSurfaceEntityTypeName = ";Message+= Message2; Message += "\n"; - Message += " aSurfaceEntityTypeName2 = ";Message+= Message3; Message += "\n"; - Message += " aSurfaceEntityTypeName3 = ";Message+= Message4; Message += "\n"; - - PostProcess(aDoc,ID_BUTTON_Test_40,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_40,TheDisplayType,Message.ToCString()); } void GeomSources::gpTest41(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -TColgp_Array1OfPnt array1 (1,5); -array1.SetValue(1,gp_Pnt (-4,0,2 )); -array1.SetValue(2,gp_Pnt (-5,1,0 )); -array1.SetValue(3,gp_Pnt (-6,2,-2 )); -array1.SetValue(4,gp_Pnt (-5,4,-7)); -array1.SetValue(5,gp_Pnt (-3,5,-12)); - -Handle(Geom_BSplineCurve) SPL1 = - GeomAPI_PointsToBSpline(array1).Curve(); -Handle(Geom_Curve) FirstSect = - GC_MakeSegment(gp_Pnt(-4,0,2),gp_Pnt(-4,0,10)).Value(); - -GeomFill_Pipe aPipe(SPL1,FirstSect); -aPipe.Perform(); - -Handle(Geom_BSplineSurface) aPipeSurface = - Handle(Geom_BSplineSurface)::DownCast(aPipe.Surface()); -Handle(Geom_BSplineSurface) anotherBSplineSurface = - GeomConvert::SplitBSplineSurface(aPipeSurface,1,2,3,6); - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + TColgp_Array1OfPnt array1 (1,5); + array1.SetValue(1,gp_Pnt (-4,0,2 )); + array1.SetValue(2,gp_Pnt (-5,1,0 )); + array1.SetValue(3,gp_Pnt (-6,2,-2 )); + array1.SetValue(4,gp_Pnt (-5,4,-7)); + array1.SetValue(5,gp_Pnt (-3,5,-12)); + + Handle(Geom_BSplineCurve) SPL1 = + GeomAPI_PointsToBSpline(array1).Curve(); + Handle(Geom_Curve) FirstSect = + GC_MakeSegment(gp_Pnt(-4,0,2),gp_Pnt(-4,0,10)).Value(); + + GeomFill_Pipe aPipe(SPL1,FirstSect); + aPipe.Perform(); + + Handle(Geom_BSplineSurface) aPipeSurface = + Handle(Geom_BSplineSurface)::DownCast(aPipe.Surface()); + Handle(Geom_BSplineSurface) anotherBSplineSurface = + GeomConvert::SplitBSplineSurface(aPipeSurface,1,2,3,6); + + //============================================================== + TCollection_AsciiString Message (" \ \n\ TColgp_Array1OfPnt array1 (1,5); \n\ array1.SetValue(1,gp_Pnt (-4,0,2 )); \n\ @@ -3197,117 +3250,117 @@ Handle(Geom_BSplineSurface) aPipeSurface = \n\ Handle(Geom_BSplineSurface) anotherBSplineSurface = \n\ GeomConvert::SplitBSplineSurface(aPipeSurface,1,2,3,6); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - - if (!aPipeSurface.IsNull()) - { - DisplaySurface(aDoc,aPipeSurface,Quantity_NOC_YELLOW); - } + if(!aPipeSurface.IsNull()) + { + DisplaySurface(aDoc,aPipeSurface,Quantity_NOC_YELLOW); + } - if (!anotherBSplineSurface.IsNull()) - { - DisplaySurface(aDoc,anotherBSplineSurface,Quantity_NOC_HOTPINK); - } + if(!anotherBSplineSurface.IsNull()) + { + DisplaySurface(aDoc,anotherBSplineSurface,Quantity_NOC_HOTPINK); + } - DisplayCurve(aDoc,SPL1,Quantity_NOC_RED ,false); - DisplayCurve(aDoc,FirstSect,Quantity_NOC_GREEN ,false); + DisplayCurve(aDoc,SPL1,Quantity_NOC_RED ,false); + DisplayCurve(aDoc,FirstSect,Quantity_NOC_GREEN ,false); - Message += "SPL1 is Red; \n"; - Message += "SPL2 is Green; \n"; - Message += "SPL3 is Blue; \n"; - Message += "aBSplineSurface is Yellow; \n"; - Message += "anotherBSplineSurface is Hot Pink; \n"; + Message += "SPL1 is Red; \n"; + Message += "SPL2 is Green; \n"; + Message += "SPL3 is Blue; \n"; + Message += "aBSplineSurface is Yellow; \n"; + Message += "anotherBSplineSurface is Hot Pink; \n"; - PostProcess(aDoc,ID_BUTTON_Test_41,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_41,TheDisplayType,Message.ToCString()); } void GeomSources::gpTest42(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -TColgp_Array2OfPnt array1(1,3,1,3); -TColgp_Array2OfPnt array2(1,3,1,3); -TColgp_Array2OfPnt array3(1,3,1,3); -TColgp_Array2OfPnt array4(1,3,1,3); + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); -array1.SetValue(1,1,gp_Pnt(1,1,1)); -array1.SetValue(1,2,gp_Pnt(2,1,2)); -array1.SetValue(1,3,gp_Pnt(3,1,1)); -array1.SetValue(2,1,gp_Pnt(1,2,1)); -array1.SetValue(2,2,gp_Pnt(2,2,2)); -array1.SetValue(2,3,gp_Pnt(3,2,0)); -array1.SetValue(3,1,gp_Pnt(1,3,2)); -array1.SetValue(3,2,gp_Pnt(2,3,1)); -array1.SetValue(3,3,gp_Pnt(3,3,0)); + //============================================================== -array2.SetValue(1,1,gp_Pnt(3,1,1)); -array2.SetValue(1,2,gp_Pnt(4,1,1)); -array2.SetValue(1,3,gp_Pnt(5,1,2)); -array2.SetValue(2,1,gp_Pnt(3,2,0)); -array2.SetValue(2,2,gp_Pnt(4,2,1)); -array2.SetValue(2,3,gp_Pnt(5,2,2)); -array2.SetValue(3,1,gp_Pnt(3,3,0)); -array2.SetValue(3,2,gp_Pnt(4,3,0)); -array2.SetValue(3,3,gp_Pnt(5,3,1)); + TColgp_Array2OfPnt array1(1,3,1,3); + TColgp_Array2OfPnt array2(1,3,1,3); + TColgp_Array2OfPnt array3(1,3,1,3); + TColgp_Array2OfPnt array4(1,3,1,3); -array3.SetValue(1,1,gp_Pnt(1,3,2)); -array3.SetValue(1,2,gp_Pnt(2,3,1)); -array3.SetValue(1,3,gp_Pnt(3,3,0)); -array3.SetValue(2,1,gp_Pnt(1,4,1)); -array3.SetValue(2,2,gp_Pnt(2,4,0)); -array3.SetValue(2,3,gp_Pnt(3,4,1)); -array3.SetValue(3,1,gp_Pnt(1,5,1)); -array3.SetValue(3,2,gp_Pnt(2,5,1)); -array3.SetValue(3,3,gp_Pnt(3,5,2)); + array1.SetValue(1,1,gp_Pnt(1,1,1)); + array1.SetValue(1,2,gp_Pnt(2,1,2)); + array1.SetValue(1,3,gp_Pnt(3,1,1)); + array1.SetValue(2,1,gp_Pnt(1,2,1)); + array1.SetValue(2,2,gp_Pnt(2,2,2)); + array1.SetValue(2,3,gp_Pnt(3,2,0)); + array1.SetValue(3,1,gp_Pnt(1,3,2)); + array1.SetValue(3,2,gp_Pnt(2,3,1)); + array1.SetValue(3,3,gp_Pnt(3,3,0)); -array4.SetValue(1,1,gp_Pnt(3,3,0)); -array4.SetValue(1,2,gp_Pnt(4,3,0)); -array4.SetValue(1,3,gp_Pnt(5,3,1)); -array4.SetValue(2,1,gp_Pnt(3,4,1)); -array4.SetValue(2,2,gp_Pnt(4,4,1)); -array4.SetValue(2,3,gp_Pnt(5,4,1)); -array4.SetValue(3,1,gp_Pnt(3,5,2)); -array4.SetValue(3,2,gp_Pnt(4,5,2)); -array4.SetValue(3,3,gp_Pnt(5,5,1)); + array2.SetValue(1,1,gp_Pnt(3,1,1)); + array2.SetValue(1,2,gp_Pnt(4,1,1)); + array2.SetValue(1,3,gp_Pnt(5,1,2)); + array2.SetValue(2,1,gp_Pnt(3,2,0)); + array2.SetValue(2,2,gp_Pnt(4,2,1)); + array2.SetValue(2,3,gp_Pnt(5,2,2)); + array2.SetValue(3,1,gp_Pnt(3,3,0)); + array2.SetValue(3,2,gp_Pnt(4,3,0)); + array2.SetValue(3,3,gp_Pnt(5,3,1)); -Handle(Geom_BezierSurface) BZ1 = + array3.SetValue(1,1,gp_Pnt(1,3,2)); + array3.SetValue(1,2,gp_Pnt(2,3,1)); + array3.SetValue(1,3,gp_Pnt(3,3,0)); + array3.SetValue(2,1,gp_Pnt(1,4,1)); + array3.SetValue(2,2,gp_Pnt(2,4,0)); + array3.SetValue(2,3,gp_Pnt(3,4,1)); + array3.SetValue(3,1,gp_Pnt(1,5,1)); + array3.SetValue(3,2,gp_Pnt(2,5,1)); + array3.SetValue(3,3,gp_Pnt(3,5,2)); + + array4.SetValue(1,1,gp_Pnt(3,3,0)); + array4.SetValue(1,2,gp_Pnt(4,3,0)); + array4.SetValue(1,3,gp_Pnt(5,3,1)); + array4.SetValue(2,1,gp_Pnt(3,4,1)); + array4.SetValue(2,2,gp_Pnt(4,4,1)); + array4.SetValue(2,3,gp_Pnt(5,4,1)); + array4.SetValue(3,1,gp_Pnt(3,5,2)); + array4.SetValue(3,2,gp_Pnt(4,5,2)); + array4.SetValue(3,3,gp_Pnt(5,5,1)); + + Handle(Geom_BezierSurface) BZ1 = new Geom_BezierSurface(array1); -Handle(Geom_BezierSurface) BZ2 = + Handle(Geom_BezierSurface) BZ2 = new Geom_BezierSurface(array2); -Handle(Geom_BezierSurface) BZ3 = + Handle(Geom_BezierSurface) BZ3 = new Geom_BezierSurface(array3); -Handle(Geom_BezierSurface) BZ4 = + Handle(Geom_BezierSurface) BZ4 = new Geom_BezierSurface(array4); - -TColGeom_Array2OfBezierSurface bezierarray(1,2,1,2); -bezierarray.SetValue(1,1,BZ1); -bezierarray.SetValue(1,2,BZ2); -bezierarray.SetValue(2,1,BZ3); -bezierarray.SetValue(2,2,BZ4); - -GeomConvert_CompBezierSurfacesToBSplineSurface BB (bezierarray); - Handle(Geom_BSplineSurface) BSPLSURF ; -if (BB.IsDone()){ - BSPLSURF = new Geom_BSplineSurface( - BB.Poles()->Array2(), - BB.UKnots()->Array1(), - BB.VKnots()->Array1(), - BB.UMultiplicities()->Array1(), - BB.VMultiplicities()->Array1(), - BB.UDegree(), - BB.VDegree() ); - BSPLSURF->Translate(gp_Vec(0,0,2)); - } - -//============================================================== + TColGeom_Array2OfBezierSurface bezierarray(1,2,1,2); + bezierarray.SetValue(1,1,BZ1); + bezierarray.SetValue(1,2,BZ2); + bezierarray.SetValue(2,1,BZ3); + bezierarray.SetValue(2,2,BZ4); - TCollection_AsciiString Message (" \ + GeomConvert_CompBezierSurfacesToBSplineSurface BB (bezierarray); + Handle(Geom_BSplineSurface) BSPLSURF ; + if (BB.IsDone()) + { + BSPLSURF = new Geom_BSplineSurface( + BB.Poles()->Array2(), + BB.UKnots()->Array1(), + BB.VKnots()->Array1(), + BB.UMultiplicities()->Array1(), + BB.VMultiplicities()->Array1(), + BB.UDegree(), + BB.VDegree() ); + BSPLSURF->Translate(gp_Vec(0,0,2)); + } + + //============================================================== + + TCollection_AsciiString Message (" \ \n\ TColgp_Array2OfPnt array1(1,3,1,3); \n\ TColgp_Array2OfPnt array2(1,3,1,3); \n\ @@ -3346,63 +3399,63 @@ if (BB.IsDone()){ \n\ BSPLSURF->Translate(gp_Vec(0,0,2)); \n\ } \n\ \n"; - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- - - DisplaySurface(aDoc,BZ1,Quantity_NOC_RED); - DisplaySurface(aDoc,BZ2,Quantity_NOC_GREEN); - DisplaySurface(aDoc,BZ3,Quantity_NOC_BLUE1); - DisplaySurface(aDoc,BZ4,Quantity_NOC_BROWN); + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - if (BB.IsDone()){ - DisplaySurface(aDoc,BSPLSURF,Quantity_NOC_HOTPINK); - } + DisplaySurface(aDoc,BZ1,Quantity_NOC_RED); + DisplaySurface(aDoc,BZ2,Quantity_NOC_GREEN); + DisplaySurface(aDoc,BZ3,Quantity_NOC_BLUE1); + DisplaySurface(aDoc,BZ4,Quantity_NOC_BROWN); - Message += "BZ1 is Red; \n"; - Message += "BZ2 is Green; \n"; - Message += "BZ3 is Blue; \n"; - Message += "BZ4 is Brown; \n"; - Message += "BSPLSURF is Hot Pink; \n"; + if (BB.IsDone()){ + DisplaySurface(aDoc,BSPLSURF,Quantity_NOC_HOTPINK); + } - PostProcess(aDoc,ID_BUTTON_Test_42,TheDisplayType,Message.ToCString()); + Message += "BZ1 is Red; \n"; + Message += "BZ2 is Green; \n"; + Message += "BZ3 is Blue; \n"; + Message += "BZ4 is Brown; \n"; + Message += "BSPLSURF is Hot Pink; \n"; + + PostProcess(aDoc,ID_BUTTON_Test_42,TheDisplayType,Message.ToCString()); } void GeomSources::gpTest43(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -TColgp_Array1OfPnt array1 (1,5); -array1.SetValue(1,gp_Pnt (-4,5,5 )); -array1.SetValue(2,gp_Pnt (-3,6,6 )); -array1.SetValue(3,gp_Pnt (-1,7,7 )); -array1.SetValue(4,gp_Pnt (0,8,8)); -array1.SetValue(5,gp_Pnt (2,9,9)); -Handle(Geom_BSplineCurve) SPL1 = - GeomAPI_PointsToBSpline(array1).Curve(); - -TColgp_Array1OfPnt array2 (1,5); -array2.SetValue(1,gp_Pnt (-4,5,2 )); -array2.SetValue(2,gp_Pnt (-3,6,3 )); -array2.SetValue(3,gp_Pnt (-1,7,4 )); -array2.SetValue(4,gp_Pnt (0,8,5)); -array2.SetValue(5,gp_Pnt (2,9,6)); -Handle(Geom_BSplineCurve) SPL2 = - GeomAPI_PointsToBSpline(array2).Curve(); - -GeomFill_FillingStyle Type = GeomFill_StretchStyle; -GeomFill_BSplineCurves aGeomFill1(SPL1,SPL2,Type); -Handle(Geom_BSplineSurface) aGeomSurface = aGeomFill1.Surface(); -Standard_Real offset = 1; -Handle(Geom_OffsetSurface) GOS = new Geom_OffsetSurface(aGeomSurface, offset); - offset = 2; -Handle(Geom_OffsetSurface) GOS1 = new Geom_OffsetSurface(aGeomSurface, offset); -offset = 3; -Handle(Geom_OffsetSurface) GOS2 = new Geom_OffsetSurface(aGeomSurface, offset); - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + TColgp_Array1OfPnt array1 (1,5); + array1.SetValue(1,gp_Pnt (-4,5,5 )); + array1.SetValue(2,gp_Pnt (-3,6,6 )); + array1.SetValue(3,gp_Pnt (-1,7,7 )); + array1.SetValue(4,gp_Pnt (0,8,8)); + array1.SetValue(5,gp_Pnt (2,9,9)); + Handle(Geom_BSplineCurve) SPL1 = + GeomAPI_PointsToBSpline(array1).Curve(); + + TColgp_Array1OfPnt array2 (1,5); + array2.SetValue(1,gp_Pnt (-4,5,2 )); + array2.SetValue(2,gp_Pnt (-3,6,3 )); + array2.SetValue(3,gp_Pnt (-1,7,4 )); + array2.SetValue(4,gp_Pnt (0,8,5)); + array2.SetValue(5,gp_Pnt (2,9,6)); + Handle(Geom_BSplineCurve) SPL2 = + GeomAPI_PointsToBSpline(array2).Curve(); + + GeomFill_FillingStyle Type = GeomFill_StretchStyle; + GeomFill_BSplineCurves aGeomFill1(SPL1,SPL2,Type); + Handle(Geom_BSplineSurface) aGeomSurface = aGeomFill1.Surface(); + Standard_Real offset = 1; + Handle(Geom_OffsetSurface) GOS = new Geom_OffsetSurface(aGeomSurface, offset); + offset = 2; + Handle(Geom_OffsetSurface) GOS1 = new Geom_OffsetSurface(aGeomSurface, offset); + offset = 3; + Handle(Geom_OffsetSurface) GOS2 = new Geom_OffsetSurface(aGeomSurface, offset); + + //============================================================== + TCollection_AsciiString Message (" \ \n\ TColgp_Array1OfPnt array1 (1,5); \n\ //array1.SetValue( ... \n\ @@ -3425,57 +3478,58 @@ Handle(Geom_OffsetSurface) GOS1 = new Geom_OffsetSurface(aGeomSurface, offset); offset = 3; \n\ Handle(Geom_OffsetSurface) GOS2 = new Geom_OffsetSurface(aGeomSurface, offset); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplaySurface(aDoc,aGeomSurface,Quantity_NOC_BLUE1); - DisplaySurface(aDoc,GOS,Quantity_NOC_GREEN); - DisplaySurface(aDoc,GOS1,Quantity_NOC_GREEN); - DisplaySurface(aDoc,GOS2,Quantity_NOC_GREEN); + DisplaySurface(aDoc,aGeomSurface,Quantity_NOC_BLUE1); + DisplaySurface(aDoc,GOS,Quantity_NOC_GREEN); + DisplaySurface(aDoc,GOS1,Quantity_NOC_GREEN); + DisplaySurface(aDoc,GOS2,Quantity_NOC_GREEN); - DisplayCurve(aDoc,SPL1,Quantity_NOC_RED ,false); - DisplayCurve(aDoc,SPL2,Quantity_NOC_HOTPINK ,false); + DisplayCurve(aDoc,SPL1,Quantity_NOC_RED ,false); + DisplayCurve(aDoc,SPL2,Quantity_NOC_HOTPINK ,false); - Message += "aGeomSurface is Blue; \n"; - Message += "GOS are Green; \n"; + Message += "aGeomSurface is Blue; \n"; + Message += "GOS are Green; \n"; - PostProcess(aDoc,ID_BUTTON_Test_43,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_43,TheDisplayType,Message.ToCString()); } void GeomSources::gpTest44(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -gp_Pnt P1(0,0,1); -gp_Pnt P2(1,2,2); -gp_Pnt P3(2,3,3); -gp_Pnt P4(4,3,4); -gp_Pnt P5(5,5,5); -TColgp_Array1OfPnt array (1,5); -array.SetValue(1,P1); -array.SetValue(2,P2); -array.SetValue(3,P3); -array.SetValue(4,P4); -array.SetValue(5,P5); -Handle(Geom_BSplineCurve) aCurve = - GeomAPI_PointsToBSpline(array).Curve(); -gp_Dir aDir(1,2,3); -Handle(Geom_SurfaceOfLinearExtrusion) SOLE = - new Geom_SurfaceOfLinearExtrusion(aCurve,aDir); - -Handle(Geom_RectangularTrimmedSurface) aTrimmedSurface = - new Geom_RectangularTrimmedSurface(SOLE,-10,10,false); - -Standard_CString SOLEEntityTypeName="Not Computed"; -if (!SOLE.IsNull()) - { - SOLEEntityTypeName = SOLE->DynamicType()->Name(); - } - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + gp_Pnt P1(0,0,1); + gp_Pnt P2(1,2,2); + gp_Pnt P3(2,3,3); + gp_Pnt P4(4,3,4); + gp_Pnt P5(5,5,5); + TColgp_Array1OfPnt array (1,5); + array.SetValue(1,P1); + array.SetValue(2,P2); + array.SetValue(3,P3); + array.SetValue(4,P4); + array.SetValue(5,P5); + Handle(Geom_BSplineCurve) aCurve = + GeomAPI_PointsToBSpline(array).Curve(); + gp_Dir aDir(1,2,3); + Handle(Geom_SurfaceOfLinearExtrusion) SOLE = + new Geom_SurfaceOfLinearExtrusion(aCurve,aDir); + + Handle(Geom_RectangularTrimmedSurface) aTrimmedSurface = + new Geom_RectangularTrimmedSurface(SOLE,-10,10,false); + + Standard_CString SOLEEntityTypeName="Not Computed"; + if (!SOLE.IsNull()) + { + SOLEEntityTypeName = SOLE->DynamicType()->Name(); + } + + //============================================================== + + TCollection_AsciiString Message (" \ \n\ gp_Pnt P1(0,0,1); \n\ gp_Pnt P2(1,2,2); \n\ @@ -3503,45 +3557,46 @@ if (!SOLE.IsNull()) \n\ SOLEEntityTypeName = SOLE->DynamicType()->Name(); \n\ } \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplaySurface(aDoc,aTrimmedSurface,Quantity_NOC_GREEN); - DisplayCurve(aDoc,aCurve,Quantity_NOC_RED ,false); + DisplaySurface(aDoc,aTrimmedSurface,Quantity_NOC_GREEN); + DisplayCurve(aDoc,aCurve,Quantity_NOC_RED ,false); - Message += "aCurve is Red; \n"; - Message += "aTrimmedSurface is Green; \n"; + Message += "aCurve is Red; \n"; + Message += "aTrimmedSurface is Green; \n"; - TCollection_AsciiString Message2 (SOLEEntityTypeName); + TCollection_AsciiString Message2 (SOLEEntityTypeName); - Message += " SOLEEntityTypeName = ";Message+= Message2; Message += "\n"; + Message += " SOLEEntityTypeName = ";Message+= Message2; Message += "\n"; - PostProcess(aDoc,ID_BUTTON_Test_44,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_44,TheDisplayType,Message.ToCString()); } void GeomSources::gpTest45(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -TColgp_Array1OfPnt array (1,5); -array.SetValue(1,gp_Pnt (0,0,1)); -array.SetValue(2,gp_Pnt (1,2,2)); -array.SetValue(3,gp_Pnt (2,3,3)); -array.SetValue(4,gp_Pnt (4,3,4)); -array.SetValue(5,gp_Pnt (5,5,5)); -Handle(Geom_BSplineCurve) aCurve = - GeomAPI_PointsToBSpline(array).Curve(); -Handle(Geom_SurfaceOfRevolution) SOR = - new Geom_SurfaceOfRevolution(aCurve,gp::OX()); - -Standard_CString SOREntityTypeName="Not Computed"; -if (!SOR.IsNull()) - SOREntityTypeName = SOR->DynamicType()->Name(); - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== + + TColgp_Array1OfPnt array (1,5); + array.SetValue(1,gp_Pnt (0,0,1)); + array.SetValue(2,gp_Pnt (1,2,2)); + array.SetValue(3,gp_Pnt (2,3,3)); + array.SetValue(4,gp_Pnt (4,3,4)); + array.SetValue(5,gp_Pnt (5,5,5)); + Handle(Geom_BSplineCurve) aCurve = + GeomAPI_PointsToBSpline(array).Curve(); + Handle(Geom_SurfaceOfRevolution) SOR = + new Geom_SurfaceOfRevolution(aCurve,gp::OX()); + + Standard_CString SOREntityTypeName="Not Computed"; + if (!SOR.IsNull()) + SOREntityTypeName = SOR->DynamicType()->Name(); + + //============================================================== + TCollection_AsciiString Message (" \ \n\ TColgp_Array1OfPnt array (1,5); \n\ array.SetValue(1,gp_Pnt 0,0,1)); \n\ @@ -3558,58 +3613,59 @@ Standard_CString SOREntityTypeName=\"Not Computed\"; \n\ if (!SOR.IsNull()) \n\ SOREntityTypeName = SOR->DynamicType()->Name(); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- - DisplaySurface(aDoc,SOR,Quantity_NOC_GREEN); - DisplayCurve(aDoc,aCurve,Quantity_NOC_RED ,false); + AddSeparator(aDoc,Message); - Message += "aCurve is Red; \n"; - Message += "SOR is Green; \n"; - TCollection_AsciiString Message2 (SOREntityTypeName); - Message += " SOREntityTypeName = ";Message+= Message2; Message += "\n"; + //-------------------------------------------------------------- + DisplaySurface(aDoc,SOR,Quantity_NOC_GREEN); + DisplayCurve(aDoc,aCurve,Quantity_NOC_RED ,false); - PostProcess(aDoc,ID_BUTTON_Test_45,TheDisplayType,Message.ToCString()); + Message += "aCurve is Red; \n"; + Message += "SOR is Green; \n"; + TCollection_AsciiString Message2 (SOREntityTypeName); + Message += " SOREntityTypeName = ";Message+= Message2; Message += "\n"; + + PostProcess(aDoc,ID_BUTTON_Test_45,TheDisplayType,Message.ToCString()); } void GeomSources::gpTest46(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -TColgp_Array1OfPnt array1 (1,5); -array1.SetValue(1,gp_Pnt (-4,5,5 )); -array1.SetValue(2,gp_Pnt (-3,6,6 )); -array1.SetValue(3,gp_Pnt (-1,6,7 )); -array1.SetValue(4,gp_Pnt (0,8,8)); -array1.SetValue(5,gp_Pnt (2,9,9)); -Handle(Geom_BSplineCurve) SPL1 = - GeomAPI_PointsToBSpline(array1).Curve(); - -TColgp_Array1OfPnt array2 (1,5); -array2.SetValue(1,gp_Pnt (-4,5,2 )); -array2.SetValue(2,gp_Pnt (-3,6,3 )); -array2.SetValue(3,gp_Pnt (-1,7,4 )); -array2.SetValue(4,gp_Pnt (0,8,5)); -array2.SetValue(5,gp_Pnt (2,9,6)); -Handle(Geom_BSplineCurve) SPL2 = - GeomAPI_PointsToBSpline(array2).Curve(); - -GeomFill_FillingStyle Type = GeomFill_StretchStyle; -GeomFill_BSplineCurves aGeomFill1(SPL1,SPL2,Type); -Handle(Geom_BSplineSurface) aGeomSurface = aGeomFill1.Surface(); - -Handle(Geom_BSplineSurface) aTranslatedGeomSurface = - Handle(Geom_BSplineSurface)::DownCast(aGeomSurface->Copy()); - -Standard_Real extension = 3; -Standard_Integer continuity = 2; -Standard_Boolean Udirection = Standard_True; -Standard_Boolean after = Standard_True; -GeomLib::ExtendSurfByLength (aTranslatedGeomSurface, - extension,continuity,Udirection,after); - -//============================================================== + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + TColgp_Array1OfPnt array1 (1,5); + array1.SetValue(1,gp_Pnt (-4,5,5 )); + array1.SetValue(2,gp_Pnt (-3,6,6 )); + array1.SetValue(3,gp_Pnt (-1,6,7 )); + array1.SetValue(4,gp_Pnt (0,8,8)); + array1.SetValue(5,gp_Pnt (2,9,9)); + Handle(Geom_BSplineCurve) SPL1 = + GeomAPI_PointsToBSpline(array1).Curve(); + + TColgp_Array1OfPnt array2 (1,5); + array2.SetValue(1,gp_Pnt (-4,5,2 )); + array2.SetValue(2,gp_Pnt (-3,6,3 )); + array2.SetValue(3,gp_Pnt (-1,7,4 )); + array2.SetValue(4,gp_Pnt (0,8,5)); + array2.SetValue(5,gp_Pnt (2,9,6)); + Handle(Geom_BSplineCurve) SPL2 = + GeomAPI_PointsToBSpline(array2).Curve(); + + GeomFill_FillingStyle Type = GeomFill_StretchStyle; + GeomFill_BSplineCurves aGeomFill1(SPL1,SPL2,Type); + Handle(Geom_BSplineSurface) aGeomSurface = aGeomFill1.Surface(); + + Handle(Geom_BSplineSurface) aTranslatedGeomSurface = + Handle(Geom_BSplineSurface)::DownCast(aGeomSurface->Copy()); + + Standard_Real extension = 3; + Standard_Integer continuity = 2; + Standard_Boolean Udirection = Standard_True; + Standard_Boolean after = Standard_True; + GeomLib::ExtendSurfByLength (aTranslatedGeomSurface, + extension,continuity,Udirection,after); + + //============================================================== TCollection_AsciiString Message (" \ \n\ TColgp_Array1OfPnt array1 (1,5); \n\ @@ -3636,111 +3692,111 @@ Standard_Boolean after = Standard_True; \n\ GeomLib::ExtendSurfByLength (aTranslatedGeomSurface, \n\ extension,continuity,Udirection,after); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - if (!aGeomSurface.IsNull()) - { - DisplaySurface(aDoc,aGeomSurface,Quantity_NOC_HOTPINK); - } + if (!aGeomSurface.IsNull()) + { + DisplaySurface(aDoc,aGeomSurface,Quantity_NOC_HOTPINK); + } - if (!aTranslatedGeomSurface.IsNull()) - { - DisplaySurface(aDoc,aTranslatedGeomSurface,Quantity_NOC_BLUE1); - } + if (!aTranslatedGeomSurface.IsNull()) + { + DisplaySurface(aDoc,aTranslatedGeomSurface,Quantity_NOC_BLUE1); + } - DisplayCurve(aDoc,SPL1,Quantity_NOC_RED ,false); - DisplayCurve(aDoc,SPL2,Quantity_NOC_GREEN ,false); + DisplayCurve(aDoc,SPL1,Quantity_NOC_RED ,false); + DisplayCurve(aDoc,SPL2,Quantity_NOC_GREEN ,false); - Message += "aGeomSurface is Hot Pink; \n"; - Message += "aTranslatedGeomSurface is Blue; \n"; - Message += "SPL1 is Red; \n"; - Message += "SPL2 is Green; \n"; + Message += "aGeomSurface is Hot Pink; \n"; + Message += "aTranslatedGeomSurface is Blue; \n"; + Message += "SPL1 is Red; \n"; + Message += "SPL2 is Green; \n"; - PostProcess(aDoc,ID_BUTTON_Test_46,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_46,TheDisplayType,Message.ToCString()); } - void GeomSources::gpTest47(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); -TColgp_Array1OfPnt array1 (1,5); -array1.SetValue(1,gp_Pnt (-5,1,2)); -array1.SetValue(2,gp_Pnt (-5,2,2)); -array1.SetValue(3,gp_Pnt (-5.3,3,1)); -array1.SetValue(4,gp_Pnt (-5,4,1)); -array1.SetValue(5,gp_Pnt (-5,5,2)); -Handle(Geom_BSplineCurve) SPL1 = - GeomAPI_PointsToBSpline(array1).Curve(); - -TColgp_Array1OfPnt array2 (1,5); -array2.SetValue(1,gp_Pnt (4,1,2)); -array2.SetValue(2,gp_Pnt (4,2,2)); -array2.SetValue(3,gp_Pnt (3.7,3,1)); -array2.SetValue(4,gp_Pnt (4,4,1)); -array2.SetValue(5,gp_Pnt (4,5,2)); -Handle(Geom_BSplineCurve) SPL2 = - GeomAPI_PointsToBSpline(array2).Curve(); - -GeomFill_FillingStyle Type = GeomFill_StretchStyle; + //============================================================== -GeomFill_BSplineCurves aGeomFill1(SPL1,SPL2,Type); -Handle(Geom_BSplineSurface) aSurf1 = aGeomFill1.Surface(); - -TColgp_Array2OfPnt array3 (1,5,1,5); -array3.SetValue(1,1,gp_Pnt (-4,-4,5)); -array3.SetValue(1,2,gp_Pnt (-4,-2,5)); -array3.SetValue(1,3,gp_Pnt (-4,0,4)); -array3.SetValue(1,4,gp_Pnt (-4,2,5)); -array3.SetValue(1,5,gp_Pnt (-4,4,5)); - -array3.SetValue(2,1,gp_Pnt (-2,-4,4)); -array3.SetValue(2,2,gp_Pnt (-2,-2,4)); -array3.SetValue(2,3,gp_Pnt (-2,0,4)); -array3.SetValue(2,4,gp_Pnt (-2,2,4)); -array3.SetValue(2,5,gp_Pnt (-2,5,4)); - -array3.SetValue(3,1,gp_Pnt (0,-4,3.5)); -array3.SetValue(3,2,gp_Pnt (0,-2,3.5)); -array3.SetValue(3,3,gp_Pnt (0,0,3.5)); -array3.SetValue(3,4,gp_Pnt (0,2,3.5)); -array3.SetValue(3,5,gp_Pnt (0,5,3.5)); - -array3.SetValue(4,1,gp_Pnt (2,-4,4)); -array3.SetValue(4,2,gp_Pnt (2,-2,4)); -array3.SetValue(4,3,gp_Pnt (2,0,3.5)); -array3.SetValue(4,4,gp_Pnt (2,2,5)); -array3.SetValue(4,5,gp_Pnt (2,5,4)); - -array3.SetValue(5,1,gp_Pnt (4,-4,5)); -array3.SetValue(5,2,gp_Pnt (4,-2,5)); -array3.SetValue(5,3,gp_Pnt (4,0,5)); -array3.SetValue(5,4,gp_Pnt (4,2,6)); -array3.SetValue(5,5,gp_Pnt (4,5,5)); - -Handle(Geom_BSplineSurface) aSurf2 = - GeomAPI_PointsToBSplineSurface(array3).Surface(); - -GeomAPI_ExtremaSurfaceSurface ESS(aSurf1,aSurf2); -Quantity_Length dist = ESS.LowerDistance(); -gp_Pnt P1,P2; -ESS.NearestPoints(P1,P2); -gp_Pnt P3,P4; -Handle(Geom_Curve) aCurve; -Standard_Integer NbExtrema = ESS.NbExtrema(); -for(Standard_Integer k=1;k<=NbExtrema;k++){ - ESS.Points(k,P3,P4); + TColgp_Array1OfPnt array1 (1,5); + array1.SetValue(1,gp_Pnt (-5,1,2)); + array1.SetValue(2,gp_Pnt (-5,2,2)); + array1.SetValue(3,gp_Pnt (-5.3,3,1)); + array1.SetValue(4,gp_Pnt (-5,4,1)); + array1.SetValue(5,gp_Pnt (-5,5,2)); + Handle(Geom_BSplineCurve) SPL1 = + GeomAPI_PointsToBSpline(array1).Curve(); + + TColgp_Array1OfPnt array2 (1,5); + array2.SetValue(1,gp_Pnt (4,1,2)); + array2.SetValue(2,gp_Pnt (4,2,2)); + array2.SetValue(3,gp_Pnt (3.7,3,1)); + array2.SetValue(4,gp_Pnt (4,4,1)); + array2.SetValue(5,gp_Pnt (4,5,2)); + Handle(Geom_BSplineCurve) SPL2 = + GeomAPI_PointsToBSpline(array2).Curve(); + + GeomFill_FillingStyle Type = GeomFill_StretchStyle; + + GeomFill_BSplineCurves aGeomFill1(SPL1,SPL2,Type); + Handle(Geom_BSplineSurface) aSurf1 = aGeomFill1.Surface(); + + TColgp_Array2OfPnt array3 (1,5,1,5); + array3.SetValue(1,1,gp_Pnt (-4,-4,5)); + array3.SetValue(1,2,gp_Pnt (-4,-2,5)); + array3.SetValue(1,3,gp_Pnt (-4,0,4)); + array3.SetValue(1,4,gp_Pnt (-4,2,5)); + array3.SetValue(1,5,gp_Pnt (-4,4,5)); + + array3.SetValue(2,1,gp_Pnt (-2,-4,4)); + array3.SetValue(2,2,gp_Pnt (-2,-2,4)); + array3.SetValue(2,3,gp_Pnt (-2,0,4)); + array3.SetValue(2,4,gp_Pnt (-2,2,4)); + array3.SetValue(2,5,gp_Pnt (-2,5,4)); + + array3.SetValue(3,1,gp_Pnt (0,-4,3.5)); + array3.SetValue(3,2,gp_Pnt (0,-2,3.5)); + array3.SetValue(3,3,gp_Pnt (0,0,3.5)); + array3.SetValue(3,4,gp_Pnt (0,2,3.5)); + array3.SetValue(3,5,gp_Pnt (0,5,3.5)); + + array3.SetValue(4,1,gp_Pnt (2,-4,4)); + array3.SetValue(4,2,gp_Pnt (2,-2,4)); + array3.SetValue(4,3,gp_Pnt (2,0,3.5)); + array3.SetValue(4,4,gp_Pnt (2,2,5)); + array3.SetValue(4,5,gp_Pnt (2,5,4)); + + array3.SetValue(5,1,gp_Pnt (4,-4,5)); + array3.SetValue(5,2,gp_Pnt (4,-2,5)); + array3.SetValue(5,3,gp_Pnt (4,0,5)); + array3.SetValue(5,4,gp_Pnt (4,2,6)); + array3.SetValue(5,5,gp_Pnt (4,5,5)); + + Handle(Geom_BSplineSurface) aSurf2 = + GeomAPI_PointsToBSplineSurface(array3).Surface(); + + GeomAPI_ExtremaSurfaceSurface ESS(aSurf1,aSurf2); + Quantity_Length dist = ESS.LowerDistance(); + gp_Pnt P1,P2; + ESS.NearestPoints(P1,P2); + + gp_Pnt P3,P4; + Handle(Geom_Curve) aCurve; + Standard_Integer NbExtrema = ESS.NbExtrema(); + for(Standard_Integer k=1;k<=NbExtrema;k++){ + ESS.Points(k,P3,P4); aCurve= GC_MakeSegment(P3,P4).Value(); DisplayCurve(aDoc,aCurve,Quantity_NOC_YELLOW3,false); } - //============================================================== + TCollection_AsciiString Message (" \n\ GeomFill_FillingStyle Type = GeomFill_StretchStyle; \n\ \n\ @@ -3756,84 +3812,84 @@ gp_Pnt P1,P2; \n\ ESS.NearestPoints(P1,P2); \n\ \n"); - AddSeparator(aDoc,Message); - Message += "aSurf1 is Green; \n"; - Message += "aSurf2 is Hot Pink; \n"; - Message += "Nearest points P1 and P2 are shown; \n"; + AddSeparator(aDoc,Message); + Message += "aSurf1 is Green; \n"; + Message += "aSurf2 is Hot Pink; \n"; + Message += "Nearest points P1 and P2 are shown; \n"; - //-------------------------------------------------------------- + //-------------------------------------------------------------- //mfa - DisplaySurface(aDoc,aSurf1,Quantity_NOC_GREEN); - DisplaySurface(aDoc,aSurf2,Quantity_NOC_HOTPINK); - DisplayCurve(aDoc,SPL1,Quantity_NOC_RED ,false); - DisplayCurve(aDoc,SPL2,Quantity_NOC_AZURE ,false); - - DisplayPoint(aDoc,P1,Standard_CString("P1")); - DisplayPoint(aDoc,P2,Standard_CString("P2")); + DisplaySurface(aDoc,aSurf1,Quantity_NOC_GREEN); + DisplaySurface(aDoc,aSurf2,Quantity_NOC_HOTPINK); + DisplayCurve(aDoc,SPL1,Quantity_NOC_RED ,false); + DisplayCurve(aDoc,SPL2,Quantity_NOC_AZURE ,false); - PostProcess(aDoc,ID_BUTTON_Test_47,TheDisplayType,Message.ToCString()); + DisplayPoint(aDoc,P1,Standard_CString("P1")); + DisplayPoint(aDoc,P2,Standard_CString("P2")); + + PostProcess(aDoc,ID_BUTTON_Test_47,TheDisplayType,Message.ToCString()); } void GeomSources::gpTest48(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = a2DNo3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== + DisplayType TheDisplayType = a2DNo3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== -Standard_Real radius = 3; -Handle(Geom2d_Circle) circle = - new Geom2d_Circle(gp_Ax22d(gp_Pnt2d(-7,2),gp_Dir2d(1,0)),radius); - -Handle(Geom2d_TrimmedCurve) C = new Geom2d_TrimmedCurve(circle,1,5); - -Geom2dAdaptor_Curve GAC (C); + Standard_Real radius = 3; + Handle(Geom2d_Circle) circle = + new Geom2d_Circle(gp_Ax22d(gp_Pnt2d(-7,2),gp_Dir2d(1,0)),radius); + + Handle(Geom2d_TrimmedCurve) C = new Geom2d_TrimmedCurve(circle,1,5); + + Geom2dAdaptor_Curve GAC (C); -TColgp_Array1OfPnt2d array (1,5); // sizing array -array.SetValue(1,gp_Pnt2d (0,0)); -array.SetValue(2,gp_Pnt2d (1,2)); -array.SetValue(3,gp_Pnt2d (2,3)); -array.SetValue(4,gp_Pnt2d (4,3)); -array.SetValue(5,gp_Pnt2d (5,5)); -Handle(Geom2d_BSplineCurve) SPL1 = - Geom2dAPI_PointsToBSpline(array); - + TColgp_Array1OfPnt2d array (1,5); // sizing array + array.SetValue(1,gp_Pnt2d (0,0)); + array.SetValue(2,gp_Pnt2d (1,2)); + array.SetValue(3,gp_Pnt2d (2,3)); + array.SetValue(4,gp_Pnt2d (4,3)); + array.SetValue(5,gp_Pnt2d (5,5)); + Handle(Geom2d_BSplineCurve) SPL1 = + Geom2dAPI_PointsToBSpline(array); -Handle(TColgp_HArray1OfPnt2d) harray = - new TColgp_HArray1OfPnt2d (1,5); // sizing harray -harray->SetValue(1,gp_Pnt2d (13+ 0,0)); -harray->SetValue(2,gp_Pnt2d (13+ 1,2)); -harray->SetValue(3,gp_Pnt2d (13+ 2,3)); -harray->SetValue(4,gp_Pnt2d (13+ 4,3)); -harray->SetValue(5,gp_Pnt2d (13+ 5,5)); -Geom2dAPI_Interpolate anInterpolation(harray,Standard_True,0.01); -anInterpolation.Perform(); -Handle(Geom2d_BSplineCurve) SPL2 = anInterpolation.Curve(); - -Bnd_Box2d aCBox; -Geom2dAdaptor_Curve GACC (C); -BndLib_Add2dCurve::Add (GACC,Precision::Approximation(),aCBox); - -Standard_Real aCXmin, aCYmin, aCXmax, aCYmax; -aCBox.Get( aCXmin, aCYmin, aCXmax,aCYmax); - -Bnd_Box2d aSPL1Box; -Geom2dAdaptor_Curve GAC1 (SPL1); -BndLib_Add2dCurve::Add (GAC1,Precision::Approximation(),aSPL1Box); - -Standard_Real aSPL1Xmin,aSPL1Ymin,aSPL1Xmax,aSPL1Ymax; -aSPL1Box.Get( aSPL1Xmin, aSPL1Ymin, aSPL1Xmax,aSPL1Ymax); - -Bnd_Box2d aSPL2Box; -Geom2dAdaptor_Curve GAC2 (SPL2); -BndLib_Add2dCurve::Add (GAC2,Precision::Approximation(),aSPL2Box); - -Standard_Real aSPL2Xmin,aSPL2Ymin,aSPL2Xmax,aSPL2Ymax; -aSPL2Box.Get( aSPL2Xmin, aSPL2Ymin, aSPL2Xmax,aSPL2Ymax); - -//============================================================== + + Handle(TColgp_HArray1OfPnt2d) harray = + new TColgp_HArray1OfPnt2d (1,5); // sizing harray + harray->SetValue(1,gp_Pnt2d (13+ 0,0)); + harray->SetValue(2,gp_Pnt2d (13+ 1,2)); + harray->SetValue(3,gp_Pnt2d (13+ 2,3)); + harray->SetValue(4,gp_Pnt2d (13+ 4,3)); + harray->SetValue(5,gp_Pnt2d (13+ 5,5)); + Geom2dAPI_Interpolate anInterpolation(harray,Standard_True,0.01); + anInterpolation.Perform(); + Handle(Geom2d_BSplineCurve) SPL2 = anInterpolation.Curve(); + + Bnd_Box2d aCBox; + Geom2dAdaptor_Curve GACC (C); + BndLib_Add2dCurve::Add (GACC,Precision::Approximation(),aCBox); + + Standard_Real aCXmin, aCYmin, aCXmax, aCYmax; + aCBox.Get( aCXmin, aCYmin, aCXmax,aCYmax); + + Bnd_Box2d aSPL1Box; + Geom2dAdaptor_Curve GAC1 (SPL1); + BndLib_Add2dCurve::Add (GAC1,Precision::Approximation(),aSPL1Box); + + Standard_Real aSPL1Xmin,aSPL1Ymin,aSPL1Xmax,aSPL1Ymax; + aSPL1Box.Get( aSPL1Xmin, aSPL1Ymin, aSPL1Xmax,aSPL1Ymax); + + Bnd_Box2d aSPL2Box; + Geom2dAdaptor_Curve GAC2 (SPL2); + BndLib_Add2dCurve::Add (GAC2,Precision::Approximation(),aSPL2Box); + + Standard_Real aSPL2Xmin,aSPL2Ymin,aSPL2Xmax,aSPL2Ymax; + aSPL2Box.Get( aSPL2Xmin, aSPL2Ymin, aSPL2Xmax,aSPL2Ymax); + + //============================================================== TCollection_AsciiString Message (" \ \n\ Standard_Real radius = 3; \n\ @@ -3869,66 +3925,68 @@ BndLib_Add2dCurve::Add (GAC2,Precision::Approximation(),aSPL2Box); \n\ Standard_Real aSPL2Xmin,aSPL2Ymin,aSPL2Xmax,aSPL2Ymax; \n\ aSPL2Box.Get( aSPL2Xmin, aSPL2Ymin, aSPL2Xmax,aSPL2Ymax); \n\ \n"; - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplayCurve(aDoc,C ,5); - DisplayCurve(aDoc,SPL1,6 ); - DisplayCurve(aDoc,SPL2,7 ); + DisplayCurve(aDoc,C ,5); + DisplayCurve(aDoc,SPL1,6 ); + DisplayCurve(aDoc,SPL2,7 ); - DisplayPoint(aDoc,gp_Pnt2d(aCXmin,aCYmax),Standard_CString("aCXmin,aCYmax")); - DisplayPoint(aDoc,gp_Pnt2d(aCXmax,aCYmax),Standard_CString("aCXmax,aCYmax")); - DisplayPoint(aDoc,gp_Pnt2d(aCXmin,aCYmin),Standard_CString("aCXmin,aCYmin")); - DisplayPoint(aDoc,gp_Pnt2d(aCXmax,aCYmin),Standard_CString("aCXmax,aCYmin")); + DisplayPoint(aDoc,gp_Pnt2d(aCXmin,aCYmax),Standard_CString("aCXmin,aCYmax")); + DisplayPoint(aDoc,gp_Pnt2d(aCXmax,aCYmax),Standard_CString("aCXmax,aCYmax")); + DisplayPoint(aDoc,gp_Pnt2d(aCXmin,aCYmin),Standard_CString("aCXmin,aCYmin")); + DisplayPoint(aDoc,gp_Pnt2d(aCXmax,aCYmin),Standard_CString("aCXmax,aCYmin")); - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmin,aCYmax),gp_Pnt2d(aCXmax,aCYmax)) ,4); // X,Ymax - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmin,aCYmin),gp_Pnt2d(aCXmax,aCYmin)) ,4); // X,Ymin - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmin,aCYmin),gp_Pnt2d(aCXmin,aCYmax)) ,4); // Xmin,Y - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmax,aCYmin),gp_Pnt2d(aCXmax,aCYmax)) ,4); // Xmax,Y + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmin,aCYmax),gp_Pnt2d(aCXmax,aCYmax)) ,4); // X,Ymax + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmin,aCYmin),gp_Pnt2d(aCXmax,aCYmin)) ,4); // X,Ymin + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmin,aCYmin),gp_Pnt2d(aCXmin,aCYmax)) ,4); // Xmin,Y + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmax,aCYmin),gp_Pnt2d(aCXmax,aCYmax)) ,4); // Xmax,Y - DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmin,aSPL1Ymax),Standard_CString("aSPL1Xmin,aSPL1Ymax")); - DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmax,aSPL1Ymax),Standard_CString("aSPL1Xmax,aSPL1Ymax")); - DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmin,aSPL1Ymin),Standard_CString("aSPL1Xmin,aSPL1Ymin")); - DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmax,aSPL1Ymin),Standard_CString("aSPL1Xmax,aSPL1Ymin")); + DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmin,aSPL1Ymax),Standard_CString("aSPL1Xmin,aSPL1Ymax")); + DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmax,aSPL1Ymax),Standard_CString("aSPL1Xmax,aSPL1Ymax")); + DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmin,aSPL1Ymin),Standard_CString("aSPL1Xmin,aSPL1Ymin")); + DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmax,aSPL1Ymin),Standard_CString("aSPL1Xmax,aSPL1Ymin")); - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmin,aSPL1Ymax),gp_Pnt2d(aSPL1Xmax,aSPL1Ymax)) ,4); // X,Ymax - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmin,aSPL1Ymin),gp_Pnt2d(aSPL1Xmax,aSPL1Ymin)) ,4); // X,Ymin - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmin,aSPL1Ymin),gp_Pnt2d(aSPL1Xmin,aSPL1Ymax)) ,4); // Xmin,Y - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmax,aSPL1Ymin),gp_Pnt2d(aSPL1Xmax,aSPL1Ymax)) ,4); // Xmax,Y + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmin,aSPL1Ymax),gp_Pnt2d(aSPL1Xmax,aSPL1Ymax)) ,4); // X,Ymax + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmin,aSPL1Ymin),gp_Pnt2d(aSPL1Xmax,aSPL1Ymin)) ,4); // X,Ymin + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmin,aSPL1Ymin),gp_Pnt2d(aSPL1Xmin,aSPL1Ymax)) ,4); // Xmin,Y + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmax,aSPL1Ymin),gp_Pnt2d(aSPL1Xmax,aSPL1Ymax)) ,4); // Xmax,Y - DisplayPoint(aDoc,gp_Pnt2d(aSPL2Xmin,aSPL2Ymax),Standard_CString("aSPL2Xmin,aSPL2Ymax")); - DisplayPoint(aDoc,gp_Pnt2d(aSPL2Xmax,aSPL2Ymax),Standard_CString("aSPL2Xmax,aSPL2Ymax")); - DisplayPoint(aDoc,gp_Pnt2d(aSPL2Xmin,aSPL2Ymin),Standard_CString("aSPL2Xmin,aSPL2Ymin")); - DisplayPoint(aDoc,gp_Pnt2d(aSPL2Xmax,aSPL2Ymin),Standard_CString("aSPL2Xmax,aSPL2Ymin")); + DisplayPoint(aDoc,gp_Pnt2d(aSPL2Xmin,aSPL2Ymax),Standard_CString("aSPL2Xmin,aSPL2Ymax")); + DisplayPoint(aDoc,gp_Pnt2d(aSPL2Xmax,aSPL2Ymax),Standard_CString("aSPL2Xmax,aSPL2Ymax")); + DisplayPoint(aDoc,gp_Pnt2d(aSPL2Xmin,aSPL2Ymin),Standard_CString("aSPL2Xmin,aSPL2Ymin")); + DisplayPoint(aDoc,gp_Pnt2d(aSPL2Xmax,aSPL2Ymin),Standard_CString("aSPL2Xmax,aSPL2Ymin")); - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmin,aSPL2Ymax),gp_Pnt2d(aSPL2Xmax,aSPL2Ymax)) ,4); // X,Ymax - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmin,aSPL2Ymin),gp_Pnt2d(aSPL2Xmax,aSPL2Ymin)) ,4); // X,Ymin - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmin,aSPL2Ymin),gp_Pnt2d(aSPL2Xmin,aSPL2Ymax)) ,4); // Xmin,Y - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmax,aSPL2Ymin),gp_Pnt2d(aSPL2Xmax,aSPL2Ymax)) ,4); // Xmax,Y + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmin,aSPL2Ymax),gp_Pnt2d(aSPL2Xmax,aSPL2Ymax)) ,4); // X,Ymax + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmin,aSPL2Ymin),gp_Pnt2d(aSPL2Xmax,aSPL2Ymin)) ,4); // X,Ymin + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmin,aSPL2Ymin),gp_Pnt2d(aSPL2Xmin,aSPL2Ymax)) ,4); // Xmin,Y + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmax,aSPL2Ymin),gp_Pnt2d(aSPL2Xmax,aSPL2Ymax)) ,4); // Xmax,Y - PostProcess(aDoc,ID_BUTTON_Test_48,TheDisplayType,Message.ToCString()); + PostProcess(aDoc,ID_BUTTON_Test_48,TheDisplayType,Message.ToCString()); } void GeomSources::gpTest49(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -Bnd_Box aBox; -Standard_Real radius = 100; -gp_Ax2 anAxis(gp_Pnt(0,0,0),gp_Dir(1,2,-5)); - -Handle(Geom_Circle) C = - new Geom_Circle(anAxis,radius); -GeomAdaptor_Curve GAC (C); -BndLib_Add3dCurve::Add (GAC,Precision::Approximation(),aBox); - -Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax ; -aBox.Get( aXmin, aYmin,aZmin, aXmax,aYmax,aZmax); - -//============================================================== + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + + //============================================================== + + Bnd_Box aBox; + Standard_Real radius = 100; + gp_Ax2 anAxis(gp_Pnt(0,0,0),gp_Dir(1,2,-5)); + + Handle(Geom_Circle) C = + new Geom_Circle(anAxis,radius); + GeomAdaptor_Curve GAC (C); + BndLib_Add3dCurve::Add (GAC,Precision::Approximation(),aBox); + + Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax ; + aBox.Get( aXmin, aYmin,aZmin, aXmax,aYmax,aZmax); + + //============================================================== + TCollection_AsciiString Message (" \ \n\ Bnd_Box aBox; \n\ @@ -3943,91 +4001,85 @@ BndLib_Add3dCurve::Add (GAC,Precision::Approximation(),aBox); \n\ Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax ; \n\ aBox.Get( aXmin, aYmin,aZmin, aXmax,aYmax,aZmax); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - DisplayCurve(aDoc,C,Quantity_NOC_BLUE1 ,false); + DisplayCurve(aDoc,C,Quantity_NOC_BLUE1 ,false); - DisplayPoint(aDoc,gp_Pnt(aXmin,aYmax,aZmin),Standard_CString("aXmin,aYmax,aZmin")); - DisplayPoint(aDoc,gp_Pnt(aXmax,aYmax,aZmin),Standard_CString("aXmax,aYmax,aZmin")); - DisplayPoint(aDoc,gp_Pnt(aXmin,aYmin,aZmin),Standard_CString("aXmin,aYmin,aZmin")); - DisplayPoint(aDoc,gp_Pnt(aXmax,aYmin,aZmin),Standard_CString("aXmax,aYmin,aZmin")); + DisplayPoint(aDoc,gp_Pnt(aXmin,aYmax,aZmin),Standard_CString("aXmin,aYmax,aZmin")); + DisplayPoint(aDoc,gp_Pnt(aXmax,aYmax,aZmin),Standard_CString("aXmax,aYmax,aZmin")); + DisplayPoint(aDoc,gp_Pnt(aXmin,aYmin,aZmin),Standard_CString("aXmin,aYmin,aZmin")); + DisplayPoint(aDoc,gp_Pnt(aXmax,aYmin,aZmin),Standard_CString("aXmax,aYmin,aZmin")); - DisplayPoint(aDoc,gp_Pnt(aXmin,aYmax,aZmax),Standard_CString("aXmin,aYmax,aZmax")); - DisplayPoint(aDoc,gp_Pnt(aXmax,aYmax,aZmax),Standard_CString("aXmax,aYmax,aZmax")); - DisplayPoint(aDoc,gp_Pnt(aXmin,aYmin,aZmax),Standard_CString("aXmin,aYmin,aZmax")); - DisplayPoint(aDoc,gp_Pnt(aXmax,aYmin,aZmax),Standard_CString("aXmax,aYmin,aZmax")); + DisplayPoint(aDoc,gp_Pnt(aXmin,aYmax,aZmax),Standard_CString("aXmin,aYmax,aZmax")); + DisplayPoint(aDoc,gp_Pnt(aXmax,aYmax,aZmax),Standard_CString("aXmax,aYmax,aZmax")); + DisplayPoint(aDoc,gp_Pnt(aXmin,aYmin,aZmax),Standard_CString("aXmin,aYmin,aZmax")); + DisplayPoint(aDoc,gp_Pnt(aXmax,aYmin,aZmax),Standard_CString("aXmax,aYmin,aZmax")); - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmin), - gp_Pnt(aXmax,aYmax,aZmin)) ,Quantity_NOC_RED); // X,Ymax,ZMin - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), - gp_Pnt(aXmax,aYmin,aZmin)) ,Quantity_NOC_RED); // X,Ymin,ZMin - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), - gp_Pnt(aXmin,aYmax,aZmin)) ,Quantity_NOC_RED); // Xmin,Y,ZMin - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmin), - gp_Pnt(aXmax,aYmax,aZmin)) ,Quantity_NOC_RED); // Xmax,Y,ZMin - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmax), - gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // X,Ymax,ZMax - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmax), - gp_Pnt(aXmax,aYmin,aZmax)) ,Quantity_NOC_RED); // X,Ymin,ZMax - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmax), - gp_Pnt(aXmin,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmin,Y,ZMax - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmax), - gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmax,Y,ZMax - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), - gp_Pnt(aXmin,aYmin,aZmax)) ,Quantity_NOC_RED); // Xmin,Ymin,Z - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmin), - gp_Pnt(aXmax,aYmin,aZmax)) ,Quantity_NOC_RED); // Xmax,Ymin,Z - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmin), - gp_Pnt(aXmin,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmin,Ymax,Z - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmax,aZmin), - gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmax,Ymax,Z -/* - Handle(AIS_Trihedron) aTrihedron; - Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY()); - aTrihedron=new AIS_Trihedron(aTrihedronAxis); - aDoc->GetAISContext()->Display(aTrihedron); -*/ - PostProcess(aDoc,ID_BUTTON_Test_49,TheDisplayType,Message.ToCString()); + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmin), + gp_Pnt(aXmax,aYmax,aZmin)) ,Quantity_NOC_RED); // X,Ymax,ZMin + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), + gp_Pnt(aXmax,aYmin,aZmin)) ,Quantity_NOC_RED); // X,Ymin,ZMin + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), + gp_Pnt(aXmin,aYmax,aZmin)) ,Quantity_NOC_RED); // Xmin,Y,ZMin + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmin), + gp_Pnt(aXmax,aYmax,aZmin)) ,Quantity_NOC_RED); // Xmax,Y,ZMin + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmax), + gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // X,Ymax,ZMax + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmax), + gp_Pnt(aXmax,aYmin,aZmax)) ,Quantity_NOC_RED); // X,Ymin,ZMax + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmax), + gp_Pnt(aXmin,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmin,Y,ZMax + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmax), + gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmax,Y,ZMax + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), + gp_Pnt(aXmin,aYmin,aZmax)) ,Quantity_NOC_RED); // Xmin,Ymin,Z + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmin), + gp_Pnt(aXmax,aYmin,aZmax)) ,Quantity_NOC_RED); // Xmax,Ymin,Z + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmin), + gp_Pnt(aXmin,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmin,Ymax,Z + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmax,aZmin), + gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmax,Ymax,Z + + PostProcess(aDoc,ID_BUTTON_Test_49,TheDisplayType,Message.ToCString()); } - void GeomSources::gpTest50(CGeometryDoc* aDoc) { - DisplayType TheDisplayType = No2D3D; - PreProcess(aDoc,TheDisplayType); -//============================================================== - -TColgp_Array1OfPnt array1 (1,5); -array1.SetValue(1,gp_Pnt (-40,00,20 )); -array1.SetValue(2,gp_Pnt (-70,20,20 )); -array1.SetValue(3,gp_Pnt (-60,30,10 )); -array1.SetValue(4,gp_Pnt (-40,30,-10)); -array1.SetValue(5,gp_Pnt (-30,50,-20)); -Handle(Geom_BSplineCurve) SPL1 = - GeomAPI_PointsToBSpline(array1).Curve(); - -TColgp_Array1OfPnt array2 (1,5); -array2.SetValue(1,gp_Pnt (-40,0, 20)); -array2.SetValue(2,gp_Pnt (-20,20,0 )); -array2.SetValue(3,gp_Pnt (20 ,30,-10)); -array2.SetValue(4,gp_Pnt (30 ,70,-20)); -array2.SetValue(5,gp_Pnt (40 ,90,-10)); -Handle(Geom_BSplineCurve) SPL2 = - GeomAPI_PointsToBSpline(array2).Curve(); - -GeomFill_FillingStyle Type = GeomFill_StretchStyle; -GeomFill_BSplineCurves aGeomFill1(SPL1,SPL2,Type); -Handle(Geom_BSplineSurface) aSurf = aGeomFill1.Surface(); -GeomAdaptor_Surface GAS (aSurf); -Bnd_Box aBox; -BndLib_AddSurface::Add (GAS,Precision::Approximation(),aBox); - -Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax ; -aBox.Get( aXmin, aYmin,aZmin, aXmax,aYmax,aZmax); - -//============================================================== - TCollection_AsciiString Message (" \ + DisplayType TheDisplayType = No2D3D; + PreProcess(aDoc,TheDisplayType); + //============================================================== + + TColgp_Array1OfPnt array1 (1,5); + array1.SetValue(1,gp_Pnt (-40,00,20 )); + array1.SetValue(2,gp_Pnt (-70,20,20 )); + array1.SetValue(3,gp_Pnt (-60,30,10 )); + array1.SetValue(4,gp_Pnt (-40,30,-10)); + array1.SetValue(5,gp_Pnt (-30,50,-20)); + Handle(Geom_BSplineCurve) SPL1 = + GeomAPI_PointsToBSpline(array1).Curve(); + + TColgp_Array1OfPnt array2 (1,5); + array2.SetValue(1,gp_Pnt (-40,0, 20)); + array2.SetValue(2,gp_Pnt (-20,20,0 )); + array2.SetValue(3,gp_Pnt (20 ,30,-10)); + array2.SetValue(4,gp_Pnt (30 ,70,-20)); + array2.SetValue(5,gp_Pnt (40 ,90,-10)); + Handle(Geom_BSplineCurve) SPL2 = + GeomAPI_PointsToBSpline(array2).Curve(); + + GeomFill_FillingStyle Type = GeomFill_StretchStyle; + GeomFill_BSplineCurves aGeomFill1(SPL1,SPL2,Type); + Handle(Geom_BSplineSurface) aSurf = aGeomFill1.Surface(); + GeomAdaptor_Surface GAS (aSurf); + Bnd_Box aBox; + BndLib_AddSurface::Add (GAS,Precision::Approximation(),aBox); + + Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax ; + aBox.Get( aXmin, aYmin,aZmin, aXmax,aYmax,aZmax); + + //============================================================== + TCollection_AsciiString Message (" \ \n\ TColgp_Array1OfPnt array1 (1,5); \n\ array1.SetValue(1,gp_Pnt (-40, 0, 20)); \n\ @@ -4057,51 +4109,44 @@ BndLib_AddSurface::Add (GAS,Precision::Approximation(),aBox); \n\ Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax ; \n\ aBox.Get( aXmin, aYmin,aZmin, aXmax,aYmax,aZmax); \n\ \n"); - AddSeparator(aDoc,Message); - //-------------------------------------------------------------- + AddSeparator(aDoc,Message); + //-------------------------------------------------------------- - Quantity_NameOfColor aNameOfColor= Quantity_NOC_GREEN; - Handle(ISession_Surface) aGraphicalSurface = new ISession_Surface(aSurf); - aDoc->GetAISContext()->SetColor(aGraphicalSurface,aNameOfColor); - aGraphicalSurface->Attributes()->FreeBoundaryAspect()->SetColor(aNameOfColor); - aGraphicalSurface->Attributes()->UIsoAspect()->SetColor(aNameOfColor); - aGraphicalSurface->Attributes()->VIsoAspect()->SetColor(aNameOfColor); + Quantity_NameOfColor aNameOfColor= Quantity_NOC_GREEN; + Handle(ISession_Surface) aGraphicalSurface = new ISession_Surface(aSurf); + aDoc->GetAISContext()->SetColor(aGraphicalSurface,aNameOfColor); + aGraphicalSurface->Attributes()->FreeBoundaryAspect()->SetColor(aNameOfColor); + aGraphicalSurface->Attributes()->UIsoAspect()->SetColor(aNameOfColor); + aGraphicalSurface->Attributes()->VIsoAspect()->SetColor(aNameOfColor); - aDoc->GetAISContext()->SetDisplayMode(aGraphicalSurface,1); - aDoc->GetAISContext()->Display(aGraphicalSurface,false); - // DisplaySurface(aDoc,aSurf,Quantity_NOC_GREEN); + aDoc->GetAISContext()->SetDisplayMode(aGraphicalSurface,1); + aDoc->GetAISContext()->Display(aGraphicalSurface,false); + // DisplaySurface(aDoc,aSurf,Quantity_NOC_GREEN); - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmin), - gp_Pnt(aXmax,aYmax,aZmin)) ,Quantity_NOC_RED); // X,Ymax,ZMin - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), - gp_Pnt(aXmax,aYmin,aZmin)) ,Quantity_NOC_RED); // X,Ymin,ZMin - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), - gp_Pnt(aXmin,aYmax,aZmin)) ,Quantity_NOC_RED); // Xmin,Y,ZMin - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmin), - gp_Pnt(aXmax,aYmax,aZmin)) ,Quantity_NOC_RED); // Xmax,Y,ZMin - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmax), - gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // X,Ymax,ZMax - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmax), - gp_Pnt(aXmax,aYmin,aZmax)) ,Quantity_NOC_RED); // X,Ymin,ZMax - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmax), - gp_Pnt(aXmin,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmin,Y,ZMax - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmax), - gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmax,Y,ZMax - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), - gp_Pnt(aXmin,aYmin,aZmax)) ,Quantity_NOC_RED); // Xmin,Ymin,Z - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmin), - gp_Pnt(aXmax,aYmin,aZmax)) ,Quantity_NOC_RED); // Xmax,Ymin,Z - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmin), - gp_Pnt(aXmin,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmin,Ymax,Z - DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmax,aZmin), - gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmax,Ymax,Z -/* - Handle(AIS_Trihedron) aTrihedron; - Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY()); - aTrihedron=new AIS_Trihedron(aTrihedronAxis); - aDoc->GetAISContext()->Display(aTrihedron); -*/ - PostProcess(aDoc,ID_BUTTON_Test_50,TheDisplayType,Message.ToCString()); + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmin), + gp_Pnt(aXmax,aYmax,aZmin)) ,Quantity_NOC_RED); // X,Ymax,ZMin + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), + gp_Pnt(aXmax,aYmin,aZmin)) ,Quantity_NOC_RED); // X,Ymin,ZMin + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), + gp_Pnt(aXmin,aYmax,aZmin)) ,Quantity_NOC_RED); // Xmin,Y,ZMin + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmin), + gp_Pnt(aXmax,aYmax,aZmin)) ,Quantity_NOC_RED); // Xmax,Y,ZMin + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmax), + gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // X,Ymax,ZMax + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmax), + gp_Pnt(aXmax,aYmin,aZmax)) ,Quantity_NOC_RED); // X,Ymin,ZMax + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmax), + gp_Pnt(aXmin,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmin,Y,ZMax + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmax), + gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmax,Y,ZMax + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), + gp_Pnt(aXmin,aYmin,aZmax)) ,Quantity_NOC_RED); // Xmin,Ymin,Z + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmin), + gp_Pnt(aXmax,aYmin,aZmax)) ,Quantity_NOC_RED); // Xmax,Ymin,Z + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmin), + gp_Pnt(aXmin,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmin,Ymax,Z + DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmax,aZmin), + gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmax,Ymax,Z + + PostProcess(aDoc,ID_BUTTON_Test_50,TheDisplayType,Message.ToCString()); } - - diff --git a/samples/mfc/standard/01_Geometry/src/GeomSources.h b/samples/mfc/standard/01_Geometry/src/GeomSources.h index a445f1a584..fd1fce10af 100755 --- a/samples/mfc/standard/01_Geometry/src/GeomSources.h +++ b/samples/mfc/standard/01_Geometry/src/GeomSources.h @@ -16,110 +16,110 @@ class GeomSources { public: - Standard_EXPORT static void gpTest1(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest2(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest3(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest4(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest5(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest6(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest7(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest8(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest9(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest10(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest11(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest12(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest13(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest14(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest15(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest16(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest17(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest18(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest19(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest20(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest21(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest22(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest23(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest24(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest25(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest26(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest27(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest28(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest29(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest30(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest31(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest32(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest33(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest34(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest35(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest36(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest37(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest38(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest39(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest40(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest41(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest42(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest43(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest44(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest45(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest46(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest47(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest48(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest49(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest50(CGeometryDoc* aDoc); - Standard_EXPORT static void gpTest51(CGeometryDoc* aDoc); - GeomSources(); - virtual ~GeomSources(); + Standard_EXPORT static void gpTest1(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest2(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest3(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest4(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest5(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest6(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest7(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest8(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest9(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest10(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest11(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest12(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest13(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest14(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest15(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest16(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest17(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest18(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest19(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest20(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest21(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest22(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest23(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest24(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest25(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest26(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest27(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest28(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest29(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest30(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest31(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest32(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest33(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest34(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest35(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest36(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest37(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest38(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest39(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest40(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest41(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest42(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest43(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest44(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest45(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest46(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest47(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest48(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest49(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest50(CGeometryDoc* aDoc); + Standard_EXPORT static void gpTest51(CGeometryDoc* aDoc); + GeomSources(); + virtual ~GeomSources(); private: enum DisplayType{No2DNo3D, // 0 0 0 - No2D3D , // 0 0 1 - a2DNo3D , // 0 1 0 - a2D3D }; // 1 1 1 + No2D3D , // 0 0 1 + a2DNo3D , // 0 1 0 + a2D3D }; // 1 1 1 static void PreProcess (CGeometryDoc* aDoc,DisplayType aDisplayType); static void PostProcess(CGeometryDoc* aDoc,UINT anID,DisplayType aDisplayType,const char* aString="",Quantity_Coefficient Coef = -1/*double zoom =-1*/); static void DisplayPoint(CGeometryDoc* aDoc, - gp_Pnt2d& aPoint, - const char* aText, - Standard_Boolean UpdateViewer = Standard_False, - Standard_Real anXoffset =0, - Standard_Real anYoffset =0, - Standard_Real TextScale = 0.05); + gp_Pnt2d& aPoint, + const char* aText, + Standard_Boolean UpdateViewer = Standard_False, + Standard_Real anXoffset =0, + Standard_Real anYoffset =0, + Standard_Real TextScale = 0.05); static void DisplayPoint(CGeometryDoc* aDoc, - gp_Pnt& aPoint, - const char* aText, - Standard_Boolean UpdateViewer = Standard_False, - Standard_Real anXoffset = 0, - Standard_Real anYoffset = 0, - Standard_Real aZoffset = 0, - Standard_Real TextScale = 0.05); + gp_Pnt& aPoint, + const char* aText, + Standard_Boolean UpdateViewer = Standard_False, + Standard_Real anXoffset = 0, + Standard_Real anYoffset = 0, + Standard_Real aZoffset = 0, + Standard_Real TextScale = 0.05); - static void DisplayCurve(CGeometryDoc* aDoc, - Handle(Geom2d_Curve) aCurve, - Standard_Integer aColorIndex = 4, - Standard_Boolean UpdateViewer = false); - static void DisplayCurveAndCurvature(CGeometryDoc* aDoc, - Handle(Geom2d_Curve) aCurve, - Standard_Integer aColorIndex = 4, - Standard_Boolean UpdateViewer = false); + static void DisplayCurve(CGeometryDoc* aDoc, + Handle(Geom2d_Curve) aCurve, + Standard_Integer aColorIndex = 4, + Standard_Boolean UpdateViewer = false); + static void DisplayCurveAndCurvature(CGeometryDoc* aDoc, + Handle(Geom2d_Curve) aCurve, + Standard_Integer aColorIndex = 4, + Standard_Boolean UpdateViewer = false); - static void DisplayCurve(CGeometryDoc* aDoc, - Handle(Geom_Curve) aCurve, - Quantity_NameOfColor aNameOfColor, - Standard_Boolean UpdateViewer = false); + static void DisplayCurve(CGeometryDoc* aDoc, + Handle(Geom_Curve) aCurve, + Quantity_NameOfColor aNameOfColor, + Standard_Boolean UpdateViewer = false); - static void DisplayCurve(CGeometryDoc* aDoc, - Handle(Geom_Curve) aCurve, - Standard_Boolean UpdateViewer = false); + static void DisplayCurve(CGeometryDoc* aDoc, + Handle(Geom_Curve) aCurve, + Standard_Boolean UpdateViewer = false); - static void DisplaySurface (CGeometryDoc* aDoc, - Handle(Geom_Surface) aSurface, - Quantity_NameOfColor aNameOfColor, - Standard_Boolean UpdateViewer = false); + static void DisplaySurface (CGeometryDoc* aDoc, + Handle(Geom_Surface) aSurface, + Quantity_NameOfColor aNameOfColor, + Standard_Boolean UpdateViewer = false); - static void DisplaySurface (CGeometryDoc* aDoc, - Handle(Geom_Surface) aSurface, - Standard_Boolean UpdateViewer = false); + static void DisplaySurface (CGeometryDoc* aDoc, + Handle(Geom_Surface) aSurface, + Standard_Boolean UpdateViewer = false); diff --git a/samples/mfc/standard/01_Geometry/src/GeometryApp.cpp b/samples/mfc/standard/01_Geometry/src/GeometryApp.cpp index 96bfed141b..b00b7c8422 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryApp.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeometryApp.cpp @@ -15,15 +15,14 @@ ///////////////////////////////////////////////////////////////////////////// // CGeometryApp construction -CGeometryApp::CGeometryApp() +CGeometryApp::CGeometryApp() : OCC_App() { - SampleName = "Geometry"; //for about dialog - + SampleName = "Geometry"; //for about dialog } CGeometryApp::~CGeometryApp() { - delete pDocTemplateForView2d; + delete pDocTemplateForView2d; } ///////////////////////////////////////////////////////////////////////////// // The one and only CGeometryApp object @@ -35,58 +34,57 @@ CGeometryApp theApp; BOOL CGeometryApp::InitInstance() { - AfxInitRichEdit(); - AfxEnableControlContainer(); + AfxInitRichEdit(); + 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. + // 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")); + // 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) + 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. + // 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(CGeometryDoc), - RUNTIME_CLASS(CChildFrame), // custom MDI child frame - RUNTIME_CLASS(CGeometryView)); - AddDocTemplate(pDocTemplateForView3d); - - pDocTemplateForView2d = new CMultiDocTemplate( - IDR_2DTYPE, - RUNTIME_CLASS(CGeometryDoc), - RUNTIME_CLASS(CChildFrame2D), // custom MDI child frame - RUNTIME_CLASS(CGeometryView2D)); - //AddDocTemplate(pDocTemplateForView2d); + pDocTemplateForView3d = new CMultiDocTemplate( + IDR_3DTYPE, + RUNTIME_CLASS(CGeometryDoc), + RUNTIME_CLASS(CChildFrame), // custom MDI child frame + RUNTIME_CLASS(CGeometryView)); + AddDocTemplate(pDocTemplateForView3d); - // create main MDI Frame window - CMainFrame* pMainFrame = new CMainFrame; - if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) - return FALSE; - m_pMainWnd = pMainFrame; + pDocTemplateForView2d = new CMultiDocTemplate( + IDR_2DTYPE, + RUNTIME_CLASS(CGeometryDoc), + RUNTIME_CLASS(CChildFrame2D), // custom MDI child frame + RUNTIME_CLASS(CGeometryView2D)); + //AddDocTemplate(pDocTemplateForView2d); - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); + // create main MDI Frame window + CMainFrame* pMainFrame = new CMainFrame; + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); - // The main window has been initialized, so show and update it. - pMainFrame->ShowWindow(m_nCmdShow); - pMainFrame->UpdateWindow(); + // 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; + return TRUE; } ///////////////////////////////////////////////////////////////////////////// @@ -117,10 +115,10 @@ BOOL CGeometryApp::IsViewExisting(CDocument * pDoc, CRuntimeClass * pViewClass, CView* pCurrentView = pDoc->GetNextView(position); ASSERT_VALID(pCurrentView); if (pCurrentView->IsKindOf(pViewClass)) - { + { pView = pCurrentView; - return TRUE; - } + return TRUE; + } } return FALSE; } diff --git a/samples/mfc/standard/01_Geometry/src/GeometryApp.h b/samples/mfc/standard/01_Geometry/src/GeometryApp.h index 6240bf0ac6..eb98f40266 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryApp.h +++ b/samples/mfc/standard/01_Geometry/src/GeometryApp.h @@ -8,29 +8,29 @@ #pragma once #endif // _MSC_VER >= 1000 -#include <OCC_3dApp.h> +#include <OCC_App.h> #include <GeometryDoc.h> -class CGeometryApp : public OCC_3dApp +class CGeometryApp : public OCC_App { public: - CGeometryApp(); - ~CGeometryApp(); - // ========================================= - CFrameWnd* CreateView2D(CGeometryDoc* pDoc); - // ========================================= - // ========================================= + CGeometryApp(); + ~CGeometryApp(); + // ========================================= + CFrameWnd* CreateView2D(CGeometryDoc* pDoc); + // ========================================= + // ========================================= -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CGeometryApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL + // Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CGeometryApp) +public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL private : - BOOL IsViewExisting(CDocument* pDoc,CRuntimeClass* pViewClass,CView*& pView); - CMultiDocTemplate* pDocTemplateForView3d; - CMultiDocTemplate* pDocTemplateForView2d; + BOOL IsViewExisting(CDocument* pDoc,CRuntimeClass* pViewClass,CView*& pView); + CMultiDocTemplate* pDocTemplateForView3d; + CMultiDocTemplate* pDocTemplateForView2d; }; diff --git a/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp b/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp index 7ed933551a..a5c5e994e6 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp @@ -32,111 +32,111 @@ static char THIS_FILE[] = __FILE__; IMPLEMENT_DYNCREATE(CGeometryDoc, CDocument) BEGIN_MESSAGE_MAP(CGeometryDoc, CDocument) - //{{AFX_MSG_MAP(CGeometryDoc) - ON_COMMAND(ID_WINDOW_NEW2D, OnWindowNew2d) - ON_COMMAND(ID_BUTTON_Test_1, OnBUTTONTest1) - ON_COMMAND(ID_BUTTON_Test_2, OnBUTTONTest2) - ON_COMMAND(ID_BUTTON_Test_3, OnBUTTONTest3) - ON_COMMAND(ID_BUTTON_Test_4, OnBUTTONTest4) - ON_COMMAND(ID_BUTTON_Test_5, OnBUTTONTest5) - ON_COMMAND(ID_BUTTON_Test_6, OnBUTTONTest6) - ON_COMMAND(ID_BUTTON_Test_7, OnBUTTONTest7) - ON_COMMAND(ID_BUTTON_Test_8, OnBUTTONTest8) - ON_COMMAND(ID_BUTTON_Test_9, OnBUTTONTest9) - ON_COMMAND(ID_BUTTON_Test_23, OnBUTTONTest23) - ON_COMMAND(ID_BUTTON_Test_22, OnBUTTONTest22) - ON_COMMAND(ID_BUTTON_Test_10, OnBUTTONTest10) - ON_COMMAND(ID_BUTTON_Test_11, OnBUTTONTest11) - ON_COMMAND(ID_BUTTON_Test_12, OnBUTTONTest12) - ON_COMMAND(ID_BUTTON_Test_13, OnBUTTONTest13) - ON_COMMAND(ID_BUTTON_Test_14, OnBUTTONTest14) - ON_COMMAND(ID_BUTTON_Test_15, OnBUTTONTest15) - ON_COMMAND(ID_BUTTON_Test_16, OnBUTTONTest16) - ON_COMMAND(ID_BUTTON_Test_17, OnBUTTONTest17) - ON_COMMAND(ID_BUTTON_Test_18, OnBUTTONTest18) - ON_COMMAND(ID_BUTTON_Test_19, OnBUTTONTest19) - ON_COMMAND(ID_BUTTON_Test_20, OnBUTTONTest20) - ON_COMMAND(ID_BUTTON_Test_21, OnBUTTONTest21) - ON_COMMAND(ID_BUTTON_Test_24, OnBUTTONTest24) - ON_COMMAND(ID_BUTTON_Test_25, OnBUTTONTest25) - ON_COMMAND(ID_BUTTON_Test_26, OnBUTTONTest26) - ON_COMMAND(ID_BUTTON_Test_27, OnBUTTONTest27) - ON_COMMAND(ID_BUTTON_Test_28, OnBUTTONTest28) - ON_COMMAND(ID_BUTTON_Test_29, OnBUTTONTest29) - ON_COMMAND(ID_BUTTON_Test_30, OnBUTTONTest30) - ON_COMMAND(ID_BUTTON_Test_31, OnBUTTONTest31) - ON_COMMAND(ID_BUTTON_Test_32, OnBUTTONTest32) - ON_COMMAND(ID_BUTTON_Test_33, OnBUTTONTest33) - ON_COMMAND(ID_BUTTON_Test_34, OnBUTTONTest34) - ON_COMMAND(ID_BUTTON_Test_35, OnBUTTONTest35) - ON_COMMAND(ID_BUTTON_Test_36, OnBUTTONTest36) - ON_COMMAND(ID_BUTTON_Test_37, OnBUTTONTest37) - ON_COMMAND(ID_BUTTON_Test_38, OnBUTTONTest38) - ON_COMMAND(ID_BUTTON_Test_39, OnBUTTONTest39) - ON_COMMAND(ID_BUTTON_Test_40, OnBUTTONTest40) - ON_COMMAND(ID_BUTTON_Test_41, OnBUTTONTest41) - ON_COMMAND(ID_BUTTON_Test_42, OnBUTTONTest42) - ON_COMMAND(ID_BUTTON_Test_43, OnBUTTONTest43) - ON_COMMAND(ID_BUTTON_Test_44, OnBUTTONTest44) - ON_COMMAND(ID_BUTTON_Test_45, OnBUTTONTest45) - ON_COMMAND(ID_BUTTON_Test_46, OnBUTTONTest46) - ON_COMMAND(ID_BUTTON_Test_47, OnBUTTONTest47) - ON_COMMAND(ID_BUTTON_Test_48, OnBUTTONTest48) - ON_COMMAND(ID_BUTTON_Test_49, OnBUTTONTest49) - ON_COMMAND(ID_BUTTON_Test_50, OnBUTTONTest50) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_1 , OnUpdateBUTTONTest1 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_2 , OnUpdateBUTTONTest2 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_3 , OnUpdateBUTTONTest3 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_4 , OnUpdateBUTTONTest4 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_5 , OnUpdateBUTTONTest5 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_6 , OnUpdateBUTTONTest6 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_7 , OnUpdateBUTTONTest7 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_8 , OnUpdateBUTTONTest8 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_9 , OnUpdateBUTTONTest9 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_10 , OnUpdateBUTTONTest10 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_11 , OnUpdateBUTTONTest11 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_12 , OnUpdateBUTTONTest12 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_13 , OnUpdateBUTTONTest13 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_14 , OnUpdateBUTTONTest14 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_15 , OnUpdateBUTTONTest15 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_16 , OnUpdateBUTTONTest16 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_17 , OnUpdateBUTTONTest17 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_18 , OnUpdateBUTTONTest18 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_19 , OnUpdateBUTTONTest19 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_20 , OnUpdateBUTTONTest20 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_21 , OnUpdateBUTTONTest21 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_22 , OnUpdateBUTTONTest22 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_23 , OnUpdateBUTTONTest23 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_24 , OnUpdateBUTTONTest24 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_25 , OnUpdateBUTTONTest25 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_26 , OnUpdateBUTTONTest26 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_27 , OnUpdateBUTTONTest27 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_28 , OnUpdateBUTTONTest28 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_29 , OnUpdateBUTTONTest29 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_30 , OnUpdateBUTTONTest30 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_31 , OnUpdateBUTTONTest31 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_32 , OnUpdateBUTTONTest32 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_33 , OnUpdateBUTTONTest33 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_34 , OnUpdateBUTTONTest34 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_35 , OnUpdateBUTTONTest35 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_36 , OnUpdateBUTTONTest36 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_37 , OnUpdateBUTTONTest37 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_38 , OnUpdateBUTTONTest38 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_39 , OnUpdateBUTTONTest39 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_40 , OnUpdateBUTTONTest40 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_41 , OnUpdateBUTTONTest41 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_42 , OnUpdateBUTTONTest42 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_43 , OnUpdateBUTTONTest43 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_44 , OnUpdateBUTTONTest44 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_45 , OnUpdateBUTTONTest45 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_46 , OnUpdateBUTTONTest46 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_47 , OnUpdateBUTTONTest47 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_48 , OnUpdateBUTTONTest48 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_49 , OnUpdateBUTTONTest49 ) - ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_50 , OnUpdateBUTTONTest50 ) - ON_COMMAND(ID_Create_Sol, OnCreateSol) - ON_COMMAND(ID_BUTTON_Simplify, OnSimplify) - //}}AFX_MSG_MAP + //{{AFX_MSG_MAP(CGeometryDoc) + ON_COMMAND(ID_WINDOW_NEW2D, OnWindowNew2d) + ON_COMMAND(ID_BUTTON_Test_1, OnBUTTONTest1) + ON_COMMAND(ID_BUTTON_Test_2, OnBUTTONTest2) + ON_COMMAND(ID_BUTTON_Test_3, OnBUTTONTest3) + ON_COMMAND(ID_BUTTON_Test_4, OnBUTTONTest4) + ON_COMMAND(ID_BUTTON_Test_5, OnBUTTONTest5) + ON_COMMAND(ID_BUTTON_Test_6, OnBUTTONTest6) + ON_COMMAND(ID_BUTTON_Test_7, OnBUTTONTest7) + ON_COMMAND(ID_BUTTON_Test_8, OnBUTTONTest8) + ON_COMMAND(ID_BUTTON_Test_9, OnBUTTONTest9) + ON_COMMAND(ID_BUTTON_Test_23, OnBUTTONTest23) + ON_COMMAND(ID_BUTTON_Test_22, OnBUTTONTest22) + ON_COMMAND(ID_BUTTON_Test_10, OnBUTTONTest10) + ON_COMMAND(ID_BUTTON_Test_11, OnBUTTONTest11) + ON_COMMAND(ID_BUTTON_Test_12, OnBUTTONTest12) + ON_COMMAND(ID_BUTTON_Test_13, OnBUTTONTest13) + ON_COMMAND(ID_BUTTON_Test_14, OnBUTTONTest14) + ON_COMMAND(ID_BUTTON_Test_15, OnBUTTONTest15) + ON_COMMAND(ID_BUTTON_Test_16, OnBUTTONTest16) + ON_COMMAND(ID_BUTTON_Test_17, OnBUTTONTest17) + ON_COMMAND(ID_BUTTON_Test_18, OnBUTTONTest18) + ON_COMMAND(ID_BUTTON_Test_19, OnBUTTONTest19) + ON_COMMAND(ID_BUTTON_Test_20, OnBUTTONTest20) + ON_COMMAND(ID_BUTTON_Test_21, OnBUTTONTest21) + ON_COMMAND(ID_BUTTON_Test_24, OnBUTTONTest24) + ON_COMMAND(ID_BUTTON_Test_25, OnBUTTONTest25) + ON_COMMAND(ID_BUTTON_Test_26, OnBUTTONTest26) + ON_COMMAND(ID_BUTTON_Test_27, OnBUTTONTest27) + ON_COMMAND(ID_BUTTON_Test_28, OnBUTTONTest28) + ON_COMMAND(ID_BUTTON_Test_29, OnBUTTONTest29) + ON_COMMAND(ID_BUTTON_Test_30, OnBUTTONTest30) + ON_COMMAND(ID_BUTTON_Test_31, OnBUTTONTest31) + ON_COMMAND(ID_BUTTON_Test_32, OnBUTTONTest32) + ON_COMMAND(ID_BUTTON_Test_33, OnBUTTONTest33) + ON_COMMAND(ID_BUTTON_Test_34, OnBUTTONTest34) + ON_COMMAND(ID_BUTTON_Test_35, OnBUTTONTest35) + ON_COMMAND(ID_BUTTON_Test_36, OnBUTTONTest36) + ON_COMMAND(ID_BUTTON_Test_37, OnBUTTONTest37) + ON_COMMAND(ID_BUTTON_Test_38, OnBUTTONTest38) + ON_COMMAND(ID_BUTTON_Test_39, OnBUTTONTest39) + ON_COMMAND(ID_BUTTON_Test_40, OnBUTTONTest40) + ON_COMMAND(ID_BUTTON_Test_41, OnBUTTONTest41) + ON_COMMAND(ID_BUTTON_Test_42, OnBUTTONTest42) + ON_COMMAND(ID_BUTTON_Test_43, OnBUTTONTest43) + ON_COMMAND(ID_BUTTON_Test_44, OnBUTTONTest44) + ON_COMMAND(ID_BUTTON_Test_45, OnBUTTONTest45) + ON_COMMAND(ID_BUTTON_Test_46, OnBUTTONTest46) + ON_COMMAND(ID_BUTTON_Test_47, OnBUTTONTest47) + ON_COMMAND(ID_BUTTON_Test_48, OnBUTTONTest48) + ON_COMMAND(ID_BUTTON_Test_49, OnBUTTONTest49) + ON_COMMAND(ID_BUTTON_Test_50, OnBUTTONTest50) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_1 , OnUpdateBUTTONTest1 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_2 , OnUpdateBUTTONTest2 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_3 , OnUpdateBUTTONTest3 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_4 , OnUpdateBUTTONTest4 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_5 , OnUpdateBUTTONTest5 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_6 , OnUpdateBUTTONTest6 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_7 , OnUpdateBUTTONTest7 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_8 , OnUpdateBUTTONTest8 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_9 , OnUpdateBUTTONTest9 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_10 , OnUpdateBUTTONTest10 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_11 , OnUpdateBUTTONTest11 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_12 , OnUpdateBUTTONTest12 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_13 , OnUpdateBUTTONTest13 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_14 , OnUpdateBUTTONTest14 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_15 , OnUpdateBUTTONTest15 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_16 , OnUpdateBUTTONTest16 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_17 , OnUpdateBUTTONTest17 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_18 , OnUpdateBUTTONTest18 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_19 , OnUpdateBUTTONTest19 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_20 , OnUpdateBUTTONTest20 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_21 , OnUpdateBUTTONTest21 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_22 , OnUpdateBUTTONTest22 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_23 , OnUpdateBUTTONTest23 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_24 , OnUpdateBUTTONTest24 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_25 , OnUpdateBUTTONTest25 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_26 , OnUpdateBUTTONTest26 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_27 , OnUpdateBUTTONTest27 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_28 , OnUpdateBUTTONTest28 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_29 , OnUpdateBUTTONTest29 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_30 , OnUpdateBUTTONTest30 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_31 , OnUpdateBUTTONTest31 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_32 , OnUpdateBUTTONTest32 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_33 , OnUpdateBUTTONTest33 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_34 , OnUpdateBUTTONTest34 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_35 , OnUpdateBUTTONTest35 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_36 , OnUpdateBUTTONTest36 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_37 , OnUpdateBUTTONTest37 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_38 , OnUpdateBUTTONTest38 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_39 , OnUpdateBUTTONTest39 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_40 , OnUpdateBUTTONTest40 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_41 , OnUpdateBUTTONTest41 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_42 , OnUpdateBUTTONTest42 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_43 , OnUpdateBUTTONTest43 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_44 , OnUpdateBUTTONTest44 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_45 , OnUpdateBUTTONTest45 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_46 , OnUpdateBUTTONTest46 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_47 , OnUpdateBUTTONTest47 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_48 , OnUpdateBUTTONTest48 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_49 , OnUpdateBUTTONTest49 ) + ON_UPDATE_COMMAND_UI(ID_BUTTON_Test_50 , OnUpdateBUTTONTest50 ) + ON_COMMAND(ID_Create_Sol, OnCreateSol) + ON_COMMAND(ID_BUTTON_Simplify, OnSimplify) + //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// @@ -144,43 +144,44 @@ END_MESSAGE_MAP() CGeometryDoc::CGeometryDoc() { - FitMode = false; + FitMode = false; + AfxInitRichEdit(); - AfxInitRichEdit(); + // TODO: add one-time construction code here + Handle(Graphic3d_GraphicDriver) aGraphicDriver = + ((CGeometryApp*)AfxGetApp())->GetGraphicDriver(); - // TODO: add one-time construction code here - Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice = - ((CGeometryApp*)AfxGetApp())->GetGraphicDevice(); + TCollection_ExtendedString a3DName("Visu3D"); + myViewer = new V3d_Viewer(aGraphicDriver,a3DName.ToExtString()); + myViewer->SetDefaultLights(); + myViewer->SetLightOn(); - TCollection_ExtendedString a3DName("Visu3D"); - myViewer = new V3d_Viewer(theGraphicDevice,a3DName.ToExtString()); - myViewer->SetDefaultLights(); - myViewer->SetLightOn(); + myAISContext =new AIS_InteractiveContext(myViewer); + myAISContext->DefaultDrawer()->UIsoAspect()->SetNumber(11); + myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber(11); - myAISContext =new AIS_InteractiveContext(myViewer); - myAISContext->DefaultDrawer()->UIsoAspect()->SetNumber(11); - myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber(11); + TCollection_ExtendedString a2DName("Visu2D"); + myViewer2D = new V3d_Viewer(aGraphicDriver,a2DName.ToExtString()); + myViewer2D->SetCircularGridValues(0,0,1,8,0); + myViewer2D->SetRectangularGridValues(0,0,1,1,0); + //set view projection + myViewer2D->SetDefaultViewProj(V3d_Zpos); + myAISContext2D = new AIS_InteractiveContext(myViewer2D); + myCResultDialog.Create(CResultDialog::IDD,NULL); - TCollection_ExtendedString a2DName("Visu2D"); - myViewer2D = new V2d_Viewer(theGraphicDevice,a2DName.ToExtString()); - myViewer2D->SetCircularGridValues(0,0,1,8,0); - myViewer2D->SetRectangularGridValues(0,0,1,1,0); - myISessionContext= new ISession2D_InteractiveContext(myViewer2D); - myCResultDialog.Create(CResultDialog::IDD,NULL); + RECT dlgrect; + myCResultDialog.GetWindowRect(&dlgrect); + LONG width = dlgrect.right-dlgrect.left; + LONG height = dlgrect.bottom-dlgrect.top; + RECT MainWndRect; + AfxGetApp()->m_pMainWnd->GetWindowRect(&MainWndRect); + LONG left = MainWndRect.left+3; + LONG top = MainWndRect.top + 138; + myCResultDialog.MoveWindow(left,top,width,height); - RECT dlgrect; - myCResultDialog.GetWindowRect(&dlgrect); - LONG width = dlgrect.right-dlgrect.left; - LONG height = dlgrect.bottom-dlgrect.top; - RECT MainWndRect; - AfxGetApp()->m_pMainWnd->GetWindowRect(&MainWndRect); - LONG left = MainWndRect.left+3; - LONG top = MainWndRect.top + 138; - myCResultDialog.MoveWindow(left,top,width,height); - - ((CGeometryApp*)AfxGetApp())->CreateView2D(this); - Minimize2D(); - Put3DOnTop(); + ((CGeometryApp*)AfxGetApp())->CreateView2D(this); + Minimize2D(); + Put3DOnTop(); } CGeometryDoc::~CGeometryDoc() @@ -189,22 +190,21 @@ CGeometryDoc::~CGeometryDoc() BOOL CGeometryDoc::OnNewDocument() { - if (!CDocument::OnNewDocument()) - return FALSE; - - // TODO: add reinitialization code here - // (SDI documents will reuse this document) - // compute a graphic device --> the same for all Views + if (!CDocument::OnNewDocument()) + return FALSE; - return TRUE; + // TODO: add reinitialization code here + // (SDI documents will reuse this document) + // compute a graphic device --> the same for all Views + + return TRUE; } void CGeometryDoc::OnWindowNew2d() { - - ((CGeometryApp*)AfxGetApp())->CreateView2D(this); + ((CGeometryApp*)AfxGetApp())->CreateView2D(this); } ///////////////////////////////////////////////////////////////////////////// @@ -212,14 +212,14 @@ void CGeometryDoc::OnWindowNew2d() void CGeometryDoc::Serialize(CArchive& ar) { - if (ar.IsStoring()) - { - // TODO: add storing code here - } - else - { - // TODO: add loading code here - } + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } } ///////////////////////////////////////////////////////////////////////////// @@ -228,12 +228,12 @@ void CGeometryDoc::Serialize(CArchive& ar) #ifdef _DEBUG void CGeometryDoc::AssertValid() const { - CDocument::AssertValid(); + CDocument::AssertValid(); } void CGeometryDoc::Dump(CDumpContext& dc) const { - CDocument::Dump(dc); + CDocument::Dump(dc); } #endif //_DEBUG @@ -244,9 +244,9 @@ void CGeometryDoc::Dump(CDumpContext& dc) const // //----------------------------------------------------------------------------------------- void CGeometryDoc::DragEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState , - const Handle(V2d_View)& aView ) + const Standard_Integer y , + const Standard_Integer TheState , + const Handle(V3d_View)& aView ) { } @@ -255,38 +255,45 @@ void CGeometryDoc::DragEvent2D(const Standard_Integer x , // //----------------------------------------------------------------------------------------- void CGeometryDoc::InputEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Handle(V2d_View)& aView ) + const Standard_Integer y , + const Handle(V3d_View)& aView ) { - myISessionContext->Pick(aView,x,y); + myAISContext2D->Select(Standard_True); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryDoc::MoveEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Handle(V2d_View)& aView ) +void CGeometryDoc::MoveEvent2D(const Standard_Integer x, + const Standard_Integer y, + const Handle(V3d_View)& aView) { - myISessionContext->Move(aView,x,y); + if(aView->Viewer()->Grid()->IsActive()) + { + Quantity_Length aGridX=0,aGridY=0,aGridZ=0; + aView->ConvertToGrid(x,y,aGridX,aGridY,aGridZ); + //View is not updated automatically in ConvertToGrid + aView->Update(); + } + this->myAISContext2D->MoveTo(x, y, aView); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryDoc::ShiftMoveEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Handle(V2d_View)& aView ) +void CGeometryDoc::ShiftMoveEvent2D(const Standard_Integer x, + const Standard_Integer y , + const Handle(V3d_View)& aView) { } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryDoc::ShiftDragEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState , - const Handle(V2d_View)& aView ) +void CGeometryDoc::ShiftDragEvent2D(const Standard_Integer x, + const Standard_Integer y, + const Standard_Integer TheState, + const Handle(V3d_View)& aView) { } @@ -294,9 +301,9 @@ void CGeometryDoc::ShiftDragEvent2D(const Standard_Integer x , //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryDoc::ShiftInputEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Handle(V2d_View)& aView ) +void CGeometryDoc::ShiftInputEvent2D(const Standard_Integer x, + const Standard_Integer y, + const Handle(V3d_View)& aView) { } @@ -304,25 +311,23 @@ void CGeometryDoc::ShiftInputEvent2D(const Standard_Integer x , // //----------------------------------------------------------------------------------------- void CGeometryDoc::Popup2D(const Standard_Integer x, - const Standard_Integer y , - const Handle(V2d_View)& aView ) + const Standard_Integer y , + const Handle(V3d_View)& aView) { - - CMenu menu; - VERIFY(menu.LoadMenu(IDR_Popup3D)); - CMenu* pPopup; - - pPopup = menu.GetSubMenu(0); - - ASSERT(pPopup != NULL); - - POINT winCoord = { x , y }; - Handle(WNT_Window) aWNTWindow= - Handle(WNT_Window)::DownCast(aView->Driver()->Window()); - ClientToScreen ( (HWND)(aWNTWindow->HWindow()),&winCoord); - pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON , winCoord.x, winCoord.y , - AfxGetMainWnd()); - + CMenu menu; + VERIFY(menu.LoadMenu(IDR_Popup3D)); + CMenu* pPopup; + + pPopup = menu.GetSubMenu(0); + + ASSERT(pPopup != NULL); + + 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 CGeometryDoc::Put2DOnTop(bool isMax) @@ -331,17 +336,20 @@ void CGeometryDoc::Put2DOnTop(bool isMax) while (position != (POSITION)NULL) { CView* pCurrentView = (CView*)GetNextView(position); - if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView2D ) ) ) + if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView2D ) ) ) { - ASSERT_VALID(pCurrentView); - CFrameWnd* pParentFrm = pCurrentView->GetParentFrame(); - ASSERT(pParentFrm != (CFrameWnd *)NULL); - // simply make the frame window visible - if(isMax) { - pParentFrm->ActivateFrame(SW_SHOWMAXIMIZED); - } else { - pParentFrm->ActivateFrame(SW_SHOW); - } + ASSERT_VALID(pCurrentView); + CFrameWnd* pParentFrm = pCurrentView->GetParentFrame(); + ASSERT(pParentFrm != (CFrameWnd *)NULL); + // simply make the frame window visible + if(isMax) + { + pParentFrm->ActivateFrame(SW_SHOWMAXIMIZED); + } + else + { + pParentFrm->ActivateFrame(SW_SHOW); + } } } } @@ -352,16 +360,15 @@ void CGeometryDoc::Minimize2D() while (position != (POSITION)NULL) { CView* pCurrentView = (CView*)GetNextView(position); - if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView2D ) ) ) + if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView2D ) ) ) { - ASSERT_VALID(pCurrentView); - CFrameWnd* pParentFrm = pCurrentView->GetParentFrame(); - ASSERT(pParentFrm != (CFrameWnd *)NULL); - // simply make the frame window visible - pParentFrm->ActivateFrame(SW_HIDE); + ASSERT_VALID(pCurrentView); + CFrameWnd* pParentFrm = pCurrentView->GetParentFrame(); + ASSERT(pParentFrm != (CFrameWnd *)NULL); + // simply make the frame window visible + pParentFrm->ActivateFrame(SW_HIDE); } } - } void CGeometryDoc::Fit2DViews() @@ -370,14 +377,13 @@ void CGeometryDoc::Fit2DViews() while (position != (POSITION)NULL) { CView* pCurrentView = (CView*)GetNextView(position); - if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView2D ) ) ) + if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView2D ) ) ) { - ASSERT_VALID(pCurrentView); - CGeometryView2D* aCGeometryView2D = (CGeometryView2D*)pCurrentView; - aCGeometryView2D->FitAll(); + ASSERT_VALID(pCurrentView); + CGeometryView2D* aCGeometryView2D = (CGeometryView2D*)pCurrentView; + aCGeometryView2D->FitAll(); } } - } void CGeometryDoc::Put3DOnTop(bool isMax) { @@ -385,555 +391,702 @@ void CGeometryDoc::Put3DOnTop(bool isMax) while (position != (POSITION)NULL) { CView* pCurrentView = (CView*)GetNextView(position); - if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView ) ) ) + if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView ) ) ) { - ASSERT_VALID(pCurrentView); - CFrameWnd* pParentFrm = pCurrentView->GetParentFrame(); - ASSERT(pParentFrm != (CFrameWnd *)NULL); - // simply make the frame window visible - if(isMax) { - pParentFrm->ActivateFrame(SW_SHOWMAXIMIZED); - } else { - pParentFrm->ActivateFrame(SW_SHOW); - } + ASSERT_VALID(pCurrentView); + CFrameWnd* pParentFrm = pCurrentView->GetParentFrame(); + ASSERT(pParentFrm != (CFrameWnd *)NULL); + // simply make the frame window visible + if(isMax) + { + pParentFrm->ActivateFrame(SW_SHOWMAXIMIZED); + } + else + { + pParentFrm->ActivateFrame(SW_SHOW); + } } } } + void CGeometryDoc::Minimize3D() { POSITION position = GetFirstViewPosition(); while (position != (POSITION)NULL) { CView* pCurrentView = (CView*)GetNextView(position); - if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView ) ) ) + if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView ) ) ) { - ASSERT_VALID(pCurrentView); - CFrameWnd* pParentFrm = pCurrentView->GetParentFrame(); - ASSERT(pParentFrm != (CFrameWnd *)NULL); - // simply make the frame window visible - pParentFrm->ActivateFrame(SW_HIDE); + ASSERT_VALID(pCurrentView); + CFrameWnd* pParentFrm = pCurrentView->GetParentFrame(); + ASSERT(pParentFrm != (CFrameWnd *)NULL); + // simply make the frame window visible + pParentFrm->ActivateFrame(SW_HIDE); } } - } - void CGeometryDoc::Fit3DViews(Quantity_Coefficient Coef) { POSITION position = GetFirstViewPosition(); while (position != (POSITION)NULL) { CView* pCurrentView = (CView*)GetNextView(position); - if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView ) ) ) + if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView ) ) ) { - ASSERT_VALID(pCurrentView); - CGeometryView* aCGeometryView = (CGeometryView*)pCurrentView; - aCGeometryView->FitAll(Coef); + ASSERT_VALID(pCurrentView); + CGeometryView* aCGeometryView = (CGeometryView*)pCurrentView; + aCGeometryView->FitAll(Coef); } } - } -void CGeometryDoc::Set3DViewsZoom(const Quantity_Factor& Coef ) + +void CGeometryDoc::Set3DViewsZoom(const Quantity_Factor& Coef) { POSITION position = GetFirstViewPosition(); while (position != (POSITION)NULL) { CView* pCurrentView = (CView*)GetNextView(position); - if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView ) ) ) + if(pCurrentView->IsKindOf( RUNTIME_CLASS( CGeometryView ) ) ) { - ASSERT_VALID(pCurrentView); - CGeometryView* aCGeometryView = (CGeometryView*)pCurrentView; - aCGeometryView->SetZoom( Coef ); + ASSERT_VALID(pCurrentView); + CGeometryView* aCGeometryView = (CGeometryView*)pCurrentView; + aCGeometryView->SetZoom( Coef ); } } - } void CGeometryDoc::OnBUTTONTest1() { Current = 1; - GeomSources::gpTest1(this); } +GeomSources::gpTest1(this); } void CGeometryDoc::OnBUTTONTest2() { Current = 2; - GeomSources::gpTest2(this); } +GeomSources::gpTest2(this); } void CGeometryDoc::OnBUTTONTest3() { Current = 3; - GeomSources::gpTest3(this); } +GeomSources::gpTest3(this); } void CGeometryDoc::OnBUTTONTest4() { Current = 4; - GeomSources::gpTest4(this); } +GeomSources::gpTest4(this); } void CGeometryDoc::OnBUTTONTest5() { Current = 5; - GeomSources::gpTest5(this); } +GeomSources::gpTest5(this); } void CGeometryDoc::OnBUTTONTest6() { Current = 6; - GeomSources::gpTest6(this); } +GeomSources::gpTest6(this); } void CGeometryDoc::OnBUTTONTest7() { Current = 7; - GeomSources::gpTest7(this); } +GeomSources::gpTest7(this); } void CGeometryDoc::OnBUTTONTest8() { Current = 8; - GeomSources::gpTest8(this); } +GeomSources::gpTest8(this); } void CGeometryDoc::OnBUTTONTest9() { Current = 9; - GeomSources::gpTest9(this); } +GeomSources::gpTest9(this); } void CGeometryDoc::OnBUTTONTest10() { Current = 10; - GeomSources::gpTest10(this); } +GeomSources::gpTest10(this); } void CGeometryDoc::OnBUTTONTest11() { Current = 11; - GeomSources::gpTest11(this); } +GeomSources::gpTest11(this); } void CGeometryDoc::OnBUTTONTest12() { Current = 12; - GeomSources::gpTest12(this); } +GeomSources::gpTest12(this); } void CGeometryDoc::OnBUTTONTest13() { Current = 13; - GeomSources::gpTest13(this); } +GeomSources::gpTest13(this); } void CGeometryDoc::OnBUTTONTest14() { Current = 14; - GeomSources::gpTest14(this); } +GeomSources::gpTest14(this); } void CGeometryDoc::OnBUTTONTest15() { Current = 15; - GeomSources::gpTest15(this); } +GeomSources::gpTest15(this); } void CGeometryDoc::OnBUTTONTest16() { Current = 16; - GeomSources::gpTest16(this); } +GeomSources::gpTest16(this); } void CGeometryDoc::OnBUTTONTest17() { Current = 17; - GeomSources::gpTest17(this); } +GeomSources::gpTest17(this); } void CGeometryDoc::OnBUTTONTest18() { Current = 18; - GeomSources::gpTest18(this); } +GeomSources::gpTest18(this); } void CGeometryDoc::OnBUTTONTest19() { Current = 19; - GeomSources::gpTest19(this); } +GeomSources::gpTest19(this); } void CGeometryDoc::OnBUTTONTest20() { Current = 20; - GeomSources::gpTest20(this); } +GeomSources::gpTest20(this); } void CGeometryDoc::OnBUTTONTest21() { Current = 21; - GeomSources::gpTest21(this); } +GeomSources::gpTest21(this); } void CGeometryDoc::OnBUTTONTest22() { Current = 22; - GeomSources::gpTest22(this); } +GeomSources::gpTest22(this); } void CGeometryDoc::OnBUTTONTest23() { Current = 23; - GeomSources::gpTest23(this); } +GeomSources::gpTest23(this); } void CGeometryDoc::OnBUTTONTest24() { Current = 24; - GeomSources::gpTest24(this); } +GeomSources::gpTest24(this); } void CGeometryDoc::OnBUTTONTest25() { Current = 25; - GeomSources::gpTest25(this); } +GeomSources::gpTest25(this); } void CGeometryDoc::OnBUTTONTest26() { Current = 26; - GeomSources::gpTest26(this); } +GeomSources::gpTest26(this); } void CGeometryDoc::OnBUTTONTest27() { Current = 27; - GeomSources::gpTest27(this); } +GeomSources::gpTest27(this); } void CGeometryDoc::OnBUTTONTest28() { Current = 28; - GeomSources::gpTest28(this); } +GeomSources::gpTest28(this); } void CGeometryDoc::OnBUTTONTest29() { Current = 29; - GeomSources::gpTest29(this); } +GeomSources::gpTest29(this); } void CGeometryDoc::OnBUTTONTest30() { Current = 30; - GeomSources::gpTest30(this); } +GeomSources::gpTest30(this); } void CGeometryDoc::OnBUTTONTest31() { Current = 31; - GeomSources::gpTest31(this); } +GeomSources::gpTest31(this); } void CGeometryDoc::OnBUTTONTest32() { Current = 32; - GeomSources::gpTest32(this); } +GeomSources::gpTest32(this); } void CGeometryDoc::OnBUTTONTest33() { Current = 33; - GeomSources::gpTest33(this); } +GeomSources::gpTest33(this); } void CGeometryDoc::OnBUTTONTest34() { Current = 34; - GeomSources::gpTest34(this); } +GeomSources::gpTest34(this); } void CGeometryDoc::OnBUTTONTest35() { Current = 35; - GeomSources::gpTest35(this); } +GeomSources::gpTest35(this); } void CGeometryDoc::OnBUTTONTest36() { Current = 36; - GeomSources::gpTest36(this); } +GeomSources::gpTest36(this); } void CGeometryDoc::OnBUTTONTest37() { Current = 37; - GeomSources::gpTest37(this); } +GeomSources::gpTest37(this); } void CGeometryDoc::OnBUTTONTest38() { Current = 38; - GeomSources::gpTest38(this); } +GeomSources::gpTest38(this); } void CGeometryDoc::OnBUTTONTest39() { Current = 39; - GeomSources::gpTest39(this); } +GeomSources::gpTest39(this); } void CGeometryDoc::OnBUTTONTest40() { Current = 40; - GeomSources::gpTest40(this); } +GeomSources::gpTest40(this); } void CGeometryDoc::OnBUTTONTest41() { Current = 41; - GeomSources::gpTest41(this); } +GeomSources::gpTest41(this); } void CGeometryDoc::OnBUTTONTest42() { Current = 42; - GeomSources::gpTest42(this); } +GeomSources::gpTest42(this); } void CGeometryDoc::OnBUTTONTest43() { Current = 43; - GeomSources::gpTest43(this); } +GeomSources::gpTest43(this); } void CGeometryDoc::OnBUTTONTest44() { Current = 44; - GeomSources::gpTest44(this); } +GeomSources::gpTest44(this); } void CGeometryDoc::OnBUTTONTest45() { Current = 45; - GeomSources::gpTest45(this); } +GeomSources::gpTest45(this); } void CGeometryDoc::OnBUTTONTest46() { Current = 46; - GeomSources::gpTest46(this); } +GeomSources::gpTest46(this); } void CGeometryDoc::OnBUTTONTest47() { Current = 47; - GeomSources::gpTest47(this); } +GeomSources::gpTest47(this); } void CGeometryDoc::OnBUTTONTest48() { Current = 48; - GeomSources::gpTest48(this); } +GeomSources::gpTest48(this); } void CGeometryDoc::OnBUTTONTest49() { Current = 49; - GeomSources::gpTest49(this); } +GeomSources::gpTest49(this); } void CGeometryDoc::OnBUTTONTest50() { Current = 50; - GeomSources::gpTest50(this); } +GeomSources::gpTest50(this); } void CGeometryDoc::OnUpdateBUTTONTest1(CCmdUI* pCmdUI) -{ if (Current == 1) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 1) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } void CGeometryDoc::OnUpdateBUTTONTest2(CCmdUI* pCmdUI) -{ if (Current == 2) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 2) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } void CGeometryDoc::OnUpdateBUTTONTest3(CCmdUI* pCmdUI) -{ if (Current == 3) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 3) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } void CGeometryDoc::OnUpdateBUTTONTest4(CCmdUI* pCmdUI) -{ if (Current == 4) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 4) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } void CGeometryDoc::OnUpdateBUTTONTest5(CCmdUI* pCmdUI) -{ if (Current == 5) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 5) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } void CGeometryDoc::OnUpdateBUTTONTest6(CCmdUI* pCmdUI) -{ if (Current == 6) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 6) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } void CGeometryDoc::OnUpdateBUTTONTest7(CCmdUI* pCmdUI) -{ if (Current == 7) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 7) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } void CGeometryDoc::OnUpdateBUTTONTest8(CCmdUI* pCmdUI) -{ if (Current == 8) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 8) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } void CGeometryDoc::OnUpdateBUTTONTest9(CCmdUI* pCmdUI) -{ if (Current == 9) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 9) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } void CGeometryDoc::OnUpdateBUTTONTest10(CCmdUI* pCmdUI) -{ if (Current == 10) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 10) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } void CGeometryDoc::OnUpdateBUTTONTest11(CCmdUI* pCmdUI) -{ if (Current == 11) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 11) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } void CGeometryDoc::OnUpdateBUTTONTest12(CCmdUI* pCmdUI) -{ if (Current == 12) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 12) + pCmdUI->SetCheck(true); + else pCmdUI->SetCheck(false); } void CGeometryDoc::OnUpdateBUTTONTest13(CCmdUI* pCmdUI) -{ if (Current == 13) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 13) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } void CGeometryDoc::OnUpdateBUTTONTest14(CCmdUI* pCmdUI) -{ if (Current == 14) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +{ + if (Current == 14) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest15(CCmdUI* pCmdUI) -{ if (Current == 15) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest15(CCmdUI* pCmdUI) +{ + if(Current == 15) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest16(CCmdUI* pCmdUI) -{ if (Current == 16) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest16(CCmdUI* pCmdUI) +{ + if (Current == 16) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest17(CCmdUI* pCmdUI) -{ if (Current == 17) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest17(CCmdUI* pCmdUI) +{ + if (Current == 17) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest18(CCmdUI* pCmdUI) -{ if (Current == 18) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest18(CCmdUI* pCmdUI) +{ + if (Current == 18) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest19(CCmdUI* pCmdUI) -{ if (Current == 19) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest19(CCmdUI* pCmdUI) +{ + if (Current == 19) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest20(CCmdUI* pCmdUI) -{ if (Current == 20) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest20(CCmdUI* pCmdUI) +{ + if (Current == 20) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest21(CCmdUI* pCmdUI) -{ if (Current == 21) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest21(CCmdUI* pCmdUI) +{ + if (Current == 21) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest22(CCmdUI* pCmdUI) -{ if (Current == 22) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest22(CCmdUI* pCmdUI) +{ + if (Current == 22) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest23(CCmdUI* pCmdUI) -{ if (Current == 23) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest23(CCmdUI* pCmdUI) +{ + if (Current == 23) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest24(CCmdUI* pCmdUI) -{ if (Current == 24) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest24(CCmdUI* pCmdUI) +{ + if (Current == 24) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest25(CCmdUI* pCmdUI) -{ if (Current == 25) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest25(CCmdUI* pCmdUI) +{ + if (Current == 25) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest26(CCmdUI* pCmdUI) -{ if (Current == 26) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest26(CCmdUI* pCmdUI) +{ + if (Current == 26) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest27(CCmdUI* pCmdUI) -{ if (Current == 27) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest27(CCmdUI* pCmdUI) +{ + if (Current == 27) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest28(CCmdUI* pCmdUI) -{ if (Current == 28) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest28(CCmdUI* pCmdUI) +{ + if (Current == 28) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest29(CCmdUI* pCmdUI) -{ if (Current == 29) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest29(CCmdUI* pCmdUI) +{ + if (Current == 29) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest30(CCmdUI* pCmdUI) -{ if (Current == 30) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest30(CCmdUI* pCmdUI) +{ + if (Current == 30) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest31(CCmdUI* pCmdUI) -{ if (Current == 31) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest31(CCmdUI* pCmdUI) +{ + if (Current == 31) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest32(CCmdUI* pCmdUI) -{ if (Current == 32) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest32(CCmdUI* pCmdUI) +{ + if (Current == 32) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest33(CCmdUI* pCmdUI) -{ if (Current == 33) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest33(CCmdUI* pCmdUI) +{ + if (Current == 33) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest34(CCmdUI* pCmdUI) -{ if (Current == 34) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest34(CCmdUI* pCmdUI) +{ + if (Current == 34) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest35(CCmdUI* pCmdUI) -{ if (Current == 35) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest35(CCmdUI* pCmdUI) +{ + if (Current == 35) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest36(CCmdUI* pCmdUI) -{ if (Current == 36) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest36(CCmdUI* pCmdUI) +{ + if (Current == 36) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest37(CCmdUI* pCmdUI) -{ if (Current == 37) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest37(CCmdUI* pCmdUI) +{ + if (Current == 37) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest38(CCmdUI* pCmdUI) -{ if (Current == 38) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest38(CCmdUI* pCmdUI) +{ + if (Current == 38) + pCmdUI->SetCheck(true); +else +pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest39(CCmdUI* pCmdUI) -{ if (Current == 39) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest39(CCmdUI* pCmdUI) +{ + if (Current == 39) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest40(CCmdUI* pCmdUI) -{ if (Current == 40) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest40(CCmdUI* pCmdUI) +{ + if (Current == 40) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest41(CCmdUI* pCmdUI) -{ if (Current == 41) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest41(CCmdUI* pCmdUI) +{ + if (Current == 41) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest42(CCmdUI* pCmdUI) -{ if (Current == 42) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest42(CCmdUI* pCmdUI) +{ + if (Current == 42) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest43(CCmdUI* pCmdUI) -{ if (Current == 43) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest43(CCmdUI* pCmdUI) +{ + if (Current == 43) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest44(CCmdUI* pCmdUI) -{ if (Current == 44) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest44(CCmdUI* pCmdUI) +{ + if (Current == 44) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest45(CCmdUI* pCmdUI) -{ if (Current == 45) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest45(CCmdUI* pCmdUI) +{ + if (Current == 45) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest46(CCmdUI* pCmdUI) -{ if (Current == 46) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest46(CCmdUI* pCmdUI) +{ + if (Current == 46) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest47(CCmdUI* pCmdUI) -{ if (Current == 47) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest47(CCmdUI* pCmdUI) +{ + if (Current == 47) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest48(CCmdUI* pCmdUI) -{ if (Current == 48) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest48(CCmdUI* pCmdUI) +{ + if (Current == 48) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest49(CCmdUI* pCmdUI) -{ if (Current == 49) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest49(CCmdUI* pCmdUI) +{ + if (Current == 49) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } -void CGeometryDoc::OnUpdateBUTTONTest50(CCmdUI* pCmdUI) -{ if (Current == 50) pCmdUI->SetCheck(true); - else pCmdUI->SetCheck(false); +void CGeometryDoc::OnUpdateBUTTONTest50(CCmdUI* pCmdUI) +{ + if (Current == 50) + pCmdUI->SetCheck(true); + else + pCmdUI->SetCheck(false); } - - - - void CGeometryDoc::OnCloseDocument() { - // TODO: Add your specialized code here and/or call the base class - - CDocument::OnCloseDocument(); + // TODO: Add your specialized code here and/or call the base class + CDocument::OnCloseDocument(); } void CGeometryDoc::Fit() { - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - OCC_3dView *pView = (OCC_3dView *) pChild->GetActiveView(); - pView->FitAll(); + CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; + CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); + OCC_3dView *pView = (OCC_3dView *) pChild->GetActiveView(); + pView->FitAll(); } void CGeometryDoc::OnCreateSol() { - // TODO: Add your command handler code here - // Creation d'un sol - CFileDialog dlg(TRUE, - NULL, - NULL, - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - "Points Files (*.dat)|*.dat; |All Files (*.*)|*.*||", - NULL ); + // TODO: Add your command handler code here + // Creation d'un sol + CFileDialog dlg(TRUE, + NULL, + NULL, + OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, + "Points Files (*.dat)|*.dat; |All Files (*.*)|*.*||", + NULL ); - CString initdir(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir()); - initdir += "\\Data\\SurfaceFromPoints"; + CString initdir(((OCC_App*) AfxGetApp())->GetInitDataDir()); + initdir += "\\Data\\SurfaceFromPoints"; - dlg.m_ofn.lpstrInitialDir = initdir; + dlg.m_ofn.lpstrInitialDir = initdir; - if (dlg.DoModal() == IDOK) - { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - CString filename = dlg.GetPathName(); + if (dlg.DoModal() == IDOK) + { + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); + CString filename = dlg.GetPathName(); - filebuf fic; - istream in(&fic); - if (!fic.open((Standard_CString)(LPCTSTR)filename,ios::in)) - MessageBox(AfxGetApp()->m_pMainWnd->m_hWnd,"Error : Unable to open file","CasCade Error",MB_ICONERROR); - TColgp_SequenceOfXYZ seqOfXYZ; - gp_XYZ pntXYZ; - Standard_Integer nbPnt=0; - Standard_Real x,y,z; - BRep_Builder B; - TopoDS_Compound C; - B.MakeCompound(C); - while (!in.fail()|| !in.eof()){ - if (in >> x && in >> y && in >> z){ - pntXYZ.SetX(x); - pntXYZ.SetY(y); - pntXYZ.SetZ(z); - nbPnt++; - seqOfXYZ.Append(pntXYZ); - BRepBuilderAPI_MakeVertex V(gp_Pnt(x, y, z)); - B.Add(C,V.Vertex()); - } - } - fic.close(); - Handle(AIS_Shape) anAISCompound = new AIS_Shape(C); - myAISContext->Display(anAISCompound, Standard_False); - Fit(); - Sleep(1000); - GeoAlgo_Sol sol; - sol.Build(seqOfXYZ); - - if (sol.IsDone() == Standard_True){ - Handle(Geom_BSplineSurface) GeomSol = sol.Surface(); - TopoDS_Face aface = BRepBuilderAPI_MakeFace(GeomSol, Precision::Confusion()); - if (!BRepAlgo::IsValid(aface)) - MessageBox(AfxGetApp()->m_pMainWnd->m_hWnd,"Error : The plate surface is not valid!","CasCade Error",MB_ICONERROR); - Handle_AIS_Shape anAISShape=new AIS_Shape(aface); - myAISContext->Display(anAISShape, Standard_False); - Fit(); - } - else - MessageBox(AfxGetApp()->m_pMainWnd->m_hWnd,"Error : Computation has failed","CasCade Error",MB_ICONERROR); - } + filebuf fic; + istream in(&fic); + if (!fic.open((Standard_CString)(LPCTSTR)filename,ios::in)) + MessageBox(AfxGetApp()->m_pMainWnd->m_hWnd,"Error : Unable to open file","CasCade Error",MB_ICONERROR); + TColgp_SequenceOfXYZ seqOfXYZ; + gp_XYZ pntXYZ; + Standard_Integer nbPnt=0; + Standard_Real x,y,z; + BRep_Builder B; + TopoDS_Compound C; + B.MakeCompound(C); + while (!in.fail()|| !in.eof()) + { + if (in >> x && in >> y && in >> z){ + pntXYZ.SetX(x); + pntXYZ.SetY(y); + pntXYZ.SetZ(z); + nbPnt++; + seqOfXYZ.Append(pntXYZ); + BRepBuilderAPI_MakeVertex V(gp_Pnt(x, y, z)); + B.Add(C,V.Vertex()); + } + } + fic.close(); + Handle(AIS_Shape) anAISCompound = new AIS_Shape(C); + myAISContext->Display(anAISCompound, Standard_False); + Fit(); + Sleep(1000); + GeoAlgo_Sol sol; + sol.Build(seqOfXYZ); + + if (sol.IsDone() == Standard_True) + { + Handle(Geom_BSplineSurface) GeomSol = sol.Surface(); + TopoDS_Face aface = BRepBuilderAPI_MakeFace(GeomSol, Precision::Confusion()); + if (!BRepAlgo::IsValid(aface)) + MessageBox(AfxGetApp()->m_pMainWnd->m_hWnd,"Error : The plate surface is not valid!","CasCade Error",MB_ICONERROR); + Handle_AIS_Shape anAISShape=new AIS_Shape(aface); + myAISContext->Display(anAISShape, Standard_False); + Fit(); + } + else + MessageBox(AfxGetApp()->m_pMainWnd->m_hWnd,"Error : Computation has failed","CasCade Error",MB_ICONERROR); + } } /********************************************************************************************* @@ -964,7 +1117,7 @@ static Standard_Boolean fixParam(Standard_Real& theParam) void CGeometryDoc::OnSimplify() { - CString initfile(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir()); + CString initfile(((OCC_App*) AfxGetApp())->GetInitDataDir()); initfile += "\\..\\..\\Data\\"; initfile += "shell1.brep"; @@ -972,9 +1125,6 @@ void CGeometryDoc::OnSimplify() TopoDS_Shape aShape; BRep_Builder aBld; - //Standard_Boolean isRead = BRepTools::Read (aShape, aPath.ToCString(), aBld); - //if (!isRead) -// isRead = BRepTools::Read (aShape, bPath.ToCString(), aBld); Standard_Boolean isRead = BRepTools::Read (aShape, Path.ToCString(), aBld); if (!isRead) { @@ -982,9 +1132,7 @@ void CGeometryDoc::OnSimplify() myCResultDialog.SetText((CString)Path.ToCString()); return; } - myAISContext->SetDisplayMode(AIS_Shaded); - simplify(aShape); } @@ -1150,178 +1298,178 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape) " if (aFixedFace.IsNull()) " EOL " return;" EOL); - // define parameter triangulation - Standard_Real aDeflection = 0.1; - - // removes all the triangulations of the faces , - //and all the polygons on the triangulations of the edges - BRepTools::Clean(aShape); - // adds a triangulation of the shape aShape with the deflection aDeflection - BRepMesh::Mesh(aShape,aDeflection); + // define parameter triangulation + Standard_Real aDeflection = 0.1; - Standard_Integer aIndex = 1, nbNodes = 0; - - // define two sequence of points - TColgp_SequenceOfPnt aPoints, aPoints1; - - // triangulation - for(TopExp_Explorer aExpFace(aShape,TopAbs_FACE); aExpFace.More(); aExpFace.Next()) - { - TopoDS_Face aFace = TopoDS::Face(aExpFace.Current()); - TopLoc_Location aLocation; + // removes all the triangulations of the faces , + //and all the polygons on the triangulations of the edges + BRepTools::Clean(aShape); + // adds a triangulation of the shape aShape with the deflection aDeflection + BRepMesh::Mesh(aShape,aDeflection); - // takes the triangulation of the face aFace - Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation); + Standard_Integer aIndex = 1, nbNodes = 0; - if(!aTr.IsNull()) - { - // takes the array of nodes for this triangulation - const TColgp_Array1OfPnt& aNodes = aTr->Nodes(); - nbNodes = aNodes.Length(); + // define two sequence of points + TColgp_SequenceOfPnt aPoints, aPoints1; - for( Standard_Integer i = 1; i <= nbNodes; i++) - { - // create seguence of node points in absolute coordinate system - gp_Pnt aPnt = aNodes(i).Transformed(aLocation); - aPoints.Append(aPnt); - + // triangulation + for(TopExp_Explorer aExpFace(aShape,TopAbs_FACE); aExpFace.More(); aExpFace.Next()) + { + TopoDS_Face aFace = TopoDS::Face(aExpFace.Current()); + TopLoc_Location aLocation; + + // takes the triangulation of the face aFace + Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation); + + if(!aTr.IsNull()) + { + // takes the array of nodes for this triangulation + const TColgp_Array1OfPnt& aNodes = aTr->Nodes(); + nbNodes = aNodes.Length(); + + for( Standard_Integer i = 1; i <= nbNodes; i++) + { + // create seguence of node points in absolute coordinate system + gp_Pnt aPnt = aNodes(i).Transformed(aLocation); + aPoints.Append(aPnt); + + } } } - } - - // remove double points - nbNodes = aPoints.Length(); - Standard_Integer i; - for( i = 1; i <= nbNodes; i++) - { - gp_Pnt aPi = aPoints(i); - Standard_Integer j; - for( j = i + 1; j < nbNodes; j++) + + // remove double points + nbNodes = aPoints.Length(); + Standard_Integer i; + for( i = 1; i <= nbNodes; i++) { - gp_Pnt aPj = aPoints(j); - if(!aPi.IsEqual(aPj,0.9)) - aIndex++; - } - if(aIndex == j - 1) - aPoints1.Append(aPi); - - aIndex = i + 1; - } - - // find max point - aIndex = 0; - gp_Pnt aPntMax = aPoints1(1); - nbNodes = aPoints1.Length(); - for(i = 2; i <= nbNodes; i++) - { - if(aPoints1(i).X() > aPntMax.X()) - { - aIndex = i; - aPntMax = aPoints1(aIndex); - } - } - - // clear seguence - aPoints.Clear(); - - Standard_Integer nbLeftNodes = nbNodes; - - // ascending sort - fill aPoints with ascending - // by X coordinate points from aPoints1 - for(i = 1; i < nbNodes; i++) - { - Standard_Real aMin = aPntMax.X(); - aIndex = 1; - for( Standard_Integer j = 1; j <= nbLeftNodes; j++) - { - if(aPoints1(j).X() < aMin) + gp_Pnt aPi = aPoints(i); + Standard_Integer j; + for( j = i + 1; j < nbNodes; j++) { - aMin = aPoints1(j).X(); - aIndex = j; + gp_Pnt aPj = aPoints(j); + if(!aPi.IsEqual(aPj,0.9)) + aIndex++; + } + if(aIndex == j - 1) + aPoints1.Append(aPi); + + aIndex = i + 1; + } + + // find max point + aIndex = 0; + gp_Pnt aPntMax = aPoints1(1); + nbNodes = aPoints1.Length(); + for(i = 2; i <= nbNodes; i++) + { + if(aPoints1(i).X() > aPntMax.X()) + { + aIndex = i; + aPntMax = aPoints1(aIndex); } } - aPoints.Append(aPoints1(aIndex)); - aPoints1.Remove(aIndex); - nbLeftNodes = aPoints1.Length(); - } - aPoints.Append(aPntMax); - // define parameters GeomPlate_BuildPlateSurface - Standard_Integer Degree = 3; - Standard_Integer NbPtsOnCur = 10; - Standard_Integer NbIter = 3; - Standard_Integer Order = 0; - Standard_Integer MaxSeg = 9; - Standard_Integer MaxDegree = 5; - Standard_Real dmax, anApproxTol = 0.001; - Standard_Real aConstrTol = Precision::Confusion(); - - // define object BuildPlateSurface - GeomPlate_BuildPlateSurface BPSurf(Degree,NbPtsOnCur,NbIter); - - // add point constraints to GeomPlate_BuildPlateSurface object - nbNodes = aPoints.Length(); - for (i = 1; i <= nbNodes; i++) - BPSurf.Add(new GeomPlate_PointConstraint(aPoints(i), Order, aConstrTol)); + // clear seguence + aPoints.Clear(); - BPSurf.Perform(); + Standard_Integer nbLeftNodes = nbNodes; - // make PlateSurface - Handle(GeomPlate_Surface) PSurf; - Handle(Geom_Surface) aSurf; - - if (BPSurf.IsDone()) - { - PSurf = BPSurf.Surface(); + // ascending sort - fill aPoints with ascending + // by X coordinate points from aPoints1 + for(i = 1; i < nbNodes; i++) + { + Standard_Real aMin = aPntMax.X(); + aIndex = 1; + for( Standard_Integer j = 1; j <= nbLeftNodes; j++) + { + if(aPoints1(j).X() < aMin) + { + aMin = aPoints1(j).X(); + aIndex = j; + } + } + aPoints.Append(aPoints1(aIndex)); + aPoints1.Remove(aIndex); + nbLeftNodes = aPoints1.Length(); + } + aPoints.Append(aPntMax); - // define parameter approximation - dmax = Max(0.01,10*BPSurf.G0Error()); + // define parameters GeomPlate_BuildPlateSurface + Standard_Integer Degree = 3; + Standard_Integer NbPtsOnCur = 10; + Standard_Integer NbIter = 3; + Standard_Integer Order = 0; + Standard_Integer MaxSeg = 9; + Standard_Integer MaxDegree = 5; + Standard_Real dmax, anApproxTol = 0.001; + Standard_Real aConstrTol = Precision::Confusion(); - // make approximation - GeomPlate_MakeApprox Mapp(PSurf,anApproxTol, MaxSeg,MaxDegree,dmax); - aSurf = Mapp.Surface(); - } - else - return; + // define object BuildPlateSurface + GeomPlate_BuildPlateSurface BPSurf(Degree,NbPtsOnCur,NbIter); - ShapeAnalysis_FreeBounds aFreeBounds(aShape, Standard_False, Standard_True); - TopoDS_Compound aClosedWires = aFreeBounds.GetClosedWires(); - TopTools_IndexedMapOfShape aWires; - TopExp::MapShapes(aClosedWires, TopAbs_WIRE, aWires); - TopoDS_Wire aWire; - Standard_Integer nbWires = aWires.Extent(); - if (nbWires) - aWire = TopoDS::Wire(aWires(1)); - else - return; + // add point constraints to GeomPlate_BuildPlateSurface object + nbNodes = aPoints.Length(); + for (i = 1; i <= nbNodes; i++) + BPSurf.Add(new GeomPlate_PointConstraint(aPoints(i), Order, aConstrTol)); - BRep_Builder B; - TopoDS_Face aFace; - B.MakeFace(aFace, aSurf, Precision::Confusion()); - B.Add(aFace, aWire); - Handle_ShapeFix_Shape sfs = new ShapeFix_Shape(aFace); - sfs->Perform(); - TopoDS_Shape aFixedFace = sfs->Shape(); - if (aFixedFace.IsNull()) - return; + BPSurf.Perform(); - // output surface, make it half transparent - Handle_AIS_InteractiveObject aSurfIO = drawSurface( - aSurf, Quantity_NOC_LEMONCHIFFON3, Standard_False); - aSurfIO->SetTransparency(0.5); - myAISContext->Display(aSurfIO,Standard_False); - Fit(); + // make PlateSurface + Handle(GeomPlate_Surface) PSurf; + Handle(Geom_Surface) aSurf; - if(WAIT_A_LITTLE) return; + if (BPSurf.IsDone()) + { + PSurf = BPSurf.Surface(); - // output points - for(i = 1; i <= nbNodes; i++) - drawPoint(aPoints(i)); + // define parameter approximation + dmax = Max(0.01,10*BPSurf.G0Error()); - if(WAIT_A_LITTLE) return; - - // output resulting face - drawShape(aFixedFace); + // make approximation + GeomPlate_MakeApprox Mapp(PSurf,anApproxTol, MaxSeg,MaxDegree,dmax); + aSurf = Mapp.Surface(); + } + else + return; + + ShapeAnalysis_FreeBounds aFreeBounds(aShape, Standard_False, Standard_True); + TopoDS_Compound aClosedWires = aFreeBounds.GetClosedWires(); + TopTools_IndexedMapOfShape aWires; + TopExp::MapShapes(aClosedWires, TopAbs_WIRE, aWires); + TopoDS_Wire aWire; + Standard_Integer nbWires = aWires.Extent(); + if (nbWires) + aWire = TopoDS::Wire(aWires(1)); + else + return; + + BRep_Builder B; + TopoDS_Face aFace; + B.MakeFace(aFace, aSurf, Precision::Confusion()); + B.Add(aFace, aWire); + Handle_ShapeFix_Shape sfs = new ShapeFix_Shape(aFace); + sfs->Perform(); + TopoDS_Shape aFixedFace = sfs->Shape(); + if (aFixedFace.IsNull()) + return; + + // output surface, make it half transparent + Handle_AIS_InteractiveObject aSurfIO = drawSurface( + aSurf, Quantity_NOC_LEMONCHIFFON3, Standard_False); + aSurfIO->SetTransparency(0.5); + myAISContext->Display(aSurfIO,Standard_False); + Fit(); + + if(WAIT_A_LITTLE) return; + + // output points + for(i = 1; i <= nbNodes; i++) + drawPoint(aPoints(i)); + + if(WAIT_A_LITTLE) return; + + // output resulting face + drawShape(aFixedFace); } Handle_AIS_InteractiveObject CGeometryDoc::drawSurface @@ -1341,15 +1489,17 @@ Handle_AIS_InteractiveObject CGeometryDoc::drawSurface myAISContext->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay); myAISContext->SetColor(aGraphicSurface, theColor, toDisplay); - if (toDisplay) { - if (FitMode){ - myAISContext->Display (aGraphicSurface, Standard_False); - Fit(); - } - else - myAISContext->Display (aGraphicSurface); + if (toDisplay) + { + if (FitMode) + { + myAISContext->Display (aGraphicSurface, Standard_False); + Fit(); + } + else + myAISContext->Display (aGraphicSurface); } - + return aGraphicSurface; } @@ -1382,8 +1532,9 @@ Handle_AIS_Point CGeometryDoc::drawPoint Handle(AIS_Point) aGraphicPoint = new AIS_Point (new Geom_CartesianPoint(aPnt)); myAISContext->SetColor (aGraphicPoint, theColor, toDisplay); - if (toDisplay) { - myAISContext->Display (aGraphicPoint); + if (toDisplay) + { + myAISContext->Display (aGraphicPoint); //COCCDemoDoc::Fit(); } @@ -1398,13 +1549,15 @@ Handle_AIS_Shape CGeometryDoc::drawShape Handle_AIS_Shape aGraphicShape = new AIS_Shape(theShape); myAISContext->SetMaterial(aGraphicShape, theMaterial, toDisplay); - if (toDisplay) { - if (FitMode){ - myAISContext->Display (aGraphicShape, Standard_False); - Fit(); - } - else - myAISContext->Display (aGraphicShape); + if (toDisplay) + { + if (FitMode) + { + myAISContext->Display (aGraphicShape, Standard_False); + Fit(); + } + else + myAISContext->Display (aGraphicShape); } return aGraphicShape; diff --git a/samples/mfc/standard/01_Geometry/src/GeometryDoc.h b/samples/mfc/standard/01_Geometry/src/GeometryDoc.h index b90fa3e1a7..3b286b9900 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryDoc.h +++ b/samples/mfc/standard/01_Geometry/src/GeometryDoc.h @@ -9,7 +9,6 @@ #pragma once #endif // _MSC_VER >= 1000 -#include "ISession2D_InteractiveContext.h" #include "ResultDialog.h" class Handle_AIS_Point; @@ -17,225 +16,224 @@ class Handle_AIS_Point; class CGeometryDoc : public CDocument { public: - void Put2DOnTop(bool isMax = true); - void Put3DOnTop(bool isMax = true); - void Fit2DViews(); - void Set3DViewsZoom(const Quantity_Factor& Coef ); - void Fit3DViews(Quantity_Coefficient Coef); - void simplify(const TopoDS_Shape& aShape); + void Put2DOnTop(bool isMax = true); + void Put3DOnTop(bool isMax = true); + void Fit2DViews(); + void Set3DViewsZoom(const Quantity_Factor& Coef ); + void Fit3DViews(Quantity_Coefficient Coef); + void simplify(const TopoDS_Shape& aShape); - static void Fit(); + static void Fit(); - // 2D + // 2D + void DragEvent2D (const Standard_Integer x , + const Standard_Integer y , + const Standard_Integer TheState, + const Handle_V3d_View& aView ); + void InputEvent2D (const Standard_Integer x , + const Standard_Integer y , + const Handle_V3d_View& aView ); + void MoveEvent2D (const Standard_Integer x , + const Standard_Integer y , + const Handle_V3d_View& aView ); + void ShiftMoveEvent2D (const Standard_Integer x , + const Standard_Integer y , + const Handle_V3d_View& aView ); + void ShiftDragEvent2D (const Standard_Integer x , + const Standard_Integer y , + const Standard_Integer TheState, + const Handle_V3d_View& aView ); + void ShiftInputEvent2D (const Standard_Integer x , + const Standard_Integer y , + const Handle_V3d_View& aView ); + void Popup2D (const Standard_Integer x , + const Standard_Integer y , + const Handle_V3d_View& aView ); - void DragEvent2D (const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState, - const Handle_V2d_View& aView ); - void InputEvent2D (const Standard_Integer x , - const Standard_Integer y , - const Handle_V2d_View& aView ); - void MoveEvent2D (const Standard_Integer x , - const Standard_Integer y , - const Handle_V2d_View& aView ); - void ShiftMoveEvent2D (const Standard_Integer x , - const Standard_Integer y , - const Handle_V2d_View& aView ); - void ShiftDragEvent2D (const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState, - const Handle_V2d_View& aView ); - void ShiftInputEvent2D (const Standard_Integer x , - const Standard_Integer y , - const Handle_V2d_View& aView ); - void Popup2D (const Standard_Integer x , - const Standard_Integer y , - const Handle_V2d_View& aView ); + Handle_AIS_InteractiveObject drawSurface + (const Handle_Geom_Surface& theSurface, + const Quantity_Color& theColor, + const Standard_Boolean toDisplay); - Handle_AIS_InteractiveObject drawSurface - (const Handle_Geom_Surface& theSurface, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay); + Standard_Boolean WaitForInput (unsigned long aMilliSeconds); + // Waits for a user input or a period of time has been elapsed - Standard_Boolean WaitForInput (unsigned long aMilliSeconds); - // Waits for a user input or a period of time has been elapsed + 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_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_Shape drawShape (const TopoDS_Shape& theShape, - const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NOM_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 + Handle_AIS_Shape drawShape (const TopoDS_Shape& theShape, + const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NOM_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: // create from serialization only - CGeometryDoc(); - DECLARE_DYNCREATE(CGeometryDoc) + CGeometryDoc(); + DECLARE_DYNCREATE(CGeometryDoc) -// Attributes + // Attributes public: -// Operations + // Operations public: -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CGeometryDoc) - public: - virtual BOOL OnNewDocument(); - virtual void Serialize(CArchive& ar); - virtual void OnCloseDocument(); - //}}AFX_VIRTUAL - -// Implementation + // Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CGeometryDoc) public: - virtual ~CGeometryDoc(); + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); + virtual void OnCloseDocument(); + //}}AFX_VIRTUAL + + // Implementation +public: + virtual ~CGeometryDoc(); #ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; #endif protected: -// Generated message map functions + // Generated message map functions protected: - //{{AFX_MSG(CGeometryDoc) - afx_msg void OnWindowNew2d(); - afx_msg void OnBUTTONTest1(); - afx_msg void OnBUTTONTest2(); - afx_msg void OnBUTTONTest3(); - afx_msg void OnBUTTONTest4(); - afx_msg void OnBUTTONTest5(); - afx_msg void OnBUTTONTest6(); - afx_msg void OnBUTTONTest7(); - afx_msg void OnBUTTONTest8(); - afx_msg void OnBUTTONTest9(); - afx_msg void OnBUTTONTest10(); - afx_msg void OnBUTTONTest11(); - afx_msg void OnBUTTONTest12(); - afx_msg void OnBUTTONTest13(); - afx_msg void OnBUTTONTest14(); - afx_msg void OnBUTTONTest15(); - afx_msg void OnBUTTONTest16(); - afx_msg void OnBUTTONTest17(); - afx_msg void OnBUTTONTest18(); - afx_msg void OnBUTTONTest19(); - afx_msg void OnBUTTONTest20(); - afx_msg void OnBUTTONTest21(); - afx_msg void OnBUTTONTest22(); - afx_msg void OnBUTTONTest23(); - afx_msg void OnBUTTONTest24(); - afx_msg void OnBUTTONTest25(); - afx_msg void OnBUTTONTest26(); - afx_msg void OnBUTTONTest27(); - afx_msg void OnBUTTONTest28(); - afx_msg void OnBUTTONTest29(); - afx_msg void OnBUTTONTest30(); - afx_msg void OnBUTTONTest31(); - afx_msg void OnBUTTONTest32(); - afx_msg void OnBUTTONTest33(); - afx_msg void OnBUTTONTest34(); - afx_msg void OnBUTTONTest35(); - afx_msg void OnBUTTONTest36(); - afx_msg void OnBUTTONTest37(); - afx_msg void OnBUTTONTest38(); - afx_msg void OnBUTTONTest39(); - afx_msg void OnBUTTONTest40(); - afx_msg void OnBUTTONTest41(); - afx_msg void OnBUTTONTest42(); - afx_msg void OnBUTTONTest43(); - afx_msg void OnBUTTONTest44(); - afx_msg void OnBUTTONTest45(); - afx_msg void OnBUTTONTest46(); - afx_msg void OnBUTTONTest47(); - afx_msg void OnBUTTONTest48(); - afx_msg void OnBUTTONTest49(); - afx_msg void OnBUTTONTest50(); - afx_msg void OnUpdateBUTTONTest1(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest2(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest3(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest4(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest5(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest6(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest7(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest8(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest9(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest10(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest11(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest12(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest13(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest14(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest15(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest16(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest17(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest18(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest19(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest20(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest21(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest22(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest23(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest24(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest25(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest26(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest27(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest28(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest29(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest30(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest31(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest32(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest33(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest34(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest35(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest36(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest37(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest38(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest39(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest40(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest41(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest42(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest43(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest44(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest45(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest46(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest47(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest48(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest49(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTest50(CCmdUI* pCmdUI); - afx_msg void OnCreateSol(); - afx_msg void OnSimplify(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() + //{{AFX_MSG(CGeometryDoc) + afx_msg void OnWindowNew2d(); + afx_msg void OnBUTTONTest1(); + afx_msg void OnBUTTONTest2(); + afx_msg void OnBUTTONTest3(); + afx_msg void OnBUTTONTest4(); + afx_msg void OnBUTTONTest5(); + afx_msg void OnBUTTONTest6(); + afx_msg void OnBUTTONTest7(); + afx_msg void OnBUTTONTest8(); + afx_msg void OnBUTTONTest9(); + afx_msg void OnBUTTONTest10(); + afx_msg void OnBUTTONTest11(); + afx_msg void OnBUTTONTest12(); + afx_msg void OnBUTTONTest13(); + afx_msg void OnBUTTONTest14(); + afx_msg void OnBUTTONTest15(); + afx_msg void OnBUTTONTest16(); + afx_msg void OnBUTTONTest17(); + afx_msg void OnBUTTONTest18(); + afx_msg void OnBUTTONTest19(); + afx_msg void OnBUTTONTest20(); + afx_msg void OnBUTTONTest21(); + afx_msg void OnBUTTONTest22(); + afx_msg void OnBUTTONTest23(); + afx_msg void OnBUTTONTest24(); + afx_msg void OnBUTTONTest25(); + afx_msg void OnBUTTONTest26(); + afx_msg void OnBUTTONTest27(); + afx_msg void OnBUTTONTest28(); + afx_msg void OnBUTTONTest29(); + afx_msg void OnBUTTONTest30(); + afx_msg void OnBUTTONTest31(); + afx_msg void OnBUTTONTest32(); + afx_msg void OnBUTTONTest33(); + afx_msg void OnBUTTONTest34(); + afx_msg void OnBUTTONTest35(); + afx_msg void OnBUTTONTest36(); + afx_msg void OnBUTTONTest37(); + afx_msg void OnBUTTONTest38(); + afx_msg void OnBUTTONTest39(); + afx_msg void OnBUTTONTest40(); + afx_msg void OnBUTTONTest41(); + afx_msg void OnBUTTONTest42(); + afx_msg void OnBUTTONTest43(); + afx_msg void OnBUTTONTest44(); + afx_msg void OnBUTTONTest45(); + afx_msg void OnBUTTONTest46(); + afx_msg void OnBUTTONTest47(); + afx_msg void OnBUTTONTest48(); + afx_msg void OnBUTTONTest49(); + afx_msg void OnBUTTONTest50(); + afx_msg void OnUpdateBUTTONTest1(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest2(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest3(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest4(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest5(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest6(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest7(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest8(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest9(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest10(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest11(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest12(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest13(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest14(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest15(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest16(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest17(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest18(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest19(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest20(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest21(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest22(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest23(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest24(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest25(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest26(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest27(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest28(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest29(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest30(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest31(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest32(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest33(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest34(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest35(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest36(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest37(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest38(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest39(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest40(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest41(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest42(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest43(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest44(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest45(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest46(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest47(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest48(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest49(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTONTest50(CCmdUI* pCmdUI); + afx_msg void OnCreateSol(); + afx_msg void OnSimplify(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() private: - Handle_V3d_Viewer myViewer; - Handle_V3d_Viewer myViewerCollector; - Handle_AIS_InteractiveContext myAISContext; + Handle_V3d_Viewer myViewer; + Handle_V3d_Viewer myViewerCollector; + Handle_AIS_InteractiveContext myAISContext; public : - Handle_AIS_InteractiveContext& GetAISContext(){ return myAISContext; }; - Handle_V3d_Viewer GetViewer() { return myViewer; }; - Handle_V3d_Viewer GetViewerCollector() { return myViewerCollector; }; + Handle_AIS_InteractiveContext& GetAISContext(){ return myAISContext; }; + Handle_V3d_Viewer GetViewer() { return myViewer; }; + Handle_V3d_Viewer GetViewerCollector() { return myViewerCollector; }; private: - Handle_V2d_Viewer myViewer2D; - Handle_ISession2D_InteractiveContext myISessionContext; + Handle_V3d_Viewer myViewer2D; + Handle_AIS_InteractiveContext myAISContext2D; public : - int Current; - void Minimize3D(); - void Minimize2D(); - Handle_V2d_Viewer GetViewer2D() { return myViewer2D; }; - Handle_ISession2D_InteractiveContext& GetISessionContext(){ return myISessionContext; }; - BOOL FitMode; + int Current; + void Minimize3D(); + void Minimize2D(); + Handle_V3d_Viewer GetViewer2D() { return myViewer2D; }; + Handle_AIS_InteractiveContext& GetISessionContext(){ return myAISContext2D; }; + BOOL FitMode; public : - CResultDialog myCResultDialog; + CResultDialog myCResultDialog; }; diff --git a/samples/mfc/standard/01_Geometry/src/GeometryView.cpp b/samples/mfc/standard/01_Geometry/src/GeometryView.cpp index fb7383d479..0f1f35af39 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryView.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeometryView.cpp @@ -21,24 +21,24 @@ static char THIS_FILE[] = __FILE__; IMPLEMENT_DYNCREATE(CGeometryView, OCC_3dView) BEGIN_MESSAGE_MAP(CGeometryView, OCC_3dView) - //{{AFX_MSG_MAP(CGeometryView) - ON_COMMAND(ID_FILE_EXPORT_IMAGE, OnFileExportImage) - ON_WM_SIZE() - 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) - //}}AFX_MSG_MAP + //{{AFX_MSG_MAP(CGeometryView) + ON_COMMAND(ID_FILE_EXPORT_IMAGE, OnFileExportImage) + ON_WM_SIZE() + 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) + //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// @@ -58,18 +58,18 @@ CGeometryView::~CGeometryView() #ifdef _DEBUG void CGeometryView::AssertValid() const { - CView::AssertValid(); + CView::AssertValid(); } void CGeometryView::Dump(CDumpContext& dc) const { - CView::Dump(dc); + CView::Dump(dc); } CGeometryDoc* CGeometryView::GetDocument() // non-debug version is inline { - ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CGeometryDoc))); - return (CGeometryDoc*)m_pDocument; + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CGeometryDoc))); + return (CGeometryDoc*)m_pDocument; } #endif //_DEBUG @@ -79,25 +79,29 @@ CGeometryDoc* CGeometryView::GetDocument() // non-debug version is inline void CGeometryView::OnFileExportImage() { - CFileDialog dlg(FALSE,_T("*.BMP"),NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - _T("BMP Files (*.BMP)|*.bmp |GIF Files (*.GIF)|*.gif | PNG Files (*.PNG)|*.png" - "|JPEG Files (*.JPEG)|*.jpeg | PPM Files (*.PPM)|*.ppm | TIFF Files (*.TIFF)" - "|*.tiff | TGA Files (*.TGA)|*.tga | EXR Files (*.EXR)|*.exr||"), - NULL ); - - if (dlg.DoModal() == IDOK) + CFileDialog aDlg (FALSE, "*.BMP", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, + "BMP Files (*.BMP)|*.bmp|" + "GIF Files (*.GIF)|*.gif|" + "PNG Files (*.PNG)|*.png|" + "JPEG Files (*.JPG)|*.jpg|" + "PPM Files (*.PPM)|*.ppm|" + "TIFF Files (*.TIFF)|*.tiff|" + "TGA Files (*.TGA)|*.tga|" + "EXR Files (*.EXR)|*.exr||", NULL); + if (aDlg.DoModal() != IDOK) { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - CString aFileName = dlg.GetPathName(); - myView->Dump(aFileName); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); + return; } + + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); + myView->Dump (aDlg.GetPathName()); + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); } void CGeometryView::OnSize(UINT nType, int cx, int cy) { if (!myView.IsNull()) - myView->MustBeResized(); + myView->MustBeResized(); } void CGeometryView::OnLButtonDown(UINT nFlags, CPoint point) @@ -107,277 +111,277 @@ void CGeometryView::OnLButtonDown(UINT nFlags, CPoint point) 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) - ShiftDragEvent(myXmax,myYmax,-1); - else - DragEvent(myXmax,myYmax,-1); - break; - break; - case CurAction3d_DynamicZooming : // noting - // SetCursor(AfxGetApp()->LoadStandardCursor()); - break; - case CurAction3d_WindowZooming : - break; - case CurAction3d_DynamicPanning :// noting - // SetCursor(AfxGetApp()->LoadStandardCursor()); - break; - case CurAction3d_GlobalPanning :// noting - // SetCursor(AfxGetApp()->LoadStandardCursor()); - break; - case CurAction3d_DynamicRotation : - // SetCursor(AfxGetApp()->LoadStandardCursor()); - if (!myDegenerateModeIsOn) - myView->SetDegenerateModeOn(); - myView->StartRotation(point.x,point.y); - break; - default : - Standard_Failure::Raise(" incompatible Current Mode "); - break; - } + { + // Button MB1 down Control :start zomming + // SetCursor(AfxGetApp()->LoadStandardCursor()); + } + else // if ( Ctrl ) + { + switch (myCurrentMode) + { + case CurAction3d_Nothing : // start a drag + if (nFlags & MK_SHIFT) + ShiftDragEvent(myXmax,myYmax,-1); + else + DragEvent(myXmax,myYmax,-1); + break; + break; + case CurAction3d_DynamicZooming : // noting + // SetCursor(AfxGetApp()->LoadStandardCursor()); + break; + case CurAction3d_WindowZooming : + break; + case CurAction3d_DynamicPanning :// noting + // SetCursor(AfxGetApp()->LoadStandardCursor()); + break; + case CurAction3d_GlobalPanning :// noting + // SetCursor(AfxGetApp()->LoadStandardCursor()); + break; + case CurAction3d_DynamicRotation : + // SetCursor(AfxGetApp()->LoadStandardCursor()); + if (!myDegenerateModeIsOn) + myView->SetDegenerateModeOn(); + myView->StartRotation(point.x,point.y); + break; + default : + Standard_Failure::Raise(" incompatible Current Mode "); + break; } + } } void CGeometryView::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 ) - ShiftInputEvent(point.x,point.y); - else - InputEvent (point.x,point.y); - } else - { - myXmax=point.x; myYmax=point.y; - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); - if (nFlags & MK_SHIFT) - ShiftDragEvent(point.x,point.y,1); - else - DragEvent(point.x,point.y,1); - } - break; - case CurAction3d_DynamicZooming : - // SetCursor(AfxGetApp()->LoadStandardCursor()); - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_WindowZooming : - myXmax=point.x; myYmax=point.y; - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash); - 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; - default : - Standard_Failure::Raise(" incompatible Current Mode "); - break; - } //switch (myCurrentMode) - } // else // if ( Ctrl ) + 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 ) + ShiftInputEvent(point.x,point.y); + else + InputEvent (point.x,point.y); + } else + { + myXmax=point.x; myYmax=point.y; + DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); + if (nFlags & MK_SHIFT) + ShiftDragEvent(point.x,point.y,1); + else + DragEvent(point.x,point.y,1); + } + break; + case CurAction3d_DynamicZooming : + // SetCursor(AfxGetApp()->LoadStandardCursor()); + myCurrentMode = CurAction3d_Nothing; + break; + case CurAction3d_WindowZooming : + myXmax=point.x; myYmax=point.y; + DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash); + 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; + default : + Standard_Failure::Raise(" incompatible Current Mode "); + break; + } //switch (myCurrentMode) + } // else // if ( Ctrl ) } void CGeometryView::OnMButtonDown(UINT nFlags, CPoint point) { - if ( nFlags & MK_CONTROL ) - { - // Button MB2 down Control : panning init - // SetCursor(AfxGetApp()->LoadStandardCursor()); - } + if ( nFlags & MK_CONTROL ) + { + // Button MB2 down Control : panning init + // SetCursor(AfxGetApp()->LoadStandardCursor()); + } } void CGeometryView::OnMButtonUp(UINT nFlags, CPoint point) { - if ( nFlags & MK_CONTROL ) - { - // Button MB2 down Control : panning init - // SetCursor(AfxGetApp()->LoadStandardCursor()); - } + if ( nFlags & MK_CONTROL ) + { + // Button MB2 down Control : panning init + // SetCursor(AfxGetApp()->LoadStandardCursor()); + } } void CGeometryView::OnRButtonDown(UINT nFlags, CPoint point) { - if ( nFlags & MK_CONTROL ) - { - // SetCursor(AfxGetApp()->LoadStandardCursor()); - if (!myDegenerateModeIsOn) - myView->SetDegenerateModeOn(); - myView->StartRotation(point.x,point.y); - } - else // if ( Ctrl ) - { - Popup(point.x,point.y); - } + if ( nFlags & MK_CONTROL ) + { + // SetCursor(AfxGetApp()->LoadStandardCursor()); + if (!myDegenerateModeIsOn) + myView->SetDegenerateModeOn(); + myView->StartRotation(point.x,point.y); + } + else // if ( Ctrl ) + { + Popup(point.x,point.y); + } } void CGeometryView::OnRButtonUp(UINT nFlags, CPoint point) { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - if (!myDegenerateModeIsOn) - { - myView->SetDegenerateModeOff(); - myDegenerateModeIsOn = Standard_False; - } else - { - myView->SetDegenerateModeOn(); - myDegenerateModeIsOn = Standard_True; - } - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); + if (!myDegenerateModeIsOn) + { + myView->SetDegenerateModeOff(); + myDegenerateModeIsOn = Standard_False; + } else + { + myView->SetDegenerateModeOn(); + myDegenerateModeIsOn = Standard_True; + } + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); } void CGeometryView::OnMouseMove(UINT nFlags, CPoint point) { - // ============================ LEFT BUTTON ======================= + // ============================ LEFT BUTTON ======================= if ( nFlags & MK_LBUTTON) + { + if ( nFlags & MK_CONTROL ) { - 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 : - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); - myXmax = point.x; - myYmax = point.y; - if (nFlags & MK_SHIFT) - ShiftDragEvent(myXmax,myYmax,0); - else - DragEvent(myXmax,myYmax,0); - 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_False,LongDash); - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash); - 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 + // 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 : + DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); + myXmax = point.x; + myYmax = point.y; + if (nFlags & MK_SHIFT) + ShiftDragEvent(myXmax,myYmax,0); + else + DragEvent(myXmax,myYmax,0); + DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True); break; - case CurAction3d_DynamicRotation : - myView->Rotation(point.x,point.y); - myView->Redraw(); + 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; - default : - Standard_Failure::Raise(" incompatible Current Mode "); + case CurAction3d_WindowZooming : + myXmax = point.x; myYmax = point.y; + DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash); + DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash); break; - }// switch (myCurrentMode) - }// if ( nFlags & MK_CONTROL ) else - } else // if ( nFlags & MK_LBUTTON) + 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; + default : + Standard_Failure::Raise(" incompatible Current Mode "); + 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; + 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 (nFlags & MK_SHIFT) - ShiftMoveEvent(point.x,point.y); - else - MoveEvent(point.x,point.y); - } + // ============================ 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 (nFlags & MK_SHIFT) + ShiftMoveEvent(point.x,point.y); + else + MoveEvent(point.x,point.y); + } } void CGeometryView::OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI) { - pCmdUI->SetCheck (myDegenerateModeIsOn); - pCmdUI->Enable (!myDegenerateModeIsOn); + pCmdUI->SetCheck (myDegenerateModeIsOn); + pCmdUI->Enable (!myDegenerateModeIsOn); } void CGeometryView::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI) { - pCmdUI->SetCheck (!myDegenerateModeIsOn); - pCmdUI->Enable (myDegenerateModeIsOn); + pCmdUI->SetCheck (!myDegenerateModeIsOn); + pCmdUI->Enable (myDegenerateModeIsOn); } void CGeometryView::OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI) { - pCmdUI->SetCheck (myCurrentMode == CurAction3d_GlobalPanning); - pCmdUI->Enable (myCurrentMode != CurAction3d_GlobalPanning); - + pCmdUI->SetCheck (myCurrentMode == CurAction3d_GlobalPanning); + pCmdUI->Enable (myCurrentMode != CurAction3d_GlobalPanning); + } void CGeometryView::OnUpdateBUTTONPan(CCmdUI* pCmdUI) { - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicPanning); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicPanning ); + pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicPanning); + pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicPanning ); } void CGeometryView::OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI) { - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicZooming ); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicZooming); + pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicZooming ); + pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicZooming); } void CGeometryView::OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI) { - pCmdUI->SetCheck (myCurrentMode == CurAction3d_WindowZooming); - pCmdUI->Enable (myCurrentMode != CurAction3d_WindowZooming); + pCmdUI->SetCheck (myCurrentMode == CurAction3d_WindowZooming); + pCmdUI->Enable (myCurrentMode != CurAction3d_WindowZooming); } void CGeometryView::OnUpdateBUTTONRot(CCmdUI* pCmdUI) { - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicRotation); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicRotation); + pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicRotation); + pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicRotation); } //========================================================================================== @@ -388,72 +392,72 @@ void CGeometryView::OnUpdateBUTTONRot(CCmdUI* pCmdUI) // //----------------------------------------------------------------------------------------- void CGeometryView::DragEvent(const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState ) + const Standard_Integer y , + const Standard_Integer TheState ) { - // TheState == -1 button down - // TheState == 0 move - // TheState == 1 button up + // TheState == -1 button down + // TheState == 0 move + // TheState == 1 button up - static Standard_Integer theButtonDownX=0; - static Standard_Integer theButtonDownY=0; + static Standard_Integer theButtonDownX=0; + static Standard_Integer theButtonDownY=0; - if (TheState == -1) - { - theButtonDownX=x; - theButtonDownY=y; - } + if (TheState == -1) + { + theButtonDownX=x; + theButtonDownY=y; + } - if (TheState == 0) - GetDocument()->GetAISContext()->Select(theButtonDownX,theButtonDownY,x,y,myView); + if (TheState == 0) + GetDocument()->GetAISContext()->Select(theButtonDownX,theButtonDownY,x,y,myView); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- void CGeometryView::InputEvent(const Standard_Integer x , - const Standard_Integer y ) + const Standard_Integer y ) { - GetDocument()->GetAISContext()->Select(); + GetDocument()->GetAISContext()->Select(); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- void CGeometryView::MoveEvent(const Standard_Integer x , - const Standard_Integer y ) + const Standard_Integer y ) { - GetDocument()->GetAISContext()->MoveTo(x,y,myView); + GetDocument()->GetAISContext()->MoveTo(x,y,myView); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- void CGeometryView::ShiftMoveEvent(const Standard_Integer x , - const Standard_Integer y ) + const Standard_Integer y ) { - GetDocument()->GetAISContext()->MoveTo(x,y,myView); + GetDocument()->GetAISContext()->MoveTo(x,y,myView); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- void CGeometryView::ShiftDragEvent(const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState ) + const Standard_Integer y , + const Standard_Integer TheState ) { - static Standard_Integer theButtonDownX=0; - static Standard_Integer theButtonDownY=0; + static Standard_Integer theButtonDownX=0; + static Standard_Integer theButtonDownY=0; - if (TheState == -1) - { - theButtonDownX=x; - theButtonDownY=y; - } + if (TheState == -1) + { + theButtonDownX=x; + theButtonDownY=y; + } - if (TheState == 0) - GetDocument()->GetAISContext()->ShiftSelect(theButtonDownX,theButtonDownY,x,y,myView); + if (TheState == 0) + GetDocument()->GetAISContext()->ShiftSelect(theButtonDownX,theButtonDownY,x,y,myView); } @@ -461,16 +465,16 @@ void CGeometryView::ShiftDragEvent(const Standard_Integer x , // //----------------------------------------------------------------------------------------- void CGeometryView::ShiftInputEvent(const Standard_Integer x , - const Standard_Integer y ) + const Standard_Integer y ) { - GetDocument()->GetAISContext()->ShiftSelect(); + GetDocument()->GetAISContext()->ShiftSelect(); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- void CGeometryView::Popup(const Standard_Integer x, - const Standard_Integer y ) + const Standard_Integer y ) { Standard_Integer PopupMenuNumber=0; GetDocument()->GetAISContext()->InitCurrent(); @@ -481,13 +485,13 @@ void CGeometryView::Popup(const Standard_Integer x, VERIFY(menu.LoadMenu(IDR_Popup3D)); CMenu* pPopup = menu.GetSubMenu(PopupMenuNumber); ASSERT(pPopup != NULL); - + POINT winCoord = { x , y }; Handle(WNT_Window) aWNTWindow= - Handle(WNT_Window)::DownCast(myView->Window()); + Handle(WNT_Window)::DownCast(myView->Window()); ClientToScreen ( &winCoord); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON , winCoord.x, winCoord.y , - AfxGetMainWnd()); + AfxGetMainWnd()); } diff --git a/samples/mfc/standard/01_Geometry/src/GeometryView.h b/samples/mfc/standard/01_Geometry/src/GeometryView.h index b9913d2962..fad98464ea 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryView.h +++ b/samples/mfc/standard/01_Geometry/src/GeometryView.h @@ -15,72 +15,77 @@ class CGeometryView : public OCC_3dView { protected: // create from serialization only public: - CGeometryView(); - DECLARE_DYNCREATE(CGeometryView) + CGeometryView(); + DECLARE_DYNCREATE(CGeometryView) -// Attributes + // Attributes public: - CGeometryDoc* GetDocument(); + CGeometryDoc* GetDocument(); -// Operations + // Operations public: -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CGeometryView) - public: - //}}AFX_VIRTUAL - -// Implementation + // Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CGeometryView) public: - virtual ~CGeometryView(); - void FitAll(Quantity_Coefficient Coef) { if (Coef != -1) myView->FitAll(Coef); - else myView->FitAll(); - myView->ZFitAll(); }; + //}}AFX_VIRTUAL + + // Implementation +public: + virtual ~CGeometryView(); + void FitAll(Quantity_Coefficient Coef) + { + if (Coef != -1) + myView->FitAll(Coef); + else myView->FitAll(); + myView->ZFitAll(); + }; + #ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; #endif // Generated message map functions protected: - //{{AFX_MSG(CGeometryView) - afx_msg void OnFileExportImage(); - afx_msg void OnSize(UINT nType, int cx, int cy); - 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 - DECLARE_MESSAGE_MAP() + //{{AFX_MSG(CGeometryView) + afx_msg void OnFileExportImage(); + afx_msg void OnSize(UINT nType, int cx, int cy); + 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 + DECLARE_MESSAGE_MAP() private: - void DragEvent (const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState); - void InputEvent (const Standard_Integer x , - const Standard_Integer y ); - void MoveEvent (const Standard_Integer x , - const Standard_Integer y ); - void ShiftMoveEvent (const Standard_Integer x , - const Standard_Integer y ); - void ShiftDragEvent (const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState); - void ShiftInputEvent(const Standard_Integer x , - const Standard_Integer y ); - void Popup (const Standard_Integer x , - const Standard_Integer y ); + void DragEvent (const Standard_Integer x , + const Standard_Integer y , + const Standard_Integer TheState); + void InputEvent (const Standard_Integer x , + const Standard_Integer y ); + void MoveEvent (const Standard_Integer x , + const Standard_Integer y ); + void ShiftMoveEvent (const Standard_Integer x , + const Standard_Integer y ); + void ShiftDragEvent (const Standard_Integer x , + const Standard_Integer y , + const Standard_Integer TheState); + void ShiftInputEvent(const Standard_Integer x , + const Standard_Integer y ); + void Popup (const Standard_Integer x , + const Standard_Integer y ); }; diff --git a/samples/mfc/standard/01_Geometry/src/GeometryView2D.cpp b/samples/mfc/standard/01_Geometry/src/GeometryView2D.cpp index 3f77e2d9bf..5e4919299b 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryView2D.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeometryView2D.cpp @@ -14,16 +14,16 @@ IMPLEMENT_DYNCREATE(CGeometryView2D, CView) BEGIN_MESSAGE_MAP(CGeometryView2D, OCC_2dView) - //{{AFX_MSG_MAP(CGeometryView2D) - ON_WM_LBUTTONDOWN() - ON_WM_LBUTTONUP() - ON_WM_MBUTTONDOWN() - ON_WM_MBUTTONUP() - ON_WM_RBUTTONDOWN() - ON_WM_RBUTTONUP() - ON_WM_MOUSEMOVE() - ON_WM_SIZE() - //}}AFX_MSG_MAP + //{{AFX_MSG_MAP(CGeometryView2D) + ON_WM_LBUTTONDOWN() + ON_WM_LBUTTONUP() + ON_WM_MBUTTONDOWN() + ON_WM_MBUTTONUP() + ON_WM_RBUTTONDOWN() + ON_WM_RBUTTONUP() + ON_WM_MOUSEMOVE() + ON_WM_SIZE() + //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// @@ -41,11 +41,11 @@ CGeometryView2D::~CGeometryView2D() void CGeometryView2D::OnDraw(CDC* pDC) { - CGeometryDoc* pDoc = GetDocument(); - ASSERT_VALID(pDoc); + CGeometryDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); - if (!myV2dView.IsNull()) - myV2dView->Update(); + if (!myV2dView.IsNull()) + myV2dView->Update(); } ///////////////////////////////////////////////////////////////////////////// @@ -54,18 +54,18 @@ void CGeometryView2D::OnDraw(CDC* pDC) #ifdef _DEBUG void CGeometryView2D::AssertValid() const { - CView::AssertValid(); + CView::AssertValid(); } void CGeometryView2D::Dump(CDumpContext& dc) const { - CView::Dump(dc); + CView::Dump(dc); } CGeometryDoc* CGeometryView2D::GetDocument() // non-debug version is inline { - ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CGeometryDoc))); - return (CGeometryDoc*)m_pDocument; + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CGeometryDoc))); + return (CGeometryDoc*)m_pDocument; } #endif //_DEBUG @@ -83,233 +83,227 @@ void CGeometryView2D::OnLButtonDown(UINT nFlags, CPoint point) 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 CurAction2d_Nothing : // start a drag - GetDocument()->DragEvent2D(point.x,point.y,-1,myV2dView); - break; - case CurAction2d_DynamicZooming : // noting - break; - case CurAction2d_WindowZooming : - break; - case CurAction2d_DynamicPanning :// noting - break; - case CurAction2d_GlobalPanning :// noting - break; - default : - Standard_Failure::Raise(" incompatible Current Mode "); - break; - } + { + // Button MB1 down Control :start zomming + // SetCursor(AfxGetApp()->LoadStandardCursor()); + } + else // if ( Ctrl ) + { + switch (myCurrentMode) + { + case CurAction2d_Nothing : // start a drag + GetDocument()->DragEvent2D(point.x,point.y,-1,myV2dView); + break; + case CurAction2d_DynamicZooming : // noting + break; + case CurAction2d_WindowZooming : + break; + case CurAction2d_DynamicPanning :// noting + break; + case CurAction2d_GlobalPanning :// noting + break; + default : + Standard_Failure::Raise(" incompatible Current Mode "); + break; } + } } void CGeometryView2D::OnLButtonUp(UINT nFlags, CPoint point) { - // TODO: Add your message handler code here and/or call default - if ( nFlags & MK_CONTROL ) - { - return; - } - else // if ( Ctrl ) - { - switch (myCurrentMode) - { - case CurAction2d_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()->ShiftInputEvent2D(point.x,point.y,myV2dView); - else - GetDocument()->InputEvent2D (point.x,point.y,myV2dView); - } else - { - DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False); - myXmax=point.x; - myYmax=point.y; - if (nFlags & MK_SHIFT) - GetDocument()->ShiftDragEvent2D(point.x,point.y,1,myV2dView); - else - GetDocument()->DragEvent2D(point.x,point.y,1,myV2dView); - } - break; - case CurAction2d_DynamicZooming : - // SetCursor(AfxGetApp()->LoadStandardCursor()); - myCurrentMode = CurAction2d_Nothing; - break; - case CurAction2d_WindowZooming : - myXmax=point.x; myYmax=point.y; - DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash); - 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 - myV2dView->WindowFit(myXmin,myYmin,myXmax,myYmax); - } - myCurrentMode = CurAction2d_Nothing; - break; - case CurAction2d_DynamicPanning : - myCurrentMode = CurAction2d_Nothing; - break; - case CurAction2d_GlobalPanning : - myV2dView->Place(point.x,point.y,myCurZoom); - myCurrentMode = CurAction2d_Nothing; - break; - default : - Standard_Failure::Raise(" incompatible Current Mode "); - break; - } //switch (myCurrentMode) - } // else // if ( Ctrl ) - + // TODO: Add your message handler code here and/or call default + if ( nFlags & MK_CONTROL ) + { + return; + } + else // if ( Ctrl ) + { + switch (myCurrentMode) + { + case CurAction2d_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()->ShiftInputEvent2D(point.x,point.y,myV2dView); + else + GetDocument()->InputEvent2D (point.x,point.y,myV2dView); + } else + { + DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False); + myXmax=point.x; + myYmax=point.y; + if (nFlags & MK_SHIFT) + GetDocument()->ShiftDragEvent2D(point.x,point.y,1,myV2dView); + else + GetDocument()->DragEvent2D(point.x,point.y,1,myV2dView); + } + break; + case CurAction2d_DynamicZooming : + // SetCursor(AfxGetApp()->LoadStandardCursor()); + myCurrentMode = CurAction2d_Nothing; + break; + case CurAction2d_WindowZooming : + myXmax=point.x; myYmax=point.y; + DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash); + 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 + myV2dView->WindowFit(myXmin,myYmin,myXmax,myYmax); + } + myCurrentMode = CurAction2d_Nothing; + break; + case CurAction2d_DynamicPanning : + myCurrentMode = CurAction2d_Nothing; + break; + case CurAction2d_GlobalPanning : + myV2dView->Place(point.x,point.y,myCurZoom); + myCurrentMode = CurAction2d_Nothing; + break; + default : + Standard_Failure::Raise(" incompatible Current Mode "); + break; + } //switch (myCurrentMode) + } // else // if ( Ctrl ) + } void CGeometryView2D::OnMButtonDown(UINT nFlags, CPoint point) { - if ( nFlags & MK_CONTROL ) - { - // Button MB2 down Control : panning init - // SetCursor(AfxGetApp()->LoadStandardCursor()); - } - + if ( nFlags & MK_CONTROL ) + { + // Button MB2 down Control : panning init + // SetCursor(AfxGetApp()->LoadStandardCursor()); + } } void CGeometryView2D::OnMButtonUp(UINT nFlags, CPoint point) { - if ( nFlags & MK_CONTROL ) - { - // Button MB2 up Control : panning stop - // SetCursor(AfxGetApp()->LoadStandardCursor()); - } - + if ( nFlags & MK_CONTROL ) + { + // Button MB2 up Control : panning stop + // SetCursor(AfxGetApp()->LoadStandardCursor()); + } } void CGeometryView2D::OnRButtonDown(UINT nFlags, CPoint point) { - // TODO: Add your message handler code here and/or call default - if ( nFlags & MK_CONTROL ) - { - // SetCursor(AfxGetApp()->LoadStandardCursor()); - } - else // if ( Ctrl ) - { - GetDocument()->Popup2D(point.x,point.y,myV2dView); - } - + // TODO: Add your message handler code here and/or call default + if ( nFlags & MK_CONTROL ) + { + // SetCursor(AfxGetApp()->LoadStandardCursor()); + } + else // if ( Ctrl ) + { + GetDocument()->Popup2D(point.x,point.y,myV2dView); + } } void CGeometryView2D::OnRButtonUp(UINT nFlags, CPoint point) { - OCC_2dView::Popup2D(point.x,point.y); + OCC_2dView::Popup2D(point.x,point.y); } void CGeometryView2D::OnMouseMove(UINT nFlags, CPoint point) { - // ============================ LEFT BUTTON ======================= + // ============================ LEFT BUTTON ======================= if ( nFlags & MK_LBUTTON) + { + if ( nFlags & MK_CONTROL ) { - if ( nFlags & MK_CONTROL ) - { - // move with MB1 and Control : on the dynamic zooming - // Do the zoom in function of mouse's coordinates - myV2dView->Zoom(myXmax,myYmax,point.x,point.y); - // save the current mouse coordinate in min - myXmax = point.x; + // move with MB1 and Control : on the dynamic zooming + // Do the zoom in function of mouse's coordinates + myV2dView->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 CurAction2d_Nothing : + DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False); + myXmax = point.x; myYmax = point.y; - } - else // if ( Ctrl ) - { - switch (myCurrentMode) - { - case CurAction2d_Nothing : - DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False); - myXmax = point.x; - myYmax = point.y; - GetDocument()->DragEvent2D(myXmax,myYmax,0,myV2dView); - DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_True); - break; - case CurAction2d_DynamicZooming : - myV2dView->Zoom(myXmax,myYmax,point.x,point.y); - // save the current mouse coordinate in min \n"; - myXmax=point.x; myYmax=point.y; - break; - case CurAction2d_WindowZooming : - myXmax = point.x; myYmax = point.y; - DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash); - DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash); - break; - case CurAction2d_DynamicPanning : - myV2dView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; - break; - case CurAction2d_GlobalPanning : // nothing + GetDocument()->DragEvent2D(myXmax,myYmax,0,myV2dView); + DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_True); break; - default : - Standard_Failure::Raise(" incompatible Current Mode "); + case CurAction2d_DynamicZooming : + myV2dView->Zoom(myXmax,myYmax,point.x,point.y); + // save the current mouse coordinate in min \n"; + myXmax=point.x; myYmax=point.y; break; - }// switch (myCurrentMode) - }// if ( nFlags & MK_CONTROL ) else - } else // if ( nFlags & MK_LBUTTON) + case CurAction2d_WindowZooming : + myXmax = point.x; myYmax = point.y; + DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash); + DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash); + break; + case CurAction2d_DynamicPanning : + myV2dView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning + myXmax = point.x; myYmax = point.y; + break; + case CurAction2d_GlobalPanning : // nothing + break; + default : + Standard_Failure::Raise(" incompatible Current Mode "); + break; + }// switch (myCurrentMode) + }// if ( nFlags & MK_CONTROL ) else + } else // if ( nFlags & MK_LBUTTON) // ============================ MIDDLE BUTTON ======================= if ( nFlags & MK_MBUTTON) { - if ( nFlags & MK_CONTROL ) - { - myV2dView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; + if ( nFlags & MK_CONTROL ) + { + myV2dView->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) - { - }else //if ( nFlags & MK_RBUTTON) - // ============================ NO BUTTON ======================= - { // No buttons - myXmax = point.x; myYmax = point.y; - if (nFlags & MK_SHIFT) - GetDocument()->ShiftMoveEvent2D(point.x,point.y,myV2dView); - else - GetDocument()->MoveEvent2D(point.x,point.y,myV2dView); - } + // ============================ RIGHT BUTTON ======================= + if ( nFlags & MK_RBUTTON) + { + }else //if ( nFlags & MK_RBUTTON) + // ============================ NO BUTTON ======================= + { // No buttons + myXmax = point.x; myYmax = point.y; + if (nFlags & MK_SHIFT) + GetDocument()->ShiftMoveEvent2D(point.x,point.y,myV2dView); + else + GetDocument()->MoveEvent2D(point.x,point.y,myV2dView); + } } void CGeometryView2D::OnSize(UINT nType, int cx, int cy) { - if (!myV2dView.IsNull()) - { - myV2dView->MustBeResized(V2d_TOWRE_ENLARGE_SPACE); // added sro - } - + if (!myV2dView.IsNull()) + { + myV2dView->MustBeResized(); // added sro + } } void CGeometryView2D::OnInitialUpdate() - { - Handle(WNT_Window) aWNTWindow; - aWNTWindow = new WNT_Window(((CGeometryApp*)AfxGetApp())->GetGraphicDevice(),GetSafeHwnd()); - aWNTWindow->SetBackground(Quantity_NOC_BLACK); + Handle(WNT_Window) aWNTWindow; + aWNTWindow = new WNT_Window(GetSafeHwnd()); - Handle(WNT_WDriver) aDriver= new WNT_WDriver(aWNTWindow); - myV2dView = new V2d_View(aDriver, GetDocument()->GetViewer2D(),0,0,50); + myV2dView = GetDocument()->GetViewer2D()->CreateView(); + myV2dView->SetWindow(aWNTWindow); + myV2dView->SetBackgroundColor(Quantity_NOC_BLACK); - // initialyse the grids dialogs - TheRectangularGridDialog.Create(CRectangularGrid::IDD, NULL); - TheCircularGridDialog.Create(CCircularGrid::IDD, NULL); - TheRectangularGridDialog.SetViewer (GetDocument()->GetViewer2D()); - TheCircularGridDialog.SetViewer (GetDocument()->GetViewer2D()); - - 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 ) ; + // initialyse the grids dialogs + TheRectangularGridDialog.Create(CRectangularGrid::IDD, NULL); + TheCircularGridDialog.Create(CCircularGrid::IDD, NULL); + TheRectangularGridDialog.SetViewer (GetDocument()->GetViewer2D()); + TheCircularGridDialog.SetViewer (GetDocument()->GetViewer2D()); + 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 ) ; } \ No newline at end of file diff --git a/samples/mfc/standard/01_Geometry/src/GeometryView2D.h b/samples/mfc/standard/01_Geometry/src/GeometryView2D.h index 5e14541246..1361ab40df 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryView2D.h +++ b/samples/mfc/standard/01_Geometry/src/GeometryView2D.h @@ -12,62 +12,46 @@ #include <OCC_2dView.h> ///////////////////////////////////////////////////////////////////////////// -/* -enum CurrentAction2d { - CurAction_Nothing, - CurAction_DynamicZooming, - CurAction_WindowZooming, - CurAction_DynamicPanning, - CurAction_GlobalPanning, -}; -*/ + #define ValZWMin 1 - - class CGeometryView2D : public OCC_2dView { protected: // create from serialization only - CGeometryView2D(); - DECLARE_DYNCREATE(CGeometryView2D) + CGeometryView2D(); + DECLARE_DYNCREATE(CGeometryView2D) -// Attributes + // Attributes public: - CGeometryDoc* GetDocument(); + CGeometryDoc* GetDocument(); public: - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CNSGViewBib) - public: - virtual void OnDraw(CDC* pDC); // overridden to draw this view - virtual void OnInitialUpdate(); // called first time after construct - - //}}AFX_VIRTUAL - - - -// Implementation + // Overrides + // ClassWizard generated virtual function overrides public: - virtual ~CGeometryView2D(); + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual void OnInitialUpdate(); // called first time after construct + + // Implementation +public: + virtual ~CGeometryView2D(); #ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; #endif -// Generated message map functions + // Generated message map functions protected: - //{{AFX_MSG(CGeometryView2D) - 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 OnRButtonDown(UINT nFlags, CPoint point); - afx_msg void OnRButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnSize(UINT nType, int cx, int cy); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() + //{{AFX_MSG(CGeometryView2D) + 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 OnRButtonDown(UINT nFlags, CPoint point); + afx_msg void OnRButtonUp(UINT nFlags, CPoint point); + afx_msg void OnMouseMove(UINT nFlags, CPoint point); + afx_msg void OnSize(UINT nType, int cx, int cy); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() }; #ifndef _DEBUG // debug version in NSGViewBibliotheque.cpp diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.cpp b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.cpp index a80db0abd6..4a42399b0e 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.cpp @@ -6,37 +6,12 @@ IMPLEMENT_STANDARD_HANDLE(ISession2D_Curve,AIS_InteractiveObject) IMPLEMENT_STANDARD_RTTIEXT(ISession2D_Curve,AIS_InteractiveObject) -#include <Graphic2d_SetOfCurves.hxx> -#include <Geom2dAdaptor_Curve.hxx> -#include <Bnd_Box2d.hxx> -#include <BndLib_Add2dCurve.hxx> -#include <Precision.hxx> -#include <Select2D_SensitiveBox.hxx> -#include <Select2D_SensitiveSegment.hxx> -#include <gp_Circ2d.hxx> -#include <gp_Dir2d.hxx> -#include <gp_Ax2d.hxx> -#include <Select2D_SensitiveArc.hxx> -#include <Geom2d_Curve.hxx> -#include <GeomTools_Curve2dSet.hxx> -#include <Geom2d_TrimmedCurve.hxx> -#include <gp_Pnt2d.hxx> -#include <GCE2d_MakeSegment.hxx> -#include <gp_Vec2d.hxx> -#include <OSD_Environment.hxx> -#include <Graphic2d_Array1OfVertex.hxx> -#include <Graphic2d_PolyLine.hxx> -#include <SelectMgr_Selection.hxx> -#include <Graphic2d_Segment.hxx> -#include <GeomAbs_CurveType.hxx> -#include <Graphic2d_Vertex.hxx> -#include <Geom2d_BezierCurve.hxx> - ISession2D_Curve::ISession2D_Curve(const Handle_Geom2d_Curve aGeom2dCurve, - const Aspect_TypeOfLine aTypeOfLine, - const Aspect_WidthOfLine aWidthOfLine, - const Standard_Integer aColorIndex) - :AIS_InteractiveObject() +ISession2D_Curve::ISession2D_Curve(const Handle_Geom2d_Curve aGeom2dCurve, + const Aspect_TypeOfLine aTypeOfLine, + const Aspect_WidthOfLine aWidthOfLine, + const Standard_Integer aColorIndex) + :AIS_InteractiveObject() { myGeom2dCurve = aGeom2dCurve; myTypeOfLine = aTypeOfLine ; @@ -49,51 +24,52 @@ IMPLEMENT_STANDARD_RTTIEXT(ISession2D_Curve,AIS_InteractiveObject) myradiusratio = 1; } -void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, - const Handle(Graphic2d_GraphicObject)& aGrObj, - const Standard_Integer aMode) +void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, + const Handle(Prs3d_Presentation)& aPresentation, + const Standard_Integer aMode) { - Handle(Graphic2d_SetOfCurves) segment; - segment = new Graphic2d_SetOfCurves(aGrObj); - - - segment->Add(myGeom2dCurve); - - segment->SetColorIndex (myColorIndex); - segment->SetWidthIndex (myWidthOfLine + 1); - segment->SetTypeIndex (myTypeOfLine + 1); Geom2dAdaptor_Curve anAdaptor(myGeom2dCurve); + GCPnts_QuasiUniformDeflection anEdgeDistrib(anAdaptor,1.e-2); + if(anEdgeDistrib.IsDone()) + { + Handle(Graphic3d_ArrayOfPolylines) aCurve = + new Graphic3d_ArrayOfPolylines(anEdgeDistrib.NbPoints()); + for(Standard_Integer i=1;i<=anEdgeDistrib.NbPoints();++i) + aCurve->AddVertex(anEdgeDistrib.Value(i)); + + Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aCurve); + } + if (myDisplayPole) - { + { if (anAdaptor.GetType() == GeomAbs_BezierCurve ) { Handle(Geom2d_BezierCurve) aBezier = anAdaptor.Bezier(); - Graphic2d_Array1OfVertex anArrayOfVertex(1,aBezier->NbPoles()); + Handle(Graphic3d_ArrayOfPolylines) anArrayOfVertex = new Graphic3d_ArrayOfPolylines(aBezier->NbPoles()); for(int i=1;i<=aBezier->NbPoles();i++) - { - gp_Pnt2d CurrentPoint = aBezier->Pole(i); - Graphic2d_Vertex aVertex(CurrentPoint.X(),CurrentPoint.Y()); - anArrayOfVertex(i)=aVertex; - } - Handle(Graphic2d_Polyline) aPolyline = new Graphic2d_Polyline(aGrObj,anArrayOfVertex); + { + gp_Pnt2d CurrentPoint = aBezier->Pole(i); + anArrayOfVertex->AddVertex(CurrentPoint.X(),CurrentPoint.Y(),0.); } + Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(anArrayOfVertex); + } if (anAdaptor.GetType() == GeomAbs_BSplineCurve ) { Handle(Geom2d_BSplineCurve) aBSpline = anAdaptor.BSpline(); - Graphic2d_Array1OfVertex anArrayOfVertex(1,aBSpline->NbPoles()); + Handle(Graphic3d_ArrayOfPolylines) anArrayOfVertex = + new Graphic3d_ArrayOfPolylines(aBSpline->NbPoles()); for(int i=1;i<=aBSpline->NbPoles();i++) - { - gp_Pnt2d CurrentPoint = aBSpline->Pole(i); - Graphic2d_Vertex aVertex(CurrentPoint.X(),CurrentPoint.Y()); - anArrayOfVertex(i)=aVertex; - } - Handle(Graphic2d_Polyline) aPolyline = new Graphic2d_Polyline(aGrObj,anArrayOfVertex); + { + gp_Pnt2d CurrentPoint = aBSpline->Pole(i); + anArrayOfVertex->AddVertex(CurrentPoint.X(),CurrentPoint.Y(),0.); } + Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(anArrayOfVertex); } + } if (myDisplayCurbure && (anAdaptor.GetType() != GeomAbs_Line)) { @@ -106,37 +82,39 @@ void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager2d)& aPres gp_Pnt2d P1, P2; for (intrv = 1; intrv <= nbintv; intrv++) - { - Standard_Real t = TI(intrv); - Standard_Real step = (TI(intrv+1) - t) / GetDiscretisation(); - Standard_Real LRad, ratio; - for (ii = 1; ii <= myDiscretisation; ii++) - { - LProp.SetParameter(t); + { + Standard_Real t = TI(intrv); + Standard_Real step = (TI(intrv+1) - t) / GetDiscretisation(); + Standard_Real LRad, ratio; + for (ii = 1; ii <= myDiscretisation; ii++) + { + LProp.SetParameter(t); if (LProp.IsTangentDefined()) - { - Curvature = Abs(LProp.Curvature()); - if ( Curvature > Resolution) - { - myGeom2dCurve->D0(t, P1); - LRad = 1./Curvature; - ratio = ( ( LRad > myradiusmax) ? myradiusmax/LRad : 1 ); - ratio *= myradiusratio; - LProp.CentreOfCurvature(P2); - gp_Vec2d V(P1, P2); - gp_Pnt2d P3 = P1.Translated(ratio*V); - Handle(Graphic2d_Segment) aSegment = new Graphic2d_Segment(aGrObj,P1.X(),P1.Y(),P3.X(),P3.Y()); - } - } - t += step; - } + { + Curvature = Abs(LProp.Curvature()); + if ( Curvature > Resolution) + { + myGeom2dCurve->D0(t, P1); + LRad = 1./Curvature; + ratio = ( ( LRad > myradiusmax) ? myradiusmax/LRad : 1 ); + ratio *= myradiusratio; + LProp.CentreOfCurvature(P2); + gp_Vec2d V(P1, P2); + gp_Pnt2d P3 = P1.Translated(ratio*V); + Handle(Graphic3d_ArrayOfPolylines) aSegment = new Graphic3d_ArrayOfPolylines(2); + aSegment->AddVertex(P1.X(),P1.Y(),0.); + aSegment->AddVertex(P3.X(),P3.Y(),0.); + Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aSegment); + } + } + t += step; + } } } } - void ISession2D_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) + const Standard_Integer aMode) { } diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.h index 429c434db1..8c13b9e2ee 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.h @@ -10,9 +10,7 @@ #include <Aspect_WidthOfline.hxx> #include <Standard_Integer.hxx> #include <SelectMgr_SelectableObject.hxx> -#include <Handle_PrsMgr_PresentationManager2d.hxx> -#include <Handle_Graphic2d_GraphicObject.hxx> -#include <Handle_SelectMgr_Selection.hxx> +#include <SelectMgr_Selection.hxx> #include <Standard_OStream.hxx> #include <Standard_IStream.hxx> #include <Standard_CString.hxx> @@ -21,7 +19,6 @@ class TColGeom2d_HSequenceOfCurve; class PrsMgr_PresentationManager2d; class Graphic2d_GraphicObject; class SelectMgr_Selection; -class ISession2D_ObjectOwner; #include "Geom2d_Curve.hxx" @@ -32,81 +29,56 @@ class ISession2D_Curve : public AIS_InteractiveObject { public: - // Methods PUBLIC - // + // Methods PUBLIC + // - ISession2D_Curve - (const Handle_Geom2d_Curve aGeom2dCurve, - const Aspect_TypeOfLine aTypeOfline = Aspect_TOL_SOLID, - const Aspect_WidthOfLine aWidthOfLine = Aspect_WOL_MEDIUM, - const Standard_Integer aColorIndex = 4); + ISession2D_Curve + (const Handle_Geom2d_Curve aGeom2dCurve, + const Aspect_TypeOfLine aTypeOfline = Aspect_TOL_SOLID, + const Aspect_WidthOfLine aWidthOfLine = Aspect_WOL_MEDIUM, + const Standard_Integer aColorIndex = 4); -inline Standard_Integer NbPossibleSelection() const; + inline Standard_Integer NbPossibleSelection() const; -inline Aspect_TypeOfLine GetTypeOfLine - () const; -inline void SetTypeOfLine - (const Aspect_TypeOfLine aNewTypeOfLine) ; -inline Aspect_WidthOfLine GetWidthOfLine - () const; -inline void SetWidthOfLine - (const Aspect_WidthOfLine aNewWidthOfLine) ; -inline Standard_Integer GetColorIndex - () const; -inline void SetColorIndex - (const Standard_Integer aNewColorIndex) ; + inline Aspect_TypeOfLine GetTypeOfLine() const; + inline void SetTypeOfLine(const Aspect_TypeOfLine aNewTypeOfLine); -inline Standard_Boolean GetDisplayPole - () const; -inline void SetDisplayPole - (const Standard_Boolean aNewDisplayPole) ; + inline Aspect_WidthOfLine GetWidthOfLine() const; + inline void SetWidthOfLine(const Aspect_WidthOfLine aNewWidthOfLine); -inline Standard_Boolean ISession2D_Curve::GetDisplayCurbure - () const; -inline void ISession2D_Curve::SetDisplayCurbure - (const Standard_Boolean aNewDisplayCurbure); + inline Standard_Integer GetColorIndex() const; + inline void SetColorIndex(const Standard_Integer aNewColorIndex) ; + inline Standard_Boolean GetDisplayPole() const; + inline void SetDisplayPole(const Standard_Boolean aNewDisplayPole) ; -inline Standard_Real GetDiscretisation - () const; -inline void SetDiscretisation - (const Standard_Real aNewDiscretisation) ; + inline Standard_Boolean ISession2D_Curve::GetDisplayCurbure() const; + inline void ISession2D_Curve::SetDisplayCurbure + (const Standard_Boolean aNewDisplayCurbure); + inline Standard_Real GetDiscretisation() const; + inline void SetDiscretisation(const Standard_Real aNewDiscretisation) ; -DEFINE_STANDARD_RTTI(ISession2D_Curve) - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - + DEFINE_STANDARD_RTTI(ISession2D_Curve) private: - // Methods PRIVATE - // -virtual void Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,const Handle(Graphic2d_GraphicObject)& aGrObj,const Standard_Integer aMode = 0) ; -void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; - - - // Fields PRIVATE - // -Handle_Geom2d_Curve myGeom2dCurve; -Aspect_TypeOfLine myTypeOfLine; -Aspect_WidthOfLine myWidthOfLine; -Standard_Integer myColorIndex; -Standard_Boolean myDisplayPole; -Standard_Boolean myDisplayCurbure; -Standard_Real myDiscretisation; -Standard_Real myradiusmax ; -Standard_Real myradiusratio ; - + // Methods PRIVATE + // + virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; + void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; + // Fields PRIVATE + // + Handle_Geom2d_Curve myGeom2dCurve; + Aspect_TypeOfLine myTypeOfLine; + Aspect_WidthOfLine myWidthOfLine; + Standard_Integer myColorIndex; + Standard_Boolean myDisplayPole; + Standard_Boolean myDisplayCurbure; + Standard_Real myDiscretisation; + Standard_Real myradiusmax ; + Standard_Real myradiusratio ; }; @@ -116,14 +88,14 @@ Standard_Real myradiusratio ; inline Standard_Integer ISession2D_Curve::NbPossibleSelection() const { -return 1; + return 1; } inline Aspect_TypeOfLine ISession2D_Curve::GetTypeOfLine() const { return myTypeOfLine ; } - + inline void ISession2D_Curve::SetTypeOfLine(const Aspect_TypeOfLine aNewTypeOfLine) { myTypeOfLine = aNewTypeOfLine; @@ -150,37 +122,37 @@ inline void ISession2D_Curve::SetColorIndex(const Standard_Integer aNewColorInd } inline Standard_Boolean ISession2D_Curve::GetDisplayPole - () const +() const { -return myDisplayPole; + return myDisplayPole; } inline void ISession2D_Curve::SetDisplayPole - (const Standard_Boolean aNewDisplayPole) +(const Standard_Boolean aNewDisplayPole) { -myDisplayPole = aNewDisplayPole; + myDisplayPole = aNewDisplayPole; } inline Standard_Boolean ISession2D_Curve::GetDisplayCurbure - () const +() const { -return myDisplayCurbure; + return myDisplayCurbure; } inline void ISession2D_Curve::SetDisplayCurbure - (const Standard_Boolean aNewDisplayCurbure) +(const Standard_Boolean aNewDisplayCurbure) { -myDisplayCurbure = aNewDisplayCurbure; + myDisplayCurbure = aNewDisplayCurbure; } - + inline Standard_Real ISession2D_Curve::GetDiscretisation - () const +() const { -return myDiscretisation; + return myDiscretisation; } inline void ISession2D_Curve::SetDiscretisation - (const Standard_Real aNewDiscretisation) +(const Standard_Real aNewDiscretisation) { -myDiscretisation = aNewDiscretisation; + myDiscretisation = aNewDiscretisation; } diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_InteractiveContext.cpp b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_InteractiveContext.cpp deleted file mode 100755 index 7372b96d37..0000000000 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_InteractiveContext.cpp +++ /dev/null @@ -1,166 +0,0 @@ -#include "stdafx.h" - -#include <ISession2D_InteractiveContext.h> - -IMPLEMENT_STANDARD_HANDLE(ISession2D_InteractiveContext,MMgt_TShared) -IMPLEMENT_STANDARD_RTTIEXT(ISession2D_InteractiveContext,MMgt_TShared) - -#include <Aspect_Window.hxx> -#include <Aspect_Background.hxx> -#include <SelectMgr_EntityOwner.hxx> -#include <SelectMgr_SelectionManager.hxx> -#include <V2d_Viewer.hxx> -#include <V2d_View.hxx> -#include <PrsMgr_PresentationManager2d.hxx> -#include <StdSelect_ViewerSelector2d.hxx> -#include <SelectMgr_SelectableObject.hxx> -#include <TColStd_MapIteratorOfMapOfTransient.hxx> - - ISession2D_InteractiveContext::ISession2D_InteractiveContext() -{ -} - - ISession2D_InteractiveContext::ISession2D_InteractiveContext(const Handle(V2d_Viewer)& aViewer) -{ - Initialize(aViewer); -} - -void ISession2D_InteractiveContext::Initialize(const Handle(V2d_Viewer)& aViewer) -{ - myViewer = aViewer; - myPrsmgr = new PrsMgr_PresentationManager2d(myViewer->View()); - mySelectionManager = new SelectMgr_SelectionManager(); - mySelector = new StdSelect_ViewerSelector2d(); - - mySelector->Set(3); - // set Sensitivity very very important for SensitiveCurve !! - mySelector->SetSensitivity (0.5); // en mm - mySelectionManager->Add(mySelector); - -} - -void ISession2D_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw) -{ - myMapOfObject.Add(anObject); - myPrsmgr->Display(anObject);//,anObject->DisplayMode()); - - mySelectionManager->Load(anObject,mySelector); - mySelectionManager->Activate(anObject,0,mySelector); - - if (Redraw) myViewer->Update(); -} - -void ISession2D_InteractiveContext::Erase(const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw) -{ - if (!anObject.IsNull()) - { - myPrsmgr->Erase(anObject);//,anObject->DisplayMode()); - mySelectionManager - ->Deactivate(anObject,mySelector); - if (Redraw) myViewer->Update(); - } -} - -void ISession2D_InteractiveContext::Move(const Handle(V2d_View)& aView, - const Standard_Integer x1, - const Standard_Integer y1) -{ - if (!aBuffer.IsNull()) - { - aBuffer->UnPost(); - aBuffer->Clear(); - } - - if (myViewer->IsActive()) // A propos de la grille !!! - { - aView->ShowHit(x1,y1); - } - - aBuffer =new Graphic2d_Buffer(aView->View(),0,0,3,5); - mySelector->Pick(x1,y1,aView); - - Handle(SelectMgr_SelectableObject) aSelectableObject; - - mySelector->Init(); - - while (mySelector->More()) - { - aSelectableObject = Handle(SelectMgr_SelectableObject)::DownCast(mySelector->Picked()->Selectable()); - - myPrsmgr->Dump(aBuffer,aSelectableObject) ; - aBuffer->Post(); - - mySelector->Next(); - } -} - -void ISession2D_InteractiveContext::Pick(const Handle(V2d_View)& aView, - const Standard_Integer x1, - const Standard_Integer y1) -{ - - if (myViewer->IsActive()) // A propos de la grille !!! - { - aView->ShowHit(x1,y1); - } - - mySelector->Pick(x1,y1,aView); - - Handle(SelectMgr_SelectableObject) aSelectableObject; - mySelector->Init(); - while (mySelector->More()) - { - Handle(SelectMgr_EntityOwner) aOwn= mySelector->Picked(); - aSelectableObject = Handle(SelectMgr_SelectableObject)::DownCast(aOwn->Selectable()); - myPrsmgr->ColorHighlight(aSelectableObject,5,0) ; - mySelector->Next(); - } - - if (myViewer->IsActive()) // A propos de la grille !!! - { - aView->ShowHit(x1,y1); - } -} - - -void ISession2D_InteractiveContext::DisplayAreas() -{ - myViewer->InitActiveViews(); - while(myViewer->MoreActiveViews()) - { - Handle(V2d_View) aView = myViewer->ActiveView(); - mySelector->DisplayAreas(aView); - myViewer->NextActiveViews(); - } - myViewer->Update(); -} - -void ISession2D_InteractiveContext::ClearAreas() -{ - mySelector->ClearAreas(); - myViewer->Update(); -} - -void ISession2D_InteractiveContext::EraseAll() -{ - TColStd_MapIteratorOfMapOfTransient anIterator(myMapOfObject); - for (;anIterator.More();anIterator.Next()) - { - Handle(Standard_Transient) aTransient = anIterator.Key(); - Handle(AIS_InteractiveObject) anObject = Handle(AIS_InteractiveObject)::DownCast(aTransient); - - if (!anObject.IsNull()) - { - myPrsmgr->Erase(anObject); - mySelectionManager - ->Deactivate(Handle(AIS_InteractiveObject)::DownCast(anObject),mySelector); - } - else - { - Standard_CString ObjectTypeName = aTransient->DynamicType()->Name(); - } - } - myViewer->Update(); -} diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_InteractiveContext.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_InteractiveContext.h deleted file mode 100755 index 76ca1b3840..0000000000 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_InteractiveContext.h +++ /dev/null @@ -1,98 +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 _ISession2D_InteractiveContext_HeaderFile -#define _ISession2D_InteractiveContext_HeaderFile - -#include <Standard_Macro.hxx> -#include <Standard_DefineHandle.hxx> - -#include <Handle_V2d_Viewer.hxx> -#include <Handle_PrsMgr_PresentationManager2d.hxx> -#include <Handle_SelectMgr_SelectionManager.hxx> -#include <Handle_StdSelect_ViewerSelector2d.hxx> -#include <MMgt_TShared.hxx> -#include <Handle_SelectMgr_SelectableObject.hxx> -#include <Standard_Boolean.hxx> -#include <Handle_V2d_View.hxx> -#include <Graphic2d_Buffer.hxx> - -class V2d_Viewer; -class PrsMgr_PresentationManager2d; -class SelectMgr_SelectionManager; -#include <StdSelect_ViewerSelector2d.hxx> -class SelectMgr_SelectableObject; -class V2d_View; -#include "TColStd_MapOfTransient.hxx" -DEFINE_STANDARD_HANDLE(ISession2D_InteractiveContext,MMgt_TShared) -class ISession2D_InteractiveContext : public MMgt_TShared { - -public: - void EraseAll(); - - // Methods PUBLIC - // -ISession2D_InteractiveContext(); -ISession2D_InteractiveContext(const Handle(V2d_Viewer)& aViewer); -void Initialize(const Handle(V2d_Viewer)& aViewer) ; -void Display(const Handle(AIS_InteractiveObject)& anObject,const Standard_Boolean Redraw = Standard_True) ; -void Erase(const Handle(AIS_InteractiveObject)& anObject,const Standard_Boolean Redraw = Standard_True) ; -virtual void Move(const Handle(V2d_View)& aView,const Standard_Integer x1,const Standard_Integer y1) ; -void Pick(const Handle(V2d_View)& aView, - const Standard_Integer x1, - const Standard_Integer y1); - -void DisplayAreas() ; -void ClearAreas() ; - -DEFINE_STANDARD_RTTI(ISession2D_InteractiveContext) - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - TColStd_MapOfTransient myMapOfObject; - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Handle(V2d_Viewer) myViewer; -Handle_PrsMgr_PresentationManager2d myPrsmgr; -Handle_SelectMgr_SelectionManager mySelectionManager; -Handle_StdSelect_ViewerSelector2d mySelector; - - -// for dynamic selection -Handle(Graphic2d_Buffer) aBuffer; - - -}; - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_SensitiveCurve.cpp b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_SensitiveCurve.cpp index 01758fa183..ea39087579 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_SensitiveCurve.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_SensitiveCurve.cpp @@ -4,17 +4,8 @@ #include <ISession2D_SensitiveCurve.h> -IMPLEMENT_STANDARD_HANDLE(ISession2D_SensitiveCurve,Select2D_SensitiveEntity) -IMPLEMENT_STANDARD_RTTIEXT(ISession2D_SensitiveCurve,Select2D_SensitiveEntity) - -#include <Bnd_Box2d.hxx> -#include <gp_Lin2d.hxx> -#include <gp_Dir2d.hxx> -#include <gp_Vec2d.hxx> -#include <TColgp_Array1OfPnt2d.hxx> -#include <SelectBasics_BasicTool.hxx> -#include "GCPnts_TangentialDeflection.hxx" -#include "Geom2dAdaptor_Curve.hxx" +IMPLEMENT_STANDARD_HANDLE(ISession2D_SensitiveCurve,Select3D_SensitiveEntity) +IMPLEMENT_STANDARD_RTTIEXT(ISession2D_SensitiveCurve,Select3D_SensitiveEntity) //===================================================== // Function : Create @@ -27,7 +18,7 @@ ISession2D_SensitiveCurve(const Handle(SelectBasics_EntityOwner)& OwnerId, const Handle(Geom2d_Curve)& C, const Standard_Real CDeflect, const Standard_Integer MaxRect): -Select2D_SensitiveEntity(OwnerId), +Select3D_SensitiveEntity(OwnerId), myMaxRect(MaxRect), myCurve(C), myCDeflect(CDeflect) diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_SensitiveCurve.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_SensitiveCurve.h index f30ceae72b..6daa3b4501 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_SensitiveCurve.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_SensitiveCurve.h @@ -21,8 +21,8 @@ #include <Standard_Integer.hxx> #include <gp_Pnt2d.hxx> -#include <Select2D_SensitiveEntity.hxx> -#include <Handle_SelectBasics_EntityOwner.hxx> +#include <Select3D_SensitiveEntity.hxx> +#include <SelectBasics_EntityOwner.hxx> #include <Standard_Boolean.hxx> #include <Standard_Real.hxx> class SelectBasics_EntityOwner; @@ -32,57 +32,38 @@ class gp_Pnt2d; #include <Geom2d_Curve.hxx> -DEFINE_STANDARD_HANDLE(ISession2D_SensitiveCurve,Select2D_SensitiveEntity) -class ISession2D_SensitiveCurve : public Select2D_SensitiveEntity { +DEFINE_STANDARD_HANDLE(ISession2D_SensitiveCurve,Select3D_SensitiveEntity) +class ISession2D_SensitiveCurve : public Select3D_SensitiveEntity { public: // Methods PUBLIC // -Standard_EXPORT ISession2D_SensitiveCurve(const Handle(SelectBasics_EntityOwner)& OwnerId, - const Handle(Geom2d_Curve)& C, - const Standard_Real CDeflect, - const Standard_Integer MaxRect = 3); -inline void SetMaxBoxes(const Standard_Integer MaxRect) ; -inline virtual Standard_Integer MaxBoxes() const; + Standard_EXPORT ISession2D_SensitiveCurve(const Handle(SelectBasics_EntityOwner)& OwnerId, + const Handle(Geom2d_Curve)& C, + const Standard_Real CDeflect, + const Standard_Integer MaxRect = 3); + inline void SetMaxBoxes(const Standard_Integer MaxRect) ; + inline virtual Standard_Integer MaxBoxes() const; -inline void SetCurve(const Handle(Geom2d_Curve) aCurve) ; -inline Handle(Geom2d_Curve) GetCurve() ; + inline void SetCurve(const Handle(Geom2d_Curve) aCurve) ; + inline Handle(Geom2d_Curve) GetCurve() ; -void Compute(); + void Compute(); + Standard_EXPORT void Areas(SelectBasics_ListOfBox2d& aSeq) ; + Standard_EXPORT Standard_Boolean Matches(const Standard_Real XMin,const Standard_Real YMin,const Standard_Real XMax,const Standard_Real YMax,const Standard_Real aTol) ; + Standard_EXPORT Standard_Boolean Matches(const Standard_Real X,const Standard_Real Y,const Standard_Real aTol,Standard_Real& DMin) ; + Handle(TColgp_HArray1OfPnt2d) SensitivePolygon(); -Standard_EXPORT void Areas(SelectBasics_ListOfBox2d& aSeq) ; - -Standard_EXPORT Standard_Boolean Matches(const Standard_Real XMin,const Standard_Real YMin,const Standard_Real XMax,const Standard_Real YMax,const Standard_Real aTol) ; -Standard_EXPORT Standard_Boolean Matches(const Standard_Real X,const Standard_Real Y,const Standard_Real aTol,Standard_Real& DMin) ; - -Handle(TColgp_HArray1OfPnt2d) SensitivePolygon(); - -DEFINE_STANDARD_RTTI(ISession2D_SensitiveCurve) - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - + DEFINE_STANDARD_RTTI(ISession2D_SensitiveCurve) private: - - // Methods PRIVATE - // - - // Fields PRIVATE // -Standard_Real myCDeflect; -Standard_Integer myMaxRect; -Handle(Geom2d_Curve) myCurve; - +Standard_Real myCDeflect; +Standard_Integer myMaxRect; +Handle(Geom2d_Curve) myCurve; Handle(TColgp_HArray1OfPnt2d) myPolyP2d; }; @@ -102,8 +83,4 @@ inline Handle(Geom2d_Curve) ISession2D_SensitiveCurve:: GetCurve() {return myCurve;} -// other inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.cpp b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.cpp index 646581857d..1672c91961 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.cpp @@ -9,9 +9,6 @@ IMPLEMENT_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject) IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) -#include "StdPrs_Curve.hxx" -#include "GeomAdaptor_Curve.hxx" -#include "StdPrs_PoleCurve.hxx" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.h index b5f2c9b258..eaed619246 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.h @@ -16,16 +16,18 @@ DEFINE_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject) class ISession_Curve : public AIS_InteractiveObject { public: - ISession_Curve(Handle(Geom_Curve)& aCurve); - virtual ~ISession_Curve(); -DEFINE_STANDARD_RTTI(ISession_Curve) + ISession_Curve(Handle(Geom_Curve)& aCurve); + virtual ~ISession_Curve(); + + DEFINE_STANDARD_RTTI(ISession_Curve) + private: -Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; -Standard_EXPORT virtual void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation) ; -void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; + Standard_EXPORT virtual void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation) ; + void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; -Handle(Geom_Curve) myCurve; + Handle(Geom_Curve) myCurve; }; #endif // !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.cpp b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.cpp index 9091678613..1fa107de3c 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.cpp @@ -14,11 +14,6 @@ static char THIS_FILE[]=__FILE__; IMPLEMENT_STANDARD_HANDLE(ISession_Direction,AIS_InteractiveObject) IMPLEMENT_STANDARD_RTTIEXT(ISession_Direction,AIS_InteractiveObject) -#include "Graphic2d_SetOfSegments.hxx" -#include "gp_Vec2d.hxx" -#include "DsgPrs_LengthPresentation.hxx" -#include "Prs3d_ArrowAspect.hxx" - ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// @@ -84,31 +79,6 @@ void ISession_Direction::Compute(const Handle(Prs3d_Projector)& aProjector, { } -void ISession_Direction::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, - const Handle(Graphic2d_GraphicObject)& aGrObj, - const Standard_Integer aMode) -{ - Handle(Graphic2d_SetOfSegments) segment; - segment = new Graphic2d_SetOfSegments(aGrObj); - - segment->Add(myPnt.X(), - myPnt.Y(), - myPnt.X()+myLength*myDir.X(), - myPnt.Y()+myLength*myDir.Y()); - - gp_Dir2d aFirstDir = gp_Dir2d(myDir.X(),myDir.Y()).Rotated (200*M_PI/180) ; - segment->Add(myPnt.X()+myLength*myDir.X(), - myPnt.Y()+myLength*myDir.Y(), - myPnt.X()+myLength*myDir.X()+ myLength*aFirstDir.X()/5 , - myPnt.Y()+myLength*myDir.Y()+ myLength*aFirstDir.Y()/5 ); - - gp_Dir2d aSecondDir = gp_Dir2d(myDir.X(),myDir.Y()).Rotated (-200*M_PI/180) ; - segment->Add(myPnt.X()+myLength*myDir.X(), - myPnt.Y()+myLength*myDir.Y(), - myPnt.X()+myLength*myDir.X()+ myLength*aSecondDir.X()/5 , - myPnt.Y()+myLength*myDir.Y()+ myLength*aSecondDir.Y()/5 ); - -} void ISession_Direction::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) { diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.h index 76e760cce0..5871c8de1b 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.h @@ -14,17 +14,17 @@ DEFINE_STANDARD_HANDLE(ISession_Direction,AIS_InteractiveObject) class ISession_Direction : public AIS_InteractiveObject { public: - TCollection_ExtendedString myText; - void SetText(TCollection_ExtendedString& aText); - ISession_Direction(); - ISession_Direction(gp_Pnt& aPnt,gp_Dir& aDir,Standard_Real aLength=1,Standard_Real anArrowLength=1); - ISession_Direction(gp_Pnt& aPnt,gp_Vec& aVec,Standard_Real anArrowLength=1); + TCollection_ExtendedString myText; + void SetText(TCollection_ExtendedString& aText); + ISession_Direction(); + ISession_Direction(gp_Pnt& aPnt,gp_Dir& aDir,Standard_Real aLength=1,Standard_Real anArrowLength=1); + ISession_Direction(gp_Pnt& aPnt,gp_Vec& aVec,Standard_Real anArrowLength=1); - ISession_Direction(gp_Pnt2d& aPnt2d,gp_Dir2d& aDir2d,Standard_Real aLength=1); - ISession_Direction(gp_Pnt2d& aPnt2d,gp_Vec2d& aVec2d); + ISession_Direction(gp_Pnt2d& aPnt2d,gp_Dir2d& aDir2d,Standard_Real aLength=1); + ISession_Direction(gp_Pnt2d& aPnt2d,gp_Vec2d& aVec2d); - virtual ~ISession_Direction(); - DEFINE_STANDARD_RTTI(ISession_Direction) + virtual ~ISession_Direction(); + DEFINE_STANDARD_RTTI(ISession_Direction) private: @@ -33,9 +33,6 @@ private: const Standard_Integer aMode); void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) ; - virtual void Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, - const Handle(Graphic2d_GraphicObject)& aGrObj, - const Standard_Integer aMode = 0) ; void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; gp_Pnt myPnt; diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.cpp b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.cpp index 73f8dab8f7..d522177c01 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.cpp @@ -14,9 +14,6 @@ static char THIS_FILE[]=__FILE__; IMPLEMENT_STANDARD_HANDLE(ISession_Point,AIS_InteractiveObject) IMPLEMENT_STANDARD_RTTIEXT(ISession_Point,AIS_InteractiveObject) -#include "Graphic2d_CircleMarker.hxx" -#include "StdPrs_Point.hxx" -#include "Geom_CartesianPoint.hxx" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// @@ -58,14 +55,6 @@ void ISession_Point::Compute(const Handle(Prs3d_Projector)& aProjector, { } -void ISession_Point::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, - const Handle(Graphic2d_GraphicObject)& aGrObj, - const Standard_Integer unMode) -{ - Handle(Graphic2d_CircleMarker) aCircleMarker; - aCircleMarker = new Graphic2d_CircleMarker(aGrObj,myPoint.X(),myPoint.Y(),0,0,1); -} - void ISession_Point::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer unMode) { diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.h index b80e9cdf78..d372fb1c5a 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.h @@ -17,28 +17,25 @@ DEFINE_STANDARD_HANDLE(ISession_Point,AIS_InteractiveObject) class ISession_Point : public AIS_InteractiveObject { public: - ISession_Point(); - ISession_Point(Standard_Real X,Standard_Real Y ,Standard_Real Z); - ISession_Point(gp_Pnt2d& aPoint,Standard_Real Elevation = 0); - ISession_Point(gp_Pnt& aPoint); - - virtual ~ISession_Point(); - DEFINE_STANDARD_RTTI(ISession_Point) + ISession_Point(); + ISession_Point(Standard_Real X,Standard_Real Y ,Standard_Real Z); + ISession_Point(gp_Pnt2d& aPoint,Standard_Real Elevation = 0); + ISession_Point(gp_Pnt& aPoint); + virtual ~ISession_Point(); + DEFINE_STANDARD_RTTI(ISession_Point) private : -void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode); -void Compute (const Handle(Prs3d_Projector)& aProjector, - const Handle(Prs3d_Presentation)& aPresentation) ; -void Compute (const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, - const Handle(Graphic2d_GraphicObject)& aGrObj, - const Standard_Integer unMode = 0) ; -void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer unMode) ; + void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, + const Handle(Prs3d_Presentation)& aPresentation, + const Standard_Integer aMode); + void Compute (const Handle(Prs3d_Projector)& aProjector, + const Handle(Prs3d_Presentation)& aPresentation); -gp_Pnt myPoint; + void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, + const Standard_Integer unMode); + + gp_Pnt myPoint; }; diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp index 52bc60a974..f53d06a652 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp @@ -14,15 +14,6 @@ static char THIS_FILE[]=__FILE__; IMPLEMENT_STANDARD_HANDLE(ISession_Surface,AIS_InteractiveObject) IMPLEMENT_STANDARD_RTTIEXT(ISession_Surface,AIS_InteractiveObject) -#include "GeomAdaptor_Surface.hxx" -#include "StdPrs_WFSurface.hxx" -#include "StdPrs_WFPoleSurface.hxx" -#include "GeomAdaptor_HSurface.hxx" -#include "AIS_Drawer.hxx" -#include "Prs3d_IsoAspect.hxx" -#include "StdPrs_WFDeflectionShape.hxx" -#include "StdPrs_ShadedSurface.hxx" - ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.h index 1844d8741f..c8c2b13ac2 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.h @@ -23,9 +23,9 @@ public: DEFINE_STANDARD_RTTI(ISession_Surface) private: -Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; -Standard_EXPORT virtual void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation) ; -void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; +Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0); +Standard_EXPORT virtual void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation); +void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode); Handle(Geom_Surface) mySurface; diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.cpp b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.cpp index b7434b8dc8..5d010a53a6 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.cpp @@ -14,20 +14,6 @@ static char THIS_FILE[]=__FILE__; IMPLEMENT_STANDARD_HANDLE(ISession_Text,AIS_InteractiveObject) IMPLEMENT_STANDARD_RTTIEXT(ISession_Text,AIS_InteractiveObject) -#include <Graphic2d_Text.hxx> -#include <Select2D_SensitiveBox.hxx> -#include <Graphic2d_Segment.hxx> -#include <OSD_Environment.hxx> -#include <Graphic2d_View.hxx> -#include <Graphic2d_Drawer.hxx> -#include "PrsMgr_PresentationManager2d.hxx" -#include "SelectMgr_Selection.hxx" -#include "Graphic2d_Array1OfVertex.hxx" -#include "Graphic2d_Polyline.hxx" -#include "Graphic2d_Vertex.hxx" -#include "Graphic2d_DisplayList.hxx" -#include "Prs3d_Text.hxx" - ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// @@ -37,7 +23,6 @@ ISession_Text::ISession_Text() } - ISession_Text::ISession_Text (const TCollection_AsciiString& aText, const Standard_Real anX , // = 0 @@ -52,7 +37,9 @@ ISession_Text::ISession_Text :AIS_InteractiveObject(),MyText(aText),MyX(anX),MyY(anY),MyZ(aZ), MyTypeOfText(aType),MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex), MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0) -{} +{ + +} ISession_Text::ISession_Text (const TCollection_AsciiString& aText, @@ -66,9 +53,9 @@ ISession_Text::ISession_Text :AIS_InteractiveObject(),MyText(aText),MyX(aPoint.X()),MyY(aPoint.Y()),MyZ(aPoint.Z()), MyTypeOfText(aType),MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex), MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0) -{} - +{ +} ISession_Text::~ISession_Text() { @@ -87,25 +74,6 @@ void ISession_Text::Compute(const Handle(Prs3d_Projector)& aProjector, { } -void ISession_Text::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, - const Handle(Graphic2d_GraphicObject)& aGrObj, - const Standard_Integer unMode) -{ - Handle(Graphic2d_Text) text; - text = new Graphic2d_Text(aGrObj, MyText, MyX, MyY, MyAngle,MyTypeOfText,MyScale); - text->SetFontIndex(MyFontIndex); - - text->SetColorIndex(MyColorIndex); - - text->SetSlant(MySlant); - text->SetUnderline(Standard_False); - text->SetZoomable(Standard_True); - aGrObj->Display(); - Quantity_Length anXoffset,anYoffset; - text->TextSize(MyWidth, MyHeight,anXoffset,anYoffset); - -} - void ISession_Text::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer unMode) { diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.h index a195ac2e9e..b7e6ccbd43 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.h @@ -11,24 +11,20 @@ #include <Standard_Macro.hxx> #include <Standard_DefineHandle.hxx> - #include <TCollection_AsciiString.hxx> #include <Aspect_TypeOfText.hxx> #include <Standard_Real.hxx> #include <Standard_Integer.hxx> #include <Quantity_Factor.hxx> #include <Quantity_PlaneAngle.hxx> -#include <Handle_PrsMgr_PresentationManager2d.hxx> -#include <Handle_Graphic2d_GraphicObject.hxx> -#include <Handle_SelectMgr_Selection.hxx> +#include <PrsMgr_PresentationManager3d.hxx> +#include <SelectMgr_Selection.hxx> #include <Standard_OStream.hxx> #include <Standard_IStream.hxx> #include <Standard_CString.hxx> #include <SelectMgr_SelectableObject.hxx> class TCollection_AsciiString; -class PrsMgr_PresentationManager2d; -class Graphic2d_GraphicObject; class SelectMgr_Selection; DEFINE_STANDARD_HANDLE(ISession_Text,AIS_InteractiveObject) @@ -80,32 +76,15 @@ inline void SetScale (const Quantity_Factor aNewScale) ; DEFINE_STANDARD_RTTI(ISession_Text) - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - private: - // Methods PRIVATE - // - -void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode); -void Compute (const Handle(Prs3d_Projector)& aProjector, - const Handle(Prs3d_Presentation)& aPresentation); -void Compute (const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, - const Handle(Graphic2d_GraphicObject)& aGrObj, - const Standard_Integer unMode = 0) ; -void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer unMode) ; + void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, + const Handle(Prs3d_Presentation)& aPresentation, + const Standard_Integer aMode); + void Compute (const Handle(Prs3d_Projector)& aProjector, + const Handle(Prs3d_Presentation)& aPresentation); + void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, + const Standard_Integer unMode) ; // Fields PRIVATE diff --git a/samples/mfc/standard/01_Geometry/src/MainFrm.cpp b/samples/mfc/standard/01_Geometry/src/MainFrm.cpp index 4b69f36c40..fe5757a1bf 100755 --- a/samples/mfc/standard/01_Geometry/src/MainFrm.cpp +++ b/samples/mfc/standard/01_Geometry/src/MainFrm.cpp @@ -18,17 +18,17 @@ static char THIS_FILE[] = __FILE__; IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) - //{{AFX_MSG_MAP(CMainFrame) - ON_WM_CREATE() - //}}AFX_MSG_MAP + //{{AFX_MSG_MAP(CMainFrame) + 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, + ID_SEPARATOR, // status line indicator + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL, }; ///////////////////////////////////////////////////////////////////////////// @@ -36,8 +36,6 @@ static UINT indicators[] = CMainFrame::CMainFrame() { - // TODO: add member initialization code here - } CMainFrame::~CMainFrame() @@ -46,58 +44,57 @@ CMainFrame::~CMainFrame() int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { - if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) - return -1; - - if (!m_wndToolBar.Create(this) || - !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } - if (!m_wndToolBar2.Create(this) || - !m_wndToolBar2.LoadToolBar(IDR_MAINFRAME2)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } + if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; - 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 - } + if (!m_wndToolBar.Create(this) || + !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + if (!m_wndToolBar2.Create(this) || + !m_wndToolBar2.LoadToolBar(IDR_MAINFRAME2)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } - // TODO: Remove this if you don't want tool tips or a resizeable toolbar - m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | - CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + 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); + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); - // TODO: Remove this if you don't want tool tips or a resizeable toolbar - m_wndToolBar2.SetBarStyle(m_wndToolBar2.GetBarStyle() | - CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + // 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); - // TODO: Delete these three lines if you don't want the toolbar to - // be dockable - m_wndToolBar2.EnableDocking(CBRS_ALIGN_ANY); - EnableDocking(CBRS_ALIGN_ANY); - DockControlBar(&m_wndToolBar2); - return 0; + // TODO: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBar2.SetBarStyle(m_wndToolBar2.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + + // TODO: Delete these three lines if you don't want the toolbar to + // be dockable + m_wndToolBar2.EnableDocking(CBRS_ALIGN_ANY); + EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndToolBar2); + return 0; } BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { - // TODO: Modify the Window class or styles here by modifying - // the CREATESTRUCT cs - - return CMDIFrameWnd::PreCreateWindow(cs); + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + return CMDIFrameWnd::PreCreateWindow(cs); } ///////////////////////////////////////////////////////////////////////////// @@ -106,12 +103,12 @@ BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) #ifdef _DEBUG void CMainFrame::AssertValid() const { - CMDIFrameWnd::AssertValid(); + CMDIFrameWnd::AssertValid(); } void CMainFrame::Dump(CDumpContext& dc) const { - CMDIFrameWnd::Dump(dc); + CMDIFrameWnd::Dump(dc); } #endif //_DEBUG diff --git a/samples/mfc/standard/01_Geometry/src/MainFrm.h b/samples/mfc/standard/01_Geometry/src/MainFrm.h index 3ddc1e6cae..de34ccb4ba 100755 --- a/samples/mfc/standard/01_Geometry/src/MainFrm.h +++ b/samples/mfc/standard/01_Geometry/src/MainFrm.h @@ -11,41 +11,39 @@ class CMainFrame : public CMDIFrameWnd { - DECLARE_DYNAMIC(CMainFrame) + DECLARE_DYNAMIC(CMainFrame) public: - CMainFrame(); + CMainFrame(); -// Attributes + // Attributes public: -// Operations + // Operations public: -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CMainFrame) - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - //}}AFX_VIRTUAL + // Overrides + // ClassWizard generated virtual function overrides + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); -// Implementation + // Implementation public: - virtual ~CMainFrame(); + virtual ~CMainFrame(); #ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; #endif protected: // control bar embedded members - CStatusBar m_wndStatusBar; - CToolBar m_wndToolBar; - CToolBar m_wndToolBar2; + CStatusBar m_wndStatusBar; + CToolBar m_wndToolBar; + CToolBar m_wndToolBar2; -// Generated message map functions + // Generated message map functions protected: - //{{AFX_MSG(CMainFrame) - afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/01_Geometry/src/StdAfx.h b/samples/mfc/standard/01_Geometry/src/StdAfx.h index be68658145..a63cc69cf2 100755 --- a/samples/mfc/standard/01_Geometry/src/StdAfx.h +++ b/samples/mfc/standard/01_Geometry/src/StdAfx.h @@ -83,181 +83,193 @@ #include <AIS_InteractiveContext.hxx> #include <AIS_Shape.hxx> -//#include <AIS_Trihedron.hxx> +#include <AIS_Point.hxx> +#include <AIS_Drawer.hxx> +#include <Aspect_Grid.hxx> +#include <Aspect_Window.hxx> +#include <Aspect_Background.hxx> + #include <BRepAlgo.hxx> #include <BRep_Builder.hxx> +#include <BRepBuilderAPI_MakeVertex.hxx> +#include <BRepBuilderAPI_MakeFace.hxx> #include <BRepTools.hxx> -#include <Graphic3d_WNTGraphicDevice.hxx> -#include <TopExp_Explorer.hxx> -#include <TopoDS_Compound.hxx> +#include <Bnd_Box2d.hxx> +#include <BndLib.hxx> +#include <BndLib_Add2dCurve.hxx> +#include <BndLib_Add3dCurve.hxx> +#include <BndLib_AddSurface.hxx> +#include <BRep_Tool.hxx> +#include <BRepMesh.hxx> + +#include <DsgPrs_LengthPresentation.hxx> +#include <FairCurve_Batten.hxx> +#include <FairCurve_MinimalVariation.hxx> + +#include <GC_MakeCircle.hxx> +#include <GC_MakeTranslation.hxx> +#include <GC_MakeSegment.hxx> +#include <GC_MakeConicalSurface.hxx> +#include <GC_MakePlane.hxx> +#include <GC_MakeEllipse.hxx> +#include <GccAna_Circ2d2TanRad.hxx> +#include <GccAna_Lin2d2Tan.hxx> +#include <GccAna_Pnt2dBisec.hxx> +#include <GccEnt.hxx> +#include <GccEnt_QualifiedCirc.hxx> +#include <GccEnt_QualifiedLin.hxx> +#include <gce_MakeCirc2d.hxx> +#include <gce_MakeLin2d.hxx> +#include <GCE2d_MakeSegment.hxx> +#include <GCE2d_MakeParabola.hxx> +#include <GCE2d_MakeEllipse.hxx> +#include <GCE2d_MakeArcOfCircle.hxx> +#include <GCE2d_MakeArcOfEllipse.hxx> +#include <GCPnts_AbscissaPoint.hxx> +#include <GCPnts_QuasiUniformDeflection.hxx> +#include <GCPnts_TangentialDeflection.hxx> +#include <GCPnts_UniformAbscissa.hxx> +#include <Geom_BezierSurface.hxx> +#include <Geom_BSplineCurve.hxx> +#include <Geom_BSplineSurface.hxx> +#include <Geom_CartesianPoint.hxx> +#include <Geom_Circle.hxx> +#include <Geom_Curve.hxx> +#include <Geom_Line.hxx> +#include <Geom_Plane.hxx> +#include <Geom_RectangularTrimmedSurface.hxx> +#include <Geom_Surface.hxx> +#include <Geom_SphericalSurface.hxx> +#include <Geom_Transformation.hxx> +#include <Geom_TrimmedCurve.hxx> +#include <Geom_OffsetSurface.hxx> +#include <Geom_SurfaceOfLinearExtrusion.hxx> +#include <Geom_SurfaceOfRevolution.hxx> +#include <Geom2dAPI_ExtremaCurveCurve.hxx> +#include <Geom2dAPI_InterCurveCurve.hxx> +#include <Geom2dAPI_Interpolate.hxx> +#include <Geom2dAPI_PointsToBSpline.hxx> +#include <Geom2d_OffsetCurve.hxx> +#include <Geom2d_Circle.hxx> +#include <Geom2d_Curve.hxx> +#include <Geom2d_Ellipse.hxx> +#include <Geom2d_Line.hxx> +#include <Geom2d_TrimmedCurve.hxx> +#include <Geom2d_BezierCurve.hxx> +#include <Geom2d_BSplineCurve.hxx> +#include <Geom2d_Parabola.hxx> +#include <Geom2dAdaptor_Curve.hxx> +#include <Geom2dConvert.hxx> +#include <Geom2dLProp_Curve2dTool.hxx> +#include <Geom2dLProp_CLProps2d.hxx> +#include <GeomAbs_CurveType.hxx> +#include <GeomAdaptor_Curve.hxx> +#include <GeomAdaptor_HCurve.hxx> +#include <GeomAdaptor_Surface.hxx> +#include <GeomAdaptor_HSurface.hxx> +#include <GeomAPI.hxx> +#include <GeomAPI_ExtremaSurfaceSurface.hxx> +#include <GeomAPI_IntCS.hxx> +#include <GeomAPI_PointsToBSplineSurface.hxx> +#include <GeomAPI_PointsToBSpline.hxx> +#include <GeomAPI_ProjectPointOnSurf.hxx> +#include <GeomAPI_ProjectPointOnCurve.hxx> +#include <GeomAPI_Interpolate.hxx> +#include <GeomConvert.hxx> +#include <GeomConvert_CompBezierSurfacesToBSplineSurface.hxx> +#include <GeomFill_ConstrainedFilling.hxx> +#include <GeomFill_SimpleBound.hxx> +#include <GeomFill_FillingStyle.hxx> +#include <GeomFill_BSplineCurves.hxx> +#include <GeomFill_Pipe.hxx> +#include <GeomLib.hxx> +#include <GeomPlate_BuildPlateSurface.hxx> +#include <GeomPlate_PointConstraint.hxx> +#include <GeomPlate_MakeApprox.hxx> +#include <GeomTools.hxx> +#include <GeomTools_Curve2dSet.hxx> +#include <Graphic3d_Group.hxx> +#include <Graphic3d_Array1OfVertex.hxx> +#include <Graphic3d_ArrayOfPolylines.hxx> +#include <GProp_PEquation.hxx> +#include <gp.hxx> +#include <gp_Ax2d.hxx> +#include <gp_Circ2d.hxx> +#include <gp_Dir2d.hxx> +#include <gp_Dir.hxx> +#include <gp_Elips.hxx> +#include <gp_Lin.hxx> +#include <gp_Lin2d.hxx> +#include <gp_Mat.hxx> +#include <gp_Parab2d.hxx> +#include <gp_Pln.hxx> +#include <gp_Pnt2d.hxx> +#include <gp_Trsf.hxx> +#include <gp_Vec2d.hxx> + +#include <IntAna_IntConicQuad.hxx> + +#include <OSD_Environment.hxx> + +#include <Poly_Triangulation.hxx> +#include <Precision.hxx> +#include <Prs3d_Root.hxx> +#include <Prs3d_Text.hxx> +#include <Prs3d_ArrowAspect.hxx> +#include <Prs3d_IsoAspect.hxx> +#include <PrsMgr_PresentationManager3d.hxx> +#include <Prs3d_IsoAspect.hxx> +#include <Prs3d_TextAspect.hxx> +#include <Prs3d_PointAspect.hxx> + +#include <SelectMgr_EntityOwner.hxx> +#include <SelectMgr_SelectableObject.hxx> +#include <SelectMgr_Selection.hxx> +#include <SelectMgr_SelectionManager.hxx> +#include <SelectBasics_BasicTool.hxx> +#include <ShapeAnalysis_FreeBounds.hxx> +#include <ShapeFix_Shape.hxx> +#include <StdSelect_ViewerSelector3d.hxx> +#include <StdPrs_WFDeflectionShape.hxx> +#include <StdPrs_ShadedSurface.hxx> +#include <StdPrs_Point.hxx> +#include <StdPrs_WFSurface.hxx> +#include <StdPrs_WFPoleSurface.hxx> +#include <StdPrs_Curve.hxx> +#include <StdPrs_PoleCurve.hxx> +#include <Standard_ErrorHandler.hxx> + +#include <TColStd_MapIteratorOfMapOfTransient.hxx> +#include <TColgp_Array1OfPnt.hxx> +#include <TColgp_Array2OfPnt.hxx> +#include <TColgp_Array1OfPnt2d.hxx> +#include <TColgp_Array2OfPnt2d.hxx> +#include <TColgp_HArray1OfPnt.hxx> +#include <TColgp_HArray1OfPnt2d.hxx> +#include <TColgp_SequenceOfPnt.hxx> +#include <TColgp_SequenceOfPnt2d.hxx> +#include <TColGeom_Array2OfBezierSurface.hxx> +#include <TColStd_HArray1OfInteger.hxx> #include <TopoDS_Shape.hxx> #include <TopoDS_Solid.hxx> #include <TopoDS.hxx> +#include <TopoDS_ListIteratorOfListOfShape.hxx> +#include <TopExp.hxx> +#include <TopExp_Explorer.hxx> +#include <TopoDS_Compound.hxx> +#include <TopoDS_Wire.hxx> +#include <TopoDS_Builder.hxx> +#include <TopoDS_Vertex.hxx> +#include <TopoDS_Shape.hxx> +#include <TopoDS_Face.hxx> +#include <TopTools_IndexedMapOfShape.hxx> + #include <V3d_Viewer.hxx> #include <V3d_View.hxx> #include <WNT_Window.hxx> - -#include <Standard_ErrorHandler.hxx> -#include <TopoDS_Shape.hxx> -#include <TopoDS_Solid.hxx> -#include <TopoDS.hxx> -#include <TopExp_Explorer.hxx> -//#include <ShapeTool_Face.hxx> -//#include <ShapeTool_PCurves.hxx> -//#include <ShapeTool_Reshape.hxx> -//#include <ShapeTool_ShellSolid.hxx> -#include <TopoDS_ListIteratorOfListOfShape.hxx> - -#include "WNT_WDriver.hxx" -#include "V2d_View.hxx" -#include "V2d_Viewer.hxx" - - -//#include "UnitsAPI.hxx" - - -#include "GProp_PEquation.hxx" -#include "gp.hxx" -#include "TColgp_Array1OfPnt.hxx" -#include "Geom2d_Circle.hxx" -#include "gp_Vec2d.hxx" -#include "Geom2d_Circle.hxx" -#include "Geom2dLProp_Curve2dTool.hxx" - -#include "Geom2dLProp_CLProps2d.hxx" -#include "gp_Dir.hxx" -#include "Precision.hxx" -#include "GCPnts_AbscissaPoint.hxx" -#include "Geom2dAdaptor_Curve.hxx" -#include "GCPnts_UniformAbscissa.hxx" -#include "Geom_SphericalSurface.hxx" -#include "Geom_Circle.hxx" -#include "GC_MakeTranslation.hxx" -#include "Geom_Transformation.hxx" -#include "GC_MakeCircle.hxx" -#include "gp_Mat.hxx" -#include "GeomAPI_IntCS.hxx" -#include "GC_MakeSegment.hxx" -#include "GC_MakeConicalSurface.hxx" -#include "gp_Lin.hxx" -#include "Geom2d_Ellipse.hxx" -#include "GCE2d_MakeEllipse.hxx" -#include "GCE2d_MakeArcOfEllipse.hxx" -#include "TColgp_HArray1OfPnt.hxx" -#include "Geom_BSplineCurve.hxx" -#include "GeomAPI_PointsToBSpline.hxx" -#include "GeomAPI_Interpolate.hxx" -#include "GccEnt_QualifiedLin.hxx" -#include "GccAna_Circ2d2TanRad.hxx" -#include "gce_MakeCirc2d.hxx" -#include "GccEnt.hxx" -#include "GccAna_Lin2d2Tan.hxx" -#include "GccEnt_QualifiedCirc.hxx" -#include "gce_MakeLin2d.hxx" -#include "Geom2d_OffsetCurve.hxx" -#include "Geom2dAPI_InterCurveCurve.hxx" -#include "Geom2dAPI_ExtremaCurveCurve.hxx" -#include "GeomAPI.hxx" -#include "Geom2d_TrimmedCurve.hxx" -#include "GCE2d_MakeSegment.hxx" -#include "Geom2dConvert.hxx" -#include "TColgp_Array1OfPnt2d.hxx" -#include "TColgp_HArray1OfPnt2d.hxx" -#include "gp_Parab2d.hxx" -#include "gp_Trsf.hxx" -#include "gp_Pln.hxx" -#include "gp_Elips.hxx" -#include "IntAna_IntConicQuad.hxx" -#include "GeomAPI_ProjectPointOnSurf.hxx" -#include "GeomAPI_ProjectPointOnCurve.hxx" -#include "Geom2dAPI_PointsToBSpline.hxx" -#include "Geom2dAPI_Interpolate.hxx" -#include "GccAna_Pnt2dBisec.hxx" -#include "BRepBuilderAPI_MakeVertex.hxx" -#include "BRepBuilderAPI_MakeFace.hxx" - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// -#include "GeomTools.hxx" - -#include "TColgp_SequenceOfPnt2d.hxx" -#include "GC_MakePlane.hxx" -#include "GC_MakeEllipse.hxx" -#include "Geom_Plane.hxx" -#include "Geom2d_Line.hxx" -#include "Geom_Circle.hxx" -#include "AIS_Drawer.hxx" -#include "Prs3d_IsoAspect.hxx" -#include "GCE2d_MakeArcOfCircle.hxx" -#include "Geom_Line.hxx" -#include "Geom2d_BSplineCurve.hxx" -#include "TColgp_Array2OfPnt2d.hxx" -#include "Geom_RectangularTrimmedSurface.hxx" -#include "GeomFill_FillingStyle.hxx" -#include "GeomFill_BSplineCurves.hxx" -#include "TopoDS_Vertex.hxx" -#include "TopoDS_Shape.hxx" -#include "TopoDS_Face.hxx" - -#include "GeomAdaptor_HCurve.hxx" -#include "GeomFill_SimpleBound.hxx" -#include "GeomFill_Pipe.hxx" -#include "GeomConvert.hxx" -#include "TColgp_Array2OfPnt.hxx" -#include "Geom_BezierSurface.hxx" -#include "TColGeom_Array2OfBezierSurface.hxx" -#include "GeomConvert_CompBezierSurfacesToBSplineSurface.hxx" -#include "TColStd_HArray1OfInteger.hxx" -#include "Geom_OffsetSurface.hxx" -#include "Geom_SurfaceOfLinearExtrusion.hxx" -#include "Geom_SurfaceOfRevolution.hxx" -#include "GeomLib.hxx" -#include "Geom_BSplineSurface.hxx" -#include "Geom2d_Parabola.hxx" -#include "GCE2d_MakeParabola.hxx" -#include "Geom_TrimmedCurve.hxx" -#include "GeomFill_ConstrainedFilling.hxx" - -#include "Geom_Curve.hxx" -#include "Geom_Surface.hxx" -#include "BndLib_Add2dCurve.hxx" -#include "BndLib.hxx" -#include "FairCurve_Batten.hxx" -#include "FairCurve_MinimalVariation.hxx" -#include "Geom2d_Parabola.hxx" -#include "GCE2d_MakeParabola.hxx" -#include "Geom_TrimmedCurve.hxx" -#include "GeomFill_ConstrainedFilling.hxx" -#include <GeomAPI_ExtremaSurfaceSurface.hxx> -#include <TColgp_Array2OfPnt.hxx> -#include <GeomAPI_PointsToBSplineSurface.hxx> -#include <GeomAdaptor_Surface.hxx> -#include <BndLib_AddSurface.hxx> -#include <BndLib_Add3dCurve.hxx> -#include "Prs3d_TextAspect.hxx" -#include "Prs3d_ArrowAspect.hxx" -#include "Prs3d_PointAspect.hxx" -#include <BRepMesh.hxx> -#include <TColgp_SequenceOfPnt.hxx> -#include <BRep_Tool.hxx> -#include <Poly_Triangulation.hxx> -#include <GeomPlate_BuildPlateSurface.hxx> -#include <GeomPlate_PointConstraint.hxx> -#include <GeomPlate_MakeApprox.hxx> -#include <ShapeAnalysis_FreeBounds.hxx> -#include <TopTools_IndexedMapOfShape.hxx> -#include <TopExp.hxx> -#include <TopoDS_Wire.hxx> -#include <TopoDS_Builder.hxx> -#include <ShapeFix_Shape.hxx> -#include <AIS_Point.hxx> -#include <Geom_CartesianPoint.hxx> - #include "ISession2D_Curve.h" #include "ISession_Direction.h" -#include "ISession2D_InteractiveContext.h" #include "ISession_Curve.h" #include "ISession_Surface.h" #include "ISession_Text.h" diff --git a/samples/mfc/standard/02_Modeling/adm/win/vc10/Modeling.vcxproj b/samples/mfc/standard/02_Modeling/adm/win/vc10/Modeling.vcxproj index 420b48e91e..05c235d832 100644 --- a/samples/mfc/standard/02_Modeling/adm/win/vc10/Modeling.vcxproj +++ b/samples/mfc/standard/02_Modeling/adm/win/vc10/Modeling.vcxproj @@ -111,7 +111,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bind/Modeling.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -153,7 +153,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bind/Modeling.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -196,7 +196,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bin/Modeling.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -238,7 +238,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bin/Modeling.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/02_Modeling/adm/win/vc11/Modeling.vcxproj b/samples/mfc/standard/02_Modeling/adm/win/vc11/Modeling.vcxproj index 14ea833ce7..0b258cf15e 100644 --- a/samples/mfc/standard/02_Modeling/adm/win/vc11/Modeling.vcxproj +++ b/samples/mfc/standard/02_Modeling/adm/win/vc11/Modeling.vcxproj @@ -115,7 +115,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bind/Modeling.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -157,7 +157,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bind/Modeling.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -200,7 +200,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bin/Modeling.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -242,7 +242,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bin/Modeling.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/02_Modeling/adm/win/vc8/Modeling.vcproj b/samples/mfc/standard/02_Modeling/adm/win/vc8/Modeling.vcproj index b80aaea03c..53e191c134 100644 --- a/samples/mfc/standard/02_Modeling/adm/win/vc8/Modeling.vcproj +++ b/samples/mfc/standard/02_Modeling/adm/win/vc8/Modeling.vcproj @@ -80,7 +80,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win32\vc8\bind/Modeling.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -177,7 +177,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win64\vc8\bind/Modeling.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -275,7 +275,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win32\vc8\bin/Modeling.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -372,7 +372,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win64\vc8\bin/Modeling.exe" LinkIncremental="1" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/02_Modeling/adm/win/vc9/Modeling.vcproj b/samples/mfc/standard/02_Modeling/adm/win/vc9/Modeling.vcproj index 8e510516e5..0074dad80a 100644 --- a/samples/mfc/standard/02_Modeling/adm/win/vc9/Modeling.vcproj +++ b/samples/mfc/standard/02_Modeling/adm/win/vc9/Modeling.vcproj @@ -81,7 +81,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win32\vc9\bind/Modeling.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -177,7 +177,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win64\vc9\bind/Modeling.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -274,7 +274,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win32\vc9\bin/Modeling.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -370,7 +370,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win64\vc9\bin/Modeling.exe" LinkIncremental="1" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/02_Modeling/src/ModelingApp.cpp b/samples/mfc/standard/02_Modeling/src/ModelingApp.cpp index 5525aad62a..663b421907 100755 --- a/samples/mfc/standard/02_Modeling/src/ModelingApp.cpp +++ b/samples/mfc/standard/02_Modeling/src/ModelingApp.cpp @@ -15,9 +15,9 @@ ///////////////////////////////////////////////////////////////////////////// // CModelingApp construction -CModelingApp::CModelingApp() +CModelingApp::CModelingApp() : OCC_App() { - SampleName = "Modeling"; //for about dialog + SampleName = "Modeling"; //for about dialog } ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/02_Modeling/src/ModelingApp.h b/samples/mfc/standard/02_Modeling/src/ModelingApp.h index c96e056daf..468a4ddce4 100755 --- a/samples/mfc/standard/02_Modeling/src/ModelingApp.h +++ b/samples/mfc/standard/02_Modeling/src/ModelingApp.h @@ -8,22 +8,25 @@ #pragma once #endif // _MSC_VER >= 1000 -#include <OCC_3dApp.h> +#include <OCC_App.h> -class CModelingApp : public OCC_3dApp +class CModelingApp : public OCC_App { public: - CModelingApp(); -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CModelingApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL -private: - CToolBar *m_pToolBar2; -}; + CModelingApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CModelingApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +private: + + CToolBar *m_pToolBar2; +}; ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp b/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp index c4f4a182cf..f4ab37af4c 100755 --- a/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp +++ b/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp @@ -4936,7 +4936,7 @@ void CModelingDoc::InputEvent(const Standard_Integer x , "Points Files (*.pass)|*.pass; |All Files (*.*)|*.*||", NULL ); - CString initdir(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir()); + CString initdir(((OCC_App*) AfxGetApp())->GetInitDataDir()); initdir += "\\Data\\TangentSurface"; dlg.m_ofn.lpstrInitialDir = initdir; diff --git a/samples/mfc/standard/03_Viewer2d/README.txt b/samples/mfc/standard/03_Viewer2d/README.txt new file mode 100644 index 0000000000..9d5df752b4 --- /dev/null +++ b/samples/mfc/standard/03_Viewer2d/README.txt @@ -0,0 +1,16 @@ +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 illustratea 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 index 2d730414b9..297402ff45 100644 --- a/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj +++ b/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj @@ -112,7 +112,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bin/Viewer2d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -154,7 +154,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bin/Viewer2d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -195,7 +195,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bind/Viewer2d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -237,7 +237,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bind/Viewer2d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -248,102 +248,6 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorRampColorMapDialog.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\FontPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\MarkPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\PropertiesSheet.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\src\StdAfx.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -364,22 +268,6 @@ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> </ClCompile> - <ClCompile Include="..\..\..\src\Properties\TypePropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\src\Viewer2dApp.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -412,22 +300,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\src\Properties\WidthPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\WINMAIN.CPP"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -458,18 +330,10 @@ </ResourceCompile> </ItemGroup> <ItemGroup> - <ClInclude Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.h" /> - <ClInclude Include="..\..\..\src\Properties\colornewcolorrampcolormapDialog.h" /> - <ClInclude Include="..\..\..\src\Properties\ColorPropertyPage.h" /> - <ClInclude Include="..\..\..\src\Properties\FontPropertyPage.h" /> - <ClInclude Include="..\..\..\src\Properties\MarkPropertyPage.h" /> - <ClInclude Include="..\..\..\src\Properties\PropertiesSheet.h" /> <ClInclude Include="..\..\..\res\resource.h" /> <ClInclude Include="..\..\..\src\StdAfx.h" /> - <ClInclude Include="..\..\..\src\Properties\TypePropertyPage.h" /> <ClInclude Include="..\..\..\src\Viewer2dApp.h" /> <ClInclude Include="..\..\..\src\Viewer2dDoc.h" /> - <ClInclude Include="..\..\..\src\Properties\WidthPropertyPage.h" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\res\Toolbar.bmp" /> 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 index 111bd2ceae..77f8789975 100644 --- a/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj.filters +++ b/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj.filters @@ -15,39 +15,15 @@ </Filter> </ItemGroup> <ItemGroup> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorRampColorMapDialog.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorPropertyPage.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\FontPropertyPage.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\MarkPropertyPage.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\PropertiesSheet.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\..\src\StdAfx.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\src\Properties\TypePropertyPage.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\..\src\Viewer2dApp.cpp"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="..\..\..\src\Viewer2dDoc.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\src\Properties\WidthPropertyPage.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\WINMAIN.CPP"> <Filter>Source Files</Filter> </ClCompile> @@ -58,42 +34,18 @@ </ResourceCompile> </ItemGroup> <ItemGroup> - <ClInclude Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\colornewcolorrampcolormapDialog.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\ColorPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\FontPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\MarkPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\PropertiesSheet.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\res\resource.h"> <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\..\..\src\StdAfx.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\Properties\TypePropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\src\Viewer2dApp.h"> <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\..\..\src\Viewer2dDoc.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\Properties\WidthPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> </ItemGroup> <ItemGroup> <None Include="..\..\..\res\Toolbar.bmp"> diff --git a/samples/mfc/standard/03_Viewer2d/adm/win/vc11/Viewer2d.vcxproj b/samples/mfc/standard/03_Viewer2d/adm/win/vc11/Viewer2d.vcxproj index e4af76ed6c..1a05483c87 100644 --- a/samples/mfc/standard/03_Viewer2d/adm/win/vc11/Viewer2d.vcxproj +++ b/samples/mfc/standard/03_Viewer2d/adm/win/vc11/Viewer2d.vcxproj @@ -116,7 +116,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bin/Viewer2d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -158,7 +158,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bin/Viewer2d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -199,7 +199,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bind/Viewer2d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -241,7 +241,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bind/Viewer2d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -252,102 +252,6 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorRampColorMapDialog.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\FontPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\MarkPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\PropertiesSheet.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\src\StdAfx.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -368,22 +272,6 @@ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> </ClCompile> - <ClCompile Include="..\..\..\src\Properties\TypePropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\src\Viewer2dApp.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -416,22 +304,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\src\Properties\WidthPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\WINMAIN.CPP"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -462,18 +334,10 @@ </ResourceCompile> </ItemGroup> <ItemGroup> - <ClInclude Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.h" /> - <ClInclude Include="..\..\..\src\Properties\colornewcolorrampcolormapDialog.h" /> - <ClInclude Include="..\..\..\src\Properties\ColorPropertyPage.h" /> - <ClInclude Include="..\..\..\src\Properties\FontPropertyPage.h" /> - <ClInclude Include="..\..\..\src\Properties\MarkPropertyPage.h" /> - <ClInclude Include="..\..\..\src\Properties\PropertiesSheet.h" /> <ClInclude Include="..\..\..\res\resource.h" /> <ClInclude Include="..\..\..\src\StdAfx.h" /> - <ClInclude Include="..\..\..\src\Properties\TypePropertyPage.h" /> <ClInclude Include="..\..\..\src\Viewer2dApp.h" /> <ClInclude Include="..\..\..\src\Viewer2dDoc.h" /> - <ClInclude Include="..\..\..\src\Properties\WidthPropertyPage.h" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\res\Toolbar.bmp" /> diff --git a/samples/mfc/standard/03_Viewer2d/adm/win/vc11/Viewer2d.vcxproj.filters b/samples/mfc/standard/03_Viewer2d/adm/win/vc11/Viewer2d.vcxproj.filters index 111bd2ceae..77f8789975 100644 --- a/samples/mfc/standard/03_Viewer2d/adm/win/vc11/Viewer2d.vcxproj.filters +++ b/samples/mfc/standard/03_Viewer2d/adm/win/vc11/Viewer2d.vcxproj.filters @@ -15,39 +15,15 @@ </Filter> </ItemGroup> <ItemGroup> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorRampColorMapDialog.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorPropertyPage.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\FontPropertyPage.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\MarkPropertyPage.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\PropertiesSheet.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\..\src\StdAfx.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\src\Properties\TypePropertyPage.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\..\src\Viewer2dApp.cpp"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="..\..\..\src\Viewer2dDoc.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\src\Properties\WidthPropertyPage.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\WINMAIN.CPP"> <Filter>Source Files</Filter> </ClCompile> @@ -58,42 +34,18 @@ </ResourceCompile> </ItemGroup> <ItemGroup> - <ClInclude Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\colornewcolorrampcolormapDialog.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\ColorPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\FontPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\MarkPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\PropertiesSheet.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\res\resource.h"> <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\..\..\src\StdAfx.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\Properties\TypePropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\src\Viewer2dApp.h"> <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\..\..\src\Viewer2dDoc.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\Properties\WidthPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> </ItemGroup> <ItemGroup> <None Include="..\..\..\res\Toolbar.bmp"> diff --git a/samples/mfc/standard/03_Viewer2d/adm/win/vc8/Viewer2d.vcproj b/samples/mfc/standard/03_Viewer2d/adm/win/vc8/Viewer2d.vcproj index 41c459741c..be06fdacea 100644 --- a/samples/mfc/standard/03_Viewer2d/adm/win/vc8/Viewer2d.vcproj +++ b/samples/mfc/standard/03_Viewer2d/adm/win/vc8/Viewer2d.vcproj @@ -81,7 +81,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc8\bin/Viewer2d.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc8\bin/Viewer2d.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -274,7 +274,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc8\bind/Viewer2d.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -371,7 +371,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc8\bind/Viewer2d.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -414,282 +414,6 @@ Name="Source Files" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" > - <File - RelativePath="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\ColorNewColorRampColorMapDialog.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\ColorPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\FontPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\MarkPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\PropertiesSheet.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\src\StdAfx.cpp" > @@ -740,52 +464,6 @@ /> </FileConfiguration> </File> - <File - RelativePath="..\..\..\src\Properties\TypePropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\res\Viewer2d.rc" > @@ -918,52 +596,6 @@ /> </FileConfiguration> </File> - <File - RelativePath="..\..\..\src\Properties\WidthPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\WINMAIN.CPP" > @@ -1015,30 +647,6 @@ Name="Header Files" Filter="h;hpp;hxx;hm;inl" > - <File - RelativePath="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\colornewcolorrampcolormapDialog.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\ColorPropertyPage.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\FontPropertyPage.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\MarkPropertyPage.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\PropertiesSheet.h" - > - </File> <File RelativePath="..\..\..\res\resource.h" > @@ -1047,10 +655,6 @@ RelativePath="..\..\..\src\StdAfx.h" > </File> - <File - RelativePath="..\..\..\src\Properties\TypePropertyPage.h" - > - </File> <File RelativePath="..\..\..\src\Viewer2dApp.h" > @@ -1059,10 +663,6 @@ RelativePath="..\..\..\src\Viewer2dDoc.h" > </File> - <File - RelativePath="..\..\..\src\Properties\WidthPropertyPage.h" - > - </File> </Filter> <Filter Name="Resource Files" diff --git a/samples/mfc/standard/03_Viewer2d/adm/win/vc9/Viewer2d.vcproj b/samples/mfc/standard/03_Viewer2d/adm/win/vc9/Viewer2d.vcproj index 8fb1f4bfd0..91d77c4fd9 100644 --- a/samples/mfc/standard/03_Viewer2d/adm/win/vc9/Viewer2d.vcproj +++ b/samples/mfc/standard/03_Viewer2d/adm/win/vc9/Viewer2d.vcproj @@ -82,7 +82,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc9\bin/Viewer2d.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc9\bin/Viewer2d.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -273,7 +273,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc9\bind/Viewer2d.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -369,7 +369,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc9\bind/Viewer2d.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -411,282 +411,6 @@ Name="Source Files" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" > - <File - RelativePath="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\ColorNewColorRampColorMapDialog.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\ColorPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\FontPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\MarkPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\PropertiesSheet.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\src\StdAfx.cpp" > @@ -737,52 +461,6 @@ /> </FileConfiguration> </File> - <File - RelativePath="..\..\..\src\Properties\TypePropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\res\Viewer2d.rc" > @@ -915,52 +593,6 @@ /> </FileConfiguration> </File> - <File - RelativePath="..\..\..\src\Properties\WidthPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\WINMAIN.CPP" > @@ -1012,30 +644,6 @@ Name="Header Files" Filter="h;hpp;hxx;hm;inl" > - <File - RelativePath="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\colornewcolorrampcolormapDialog.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\ColorPropertyPage.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\FontPropertyPage.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\MarkPropertyPage.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\PropertiesSheet.h" - > - </File> <File RelativePath="..\..\..\res\resource.h" > @@ -1044,10 +652,6 @@ RelativePath="..\..\..\src\StdAfx.h" > </File> - <File - RelativePath="..\..\..\src\Properties\TypePropertyPage.h" - > - </File> <File RelativePath="..\..\..\src\Viewer2dApp.h" > @@ -1056,10 +660,6 @@ RelativePath="..\..\..\src\Viewer2dDoc.h" > </File> - <File - RelativePath="..\..\..\src\Properties\WidthPropertyPage.h" - > - </File> </Filter> <Filter Name="Resource Files" diff --git a/samples/mfc/standard/03_Viewer2d/res/Viewer2d.aps b/samples/mfc/standard/03_Viewer2d/res/Viewer2d.aps index 3b5a3110e8fd8676ffdbc8a4daf615558a11a7a6..d3d21b56b7626d0cd425df551f55536b3a44da3f 100755 GIT binary patch delta 2850 zcmb_eS!@$m6ur+iEr>t}G>a!roQ)-+G@kL6ur-c7aVFTF;5chdjj^57;Mh@OK!C}f z0IG@-ZWll#p{gqN168e}sw!$F_@h;SDpi$Qp(<6?MP0t=M=DiH-@F)@&>ySnjC|+% zoOAD6=DvCFi#wX-yPBCY;+!ql@j5MJu8VU3k-Y)AEg(A_fn+$G3Jit%2jbD8K!0yI zFq8@<BB8+u&R#9~AYE5Z68K?x-=eQ#2U$E-nRupncL1P@=4yscXr#}Tm3u6+5p;_y zH7%|6j-cq2{5<eRqZtZ;NKQx4C)%AJQGqN_q(H$=$?KFmgI=-I<OH6#@SwvZ=k$cb zqm$3#<#SJ4ikVJsY!My)px<Zrwzb-QqSw(4yuh15uh5M_I*6cKcFDk-j7BKI&(7)V zOEZl|!ztHbEE4Qa4#xUo3E<5}9t=;AU2Uo8fI<mShNWqalw*Cmf>dB2ttXXuhT1B8 zBV9(e<45UIvID=S>`weET}5_b>G{%7^=d*#v*<V!?D9n;z}u`m)U1JBgV8AMfXynv zZZ*-J(VO78HSi<78TR1Z`NHGRtLdIhloe`MVV~V8$#lwXRvQ>qkf1<yz^fpW0@Z`C zCf~#6Y(_9)>2P6}Sxt8}#!p6Rm`wo78eD17W&*1k>}H@DY-+HFfflI4SBHzu^{Z4< zTj*4@%`dhF{bvTEK;NGLdlkwVv`cLsyI=H4b~o58W;5)=`@=;g`ya7u>VYb(Z~*g0 zbmSoJ9w{z<;gRlP7CI3|BYpb~7#iV-9n&Mlq!F)<=t~@mHrUwi_sd?v*&0eDVu?O5 z3Ch5n_~nQJh0(2>J3@2{h8S#tCfqVw(db$es1%wbln6)TOk|_$L!DQleY76ku|y_K z9Y~lOtspHlSw7wx&9NL}5t)Mbi5|H_RC3i@!L7>GlT7y8<8d(4@fg8_e~cCtd!OJt zX|XH305X=1afPiao{o@lW;l$8$BJA&71uPFOr#iVg*FxLj`ps?Ht?(9#!&bKQ`bQ| zzCTvTb*RZ?DwXV4Xx<2&`2ASEu1iJxqC-)ZlNX>HbH|HxJu0?2J}9$p(uMvaHjL-H z0xH&@9AJ5^a72YFE!h}ugO}FgCX<3w8^jyqCFCgH9@p;+F-?=?7K4(fRrdLVN-a_$ zPv`B}zevd?wlUHKVa%H-ArY*d(32>-sqMwsgr4hTL75lmklnJ61_-q3UdDw9j>Pab zl^&-bxP1J5B8Qw{-sZ_o7@RD~amcN$A`9RJ9Gfi6amj9{63?3;L6sFGNo@gMo7_YO znD;4-%$+LSD7iZ_fi^Tw73KIv(ai$uU<kKNm6H^;1=u{bjhs}x9J^ogDguFrQ%WE5 zJfh$3mU=|io*=+!1;vl2axrhZ0Kc2sM9wgs-QDhyyi&V|MO)x3)9swjCFhvure0d{ za$4+8k%{WyyaMDp#U^{Z+t09i7{<4zEA=DFe64O5biuDKX(})o>tPg^rn!PKAmz&D zqSzl+*fs;OAM-Bgx^-Gj=Ko6O(rF{~^AP}<mabwQ^bSB0!t_p2ZwNxr4+9W~DD?x> z@1=}_rzn$v2(^O{!Po_RtxoG?xtvscit<T%$5~Vd)1Rd37{vn6L0hTAZ~jA!bkXkm z|N2~s-(EaMmhr$P9noRurBG#-n>_w@=|Q&I#k^MxPh~9*Up}JATKr(<Jjq)8_LbAw zi#@OPWiS5u_1f&k(wjoIVso}*!{w`$_~)6e*mCVwwlQQ6)?ANgt!`TU{Cchi@894y zK3+vmBy+ml$H&Btbaj0)J65~SL7l&6@7AtsAOI<xoik~^(%^d<4wvS%M2|nt88ngg zcyK+3W%F8c6}QhD$UPM24Vu(8^lsyDbY82O$;adQ9NwggUHHztq2gV=a&*+t-zZzh zM%eJ^h?<}+EtTW#a_-84Rx?nE!<95Sb=_6iQ^jG!f|fL+xL_dbF}h&T{IUzD7fLnp tYCK!b;T<ZxUyZ+3b5AR0)ukHzX`yu8e)_pE;)a`sb<5iTW^m6<!#~I0G_U{w delta 2706 zcmbW3T}&KR6vxj+sHH6wBjsaRpnO<csxq_7?m(-xv%3Rq-LKAUyMWtHDXi@(?9v5V zvCxH5sP(h-5VcxcOnfq_u^~QaG?BN))JCI;G1>>?lP_vxVtf+Mo!yo}1Bvb=XU_b8 z=iGbl%>CFu7jkZVmUDhHlV)nl>+^FV`}^S%z=<7EkFr0i$^MW}(W1$oo~Xaojk{i~ zymq#whP{gmHAlA3f*ZPF(6GG_gUt|v6eMAQ{1gm9obH402*2hlYehC6s_VO#t-((l z%31#Ww+(wj#d^dW@B|}zK#ABrAc_tVO0nytm6hQ;Q^i|Av<VI<2j=zYLDwF|9oECD z9MD3tss!AfgvBPX;I)&*J1cmQTUTQ}Lv5*euig<%#gD`jAT|jCSpNY#lXsyAl@~@W ztO_g0R-<#YmTkt)QR~5)OpZIA>M<HL<v5{s31+%eyL;oqgW6DRfcGdt-BN&&?TH@` z4EG<7r8sVedi<I?dI0|zt!G=XVyvp{!E8di;(kK!P-DFyN=^~B;@+{cvTbJAnT2*} zz=^T4^!8=Y)i)gDsSbF^taoLTobYf)R%MSjDDp^&K2YY}ammJ|W@t1?b}qGmu&lkd zR4hhsSCZNV5SNi`1(FChv)*w>w}E|`&Wn)j(1eFh6_+^7sLMbOaN-N6Dy&ilwQAkR zV_H}V>EV%q7}y2D2F<u|s+3BkVR&@etNG=yqIzYY2$G}80Xy!3WwVEv6Lw-@x?FlR z)3)pi?hCtu9eUUs_9-9=f*`_UceC#_OYg`ayYOJz!XC$wbj6O{JW6-%3x|UNo2M(8 z><^`qN5F2ABpb-fV5mEhh$k}44lcZzu4ZohC0)flSTJ786com*SSubI-&Ej>Ct`y} zE6vbGN-b;0+3}hRuhC+5O{j`LxL@H>El${jUyheIJz?gGDr*YRLZH$3Or`KDBeX_1 zv4I~eCoH7_6Q@EA)&xNeOq7*}OsqAPObi*+341X;QBtOwsH?l@83Q(hhF2#_+rws< z92!dYb1Vw5&ji$@(V{5AezO`IjAe8iL~z6DvI89^+TNE68dcIx&}q`;XOl(`4(Kwe z;pBj!I^ju^$}5o!U4kf1oGxVt@Z#ypod=DWR<BRdz5Y;84eKsd2~nU(FH-*(<df2X zHaLX0Pg_|x7EV^O!}!pomGz)^(kk^XB`F<7i{3UxGm<3QE%_A6ep7eQ7gPz@sH>;& z(xj#8h#5z`s?w^;e*Rf)f*p?1ez^&Mp4`CVhPVDq0ejl;9wF};?rmrb`aC>bv_l^k z3PVbS)`=lCK|hx^hI}#&BcnMWVYKkknL?H{yj#@P0QW9TZD7Z^Q=rj&H;NEjAY}x3 zri$61;Uy?)$nefj6|rIR>e+GQ`TMB?oSQ1azes<UD@8$<=Jj~x0I$a8gb@-g7?@ti zo-+~>)9cwu!+UkQkd5Ny={oBee<5yN@p!|u<}*v1((OVEoWfhvmeMq^8h)s8`_tl` z^KC5_oGpJmKQ|{UEM|ZCxhH6+h=K<cntxHyXxaMdNb}LNM$bv;p({#SE4VRzR&LDC z^<*<*a2&!Ek%T@v@}iWl(E&INy>tjBX&)5ma^SE3BS(K;e)zvuR)_1(9cClge~u1X zJbSLYWaaZ5x4!WE3V43ki;v#30^@%L=0ASrK+bABGBd_j<HdMlB|iWD?3tCA(Rb># z##Q-`uiIARs9h{wr8Io+Vx7gW1or7}S#!%CMGvXLkfMgYv|48YKfk!JN;Yf68*lcl z7SKLF^47+jtuzCD_W;z>y&WRpqWj`vW?l-gG(#o4`gZxorGIGaDei-rmmBlk<oq`C zMPuG>2DAk{cG=FZ<FU)ttO#ewcHlL#FX2~YKf&8%kK%n-s@WM7$y#wQ*-LorN=4qg zl>ZIR(DNI3jqDJ9MRovhlNIp3x$2yvZFqC5B`-id&f?y=Y9+UU7rTZRyp}`|ik1po j69rhi-8`u4JcJg(Qp{Q!XA^!nSDiO<KhTEx-CXtG4H4p& diff --git a/samples/mfc/standard/03_Viewer2d/res/Viewer2d.rc b/samples/mfc/standard/03_Viewer2d/res/Viewer2d.rc index 123829e69f..240238973a 100755 --- a/samples/mfc/standard/03_Viewer2d/res/Viewer2d.rc +++ b/samples/mfc/standard/03_Viewer2d/res/Viewer2d.rc @@ -276,8 +276,6 @@ BEGIN MENUITEM "&New\tCtrl+N", ID_FILE_NEW MENUITEM "&Close", ID_FILE_CLOSE MENUITEM SEPARATOR - MENUITEM "CasCade Properties...", ID_MENU_CASCADE_PROPERTIES - MENUITEM SEPARATOR MENUITEM "Export Image...", ID_FILE_EXPORT_IMAGE MENUITEM SEPARATOR MENUITEM "E&xit", ID_APP_EXIT @@ -296,7 +294,7 @@ BEGIN END POPUP "&Help" BEGIN - MENUITEM "&About Viewer2d...", ID_APP_ABOUT + MENUITEM "&About Viewer2d...", ID_APP_ABOUT END END @@ -315,7 +313,7 @@ BEGIN END POPUP "&Help" BEGIN - MENUITEM "&About Viewer2d...", ID_APP_ABOUT + MENUITEM "&About Viewer2d...", ID_APP_ABOUT END END diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/ColorNewColorCubeColorMapDialog.cpp b/samples/mfc/standard/03_Viewer2d/src/Properties/ColorNewColorCubeColorMapDialog.cpp deleted file mode 100755 index c5c8563a05..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/ColorNewColorCubeColorMapDialog.cpp +++ /dev/null @@ -1,63 +0,0 @@ -// ColorNewColorCubeColorMapDialog.cpp : implementation file -// - -#include "stdafx.h" - -#include "ColorNewColorCubeColorMapDialog.h" - -#include "Aspect_ColorCubeColorMap.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CColorNewColorCubeColorMapDialog dialog - - -CColorNewColorCubeColorMapDialog::CColorNewColorCubeColorMapDialog(CWnd* pParent /*=NULL*/) - : CDialog(CColorNewColorCubeColorMapDialog::IDD, pParent) -{ - //{{AFX_DATA_INIT(CColorNewColorCubeColorMapDialog) - m_base_pixel = 0; - m_redmax = 7; - m_redmult = 1; - m_greenmax = 7; - m_greenmult = 8; - m_bluemax = 3; - m_bluemult = 64; - //}}AFX_DATA_INIT -} - -void CColorNewColorCubeColorMapDialog::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CColorNewColorCubeColorMapDialog) - DDX_Text(pDX, IDC_NewColorCube_EDIT_base_pixel, m_base_pixel); - DDX_Text(pDX, IDC_NewColorCube_EDIT_redmax, m_redmax); - DDX_Text(pDX, IDC_NewColorCube_EDIT_redmult, m_redmult); - DDX_Text(pDX, IDC_NewColorCube_EDIT_greenmax, m_greenmax); - DDX_Text(pDX, IDC_NewColorCube_EDIT_grennmult, m_greenmult); - DDX_Text(pDX, IDC_NewColorCube_EDIT_bluemax, m_bluemax); - DDX_Text(pDX, IDC_NewColorCube_EDIT_bluemult, m_bluemult); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CColorNewColorCubeColorMapDialog, CDialog) - //{{AFX_MSG_MAP(CColorNewColorCubeColorMapDialog) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CColorNewColorCubeColorMapDialog message handlers - -void CColorNewColorCubeColorMapDialog::OnOK() -{ - UpdateData(true); - myColorMap = - new Aspect_ColorCubeColorMap(m_base_pixel, - m_redmax , - m_redmult , - m_greenmax , - m_greenmult , - m_bluemax , - m_bluemult ); - CDialog::OnOK(); -} diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/ColorNewColorCubeColorMapDialog.h b/samples/mfc/standard/03_Viewer2d/src/Properties/ColorNewColorCubeColorMapDialog.h deleted file mode 100755 index 70cd26ec8f..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/ColorNewColorCubeColorMapDialog.h +++ /dev/null @@ -1,57 +0,0 @@ -// ColorNewColorCubeColorMapDialog.h : header file -// - -#if !defined(AFX_COLORNEWCOLORCUBECOLORMAPDIALOG_H__67E9AE93_D9F9_11D1_8DE3_0800369C8A03__INCLUDED_) -#define AFX_COLORNEWCOLORCUBECOLORMAPDIALOG_H__67E9AE93_D9F9_11D1_8DE3_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include "Aspect_ColorMap.hxx" -///////////////////////////////////////////////////////////////////////////// -// CColorNewColorCubeColorMapDialog dialog - -class CColorNewColorCubeColorMapDialog : public CDialog -{ -private : - Handle(Aspect_ColorMap) myColorMap; - -// Construction -public: - CColorNewColorCubeColorMapDialog(CWnd* pParent = NULL); // standard constructor - Handle(Aspect_ColorMap) ColorMap() {return myColorMap;}; -// Dialog Data - //{{AFX_DATA(CColorNewColorCubeColorMapDialog) - enum { IDD = IDD_DIALOG_NewColorCube }; - int m_base_pixel; - int m_redmax; - int m_redmult; - int m_greenmax; - int m_greenmult; - int m_bluemax; - int m_bluemult; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CColorNewColorCubeColorMapDialog) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CColorNewColorCubeColorMapDialog) - virtual void OnOK(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_COLORNEWCOLORCUBECOLORMAPDIALOG_H__67E9AE93_D9F9_11D1_8DE3_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/ColorNewColorRampColorMapDialog.cpp b/samples/mfc/standard/03_Viewer2d/src/Properties/ColorNewColorRampColorMapDialog.cpp deleted file mode 100755 index 32c289da8d..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/ColorNewColorRampColorMapDialog.cpp +++ /dev/null @@ -1,144 +0,0 @@ -// ColorNewColorRampColorMapDialog.cpp : implementation file -// - -#include "stdafx.h" - -#include "ColorNewColorRampColorMapDialog.h" -#include "Quantity_Color.hxx" -#include "Aspect_ColorRampColorMap.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CColorNewColorRampColorMapDialog dialog - - -CColorNewColorRampColorMapDialog::CColorNewColorRampColorMapDialog(CWnd* pParent /*=NULL*/) - : CDialog(CColorNewColorRampColorMapDialog::IDD, pParent) -{ - //{{AFX_DATA_INIT(CColorNewColorRampColorMapDialog) - m_base_pixel = 0; - m_dimension = 16; - m_Red = 1.0; - m_Green = 0.0; - m_Blue = 0.0; - //}}AFX_DATA_INIT -} - -void CColorNewColorRampColorMapDialog::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CColorNewColorRampColorMapDialog) - DDX_Control(pDX, IDC_NewColorMap_COMBO_NewEntryColorName, m_ColorList); - DDX_Text(pDX, IDC_NewColorRamp_EDIT_base_pixel, m_base_pixel); - DDX_Text(pDX, IDC_NewColorramp_EDIT_dimension, m_dimension); - DDX_Text(pDX, IDC_NewColorMapRamp_EDIT_ColorRed, m_Red); - DDX_Text(pDX, IDC_NewColorMapRamp_EDIT_ColorGreen, m_Green); - DDX_Text(pDX, IDC_NewColorMapRamp_EDIT_ColorBlue, m_Blue); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CColorNewColorRampColorMapDialog, CDialog) - //{{AFX_MSG_MAP(CColorNewColorRampColorMapDialog) - ON_BN_CLICKED(IDC_NewColorMapRamp_BUTTON_EditColor, OnColorMapRampBUTTONEditColor) - ON_EN_CHANGE(IDC_NewColorMapRamp_EDIT_ColorRed, OnChangeColorMapRampEDITColorRed) - ON_EN_CHANGE(IDC_NewColorMapRamp_EDIT_ColorGreen, OnChangeColorMapRampEDITColorGreen) - ON_EN_CHANGE(IDC_NewColorMapRamp_EDIT_ColorBlue, OnChangeColorMapRampEDITColorBlue) - ON_CBN_SELCHANGE(IDC_NewColorMap_COMBO_NewEntryColorName, OnSelchangeColorMapCOMBONewEntryColorName) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CColorNewColorRampColorMapDialog message handlers -BOOL CColorNewColorRampColorMapDialog::OnInitDialog() -{ - CDialog::OnInitDialog(); - for (int i = 0 ;i< 517 ; i++) - { - Standard_CString TheColorName = Quantity_Color::StringName((Quantity_NameOfColor)i); - // update the CComboBox to add the enumeration possibilities. - m_ColorList.AddString( TheColorName ); - } - Quantity_Color aColor(m_Red,m_Green,m_Blue,Quantity_TOC_RGB); - m_ColorList.SetCurSel(aColor.Name()); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - - -void CColorNewColorRampColorMapDialog::OnColorMapRampBUTTONEditColor() -{ - UpdateData(true); - COLORREF m_clr ; - m_clr = RGB(m_Red*255,m_Green*255,m_Blue*255); - CColorDialog dlgColor(m_clr); - if (dlgColor.DoModal() == IDOK) - { - m_clr = dlgColor.GetColor(); - m_Red = GetRValue(m_clr)/255.; - m_Green = GetGValue(m_clr)/255.; - m_Blue = GetBValue(m_clr)/255.; - } - Quantity_Color aColor(m_Red,m_Green,m_Blue,Quantity_TOC_RGB); - m_ColorList.SetCurSel(aColor.Name()); - UpdateData(false); -} - - -void CColorNewColorRampColorMapDialog::OnChangeColorMapRampEDITColorRed() -{ - UpdateData(true); - if (m_Red<0) m_Red=0; - if (m_Red>1) m_Red=1; - - Quantity_Color aColor(m_Red,m_Green,m_Blue,Quantity_TOC_RGB); - m_ColorList.SetCurSel(aColor.Name()); - UpdateData(false); -} - -void CColorNewColorRampColorMapDialog::OnChangeColorMapRampEDITColorGreen() -{ - UpdateData(true); - if (m_Green<0) m_Green=0; - if (m_Green>1) m_Green=1; - Quantity_Color aColor(m_Red,m_Green,m_Blue,Quantity_TOC_RGB); - m_ColorList.SetCurSel(aColor.Name()); - UpdateData(false); -} -void CColorNewColorRampColorMapDialog::OnChangeColorMapRampEDITColorBlue() -{ - UpdateData(true); - if (m_Blue<0) m_Blue=0; - if (m_Blue>1) m_Blue=1; - Quantity_Color aColor(m_Red,m_Green,m_Blue,Quantity_TOC_RGB); - m_ColorList.SetCurSel(aColor.Name()); - UpdateData(false); -} - -void CColorNewColorRampColorMapDialog::OnSelchangeColorMapCOMBONewEntryColorName() -{ - // TODO: Add your control notification handler code here - UpdateData(true); - int CurSel = m_ColorList.GetCurSel(); - Quantity_NameOfColor SelectedNameOfColor = (Quantity_NameOfColor)CurSel; - Quantity_Color TheSelectedEquivalentColor(SelectedNameOfColor); - - Quantity_Parameter Red,Green,Blue; - TheSelectedEquivalentColor.Values(Red,Green,Blue,Quantity_TOC_RGB); - m_Red = Red; - m_Green = Green; - m_Blue = Blue; - UpdateData(false); -} - - -void CColorNewColorRampColorMapDialog::OnOK() -{ - UpdateData(true); - Quantity_Color TheColor(m_Red,m_Green,m_Blue,Quantity_TOC_RGB); - myColorMap = - new Aspect_ColorRampColorMap(m_base_pixel, - m_dimension, - TheColor ); - CDialog::OnOK(); -} diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/ColorPropertyPage.cpp b/samples/mfc/standard/03_Viewer2d/src/Properties/ColorPropertyPage.cpp deleted file mode 100755 index 21a442d2f2..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/ColorPropertyPage.cpp +++ /dev/null @@ -1,286 +0,0 @@ -// ColorPropertyPage.cpp : implementation file -// - -#include "stdafx.h" - -#include "ColorPropertyPage.h" -#include "ColorNewColorCubeColorMapDialog.h" -#include "ColorNewColorRampColorMapDialog.h" -#include "Aspect_ColorMapEntry.hxx" -#include "V2d_DefaultMap.hxx" -#include "Aspect_GenericColorMap.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CColorPropertyPage property page - -IMPLEMENT_DYNCREATE(CColorPropertyPage, CPropertyPage) - -CColorPropertyPage::CColorPropertyPage() - : CPropertyPage(CColorPropertyPage::IDD) -{ - //{{AFX_DATA_INIT(CColorPropertyPage) - m_ColorMapSize = _T("Computing..."); - m_ColorMapType = _T("Computing..."); - m_CurrentEntryRed = _T("9.999"); - m_CurrentEntryGreen = _T("9.999"); - m_CurrentEntryBlue = _T("9.999"); - m_NearsetColorName = _T("Computing..."); - m_NewEntryRed = 9.999; - m_NewEntryBlue = 9.999; - m_NewEntryGreen = 9.999; - //}}AFX_DATA_INIT -} - -BOOL CColorPropertyPage::OnInitDialog() -{ - CPropertyPage::OnInitDialog(); - - for (int i = 0 ;i< 517 ; i++) - { - Standard_CString TheColorName = Quantity_Color::StringName((Quantity_NameOfColor)i); - // update the CComboBox to add the enumeration possibilities. - m_NewEntryColorNameCtrl.AddString( TheColorName ); - } - m_NewEntryColorNameCtrl.SetCurSel(1); - // TODO: Add extra initialization here - UpdateDisplay(1); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -CColorPropertyPage::~CColorPropertyPage() -{ -} - -void CColorPropertyPage::DoDataExchange(CDataExchange* pDX) -{ - CPropertyPage::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CColorPropertyPage) - DDX_Control(pDX, IDC_ColorMap_COMBO_NewEntryColorName , m_NewEntryColorNameCtrl ); - DDX_Control(pDX, IDC_ColorMap_TAB , m_TabCtrl ); - DDX_Text (pDX, IDC_ColorMap_STATIC_Size , m_ColorMapSize ); - DDX_Text (pDX, IDC_ColorMap_STATIC_Type , m_ColorMapType ); - DDX_Text (pDX, IDC_ColorMap_STATIC_EntryColorRed , m_CurrentEntryRed ); - DDX_Text (pDX, IDC_ColorMap_STATIC_EntryColorGreen , m_CurrentEntryGreen ); - DDX_Text (pDX, IDC_ColorMap_STATIC_EntryColorBlue , m_CurrentEntryBlue ); - DDX_Text (pDX, IDC_ColorMap_STATIC_EntryColorName , m_NearsetColorName ); - DDX_Text (pDX, IDC_ColorMap_EDIT_NewEntryColorRed , m_NewEntryRed ); - DDX_Text (pDX, IDC_ColorMap_EDIT_NewEntryColorBlue , m_NewEntryBlue ); - DDX_Text (pDX, IDC_ColorMap_EDIT_NewEntryColorGreen , m_NewEntryGreen ); - //}}AFX_DATA_MAP -} - -BEGIN_MESSAGE_MAP(CColorPropertyPage, CPropertyPage) - //{{AFX_MSG_MAP(CColorPropertyPage) - ON_NOTIFY(TCN_SELCHANGE, IDC_ColorMap_TAB, OnSelchangeColorMapTAB) - ON_CBN_SELCHANGE(IDC_ColorMap_COMBO_NewEntryColorName, OnSelchangeColorMapCOMBONewEntryColorName) - ON_BN_CLICKED(IDC_ColorMap_BUTTON_UpdateCurrentEntry, OnColorMapBUTTONUpdateCurrentEntry) - ON_BN_CLICKED(IDC_ColorMap_BUTTON_NewColorCubeColorMap, OnColorMapBUTTONNewColorCubeColorMap) - ON_BN_CLICKED(IDC_ColorMap_BUTTON_NewGenericColorMap, OnColorMapBUTTONNewGenericColorMap) - ON_BN_CLICKED(IDC_ColorMap_BUTTON_NewColorRampColorMap, OnColorMapBUTTONNewColorRampColorMap) - ON_BN_CLICKED(IDC_ColorMap_BUTTON_NewEntry_EditColor, OnColorMapBUTTONNewEntryEditColor) - ON_BN_CLICKED(IDC_ColorMap_BUTTON_AddNewEntry, OnColorMapBUTTONAddNewEntry) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -void CColorPropertyPage::UpdateDisplay(int CurrentSelectionIndex) -{ - Aspect_TypeOfColorMap aColorMapType = myColorMap->Type(); - switch (aColorMapType) { - case Aspect_TOC_Generic : m_ColorMapType = _T("Generic"); ; break; - case Aspect_TOC_ColorCube : m_ColorMapType = _T("ColorCube"); break; - case Aspect_TOC_ColorRamp : m_ColorMapType = _T("ColorRamp"); break; - default : cout<<" Underknown"; - } - - int ShowOrHide; - if (aColorMapType == Aspect_TOC_Generic) - { - ShowOrHide = SW_SHOW; - GetDlgItem(IDC_ColorMap_STATIC_NewEntryNotavailable)->ShowWindow(SW_HIDE); - } - else - { - ShowOrHide = SW_HIDE; - GetDlgItem(IDC_ColorMap_STATIC_NewEntryNotavailable)->ShowWindow(SW_SHOW); - } - - GetDlgItem(IDC_ColorMap_EDIT_NewEntryColorRed)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_EDIT_NewEntryColorGreen)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_EDIT_NewEntryColorBlue)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_COMBO_NewEntryColorName)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_BUTTON_NewEntry_EditColor)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_BUTTON_UpdateCurrentEntry)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_BUTTON_AddNewEntry)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_STATIC_NewEntryColorNameStatic)->ShowWindow(ShowOrHide); - - TCollection_AsciiString SizeMessage(myColorMap->Size()); - m_ColorMapSize = _T(SizeMessage.ToCString()); - // clear the Tab Ctrl - m_TabCtrl.DeleteAllItems(); - - TC_ITEM TabCtrlItem; - TabCtrlItem.mask = TCIF_TEXT; - - for(int i =0;i<myColorMap->Size();i++) // not <=ColorMapSize, I've enter a CSR - { - Aspect_ColorMapEntry aColorMapEntry = myColorMap->FindEntry(i); - TCollection_AsciiString EntryNumerMessage(aColorMapEntry.Index()); - TabCtrlItem.pszText = (LPSTR)EntryNumerMessage.ToCString(); - m_TabCtrl.InsertItem( aColorMapEntry.Index(), &TabCtrlItem ); - } - m_TabCtrl.SetCurSel(CurrentSelectionIndex); - - // update The Current Selected entry - Aspect_ColorMapEntry aColorMapEntry = myColorMap->FindEntry(CurrentSelectionIndex); - if (aColorMapEntry. IsAllocated () ) - { - Quantity_Color TheColor = aColorMapEntry.Color(); - Quantity_Parameter Red,Green,Blue; - TheColor.Values(Red,Green,Blue,Quantity_TOC_RGB); - TCollection_AsciiString Message; - Message = Red; - m_CurrentEntryRed = _T(Message.ToCString()); - m_NewEntryRed = Red; - Message = Green; - m_CurrentEntryGreen = _T(Message.ToCString()); - m_NewEntryGreen = Green; - Message = Blue; - m_CurrentEntryBlue = _T(Message.ToCString()); - m_NewEntryBlue = Blue; - - Standard_CString StringName = Quantity_Color::StringName(TheColor.Name()); - m_NearsetColorName = StringName; - m_NewEntryColorNameCtrl.SetCurSel(TheColor.Name()); - if (aColorMapType == Aspect_TOC_Generic) - if (m_TabCtrl.GetCurSel() == 0) - GetDlgItem(IDC_ColorMap_BUTTON_UpdateCurrentEntry)->ShowWindow(SW_HIDE); - else - GetDlgItem(IDC_ColorMap_BUTTON_UpdateCurrentEntry)->ShowWindow(SW_SHOW); - } - else - { - m_NearsetColorName = _T("Not Allocated"); - m_CurrentEntryRed = _T("9.999"); - m_NewEntryRed = 9.999; - m_CurrentEntryGreen = _T("9.999"); - m_NewEntryGreen = 9.999; - m_CurrentEntryBlue = _T("9.999"); - m_NewEntryBlue = 9.999; - GetDlgItem(IDC_ColorMap_BUTTON_UpdateCurrentEntry)->ShowWindow(SW_HIDE); - } - - UpdateData(false); -} -void CColorPropertyPage::OnColorMapBUTTONNewGenericColorMap() -{ - // TODO: Add your control notification handler code here - myColorMap = V2d_DefaultMap::ColorMap(); - SetModified(true); - UpdateDisplay(1); -} - -void CColorPropertyPage::OnColorMapBUTTONNewColorCubeColorMap() -{ - CColorNewColorCubeColorMapDialog aDlg(NULL); - if (aDlg.DoModal() == IDOK) - { - myColorMap = aDlg.ColorMap(); - SetModified(true); - UpdateDisplay(1); - } -} - -void CColorPropertyPage::OnColorMapBUTTONNewColorRampColorMap() -{ - CColorNewColorRampColorMapDialog aDlg(NULL); - if (aDlg.DoModal() == IDOK) - { - myColorMap = aDlg.ColorMap(); - SetModified(true); - UpdateDisplay(1); - } -} - -///////////////////////////////////////////////////////////////////////////// -// CColorPropertyPage message handlers - -void CColorPropertyPage::OnSelchangeColorMapTAB(NMHDR* pNMHDR, LRESULT* pResult) -{ - UpdateDisplay(m_TabCtrl.GetCurSel()); - *pResult = 0; -} - -void CColorPropertyPage::OnSelchangeColorMapCOMBONewEntryColorName() -{ - UpdateData(true); - int CurSel = m_NewEntryColorNameCtrl.GetCurSel(); - Quantity_NameOfColor SelectedNameOfColor = (Quantity_NameOfColor)CurSel; - Quantity_Color TheSelectedEquivalentColor(SelectedNameOfColor); - - Quantity_Parameter Red,Green,Blue; - TheSelectedEquivalentColor.Values(Red,Green,Blue,Quantity_TOC_RGB); - m_NewEntryRed = Red; - m_NewEntryGreen = Green; - m_NewEntryBlue = Blue; - UpdateData(false); -} - -void CColorPropertyPage::OnColorMapBUTTONNewEntryEditColor() -{ - int CurrentSelectedItem = m_TabCtrl.GetCurSel(); - - COLORREF m_clr ; - m_clr = RGB(m_NewEntryRed*255,m_NewEntryGreen*255,m_NewEntryBlue*255); - CColorDialog dlgColor(m_clr); - if (dlgColor.DoModal() == IDOK) - { - SetModified(TRUE); - m_clr = dlgColor.GetColor(); - m_NewEntryRed = GetRValue(m_clr)/255.; - m_NewEntryGreen = GetGValue(m_clr)/255.; - m_NewEntryBlue = GetBValue(m_clr)/255.; - } - Quantity_Color aColor(m_NewEntryRed,m_NewEntryGreen,m_NewEntryBlue,Quantity_TOC_RGB); - m_NewEntryColorNameCtrl.SetCurSel(aColor.Name()); - UpdateData(false); -} - -void CColorPropertyPage::OnColorMapBUTTONUpdateCurrentEntry() -{ - UpdateData(true); - Handle(Aspect_GenericColorMap) aGenericColorMap = Handle(Aspect_GenericColorMap)::DownCast(myColorMap); - if (aGenericColorMap.IsNull()) - Standard_Failure::Raise(" couldn't update a none Generic Color Map"); - - Aspect_ColorMapEntry aColorMapEntry = myColorMap->FindEntry( m_TabCtrl.GetCurSel()); - Quantity_Color aColor(m_NewEntryRed,m_NewEntryGreen,m_NewEntryBlue,Quantity_TOC_RGB); - aColorMapEntry.SetColor(aColor); - aGenericColorMap->AddEntry(aColorMapEntry); // in fact just update - SetModified(true); - UpdateData(true); - UpdateDisplay(m_TabCtrl.GetCurSel()); - -} - -void CColorPropertyPage::OnColorMapBUTTONAddNewEntry() -{ - UpdateData(true); - Quantity_Color aColor(m_NewEntryRed,m_NewEntryGreen,m_NewEntryBlue,Quantity_TOC_RGB); - Handle(Aspect_GenericColorMap) aGenericColorMap = Handle(Aspect_GenericColorMap)::DownCast(myColorMap); - if (aGenericColorMap.IsNull()) - Standard_Failure::Raise(" couldn't update a none Generic Color Map"); - - int NewEntry = aGenericColorMap->AddEntry(aColor); - SetModified(true); - UpdateDisplay(NewEntry); - UpdateData(false); -} - -BOOL CColorPropertyPage::OnApply() -{ - myViewer->SetColorMap(myColorMap); - myViewer->Update(); - return CPropertyPage::OnApply(); -} diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/ColorPropertyPage.h b/samples/mfc/standard/03_Viewer2d/src/Properties/ColorPropertyPage.h deleted file mode 100755 index a761b6a13e..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/ColorPropertyPage.h +++ /dev/null @@ -1,83 +0,0 @@ -#if !defined(AFX_ColorPropertyPage_H__A815F7A3_D51B_11D1_8DDE_0800369C8A03__INCLUDED_) -#define AFX_ColorPropertyPage_H__A815F7A3_D51B_11D1_8DDE_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// ColorPropertyPage.h : header file -// -#include "Aspect_ColorMap.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CColorPropertyPage dialog - -class CColorPropertyPage : public CPropertyPage -{ - DECLARE_DYNCREATE(CColorPropertyPage) - -private : - Handle(Aspect_ColorMap) myColorMap; -private : - Handle(V2d_Viewer) myViewer; -public: - void SetViewer(Handle(V2d_Viewer) aViewer) { - myViewer = aViewer; - myColorMap = aViewer->ColorMap(); - }; - - -// Construction -public: - CColorPropertyPage(); - ~CColorPropertyPage(); - -// Dialog Data - //{{AFX_DATA(CColorPropertyPage) - enum { IDD = IDD_DIALOG_Color }; - CComboBox m_NewEntryColorNameCtrl; - CTabCtrl m_TabCtrl; - CString m_ColorMapSize ; - CString m_ColorMapType ; - CString m_CurrentEntryRed; - CString m_CurrentEntryGreen; - CString m_CurrentEntryBlue; - CString m_NearsetColorName; - double m_NewEntryRed; - double m_NewEntryBlue; - double m_NewEntryGreen; - //}}AFX_DATA - - -// Overrides - // ClassWizard generate virtual function overrides - //{{AFX_VIRTUAL(CColorPropertyPage) - public: - virtual BOOL OnApply(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - // Generated message map functions - //{{AFX_MSG(CColorPropertyPage) - virtual BOOL OnInitDialog(); - afx_msg void OnSelchangeColorMapTAB(NMHDR* pNMHDR, LRESULT* pResult); - afx_msg void OnSelchangeColorMapCOMBONewEntryColorName(); - afx_msg void OnColorMapBUTTONUpdateCurrentEntry(); - afx_msg void OnColorMapBUTTONNewColorCubeColorMap(); - afx_msg void OnColorMapBUTTONNewGenericColorMap(); - afx_msg void OnColorMapBUTTONNewColorRampColorMap(); - afx_msg void OnColorMapBUTTONNewEntryEditColor(); - afx_msg void OnColorMapBUTTONAddNewEntry(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - void UpdateDisplay(int CurrentSelectionIndex); -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_ColorPropertyPage_H__A815F7A3_D51B_11D1_8DDE_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/FontPropertyPage.cpp b/samples/mfc/standard/03_Viewer2d/src/Properties/FontPropertyPage.cpp deleted file mode 100755 index 25e3ef44ef..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/FontPropertyPage.cpp +++ /dev/null @@ -1,267 +0,0 @@ -// FontPropertyPage.cpp : implementation file -// - -#include "stdafx.h" - -#include "FontPropertyPage.h" -#include "Aspect_FontMapEntry.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CFontPropertyPage property page - -IMPLEMENT_DYNCREATE(CFontPropertyPage, CPropertyPage) - -CFontPropertyPage::CFontPropertyPage() : CPropertyPage(CFontPropertyPage::IDD) -{ - //{{AFX_DATA_INIT(CFontPropertyPage) - m_FontMapSize = _T("Computing..."); - m_CurrentEntryValue = _T("Computing..."); - m_CurrentEntryStyle = _T("Computing..."); - m_CurrentEntrySize = _T("Computing..."); - m_CurrentEntrySlant = _T("Computing..."); - m_NewEntryValue = _T(""); - m_NewEntrySize = 1.0; - m_NewEntrySlant = 0.0; - //}}AFX_DATA_INIT -} - -CFontPropertyPage::~CFontPropertyPage() -{ -} - -BOOL CFontPropertyPage::OnInitDialog() -{ - CPropertyPage::OnInitDialog(); - - m_NewEntry_Type.AddString("DEFAULT"); - m_NewEntry_Type.AddString("COURIER"); - m_NewEntry_Type.AddString("HELVETICA"); - m_NewEntry_Type.AddString("TIMES"); - m_NewEntry_Type.AddString("USERDEFINED"); - m_NewEntry_Type.SetCurSel(1); - - // TODO: Add extra initialization here - UpdateDisplay(1); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - - -void CFontPropertyPage::DoDataExchange(CDataExchange* pDX) -{ - CPropertyPage::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CFontPropertyPage) - DDX_Text (pDX, IDC_FontMap_STATIC_Size , m_FontMapSize ); - DDX_Control(pDX, IDC_FontMap_TAB , m_TabCtrl ); - DDX_Text (pDX, IDC_FontMap_STATIC_CurrentEntryValue , m_CurrentEntryValue ); - DDX_Text (pDX, IDC_FontMap_STATIC_CurrentEntryType , m_CurrentEntryStyle ); - DDX_Text (pDX, IDC_FontMap_STATIC_CurrentEntrySize , m_CurrentEntrySize ); - DDX_Text (pDX, IDC_FontMap_STATIC_CurrentEntrySlant , m_CurrentEntrySlant ); - - DDX_Control(pDX, IDC_FontMap_COMBO_NewEntryType , m_NewEntry_Type ); - DDX_Text(pDX, IDC_FontMap_EDIT_NewEntryValue, m_NewEntryValue); - DDX_Text(pDX, IDC_FontMap_EDIT_NewEntrySize, m_NewEntrySize); - DDX_Text(pDX, IDC_FontMap_EDIT_NewEntrySlant, m_NewEntrySlant); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CFontPropertyPage, CPropertyPage) - //{{AFX_MSG_MAP(CFontPropertyPage) - ON_NOTIFY(TCN_SELCHANGE, IDC_FontMap_TAB, OnSelchangeFontMapTAB) - ON_BN_CLICKED(IDC_FontMap_BUTTON_NewEntry_EditFont, OnFontMapBUTTONNewEntryEditFont) - ON_BN_CLICKED(IDC_FontMap_BUTTON_UpdateCurrent, OnFontMapBUTTONUpdateCurrent) - ON_CBN_SELCHANGE(IDC_FontMap_COMBO_NewEntryType, OnSelchangeFontMapCOMBONewEntryType) - ON_BN_CLICKED(IDC_FontMap_BUTTON_NewEntry, OnFontMapBUTTONNewEntry) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CFontPropertyPage message handlers -void CFontPropertyPage::UpdateDisplay(int CurrentSelectionIndex) -{ - // Update the size of the Width map - TCollection_AsciiString SizeMessage(myFontMap->Size()); - m_FontMapSize = _T(SizeMessage.ToCString()); - - // clear the Tab Ctrl - m_TabCtrl.DeleteAllItems(); - TC_ITEM TabCtrlItem; - TabCtrlItem.mask = TCIF_TEXT; - for(int i =1;i<=myFontMap->Size();i++) - { - Aspect_FontMapEntry aFontMapEntry = myFontMap->Entry(i); - TCollection_AsciiString EntryNumerMessage(aFontMapEntry.Index()); - TabCtrlItem.pszText = (LPSTR) EntryNumerMessage.ToCString(); - m_TabCtrl.InsertItem( aFontMapEntry.Index(), &TabCtrlItem ); - } - m_TabCtrl.SetCurSel(CurrentSelectionIndex-1); - // update the current Entry informations - Aspect_FontMapEntry aFontMapEntry = myFontMap->Entry(CurrentSelectionIndex); - - Aspect_FontStyle TheType = aFontMapEntry.Type(); - m_CurrentEntryValue = (TheType.Value() == NULL?" ":TheType.Value()); - - TCollection_AsciiString Message; - switch (TheType.Style()) - { - case Aspect_TOF_DEFAULT : Message = "Aspect_TOF_DEFAULT"; break; - case Aspect_TOF_COURIER : Message = "Aspect_TOF_COURIER"; break; - case Aspect_TOF_HELVETICA : Message = "Aspect_TOF_HELVETICA"; break; - case Aspect_TOF_TIMES : Message = "Aspect_TOF_TIMES"; break; - case Aspect_TOF_USERDEFINED : Message = "Aspect_TOF_USERDEFINED"; break; - default: Message = "Underknown"; - } - m_CurrentEntryStyle = _T(Message.ToCString()); - - Message = TheType.Size (); - m_CurrentEntrySize = _T(Message.ToCString()); - - Message = TheType.Slant (); - m_CurrentEntrySlant = _T(Message.ToCString()); - - // update The New Entry : - switch (TheType.Style()) - { - case Aspect_TOF_DEFAULT : m_NewEntry_Type.SetCurSel(0); break; - case Aspect_TOF_COURIER : m_NewEntry_Type.SetCurSel(1); break; - case Aspect_TOF_HELVETICA : m_NewEntry_Type.SetCurSel(2); break; - case Aspect_TOF_TIMES : m_NewEntry_Type.SetCurSel(3); break; - case Aspect_TOF_USERDEFINED : m_NewEntry_Type.SetCurSel(4); break; - default: ; - } - - m_NewEntryValue = (TheType.Value() == NULL?" ":TheType.Value()); - m_NewEntrySize = TheType.Size (); - m_NewEntrySlant = TheType.Slant (); - if (TheType.Style()==Aspect_TOF_USERDEFINED) - { - GetDlgItem(IDC_FontMap_EDIT_NewEntrySize)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_EDIT_NewEntrySlant)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry_EditFont)->ShowWindow(SW_SHOW); - } - else - { - GetDlgItem(IDC_FontMap_EDIT_NewEntrySize)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_EDIT_NewEntrySlant)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry_EditFont)->ShowWindow(SW_HIDE); - } - UpdateData(false); -} - -void CFontPropertyPage::OnSelchangeFontMapTAB(NMHDR* pNMHDR, LRESULT* pResult) -{ - // TODO: Add your control notification handler code here - UpdateDisplay( m_TabCtrl.GetCurSel()+1); - *pResult = 0; -} - -void CFontPropertyPage::OnSelchangeFontMapCOMBONewEntryType() -{ - UpdateData(true); - // update the New Entry Value message - if (m_NewEntry_Type.GetCurSel() == Aspect_TOF_USERDEFINED) - { - // allow the user to select a font from the common CFontDialog - GetDlgItem(IDC_FontMap_BUTTON_NewEntry_EditFont)->ShowWindow(SW_SHOW); - m_NewEntryValue = "Please Select a Font"; - // remove the posiblility to update while a font was selected - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_EDIT_NewEntrySize)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_EDIT_NewEntrySlant)->ShowWindow(SW_HIDE); - } - else - { - GetDlgItem(IDC_FontMap_EDIT_NewEntrySize)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_EDIT_NewEntrySlant)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry_EditFont)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry)->ShowWindow(SW_SHOW); - Aspect_FontStyle TheType((Aspect_TypeOfFont)m_NewEntry_Type.GetCurSel(),m_NewEntrySize); - m_NewEntryValue = (TheType.Value() == NULL?" ":TheType.Value()); - } - UpdateData(false); - -} - -#include "WNT_FontMapEntry.hxx" -void CFontPropertyPage::OnFontMapBUTTONNewEntryEditFont() -{ - Handle(WNT_FontMapEntry) anEntry = new WNT_FontMapEntry((char* const)(LPCTSTR )m_NewEntryValue); - Standard_Address anAddress = anEntry->LogFont(); - LOGFONT* lf = (LOGFONT*)(anAddress ); - CFontDialog dlg(lf); - if (dlg.DoModal() == IDOK) - { - TCHAR buff[ 255 ]; - wsprintf ( buff, "%d-%d-%d-%d-%d-%d-%d-%d-%d-%d-%d-%d-%d-%s", - lf->lfHeight, lf->lfWidth, lf->lfEscapement, lf->lfOrientation, lf->lfWeight, lf->lfItalic, - lf->lfUnderline, lf->lfStrikeOut, lf->lfCharSet, lf->lfOutPrecision, lf->lfClipPrecision, lf->lfQuality, - lf->lfPitchAndFamily, lf->lfFaceName); - - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry)->ShowWindow(SW_SHOW); - Aspect_FontStyle TheType(buff); - m_NewEntryValue = (TheType.Value() == NULL?" ":TheType.Value()); - } - UpdateData(false); -} - -void CFontPropertyPage::OnFontMapBUTTONUpdateCurrent() -{ - // The Entry to modify : - Aspect_FontMapEntry aFontMapEntry = myFontMap->Entry( m_TabCtrl.GetCurSel()+1); - - UpdateData(true); - Aspect_TypeOfFont aTypeOfFont = (Aspect_TypeOfFont)m_NewEntry_Type.GetCurSel(); - - if (aTypeOfFont == Aspect_TOF_USERDEFINED) - { - Aspect_FontStyle TheType((Standard_CString)(LPCTSTR )m_NewEntryValue); - aFontMapEntry.SetType(TheType); - } - else - { - Aspect_FontStyle TheType((Aspect_TypeOfFont)m_NewEntry_Type.GetCurSel(),m_NewEntrySize,m_NewEntrySlant); - aFontMapEntry.SetType(TheType); - } - myFontMap->AddEntry(aFontMapEntry); // in fact just update - SetModified(true); - UpdateDisplay(m_TabCtrl.GetCurSel()+1); - UpdateData(false); -} - - -void CFontPropertyPage::OnFontMapBUTTONNewEntry() -{ - // The Entry to modify : - Aspect_FontMapEntry aFontMapEntry; - - UpdateData(true); - Aspect_TypeOfFont aTypeOfFont = (Aspect_TypeOfFont)m_NewEntry_Type.GetCurSel(); - - if (aTypeOfFont == Aspect_TOF_USERDEFINED) - { - Aspect_FontStyle TheType((Standard_CString)(LPCTSTR )m_NewEntryValue); - aFontMapEntry.SetType(TheType); - } - else - { - Aspect_FontStyle TheType((Aspect_TypeOfFont)m_NewEntry_Type.GetCurSel(),m_NewEntrySize,m_NewEntrySlant); - aFontMapEntry.SetType(TheType); - } - myFontMap->AddEntry(aFontMapEntry); // in fact just update - SetModified(true); - UpdateDisplay(m_TabCtrl.GetCurSel()+1); - UpdateData(false); -} - -BOOL CFontPropertyPage::OnApply() -{ - myViewer->SetFontMap(myFontMap); - myViewer->Update(); - - return CPropertyPage::OnApply(); -} diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/FontPropertyPage.h b/samples/mfc/standard/03_Viewer2d/src/Properties/FontPropertyPage.h deleted file mode 100755 index 5cbbe671ed..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/FontPropertyPage.h +++ /dev/null @@ -1,76 +0,0 @@ -#if !defined(AFX_FontPropertyPage_H__A815F7A5_D51B_11D1_8DDE_0800369C8A03__INCLUDED_) -#define AFX_FontPropertyPage_H__A815F7A5_D51B_11D1_8DDE_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// FontPropertyPage.h : header file -// -#include "Aspect_FontMap.hxx" -///////////////////////////////////////////////////////////////////////////// -// CFontPropertyPage dialog - -class CFontPropertyPage : public CPropertyPage -{ - DECLARE_DYNCREATE(CFontPropertyPage) - -private : - Handle(Aspect_FontMap) myFontMap; -private : - Handle(V2d_Viewer) myViewer; -public: - void SetViewer(Handle(V2d_Viewer) aViewer) { - myViewer = aViewer; - myFontMap = aViewer->FontMap(); - }; - -// Construction -public: - CFontPropertyPage(); - ~CFontPropertyPage(); - -// Dialog Data - //{{AFX_DATA(CFontPropertyPage) - enum { IDD = IDD_DIALOG_Font }; - CString m_FontMapSize; - CTabCtrl m_TabCtrl; - CString m_CurrentEntryValue; - CString m_CurrentEntryStyle; - CString m_CurrentEntrySize; - CString m_CurrentEntrySlant; - CComboBox m_NewEntry_Type; - double m_NewEntrySize; - double m_NewEntrySlant; - CString m_NewEntryValue; - //}}AFX_DATA - -// Overrides - // ClassWizard generate virtual function overrides - //{{AFX_VIRTUAL(CFontPropertyPage) - public: - virtual BOOL OnApply(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - // Generated message map functions - //{{AFX_MSG(CFontPropertyPage) - virtual BOOL OnInitDialog(); - afx_msg void OnSelchangeFontMapTAB(NMHDR* pNMHDR, LRESULT* pResult); - afx_msg void OnFontMapBUTTONNewEntryEditFont(); - afx_msg void OnFontMapBUTTONUpdateCurrent(); - afx_msg void OnSelchangeFontMapCOMBONewEntryType(); - afx_msg void OnFontMapBUTTONNewEntry(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -private: - void UpdateDisplay(int CurrentSelectionIndex); - -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_FontPropertyPage_H__A815F7A5_D51B_11D1_8DDE_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/MarkPropertyPage.cpp b/samples/mfc/standard/03_Viewer2d/src/Properties/MarkPropertyPage.cpp deleted file mode 100755 index 1686b0f274..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/MarkPropertyPage.cpp +++ /dev/null @@ -1,172 +0,0 @@ -// MarkPropertyPage.cpp : implementation file -// - -#include "stdafx.h" - -#include "MarkPropertyPage.h" - -#include "Aspect_MarkMap.hxx" -#include "Aspect_MarkMapEntry.hxx" -#include "TColQuantity_Array1OfLength.hxx" -#include "TColStd_SequenceOfReal.hxx" -#include "TShort_Array1OfShortReal.hxx" -#include "TColStd_Array1OfBoolean.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CMarkPropertyPage property page - -IMPLEMENT_DYNCREATE(CMarkPropertyPage, CPropertyPage) - -CMarkPropertyPage::CMarkPropertyPage() : CPropertyPage(CMarkPropertyPage::IDD) -{ - //{{AFX_DATA_INIT(CMarkPropertyPage) - m_MarkMapSize = _T("Computing..."); - m_CurrentEntryStyle = _T("Computing..."); - m_CurrentEntryXValue = _T("Computing..."); - m_CurrentEntryYValue = _T("Computing..."); - m_CurrentEntrySValue = _T("Computing..."); - //}}AFX_DATA_INIT - - -} -BOOL CMarkPropertyPage::OnInitDialog() -{ - CPropertyPage::OnInitDialog(); - - UpdateDisplay(1); - - UpdateData(false); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -CMarkPropertyPage::~CMarkPropertyPage() -{ -} - -void CMarkPropertyPage::DoDataExchange(CDataExchange* pDX) -{ - CPropertyPage::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CMarkPropertyPage) - DDX_Control(pDX, IDC_MarkMap_TAB, m_TabCtrl); - DDX_Text(pDX, IDC_MarkMap_STATIC_Size, m_MarkMapSize); - DDX_Text(pDX, IDC_MarkMap_STATIC_CurrentEntryStyle, m_CurrentEntryStyle); - DDX_Text(pDX, IDC_MarkMap_STATIC_CurrentEntryXValue, m_CurrentEntryXValue); - DDX_Text(pDX, IDC_MarkMap_STATIC_CurrentEntryYValue, m_CurrentEntryYValue); - DDX_Text(pDX, IDC_MarkMap_STATIC_CurrentEntrySValue, m_CurrentEntrySValue); - - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CMarkPropertyPage, CPropertyPage) - //{{AFX_MSG_MAP(CMarkPropertyPage) - ON_NOTIFY(TCN_SELCHANGE, IDC_MarkMap_TAB, OnSelchangeMarkMapTAB) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CMarkPropertyPage message handlers -void CMarkPropertyPage::UpdateDisplay(int CurrentSelectionIndex) -{ - TCollection_AsciiString SizeMessage(myMarkMap->Size()); - m_MarkMapSize = _T(SizeMessage.ToCString()); - - m_TabCtrl.DeleteAllItems(); - - TC_ITEM TabCtrlItem; - TabCtrlItem.mask = TCIF_TEXT; - - for(int i =1;i<=myMarkMap->Size();i++) - { - Aspect_MarkMapEntry aMarkMapEntry = myMarkMap->Entry(i); - TCollection_AsciiString EntryNumerMessage(aMarkMapEntry.Index()); - TabCtrlItem.pszText = (LPSTR) EntryNumerMessage.ToCString(); - m_TabCtrl.InsertItem( aMarkMapEntry.Index(), &TabCtrlItem ); - } - m_TabCtrl.SetCurSel(CurrentSelectionIndex-1); - - // update The Current Selected entry - Aspect_MarkMapEntry aMarkMapEntry = myMarkMap->Entry(CurrentSelectionIndex); - if (aMarkMapEntry. IsAllocated () ) - { - Aspect_MarkerStyle aMarkerStyle = aMarkMapEntry.Style() ; - switch (aMarkerStyle.Type()) { - case Aspect_TOM_POINT : m_CurrentEntryStyle = _T("Aspect_TOM_POINT"); break; - case Aspect_TOM_PLUS : m_CurrentEntryStyle = _T("Aspect_TOM_PLUS"); break; - case Aspect_TOM_STAR : m_CurrentEntryStyle = _T("Aspect_TOM_STAR"); break; - case Aspect_TOM_O : m_CurrentEntryStyle = _T("Aspect_TOM_O"); break; - case Aspect_TOM_X : m_CurrentEntryStyle = _T("Aspect_TOM_X"); break; - case Aspect_TOM_O_POINT : m_CurrentEntryStyle = _T("Aspect_TOM_O_POINT"); break; - case Aspect_TOM_O_PLUS : m_CurrentEntryStyle = _T("Aspect_TOM_O_PLUS"); break; - case Aspect_TOM_O_STAR : m_CurrentEntryStyle = _T("Aspect_TOM_O_STAR"); break; - case Aspect_TOM_O_X : m_CurrentEntryStyle = _T("Aspect_TOM_O_X"); break; - case Aspect_TOM_BALL : m_CurrentEntryStyle = _T("Aspect_TOM_BALL"); break; - case Aspect_TOM_RING1 : m_CurrentEntryStyle = _T("Aspect_TOM_RING1"); break; - case Aspect_TOM_RING2 : m_CurrentEntryStyle = _T("Aspect_TOM_RING2"); break; - case Aspect_TOM_RING3 : m_CurrentEntryStyle = _T("Aspect_TOM_RING3"); break; - case Aspect_TOM_USERDEFINED : m_CurrentEntryStyle = _T("Aspect_TOM_USERDEFINED"); break; - default : m_CurrentEntryStyle = _T("Underknown"); - } - - cout<<" aMarkerStyle Length: "<<aMarkerStyle.Length()<<endl; - - const TShort_Array1OfShortReal& aMarkerStyleXValues = aMarkerStyle.XValues() ; - const TShort_Array1OfShortReal& aMarkerStyleYValues= aMarkerStyle.YValues() ; - const TColStd_Array1OfBoolean& aMarkerStyleSValues= aMarkerStyle.SValues() ; - - TCollection_AsciiString MessageX =BuildValuesAscii(aMarkerStyleXValues); - TCollection_AsciiString MessageY =BuildValuesAscii(aMarkerStyleYValues); - TCollection_AsciiString MessageS =BuildValuesAscii(aMarkerStyleSValues); - - m_CurrentEntryXValue = _T(MessageX.ToCString()); - m_CurrentEntryYValue = _T(MessageY.ToCString()); - m_CurrentEntrySValue = _T(MessageS.ToCString()); - - } - else - { - m_CurrentEntryStyle = _T("Not Allocated"); - m_CurrentEntryXValue = _T(""); - m_CurrentEntryYValue = _T(""); - m_CurrentEntrySValue = _T(""); - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_HIDE); - } -} - -void CMarkPropertyPage::OnSelchangeMarkMapTAB(NMHDR* pNMHDR, LRESULT* pResult) -{ - UpdateDisplay(m_TabCtrl.GetCurSel()+1); - UpdateData(false); - *pResult = 0; -} - -BOOL CMarkPropertyPage::OnApply() -{ -// myViewer->SetMarkMap(myMarkMap); -// myViewer->Update(); - return CPropertyPage::OnApply(); -} - -TCollection_AsciiString CMarkPropertyPage::BuildValuesAscii(const TShort_Array1OfShortReal& anArray) -{ - TCollection_AsciiString Message; - for(int i=1;i<=anArray.Length();i++) - { - Message += anArray.Value(i); - Message += "\t"; - } - return Message; -} - -TCollection_AsciiString CMarkPropertyPage::BuildValuesAscii(const TColStd_Array1OfBoolean& anArray) -{ - TCollection_AsciiString Message; - for(int i=1;i<=anArray.Length();i++) - { - if (anArray(i)) Message += "True"; else Message += "False"; - Message += "\t"; - } - return Message; -} diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/MarkPropertyPage.h b/samples/mfc/standard/03_Viewer2d/src/Properties/MarkPropertyPage.h deleted file mode 100755 index a6ee9bd49f..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/MarkPropertyPage.h +++ /dev/null @@ -1,78 +0,0 @@ -#if !defined(AFX_MarkPropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_) -#define AFX_MarkPropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// MarkPropertyPage.h : header file -// - -#include "V2d_Viewer.hxx" -#include "TColQuantity_Array1OfLength.hxx" -#include "TColQuantity_HArray1OfLength.hxx" -#include "TColStd_Array1OfBoolean.hxx" -///////////////////////////////////////////////////////////////////////////// -// CMarkPropertyPage dialog - -class CMarkPropertyPage : public CPropertyPage -{ -private : - Handle(Aspect_MarkMap) myMarkMap; -private : - Handle(V2d_Viewer) myViewer; -public: - void SetViewer(Handle(V2d_Viewer) aViewer) { - myViewer = aViewer; - myMarkMap = aViewer->MarkMap(); - }; - - DECLARE_DYNCREATE(CMarkPropertyPage) - -// Construction -public: - CMarkPropertyPage(); - ~CMarkPropertyPage(); - -// Dialog Data - //{{AFX_DATA(CMarkPropertyPage) - enum { IDD = IDD_DIALOG_Mark }; - CTabCtrl m_TabCtrl; - CComboBox m_NewEntryControl; - - CString m_MarkMapSize; - CString m_CurrentEntryStyle; - CString m_CurrentEntryXValue; - CString m_CurrentEntryYValue; - CString m_CurrentEntrySValue; - //}}AFX_DATA - - -// Overrides - // ClassWizard generate virtual function overrides - //{{AFX_VIRTUAL(CMarkPropertyPage) - public: - virtual BOOL OnApply(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - // Generated message map functions - //{{AFX_MSG(CMarkPropertyPage) - virtual BOOL OnInitDialog(); - afx_msg void OnSelchangeMarkMapTAB(NMHDR* pNMHDR, LRESULT* pResult); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -private: - void UpdateDisplay(int CurrentSelectionIndex); - - TCollection_AsciiString BuildValuesAscii(const TShort_Array1OfShortReal& anArray); - TCollection_AsciiString BuildValuesAscii(const TColStd_Array1OfBoolean& anArray); - -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_MarkPropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/PropertiesDialog.rc2 b/samples/mfc/standard/03_Viewer2d/src/Properties/PropertiesDialog.rc2 deleted file mode 100755 index 4be558e46e..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/PropertiesDialog.rc2 +++ /dev/null @@ -1,236 +0,0 @@ -// -// resources Microsoft Visual C++ -// - -///////////////////////////////////////////////////////////////////////////// -// Add manually edited resources here... - -///////////////////////////////////////////////////////////////////////////// - -IDD_DIALOG_Color DIALOG DISCARDABLE 0, 0, 281, 186 -STYLE 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_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Font Map" -FONT 8, "MS Sans Serif" -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 DISCARDABLE 0, 0, 281, 167 -STYLE 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 DISCARDABLE 0, 0, 207, 156 -STYLE 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 DISCARDABLE 0, 0, 252, 121 -STYLE 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_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Type Map" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Size Of The Typet 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_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Mark Map" -FONT 8, "MS Sans Serif" -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 diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/PropertiesSheet.cpp b/samples/mfc/standard/03_Viewer2d/src/Properties/PropertiesSheet.cpp deleted file mode 100755 index b40086cecd..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/PropertiesSheet.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// MapProperties.cpp : implementation file -// - -#include "stdafx.h" - -#include "PropertiesSheet.h" - -///////////////////////////////////////////////////////////////////////////// -// CPropertiesSheet - -IMPLEMENT_DYNAMIC(CPropertiesSheet, CPropertySheet) - -CPropertiesSheet::CPropertiesSheet(CWnd* pParentWnd, UINT iSelectPage) - :CPropertySheet("View Map Properties", pParentWnd, iSelectPage) -{ -} - -void CPropertiesSheet::SetViewer (Handle(V2d_Viewer) aViewer) -{ - AddPage(& m_pageWidthProperty); - m_pageWidthProperty.SetViewer(aViewer); - - AddPage(& m_pageColorProperty); - m_pageColorProperty.SetViewer(aViewer); - - AddPage(& m_pageFontProperty); - m_pageFontProperty.SetViewer(aViewer); - - AddPage(& m_pageTypeProperty); - m_pageTypeProperty.SetViewer(aViewer); - - AddPage(& m_pageMarkProperty); - m_pageMarkProperty.SetViewer(aViewer); - -} - -CPropertiesSheet::~CPropertiesSheet() -{ -} - - -BEGIN_MESSAGE_MAP(CPropertiesSheet, CPropertySheet) - //{{AFX_MSG_MAP(CPropertiesSheet) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CPropertiesSheet message handlers - -BOOL CPropertiesSheet::OnInitDialog() -{ - BOOL bResult = CPropertySheet::OnInitDialog(); - return bResult; -} - diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/PropertiesSheet.h b/samples/mfc/standard/03_Viewer2d/src/Properties/PropertiesSheet.h deleted file mode 100755 index fb5c0da48a..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/PropertiesSheet.h +++ /dev/null @@ -1,68 +0,0 @@ -#if !defined(AFX_PropertiesSheet_H__A815F7A6_D51B_11D1_8DDE_0800369C8A03__INCLUDED_) -#define AFX_PropertiesSheet_H__A815F7A6_D51B_11D1_8DDE_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// PropertiesSheet.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CPropertiesSheet -#include "ColorPropertyPage.h" -#include "FontPropertyPage.h" -#include "WidthPropertyPage.h" -#include "TypePropertyPage.h" -#include "MarkPropertyPage.h" - - -class CPropertiesSheet : public CPropertySheet -{ - DECLARE_DYNAMIC(CPropertiesSheet) - - - -private : - CColorPropertyPage m_pageColorProperty; - CFontPropertyPage m_pageFontProperty; - CWidthPropertyPage m_pageWidthProperty; - CTypePropertyPage m_pageTypeProperty; - CMarkPropertyPage m_pageMarkProperty; - -// Construction -public: - CPropertiesSheet(CWnd* pParentWnd = NULL, UINT iSelectPage = 0); - - void SetViewer (Handle(V2d_Viewer) aViewer); - -// Attributes -public: - -// Operations -public: - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CPropertiesSheet) - public: - virtual BOOL OnInitDialog(); - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~CPropertiesSheet(); - - // Generated message map functions -protected: - //{{AFX_MSG(CPropertiesSheet) - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_PropertiesSheet_H__A815F7A6_D51B_11D1_8DDE_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/TypePropertyPage.cpp b/samples/mfc/standard/03_Viewer2d/src/Properties/TypePropertyPage.cpp deleted file mode 100755 index 780a458317..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/TypePropertyPage.cpp +++ /dev/null @@ -1,287 +0,0 @@ -// TypePropertyPage.cpp : implementation file -// - -#include "stdafx.h" - -#include "TypePropertyPage.h" - -#include "Aspect_TypeMap.hxx" -#include "Aspect_TypeMapEntry.hxx" -#include "TColQuantity_Array1OfLength.hxx" -#include "TColStd_SequenceOfReal.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CTypePropertyPage property page - -IMPLEMENT_DYNCREATE(CTypePropertyPage, CPropertyPage) - -CTypePropertyPage::CTypePropertyPage() : CPropertyPage(CTypePropertyPage::IDD) -{ - //{{AFX_DATA_INIT(CTypePropertyPage) - m_TypeMapSize = _T("Computing..."); - m_CurrentEntryStyle = _T("Computing..."); - m_CurrentEntryValue = _T("Computing..."); - m_NewEntryValue = _T(""); - //}}AFX_DATA_INIT - - -} -BOOL CTypePropertyPage::OnInitDialog() -{ - CPropertyPage::OnInitDialog(); - - // TODO: Add extra initialization here - - m_NewEntryControl.AddString("SOLID"); - m_NewEntryControl.AddString("DASH"); - m_NewEntryControl.AddString("DOT"); - m_NewEntryControl.AddString("DOTDASH"); - m_NewEntryControl.AddString("USERDEFINED"); - m_NewEntryControl.SetCurSel(1); - - UpdateDisplay(1); - - UpdateData(false); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -CTypePropertyPage::~CTypePropertyPage() -{ -} - -void CTypePropertyPage::DoDataExchange(CDataExchange* pDX) -{ - CPropertyPage::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CTypePropertyPage) - DDX_Control(pDX, IDC_TypeMap_TAB, m_TabCtrl); - DDX_Control(pDX, IDC_TypeMap_COMBO_NewEntryStyle, m_NewEntryControl); - DDX_Control(pDX, IDC_TypeMap_EDIT_NewEntryValue, m_NewEntryValueControl); - DDX_Text(pDX, IDC_TypeMap_STATIC_Size, m_TypeMapSize); - DDX_Text(pDX, IDC_TypeMap_STATIC_CurrentEntryStyle, m_CurrentEntryStyle); - DDX_Text(pDX, IDC_TypeMap_STATIC_CurrentEntryValue, m_CurrentEntryValue); - DDX_Text(pDX, IDC_TypeMap_EDIT_NewEntryValue, m_NewEntryValue); - - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CTypePropertyPage, CPropertyPage) - //{{AFX_MSG_MAP(CTypePropertyPage) - ON_BN_CLICKED(IDC_FontMap_BUTTON_NewEntry, OnFontMapBUTTONNewEntry) - ON_BN_CLICKED(IDC_FontMap_BUTTON_UpdateCurrent, OnFontMapBUTTONUpdateCurrent) - ON_EN_CHANGE(IDC_TypeMap_EDIT_NewEntryValue, OnChangeTypeMapEDITNewEntryValue) - ON_NOTIFY(TCN_SELCHANGE, IDC_TypeMap_TAB, OnSelchangeTypeMapTAB) - ON_CBN_SELCHANGE(IDC_TypeMap_COMBO_NewEntryStyle, OnSelchangeTypeMapCOMBONewEntryStyle) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CTypePropertyPage message handlers -void CTypePropertyPage::UpdateDisplay(int CurrentSelectionIndex) -{ - TCollection_AsciiString SizeMessage(myTypeMap->Size()); - m_TypeMapSize = _T(SizeMessage.ToCString()); - - m_TabCtrl.DeleteAllItems(); - - TC_ITEM TabCtrlItem; - TabCtrlItem.mask = TCIF_TEXT; - - for(int i =1;i<=myTypeMap->Size();i++) - { - Aspect_TypeMapEntry aTypeMapEntry = myTypeMap->Entry(i); - TCollection_AsciiString EntryNumerMessage(aTypeMapEntry.Index()); - TabCtrlItem.pszText = (LPSTR) EntryNumerMessage.ToCString(); - m_TabCtrl.InsertItem( aTypeMapEntry.Index(), &TabCtrlItem ); - } - m_TabCtrl.SetCurSel(CurrentSelectionIndex-1); - - // update The Current Selected entry - Aspect_TypeMapEntry aTypeMapEntry = myTypeMap->Entry(CurrentSelectionIndex); - if (aTypeMapEntry. IsAllocated () ) - { - Aspect_LineStyle TypeMapEntryType = aTypeMapEntry.Type() ; - - switch (TypeMapEntryType.Style()) { - case Aspect_TOL_SOLID : m_CurrentEntryStyle = _T("SOLID"); break; - case Aspect_TOL_DASH : m_CurrentEntryStyle = _T("DASH"); break; - case Aspect_TOL_DOT : m_CurrentEntryStyle = _T("DOT"); break; - case Aspect_TOL_DOTDASH : m_CurrentEntryStyle = _T("DOTDASH"); break; - case Aspect_TOL_USERDEFINED : m_CurrentEntryStyle = _T("USERDEFINED"); break; - default : m_CurrentEntryStyle = _T("Underknown"); - } - int NbValue = TypeMapEntryType.Length(); - TCollection_AsciiString Message = BuildValuesAscii(TypeMapEntryType.Values()); - - m_CurrentEntryValue = _T(Message.ToCString()); - - m_NewEntryControl.SetCurSel(TypeMapEntryType.Style()); - m_NewEntryValue = _T(Message.ToCString()); - if (TypeMapEntryType.Style() == Aspect_TOL_USERDEFINED) - m_NewEntryValueControl.SetReadOnly( false ); - else - m_NewEntryValueControl.SetReadOnly( true ); - } - else - { - m_CurrentEntryStyle = _T("Not Allocated"); - m_CurrentEntryValue = _T(""); - m_NewEntryValue = _T("No value"); - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_HIDE); - } -} - -void CTypePropertyPage::OnSelchangeTypeMapTAB(NMHDR* pNMHDR, LRESULT* pResult) -{ - UpdateDisplay(m_TabCtrl.GetCurSel()+1); - UpdateData(false); - *pResult = 0; -} -void CTypePropertyPage::OnSelchangeTypeMapCOMBONewEntryStyle() -{ - UpdateData(true); - // the Type Map entry change in the edit part - if (m_NewEntryControl.GetCurSel() == Aspect_TOL_USERDEFINED) - m_NewEntryValueControl.SetReadOnly( false ); - else - { - m_NewEntryValueControl.SetReadOnly( true ); - - // create a dummy map to extract the default values - Aspect_TypeMapEntry aTypeMapEntry(99,(Aspect_TypeOfLine)m_NewEntryControl.GetCurSel()); - Aspect_LineStyle TypeMapEntryType = aTypeMapEntry.Type() ; - TCollection_AsciiString Message = BuildValuesAscii(TypeMapEntryType.Values()); - - m_NewEntryValue = _T(Message.ToCString()); - } - UpdateData(false); -} - -void CTypePropertyPage::OnChangeTypeMapEDITNewEntryValue() -{ - UpdateData(true); - Handle(TColQuantity_HArray1OfLength) anArray; - Standard_Boolean IsDone = ExtractValues(TCollection_AsciiString((char *)(LPCSTR)m_NewEntryValue),anArray); - if (IsDone) - { - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry)->ShowWindow(SW_SHOW); - } - else - { - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry)->ShowWindow(SW_HIDE); - } -} - -void CTypePropertyPage::OnFontMapBUTTONNewEntry() -{ - UpdateData(true); - int NewEntry; - - if (m_NewEntryControl.GetCurSel() == Aspect_TOL_USERDEFINED) - { - Handle(TColQuantity_HArray1OfLength) anArray; - if (ExtractValues(TCollection_AsciiString((char *)(LPCSTR)m_NewEntryValue),anArray)) - { - Aspect_LineStyle aLineStyle(anArray->Array1()); - NewEntry = myTypeMap->AddEntry( aLineStyle ); - } - else Standard_Failure::Raise(" The String is not Valid "); - } - else - { - Aspect_LineStyle aLineStyle((Aspect_TypeOfLine)m_NewEntryControl.GetCurSel()); - NewEntry = myTypeMap->AddEntry( aLineStyle ); - } - - SetModified(true); - UpdateDisplay(NewEntry); - UpdateData(false); -} - -void CTypePropertyPage::OnFontMapBUTTONUpdateCurrent() -{ - UpdateData(true); - Aspect_TypeMapEntry aTypeMapEntry = myTypeMap->Entry( m_TabCtrl.GetCurSel()+1); - - if (m_NewEntryControl.GetCurSel() == Aspect_TOL_USERDEFINED) - { - Handle(TColQuantity_HArray1OfLength) anArray; - if (ExtractValues(TCollection_AsciiString((char *)(LPCSTR)m_NewEntryValue),anArray)) - { - Aspect_LineStyle aLineStyle(anArray->Array1()); - aTypeMapEntry.SetType( aLineStyle ); - } - else Standard_Failure::Raise(" The String is not Valid "); - } - else - { - Aspect_LineStyle aLineStyle((Aspect_TypeOfLine)m_NewEntryControl.GetCurSel()); - aTypeMapEntry.SetType( aLineStyle ); - } - - myTypeMap->AddEntry(aTypeMapEntry); // in fact just update - - SetModified(true); - UpdateDisplay(m_TabCtrl.GetCurSel()+1); - UpdateData(false); -} - -BOOL CTypePropertyPage::OnApply() -{ - myViewer->SetTypeMap(myTypeMap); - myViewer->Update(); - return CPropertyPage::OnApply(); -} - -Standard_Boolean CTypePropertyPage::ExtractValues(TCollection_AsciiString aMessage, - Handle(TColQuantity_HArray1OfLength)& anArray) // out -{ - TColStd_SequenceOfReal aSequenceOfReal; - Standard_Integer CurrentStartValue=1; - bool NotFinish = true; - while (NotFinish) - { - CurrentStartValue = aMessage.SearchFromEnd(";"); - if ( CurrentStartValue == aMessage.Length()) return Standard_False; - if (CurrentStartValue != -1) - { - TCollection_AsciiString aNewMessage = aMessage.Split(CurrentStartValue); - aMessage.Remove(aMessage.Length()); - if (aNewMessage.IsRealValue()) - aSequenceOfReal.Append(aNewMessage.RealValue()); - else return Standard_False; - } - else - { - if (aMessage.IsRealValue()) - aSequenceOfReal.Append(aMessage.RealValue()); - else return Standard_False; - NotFinish = false; - } - } - - anArray = new TColQuantity_HArray1OfLength(1,aSequenceOfReal.Length()); - for (int i=1;i<=aSequenceOfReal.Length();i++) - anArray->SetValue(i,aSequenceOfReal(aSequenceOfReal.Length()-i+1)); - - return Standard_True; -} - -TCollection_AsciiString CTypePropertyPage::BuildValuesAscii(const TColQuantity_Array1OfLength& anArray) -{ - TCollection_AsciiString Message; - int NbValue = anArray.Length(); - for (int j=1;j<NbValue;j++) - { - Message += anArray(j); - Message += " ; "; - } - Quantity_Length Length = anArray(NbValue); - if (Length > Precision::Confusion()) Message += Length; - else Message += "No value"; - return Message; -} diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/TypePropertyPage.h b/samples/mfc/standard/03_Viewer2d/src/Properties/TypePropertyPage.h deleted file mode 100755 index f059870c31..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/TypePropertyPage.h +++ /dev/null @@ -1,81 +0,0 @@ -#if !defined(AFX_TypePropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_) -#define AFX_TypePropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// TypePropertyPage.h : header file -// - -#include "V2d_Viewer.hxx" -#include "TColQuantity_HArray1OfLength.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CTypePropertyPage dialog - -class CTypePropertyPage : public CPropertyPage -{ -private : - Handle(Aspect_TypeMap) myTypeMap; -private : - Handle(V2d_Viewer) myViewer; -public: - void SetViewer(Handle(V2d_Viewer) aViewer) { - myViewer = aViewer; - myTypeMap = aViewer->TypeMap(); - }; - - DECLARE_DYNCREATE(CTypePropertyPage) - -// Construction -public: - CTypePropertyPage(); - ~CTypePropertyPage(); - -// Dialog Data - //{{AFX_DATA(CTypePropertyPage) - enum { IDD = IDD_DIALOG_Type }; - CTabCtrl m_TabCtrl; - CComboBox m_NewEntryControl; - - CString m_TypeMapSize; - CString m_CurrentEntryStyle; - CString m_CurrentEntryValue; - CEdit m_NewEntryValueControl; - CString m_NewEntryValue; - //}}AFX_DATA - - -// Overrides - // ClassWizard generate virtual function overrides - //{{AFX_VIRTUAL(CTypePropertyPage) - public: - virtual BOOL OnApply(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - // Generated message map functions - //{{AFX_MSG(CTypePropertyPage) - virtual BOOL OnInitDialog(); - afx_msg void OnFontMapBUTTONNewEntry(); - afx_msg void OnFontMapBUTTONUpdateCurrent(); - afx_msg void OnChangeTypeMapEDITNewEntryValue(); - afx_msg void OnSelchangeTypeMapTAB(NMHDR* pNMHDR, LRESULT* pResult); - afx_msg void OnSelchangeTypeMapCOMBONewEntryStyle(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -private: - void UpdateDisplay(int CurrentSelectionIndex); - - TCollection_AsciiString BuildValuesAscii(const TColQuantity_Array1OfLength& anArray); - Standard_Boolean ExtractValues(TCollection_AsciiString aMessage,Handle(TColQuantity_HArray1OfLength)& anArray); - -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_TypePropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/WidthPropertyPage.cpp b/samples/mfc/standard/03_Viewer2d/src/Properties/WidthPropertyPage.cpp deleted file mode 100755 index 2164a4fbd4..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/WidthPropertyPage.cpp +++ /dev/null @@ -1,184 +0,0 @@ -// WidthProperty.cpp : implementation file -// - -#include "stdafx.h" - -#include "WidthPropertyPage.h" - -#include "Aspect_WidthMapEntry.hxx" -#include "Aspect_LineStyle.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CWidthPropertyPage property page - -IMPLEMENT_DYNCREATE(CWidthPropertyPage, CPropertyPage) - -CWidthPropertyPage::CWidthPropertyPage() : CPropertyPage(CWidthPropertyPage::IDD) -{ - //{{AFX_DATA_INIT(CWidthPropertyPage) - m_WidthMapSize = _T("Computing..."); - m_EntryType = _T("Computing..."); - m_EntryWidth = _T("Computing..."); - m_NewEntryWidth = 1; - //}}AFX_DATA_INIT -} - -CWidthPropertyPage::~CWidthPropertyPage() -{ -} - -void CWidthPropertyPage::DoDataExchange(CDataExchange* pDX) -{ - CPropertyPage::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CWidthPropertyPage) - DDX_Text (pDX, IDC_WidthMap_STATIC_Size, m_WidthMapSize); - DDX_Control (pDX, IDC_WidthMap_TAB, m_TabCtrl); - DDX_Text (pDX, IDC_WidthMap_STATIC_EntryType, m_EntryType); - DDX_Text (pDX, IDC_WidthMap_STATIC_EntryWidth, m_EntryWidth); - DDX_Control (pDX, IDC_WidthMap_COMBO_NewEntryType, m_NewEntryType); - DDX_Control (pDX, IDC_WidthMap_EDIT_NewEntryWidth, m_NewEntryWidthControl); - DDX_Text (pDX, IDC_WidthMap_EDIT_NewEntryWidth, m_NewEntryWidth); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CWidthPropertyPage, CPropertyPage) - //{{AFX_MSG_MAP(CWidthPropertyPage) - ON_NOTIFY(TCN_SELCHANGE, IDC_WidthMap_TAB, OnSelchangeDialogWidthTAB) - ON_BN_CLICKED(IDC_WidthMap_BUTTON_AddNewEntry, OnWidthMapBUTTONAddNewEntry) - ON_CBN_SELCHANGE(IDC_WidthMap_COMBO_NewEntryType, OnSelchangeWidthMapCOMBONewEntryType) - ON_BN_CLICKED(IDC_WidthMap_BUTTON_UpdateCurrentEntry, OnWidthMapBUTTONUpdateCurrentEntry) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CWidthPropertyPage message handlers - -BOOL CWidthPropertyPage::OnInitDialog() -{ - CPropertyPage::OnInitDialog(); - - // update the CComboBox to add the enumeration possibilities. - m_NewEntryType.AddString( "THIN" ); - m_NewEntryType.AddString( "MEDIUM" ); - m_NewEntryType.AddString( "THICK" ); - m_NewEntryType.AddString( "VERYTHICK" ); - m_NewEntryType.AddString( "USERDEFINED" ); - m_NewEntryType.SetCurSel(0); - - UpdateDisplay(1); - UpdateData(false); - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - - -void CWidthPropertyPage::UpdateDisplay(int CurrentSelectionIndex) -{ - // Update the size of the Width map - TCollection_AsciiString SizeMessage(myWidthMap->Size()); - m_WidthMapSize = _T(SizeMessage.ToCString()); - - // clear the Tab Ctrl - m_TabCtrl.DeleteAllItems(); - TC_ITEM TabCtrlItem; - TabCtrlItem.mask = TCIF_TEXT; - for(int i =1;i<=myWidthMap->Size();i++) - { - Aspect_WidthMapEntry aWidthMapEntry = myWidthMap->Entry(i); - - TCollection_AsciiString EntryNumerMessage(aWidthMapEntry.Index()); - TabCtrlItem.pszText = (LPSTR) EntryNumerMessage.ToCString(); - m_TabCtrl.InsertItem( aWidthMapEntry.Index(), &TabCtrlItem ); - } - m_TabCtrl.SetCurSel(CurrentSelectionIndex-1); - // update the current Entry informations - Aspect_WidthMapEntry aWidthMapEntry = myWidthMap->Entry(CurrentSelectionIndex); - - // update the current entry - switch (aWidthMapEntry.Type()) { - case Aspect_WOL_THIN : m_EntryType = _T("Aspect_WOL_THIN") ; break; - case Aspect_WOL_MEDIUM : m_EntryType = _T("Aspect_WOL_MEDIUM") ; break; - case Aspect_WOL_THICK : m_EntryType = _T("Aspect_WOL_THICK") ; break; - case Aspect_WOL_VERYTHICK : m_EntryType = _T("Aspect_WOL_VERYTHICK") ; break; - case Aspect_WOL_USERDEFINED : m_EntryType = _T("Aspect_WOL_USERDEFINED") ; break; - default : cout<<" Underknown"; - } - - TCollection_AsciiString WidthMessage(aWidthMapEntry.Width()); - m_EntryWidth = _T(WidthMessage.ToCString()); - - // update the edit / new part of the - // also update the edit part - m_NewEntryType.SetCurSel(aWidthMapEntry.Type()); - m_NewEntryWidth = aWidthMapEntry.Width(); - if (aWidthMapEntry.Type() == Aspect_WOL_USERDEFINED) - m_NewEntryWidthControl.SetReadOnly( false); - else - m_NewEntryWidthControl.SetReadOnly( true); - -// if (CurrentSelectionIndex == 1) // the item 1 is not editable ( in the map by default ) -// GetDlgItem(IDC_WidthMap_BUTTON_UpdateCurrentEntry)->ShowWindow(SW_HIDE); -// else - GetDlgItem(IDC_WidthMap_BUTTON_UpdateCurrentEntry)->ShowWindow(SW_SHOW); -} - -void CWidthPropertyPage::OnSelchangeDialogWidthTAB(NMHDR* pNMHDR, LRESULT* pResult) -{ - UpdateDisplay( m_TabCtrl.GetCurSel()+1); - UpdateData(false); - *pResult = 0; -} - -void CWidthPropertyPage::OnSelchangeWidthMapCOMBONewEntryType() -{ - UpdateData(true); - // the Width Map entry change in the edit part - if (m_NewEntryType.GetCurSel() == Aspect_WOL_USERDEFINED) - m_NewEntryWidthControl.SetReadOnly( false); - else - { - m_NewEntryWidthControl.SetReadOnly( true); - Aspect_WidthMapEntry aTmpWidthMapEntry (99,(Aspect_WidthOfLine)m_NewEntryType.GetCurSel()); - m_NewEntryWidth = aTmpWidthMapEntry.Width(); - } - UpdateData(false); -} - -void CWidthPropertyPage::OnWidthMapBUTTONAddNewEntry() -{ - UpdateData(true); - int NewEntry; - if (m_NewEntryType.GetCurSel() == Aspect_WOL_USERDEFINED) - NewEntry =myWidthMap->AddEntry(m_NewEntryWidth); - else - NewEntry =myWidthMap->AddEntry( (Aspect_WidthOfLine)m_NewEntryType.GetCurSel()); - SetModified(true); - UpdateDisplay(NewEntry); - UpdateData(false); -} - -void CWidthPropertyPage::OnWidthMapBUTTONUpdateCurrentEntry() -{ - UpdateData(true); - - Aspect_WidthMapEntry aWidthMapEntry = myWidthMap->Entry( m_TabCtrl.GetCurSel()+1); - - if (m_NewEntryType.GetCurSel() == Aspect_WOL_USERDEFINED) - aWidthMapEntry.SetWidth(m_NewEntryWidth ); - else - aWidthMapEntry.SetType((Aspect_WidthOfLine)m_NewEntryType.GetCurSel()); - - myWidthMap->AddEntry(aWidthMapEntry); // in fact just update - SetModified(true); - UpdateDisplay(m_TabCtrl.GetCurSel()+1); - UpdateData(false); -} - -BOOL CWidthPropertyPage::OnApply() -{ - //AfxGetMainWnd()->SendMessage(WM_USERAPPLY_InMapProperties); - myViewer->SetWidthMap(myWidthMap); - myViewer->Update(); - return CPropertyPage::OnApply(); -} diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/WidthPropertyPage.h b/samples/mfc/standard/03_Viewer2d/src/Properties/WidthPropertyPage.h deleted file mode 100755 index 4892533a66..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/WidthPropertyPage.h +++ /dev/null @@ -1,73 +0,0 @@ -#if !defined(AFX_WIDTHPROPERTY_H__0F6C04B3_D5DB_11D1_8DDF_0800369C8A03__INCLUDED_) -#define AFX_WIDTHPROPERTY_H__0F6C04B3_D5DB_11D1_8DDF_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// WidthProperty.h : header file -// -#include "Aspect_WidthMap.hxx" -///////////////////////////////////////////////////////////////////////////// -// CWidthPropertyPage dialog - -class CWidthPropertyPage : public CPropertyPage -{ - DECLARE_DYNCREATE(CWidthPropertyPage) - -private : - Handle(Aspect_WidthMap) myWidthMap; -private : - Handle(V2d_Viewer) myViewer; -public: - void SetViewer(Handle(V2d_Viewer) aViewer) { - myViewer = aViewer; - myWidthMap = aViewer->WidthMap(); - }; - -// Construction -public: - CWidthPropertyPage(); - ~CWidthPropertyPage(); - -// Dialog Data - //{{AFX_DATA(CWidthPropertyPage) - enum { IDD = IDD_DIALOG_Width }; - CString m_WidthMapSize; - CTabCtrl m_TabCtrl; - CString m_EntryType; - CString m_EntryWidth; - CComboBox m_NewEntryType; - CEdit m_NewEntryWidthControl; - double m_NewEntryWidth; - //}}AFX_DATA - - -// Overrides - // ClassWizard generate virtual function overrides - //{{AFX_VIRTUAL(CWidthPropertyPage) - public: - virtual BOOL OnApply(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - // Generated message map functions - //{{AFX_MSG(CWidthPropertyPage) - afx_msg void OnSelchangeDialogWidthTAB(NMHDR* pNMHDR, LRESULT* pResult); - virtual BOOL OnInitDialog(); - afx_msg void OnWidthMapBUTTONAddNewEntry(); - afx_msg void OnSelchangeWidthMapCOMBONewEntryType(); - afx_msg void OnWidthMapBUTTONUpdateCurrentEntry(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - void UpdateDisplay(int CurrentSelectionIndex); -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_WIDTHPROPERTY_H__0F6C04B3_D5DB_11D1_8DDF_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/03_Viewer2d/src/Properties/colornewcolorrampcolormapDialog.h b/samples/mfc/standard/03_Viewer2d/src/Properties/colornewcolorrampcolormapDialog.h deleted file mode 100755 index ae228951df..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Properties/colornewcolorrampcolormapDialog.h +++ /dev/null @@ -1,61 +0,0 @@ -#if !defined(AFX_ColorNewColorRampColorMapDialog_H__A45F6973_DB41_11D1_8DE5_0800369C8A03__INCLUDED_) -#define AFX_ColorNewColorRampColorMapDialog_H__A45F6973_DB41_11D1_8DE5_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// ColorNewColorRampColorMapDialog.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CColorNewColorRampColorMapDialog dialog - -class CColorNewColorRampColorMapDialog : public CDialog -{ -private : - Handle(Aspect_ColorMap) myColorMap; - -// Construction -public: - CColorNewColorRampColorMapDialog(CWnd* pParent = NULL); // standard constructor - Handle(Aspect_ColorMap) ColorMap() {return myColorMap;}; - -// Dialog Data - //{{AFX_DATA(CColorNewColorRampColorMapDialog) - enum { IDD = IDD_DIALOG_NewColorRamp }; - CComboBox m_ColorList; - int m_base_pixel; - int m_dimension; - double m_Red; - double m_Green; - double m_Blue; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CColorNewColorRampColorMapDialog) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CColorNewColorRampColorMapDialog) - virtual void OnOK(); - afx_msg void OnColorMapRampBUTTONEditColor(); - virtual BOOL OnInitDialog(); - afx_msg void OnChangeColorMapRampEDITColorRed(); - afx_msg void OnChangeColorMapRampEDITColorGreen(); - afx_msg void OnChangeColorMapRampEDITColorBlue(); - afx_msg void OnSelchangeColorMapCOMBONewEntryColorName(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_ColorNewColorRampColorMapDialog_H__A45F6973_DB41_11D1_8DE5_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/03_Viewer2d/src/StdAfx.h b/samples/mfc/standard/03_Viewer2d/src/StdAfx.h index 7f3211b2b2..1d31d7455f 100755 --- a/samples/mfc/standard/03_Viewer2d/src/StdAfx.h +++ b/samples/mfc/standard/03_Viewer2d/src/StdAfx.h @@ -72,170 +72,110 @@ # pragma comment (lib,"TKernel.lib") */ -#include <Standard_ErrorHandler.hxx> +#include <AIS_Drawer.hxx> +#include <AIS_Circle.hxx> +#include <AIS_Line.hxx> +#include <AIS_InteractiveContext.hxx> +#include <AIS_InteractiveObject.hxx> +#include <AIS_LocalContext.hxx> +#include <AIS_TexturedShape.hxx> -#include <WNT_Window.hxx> - - -#include <V2d_Viewer.hxx> - -#include <V2d_View.hxx> - -#include <WNT_GraphicDevice.hxx> -#include <Aspect_WindowDriver.hxx> - -#include "gp_Pnt2d.hxx" -#include "Geom2d_Curve.hxx" -#include "GCE2d_MakeSegment.hxx" -#include "gp_Pnt2d.hxx" - -#include <Graphic2d_SetOfCurves.hxx> -#include <Geom2dAdaptor_Curve.hxx> -#include <Bnd_Box2d.hxx> -#include <BndLib_Add2dCurve.hxx> -#include <Precision.hxx> -#include <Select2D_SensitiveBox.hxx> -#include <Select2D_SensitiveSegment.hxx> -#include <gp_Circ2d.hxx> -#include <gp_Dir2d.hxx> -#include <gp_Ax2d.hxx> - -#include <Select2D_SensitiveArc.hxx> -#include <Geom2d_Curve.hxx> -#include <GeomTools_Curve2dSet.hxx> -#include <Geom2d_TrimmedCurve.hxx> -#include <gp_Pnt2d.hxx> -#include <GCE2d_MakeSegment.hxx> -#include <gp_Vec2d.hxx> -#include <OSD_Environment.hxx> -#include <Graphic2d_Array1OfVertex.hxx> -#include <Graphic2d_PolyLine.hxx> - -#include "SelectMgr_Selection.hxx" - - -#include <Quantity_Length.hxx> +#include <Aspect_MarkMapEntry.hxx> +#include <Aspect_ColorMapEntry.hxx> +#include <Aspect_ColorScale.hxx> +#include <Aspect_GenericColorMap.hxx> +#include <Aspect_ColorMap.hxx> +#include <Aspect_FontMap.hxx> +#include <Aspect_MarkMap.hxx> +#include <Aspect_TypeMap.hxx> +#include <Aspect_WidthMap.hxx> #include <Aspect_TypeOfline.hxx> #include <Aspect_WidthOfline.hxx> -#include <Standard_Integer.hxx> -#include <SelectMgr_SelectableObject.hxx> -#include <Handle_PrsMgr_PresentationManager2d.hxx> -#include <Handle_Graphic2d_GraphicObject.hxx> -#include <Handle_SelectMgr_Selection.hxx> -#include <Standard_OStream.hxx> -#include <Standard_IStream.hxx> -#include <Standard_CString.hxx> - -#include "Geom2d_Curve.hxx" - - #include <Aspect_Window.hxx> #include <Aspect_Background.hxx> -#include <SelectMgr_EntityOwner.hxx> -#include <SelectMgr_SelectionManager.hxx> -#include <V2d_Viewer.hxx> -#include <V2d_View.hxx> - -#include <PrsMgr_PresentationManager2d.hxx> -#include <StdSelect_ViewerSelector2d.hxx> - -#include "SelectMgr_SelectableObject.hxx" - -#include <Handle_V2d_Viewer.hxx> -#include <Handle_PrsMgr_PresentationManager2d.hxx> -#include <Handle_SelectMgr_SelectionManager.hxx> -#include <Handle_StdSelect_ViewerSelector2d.hxx> -#include <MMgt_TShared.hxx> -#include <Handle_SelectMgr_SelectableObject.hxx> -#include <Standard_Boolean.hxx> -#include <Handle_V2d_View.hxx> -#include <Graphic2d_Buffer.hxx> - -class V2d_Viewer; -class PrsMgr_PresentationManager2d; -class SelectMgr_SelectionManager; -#include <StdSelect_ViewerSelector2d.hxx> -class SelectMgr_SelectableObject; -class V2d_View; -#include <SelectMgr_SelectableObject.hxx> - -class ISession2D_InteractiveObject; -#include <SelectMgr_EntityOwner.hxx> +#include <Aspect_TypeOfText.hxx> +#include <BRepPrimAPI_MakeBox.hxx> +#include <BRep_Builder.hxx> +#include <BRepBuilderAPI_MakeEdge.hxx> +#include <BRepBuilderAPI_MakeWire.hxx> +#include <BRepBuilderAPI_MakeFace.hxx> +#include <BRepTools.hxx> #include <Bnd_Box2d.hxx> -#include <gp_Lin2d.hxx> -#include <gp_Dir2d.hxx> -#include <gp_Vec2d.hxx> -#include <TColgp_Array1OfPnt2d.hxx> -#include <SelectBasics_BasicTool.hxx> +#include <BndLib_Add2dCurve.hxx> + +#include <GCE2d_MakeSegment.hxx> #include <GCPnts_TangentialDeflection.hxx> -#include <Geom2dAdaptor_Curve.hxx> - -#include <Standard_Integer.hxx> -#include <gp_Pnt2d.hxx> -#include <Select2D_SensitiveEntity.hxx> -#include <Handle_SelectBasics_EntityOwner.hxx> -#include <Standard_Boolean.hxx> -#include <Standard_Real.hxx> -class SelectBasics_EntityOwner; -class gp_Pnt2d; -#include <SelectBasics_ListOfBox2d.hxx> -#include "TColgp_HArray1OfPnt2d.hxx" #include <Geom2d_Curve.hxx> - -#include <Graphic2d_Text.hxx> -#include <Select2D_SensitiveBox.hxx> -#include <Graphic2d_Segment.hxx> +#include <Geom_CartesianPoint.hxx> +#include <Geom_Circle.hxx> +#include <Geom_Curve.hxx> +#include <Geom_Line.hxx> +#include <Geom2d_Curve.hxx> +#include <Geom2d_TrimmedCurve.hxx> +#include <Geom2dAdaptor_Curve.hxx> +#include <GeomTools_Curve2dSet.hxx> +#include <Graphic3d_AspectText3d.hxx> +#include <Graphic3d_Group.hxx> +#include <Graphic3d_AspectMarker3d.hxx> +#include <Graphic3d_StructureManager.hxx> +#include <Graphic3d_Texture1Dsegment.hxx> +#include <gp_Ax2d.hxx> +#include <gp_Circ.hxx> +#include <gp_Circ2d.hxx> +#include <gp_Dir2d.hxx> +#include <gp_Lin2d.hxx> +#include <gp_Pln.hxx> +#include <gp_Pnt2d.hxx> +#include <gp_Vec2d.hxx> +#include <HLRAlgo_Projector.hxx> +#include <MMgt_TShared.hxx> #include <OSD_Environment.hxx> -#include <Graphic2d_View.hxx> -#include <Graphic2d_Drawer.hxx> -#include "PrsMgr_PresentationManager2d.hxx" -#include "SelectMgr_Selection.hxx" -#include "Graphic2d_Array1OfVertex.hxx" -#include "Graphic2d_Polyline.hxx" -#include "Graphic2d_Vertex.hxx" -#include "Graphic2d_DisplayList.hxx" +#include <Precision.hxx> +#include <Prs3d_LineAspect.hxx> +#include <Prs3d_PlaneAspect.hxx> +#include <Prs3d_Presentation.hxx> +#include <Quantity_Factor.hxx> +#include <Quantity_Length.hxx> +#include <Quantity_PlaneAngle.hxx> +#include <SelectBasics_ListOfBox2d.hxx> +#include <SelectBasics_BasicTool.hxx> +#include <SelectMgr_EntityOwner.hxx> +#include <SelectMgr_Selection.hxx> +#include <SelectMgr_SelectableObject.hxx> +#include <SelectMgr_SelectionManager.hxx> +#include <Standard_ErrorHandler.hxx> +#include <Standard_Real.hxx> +#include <Standard_Integer.hxx> +#include <SelectMgr_Selection.hxx> #include <Standard_OStream.hxx> #include <Standard_IStream.hxx> #include <Standard_CString.hxx> -#include <SelectMgr_SelectableObject.hxx> - -#include <TCollection_AsciiString.hxx> -#include <Aspect_TypeOfText.hxx> +#include <Standard_Boolean.hxx> #include <Standard_Real.hxx> -#include <Standard_Integer.hxx> -#include <Quantity_Factor.hxx> -#include <Quantity_PlaneAngle.hxx> -#include <Handle_PrsMgr_PresentationManager2d.hxx> -#include <Handle_Graphic2d_GraphicObject.hxx> -#include <Handle_SelectMgr_Selection.hxx> - -class TCollection_AsciiString; -class Graphic2d_GraphicObject; -#include <SelectMgr_EntityOwner.hxx> -#include "Aspect_MarkMap.hxx" -#include "V2d_View.hxx" -#include "Aspect_ColorMap.hxx" -#include "Aspect_FontMap.hxx" -#include "Aspect_MarkMap.hxx" -#include "Aspect_TypeMap.hxx" -#include "Aspect_WidthMap.hxx" -#include "Aspect_MarkMap.hxx" -#include "StdSelect_TextProjector2d.hxx" -#include "StdSelect_SensitiveText2d.hxx" -#include "WNT_FontMapEntry.hxx" -#include "WNT_WDriver.hxx" -#include "HLRAlgo_Projector.hxx" - -#include "AIS2D_InteractiveContext.hxx" -#include "AIS2D_InteractiveObject.hxx" - -#include "Graphic2d_TypeOfPolygonFilling.hxx" -#include "Prs2d_AspectLine.hxx" - +#include <Standard_OStream.hxx> +#include <Standard_IStream.hxx> +#include <Standard_CString.hxx> +#include <TCollection_AsciiString.hxx> +#include <TColgp_Array1OfPnt2d.hxx> +#include <TColgp_HArray1OfPnt2d.hxx> +#include <TopoDS_Shape.hxx> +#include <TopoDS.hxx> +#include <Visual3d_ViewManager.hxx> +#include <V3d_View.hxx> +#include <V3d_Viewer.hxx> +#include <WNT_Window.hxx> #include <..\res\resource.h> +class ISession2D_InteractiveObject; + +class V3d_Viewer; +class SelectMgr_SelectableObject; +class TCollection_AsciiString; +class SelectBasics_EntityOwner; +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 index cf90a05840..249cdd0f61 100755 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.cpp +++ b/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.cpp @@ -19,12 +19,11 @@ static char THIS_FILE[] = __FILE__; ///////////////////////////////////////////////////////////////////////////// // CViewer2dApp construction -CViewer2dApp::CViewer2dApp() +CViewer2dApp::CViewer2dApp() : OCC_App() { - SampleName = "Viewer2d"; //for about dialog + SampleName = "Viewer2d"; //for about dialog } - ///////////////////////////////////////////////////////////////////////////// // The one and only CViewer2dApp object diff --git a/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.h b/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.h index e89d701d81..a8d6157de7 100755 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.h +++ b/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.h @@ -8,18 +8,20 @@ #pragma once #endif // _MSC_VER > 1000 -#include <OCC_2dApp.h> +#include <OCC_App.h> -class CViewer2dApp : public OCC_2dApp +class CViewer2dApp : public OCC_App { public: - CViewer2dApp(); + + CViewer2dApp(); + // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CViewer2dApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CViewer2dApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL }; diff --git a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp b/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp index d01019c324..d6edf5599c 100755 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp +++ b/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp @@ -2,33 +2,13 @@ // #include "stdafx.h" - #include "Viewer2dDoc.h" - -#include "OCC_BaseApp.h" - -#include <Aspect_ColorMap.hxx> -#include <Aspect_MarkMapEntry.hxx> -#include <Aspect_ColorMapEntry.hxx> -#include <Aspect_GenericColorMap.hxx> - -#include <TopoDS_Shape.hxx> -#include <TopoDS.hxx> - -#include <BRep_Builder.hxx> - -#include <BRepTools.hxx> - +#include "OCC_App.h" #include "Primitive\Sample2D_Markers.h" -#include "Primitive\Sample2D_Line.h" #include "Primitive\Sample2D_Text.h" #include "Primitive\Sample2D_Face.h" -#include "Primitive\Sample2D_Curve.h" -#include "Primitive\Sample2D_Rectangle.h" #include "Primitive\Sample2D_Image.h" -#include "PropertiesSheet.h" - ///////////////////////////////////////////////////////////////////////////// // CViewer2dDoc @@ -36,12 +16,11 @@ IMPLEMENT_DYNCREATE(CViewer2dDoc, CDocument) BEGIN_MESSAGE_MAP(CViewer2dDoc, CDocument) //{{AFX_MSG_MAP(CViewer2dDoc) - ON_COMMAND(ID_MENU_CASCADE_PROPERTIES, OnBUTTONTest2DProperties) 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, OnBUTTONTestFase) + 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 @@ -76,356 +55,188 @@ void CViewer2dDoc::Dump(CDumpContext& dc) const ///////////////////////////////////////////////////////////////////////////// // CViewer2dDoc commands -void CViewer2dDoc::OnBUTTONTest2DProperties() -{ -// TODO: Add your command handler code here - CPropertiesSheet aDial; - aDial.SetViewer(my2DViewer); - aDial.DoModal(); -} - -//================================================================= -//================================================================= -//================================================================= - void CViewer2dDoc::OnBUTTONErase() { - myAISInteractiveContext2D->EraseAll(); - // Update Get information to update Result dialog - - UINT anID=ID_BUTTON_Erase; - TCollection_AsciiString Message("\ -call : \n\ - myAISInteractiveContext2D->EraseAll();"); - - // Update The Result Dialog - UpdateResultDialog(anID,Message); + if(myAISContext->HasOpenedContext()) + myAISContext->CloseAllContexts(); + myAISContext->EraseAll(); } - - void CViewer2dDoc::OnBUTTONTestText() { - Standard_Integer color=1; + int aColor= 1; Standard_Real j; for (j=15;j<=20;j++) { - TCollection_AsciiString Text("font 0 scale ");Text+=j/20; + TCollection_AsciiString Text("font 0 scale ");Text+=j/20.0; Handle (Sample2D_Text) aText = new Sample2D_Text(Text, - 0,15*(j-15), // anX , anY - Aspect_TOT_SOLID,// aType - 20.0*M_PI/180 , // anAngle - 0.0 , // aSlant - color++, // aColorIndex - 0, // aFontIndex - j/20, // aScale - Standard_False, // aIsUnderline - Standard_False, // aIsZoomable - Graphic2d_TOA_LEFT); // aTypeOfAlignment - myAISInteractiveContext2D->Display(aText, // object - Standard_False); // Redraw - if (color == my2DViewer->ColorMap()->Size()) color =1; + gp_Pnt(0.0,15.0*(j-15.0),0.0), // thePosition + Aspect_TOT_SOLID, // theType + 10.0*M_PI, // theAngle + (Quantity_NameOfColor)(aColor++), // theColor + Font_FA_Regular, // theFontAspect + "Courier", // theFont + j, // theScale + Graphic3d_HTA_LEFT, + Graphic3d_VTA_BOTTOM, + Standard_False); // aIsZoomable + + myAISContext->Display(aText, Standard_False); } - for (int j=5;j<=10;j+=1) + for (j=10;j<=15;j++) { - TCollection_AsciiString Text("font 1 scale ");Text+=j/10; + TCollection_AsciiString Text("font 1 scale ");Text+=j/10.0; Handle (Sample2D_Text) aText = new Sample2D_Text(Text, - 80,15*(j-5), // anX , anY - Aspect_TOT_SOLID,// aType - 0.0 , // anAngle - 0.0 , // aSlant - color++, // aColorIndex - 1, // aFontIndex - j/10, // aScale - Standard_True, // aIsUnderline - Standard_True, // aIsZoomable - Graphic2d_TOA_CENTER); // aTypeOfAlignment + gp_Pnt(80.,15.0*(j-10.0),0.0), // thePosition + Aspect_TOT_SOLID, // theType + 0.0, // theAngle + (Quantity_NameOfColor)(aColor++), // theColor + Font_FA_BoldItalic, // theFontAspect + "Cambria", // theFont + j*2, // theScale + Graphic3d_HTA_LEFT, + Graphic3d_VTA_BOTTOM, + Standard_False); // aIsZoomable - myAISInteractiveContext2D->Display(aText, // object - Standard_False); // Redraw - if (color == my2DViewer->ColorMap()->Size()) color =1; + myAISContext->Display(aText, Standard_False); } - - for (j=5;j<=10;j+=1) + aColor = 1; + for (j=5;j<=10;j++) { - TCollection_AsciiString Text("font 2 scale ");Text+=j/10; + TCollection_AsciiString Text("font 2 scale ");Text+=j/10.0; Handle (Sample2D_Text) aText = new Sample2D_Text(Text, - 140,15*(j-5), // anX , anY - Aspect_TOT_SOLID,// aType - 0.0 , // anAngle - 0.0 , // aSlant - color++, // aColorIndex - 2, // aFontIndex - j/10, // aScale - Standard_False, // aIsUnderline - Standard_True, // aIsZoomable - Graphic2d_TOA_TOPLEFT); // aTypeOfAlignment - myAISInteractiveContext2D->Display(aText, // object - Standard_False); // Redraw - if (color == my2DViewer->ColorMap()->Size()) color =1; + gp_Pnt(140.0,15.0*(j-5.0),0.0), // thePosition + Aspect_TOT_SOLID, // theType + 0.0, // theAngle + (Quantity_NameOfColor)(aColor++), // theColor + Font_FA_Bold, // theFontAspect + "Arial", // theFont + j*2, // theScale + Graphic3d_HTA_LEFT, + Graphic3d_VTA_BOTTOM, + Standard_False); // aIsZoomable + myAISContext->Display(aText,Standard_False); } - - for (j=10;j<=15;j+=1) +for (j=10;j<=15;j++) { - TCollection_AsciiString Text("font 3 scale ");Text+=j/10; - Handle (Sample2D_Text) aText = + TCollection_AsciiString Text("font 3 scale ");Text+=j/10.0; + Handle (Sample2D_Text) aText = new Sample2D_Text(Text, - 260,15*(j-10), // anX , anY - Aspect_TOT_SOLID,// aType - 0 , // anAngle - 0.0 , // aSlant - color++, // aColorIndex - 3, // aFontIndex - j/10, // aScale - Standard_False, // aIsUnderline - Standard_False, // aIsZoomable - Graphic2d_TOA_LEFT); // aTypeOfAlignment - myAISInteractiveContext2D->Display(aText, // object - Standard_False); // Redraw - if (color == my2DViewer->ColorMap()->Size()) color =1; + gp_Pnt(200.0,15.0*(j-10.0),0.0), // thePosition + Aspect_TOT_SOLID, // theType + 0.0, // theAngle + (Quantity_NameOfColor)(aColor++),// theColor + Font_FA_Italic, // theFontAspect + "Georgia", // theFont + j*2, // theScale + Graphic3d_HTA_LEFT, + Graphic3d_VTA_BOTTOM, + Standard_False); // aIsZoomable + myAISContext->Display(aText,Standard_False); } FitAll2DViews(Standard_True); // Update Viewer - // Update Get information to update Result dialog - UINT anID=ID_BUTTON_Test_Text; - TCollection_AsciiString Message(" \ -create a set of Sample2D_Text,display it and declare selectable : \n\ ------------------------------------------------------------------------------- \n\ - Handle (Sample2D_Text) aText; \n\ - // aText = new ... \n\ - myAISInteractiveContext2D->Display(aText, // object \n\ - Standard_False); // Redraw \n\ ------------------------------------------------------------------------------- \n\ - after that the system call the SetContext Method for the display,\n\ ------------------------------------------------------------------------------- \n\ - \n\ -void Sample2D_Text::SetContext(const Handle(AIS2D_InteractiveContext)& theContext) \n\ -{ \n\ - AIS2D_InteractiveObject::SetContext(theContext); \n\ -\n\ - Handle(Graphic2d_Text) text; \n\ - text = new Graphic2d_Text(this, myText, myX, myY, myAngle,myTypeOfText,myScale); \n\ - text->SetFontIndex (myFontIndex); \n\ - text->SetColorIndex (myColorIndex); \n\ - text->SetSlant (mySlant); \n\ - text->SetUnderline (myIsUnderline); \n\ - text->SetZoomable (myIsZoomable); \n\ - text->SetAlignment (myTypeOfAlignment); \n\ -}"); - - // Update The Result Dialog - UpdateResultDialog(anID,Message); } void CViewer2dDoc::OnBUTTONTestMarkers() { - { // generic Markers - Standard_Integer MaxIndex = my2DViewer->MarkMap()->Size(); - - for (int i=1;i<=MaxIndex;i++) - { - Standard_Integer EntryNumber = (my2DViewer->MarkMap()->Entry(i)).Index () ; + // 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_BALL,(Quantity_NameOfColor)(aColor++)); + myAISContext->Display(aMarker, Standard_False); + } + for (int i=1;i<=2;i++) + { - Handle (Sample2D_Markers) Marker = - new Sample2D_Markers(EntryNumber, // generic marker index - 10*i,0,// display point - 5,5, // size - 0); // angle in radian - myAISInteractiveContext2D->Display(Marker, // object - Standard_False); // Redraw - - } - for (int i=1;i<=MaxIndex;i++) - { - Standard_Integer EntryNumber = (my2DViewer->MarkMap()->Entry(i)).Index () ; - Handle (Sample2D_Markers) Marker = - new Sample2D_Markers(EntryNumber, // generic marker index - 10*i,10,// display point - 5,5, // size - 20*M_PI/180); // angle in radian - myAISInteractiveContext2D->Display(Marker, // object - Standard_False); // Redraw - } - } - - - { // a Circle Marker - Handle (Sample2D_Markers) Marker = - new Sample2D_Markers(10,20,// reference point - 0,0, // display point - 2); // radius - myAISInteractiveContext2D->Display(Marker, // object - Standard_False); // Redraw - - } - - { // an ellips Marker - Handle (Sample2D_Markers) Marker = - new Sample2D_Markers(20,20, // reference point - 0,0, // display point - 3,2, // major, minor radius - 20*M_PI/180); // angle - myAISInteractiveContext2D->Display(Marker, // object - Standard_False); // Redraw - } - - { // a polyline Marker - - Graphic2d_Array1OfVertex myListVertex(1,6); - myListVertex(1)=Graphic2d_Vertex(0.,0.); - myListVertex(2)=Graphic2d_Vertex(0.,5.); - myListVertex(3)=Graphic2d_Vertex(10.,0.); - myListVertex(4)=Graphic2d_Vertex(10.,5.); - myListVertex(5)=Graphic2d_Vertex(20.,0.); - myListVertex(6)=Graphic2d_Vertex(20.,5.); - - Handle (Sample2D_Markers) Marker = - new Sample2D_Markers(30,20, // reference point - myListVertex); - myAISInteractiveContext2D->Display(Marker, // object - Standard_True); // Redraw - - } + 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 - // Update Get information to update Result dialog - - UINT anID=ID_BUTTON_Test_Markers; - TCollection_AsciiString Message(" \ -create a set of Sample2D_Markers and display it :\n\ ----------------------------------------------------\n\ - {\n\ - Standard_Integer MaxIndex = my2DViewer->MarkMap()->Size();\n\ - for (int i=1;i<=MaxIndex;i++) {\n\ - Standard_Integer EntryNumber = (my2DViewer->MarkMap()->Entry(10)).Index () ;\n\ - Handle (Sample2D_Markers) Marker = \n\ - new Sample2D_Markers(EntryNumber, // generic marker index\n\ - 10*i,0,// display point\n\ - 5,5, // size\n\ - 0); // angle in radian\n\ - myAISInteractiveContext2D->Display(Marker, // object\n\ - Standard_False); // Redraw\n\ -\n\ - }\n\ - //...\n\ -\n\ - after that the system call the SetContext Methods : \n\ -\n\ -void Sample2D_Markers::SetContext(const Handle(AIS2D_InteractiveContext)& theContext) \n\ -{ \n\ - AIS2D_InteractiveObject::SetContext(theContext); \n\ - if (myCurrentTypeOfMarker == 2D_CTOM_Generic) \n\ - if ( myIndex == 0 ) {\n\ - Handle(Graphic2d_Marker) aMarker= \n\ - new Graphic2d_Marker(this, \n\ - myXPosition ,myYPosition); \n\ - }\n\ - else {\n\ - Handle(Graphic2d_Marker) aMarker= \n\ - new Graphic2d_Marker(this,myIndex, \n\ - myXPosition ,myYPosition, \n\ - myWidth,myHeight,myAngle); \n\ - }\n\ - \n\ - if (myCurrentTypeOfMarker == 2D_CTOM_Polyline) \n\ - Handle(Graphic2d_PolylineMarker) aMarker= \n\ - new Graphic2d_PolylineMarker(this, \n\ - myXPosition,myYPosition, \n\ - myListVertex); \n\ - \n\ - if (myCurrentTypeOfMarker == 2D_CTOM_Circle) \n\ - Handle(Graphic2d_CircleMarker) aMarker= \n\ - new Graphic2d_CircleMarker(this, \n\ - myXPosition,myYPosition, \n\ - myX ,myY,myRadius ); \n\ - \n\ - if (myCurrentTypeOfMarker == 2D_CTOM_Ellips) \n\ - Handle(Graphic2d_EllipsMarker) aMarker= \n\ - new Graphic2d_EllipsMarker(this, \n\ - myXPosition,myYPosition, \n\ - myX,myY, \n\ - myMajorRadius,myMinorRadius, \n\ - myAngle ); \n\ - \n\ -} \n\n"); - // Update The Result Dialog - UpdateResultDialog(anID,Message); } - - void CViewer2dDoc::OnBUTTONTestLine() { - //Handle(ISessionSample2D_Line) aLine = new ISessionSample2D_Line(); - Handle(Sample2D_Line) aLine = new Sample2D_Line(); + 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(AIS_Drawer) aDrawer = new AIS_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); + 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); -// myInteractiveContext2D->Display(aLine, // object -// Standard_True); // Redraw - - myAISInteractiveContext2D->Display(aLine, // object - Standard_True); // Redraw - - FitAll2DViews(Standard_False); // Update Viewer - // Update Get information to update Result dialog - - UINT anID=ID_BUTTON_Test_Line; - TCollection_AsciiString Message(" \ -create a Sample2D_Line and display it : \n\ ------------------------------------------------------------------------------- \n\ - Handle(Sample2D_Line) aLine = new Sample2D_Line();\n\ - myAISInteractiveContext2D->Display(aLine, // object\n\ - Standard_True); // Redraw\n\ - FitAll2DViews(Standard_False); // Update Viewer\n\ ------------------------------------------------------------------------------- \n\ - after that the system call the SetContext Methods : \n\ ------------------------------------------------------------------------------- \n\ -void Sample2D_Line::SetContext(const Handle(AIS2D_InteractiveContext)& theContext) \n\ -{\n\ - AIS2D_InteractiveObject::SetContext(theContext); \n\ -\n\ - Handle(Prs2d_AspectLine) aLineAspect = new Prs2d_AspectLine; \n\ - aLineAspect->SetTypeOfFill(Graphic2d_TOPF_FILLED); \n\ - aLineAspect->SetWidthIndex(0); \n\ -\n\ - for (int i=0;i<=13;i++)\n\ - for (int j=0;j<=5;j++)\n\ - {\n\ - {\n\ - Graphic2d_Array1OfVertex anArrayVertex(1,5);\n\ - anArrayVertex(1)=Graphic2d_Vertex(20.*i,10.*j+0);\n\ - anArrayVertex(2)=Graphic2d_Vertex(20.*i+10,10.*j+0);\n\ - anArrayVertex(3)=Graphic2d_Vertex(20.*i+10,10.*j+5);\n\ - anArrayVertex(4)=Graphic2d_Vertex(20.*i,10.*j+5);\n\ - anArrayVertex(5)=Graphic2d_Vertex(20.*i,10.*j+0);\n\ - Handle(Graphic2d_Polyline) aPolyline = \n\ - new Graphic2d_Polyline(this,anArrayVertex);\n\ -\n\ - SetAspect(aLineAspect, aPolyline); \n\ -\n\ - aPolyline->SetInteriorColorIndex(i); // to use with Graphic2d_TOPF_FILLED \n\ - aPolyline->SetTypeIndex(j); // type of the polyline \n\ - }\n\ - }\n}"); - - // Update The Result Dialog - UpdateResultDialog(anID,Message); + } + this->FitAll2DViews(Standard_True); } -void CViewer2dDoc::OnBUTTONTestFase() -{ - myAISInteractiveContext2D->EraseAll(); - CFileDialog dlg(TRUE, - NULL, - NULL, - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - "BRep Files (*.brep)|*.brep; ||", - NULL ); - CString initdir(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir()); +#include <AIS_Trihedron.hxx> +#include <Geom_Axis2Placement.hxx> + +void CViewer2dDoc::OnBUTTONTestFace() +{ + //erase all + if(myAISContext->HasOpenedContext()) + myAISContext->CloseAllContexts(); + myAISContext->EraseAll(); + + CFileDialog dlg(TRUE, + NULL, + NULL, + OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, + "BRep Files (*.brep)|*.brep; ||", + NULL ); + + CString initdir(((OCC_App*) AfxGetApp())->GetInitDataDir()); initdir += "\\Data"; dlg.m_ofn.lpstrInitialDir = initdir; @@ -436,375 +247,71 @@ void CViewer2dDoc::OnBUTTONTestFase() CString filename = dlg.GetPathName(); Standard_CString aFileName = (Standard_CString)(LPCTSTR)filename; - TopoDS_Shape aFace; - BRep_Builder aBuilder; - Standard_Boolean result = BRepTools::Read(aFace,aFileName,aBuilder); + TopoDS_Shape aFaceShape; + BRep_Builder aBuilder; + Standard_Boolean result = BRepTools::Read(aFaceShape,aFileName,aBuilder); - if(aFace.IsNull() || aFace.ShapeType() != TopAbs_FACE) { - AfxMessageBox("The shape must be not a null Face"); - return; - } + if(aFaceShape.IsNull() || aFaceShape.ShapeType() != TopAbs_FACE) + { + AfxMessageBox("The shape must be not a null Face"); + return; + } -// Handle(ISessionSample2D_Face) aDisplayableFace = new ISessionSample2D_Face( TopoDS::Face(aFace) ); - Handle(Sample2D_Face) aDisplayableFace = new Sample2D_Face( TopoDS::Face(aFace) ); + 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->OpenLocalContext(); + myAISContext->Activate(anAISFace,2); - myAISInteractiveContext2D->Display(aDisplayableFace, // object - Standard_True); // Redraw + FitAll2DViews(Standard_False); - Handle(Aspect_ColorMap) aColorMap = my2DViewer->ColorMap(); - Aspect_ColorMapEntry aFORWARDColorMapEntry = aColorMap->FindEntry(aDisplayableFace->FORWARDColorIndex()); - Aspect_ColorMapEntry aREVERSEDColorMapEntry = aColorMap->FindEntry(aDisplayableFace->REVERSEDColorIndex()); - Aspect_ColorMapEntry aINTERNALColorMapEntry = aColorMap->FindEntry(aDisplayableFace->INTERNALColorIndex()); - Aspect_ColorMapEntry aEXTERNALColorMapEntry = aColorMap->FindEntry(aDisplayableFace->EXTERNALColorIndex()); - - Quantity_Color TheFORWARDColor = aFORWARDColorMapEntry.Color(); - Quantity_Color TheREVERSEDColor = aREVERSEDColorMapEntry.Color(); - Quantity_Color TheINTERNALColor = aINTERNALColorMapEntry.Color(); - Quantity_Color TheEXTERNALColor = aEXTERNALColorMapEntry.Color(); - - Standard_CString FORWARDStringName (Quantity_Color::StringName(TheFORWARDColor.Name())); - Standard_CString REVERSEDStringName(Quantity_Color::StringName(TheREVERSEDColor.Name())); - Standard_CString INTERNALStringName(Quantity_Color::StringName(TheINTERNALColor.Name())); - Standard_CString EXTERNALStringName(Quantity_Color::StringName(TheEXTERNALColor.Name())); - FitAll2DViews(Standard_False); // Update Viewer - // Update Get information to update Result dialog - - UINT anID=ID_BUTTON_Test_Face; - TCollection_AsciiString Message("Forward is \t"); - Message += FORWARDStringName; - Message += "\nReversed is \t"; - Message += REVERSEDStringName; - Message += "\nInternal is \t"; - Message += INTERNALStringName; - Message += "\nExternal is \t"; - Message += EXTERNALStringName; - Message += "\n"; - Message += "\ ------------------------------------------------------------------------------- \n\ -create an Sample2D_Face and display it \n\ ------------------------------------------------------------------------------- \n\ -//...\n\ - TopoDS_Face aFace;\n\ - BRep_Builder aBuilder;\n\ - Standard_Boolean result = BRepTools::Read(aFace,aFileName,aBuilder);\n\ -\n\ - Handle(ISessionSample2D_Face) aDisplayableFace = new ISessionSample2D_Face( aFace );\n\ - myInteractiveContext2D->Display(aDisplayableFace, // object\n\ - Standard_True); // Redraw\n\ -//...\n\ ------------------------------------------------------------------------------- \n\ -void _Face::SetContext() \n\ -{\n\ - Handle(Prs2d_AspectLine) aLineAspect_FORWARD = new Prs2d_AspectLine; \n\ - aLineAspect_FORWARD->SetTypeOfFill(Graphic2d_TOPF_EMPTY);\n\ - aLineAspect_FORWARD->SetTypeIndex(myTypeIndex); \n\ - aLineAspect_FORWARD->SetWidthIndex(myWidthIndex);\n\ - aLineAspect_FORWARD->SetColorIndex(myFORWARDColorIndex);\n\ -\n\ - Handle(Prs2d_AspectLine) aLineAspect_REVERSED = new Prs2d_AspectLine; \n\ - aLineAspect_REVERSED->SetTypeOfFill(Graphic2d_TOPF_EMPTY);\n\ - aLineAspect_REVERSED->SetTypeIndex(myTypeIndex);\n\ - aLineAspect_REVERSED->SetWidthIndex(myWidthIndex);\n\ - aLineAspect_REVERSED->SetColorIndex(myREVERSEDColorIndex);\n\ -\n\ - Handle(Prs2d_AspectLine) aLineAspect_INTERNAL = new Prs2d_AspectLine; \n\ - aLineAspect_INTERNAL->SetTypeOfFill(Graphic2d_TOPF_EMPTY);\n\ - aLineAspect_INTERNAL->SetTypeIndex(myTypeIndex);\n\ - aLineAspect_INTERNAL->SetWidthIndex(myWidthIndex);\n\ - aLineAspect_INTERNAL->SetColorIndex(myINTERNALColorIndex);\n\ -\n\ - Handle(Prs2d_AspectLine) aLineAspect_EXTERNAL = new Prs2d_AspectLine; \n\ - aLineAspect_EXTERNAL->SetTypeOfFill(Graphic2d_TOPF_EMPTY);\n\ - aLineAspect_EXTERNAL->SetTypeIndex(myTypeIndex);\n\ - aLineAspect_EXTERNAL->SetWidthIndex(myWidthIndex);\n\ - aLineAspect_EXTERNAL->SetColorIndex(myEXTERNALColorIndex);"; - -Message +="\ -\n\ -//pcurves of the face \n\ -\n\ - Handle(Graphic2d_SetOfCurves) segment_FORWARD;\n\ - segment_FORWARD = new Graphic2d_SetOfCurves(this); \n\ -\n\ - Handle(Graphic2d_SetOfCurves) segment_REVERSED;\n\ - segment_REVERSED = new Graphic2d_SetOfCurves(this); \n\ -\n\ - Handle(Graphic2d_SetOfCurves) segment_INTERNAL;\n\ - segment_INTERNAL = new Graphic2d_SetOfCurves(this); \n\ -\n\ - Handle(Graphic2d_SetOfCurves) segment_EXTERNAL;\n\ - segment_EXTERNAL = new Graphic2d_SetOfCurves(this); \n\ -\n\ - Standard_Real f,l;\n\ - Standard_Integer i = 1;\n\ - myFace.Orientation(TopAbs_FORWARD);\n\ - TopExp_Explorer ex(myFace,TopAbs_EDGE);\n\ - while (ex.More()) {\n\ - const Handle(Geom2d_Curve) Curve = BRep_Tool::CurveOnSurface\n\ - (TopoDS::Edge(ex.Current()),TopoDS::Face(myFace),f,l);\n\ -\n\ - Handle(Geom2d_TrimmedCurve) c = new Geom2d_TrimmedCurve(Curve,f,l);\n\ -"; -Message += "\ - if (c.IsNull())\n\ - {\n\ - // null curve --> EDGE have a null lenght\n\ - // --> get first and last Vertices\n\ - TopoDS_Edge CurrentEdge= TopoDS::Edge(ex.Current());\n\ -\n\ - TopoDS_Vertex FirstVertex = TopExp::FirstVertex(CurrentEdge);\n\ - TopoDS_Vertex LastVertex = TopExp::LastVertex(CurrentEdge);\n\ -\n\ - if (FirstVertex != LastVertex)\n\ - Standard_Failure::Raise(\"Null Edge pcurve But different vertices\");\n\ -\n\ - gp_Pnt aPnt = BRep_Tool::Pnt(FirstVertex);\n\ -\n\ - Handle(Graphic2d_Marker) aMarker= \n\ - new Graphic2d_Marker(this,myMarkerIndex,\n\ - aPnt.X() ,aPnt.Y(),\n\ - myMarkerWidth,myMarkerHeight,0);\n\ -\n\ -"; -Message += "\ - switch (ex.Current().Orientation())\n\ - {\n\ - case TopAbs_FORWARD: aMarker->SetColorIndex (myFORWARDColorIndex); break;\n\ - case TopAbs_REVERSED: aMarker->SetColorIndex (myREVERSEDColorIndex); break;\n\ - case TopAbs_INTERNAL: aMarker->SetColorIndex (myINTERNALColorIndex); break;\n\ - case TopAbs_EXTERNAL: aMarker->SetColorIndex (myEXTERNALColorIndex); break;\n\ - default : break;\n\ - }\n\ - ex.Next();\n\ - }\n\ - else\n\ - {\n\ - // Display the Curve\n\ - // display the orientation\n\ -\n\ - gp_Pnt2d p1,p2;\n\ - gp_Vec2d v;\n\ - c->D1(l,p1,v);\n\ - Graphic2d_Array1OfVertex aListVertex(1,3);\n\ - if (v.Magnitude() > gp::Resolution()) {\n\ - Standard_Real L = 2;\n\ - Standard_Real H = 1;\n\ - gp_Dir2d d(v);\n\ - p2.SetCoord(- L*d.X() - H*d.Y(),- L*d.Y() + H*d.X());\n\ - aListVertex(1)=Graphic2d_Vertex(p2.X(),p2.Y());\n\ - \n\ - p2.SetCoord(- L*d.X() + H*d.Y(),- L*d.Y() - H*d.X());\n\ - aListVertex(2)=Graphic2d_Vertex(0.,0.);\n\ - aListVertex(3)=Graphic2d_Vertex(p2.X(),p2.Y()); \n\ - }\n\ -"; -Message += "\ -\n\ - Handle(Graphic2d_PolylineMarker) aMarker= \n\ - new Graphic2d_PolylineMarker(this,p1.X(),p1.Y(),aListVertex);\n\ -\n\ - switch (ex.Current().Orientation()) \n\ - {\n\ - case TopAbs_FORWARD: {\n\ - segment_FORWARD->Add(c); \n\ - SetAspect(aLineAspect_FORWARD, aMarker); \n\ - break;\n\ - }\n\ - case TopAbs_REVERSED: {\n\ - segment_REVERSED->Add(c); \n\ - SetAspect(aLineAspect_REVERSED, aMarker); \n\ - break; \n\ - } \n\ - case TopAbs_INTERNAL: { \n\ - segment_INTERNAL->Add(c); \n\ - SetAspect(aLineAspect_INTERNAL, aMarker); \n\ - break; \n\ - } \n\ - case TopAbs_EXTERNAL: { \n\ - segment_EXTERNAL->Add(c); \n\ - SetAspect(aLineAspect_EXTERNAL, aMarker); \n\ - break; \n\ - } \n\ - default : break; \n\ - } \n\ - }\n\ - ex.Next();\n\ - }\n\ -\n\ - SetAspect(aLineAspect_FORWARD, segment_FORWARD);\n\ - SetAspect(aLineAspect_REVERSED, segment_REVERSED);\n\ - SetAspect(aLineAspect_INTERNAL, segment_INTERNAL);\n\ - SetAspect(aLineAspect_EXTERNAL, segment_EXTERNAL);\n\ -\n\ -}\n\ -"; - - // Update The Result Dialog - UpdateResultDialog(anID,Message); } - } + + void CViewer2dDoc::OnBUTTONTestRect() { - Handle (Sample2D_Rectangle) aRectangle = new Sample2D_Rectangle( - 0,0, // display point - 50,80, // size - 20*M_PI/180); // angle in radian - - aRectangle->SetHighlightMode(AIS2D_TOD_OBJECT); - myAISInteractiveContext2D->Display(aRectangle, Standard_False); // Display rectangle + //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); + myAISContext->SetColor(aRect1,Quantity_NOC_YELLOW); + //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); + myAISContext->SetColor(aRect2,Quantity_NOC_YELLOW); + myAISContext->SetSelectionMode(aRect2,2); - - Handle (Sample2D_Rectangle) aRectangle2 = new Sample2D_Rectangle( - 80,0, // display point - 50,90, // size - 20*M_PI/180); // angle in radian - - aRectangle2->SetHighlightMode(AIS2D_TOD_ELEMENT); - myAISInteractiveContext2D->Display(aRectangle2); // Display rectangle - - - FitAll2DViews(Standard_False); // Update Viewer - - // Update Get information to update Result dialog - - UINT anID=ID_BUTTON_Test_Rect; - TCollection_AsciiString Message(" \ -create a two of Sample2D_Rectangle and display it : \n\ ------------------------------------------------------------------------------- \n\ - { \n\ - Handle (Sample2D_Rectangle) aRectangle = \n\ - new Sample2D_Rectangle(0,0, // display point \n\ - 50,80, // size \n\ - 20*PI180); // angle in radian \n\ -\n\ - aRectangle->SetHighlightMode(AIS2D_TOD_OBJECT); \n\ - myASIInteractiveContext2D->Display(aRectangle, Standard_False); // Display rectangle \n\ - } \n\ - { \n\ - Handle (Sample2D_Rectangle) aRectangle = \n\ - new Sample2D_Rectangle(80,0, // display point \n\ - 50,90, // size \n\ - 20*PI180); // angle in radian \n\ -\n\ - aRectangle2->SetHighlightMode(AIS2D_TOD_ELEMENT); //Set selection sub elements \n\ - myAISInteractiveContext2D->Display(aRectangle); // Dispaly rectangle \n\ - }\n\ - FitAll2DViews(Standard_False); // Update Viewer\n\ -\n\ ----------------------------------------------------------------- \n\ - after that the system call the SetContext Methods : \n\ ----------------------------------------------------------------- \n\ -void Sample2D_Rectangle::SetContext(const Handle(AIS2D_InteractiveContext)& theContext) \n\ -{\n\ -\n\ - AIS2D_InteractiveObject::SetContext(theContext); \n\ -\n\ - // add the polyline in the representation, for all modes\n\ - Handle(Graphic2d_Polyline) ThePolyline;\n\ - ThePolyline = new Graphic2d_Polyline(this,myArray1OfVertex );\n\ - ThePolyline->SetColorIndex ( 1 );\n\ - ThePolyline->SetWidthIndex ( 1 );\n\ - ThePolyline->SetTypeIndex ( 1 );\n\ -\n"); -Message+= "\ ------------------------------------------------------------------------------- \n\ - after on WM_MOUSEMOVE event call a method MoveTo of AIS2D_InteractiveContext \n\ - and on WM_LBUTTONUP enent call a method Select of AIS2D_InteractiveContext\n\ -------------------------------------------------------------------------------"; - - // Update The Result Dialog - UpdateResultDialog(anID,Message); + FitAll2DViews(Standard_True); // Update Viewer } void CViewer2dDoc::OnBUTTONTestCurve() { - Standard_Integer color = 1; - Standard_Integer type = 1; - Standard_Integer width = 1; - - for (Standard_Integer i=0;i<=5;i++) - for (Standard_Integer j=0;j<=5;j++) - { - Handle_Geom2d_Curve aNewCurve = GCE2d_MakeSegment ( gp_Pnt2d(10*i,10*j) , - gp_Pnt2d(10*i+5,10*j+10 )).Value() ; - Handle(Sample2D_Curve) aCurve = new Sample2D_Curve(aNewCurve); - - aCurve->SetTypeOfLineIndex(type++); - aCurve->SetWidthOfLineIndex(width++); - aCurve->SetColorIndex(color++); - - aCurve->SetHighlightMode(AIS2D_TOD_OBJECT); - - myAISInteractiveContext2D->Display(aCurve, // object - Standard_False); // Redraw - - if (type == 5) type = 1; - if (width == 9) width = 1; - if (color == 2) color = 3; // 2 = noir !! - if (color == 13) color = 1; // 13 = nbcolor by default - } - - FitAll2DViews(Standard_True); // Update Viewer - // Update Get information to update Result dialog - - UINT anID=ID_BUTTON_Test_Curve; - - TCollection_AsciiString Message(" \ -create a set of Sample2D_Curve and display it: \n\ ------------------------------------------------------------------------------- \n\ - Standard_Integer color = 1;\n\ - Standard_Integer type = 1; \n\ - Standard_Integer width = 1; \n\ -\n\ - for (Standard_Integer i=0;i<=5;i++) \n\ - for (Standard_Integer j=0;j<=5;j++)\n\ - {\n\ - Handle_Geom2d_Curve aNewCurve = GCE2d_MakeSegment ( gp_Pnt2d(10*i,10*j) , \n\ - gp_Pnt2d(10*i+5,10*j+10 )).Value() ; \n\ - Handle(Sample2D_Curve) aCurve = new Sample2D_Curve(aNewCurve);\n\ - aCurve->SetColorIndex(color++);\n\ - aCurve->SetTypeOfLineIndex(type++);\n\ - aCurve->SetWidthOfLineIndex(width++);\n\ - aCurve->SetHighlightMode(AIS2D_TOD_OBJECT); \n\ - \n\ - myAISInteractiveContext2D->Display(aCurve, // object\n\ - Standard_False); // Redraw\n\ - if (type == 5) type = 1; //Max number of types + 1\n\ - if (width == 9) width = 1; \n\ - if (color == 2) color =3; // 2 = noir !!\n\ - if (color == 13) color =1; // 13 = nbcolor by default\n\ - }\n\ ------------------------------------------------------------------------------- \n\ - after that the system call the SetContext Methods : \n\ ------------------------------------------------------------------------------- \n"); -Message += "\ -void Sample2D_Curve::Compute(const Handle(AIS2D_InteractiveContext)& theContext) \n\ -{\n\ - AIS2D_InteractiveObject::SetContext(theContext); \n\ -\n\ - Handle(Prs2d_AspectLine) aLineAspect = new Prs2d_AspectLine; \n\ - aLineAspect->SetTypeOfFill(Graphic2d_TOPF_FILLED); \n\ -\n\ - \n\ - Handle(Graphic2d_SetOfCurves) segment;\n\ - segment = new Graphic2d_SetOfCurves(this);\n\ -\n\ - segment->Add(myGeom2dCurve);\n\ - \n\ -\n\ - segment->SetColorIndex (myColorIndex);\n\ - segment->SetWidthIndex (myWidthOfLineIndex );\n\ - segment->SetTypeIndex (myTypeOfLineIndex );\n\ - \n\ - SetAspect(aLineAspect); \n\ -}\n\ -\n"; - - // Update The Result Dialog - UpdateResultDialog(anID,Message); + 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() @@ -813,78 +320,32 @@ void CViewer2dDoc::OnBUTTONTestImage() NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - "image Files (*.bmp , *.gif , *.xwd)|*.bmp; *.gif; *.xwd; | all files (*.*)|*.*;||", + "image Files (*.bmp , *.gif , *.jpeg, *.bmp, *.ppm, *.exr, *.tga, *.tiff, *.pgf, *.pdf)" + "|*.bmp; *.gif; *.jpeg; *.bmp; *.ppm; *.exr; *.tga; *.tiff; *.pgf; *.pdf;" + "| all files (*.*)|*.*;||", NULL ); - CString initdir(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir()); + CString initdir(((OCC_App*) AfxGetApp())->GetInitDataDir()); initdir += "\\Data"; dlg.m_ofn.lpstrInitialDir = initdir; - - if (dlg.DoModal() == IDOK) + if(dlg.DoModal() == IDOK) { SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); CString filename = dlg.GetPathName(); - Standard_CString aFileName = (Standard_CString)(LPCTSTR)filename; + TCollection_AsciiString aFileName(filename); + + //erase viewer + if(myAISContext->HasOpenedContext()) + myAISContext->CloseAllContexts(); + myAISContext->EraseAll(); + Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName); - - anImage->SetCoord(0,0) ; - anImage->SetTypeOfPlacement(Aspect_CP_Center) ; - anImage->SetIsZoomable(Standard_True); - - myAISInteractiveContext2D->Display(anImage, // object - Standard_True); // Redraw - - // Update Get information to update Result dialog - - UINT anID=ID_BUTTON_Test_Image; - TCollection_AsciiString Message(" \ -create a Sample2D_Image and display it : \n\ ------------------------------------------------------------------------------- \n\ - CFileDialog dlg(TRUE, \n\ - NULL, \n\ - NULL, \n\ - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,\n\ - \"image Files (*.bmp , *.gif , *.xwd)|*.bmp; *.gif; *.xwd; | all files (*.*)|*.*;||\", \n\ - NULL );\n\ - if (dlg.DoModal() == IDOK) \n\ - {\n\ - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));\n\ - CString filename = dlg.GetPathName();\n\ - Standard_CString aFileName = (Standard_CString)(LPCTSTR)filename;\n\ - Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName);\n\ -\n\ - anImage->SetCoord(0,0) ;\n\ - anImage->SetTypeOfPlacement(Aspect_CP_Center) ;\n\ - anImage->SetIsZoomable(Standard_True);\n\ -\n\ - myAISInteractiveContext2D->Display(anImage, // Display object\n\ - Standard_True); \n\ - }\n\ ------------------------------------------------------------------------------- \n\ - after that the system call the SetContext method : \n\ ------------------------------------------------------------------------------- \n\ -void Sample2D_Image::SetContext(const Handle(AIS2D_InteractiveContext) theContext)) \n\ -{\n\ - //Set AIS2D_InteractiveContext and default Graphic2d_View \n\ - AIS2D_InteractiveObject::SetContext(theContext); \n\ - Graphic2d_GraphicObject::SetView(theContext->CurrentViewer()->View()); \n\ -\n\ - Handle(GraphicSample2D_ImageFile) aGraphic2dImageFile =\n\ - new GraphicSample2D_ImageFile (aGrObj,\n\ - myFile,\n\ - myX, \n\ - myY,\n\ - myDx,\n\ - myDy,\n\ - myTypeOfPlacement,\n\ - myScale); \n\ - if (myIsZoomable)\n\ - aGraphic2dImageFile->SetZoomable(Standard_True);\n\ -}\n\n"); - - // Update The Result Dialog - UpdateResultDialog(filename,Message); + anImage->SetCoord(40,50) ; + anImage->SetScale(1.0); + myAISContext->Display(anImage, Standard_False); + myAISContext->SetDisplayMode(anImage,3,Standard_False); + FitAll2DViews(Standard_True); } } @@ -894,148 +355,75 @@ void CViewer2dDoc::OnBUTTONMultipleImage() NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - "image Files (*.bmp , *.gif , *.xwd)|*.bmp; *.gif; *.xwd; | all files (*.*)|*.*;||", + "image Files (*.bmp , *.gif , *.jpeg, *.bmp, *.ppm, *.exr, *.tga, *.tiff, *.pgf, *.pdf)" + "|*.bmp; *.gif; *.jpeg; *.bmp; *.ppm; *.exr; *.tga; *.tiff; *.pgf; *.pdf;" + "| all files (*.*)|*.*;||", NULL ); - CString initdir(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir()); + CString initdir(((OCC_App*) AfxGetApp())->GetInitDataDir()); initdir += "\\Data"; dlg.m_ofn.lpstrInitialDir = initdir; - + if (dlg.DoModal() == IDOK) { SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); CString filename = dlg.GetPathName(); - Standard_CString aFileName = (Standard_CString)(LPCTSTR)filename; + TCollection_AsciiString aFileName(filename); + //erase viewer + if(myAISContext->HasOpenedContext()) + myAISContext->CloseAllContexts(); + myAISContext->EraseAll(); + //create images { // 1 Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName); - anImage->SetCoord(40,50) ; - anImage->SetTypeOfPlacement(Aspect_CP_SouthEast) ; - anImage->SetIsZoomable(Standard_True); - - myAISInteractiveContext2D->Display(anImage, // Display object - Standard_False); + anImage->SetScale(0.5); + myAISContext->Display(anImage, Standard_False); + myAISContext->SetDisplayMode(anImage,3,Standard_False); } { // 2 Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName); - anImage->SetCoord(50,50) ; - anImage->SetTypeOfPlacement(Aspect_CP_SouthWest) ; - anImage->SetIsZoomable(Standard_True); - - myAISInteractiveContext2D->Display(anImage, // Display object - Standard_False); + anImage->SetCoord(100,50) ; + anImage->SetScale(0.9); + myAISContext->Display(anImage,Standard_False); + myAISContext->SetDisplayMode(anImage,3,Standard_False); } { // 3 Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName); - anImage->SetCoord(40,40) ; - anImage->SetTypeOfPlacement(Aspect_CP_NorthEast) ; - anImage->SetIsZoomable(Standard_True); - - myAISInteractiveContext2D->Display(anImage, // Display object - Standard_False); + anImage->SetScale(0.3); + myAISContext->Display(anImage, Standard_False); + myAISContext->SetDisplayMode(anImage,3,Standard_False); } { // 4 Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName); - anImage->SetCoord(50,40) ; - anImage->SetTypeOfPlacement(Aspect_CP_NorthWest) ; - anImage->SetIsZoomable(Standard_True); - - myAISInteractiveContext2D->Display(anImage, // Display object - Standard_False); + myAISContext->Display(anImage, Standard_False); + myAISContext->SetDisplayMode(anImage,3,Standard_False); } { // 5 Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName); - anImage->SetCoord(80,45) ; - anImage->SetTypeOfPlacement(Aspect_CP_West) ; - anImage->SetIsZoomable(Standard_True); - anImage->SetScale(2); - myAISInteractiveContext2D->Display(anImage, // Display object - Standard_False); + anImage->SetScale(2); + myAISContext->Display(anImage, Standard_False); + myAISContext->SetDisplayMode(anImage,3,Standard_False); } - { // 6 : Non Zoomable + { // 6 Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName); - anImage->SetCoord(20,-20) ; - anImage->SetTypeOfPlacement(Aspect_CP_NorthWest) ; - - anImage->SetIsZoomable(Standard_False); - - myAISInteractiveContext2D->Display(anImage, // Display object - Standard_False); + myAISContext->Display(anImage, Standard_False); + myAISContext->SetDisplayMode(anImage,3,Standard_False); } - { // 7 : Non Zoomable + { // 7 Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName); - anImage->SetCoord(0,0) ; - anImage->SetOffset(60,-20) ; // new zoom center - anImage->SetTypeOfPlacement(Aspect_CP_NorthWest) ; - anImage->SetScale(0.5); - anImage->SetIsZoomable(Standard_False); - - myAISInteractiveContext2D->Display(anImage, // Display object - Standard_False); + anImage->SetScale(0.5); + myAISContext->Display(anImage, Standard_False); + myAISContext->SetDisplayMode(anImage,3,Standard_False); } FitAll2DViews(Standard_True); // Update Viewer - // Update Get information to update Result dialog - - UINT anID=ID_BUTTON_Test_MultiImages; - TCollection_AsciiString Message(" \ -create a set of Sample2D_Image and display it : \n\ ------------------------------------------------------------------------------- \n\ - CFileDialog dlg(TRUE, \n\ - NULL, \n\ - NULL, \n\ - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, \n\ - \"image Files (*.bmp , *.gif , *.xwd)|*.bmp; *.gif; *.xwd; | all files (*.*)|*.*;||\", \n\ - NULL ); \n\ - if (dlg.DoModal() == IDOK) \n\ - { \n\ - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); \n\ - CString filename = dlg.GetPathName(); \n\ - Standard_CString aFileName = (Standard_CString)(LPCTSTR)filename; \n\ - { // 1 \n\ - Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName); \n\ - \n\ - anImage->SetCoord(40,50) ; \n\ - anImage->SetTypeOfPlacement(Aspect_CP_SouthEast) ; \n\ - anImage->SetIsZoomable(Standard_True); \n\ - \n\ - myAISInteractiveContext2D->Display(anImage, // object \n\ - Standard_False); // Redraw \n\ - } \n\ - //... \n\ -} \n\ ------------------------------------------------------------------------------- \n\ - after that the system call the SetContext Methods : \n\ ------------------------------------------------------------------------------- \n\ -void Sample2D_Image::SetContext(const Handle(AIS2D_InteractiveContext) theContext)) \n\ -{\n\ -\n\ - if(theContext.IsNull() || theContext->CurrentViewer().IsNull()) return; \n\ -\n\ - //Set AIS2D_InteractiveContext and default Graphic2d_View \n\ - AIS2D_InteractiveObject::SetContext(theContext); \n\ - Graphic2d_GraphicObject::SetView(theContext->CurrentViewer()->View()); \n\ -\n\ - Handle(GraphicSample2D_ImageFile) aGraphic2dImageFile =\n\ - new GraphicSample2D_ImageFile (aGrObj,\n\ - myFile,\n\ - myX, \n\ - myY,\n\ - myDx,\n\ - myDy,\n\ - myTypeOfPlacement,\n\ - myScale); \n\ - if (myIsZoomable)\n\ - aGraphic2dImageFile->SetZoomable(Standard_True);\n\ -}\n\n"); - // Update The Result Dialog - UpdateResultDialog(filename,Message); } } diff --git a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.h b/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.h index 6835997893..d582087f42 100755 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.h +++ b/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.h @@ -2,6 +2,9 @@ // ///////////////////////////////////////////////////////////////////////////// +#include <AIS_Shape.hxx> +#include <AIS_LocalContext.hxx> +#include <TopoDS_Face.hxx> #include "OCC_2dDoc.h" @@ -24,12 +27,11 @@ protected: // Generated message map functions protected: //{{AFX_MSG(CViewer2dDoc) - afx_msg void OnBUTTONTest2DProperties(); afx_msg void OnBUTTONTestText(); afx_msg void OnBUTTONTestMarkers(); afx_msg void OnBUTTONTestLine(); afx_msg void OnBUTTONErase(); - afx_msg void OnBUTTONTestFase(); + afx_msg void OnBUTTONTestFace(); afx_msg void OnBUTTONTestRect(); afx_msg void OnBUTTONTestCurve(); afx_msg void OnBUTTONTestImage(); diff --git a/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj b/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj index 15fde70917..16ae19f6fc 100644 --- a/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj +++ b/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj @@ -112,7 +112,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bin/Viewer3d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -154,7 +154,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bin/Viewer3d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -196,7 +196,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bind/Viewer3d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -239,7 +239,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bind/Viewer3d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/04_Viewer3d/adm/win/vc11/Viewer3d.vcxproj b/samples/mfc/standard/04_Viewer3d/adm/win/vc11/Viewer3d.vcxproj index a2681d07a0..8ccfddd1e2 100644 --- a/samples/mfc/standard/04_Viewer3d/adm/win/vc11/Viewer3d.vcxproj +++ b/samples/mfc/standard/04_Viewer3d/adm/win/vc11/Viewer3d.vcxproj @@ -116,7 +116,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bin/Viewer3d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -158,7 +158,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bin/Viewer3d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -200,7 +200,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bind/Viewer3d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -243,7 +243,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bind/Viewer3d.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/04_Viewer3d/adm/win/vc8/Viewer3d.vcproj b/samples/mfc/standard/04_Viewer3d/adm/win/vc8/Viewer3d.vcproj index 1492bdf6ce..ee39dbd47b 100644 --- a/samples/mfc/standard/04_Viewer3d/adm/win/vc8/Viewer3d.vcproj +++ b/samples/mfc/standard/04_Viewer3d/adm/win/vc8/Viewer3d.vcproj @@ -81,7 +81,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc8\bin/Viewer3d.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc8\bin/Viewer3d.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -275,7 +275,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc8\bind/Viewer3d.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -373,7 +373,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc8\bind/Viewer3d.exe" LinkIncremental="2" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/04_Viewer3d/adm/win/vc9/Viewer3d.vcproj b/samples/mfc/standard/04_Viewer3d/adm/win/vc9/Viewer3d.vcproj index 6f6f413ae1..c58f1a191e 100644 --- a/samples/mfc/standard/04_Viewer3d/adm/win/vc9/Viewer3d.vcproj +++ b/samples/mfc/standard/04_Viewer3d/adm/win/vc9/Viewer3d.vcproj @@ -82,7 +82,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc9\bin/Viewer3d.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc9\bin/Viewer3d.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -274,7 +274,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc9\bind/Viewer3d.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -371,7 +371,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc9\bin/Viewer3d.exe" LinkIncremental="2" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp b/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp index 74b76ff6af..6aad84e5a5 100755 --- a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp +++ b/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp @@ -145,7 +145,7 @@ Handle_AIS_TexturedShape TexturesExt_Presentation::Texturize(const TopoDS_Shape& 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 initfile(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir()); + CString initfile(((OCC_App*) AfxGetApp())->GetInitDataDir()); initfile += "\\Data\\"; if (!aTFileName.IsIntegerValue()) { @@ -174,7 +174,7 @@ Standard_Boolean TexturesExt_Presentation::loadShape(TopoDS_Shape& aShape, TCollection_AsciiString aFileName) { // create a TopoDS_Shape -> read from a brep file - CString initfile(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir()); + CString initfile(((OCC_App*) AfxGetApp())->GetInitDataDir()); initfile += "\\Data\\"; initfile += aFileName.ToCString(); diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.cpp b/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.cpp index b2a025fb22..1cdb61ca76 100755 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.cpp +++ b/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.cpp @@ -26,9 +26,9 @@ END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CViewer3dApp construction -CViewer3dApp::CViewer3dApp() +CViewer3dApp::CViewer3dApp() : OCC_App() { - SampleName = "Viewer3d"; //for about dialog + SampleName = "Viewer3d"; //for about dialog } ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.h b/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.h index 8b0f83995f..31459e5184 100755 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.h +++ b/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.h @@ -8,24 +8,24 @@ #pragma once #endif // _MSC_VER >= 1000 -#include <OCC_3dApp.h> +#include <OCC_App.h> -class CViewer3dApp : public OCC_3dApp +class CViewer3dApp : public OCC_App { public: - CViewer3dApp(); + + CViewer3dApp(); // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CViewer3dApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CViewer3dApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL - DECLARE_MESSAGE_MAP() + DECLARE_MESSAGE_MAP() }; - ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp b/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp index 021bd182ac..7ffd698099 100755 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp +++ b/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp @@ -460,7 +460,6 @@ void CViewer3dDoc::OnObjectErase() OCC_3dBaseDoc::OnObjectErase(); if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) myOffsetDlg->UpdateValues(); - } void CViewer3dDoc::OnObjectDisplayall() @@ -469,7 +468,6 @@ void CViewer3dDoc::OnObjectDisplayall() OCC_3dBaseDoc::OnObjectDisplayall(); if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) myOffsetDlg->UpdateValues(); - } Handle_User_Cylinder CViewer3dDoc::GetCylinder() @@ -521,77 +519,85 @@ void CViewer3dDoc::InputEvent(const Standard_Integer x , const Standard_Integer y , const Handle(V3d_View)& aView ) { - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); + if (myOffsetDlg && myOffsetDlg->IsWindowVisible()) + myOffsetDlg->UpdateValues(); - Quantity_Color CSFColor ; - COLORREF MSColor ; - myAISContext->Select(); -// 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->Current() ; - Handle_AIS_InteractiveObject Current = myAISContext->SelectedInteractive() ; - if ( Current->HasColor () ) { - CSFColor = myAISContext->Color(Current); - 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); - TopoDS_Shape S = myAISContext->SelectedShape(); - Handle(Geom_Surface) Surface = BRep_Tool::Surface(TopoDS::Face(S)); - if (Surface->IsKind(STANDARD_TYPE(Geom_Plane))) - //Handle(User_Cylinder)::DownCast(myAISContext->Current())->SetPlanarFaceColor(CSFColor.Name()); - Handle(User_Cylinder)::DownCast(myAISContext->SelectedInteractive())->SetPlanarFaceColor(CSFColor.Name()); - else - //Handle(User_Cylinder)::DownCast(myAISContext->Current())->SetCylindricalFaceColor(CSFColor.Name()); - Handle(User_Cylinder)::DownCast(myAISContext->SelectedInteractive())->SetCylindricalFaceColor(CSFColor.Name()); - //myAISContext->Redisplay(myAISContext->Current()); - myAISContext->Redisplay(myAISContext->SelectedInteractive()); - myState = -1; - myAISContext->CloseLocalContext(); - } - } - TCollection_AsciiString Message ("\ - TopoDS_Shape S = myAISContext->SelectedShape(); \n\ - \n\ - Handle(Geom_Surface) Surface = BRep_Tool::Surface(TopoDS::Face(S)); \n\ - \n\ - if (Surface->IsKind(STANDARD_TYPE(Geom_Plane))) \n\ - Handle(User_Cylinder)::DownCast(myAISContext->Current())->SetPlanarFaceColor(CSFColor.Name()); \n\ - else \n\ - Handle(User_Cylinder)::DownCast(myAISContext->Current())->SetCylindricalFaceColor(CSFColor.Name()); \n\ - \n\ - myAISContext->Redisplay(myAISContext->Current()); \n\ - \n\ - myAISContext->CloseLocalContext(); \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\ - Methods SetPlanarFaceColor and SetCylindricalFaceColor are also \n\ - defined in the User_Cylinder class. \n\ - \n"); - - CString text(Message.ToCString()); - myCResultDialog.SetTitle(CString("Change face color")); - myCResultDialog.SetText(text); - SetTitle(CString("Change face color")); - - } + Quantity_Color CSFColor; + COLORREF MSColor; + myAISContext->Select(); + + // 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()) + { + CSFColor = myAISContext->Color (Current); + 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); + + TopoDS_Shape S = myAISContext->SelectedShape(); + Handle(Geom_Surface) Surface = BRep_Tool::Surface (TopoDS::Face(S)); + if (Surface->IsKind (STANDARD_TYPE (Geom_Plane))) + { + Handle(User_Cylinder)::DownCast (myAISContext->SelectedInteractive()) + ->SetPlanarFaceColor (CSFColor.Name()); + } + else + { + Handle(User_Cylinder)::DownCast (myAISContext->SelectedInteractive()) + ->SetCylindricalFaceColor (CSFColor.Name()); + } + + myAISContext->Redisplay (myAISContext->SelectedInteractive()); + myState = -1; + myAISContext->CloseLocalContext(); + } + } + + TCollection_AsciiString aMessage (" TopoDS_Shape S = myAISContext->SelectedShape(); \n" + " \n" + " Handle(Geom_Surface) Surface = BRep_Tool::Surface(TopoDS::Face(S));" + " if (Surface->IsKind(STANDARD_TYPE(Geom_Plane))) \n" + " Handle(User_Cylinder)::DownCast(myAISContext->Current())->SetPlanarFaceColor(CSFColor.Name()); \n" + " else \n" + " Handle(User_Cylinder)::DownCast(myAISContext->Current())->SetCylindricalFaceColor(CSFColor.Name()); \n" + " \n" + " myAISContext->Redisplay(myAISContext->Current()); \n" + " \n" + " myAISContext->CloseLocalContext(); \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" + " Methods SetPlanarFaceColor and SetCylindricalFaceColor are also \n" + " defined in the User_Cylinder class. \n" + " \n"); + + CString aMsgStr (aMessage.ToCString()); + myCResultDialog.SetTitle (CString ("Change face color")); + myCResultDialog.SetText (aMsgStr); + SetTitle (CString ("Change face color")); + } } - //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- @@ -600,9 +606,9 @@ void CViewer3dDoc::ShiftDragEvent(const Standard_Integer x , const Standard_Integer TheState , const Handle(V3d_View)& aView ) { - OCC_3dBaseDoc::ShiftDragEvent(x,y,TheState,aView); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); + OCC_3dBaseDoc::ShiftDragEvent(x,y,TheState,aView); + if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) + myOffsetDlg->UpdateValues(); } @@ -614,33 +620,29 @@ void CViewer3dDoc::ShiftInputEvent(const Standard_Integer x , const Standard_Integer y , const Handle(V3d_View)& aView ) { - OCC_3dBaseDoc::ShiftInputEvent(x,y,aView); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); - + OCC_3dBaseDoc::ShiftInputEvent(x,y,aView); + if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) + myOffsetDlg->UpdateValues(); } void CViewer3dDoc::OnObjectColoredMesh() { for(myAISContext->InitCurrent();myAISContext->MoreCurrent();myAISContext->NextCurrent()) - if (myAISContext->Current()->IsKind(STANDARD_TYPE(User_Cylinder))){ - myAISContext->ClearPrs(myAISContext->Current(),6,Standard_False); - myAISContext->RecomputePrsOnly(myAISContext->Current(),Standard_False); - myAISContext->SetDisplayMode(myAISContext->Current(),6); - } - + if (myAISContext->Current()->IsKind(STANDARD_TYPE(User_Cylinder))) + { + myAISContext->ClearPrs(myAISContext->Current(),6,Standard_False); + myAISContext->RecomputePrsOnly(myAISContext->Current(),Standard_False); + myAISContext->SetDisplayMode(myAISContext->Current(),6); + } } void CViewer3dDoc::OnUpdateObjectColoredMesh(CCmdUI* pCmdUI) { bool CylinderIsCurrentAndDisplayed = false; for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ()) - //if ((myAISContext->IsDisplayed(myAISContext->Current(),1) || myAISContext->IsDisplayed(myAISContext->Current(),0)) - // && myAISContext->Current()->IsKind(STANDARD_TYPE(User_Cylinder))) if(myAISContext->Current()->IsKind(STANDARD_TYPE(User_Cylinder))) CylinderIsCurrentAndDisplayed=true; pCmdUI->Enable (CylinderIsCurrentAndDisplayed); - } void CViewer3dDoc::OnUpdateObjectWireframe(CCmdUI* pCmdUI) @@ -700,19 +702,6 @@ void CViewer3dDoc::OnUpdateOptionsTrihedronStaticTrihedron(CCmdUI* pCmdUI) } -/* -void CViewer3dDoc::OnUpdateObjectColor(CCmdUI* pCmdUI) -{ - bool OneOrMoreInShadingOrWireframe = false; - for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ()) - if (myAISContext->IsDisplayed(myAISContext->Current(),1) - || myAISContext->IsDisplayed(myAISContext->Current(),0)) - OneOrMoreInShadingOrWireframe = true; - pCmdUI->Enable (OneOrMoreInShadingOrWireframe); - -} -*/ - void CViewer3dDoc::Popup( const Standard_Integer x, const Standard_Integer y , const Handle(V3d_View)& aView ) @@ -747,85 +736,82 @@ void CViewer3dDoc::Popup( const Standard_Integer x, pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON , winCoord.x, winCoord.y , AfxGetMainWnd()); } + //Set faces selection mode void CViewer3dDoc::OnFaces() { - myAISContext->CloseAllContexts(); - myAISContext->OpenLocalContext(); - myAISContext->ActivateStandardMode(TopAbs_FACE); + myAISContext->CloseAllContexts(); + myAISContext->OpenLocalContext(); + myAISContext->ActivateStandardMode (TopAbs_FACE); -TCollection_AsciiString Message ("\ -myAISContext->OpenLocalContext(); \n\ -\n\ -myAISContext->ActivateStandardMode(TopAbs_FACE); \n\ -\n"); + TCollection_AsciiString aMessage (" myAISContext->OpenLocalContext(); \n" + " \n" + " myAISContext->ActivateStandardMode(TopAbs_FACE); \n" + " \n"); - CString text(Message.ToCString()); - myCResultDialog.SetTitle(CString("Standard mode: TopAbs_FACE")); - myCResultDialog.SetText(text); - SetTitle(CString("Standard mode: TopAbs_FACE")); + CString aMsgStr (aMessage.ToCString()); + myCResultDialog.SetTitle (CString("Standard mode: TopAbs_FACE")); + myCResultDialog.SetText (aMsgStr); + SetTitle (CString ("Standard mode: TopAbs_FACE")); } //Set edges selection mode void CViewer3dDoc::OnEdges() { - myAISContext->CloseAllContexts(); - myAISContext->OpenLocalContext(); - myAISContext->ActivateStandardMode(TopAbs_EDGE); + myAISContext->CloseAllContexts(); + myAISContext->OpenLocalContext(); + myAISContext->ActivateStandardMode(TopAbs_EDGE); -TCollection_AsciiString Message ("\ -myAISContext->OpenLocalContext(); \n\ -\n\ -myAISContext->ActivateStandardMode(TopAbs_EDGE); \n\ -\n"); + TCollection_AsciiString aMessage (" myAISContext->OpenLocalContext(); \n" + " \n" + " myAISContext->ActivateStandardMode(TopAbs_EDGE); \n" + " \n"); - CString text(Message.ToCString()); - myCResultDialog.SetTitle(CString("Standard mode: TopAbs_EDGE")); - myCResultDialog.SetText(text); - SetTitle(CString("Standard mode: TopAbs_EDGE")); + CString aMsgStr (aMessage.ToCString()); + myCResultDialog.SetTitle (CString ("Standard mode: TopAbs_EDGE")); + myCResultDialog.SetText (aMsgStr); + SetTitle (CString ("Standard mode: TopAbs_EDGE")); } // Set vertices selection mode void CViewer3dDoc::OnVertices() { - myAISContext->CloseAllContexts(); - myAISContext->OpenLocalContext(); - myAISContext->ActivateStandardMode(TopAbs_VERTEX); + myAISContext->CloseAllContexts(); + myAISContext->OpenLocalContext(); + myAISContext->ActivateStandardMode (TopAbs_VERTEX); -TCollection_AsciiString Message ("\ -myAISContext->OpenLocalContext(); \n\ -\n\ -myAISContext->ActivateStandardMode(TopAbs_VERTEX); \n\ -\n"); + TCollection_AsciiString aMessage (" myAISContext->OpenLocalContext(); \n" + " \n" + " myAISContext->ActivateStandardMode(TopAbs_VERTEX); \n" + " \n"); - CString text(Message.ToCString()); - myCResultDialog.SetTitle(CString("Standard mode: TopAbs_VERTEX")); - myCResultDialog.SetText(text); - SetTitle(CString("Standard mode: TopAbs_VERTEX")); + CString aMsgStr (aMessage.ToCString()); + myCResultDialog.SetTitle (CString ("Standard mode: TopAbs_VERTEX")); + myCResultDialog.SetText (aMsgStr); + SetTitle (CString ("Standard mode: TopAbs_VERTEX")); } //Neutral selection mode void CViewer3dDoc::OnNeutral() { - myAISContext->CloseAllContexts(); + myAISContext->CloseAllContexts(); -TCollection_AsciiString Message ("\ -myAISContext->CloseAllContexts(); \n\ -\n"); + TCollection_AsciiString aMessage (" myAISContext->CloseAllContexts(); \n" + " \n"); - CString text(Message.ToCString()); - myCResultDialog.SetTitle(CString("Standard mode: Neutral")); - myCResultDialog.SetText(text); - SetTitle(CString("Standard mode: Neutral")); + CString aMsgStr (aMessage.ToCString()); + myCResultDialog.SetTitle (CString ("Standard mode: Neutral")); + myCResultDialog.SetText (aMsgStr); + SetTitle (CString ("Standard mode: Neutral")); } // Change the color of faces on a user cylinder void CViewer3dDoc::OnUsercylinderChangefacecolor() { - myAISContext->OpenLocalContext(); - myAISContext->Activate(myAISContext->Current(),4); - myState = FACE_COLOR; -// see the following of treatment in inputevent + myAISContext->OpenLocalContext(); + myAISContext->Activate(myAISContext->Current(),4); + myState = FACE_COLOR; + // see the following of treatment in inputevent } // Make 3d fillets on solids @@ -833,167 +819,170 @@ void CViewer3dDoc::OnUsercylinderChangefacecolor() // before running this function void CViewer3dDoc::OnFillet3d() { - if( !myAISContext->HasOpenedContext()) + if (!myAISContext->HasOpenedContext()) + { + AfxMessageBox("It is necessary to activate the edges selection mode\n" + "and select edges on an object before \nrunning this function"); + return; + } + + myAISContext->InitSelected(); + if (myAISContext->MoreSelected()) + { + Handle(AIS_Shape) S = Handle(AIS_Shape)::DownCast (myAISContext->SelectedInteractive()); + + if (S.IsNull()) { - AfxMessageBox("It is necessary to activate the edges selection mode\n\ -and select edges on an object before \nrunning this function"); - return; + AfxMessageBox("It is necessary to activate the edges selection mode\n" + "and select edges on an object before \nrunning this function"); + return; } - - myAISContext->InitSelected(); - if (myAISContext->MoreSelected()) { - Handle(AIS_Shape) S = Handle(AIS_Shape)::DownCast(myAISContext->SelectedInteractive()); - - if (S.IsNull()){ - AfxMessageBox("It is necessary to activate the edges selection mode\n\ -and select edges on an object before \nrunning this function"); - return; - } - - TopoDS_Shape Sh=S->Shape(); - - BRepFilletAPI_MakeFillet aFillet(Sh); - - for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected()) - { - TopoDS_Edge anEdge; - try { - anEdge=TopoDS::Edge(myAISContext->SelectedShape()); - } - catch(Standard_Failure) - { - } - - if (anEdge.IsNull()) - { - AfxMessageBox("It is necessary to activate the edges selection mode\n\ -and select edges on an object before \nrunning this function"); - return; - } - } - BoxRadius dlg(NULL,10.); - if (dlg.DoModal() == IDOK){ - for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected()){ - TopoDS_Edge anEdge = TopoDS::Edge(myAISContext->SelectedShape()); - aFillet.Add(dlg.m_radius,anEdge); - } - } - else return; + TopoDS_Shape Sh=S->Shape(); - TopoDS_Shape aNewShape; -// if(!aFillet.IsDone()) - try{ - aNewShape = aFillet.Shape(); - } - catch(Standard_Failure) - { - AfxMessageBox("Error During Fillet computation"); - return; - } - S ->Set(aNewShape); - myAISContext->Redisplay(S); - - } -TCollection_AsciiString Message ("\ -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"); + BRepFilletAPI_MakeFillet aFillet(Sh); - CString text(Message.ToCString()); - myCResultDialog.SetTitle(CString("Make a fillet")); - myCResultDialog.SetText(text); - SetTitle(CString("Make a fillet")); + for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected()) + { + TopoDS_Shape aSelShape = myAISContext->SelectedShape(); + if (aSelShape.ShapeType() != TopAbs_EDGE) + { + AfxMessageBox("It is necessary to activate the edges selection mode\n\ + and select edges on an object before \nrunning this function"); + return; + } + } + + BoxRadius dlg(NULL,10.); + if (dlg.DoModal() == IDOK) + { + for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected()) + { + TopoDS_Edge anEdge = TopoDS::Edge(myAISContext->SelectedShape()); + aFillet.Add(dlg.m_radius,anEdge); + } + } + else + { + return; + } + + TopoDS_Shape aNewShape; + try + { + aNewShape = aFillet.Shape(); + } + catch (Standard_Failure) + { + AfxMessageBox("Error During Fillet computation"); + return; + } + + S ->Set (aNewShape); + myAISContext->Redisplay (S); + } + + TCollection_AsciiString aMessage (" 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"); + + CString aMsgStr (aMessage.ToCString()); + myCResultDialog.SetTitle (CString ("Make a fillet")); + myCResultDialog.SetText (aMsgStr); + SetTitle (CString ("Make a fillet")); } + // Create and display a circle with standard tools void CViewer3dDoc::OnCircle() { - gp_Ax2 ax2(gp_Pnt(0., 0., 0.), gp_Dir(0., 0., -1.)); - Handle(Geom_Circle) C = new Geom_Circle(ax2, 300); -// 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(C); - myAISContext->Display(anAISCirc); + gp_Ax2 anAx2 (gp_Pnt (0., 0., 0.), gp_Dir(0., 0., -1.)); + Handle(Geom_Circle) aGeomCircle = new Geom_Circle (anAx2, 300); -TCollection_AsciiString Message ("\ -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"); + // 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()); - CString text(Message.ToCString()); - myCResultDialog.SetTitle(CString("Create a circle")); - myCResultDialog.SetText(text); - SetTitle(CString("Create a circle")); + Handle(AIS_Circle) anAISCirc = new AIS_Circle(aGeomCircle); + myAISContext->Display (anAISCirc); + + TCollection_AsciiString aMessage (" 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"); + + CString aMsgStr (aMessage.ToCString()); + myCResultDialog.SetTitle (CString ("Create a circle")); + myCResultDialog.SetText (aMsgStr); + SetTitle (CString ("Create a circle")); } void CViewer3dDoc::OnLine() { - // TODO: Add your command handler code here - gp_Lin L(gp_Pnt(0.,0.,0.),gp_Dir(1.,0.,0.)); - Handle(Geom_Line) aLine = new Geom_Line(L); - Handle(AIS_Line) anAISLine = new AIS_Line(aLine); - myAISContext->Display(anAISLine); + // 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); -TCollection_AsciiString Message ("\ -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"); + TCollection_AsciiString aMessage (" 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"); - CString text(Message.ToCString()); - myCResultDialog.SetTitle(CString("Create a line")); - myCResultDialog.SetText(text); - SetTitle(CString("Create a line")); + CString aMsgStr (aMessage.ToCString()); + myCResultDialog.SetTitle (CString("Create a line")); + myCResultDialog.SetText (aMsgStr); + SetTitle (CString ("Create a line")); } void CViewer3dDoc::OnNbisos() { - int nu = myAISContext->DefaultDrawer()->UIsoAspect()->Number(); - int nv = myAISContext->DefaultDrawer()->VIsoAspect()->Number(); - DlgIsos dlg(NULL,nu,nv); - if (dlg.DoModal() == IDOK) { - myAISContext->DefaultDrawer()->UIsoAspect()->SetNumber(dlg.m_isou); - myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber(dlg.m_isov); + int aNumU = myAISContext->DefaultDrawer()->UIsoAspect()->Number(); + int aNumV = myAISContext->DefaultDrawer()->VIsoAspect()->Number(); -TCollection_AsciiString Message ("\ -myAISContext->DefaultDrawer()->UIsoAspect()->SetNumber(dlg.m_isou); \n\ -\n\ -myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber(dlg.m_isov); \n\ -\n"); + DlgIsos aDlg (NULL, aNumU, aNumV); - CString text(Message.ToCString()); - myCResultDialog.SetTitle(CString("Iso Aspect")); - myCResultDialog.SetText(text); - SetTitle(CString("Iso Aspect")); + if (aDlg.DoModal() == IDOK) + { + myAISContext->DefaultDrawer()->UIsoAspect()->SetNumber (aDlg.m_isou); + myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber (aDlg.m_isov); - } + TCollection_AsciiString aMessage (" myAISContext->DefaultDrawer()->UIsoAspect()->SetNumber(dlg.m_isou); \n" + " \n" + " myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber(dlg.m_isov); \n" + " \n"); + + CString aMsgStr (aMessage.ToCString()); + myCResultDialog.SetTitle (CString("Iso Aspect")); + myCResultDialog.SetText (aMsgStr); + SetTitle (CString ("Iso Aspect")); + } } BOOL CViewer3dDoc::OnNewDocument() { - if (!CDocument::OnNewDocument()) - return FALSE; + if (!CDocument::OnNewDocument()) + return FALSE; - // TODO: add reinitialization code here - // (SDI documents will reuse this document) + // TODO: add reinitialization code here + // (SDI documents will reuse this document) SetTitle(myPresentation->GetName()); myAISContext->EraseAll(Standard_False); @@ -1006,7 +995,7 @@ BOOL CViewer3dDoc::OnNewDocument() pView->Reset(); } - return TRUE; + return TRUE; } void CViewer3dDoc::OnFileNew() @@ -1048,7 +1037,7 @@ void CViewer3dDoc::DoSample() Standard_SStream aSStream; aSStream << "An exception was caught: " << Standard_Failure::Caught() << ends; Standard_CString aMsg = aSStream.str().c_str(); -// aSStream.rdbuf()->freeze(0); // allow deletion of dynamic array + // aSStream.rdbuf()->freeze(0); // allow deletion of dynamic array AfxMessageBox (aMsg); } } @@ -1125,39 +1114,28 @@ void CViewer3dDoc::OnUpdateBUTTONEnd(CCmdUI* pCmdUI) void CViewer3dDoc::OnDumpView() { - // save current directory and restore it on exit - char aCurPath[MAX_PATH]; - ::GetCurrentDirectory(MAX_PATH, aCurPath); - - ::SetCurrentDirectory(myLastPath); - - CFileDialog *aDlg = new CFileDialog(false, "gif", "OCCView.gif", - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, "GIF Files (*.gif)|*.gif||", NULL); - - int result = aDlg->DoModal(); - if ( result == IDOK) + CFileDialog aDlg (false, "gif", "OCCView.gif", OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, + "GIF Files (*.GIF)|*.gif|" + "BMP Files (*.BMP)|*.bmp|" + "PNG Files (*.PNG)|*.png|" + "JPEG Files (*.JPG)|*.jpg|" + "PPM Files (*.PPM)|*.ppm|" + "TIFF Files (*.TIFF)|*.tiff|" + "TGA Files (*.TGA)|*.tga|" + "EXR Files (*.EXR)|*.exr||", NULL); + if (aDlg.DoModal() != IDOK) { - CString aFileName = aDlg->GetFileName(); - delete aDlg; - - POSITION pos = GetFirstViewPosition(); - while (pos != NULL) - { - CViewer3dView* pView = (CViewer3dView*) GetNextView(pos); - pView->UpdateWindow(); - } - - myViewer->InitActiveViews(); - Handle(V3d_View) aView = myViewer->ActiveView(); - char aStrFileName[MAX_PATH]; - strcpy_s(aStrFileName, aFileName); - aView->Dump(aStrFileName); + return; } - else - delete aDlg; - - ::GetCurrentDirectory(MAX_PATH, myLastPath); - ::SetCurrentDirectory(aCurPath); + + for (POSITION aPos = GetFirstViewPosition(); aPos != NULL;) + { + CViewer3dView* pView = (CViewer3dView* )GetNextView (aPos); + pView->UpdateWindow(); + } + myViewer->InitActiveViews(); + Handle(V3d_View) aView = myViewer->ActiveView(); + aView->Dump (aDlg.GetPathName()); } void CViewer3dDoc::Start() diff --git a/samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj b/samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj index ec4c425174..e13f527a00 100644 --- a/samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj +++ b/samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj @@ -112,7 +112,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bin/ImportExport.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -154,7 +154,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bin/ImportExport.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -195,7 +195,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bind/ImportExport.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -237,7 +237,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bind/ImportExport.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/05_ImportExport/adm/win/vc11/ImportExport.vcxproj b/samples/mfc/standard/05_ImportExport/adm/win/vc11/ImportExport.vcxproj index b18b466224..f9e8ca9b75 100644 --- a/samples/mfc/standard/05_ImportExport/adm/win/vc11/ImportExport.vcxproj +++ b/samples/mfc/standard/05_ImportExport/adm/win/vc11/ImportExport.vcxproj @@ -116,7 +116,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bin/ImportExport.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -158,7 +158,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bin/ImportExport.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -199,7 +199,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bind/ImportExport.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -241,7 +241,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bind/ImportExport.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/05_ImportExport/adm/win/vc8/ImportExport.vcproj b/samples/mfc/standard/05_ImportExport/adm/win/vc8/ImportExport.vcproj index d9fb3a9fe1..45b3bae757 100644 --- a/samples/mfc/standard/05_ImportExport/adm/win/vc8/ImportExport.vcproj +++ b/samples/mfc/standard/05_ImportExport/adm/win/vc8/ImportExport.vcproj @@ -81,7 +81,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../../win32\vc8\bin/ImportExport.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../../win64\vc8\bin/ImportExport.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -274,7 +274,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../../win32\vc8\bind/ImportExport.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -371,7 +371,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../../win64\vc8\bind/ImportExport.exe" LinkIncremental="2" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/05_ImportExport/adm/win/vc9/ImportExport.vcproj b/samples/mfc/standard/05_ImportExport/adm/win/vc9/ImportExport.vcproj index 859d840d35..c5199ac8c3 100644 --- a/samples/mfc/standard/05_ImportExport/adm/win/vc9/ImportExport.vcproj +++ b/samples/mfc/standard/05_ImportExport/adm/win/vc9/ImportExport.vcproj @@ -82,7 +82,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../../win32\vc9\bin/ImportExport.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../../win64\vc9\bin/ImportExport.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -273,7 +273,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../../win32\vc9\bind/ImportExport.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -369,7 +369,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../../win64\vc9\bind/ImportExport.exe" LinkIncremental="2" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/05_ImportExport/src/ImportExportApp.cpp b/samples/mfc/standard/05_ImportExport/src/ImportExportApp.cpp index f3d672f7ee..19f357a62c 100755 --- a/samples/mfc/standard/05_ImportExport/src/ImportExportApp.cpp +++ b/samples/mfc/standard/05_ImportExport/src/ImportExportApp.cpp @@ -11,7 +11,7 @@ #include <OCC_3dView.h> #include <res\resource.h> -BEGIN_MESSAGE_MAP(CImportExportApp, OCC_3dApp) +BEGIN_MESSAGE_MAP(CImportExportApp, OCC_App) //{{AFX_MSG_MAP(CSerializeApp) ON_COMMAND(ID_FILE_OPEN, OnFileOpen) //}}AFX_MSG_MAP @@ -20,16 +20,19 @@ END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CImportExportApp construction -CImportExportApp::CImportExportApp() +CImportExportApp::CImportExportApp() : OCC_App() { - // Set the local system units - try - { UnitsAPI::SetLocalSystem(UnitsAPI_MDTV); } - catch (Standard_Failure) - { - AfxMessageBox("Fatal Error in units initialisation"); - } - SampleName = "ImportExport"; //for about dialog + // Set the local system units + try + { + UnitsAPI::SetLocalSystem (UnitsAPI_MDTV); + } + catch (Standard_Failure) + { + AfxMessageBox ("Fatal Error in units initialisation"); + } + + SampleName = "ImportExport"; //for about dialog } ///////////////////////////////////////////////////////////////////////////// @@ -111,7 +114,7 @@ void CImportExportApp::OnFileOpen() NULL ); - CString initdir(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir()); + CString initdir(((OCC_App*) AfxGetApp())->GetInitDataDir()); initdir += "\\Data"; dlg.m_ofn.lpstrInitialDir = initdir; diff --git a/samples/mfc/standard/05_ImportExport/src/ImportExportApp.h b/samples/mfc/standard/05_ImportExport/src/ImportExportApp.h index 9ffb99d178..e0233677fa 100755 --- a/samples/mfc/standard/05_ImportExport/src/ImportExportApp.h +++ b/samples/mfc/standard/05_ImportExport/src/ImportExportApp.h @@ -8,25 +8,29 @@ #pragma once #endif // _MSC_VER >= 1000 -#include <OCC_3dApp.h> +#include <OCC_App.h> -class CImportExportApp : public OCC_3dApp +class CImportExportApp : public OCC_App { public: - CImportExportApp(); + + CImportExportApp(); // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CImportExportApp) - public: - virtual BOOL InitInstance(); - virtual CDocument* OpenDocumentFile(LPCTSTR lpszFileName); - //}}AFX_VIRTUAL + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CImportExportApp) + public: + virtual BOOL InitInstance(); + virtual CDocument* OpenDocumentFile(LPCTSTR lpszFileName); + //}}AFX_VIRTUAL + protected: - //{{AFX_MSG(CSerializeApp) - afx_msg void OnFileOpen(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() + + //{{AFX_MSG(CSerializeApp) + afx_msg void OnFileOpen(); + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj b/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj index 51207d946d..3176a8ffb5 100644 --- a/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj +++ b/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj @@ -112,7 +112,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bin/Ocaf.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -154,7 +154,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bin/Ocaf.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -195,7 +195,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bind/Ocaf.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -237,7 +237,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bind/Ocaf.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/06_Ocaf/adm/win/vc11/Ocaf.vcxproj b/samples/mfc/standard/06_Ocaf/adm/win/vc11/Ocaf.vcxproj index a46b98a0b0..5a86f0d3ff 100644 --- a/samples/mfc/standard/06_Ocaf/adm/win/vc11/Ocaf.vcxproj +++ b/samples/mfc/standard/06_Ocaf/adm/win/vc11/Ocaf.vcxproj @@ -116,7 +116,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bin/Ocaf.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -158,7 +158,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bin/Ocaf.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -199,7 +199,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bind/Ocaf.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -241,7 +241,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bind/Ocaf.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/06_Ocaf/adm/win/vc8/Ocaf.vcproj b/samples/mfc/standard/06_Ocaf/adm/win/vc8/Ocaf.vcproj index cdcefa0a8d..69a09fa581 100644 --- a/samples/mfc/standard/06_Ocaf/adm/win/vc8/Ocaf.vcproj +++ b/samples/mfc/standard/06_Ocaf/adm/win/vc8/Ocaf.vcproj @@ -81,7 +81,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc8\bin/Ocaf.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc8\bin/Ocaf.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -274,7 +274,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc8\bind/Ocaf.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -371,7 +371,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc8\bind/Ocaf.exe" LinkIncremental="2" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/06_Ocaf/adm/win/vc9/Ocaf.vcproj b/samples/mfc/standard/06_Ocaf/adm/win/vc9/Ocaf.vcproj index b79d647363..35b64ec2a8 100644 --- a/samples/mfc/standard/06_Ocaf/adm/win/vc9/Ocaf.vcproj +++ b/samples/mfc/standard/06_Ocaf/adm/win/vc9/Ocaf.vcproj @@ -82,7 +82,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc9\bin/Ocaf.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc9\bin/Ocaf.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -273,7 +273,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc9\bind/Ocaf.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -369,7 +369,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKLCAF.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc9\bind/Ocaf.exe" LinkIncremental="2" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/06_Ocaf/src/OcafApp.cpp b/samples/mfc/standard/06_Ocaf/src/OcafApp.cpp index 5cf66eea64..5387a7029b 100755 --- a/samples/mfc/standard/06_Ocaf/src/OcafApp.cpp +++ b/samples/mfc/standard/06_Ocaf/src/OcafApp.cpp @@ -33,26 +33,20 @@ END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // COcafApp construction -COcafApp::COcafApp() +COcafApp::COcafApp() : OCC_App() { -// CasCade : - SetSamplePath("06_Ocaf"); - myApp = new TOcaf_Application(); -// End CasCade - SampleName = "OCAF"; //for about dialog + SetSamplePath("06_Ocaf"); + myApp = new TOcaf_Application(); + SampleName = "OCAF"; //for about dialog - try - { UnitsAPI::SetLocalSystem(UnitsAPI_MDTV); } - catch (Standard_Failure) - { + try + { + UnitsAPI::SetLocalSystem(UnitsAPI_MDTV); + } + catch (Standard_Failure) + { AfxMessageBox("Fatal Error in units initialisation"); - } -} - -COcafApp::~COcafApp() -{ -// Warning : delete only template you don't declare by AddDocTemplate -// if( pDocTemplateForView3d) delete pDocTemplateForView3d; + } } ///////////////////////////////////////////////////////////////////////////// @@ -138,7 +132,7 @@ BOOL COcafApp::IsViewExisting(CDocument * pDoc, CRuntimeClass * pViewClass, CVie //================================================================ // Function : COcafApp::OnFileOpen() -///Purpose : +// Purpose : //================================================================ void COcafApp::OnFileOpen() { diff --git a/samples/mfc/standard/06_Ocaf/src/OcafApp.h b/samples/mfc/standard/06_Ocaf/src/OcafApp.h index 092a242252..66fdab6335 100755 --- a/samples/mfc/standard/06_Ocaf/src/OcafApp.h +++ b/samples/mfc/standard/06_Ocaf/src/OcafApp.h @@ -8,39 +8,36 @@ #pragma once #endif // _MSC_VER >= 1000 -#include <OCC_3dApp.h> +#include <OCC_App.h> #include "OcafDoc.h" #include "TOCAF_Application.hxx" -class COcafApp : public OCC_3dApp +class COcafApp : public OCC_App { - public: - COcafApp(); - ~COcafApp(); + + COcafApp(); // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COcafApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL - void OnFileOpen(); -// CasCade : + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(COcafApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + void OnFileOpen(); public: - // ========================================= - // ========================================= - Handle_TOcaf_Application GetApp() {return myApp;} + Handle_TOcaf_Application GetApp() {return myApp;} private : - Handle_TOcaf_Application myApp; - BOOL IsViewExisting(CDocument* pDoc,CRuntimeClass* pViewClass,CView*& pView); - CMultiDocTemplate* pDocTemplateForView3d; + BOOL IsViewExisting(CDocument* pDoc,CRuntimeClass* pViewClass,CView*& pView); -// End CasCade - DECLARE_MESSAGE_MAP() +private: + Handle_TOcaf_Application myApp; + CMultiDocTemplate* pDocTemplateForView3d; + + DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj b/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj index 5423ad4e52..586a366154 100644 --- a/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj +++ b/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj @@ -112,7 +112,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bin/Triangulation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -154,7 +154,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bin/Triangulation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -195,7 +195,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bind/Triangulation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -237,7 +237,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bind/Triangulation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/07_Triangulation/adm/win/vc11/Triangulation.vcxproj b/samples/mfc/standard/07_Triangulation/adm/win/vc11/Triangulation.vcxproj index 894a80ce67..4abf37fbca 100644 --- a/samples/mfc/standard/07_Triangulation/adm/win/vc11/Triangulation.vcxproj +++ b/samples/mfc/standard/07_Triangulation/adm/win/vc11/Triangulation.vcxproj @@ -116,7 +116,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bin/Triangulation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -158,7 +158,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bin/Triangulation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -199,7 +199,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bind/Triangulation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -241,7 +241,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKShapeSchema.lib;TKBO.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bind/Triangulation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/07_Triangulation/adm/win/vc8/Triangulation.vcproj b/samples/mfc/standard/07_Triangulation/adm/win/vc8/Triangulation.vcproj index 66980d8928..5818374e40 100644 --- a/samples/mfc/standard/07_Triangulation/adm/win/vc8/Triangulation.vcproj +++ b/samples/mfc/standard/07_Triangulation/adm/win/vc8/Triangulation.vcproj @@ -81,7 +81,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc8\bin/Triangulation.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc8\bin/Triangulation.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -274,7 +274,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc8\bind/Triangulation.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -371,7 +371,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc8\bind/Triangulation.exe" LinkIncremental="2" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/07_Triangulation/adm/win/vc9/Triangulation.vcproj b/samples/mfc/standard/07_Triangulation/adm/win/vc9/Triangulation.vcproj index b2a26090f9..646197c7f5 100644 --- a/samples/mfc/standard/07_Triangulation/adm/win/vc9/Triangulation.vcproj +++ b/samples/mfc/standard/07_Triangulation/adm/win/vc9/Triangulation.vcproj @@ -82,7 +82,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc9\bin/Triangulation.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc9\bin/Triangulation.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -273,7 +273,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc9\bind/Triangulation.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -369,7 +369,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBRep.lib TKIGES.lib TKShHealing.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKXSBase.lib TKShapeSchema.lib TKBO.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc9\bind/Triangulation.exe" LinkIncremental="2" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp b/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp index d765f72b66..8dcc321a79 100755 --- a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp +++ b/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp @@ -401,7 +401,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape) void Tesselate_Presentation::sample(const Standard_CString aFileName) { - CString initfile(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir()); + CString initfile(((OCC_App*) AfxGetApp())->GetInitDataDir()); initfile += "\\..\\..\\Data\\"; initfile += aFileName; diff --git a/samples/mfc/standard/07_Triangulation/src/TriangulationApp.cpp b/samples/mfc/standard/07_Triangulation/src/TriangulationApp.cpp index d7926da8e5..40af313f50 100755 --- a/samples/mfc/standard/07_Triangulation/src/TriangulationApp.cpp +++ b/samples/mfc/standard/07_Triangulation/src/TriangulationApp.cpp @@ -13,9 +13,9 @@ ///////////////////////////////////////////////////////////////////////////// // CTriangulationApp construction -CTriangulationApp::CTriangulationApp() +CTriangulationApp::CTriangulationApp() : OCC_App() { - SampleName = "TopologyTriangulation"; //for about dialog + SampleName = "TopologyTriangulation"; //for about dialog } ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/07_Triangulation/src/TriangulationApp.h b/samples/mfc/standard/07_Triangulation/src/TriangulationApp.h index 9e1fd361a5..2630b7da34 100755 --- a/samples/mfc/standard/07_Triangulation/src/TriangulationApp.h +++ b/samples/mfc/standard/07_Triangulation/src/TriangulationApp.h @@ -8,18 +8,20 @@ #pragma once #endif // _MSC_VER >= 1000 -#include <OCC_3dApp.h> +#include <OCC_App.h> -class CTriangulationApp : public OCC_3dApp +class CTriangulationApp : public OCC_App { public: - CTriangulationApp(); + + CTriangulationApp(); + // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CTriangulationApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CTriangulationApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL }; ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp b/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp index 7f6df42f77..88b8697ad1 100755 --- a/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp +++ b/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp @@ -407,39 +407,28 @@ void CTriangulationDoc::OnUpdateBUTTONPrev(CCmdUI* pCmdUI) void CTriangulationDoc::OnDumpView() { - // save current directory and restore it on exit - char aCurPath[MAX_PATH]; - ::GetCurrentDirectory(MAX_PATH, aCurPath); - - ::SetCurrentDirectory(myLastPath); - - CFileDialog *aDlg = new CFileDialog(false, "gif", "OCCView.gif", - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, "GIF Files (*.gif)|*.gif||", NULL); - - int result = aDlg->DoModal(); - if ( result == IDOK) + CFileDialog aDlg (false, "gif", "OCCView.gif", OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, + "GIF Files (*.GIF)|*.gif|" + "BMP Files (*.BMP)|*.bmp|" + "PNG Files (*.PNG)|*.png|" + "JPEG Files (*.JPEG)|*.jpeg|" + "PPM Files (*.PPM)|*.ppm|" + "TIFF Files (*.TIFF)|*.tiff|" + "TGA Files (*.TGA)|*.tga|" + "EXR Files (*.EXR)|*.exr||", NULL); + if (aDlg.DoModal() != IDOK) { - CString aFileName = aDlg->GetFileName(); - delete aDlg; - - POSITION pos = GetFirstViewPosition(); - while (pos != NULL) - { - OCC_3dView* pView = (OCC_3dView*) GetNextView(pos); - pView->UpdateWindow(); - } - - myViewer->InitActiveViews(); - Handle(V3d_View) aView = myViewer->ActiveView(); - char aStrFileName[MAX_PATH]; - strcpy_s(aStrFileName, aFileName); - aView->Dump(aStrFileName); + return; } - else - delete aDlg; - - ::GetCurrentDirectory(MAX_PATH, myLastPath); - ::SetCurrentDirectory(aCurPath); + + for (POSITION aPos = GetFirstViewPosition(); aPos != NULL;) + { + OCC_3dView* pView = (OCC_3dView* )GetNextView (aPos); + pView->UpdateWindow(); + } + myViewer->InitActiveViews(); + Handle(V3d_View) aView = myViewer->ActiveView(); + aView->Dump (aDlg.GetPathName()); } void CTriangulationDoc::Fit() diff --git a/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj b/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj index d257c1bfe4..cc4812c1b0 100644 --- a/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj +++ b/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj @@ -112,7 +112,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bin/HLR.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -154,7 +154,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bin/HLR.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -195,7 +195,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bind/HLR.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -237,7 +237,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bind/HLR.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -360,151 +360,15 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorRampColorMapDialog.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\FontPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\MarkPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\PropertiesSheet.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\TypePropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\WidthPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\src\BaseConstantes.h" /> - <ClInclude Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.h" /> - <ClInclude Include="..\..\..\src\Properties\colornewcolorrampcolormapDialog.h" /> - <ClInclude Include="..\..\..\src\Properties\ColorPropertyPage.h" /> - <ClInclude Include="..\..\..\src\Properties\FontPropertyPage.h" /> <ClInclude Include="..\..\..\src\HLRApp.h" /> <ClInclude Include="..\..\..\src\HLRDoc.h" /> <ClInclude Include="..\..\..\src\HLRView2D.h" /> - <ClInclude Include="..\..\..\src\Properties\MarkPropertyPage.h" /> - <ClInclude Include="..\..\..\src\Properties\PropertiesSheet.h" /> <ClInclude Include="..\..\..\res\resource.h" /> <ClInclude Include="..\..\..\src\SelectionDialog.h" /> <ClInclude Include="..\..\..\src\StdAfx.h" /> - <ClInclude Include="..\..\..\src\Properties\TypePropertyPage.h" /> - <ClInclude Include="..\..\..\src\Properties\WidthPropertyPage.h" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\res\axoviewd.bmp" /> diff --git a/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj.filters b/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj.filters index 139976d56b..d8f08c9e32 100644 --- a/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj.filters +++ b/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj.filters @@ -5,9 +5,6 @@ <UniqueIdentifier>{71b03503-46e1-4a70-bf46-9d403d37b35a}</UniqueIdentifier> <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions> </Filter> - <Filter Include="Source Files\Properties"> - <UniqueIdentifier>{21baab48-bf6d-4fc2-9378-bf7ce6dbfaca}</UniqueIdentifier> - </Filter> <Filter Include="Header Files"> <UniqueIdentifier>{22270cbf-7f10-4c26-8fc6-7f68842b776d}</UniqueIdentifier> <Extensions>h;hpp;hxx;hm;inl</Extensions> @@ -41,47 +38,11 @@ <ClCompile Include="..\..\..\..\Common\WINMAIN.CPP"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorRampColorMapDialog.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorPropertyPage.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\FontPropertyPage.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\MarkPropertyPage.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\PropertiesSheet.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\TypePropertyPage.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\WidthPropertyPage.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\src\BaseConstantes.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\colornewcolorrampcolormapDialog.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\ColorPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\FontPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\src\HLRApp.h"> <Filter>Header Files</Filter> </ClInclude> @@ -91,12 +52,6 @@ <ClInclude Include="..\..\..\src\HLRView2D.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\Properties\MarkPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\PropertiesSheet.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\res\resource.h"> <Filter>Header Files</Filter> </ClInclude> @@ -106,12 +61,6 @@ <ClInclude Include="..\..\..\src\StdAfx.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\Properties\TypePropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\WidthPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> </ItemGroup> <ItemGroup> <None Include="..\..\..\res\axoviewd.bmp"> diff --git a/samples/mfc/standard/08_HLR/adm/win/vc11/HLR.vcxproj b/samples/mfc/standard/08_HLR/adm/win/vc11/HLR.vcxproj index 0bf93f9d3d..fd5057c449 100644 --- a/samples/mfc/standard/08_HLR/adm/win/vc11/HLR.vcxproj +++ b/samples/mfc/standard/08_HLR/adm/win/vc11/HLR.vcxproj @@ -116,7 +116,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bin/HLR.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -158,7 +158,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bin/HLR.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -199,7 +199,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bind/HLR.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -241,7 +241,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bind/HLR.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -364,151 +364,15 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorRampColorMapDialog.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\FontPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\MarkPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\PropertiesSheet.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\TypePropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\WidthPropertyPage.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\src\BaseConstantes.h" /> - <ClInclude Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.h" /> - <ClInclude Include="..\..\..\src\Properties\colornewcolorrampcolormapDialog.h" /> - <ClInclude Include="..\..\..\src\Properties\ColorPropertyPage.h" /> - <ClInclude Include="..\..\..\src\Properties\FontPropertyPage.h" /> <ClInclude Include="..\..\..\src\HLRApp.h" /> <ClInclude Include="..\..\..\src\HLRDoc.h" /> <ClInclude Include="..\..\..\src\HLRView2D.h" /> - <ClInclude Include="..\..\..\src\Properties\MarkPropertyPage.h" /> - <ClInclude Include="..\..\..\src\Properties\PropertiesSheet.h" /> <ClInclude Include="..\..\..\res\resource.h" /> <ClInclude Include="..\..\..\src\SelectionDialog.h" /> <ClInclude Include="..\..\..\src\StdAfx.h" /> - <ClInclude Include="..\..\..\src\Properties\TypePropertyPage.h" /> - <ClInclude Include="..\..\..\src\Properties\WidthPropertyPage.h" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\res\axoviewd.bmp" /> diff --git a/samples/mfc/standard/08_HLR/adm/win/vc11/HLR.vcxproj.filters b/samples/mfc/standard/08_HLR/adm/win/vc11/HLR.vcxproj.filters index 139976d56b..d8f08c9e32 100644 --- a/samples/mfc/standard/08_HLR/adm/win/vc11/HLR.vcxproj.filters +++ b/samples/mfc/standard/08_HLR/adm/win/vc11/HLR.vcxproj.filters @@ -5,9 +5,6 @@ <UniqueIdentifier>{71b03503-46e1-4a70-bf46-9d403d37b35a}</UniqueIdentifier> <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions> </Filter> - <Filter Include="Source Files\Properties"> - <UniqueIdentifier>{21baab48-bf6d-4fc2-9378-bf7ce6dbfaca}</UniqueIdentifier> - </Filter> <Filter Include="Header Files"> <UniqueIdentifier>{22270cbf-7f10-4c26-8fc6-7f68842b776d}</UniqueIdentifier> <Extensions>h;hpp;hxx;hm;inl</Extensions> @@ -41,47 +38,11 @@ <ClCompile Include="..\..\..\..\Common\WINMAIN.CPP"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorNewColorRampColorMapDialog.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\ColorPropertyPage.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\FontPropertyPage.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\MarkPropertyPage.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\PropertiesSheet.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\TypePropertyPage.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> - <ClCompile Include="..\..\..\src\Properties\WidthPropertyPage.cpp"> - <Filter>Source Files\Properties</Filter> - </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\src\BaseConstantes.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\colornewcolorrampcolormapDialog.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\ColorPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\FontPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\src\HLRApp.h"> <Filter>Header Files</Filter> </ClInclude> @@ -91,12 +52,6 @@ <ClInclude Include="..\..\..\src\HLRView2D.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\Properties\MarkPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\PropertiesSheet.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\res\resource.h"> <Filter>Header Files</Filter> </ClInclude> @@ -106,12 +61,6 @@ <ClInclude Include="..\..\..\src\StdAfx.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\src\Properties\TypePropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\..\..\src\Properties\WidthPropertyPage.h"> - <Filter>Header Files</Filter> - </ClInclude> </ItemGroup> <ItemGroup> <None Include="..\..\..\res\axoviewd.bmp"> diff --git a/samples/mfc/standard/08_HLR/adm/win/vc8/HLR.vcproj b/samples/mfc/standard/08_HLR/adm/win/vc8/HLR.vcproj index 26d4654069..1dad57dca6 100644 --- a/samples/mfc/standard/08_HLR/adm/win/vc8/HLR.vcproj +++ b/samples/mfc/standard/08_HLR/adm/win/vc8/HLR.vcproj @@ -81,7 +81,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc8\bin/HLR.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc8\bin/HLR.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -274,7 +274,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc8\bind/HLR.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -371,7 +371,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc8\bind/HLR.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -734,378 +734,6 @@ /> </FileConfiguration> </File> - <Filter - Name="Properties" - > - <File - RelativePath="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\ColorNewColorRampColorMapDialog.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\ColorPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\FontPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\MarkPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\PropertiesSheet.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\TypePropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\WidthPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - </Filter> </Filter> <Filter Name="Header Files" @@ -1115,22 +743,6 @@ RelativePath="..\..\..\src\BaseConstantes.h" > </File> - <File - RelativePath="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\colornewcolorrampcolormapDialog.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\ColorPropertyPage.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\FontPropertyPage.h" - > - </File> <File RelativePath="..\..\..\src\HLRApp.h" > @@ -1143,14 +755,6 @@ RelativePath="..\..\..\src\HLRView2D.h" > </File> - <File - RelativePath="..\..\..\src\Properties\MarkPropertyPage.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\PropertiesSheet.h" - > - </File> <File RelativePath="..\..\..\res\resource.h" > @@ -1163,14 +767,6 @@ RelativePath="..\..\..\src\StdAfx.h" > </File> - <File - RelativePath="..\..\..\src\Properties\TypePropertyPage.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\WidthPropertyPage.h" - > - </File> </Filter> <Filter Name="Resource Files" diff --git a/samples/mfc/standard/08_HLR/adm/win/vc9/HLR.vcproj b/samples/mfc/standard/08_HLR/adm/win/vc9/HLR.vcproj index c93048139c..9e0b38ef2f 100644 --- a/samples/mfc/standard/08_HLR/adm/win/vc9/HLR.vcproj +++ b/samples/mfc/standard/08_HLR/adm/win/vc9/HLR.vcproj @@ -82,7 +82,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc9\bin/HLR.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc9\bin/HLR.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -273,7 +273,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win32\vc9\bind/HLR.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -369,7 +369,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib" OutputFile="../../../..\win64\vc9\bind/HLR.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -731,378 +731,6 @@ /> </FileConfiguration> </File> - <Filter - Name="Properties" - > - <File - RelativePath="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\ColorNewColorRampColorMapDialog.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\ColorPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\FontPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\MarkPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\PropertiesSheet.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\TypePropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\src\Properties\WidthPropertyPage.cpp" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - </Filter> </Filter> <Filter Name="Header Files" @@ -1112,22 +740,6 @@ RelativePath="..\..\..\src\BaseConstantes.h" > </File> - <File - RelativePath="..\..\..\src\Properties\ColorNewColorCubeColorMapDialog.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\colornewcolorrampcolormapDialog.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\ColorPropertyPage.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\FontPropertyPage.h" - > - </File> <File RelativePath="..\..\..\src\HLRApp.h" > @@ -1140,14 +752,6 @@ RelativePath="..\..\..\src\HLRView2D.h" > </File> - <File - RelativePath="..\..\..\src\Properties\MarkPropertyPage.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\PropertiesSheet.h" - > - </File> <File RelativePath="..\..\..\res\resource.h" > @@ -1160,14 +764,6 @@ RelativePath="..\..\..\src\StdAfx.h" > </File> - <File - RelativePath="..\..\..\src\Properties\TypePropertyPage.h" - > - </File> - <File - RelativePath="..\..\..\src\Properties\WidthPropertyPage.h" - > - </File> </Filter> <Filter Name="Resource Files" diff --git a/samples/mfc/standard/08_HLR/res/HLR.APS b/samples/mfc/standard/08_HLR/res/HLR.APS index d2aaccfd8579eb1db1d11d4dbad3bd99cd6fc26e..5df1266df4dea997a024cb097be08a00a2113532 100755 GIT binary patch delta 16300 zcmb_D33OCdmj4qV5W-IOkc~|gFjd*rMt@cPN{ZA*Rb?gkDM<*?kP1l<K_FnOh)T0O zMMOk6AUmjIFWRkuGkt8kk0P92?FI3)J<fF7Z7(yuIx=^8zv@@Q%wf(MIH~{tz4zUB z-+lMpci+AL|Mh6f)nAU>S)|^!t2n1FXQU$kU7D*Z?YFfB!fgSkvn{rK`9NELbX9M6 zM}OO@70cWD2ckXg(Z2S!(rTm58*1wVI9wO>Er<50ZQ^^OTvd7XSD}_*vD469o`_Ac zm6nz(S&Hg$IgOC6xqLc;DwJ$dbb6ZbA0Azihe#vfSfo26MkJ*9!$B>i`<*R{&2B4K z@)7MYKpw*zs0}E#veHszy4ZF&zotO4?N~lg+t<}@w8Z+lI=gxlTY0HXDI9`q4i9wn zBFe55i7SV5)nf6t!zF5o$Ul;=&JZ>5J5w|sDN<*NwMPon*<#O;5_OJv{m4x9CUNCR zL3A!Nbk^z4dZRhi(XQC4Ds9TmN#NSPjt&r@s?x69Vnwt_`Z8r+5;#s@uFMxpU(C99 zffd~<TU9EzGB~8UJONN@Rb`b@Y6001RIS)7pfUv2DE1_NW_MMkN}0IwVpemx72WLU zUef{1s_aTd5*&N1DpM-0z!n0QD^*rtD*-E%YT-MYS6;&?cQ|@~M>wJfjmWy*4h81V zuH1$wm!WyWJ}sh$JepUjswgj4ZWsHHW>3E(j!m)$pr};7BrYG#Q5TBe9L>wSGfro6 z0Y#LS!tCEAijU>0nz-Xwp6U?I$MUB;k=AfDL?Qvd-4%@X^mO%fDrI&Ym`m(BRw({> zY|4bjD5#*Hz!i#HTsl_bs7-2!hUSd+Ebr(hqAI0s7&-*@=<Vu}Y^oKHC_i4JE&^s5 zqWgGyMLo5U1|QOWfkqv9)l@283$NB#Y?apCt(3!fN)?|tb38lGKLp<d#*TQq5)fC9 z=Vk>hco-q!%9X`p@`>!)kOk-Ni}ef;wo(aO;NFfE46afl7O*3_{63<tRvJX_iLBg4 zD>61P5L<<4TdC3{4xPxzX||w49sM1|(`Hv%#QP_*b6PFfy6(OJi3tmR$?lUGwQUw; zB-Tr8E0v`dD0Wmu@G9l*WO!K_!r|8tZ6~Lz%f$MV`L{=j#_jRyhQ}8Sgdzr-A`sd@ zZTAdAdTRABA<LBI;xce)7oVNXS35-dseE;Xn0qQex04#l`Ev%mfe<vXgVC)N#;IJj zORNXdd%?eDh|{Oi)%)n~;;HeX@N{OnGY|~w)WBvJ+UczH+JM)E?QLaB4^Wn<G5F0C zEvLt;y>z$n^my_9>8x=cZ=-BjC4PT8J3XT7UTRpa^ovWUi`4=6%@kwKOjXz5UAh+W z_>sVFQ|?C@Cj0b==JmAd)Sun1tVO6;cV?ovd?r&II5S>dM|7IE!RPUN8hq5cLRn9A zpPZSfK1g@zXD6x~@GgCk=F*9%TG@zzi7wr(HFzTgt5G(I=-C<hgQzdw4`99XiUxwR z(i&y6ICwTUZ;PT9;|7Gkzq}^5qT{eB%~V9?_X}Qq`{m;!)lbCgujPr}?~f5reXV)+ zjcrn5)Yq5YAnB`{zJ6=UjncmT`l=B(O6z@NyLzLve|&T64b$#EzxIY{OWwNkhH2OT zbKMQo{_J0FzhOPx`t}cQl&{EtXWfme?Cd*%8)f@y=J(!I2d}DVR|@#;CdC2QYu9cC zh@zBEN`yh}us^ja0q~9Z>xBPpN=#V}{|Df%Ux_NKlwPG<>45t-xL*Mngbx6wM`?%O zKKN~eExKAUpeL^qf~P*D7k9ptGv7u0UGRKAw28t0ZsOEPJk~(lE`YTujnH$o*zr=$ z|FOljmul+&AIBj2Uk-OE%JvaMH8(%5IY80Bh~5ld$LVbVzhF}o>!UsSu}o3y<q$5| zVS{vq44>xlyF(g;hr<8$toap+t+EslF2e<}L7>)f<Bo+;n-$vB)jqIN5#M^VKrA_5 zFo^gHE1m)lgjQOizG&Zl$P1z%>>=FI4Lf#MtjE<A?T&Rq$TVCiyAlZm8$EiH3&b|> z-In_XxF1v;0SGUANQcjsM<PvNiHlcvN8+UB0}+}JL>BVY)+OlTPed4hBFaH`DBw?! z#-E5Z{zRk>%~>Ds+k9XlC5Fhf=0KcE-V>3$2byw=vIfm51YjA?Q^+WDMOuPj3YB0D zjbQ_Ju&^iKH-Inz;be^hKM-x=ZzcZ1Ji)KMw4#)($=^EE;uZ|ExF3#yur92_nL!(j zz*Y=lu>xHO>M<Hlfrl~hHx~ZVhY0`#Dj;Slh87HisD=~N7Yca8Xu8P6srj9-$wCZ0 zBF@O;(i{*)C}jY_A?lG(3upl!23?+7e;}k|^o+O`2qhq9##?^?17*B(dIMn{`~p4H z>E0k{0q!+-vw^#$7j{TTpc%thE7)15`D^j$1TrUx9ic!|7=i)}WdJ;g8V?474MD{Q z8mAttD+|q<R5B89GvIGF4#2R>IkJ-=)>(r|q>;~*v<8JydNYMl9-oF1l|k32#hEyM z=swoFrq}KQcw7K`yR**Yb@A%9l}SB-Z6w2`N?ZnnjBC0F<YKgyOGUe=^RU*aJHu|5 z15R?RbXdSB6(Z(SWM?av>X*WlfiQ4xklKhi@X!H}8u3MF281RoI&gu=zPq~vgZF4p z=bG+lS6_!>14E>SCfeE6w>*xcxftrB&~Fjf(V*P8`(j6h-ivUl5|=@~%^B;C^}!l} zg@EFW5*OagNwZaghs4J*V%hneS+>e@ejICMOa2Xg9#N)=^WltHbUTiyhI%&ic!W+D z+C6!yB0h{37J;Rk#up5E{1L+yaQe{^V@L~w7n`3bNWtr&C-Ufe{)yZ{sT7KSeR{Y~ zsi+_m#H0Fh98O33s*e7Z0G6|4_}pOmPVn=7k6RB%(7=-{+zo3l7z%*tUI&5lz@*{H zj(QgPho=|7ohdjr4o6zR43LN<5wGmZYO|0);OVK?0}a%(6e=l6VWDmCyY!IP<HrRD zxeDqsIeh^jacx(Ys*2x-^Whi@|L4Y~A*~n=FL+W|h{?lbTvMGV0?g%d7K?Xhk!J7P zopZZI43kd-k&?{jfEm@Id%b}s<U>M=^SgP5ez7~-I&>zk4QY^4v6a#~OXlOnEylzr zxg&1s(n9qiI5yazIch^J7Sl=K)gqs+I|ZA_E28j@VFSR{&KAv&%}LIr&UwzIzY^(B z<$_MfN3w2K(B-1znFFS5G<p24K$GFun{YYXDqtPO@nT^lF93w9a#MT?kSiInO<J+p zXVBw}G=Pf+IGKqFXIF|~@;74jQ&VYVcO1?xf)V|187ft@M)I<0!x);ULR~#^I2R`s zojW?0;hCzTNK2*)+h0ALO_KcMa1mV#j^xtyc6n_+!n$8~gy&)}<giq6Ig%-!jHIQK zUPdY6qi;+TXCi5+Q1CD$4Y?g(wAYAe=uY84m>@2gB2z`>cIk$QM@c%+Nk>G0g2|jS zDz{4?B%%K3st)7{`#E<gg0IcM##I(Tq4;jYxVVJD*9tRCW)K)8<P`5-D2AqG(sw}* zQ5ej--<XO(=}-wc2LXvuAk~jrC!|3_z!U;O|MeO*OpHRkFmDnxgaM#Qje@_iicl}) ziv_QbM~;axVDlYKV?+xh5@TUR?r82uoN8LYw_}B^xo{$7@ya3CB{ab%o9Zo>@*;F@ zqEUu$UYI-%_Bhk)i*3zwSXCh0hv$nBCj}cT)Rt_~b8Za6q)cM~Hiy~aZMN8PE)~&I zu?Wi&XV0Yp3}Y=+Hp4ER8;dY0E5W9qGmkz1(+NJ_Lh3s|2GmnwZc~cb^hVBH07#K> zk8>Kd@g<C`LYhgcA`0Ftz~*ug09g2DA$BcCkSbQU&gKyV?(;Wr#1&HfRPk2pY#trn zW{59Zv(3lgl4)YzlC%;M6!%~!ogES)nEUEz5nOT$x5C>Z@%)lB%j2YQ*LpNz3`tQv zL^CDa9fflUK&6zU74e5}<%xo}(c{Q^kU<*4riz8%oG=jxL1Z*5LWn@yEVGN}+j7Ou zwsDEanTgvxaivWzUFu+#n6z}1iOyPDz=KPp!C?rH7#xPtC~cYuER}=9+al4sWX#yA zY7=>4sZ?K@xV%(~lqO2=o+i@oma4-D0=8>7DkZpA%lRJ%r1MxFye$&3rDMic%Xw$W zsk_sy1Ro?nf;83DQia@6FxI_J>+XzU$Ylm8B!LN(7MTvGy(1-s(q}gIuZ;Hf>g}D7 zY=wr>6oKX{r1Mp=*vPtz)R9iC8v9qpVgoDV<kA);GTgBiGQx4BRAjo?Z{%^9DCs=? zv0$_h{M$fZ*K+Dss+IAsuKwQc=sH)&iYP>}D3vr?Mmu5;G<J2Y1vn%`Y0q#Pb;)u; zCeR{u9mpkSFPp$i0fzR<w=)KzwJ9HstZtZ4kRy#VF={&o!YiYYdxv&O!eWia@H?P2 z4#buuX*dE2M5p1uM`G=XX&D5|aP>vk)^)YFcl2Pc8(Kq}G0|f~Z+mp01J3~!=Ds4; z)6v<{)6oaWc3-TW+9eGalD<+ua2$#AgYFu9z822jE4IN3b2BiNiaBW6&fF3hg(+<l zA+47Yp{~xAaZHj3nC>>4NSo#+lr~4qOc)mK7r4?Gr9BWco0t<Litj1Fx)?5_p+zHU zz7lL!W#9migh&*PlEHC$3JHbrVn%loL85FV!Pc^o6$F_MEE`!tWeAc7K~wHlvqLyO z0Ij(CVn(ZMBS(-Z93{hL;V21c7LJmDX5k2cB5*XPQX;QcIwI6{N=MlAz|qW_1b%q& zNaC=V2&ec4^Q6roy7=wU9P?mfDNKQq;6y?P4>MSVfXU1iD5VdSLGqt<2zi8{x5e;7 zOio~VT7l@b6>}^Ml;>Fl`XO7!K=YJT3Q#xX-r+<=94zs&3!`7mrntPdP(-VO^@c<4 zd6Lf#k3Gp@;E5;mssYZTLP~=Y2Oh|5P@5!v0EC1Lq%wdR9gxN6Pv+fbX^idxjzRTd zBC#AC_{=S1W^7ItBNlJxpt*B<A%&>hwx%FY*zv~WHT8I}z>(fBc2NEs0*4OCH@ zKzy`4lQ{i-doE6_IRSOypw|;|Xd&QJQ=N2<Y)nG2j(lIqv9<=gaMt@Fb3(0YK1{}p z(!))J;`Q~yS2FW0eG^F&w`Hwe{z~?A3jr4N%A4S@g|d;-#P@dcdFj_Xd6LHM;#ghV zF?AeuRl{`foQBP6SfAPsKF=9DION|TpZD#^wVv;MfrhYd1U0{ba)Y%dDb|7|q{Rea ze@`@p5kXTP(IhEvsk{c|wO3wu?qtEv?#!X-xp`M!;yCVs3L6**C3DMccAjRj^{MG4 zaV5D7JfH<3fn?y(9m=2f3f92ePZcK2*8%SXH0YE;EVGwEfB_6FMO=5+09Ht`hRcp= z;V~Ac^_a|1{15fsWHz<kv3sob;Gx~%i7lxvJft~Rgdr^yjCJ)4aOoJ7=uDDySk-tq zi=kCxpb(YE`N-FDybz+9)6x7H6iZ_I?q*cP^=infxE3v%PWz4=eR3rk`Mz{KlO3If zB2i1W%7$%&eUKE#GPCKqcpFX>n5_)}3i>2+GPL+~S!>SF0CJVGb4$_L%E(f5wt{Kf zCiZfZl3X0tGIUad7?+<-U(CXXCRpmyKrSwyNLGopGHqoC8$I^UiH!Id5~XS@t+iA= z1RgI{Go13OV#P^zpBql*8fH$FJ?(W$*OrE|u5Bq@TaYqa%SltLdb3me!^zxK*@u{L zirvdCr*hHJB@BzQKQLS~6Bs?ksfZ1-fqHr>mbl3U;5`(%&HG8#LN{$x>S^|UKsYG~ zJDDtIvpCqg`Sb*{wb)>}KX^LMbs}VV<5h1ERX{s{1t3$0C3N<h$Sd{CG?UlFu%!?# z+e{r=3YTy!hMVoMAa34I9a<7M>7giY(g-MvoA(neg>gwbIk_~B(B)@~Ia;}XaU4i6 zb_@qS{-nCO%)#B+$<A&`C;Q@coxJHj*Exg4c&n55n5&(|n3IE9B`bp<0zwO&(vnyn zL1%)s0Lb4<ia=2JGYRjWwv`zLL(CDg?M%YivSlkd2wA_9wrP_S=aa*F1S%5LC+#jt zScdav|K3WL_|uisn=BGH1YPis5EE)>N+tu80^+b>i=l-X?MOoFeizmiy^M1rPAuzU zt!?O{RIAC#7iu8&*oc-jJQQbV94qCL<n!tE`BX5ixs{OS%|0p_NA6MFbuY`)c5jY# zmQ30jrlq}cs5~GgDpgwjEBEpuz9_H1xi^=Cbe?vTA-rfqja*hu#gS5M{kljgx1026 z+?Or45IRFTy*dPA$T=PhC*X$W<vHMx6~@6hm^p4D&pi?hDSBdLZZ|{>L9vU$rcU)~ zcz6wJ;1U?Y3Qg-~J<REzE}a>*59vW&lZ-jiSk^6Vwma9uMn!~>`wuWb)0kv?6HIml zV@RZ=i5yO(XkWkR&go1n7D?mO!cKfs28U&-m&JKR@a?3!K&X`|VBmPNq!lSS5CsM6 z#DksY;#E}P09oMN!3P>*P!6IDTiQsXH+xtGkc*_kUVPzW*bP-#m)^`AxP<cZs!XU7 z;d&!{L)hc5WjqV;(W<PB1fDS*K#uRpTErMU<6vycqc`hm5dZ0o7O=THy8|J3m5+l$ z94QpjP^&#XIR>)}fTn0d_*?=sa&rP9<2dtRLs-+e5?DGC8FVHh3ie_D+EXAc8Yw~7 z4p=!Ms8k^hdjviuknB+6H@K7wXnZA=rfi%%p~Ol24L*!=kw=;J44EL{BOqWwPI!w# zY>BZue<8-s@LY_K4p(BleXd%OjYl*XE=-rlsX@)#a6<hWyQnhjV-_4pz$l*5^DF2m zl+--XNK3bhLxUt#NOy8;UR;yqo^vghRhMi)_?iI3{aU0UY~Z;Jq^U+}F!vd^G9n7; zaXed*zn4ec-J8?JBO^Mm7OK_FNvgJ)7Q#5Fl2aFuM6)z;!3%C4DBok}kVUg#u$af2 zP&If!K#1S<X5yg@MhjyMgmCYZlU*az0llj;E0QSWab2(B(ov!*8Z&lUBa25DS6fbu zVI%CMcRYc>%@ee{kA2j1dA+TV=engYKXFdQc5w@H^TCV_5HTUBq2j9s$dr{J&i3WD zfV?J+53B?0?o2{n+eEqaaJ}Yq>fvwzUS2>JF4|a4JVpSxWdX`9tFfZEpJTr}`YB0b zk~a7wkRyQFAd!;JO%!g=$OU(3Mw8}EG%C%yil8SlG85n6#{wS5B;1@_3!udh`X^I} z^KbnnbR9o1hptrv{M<Ic=cd5{UNZ*=W+m#XVOV=m<_`GrEe2wY{xYFA2qxu{b(f-_ zRFvIoc&Er+!_!o=h9j*d^14yN_pf0?{-%8XKtBIvO(A*~b717Y(7#aU)zpQF)0`1c zBSbsoe;7{|ZsIwe18<4=F`MKrtxnRo))2wH3&2U5hMN1F26)4oFiARwmx5X;*n=kQ zxZk)xr_CZOg;+k_-@uJ&=QL&ExXegkDf~9E)KUvu&}3r5wzjy?(gAKs78=@I#p<;M z4hszi>l8up?!cl@jAC}?@_@6Zt%H#qqg-CguJaFTi<9*4bD&uz$ZL{ROc4btSm*a* zP-`_w`fTvmLyFH&c?rTM=`<8^CoyNe?s|Z2<E00RW?P2l@i)RNx$v3@%z4BEFI^Bn zKF9p$12f60^VhL8-?@&hyIo$ltz(wcH)o6U>-ZFQaUEOyXX|EB+pP6`y>orhta!IU z2%3Fh6rcofmskylUTsjP01EN&dOkj!T+cr0JL_4ApR8x2ANwF*Z+S2$F-Jkz%0rNY zf-gMC%%IYrSW+eu-z|a9J7_m_+oaQa^g$lni3f{G;P)OZDY6L4Y#l8W<3S@<=EMyw z+q?}tTA#f3Nca;Qa)&dKhX`Q8M)uncS>op#_{jO&4Kot65+t>NiMTxBdc)m7!7Dgf z-asoi@+>Ub$a>nck!NYk#%yt6BcB*AZDdFB*~YmvsJu<A!<~Z}BDjfX%GkuSw{a8u z)xDDDwN0#$pULYN5?(OKaBYzLUopr&Z|7ifx<z5N;-kULQ9Qz*46;r?A7nL6-^?uT z+HA2w4ExvyeOl0Cxa4SSXadDuo2Q9=o6{4^2b6=ssvnQsXf>L}cS>BX?uRcrFm3>J zk{!sV7~esd%><UUC)+zTNDpce%zy&}4$fw6;ZZM=*Vq;wn%Kg#@cI_k@CWkxw=Fya z*$?F}wP=R~fY*@fIgkbRq$zeIvU{BM_@rxePD;Y-0XIuV9!TtZh!1dQ9^xL~eTXIb z^dVOI_%HKy!Iv5Cm)9N%-|^*H3GKqp&LI?KMPdAQK3151E)ocMBOVYGlct2W=r?RM z_#s|$$($;oE!qWF421<t)A-gQ${uFfLl56f_B!}5dyQic&$TX#@M5pw@p|=I%?pWR zI?uT6)f^fASvH;V2sf>NgqKC%BeRL+bC0m?os;liJ;F<4@}u14!bf=`+vWA~M|pzJ zK01%u|Kd^RH*)LE7$ui(y@kMcZ!MW&nO~F;-ib8adc;ZgV~4M5051-2W&3$&>rK?| zPg_grI{Pv1*83Rq^FEe4PxosM8PV8lEcOvLT)J0}aI9mmA<GaK9^-L*`WUNl+%{%t z+g50GxGpUKVX@1BF+0Bdij(8uKy=ME*4Xpg*r|PU8*}<#8*A+IZ7h26;{`M0Lk$~s zkw_4hp=B-ET|Cz1kF)BwKF%sTE3ZF%oEiQ7@e;R%Q9Khbw>6Yax1LqPuwB4ME-?CV zJ-h|Yc$Qs%npxiaG|RgEX*TjR^7`J>Z2Z4_nm3I@d$PvU;Q)G|<FzQ?!z~Z($rP*h zuxs3~hq)fw!vlC{4|Dl<Nt^x*_cHGp=IWQvJ<o7EA+N7V{7;{uIoZ88E7vk^2Yz^i zW3|b^WG|PR7VWic9<U%aUl3=VDs@22)BgV6OtEh-i;MT?_p;}Ie=kqwU-q(yS<kYF zHP7;-Hb2WlS@$dtd%uK#>sj_9KYq42QAi2XVl{$6JaoHtJIk55kDJ!);|-)~A6wkU zeI-WH@IvqsBfS)9V4}#a<J-K6C=^~|j^i=w1^6UqK?h(ARSCx-viM>j52xt4!rC}5 z*x&i3I(S_=;thbyL~hm)G){s33y*b7!JgyM=h$3NJ~zv{Y3l}*(L!!~zY*E-Mj}3Y zj`ccmKP$n$pQpTOKQno7|16h9FmQ#iTfr)cZ#cR}xkl5Y>$obB#`I^p#@V5dCBre# z^N4SLp0&K|`Kb$lV=Zq_dh-6EQ^;U$9`Lm*`JP?R7bnXkyQKFMX>69m86;^8&=N#v zEhrYAW!<`ivmk$#GUOlNL2C!tnC>~iM)$aUK6QY7?hhp0-wv?sg)cC?@P(WVEd;NF znh781fo<#l7uXvgeu35bofmGJlcY|_<$^Zh3pSr8B0Zt*;EgczAh&fM<hGp$S;{95 zvdjI(L7uXo9%QNiagbMc$sxXa4$Z>8DCJGBo+$IdU`N3Vd83qZ@cvXP{U4*GDCw`P z{-sBKTQn^C?yHgdeD&2HZ|i8^r>R3f7BD|b!8fq@-)(S#j}|N+|3HuQFY)nDYMY`Q z5$}bvCP<WmpQ2rA!%xvhf0C&v`=g@u`vrqnq3Q7lth|PQNQ9rvoL+CG8UD!(e&n!h zqm^d(M-Jmal#hQ5AJ8be(hR>I#V>AGCyIsdW{#No6R|+e-}R#@qwfNV_Ttlm(Nmzo zUq2A%-Ypn0@2BDlTn0WAU%=(~$D-i9f)PLYL@b2M!@m}H!{y+oViR1de=iQe<+VSF zb8vb2@8SwxJ{MoSw_wD|FT{e23sQ;{RTvlNr~Dl1kvlHhQud~(;?{Zd#qTeUOo@!b z`y4Up{p^(VRG_nEh`Zqa+hg#4F41gAWB5UUSEsAu{c>*mALCW=+55JXmnR}DOWa+Z zN%Y;5Rq@uVS)%7sZpuwl@jg#1a8DuJ$I}=$uWXFCa%oD+{!CRI`f7&o-Z_os$>!(H zUmYp#xI8T-Jr|#I#0AGB!hbstWN}HkrmG^$&G+SnAVclkIsXJY{CSZIUx<x_zs>NZ zD7}-$f-&&Fw?W-67pr2)qMSK5rGV-o61jG568y1Il`09^9%yoPwkpmCa#AM&x_6E$ j0>PZrg#bTzlPU%m=cFz|wsTeSA>6maZ8zN4hjRWKVj?c- delta 2977 zcmbtWeQaA-6+hR{4b9qQq2$APaov1$?V2{pd;W;irc3>q*sT*g&o7BT9(CNrv}qID zIBuJCYrB8e6eLEvJ9zv7QxpbNVhckN8b}Q7KQu9oAWeMzF)CV#F;$~zAXTU$oOkW4 zFG90~u=U>go!{@C^N#O5?_S@zYkc^9Zn>3o-D+!gRvV%GdH+`cmyanv|F{x$4@W}& zsFItSQicb;ifBy*LXuL*%qwWS3sbQE`tR-r$s_ev8+qp-z&F7QX_#mCX~;k;M4$jU z$RjR55oXZNzj>;i942orbdXrpjz1>>_N#k4NfR;r_&f0k^(X79L9_}EXa+*>zhEXj z9UZObTF^UwgSVK01byC=l$k0H6=tSW@myi%>`WF!yCA||x-!ah794u(hKbvU_O%<W zTr1jN-{846wD-}rqpe=Da2;qnm(1LLw85oT?kTik+Rhz7yG+fdgQZ7#1AgzRR7}cD zgXruP;c5DJ$z(dD7vp8o2A#AmYPx=So9LOnn9)KVa7521%0a!*RiY)gFBlfJkxuB= zQC5xWgB~4a)2O2$Y|A%P$YgLLoX&s%;x?sRfl~ylo{w$uR<Ld3wIZB0u)ieNH#+o6 zf+-H@rJZt%*;$eXqv=bTsO*oV<i&gjY=U5gKAM)ButHocU&<Yf4!dQ)6m*9~a60S` zIQFR^OYV_q#4Y(pym3wIg?_pwH#?7)a=Sg@G1(K2rR1O-@`ES{xXjOd8oiYkr-&&7 z^xra1PSEDDmSZk$RLV0Z%i$5LFOkd5MGCpIV6!@%R&Z|<Bk62*CR@^M;Gx;EeZ)&& z9J3G~eSNH*_~{1XLHhaehMLe!HZ#w%^uZ7^?Ib|$<853JyQXWUiJYYQ@n-uemOtz{ z>G#ShzvPbk!OkiS=^m`rG=aUVDOMP!Z;kU!BRU<+VwxSo^y6_87r{qtt~8KQx^JS< zB<V(a(o+}M&_0OL;fbbztQT{|Vs1{8MFGZif|M&VR)ldqo0-p)cq>fM*CtFuF`XKi zEreNBq8;Ko-o21xxg3ztv2rfY*j`9t?PRrqD6}os#C;JxakYgzjW)c>b1Ag>Rh~@J zTQM_9)3w-Ma)!Q(c#8ftW_C`qoP)uTKjn`_!jhZ{4*8>)S`?hPr)UdZo@;M76qZo1 zVxN489*^^uvwC?VDES8^_pr7cR>216s5{v}zY^a~W*GWmyoQ`-=siRi82a0Hcad3! z>RzoOa~gUw5^`h5vj>R|$TBsas3kdut|n?oo}rb*Zt`V@-hOpADKK;|QBUR>s!i@D zMTUfA9l3~TKe@#GXOlJ5m29N1Aitn7bzx65=nJ|>w8E{uu!tm2KTbYDuCRbwWfyst zp&q4{JVytV4)ay*mwQuwUr@$Zu=J*3xJ@_;*XUJ+H(dwPrfvJ${qE-032>!~t|`3N zQ1&;=pK9Y}d~X%-fgk%tfhfL2!??kR(2t^@gDLzf$PMBFpx_o{rJpPuaz2jtmE$vT z31l3fgIPQ*6wDUI!{H)K;{lPwElR+zgZ^moAk8oC`9I>1_CJ31|6aT8N_2fgxozYC z2IykCg&62J(y8XpJR2#0X7aPu^_4R{Tm|``nK?rR`R2K=kqUDE`K3zohZinal3$oR zQAz$N8>l45^8J-6|5@Sv3ej}ExLDzLNf*Nvg4cg}=`CV_=hfdFB2B#lR2#Q?whMdL zhgSe5z=L*kla#yp@gJRC$lM0?^kHIF_Z%jTh7Zfmpynt<Q>=!c8|Vjr;13+w0q_8` zZ*K0uYn3Gv>K-TCgL>ain)nl6Rf`QXTSH&G$5(w7BfecnfAJT->R(tu;0yHpNBn^W z95CImmFs)|m1`39M<!}{z*qgY3g9_2edQDW$qh_U?9ieNcs;LP?;;I`;#2g2Vp7+7 zu;L>J5!b7K>?XY7-qQ@97Z9&>s%wOFtIJ))Xi$!54zIq^MN9@$cgb<>AoV4Aqldaq z^Xj{V)Rl;vA`*@28#}i~xNM9#_e7cC9@#<tdN&cdpY}4)q<&CC8d)?~>?>2XJy?iv zj4r3lYF5Bv@Ao4%m5ROn48!l$m%|K`C+NT=uioh)^#+q0aii)oZ56QL(FpqXq)~MV zIN+v_-kCI&vbqKlm#5(25W|*znDvf8j2$aMZSsuT<gqEw>z414Hn}H3{hUbl8kR%q zwGNykmq?7<@57)DA<LbMfO=K~-x>vVNdpfN`~X4ww4`OO!ppEzORaAV?GNsKNwstm gOXn3_&3~-vyYd}YiPpIc;BBB0;N_ptYiY}W0I$s>ZU6uP diff --git a/samples/mfc/standard/08_HLR/res/HLR.rc b/samples/mfc/standard/08_HLR/res/HLR.rc index cab6518960..8bd001084a 100755 --- a/samples/mfc/standard/08_HLR/res/HLR.rc +++ b/samples/mfc/standard/08_HLR/res/HLR.rc @@ -1,4 +1,4 @@ -//Microsoft Developer Studio generated resource script. +// Microsoft Visual C++ generated resource script. // #include "resource.h" @@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "#include ""..\\..\\Common\\res\\OCC_Resource.h""\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" @@ -62,7 +62,7 @@ END // Toolbar // -IDR_MAINFRAME TOOLBAR DISCARDABLE 16, 15 +IDR_MAINFRAME TOOLBAR 16, 15 BEGIN BUTTON ID_FILE_NEW SEPARATOR @@ -77,125 +77,92 @@ END // Dialog // -IDD_DIALOG_Color DIALOG DISCARDABLE 0, 0, 281, 186 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +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 "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 + 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 + 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 + 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 + 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_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +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 + 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 "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 "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 "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 + 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 + 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 DISCARDABLE 0, 0, 281, 167 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +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 + 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 + 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 + PUSHBUTTON "Update Current",IDC_WidthMap_BUTTON_UpdateCurrentEntry,200,110,55,15 END -IDD_DIALOG_NewColorCube DIALOG DISCARDABLE 0, 0, 207, 156 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +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 @@ -206,164 +173,113 @@ BEGIN 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 + 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 + 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 + EDITTEXT IDC_NewColorCube_EDIT_redmult,80,50,50,12,ES_AUTOHSCROLL | ES_NUMBER END -IDD_DIALOG_NewColorRamp DIALOG DISCARDABLE 0, 0, 252, 121 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +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 + 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 + 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_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Type Map" -FONT 8, "MS Sans Serif" +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 + 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 "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 "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 "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 + 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_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +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 "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 + 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 "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 "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 "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 + LTEXT "To be updated...",IDC_MarkMap_STATIC_CurrentEntryValue,62,90,217,10 END IDD_SelectionDialog DIALOGEX 0, 0, 232, 183 -STYLE DS_MODALFRAME | WS_CAPTION +STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION CAPTION "Choose Shapes and Projector" FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN - CONTROL "2",IDC_DUMMYBUTTON,"Button",BS_OWNERDRAW | WS_DISABLED | - WS_TABSTOP,110,60,100,80,WS_EX_TRANSPARENT - CONTROL "Default",IDC_DisplayDefault,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,17,0,70,10 - CONTROL "sharp Edges",IDC_VsharpEdges,"Button", - BS_AUTORADIOBUTTON,20,20,70,10 - CONTROL "smooth Edges",IDC_VsmoothEdges,"Button", - BS_AUTORADIOBUTTON,20,30,70,10 - CONTROL "Sewing Edges",IDC_VSewingEdges,"Button", - BS_AUTORADIOBUTTON,20,40,70,10 - CONTROL "Apparent Contour",IDC_VApparentContour,"Button", - BS_AUTORADIOBUTTON,20,50,70,10 - CONTROL "Iso parametrics",IDC_VIsoParametrics,"Button", - BS_AUTORADIOBUTTON,20,60,70,10 - CONTROL "sharp Edges",IDC_HsharpEdges,"Button", - BS_AUTORADIOBUTTON,20,99,70,10 - CONTROL "smooth Edges",IDC_HsmoothEdges,"Button", - BS_AUTORADIOBUTTON,20,109,70,10 - CONTROL "Sewing Edges",IDC_HSewingEdges,"Button", - BS_AUTORADIOBUTTON,20,119,70,10 - CONTROL "Apparent Contour",IDC_HApparentContour,"Button", - BS_AUTORADIOBUTTON,20,129,70,10 - CONTROL "Iso parametrics",IDC_HIsoParametrics,"Button", - BS_AUTORADIOBUTTON,20,139,70,10 - CONTROL "Draw Hidden line",IDC_DrawHiddenLine,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,10,80,70,10 - CONTROL "Poly Algo",IDC_PolyAlgo,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,10,157,50,10 + CONTROL "2",IDC_DUMMYBUTTON,"Button",BS_OWNERDRAW | WS_DISABLED | WS_TABSTOP,110,60,100,80,WS_EX_TRANSPARENT + CONTROL "Default",IDC_DisplayDefault,"Button",BS_AUTORADIOBUTTON | WS_GROUP,17,0,70,10 + CONTROL "sharp Edges",IDC_VsharpEdges,"Button",BS_AUTORADIOBUTTON,20,20,70,10 + CONTROL "smooth Edges",IDC_VsmoothEdges,"Button",BS_AUTORADIOBUTTON,20,30,70,10 + CONTROL "Sewing Edges",IDC_VSewingEdges,"Button",BS_AUTORADIOBUTTON,20,40,70,10 + CONTROL "Apparent Contour",IDC_VApparentContour,"Button",BS_AUTORADIOBUTTON,20,50,70,10 + CONTROL "Iso parametrics",IDC_VIsoParametrics,"Button",BS_AUTORADIOBUTTON,20,60,70,10 + CONTROL "sharp Edges",IDC_HsharpEdges,"Button",BS_AUTORADIOBUTTON,20,99,70,10 + CONTROL "smooth Edges",IDC_HsmoothEdges,"Button",BS_AUTORADIOBUTTON,20,109,70,10 + CONTROL "Sewing Edges",IDC_HSewingEdges,"Button",BS_AUTORADIOBUTTON,20,119,70,10 + CONTROL "Apparent Contour",IDC_HApparentContour,"Button",BS_AUTORADIOBUTTON,20,129,70,10 + CONTROL "Iso parametrics",IDC_HIsoParametrics,"Button",BS_AUTORADIOBUTTON,20,139,70,10 + CONTROL "Draw Hidden line",IDC_DrawHiddenLine,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,80,70,10 + CONTROL "Poly Algo",IDC_PolyAlgo,"Button",BS_AUTORADIOBUTTON | WS_GROUP,10,157,50,10 CONTROL "Algo",IDC_Algo,"Button",BS_AUTORADIOBUTTON,10,167,50,10 - CONTROL "TOPVIEW",IDC_TopView,"Button",BS_OWNERDRAW | WS_TABSTOP, - 106,40,13,14 - CONTROL "BOTTOMVIEW",IDC_BottomView,"Button",BS_OWNERDRAW | - WS_TABSTOP,121,40,13,14 - CONTROL "LEFTVIEW",IDC_LeftView,"Button",BS_OWNERDRAW | - WS_TABSTOP,137,40,13,14 - CONTROL "RIGHTVIEW",IDC_RightView,"Button",BS_OWNERDRAW | - WS_TABSTOP,153,40,13,14 - CONTROL "FRONTVIEW",IDC_FrontView,"Button",BS_OWNERDRAW | - WS_TABSTOP,169,40,13,14 - CONTROL "BACKVIEW",IDC_BackView,"Button",BS_OWNERDRAW | - WS_TABSTOP,185,40,13,14 - CONTROL "AXOVIEW",IDC_AxoView,"Button",BS_OWNERDRAW | WS_TABSTOP, - 201,40,13,14 + CONTROL "TOPVIEW",IDC_TopView,"Button",BS_OWNERDRAW | WS_TABSTOP,106,40,13,14 + CONTROL "BOTTOMVIEW",IDC_BottomView,"Button",BS_OWNERDRAW | WS_TABSTOP,121,40,13,14 + CONTROL "LEFTVIEW",IDC_LeftView,"Button",BS_OWNERDRAW | WS_TABSTOP,137,40,13,14 + CONTROL "RIGHTVIEW",IDC_RightView,"Button",BS_OWNERDRAW | WS_TABSTOP,153,40,13,14 + CONTROL "FRONTVIEW",IDC_FrontView,"Button",BS_OWNERDRAW | WS_TABSTOP,169,40,13,14 + CONTROL "BACKVIEW",IDC_BackView,"Button",BS_OWNERDRAW | WS_TABSTOP,185,40,13,14 + CONTROL "AXOVIEW",IDC_AxoView,"Button",BS_OWNERDRAW | WS_TABSTOP,201,40,13,14 DEFPUSHBUTTON "Get Shapes",ID_GetShape,105,22,57,14 PUSHBUTTON "Update 2D",ID_Update2D,165,22,50,14 - CONTROL "Degenerated Mode",IDC_DegeneratedMode,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,127,143,77,10 + CONTROL "Degenerated Mode",IDC_DegeneratedMode,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,143,77,10 PUSHBUTTON "Close",IDOK,150,160,50,14 EDITTEXT IDC_EDIT_NBIsos,100,167,30,12,ES_AUTOHSCROLL GROUPBOX "Hidden",IDC_STATIC,10,89,82,65 GROUPBOX "Visible ",IDC_STATIC,10,10,81,64 - GROUPBOX "Choose a projector",IDC_STATIC,97,10,123,145,0, - WS_EX_TRANSPARENT + GROUPBOX "Choose a projector",IDC_STATIC,97,10,123,145,0,WS_EX_TRANSPARENT LTEXT "Nb Isos",IDC_STATIC_NbIsos,70,167,30,12 END @@ -373,35 +289,35 @@ END // Bitmap // -IDR_MAINFRAME BITMAP MOVEABLE PURE "Toolbar.bmp" -TOPVIEWD BITMAP MOVEABLE PURE "TOPVIEWD.BMP" -TOPVIEWF BITMAP MOVEABLE PURE "TOPVIEWF.BMP" -TOPVIEWU BITMAP MOVEABLE PURE "TopViewU.BMP" -BOTTOMVIEWU BITMAP MOVEABLE PURE "BOTTOMVIEWU.bmp" -BOTTOMVIEWF BITMAP MOVEABLE PURE "BOTTOMVIEWF.bmp" -BOTTOMVIEWD BITMAP MOVEABLE PURE "BOTTOMVIEWD.bmp" -LEFTVIEWU BITMAP MOVEABLE PURE "LEFTVIEWU.bmp" -LEFTVIEWF BITMAP MOVEABLE PURE "LEFTVIEWF.bmp" -LEFTVIEWD BITMAP MOVEABLE PURE "LEFTVIEWD.bmp" -RIGHTVIEWU BITMAP MOVEABLE PURE "RIGHTVIEWU.bmp" -RIGHTVIEWF BITMAP MOVEABLE PURE "RIGHTVIEWF.bmp" -RIGHTVIEWD BITMAP MOVEABLE PURE "RIGHTVIEWD.bmp" -FRONTVIEWU BITMAP MOVEABLE PURE "FRONTVIEWU.bmp" -FRONTVIEWF BITMAP MOVEABLE PURE "FRONTVIEWF.bmp" -FRONTVIEWD BITMAP MOVEABLE PURE "FRONTVIEWD.bmp" -BACKVIEWU BITMAP MOVEABLE PURE "BACKVIEWU.bmp" -BACKVIEWF BITMAP MOVEABLE PURE "BACKVIEWF.bmp" -BACKVIEWD BITMAP MOVEABLE PURE "BACKVIEWD.bmp" -AXOVIEWU BITMAP MOVEABLE PURE "AXOVIEWU.bmp" -AXOVIEWF BITMAP MOVEABLE PURE "AXOVIEWF.bmp" -AXOVIEWD BITMAP MOVEABLE PURE "AXOVIEWD.bmp" +IDR_MAINFRAME BITMAP "Toolbar.bmp" +TOPVIEWD BITMAP "TOPVIEWD.BMP" +TOPVIEWF BITMAP "TOPVIEWF.BMP" +TOPVIEWU BITMAP "TopViewU.BMP" +BOTTOMVIEWU BITMAP "BOTTOMVIEWU.bmp" +BOTTOMVIEWF BITMAP "BOTTOMVIEWF.bmp" +BOTTOMVIEWD BITMAP "BOTTOMVIEWD.bmp" +LEFTVIEWU BITMAP "LEFTVIEWU.bmp" +LEFTVIEWF BITMAP "LEFTVIEWF.bmp" +LEFTVIEWD BITMAP "LEFTVIEWD.bmp" +RIGHTVIEWU BITMAP "RIGHTVIEWU.bmp" +RIGHTVIEWF BITMAP "RIGHTVIEWF.bmp" +RIGHTVIEWD BITMAP "RIGHTVIEWD.bmp" +FRONTVIEWU BITMAP "FRONTVIEWU.bmp" +FRONTVIEWF BITMAP "FRONTVIEWF.bmp" +FRONTVIEWD BITMAP "FRONTVIEWD.bmp" +BACKVIEWU BITMAP "BACKVIEWU.bmp" +BACKVIEWF BITMAP "BACKVIEWF.bmp" +BACKVIEWD BITMAP "BACKVIEWD.bmp" +AXOVIEWU BITMAP "AXOVIEWU.bmp" +AXOVIEWF BITMAP "AXOVIEWF.bmp" +AXOVIEWD BITMAP "AXOVIEWD.bmp" ///////////////////////////////////////////////////////////////////////////// // // Menu // -IDR_MAINFRAME MENU PRELOAD DISCARDABLE +IDR_MAINFRAME MENU BEGIN POPUP "&File" BEGIN @@ -420,7 +336,7 @@ BEGIN END END -IDR_3DTYPE MENU PRELOAD DISCARDABLE +IDR_3DTYPE MENU BEGIN POPUP "&File" BEGIN @@ -437,8 +353,6 @@ BEGIN MENUITEM "Image...", ID_FILE_EXPORT_IMAGE END MENUITEM SEPARATOR - MENUITEM "CasCade Properties...", ID_MENU_CASCADE_PROPERTIES - MENUITEM SEPARATOR MENUITEM "E&xit", ID_APP_EXIT END POPUP "&View" @@ -461,7 +375,6 @@ BEGIN END -#ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version @@ -484,15 +397,14 @@ BEGIN BEGIN BLOCK "040904B0" BEGIN - VALUE "CompanyName", "Matra Datavision\0" - VALUE "FileDescription", "SampleHLR MFC Application\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "SampleHLR\0" - VALUE "LegalCopyright", "Copyright (C) 1998\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "SampleHLR.EXE\0" - VALUE "ProductName", "SampleHLR Application\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "CompanyName", "Matra Datavision" + VALUE "FileDescription", "SampleHLR MFC Application" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "SampleHLR" + VALUE "LegalCopyright", "Copyright (C) 1998" + VALUE "OriginalFilename", "SampleHLR.EXE" + VALUE "ProductName", "SampleHLR Application" + VALUE "ProductVersion", "1, 0, 0, 1" END END BLOCK "VarFileInfo" @@ -501,37 +413,35 @@ BEGIN END END -#endif // !_MAC - ///////////////////////////////////////////////////////////////////////////// // // String Table // -STRINGTABLE PRELOAD DISCARDABLE +STRINGTABLE BEGIN IDR_MAINFRAME "HLR" IDR_3DTYPE "\nHLR\nHLR\n\n\nHLR.Document\nHLR Document" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_WINDOW_NEW2D "Open another 2d window for the active document\nNew 2d Window" ID_WINDOW_NEW3D "Open another 3d window for the active document\nNew 3d Window" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_OBJECT_DISPLAYALL "Display\nDisplay" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_BUTTON_Test_Shape "Test Shape\nTest Shape" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_BUTTON_HLRDialog "Display The HLR Dialog \nHLR Dialog" END diff --git a/samples/mfc/standard/08_HLR/src/HLRApp.cpp b/samples/mfc/standard/08_HLR/src/HLRApp.cpp index babdbe2501..407f235cf8 100755 --- a/samples/mfc/standard/08_HLR/src/HLRApp.cpp +++ b/samples/mfc/standard/08_HLR/src/HLRApp.cpp @@ -25,15 +25,16 @@ static char THIS_FILE[] = __FILE__; ///////////////////////////////////////////////////////////////////////////// // CHLRApp construction -CHLRApp::CHLRApp() +CHLRApp::CHLRApp() : OCC_App() { - SampleName = "HLR"; //for about dialog + SampleName = "HLR"; //for about dialog } CHLRApp::~CHLRApp() { - delete pDocTemplateForView2d; + delete pDocTemplateForView2d; } + ///////////////////////////////////////////////////////////////////////////// // The one and only CHLRApp object @@ -44,66 +45,65 @@ CHLRApp theApp; BOOL CHLRApp::InitInstance() { - AfxEnableControlContainer(); + 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. + // 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")); + // 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) + 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. + // Register the application's document templates. Document templates + // serve as the connection between documents, frame windows and views. -// CasCade : + // CasCade : - - pDocTemplateForView2d = new CMultiDocTemplate( - IDR_2DTYPE, - RUNTIME_CLASS(CHLRDoc), - RUNTIME_CLASS(OCC_2dChildFrame), // custom MDI child frame - RUNTIME_CLASS(CHLRView2D)); -// AddDocTemplate(pDocTemplateForView2d); + pDocTemplateForView2d = new CMultiDocTemplate( + IDR_2DTYPE, + RUNTIME_CLASS(CHLRDoc), + RUNTIME_CLASS(OCC_2dChildFrame), // custom MDI child frame + RUNTIME_CLASS(CHLRView2D)); + +// AddDocTemplate(pDocTemplateForView2d); // End CasCade + pDocTemplateForView3d = new CMultiDocTemplate( + IDR_3DTYPE, + RUNTIME_CLASS(CHLRDoc), + RUNTIME_CLASS(OCC_3dChildFrame), // custom MDI child frame + RUNTIME_CLASS(OCC_3dView)); - pDocTemplateForView3d = new CMultiDocTemplate( - IDR_3DTYPE, - RUNTIME_CLASS(CHLRDoc), - RUNTIME_CLASS(OCC_3dChildFrame), // custom MDI child frame - RUNTIME_CLASS(OCC_3dView)); - - AddDocTemplate(pDocTemplateForView3d); + AddDocTemplate(pDocTemplateForView3d); - // 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); + // create main MDI Frame window + OCC_MainFrame* pMainFrame = new OCC_MainFrame(with_AIS_TB); + if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) + return FALSE; + m_pMainWnd = pMainFrame; - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; + // Parse command line for standard shell commands, DDE, file open + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); - // The main window has been initialized, so show and update it. - pMainFrame->MDITile(MDITILE_VERTICAL); - pMainFrame->ShowWindow(m_nCmdShow); - pMainFrame->UpdateWindow(); + // Dispatch commands specified on the command line + if (!ProcessShellCommand(cmdInfo)) + return FALSE; - return TRUE; + // The main window has been initialized, so show and update it. + pMainFrame->MDITile(MDITILE_VERTICAL); + pMainFrame->ShowWindow(m_nCmdShow); + pMainFrame->UpdateWindow(); + + return TRUE; } ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/08_HLR/src/HLRApp.h b/samples/mfc/standard/08_HLR/src/HLRApp.h index 1194d4e608..2645611926 100755 --- a/samples/mfc/standard/08_HLR/src/HLRApp.h +++ b/samples/mfc/standard/08_HLR/src/HLRApp.h @@ -8,27 +8,27 @@ #pragma once #endif // _MSC_VER >= 1000 -#include <OCC_3dApp.h> +#include <OCC_App.h> #include "HLRDoc.h" //#include "CutAndPasteSession.h" -class CHLRApp : public OCC_3dApp +class CHLRApp : public OCC_App { public: - CHLRApp(); - ~CHLRApp(); - virtual BOOL InitInstance(); - - // ========================================= - CFrameWnd* CreateView2D(CHLRDoc* pDoc); - // ========================================= - CFrameWnd* CreateView3D(CHLRDoc* pDoc); - // ========================================= + CHLRApp(); + ~CHLRApp(); + virtual BOOL InitInstance(); + + // ========================================= + CFrameWnd* CreateView2D(CHLRDoc* pDoc); + // ========================================= + CFrameWnd* CreateView3D(CHLRDoc* pDoc); + // ========================================= private : - BOOL IsViewExisting(CDocument* pDoc,CRuntimeClass* pViewClass,CView*& pView); - CMultiDocTemplate* pDocTemplateForView3d; - CMultiDocTemplate* pDocTemplateForView2d; + BOOL IsViewExisting(CDocument* pDoc,CRuntimeClass* pViewClass,CView*& pView); + CMultiDocTemplate* pDocTemplateForView3d; + CMultiDocTemplate* pDocTemplateForView2d; }; ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/08_HLR/src/HLRDoc.cpp b/samples/mfc/standard/08_HLR/src/HLRDoc.cpp index 195e9b33c5..54a4d2e34e 100755 --- a/samples/mfc/standard/08_HLR/src/HLRDoc.cpp +++ b/samples/mfc/standard/08_HLR/src/HLRDoc.cpp @@ -5,7 +5,6 @@ #include "stdafx.h" #include "HLRDoc.h" - #include "HLRApp.h" #include <OCC_2dView.h> #include <OCC_3dView.h> @@ -13,8 +12,6 @@ #include <ImportExport/ImportExport.h> #include "AISDialogs.h" -#include "Properties/PropertiesSheet.h" - #include <AIS_ListOfInteractive.hxx> #ifdef _DEBUG @@ -30,12 +27,11 @@ IMPLEMENT_DYNCREATE(CHLRDoc, CDocument) BEGIN_MESSAGE_MAP(CHLRDoc, OCC_3dBaseDoc) - //{{AFX_MSG_MAP(CHLRDoc) - ON_COMMAND(ID_WINDOW_NEW3D, OnWindowNew3d) - ON_COMMAND(ID_WINDOW_NEW2D, OnWindowNew2d) - ON_COMMAND(ID_FILE_IMPORT_BREP, OnFileImportBrep) - ON_COMMAND(ID_BUTTON_HLRDialog, OnBUTTONHLRDialog) - ON_COMMAND(ID_MENU_CASCADE_PROPERTIES, OnBUTTONTest2DProperties) + //{{AFX_MSG_MAP(CHLRDoc) + ON_COMMAND(ID_WINDOW_NEW3D, OnWindowNew3d) + ON_COMMAND(ID_WINDOW_NEW2D, OnWindowNew2d) + ON_COMMAND(ID_FILE_IMPORT_BREP, OnFileImportBrep) + ON_COMMAND(ID_BUTTON_HLRDialog, OnBUTTONHLRDialog) //}}AFX_MSG_MAP @@ -46,92 +42,55 @@ END_MESSAGE_MAP() CHLRDoc::CHLRDoc() { - // TODO: add one-time construction code here + // TODO: add one-time construction code here + Handle(Graphic3d_GraphicDriver) theGraphicDriver = + ((CHLRApp*)AfxGetApp())->GetGraphicDriver(); - Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice = - ((CHLRApp*)AfxGetApp())->GetGraphicDevice(); + // VIEWER 3D + TCollection_ExtendedString a3DName ("Visu3D"); + myViewer = new V3d_Viewer (theGraphicDriver, a3DName.ToExtString(), "", 1000.0, + V3d_XposYnegZpos, Quantity_NOC_GRAY30, + V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT, + Standard_True, Standard_False); - TCollection_ExtendedString a3DName("Visu3D"); - myViewer = new V3d_Viewer(theGraphicDevice,a3DName.ToExtString(),"", 1000.0, - V3d_XposYnegZpos, Quantity_NOC_GRAY30, - V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT, - Standard_True, Standard_False); - /* - Handle(V3d_Viewer) myViewerCollector; - myViewerCollector = new V3d_Viewer(theGraphicDevice,a3DName.ToExtString(),"", 1000.0, - V3d_XposYnegZpos, Quantity_NOC_GRAY30, - V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT, - Standard_True, Standard_False); - */ - myViewer->SetDefaultLights(); - myViewer->SetLightOn(); + myViewer->SetDefaultLights(); + myViewer->SetLightOn(); - //myAISContext =new AIS_InteractiveContext(myViewer,myViewerCollector); + myAISContext =new AIS_InteractiveContext (myViewer); - myAISContext =new AIS_InteractiveContext(myViewer); + // 2D VIEWER: exploit V3d viewer for 2D visualization + TCollection_ExtendedString a2DName ("Visu2D"); + my2DViewer = new V3d_Viewer (theGraphicDriver, a2DName.ToExtString()); + my2DViewer->SetCircularGridValues (0, 0, 10, 8, 0); + my2DViewer->SetRectangularGridValues (0, 0, 10, 10, 0); - // VIEWER 2D - TCollection_ExtendedString a2DName("Visu2D"); - my2DViewer = new V2d_Viewer(theGraphicDevice,a2DName.ToExtString()); - my2DViewer->SetCircularGridValues(0,0,10,8,0); - my2DViewer->SetRectangularGridValues(0,0,10,10,0); - - myInteractiveContext2D= new ISession2D_InteractiveContext(my2DViewer); + //Set projection mode for 2D visualization + my2DViewer->SetDefaultViewProj (V3d_Zpos); - CFrameWnd* pFrame2d=((CHLRApp*)AfxGetApp())->CreateView2D(this); - pFrame2d->ShowWindow(SW_SHOWNORMAL/*SW_MINIMIZE*/); + myInteractiveContext2D = new AIS_InteractiveContext (my2DViewer); - // update the Maps : - // entries are reserve for utilisation : - // - 1 for Visible edges HighLighted - // - 2 for Visible edges - // - 3 for Hidden edges HighLighted - // - 4 for Hidden edges - - Handle(Aspect_GenericColorMap) aColorMap= Handle(Aspect_GenericColorMap)::DownCast(my2DViewer->ColorMap()); - ASSERT(!aColorMap.IsNull()); - aColorMap->AddEntry(Aspect_ColorMapEntry (1,Quantity_Color(Quantity_NOC_RED ))); // in fact just update - aColorMap->AddEntry(Aspect_ColorMapEntry (2,Quantity_Color(Quantity_NOC_WHITE))); // in fact just update - aColorMap->AddEntry(Aspect_ColorMapEntry (3,Quantity_Color(Quantity_NOC_RED ))); // in fact just update - aColorMap->AddEntry(Aspect_ColorMapEntry (4,Quantity_Color(Quantity_NOC_BLUE1))); // in fact just update - my2DViewer->SetColorMap(aColorMap); - - Handle(Aspect_WidthMap) aWidthMap = my2DViewer->WidthMap(); - aWidthMap->AddEntry(Aspect_WidthMapEntry(1,0.8)); // in fact just update - aWidthMap->AddEntry(Aspect_WidthMapEntry(2,0.4)); // in fact just update - aWidthMap->AddEntry(Aspect_WidthMapEntry(3,0.6)); // in fact just update - aWidthMap->AddEntry(Aspect_WidthMapEntry(4,0.2)); // in fact just update - my2DViewer->SetWidthMap(aWidthMap); - - Handle(Aspect_TypeMap) aTypeMap = my2DViewer->TypeMap(); - aTypeMap->AddEntry(Aspect_TypeMapEntry(1,Aspect_LineStyle(Aspect_TOL_SOLID))); - aTypeMap->AddEntry(Aspect_TypeMapEntry(2,Aspect_LineStyle(Aspect_TOL_SOLID))); - TColQuantity_Array1OfLength anArray(1,2); - anArray(1) = 0.5; anArray(2) = 0.5; - aTypeMap->AddEntry(Aspect_TypeMapEntry(3,Aspect_LineStyle(anArray))); - aTypeMap->AddEntry(Aspect_TypeMapEntry(4,Aspect_LineStyle(anArray))); - my2DViewer->SetTypeMap(aTypeMap); - - myCSelectionDialogIsCreated=false; + CFrameWnd* pFrame2d = ((CHLRApp*)AfxGetApp())->CreateView2D (this); + pFrame2d->ShowWindow (SW_SHOWNORMAL); + myCSelectionDialogIsCreated = false; } CHLRDoc::~CHLRDoc() { - if (myCSelectionDialogIsCreated) - { - myCSelectionDialog->ShowWindow(SW_ERASE); - delete myCSelectionDialog; - } + if (myCSelectionDialogIsCreated) + { + myCSelectionDialog->ShowWindow(SW_ERASE); + delete myCSelectionDialog; + } } void CHLRDoc::OnWindowNew2d() { - ((CHLRApp*)AfxGetApp())->CreateView2D(this); + ((CHLRApp*)AfxGetApp())->CreateView2D(this); } void CHLRDoc::OnWindowNew3d() { - ((CHLRApp*)AfxGetApp())->CreateView3D(this); + ((CHLRApp*)AfxGetApp())->CreateView3D(this); } // nCmdShow could be : ( default is SW_RESTORE ) @@ -152,13 +111,13 @@ void CHLRDoc::ActivateFrame(CRuntimeClass* pViewClass,int nCmdShow) while (position != (POSITION)NULL) { CView* pCurrentView = (CView*)GetNextView(position); - if(pCurrentView->IsKindOf(pViewClass) ) + if(pCurrentView->IsKindOf(pViewClass) ) { - ASSERT_VALID(pCurrentView); - CFrameWnd* pParentFrm = pCurrentView->GetParentFrame(); - ASSERT(pParentFrm != (CFrameWnd *)NULL); - // simply make the frame window visible - pParentFrm->ActivateFrame(nCmdShow); + ASSERT_VALID(pCurrentView); + CFrameWnd* pParentFrm = pCurrentView->GetParentFrame(); + ASSERT(pParentFrm != (CFrameWnd *)NULL); + // simply make the frame window visible + pParentFrm->ActivateFrame(nCmdShow); } } } @@ -171,48 +130,38 @@ void CHLRDoc::FitAll2DViews(Standard_Boolean UpdateViewer) { CView* pCurrentView = (CView*)GetNextView(position); if(pCurrentView->IsKindOf(RUNTIME_CLASS(OCC_2dView)) ) - { + { ASSERT_VALID(pCurrentView); - ((OCC_2dView*)pCurrentView)->GetV2dView()->Fitall(); + ((OCC_2dView*)pCurrentView)->GetV2dView()->FitAll(); } } } -void CHLRDoc::OnBUTTONTest2DProperties() -{ - // TODO: Add your command handler code here - CPropertiesSheet aDial; - aDial.SetViewer(my2DViewer); - aDial.DoModal(); -} - - ///////////////////////////////////////////////////////////////////////////// // CHLRDoc diagnostics #ifdef _DEBUG void CHLRDoc::AssertValid() const { - CDocument::AssertValid(); + CDocument::AssertValid(); } void CHLRDoc::Dump(CDumpContext& dc) const { - CDocument::Dump(dc); + CDocument::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CHLRDoc commands void CHLRDoc::OnBUTTONHLRDialog() - { if (!myCSelectionDialogIsCreated) - { - myCSelectionDialog = new CSelectionDialog(this,AfxGetMainWnd()); - myCSelectionDialog->Create(CSelectionDialog::IDD, AfxGetMainWnd()); - myCSelectionDialogIsCreated = true; - } + { + myCSelectionDialog = new CSelectionDialog(this,AfxGetMainWnd()); + myCSelectionDialog->Create(CSelectionDialog::IDD, AfxGetMainWnd()); + myCSelectionDialogIsCreated = true; + } myCSelectionDialog->ShowWindow(SW_RESTORE); } @@ -225,10 +174,10 @@ void CHLRDoc::Fit() POSITION position = GetFirstViewPosition(); while (position != (POSITION)NULL) { - CView* pCurrentView = (CView*)GetNextView(position); - if(pCurrentView->IsKindOf(RUNTIME_CLASS(OCC_3dView)) ) + CView* pCurrentView = (CView*)GetNextView(position); + if(pCurrentView->IsKindOf(RUNTIME_CLASS(OCC_3dView)) ) { - ((OCC_3dView *) pCurrentView)->FitAll(); + ((OCC_3dView *) pCurrentView)->FitAll(); } } } diff --git a/samples/mfc/standard/08_HLR/src/HLRDoc.h b/samples/mfc/standard/08_HLR/src/HLRDoc.h index 46a6ffb34b..7df01fc40e 100755 --- a/samples/mfc/standard/08_HLR/src/HLRDoc.h +++ b/samples/mfc/standard/08_HLR/src/HLRDoc.h @@ -9,7 +9,6 @@ #pragma once #endif // _MSC_VER >= 1000 -#include <ISession2D/ISession2D_InteractiveContext.h> #include "SelectionDialog.h" #include <OCC_3dDoc.h> @@ -18,42 +17,41 @@ class CHLRDoc : public OCC_3dBaseDoc public: protected: // create from serialization only - CHLRDoc(); - DECLARE_DYNCREATE(CHLRDoc) -// Attributes + CHLRDoc(); + DECLARE_DYNCREATE(CHLRDoc) + // Attributes public: -// Implementation + // Implementation public: - virtual ~CHLRDoc(); - void Fit(); + virtual ~CHLRDoc(); + void Fit(); #ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; #endif protected: -// Generated message map functions + // Generated message map functions protected: - //{{AFX_MSG(CHLRDoc) - afx_msg void OnWindowNew3d(); - afx_msg void OnWindowNew2d(); - afx_msg void OnFileImportBrep(); - afx_msg void OnBUTTONTest2DProperties(); - afx_msg void OnBUTTONHLRDialog(); + //{{AFX_MSG(CHLRDoc) + afx_msg void OnWindowNew3d(); + afx_msg void OnWindowNew2d(); + afx_msg void OnFileImportBrep(); + afx_msg void OnBUTTONHLRDialog(); //}}AFX_MSG - DECLARE_MESSAGE_MAP() + DECLARE_MESSAGE_MAP() public : -void ActivateFrame(CRuntimeClass* pViewClass, int nCmdShow = SW_RESTORE ); + void ActivateFrame(CRuntimeClass* pViewClass, int nCmdShow = SW_RESTORE ); private: - Handle_V2d_Viewer my2DViewer; - Handle_ISession2D_InteractiveContext myInteractiveContext2D; + Handle_V3d_Viewer my2DViewer; + Handle_AIS_InteractiveContext myInteractiveContext2D; public : - Handle_V2d_Viewer GetViewer2D() { return my2DViewer; }; - Handle_ISession2D_InteractiveContext& GetInteractiveContext2D(){ return myInteractiveContext2D; }; - void FitAll2DViews(Standard_Boolean UpdateViewer=Standard_False); + Handle_V3d_Viewer GetViewer2D() { return my2DViewer; }; + Handle_AIS_InteractiveContext& GetInteractiveContext2D(){ return myInteractiveContext2D; }; + void FitAll2DViews(Standard_Boolean UpdateViewer=Standard_False); public : CSelectionDialog* myCSelectionDialog; diff --git a/samples/mfc/standard/08_HLR/src/HLRView2D.cpp b/samples/mfc/standard/08_HLR/src/HLRView2D.cpp index a1eb7529e7..8b4920ae91 100755 --- a/samples/mfc/standard/08_HLR/src/HLRView2D.cpp +++ b/samples/mfc/standard/08_HLR/src/HLRView2D.cpp @@ -2,9 +2,7 @@ // #include "stdafx.h" - #include "HLRView2D.h" - #include "HLRApp.h" #include "HLRDoc.h" #include "resource2d\RectangularGrid.h" @@ -33,10 +31,10 @@ static char THIS_FILE[] = __FILE__; IMPLEMENT_DYNCREATE(CHLRView2D, OCC_2dView) BEGIN_MESSAGE_MAP(CHLRView2D, OCC_2dView) - //{{AFX_MSG_MAP(CHLRView2D) - // 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 + //{{AFX_MSG_MAP(CHLRView2D) + // 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 END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// @@ -52,42 +50,38 @@ CHLRView2D::~CHLRView2D() CHLRDoc* CHLRView2D::GetDocument() // non-debug version is inline { - //ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(OCC_2dDoc))); - return (CHLRDoc*)m_pDocument; + //ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(OCC_2dDoc))); + return (CHLRDoc*)m_pDocument; } void CHLRView2D::OnInitialUpdate() { + Handle(WNT_Window) aWNTWindow; + aWNTWindow = new WNT_Window(GetSafeHwnd(),Quantity_NOC_GRAY); + myV2dView = GetDocument()->GetViewer2D()->CreateView(); + myV2dView->SetWindow(aWNTWindow); - Handle(WNT_Window) aWNTWindow; - aWNTWindow = new WNT_Window(((CHLRApp*)AfxGetApp())->GetGraphicDevice(),GetSafeHwnd()); -// aWNTWindow->SetBackground(Quantity_NOC_BLACK); - - Handle(WNT_WDriver) aDriver= new WNT_WDriver(aWNTWindow); - myV2dView = new V2d_View(aDriver, GetDocument()->GetViewer2D(),0,0,50); - - // initialyse the grids dialogs - TheRectangularGridDialog.Create(CRectangularGrid::IDD, NULL); - TheCircularGridDialog.Create(CCircularGrid::IDD, NULL); - TheRectangularGridDialog.SetViewer (GetDocument()->GetViewer2D()); - TheCircularGridDialog.SetViewer (GetDocument()->GetViewer2D()); - - 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 ) ; + // initialyse the grids dialogs + TheRectangularGridDialog.Create(CRectangularGrid::IDD, NULL); + TheCircularGridDialog.Create(CCircularGrid::IDD, NULL); + TheRectangularGridDialog.SetViewer (GetDocument()->GetViewer2D()); + TheCircularGridDialog.SetViewer (GetDocument()->GetViewer2D()); + 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 ) ; } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- void CHLRView2D::DragEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState ) + const Standard_Integer y , + const Standard_Integer TheState ) { } @@ -96,7 +90,7 @@ void CHLRView2D::DragEvent2D(const Standard_Integer x , // //----------------------------------------------------------------------------------------- void CHLRView2D::InputEvent2D(const Standard_Integer x , - const Standard_Integer y ) + const Standard_Integer y ) { } @@ -104,7 +98,7 @@ void CHLRView2D::InputEvent2D(const Standard_Integer x , // //----------------------------------------------------------------------------------------- void CHLRView2D::MoveEvent2D(const Standard_Integer x , - const Standard_Integer y ) + const Standard_Integer y ) { } @@ -112,7 +106,7 @@ void CHLRView2D::MoveEvent2D(const Standard_Integer x , // //----------------------------------------------------------------------------------------- void CHLRView2D::MultiMoveEvent2D(const Standard_Integer x , - const Standard_Integer y ) + const Standard_Integer y ) { } @@ -120,8 +114,8 @@ void CHLRView2D::MultiMoveEvent2D(const Standard_Integer x , // //----------------------------------------------------------------------------------------- void CHLRView2D::MultiDragEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState) + const Standard_Integer y , + const Standard_Integer TheState) { } @@ -130,7 +124,7 @@ void CHLRView2D::MultiDragEvent2D(const Standard_Integer x , // //----------------------------------------------------------------------------------------- void CHLRView2D::MultiInputEvent2D(const Standard_Integer x , - const Standard_Integer y ) + const Standard_Integer y ) { } @@ -138,12 +132,12 @@ void CHLRView2D::MultiInputEvent2D(const Standard_Integer x , #ifdef _DEBUG void CHLRView2D::AssertValid() const { - OCC_2dView::AssertValid(); + OCC_2dView::AssertValid(); } void CHLRView2D::Dump(CDumpContext& dc) const { - OCC_2dView::Dump(dc); + OCC_2dView::Dump(dc); } #endif \ No newline at end of file diff --git a/samples/mfc/standard/08_HLR/src/HLRView2D.h b/samples/mfc/standard/08_HLR/src/HLRView2D.h index bc44dbef50..e3c03ebb66 100755 --- a/samples/mfc/standard/08_HLR/src/HLRView2D.h +++ b/samples/mfc/standard/08_HLR/src/HLRView2D.h @@ -18,49 +18,49 @@ class CHLRView2D : public OCC_2dView { protected: // create from serialization only - CHLRView2D(); - DECLARE_DYNCREATE(CHLRView2D) + CHLRView2D(); + DECLARE_DYNCREATE(CHLRView2D) -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CHLRView2D) - protected: - virtual void OnInitialUpdate(); // called first time after construct - //}}AFX_VIRTUAL + // Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CHLRView2D) +protected: + virtual void OnInitialUpdate(); // called first time after construct + //}}AFX_VIRTUAL // Implementation public: - virtual ~CHLRView2D(); - CHLRDoc* GetDocument(); - virtual void DragEvent2D (const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState); - virtual void InputEvent2D (const Standard_Integer x , - const Standard_Integer y ); - virtual void MoveEvent2D (const Standard_Integer x , - const Standard_Integer y ); - virtual void MultiMoveEvent2D (const Standard_Integer x , - const Standard_Integer y ); - virtual void MultiDragEvent2D (const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState); - virtual void MultiInputEvent2D (const Standard_Integer x , - const Standard_Integer y ); + virtual ~CHLRView2D(); + CHLRDoc* GetDocument(); + virtual void DragEvent2D (const Standard_Integer x, + const Standard_Integer y, + const Standard_Integer TheState); + virtual void InputEvent2D (const Standard_Integer x, + const Standard_Integer y); + virtual void MoveEvent2D (const Standard_Integer x, + const Standard_Integer y ); + virtual void MultiMoveEvent2D (const Standard_Integer x, + const Standard_Integer y ); + virtual void MultiDragEvent2D (const Standard_Integer x, + const Standard_Integer y , + const Standard_Integer TheState); + virtual void MultiInputEvent2D (const Standard_Integer x, + const Standard_Integer y ); #ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: - //{{AFX_MSG(CHLRView2D) - // 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_MSG(CHLRView2D) + // 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() }; ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/08_HLR/src/Properties/ColorNewColorCubeColorMapDialog.cpp b/samples/mfc/standard/08_HLR/src/Properties/ColorNewColorCubeColorMapDialog.cpp deleted file mode 100755 index ec3bbd707c..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/ColorNewColorCubeColorMapDialog.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// ColorNewColorCubeColorMapDialog.cpp : implementation file -// - -#include "stdafx.h" - -#include "ColorNewColorCubeColorMapDialog.h" - -#include <HLRApp.h> -#include "Aspect_ColorCubeColorMap.hxx" - -#ifdef _DEBUG -//#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CColorNewColorCubeColorMapDialog dialog - - -CColorNewColorCubeColorMapDialog::CColorNewColorCubeColorMapDialog(CWnd* pParent /*=NULL*/) - : CDialog(CColorNewColorCubeColorMapDialog::IDD, pParent) -{ - //{{AFX_DATA_INIT(CColorNewColorCubeColorMapDialog) - m_base_pixel = 0; - m_redmax = 7; - m_redmult = 1; - m_greenmax = 7; - m_greenmult = 8; - m_bluemax = 3; - m_bluemult = 64; - //}}AFX_DATA_INIT -} - -void CColorNewColorCubeColorMapDialog::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CColorNewColorCubeColorMapDialog) - DDX_Text(pDX, IDC_NewColorCube_EDIT_base_pixel, m_base_pixel); - DDX_Text(pDX, IDC_NewColorCube_EDIT_redmax, m_redmax); - DDX_Text(pDX, IDC_NewColorCube_EDIT_redmult, m_redmult); - DDX_Text(pDX, IDC_NewColorCube_EDIT_greenmax, m_greenmax); - DDX_Text(pDX, IDC_NewColorCube_EDIT_grennmult, m_greenmult); - DDX_Text(pDX, IDC_NewColorCube_EDIT_bluemax, m_bluemax); - DDX_Text(pDX, IDC_NewColorCube_EDIT_bluemult, m_bluemult); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CColorNewColorCubeColorMapDialog, CDialog) - //{{AFX_MSG_MAP(CColorNewColorCubeColorMapDialog) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CColorNewColorCubeColorMapDialog message handlers - -void CColorNewColorCubeColorMapDialog::OnOK() -{ - UpdateData(true); - myColorMap = - new Aspect_ColorCubeColorMap(m_base_pixel, - m_redmax , - m_redmult , - m_greenmax , - m_greenmult , - m_bluemax , - m_bluemult ); - CDialog::OnOK(); -} diff --git a/samples/mfc/standard/08_HLR/src/Properties/ColorNewColorCubeColorMapDialog.h b/samples/mfc/standard/08_HLR/src/Properties/ColorNewColorCubeColorMapDialog.h deleted file mode 100755 index 85ebbcd675..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/ColorNewColorCubeColorMapDialog.h +++ /dev/null @@ -1,59 +0,0 @@ -// ColorNewColorCubeColorMapDialog.h : header file -// - -#if !defined(AFX_COLORNEWCOLORCUBECOLORMAPDIALOG_H__67E9AE93_D9F9_11D1_8DE3_0800369C8A03__INCLUDED_) -#define AFX_COLORNEWCOLORCUBECOLORMAPDIALOG_H__67E9AE93_D9F9_11D1_8DE3_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include "Aspect_ColorMap.hxx" -#include "resource.h" - -///////////////////////////////////////////////////////////////////////////// -// CColorNewColorCubeColorMapDialog dialog - -class CColorNewColorCubeColorMapDialog : public CDialog -{ -private : - Handle(Aspect_ColorMap) myColorMap; - -// Construction -public: - CColorNewColorCubeColorMapDialog(CWnd* pParent = NULL); // standard constructor - Handle(Aspect_ColorMap) ColorMap() {return myColorMap;}; -// Dialog Data - //{{AFX_DATA(CColorNewColorCubeColorMapDialog) - enum { IDD = IDD_DIALOG_NewColorCube }; - int m_base_pixel; - int m_redmax; - int m_redmult; - int m_greenmax; - int m_greenmult; - int m_bluemax; - int m_bluemult; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CColorNewColorCubeColorMapDialog) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CColorNewColorCubeColorMapDialog) - virtual void OnOK(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_COLORNEWCOLORCUBECOLORMAPDIALOG_H__67E9AE93_D9F9_11D1_8DE3_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/08_HLR/src/Properties/ColorNewColorRampColorMapDialog.cpp b/samples/mfc/standard/08_HLR/src/Properties/ColorNewColorRampColorMapDialog.cpp deleted file mode 100755 index 438142cafa..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/ColorNewColorRampColorMapDialog.cpp +++ /dev/null @@ -1,151 +0,0 @@ -// ColorNewColorRampColorMapDialog.cpp : implementation file -// - -#include "stdafx.h" - -#include "ColorNewColorRampColorMapDialog.h" - -#include "HLRApp.h" -#include "Quantity_Color.hxx" -#include "Aspect_ColorRampColorMap.hxx" - -#ifdef _DEBUG -//#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CColorNewColorRampColorMapDialog dialog - -CColorNewColorRampColorMapDialog::CColorNewColorRampColorMapDialog(CWnd* pParent /*=NULL*/) - : CDialog(CColorNewColorRampColorMapDialog::IDD, pParent) -{ - //{{AFX_DATA_INIT(CColorNewColorRampColorMapDialog) - m_base_pixel = 0; - m_dimension = 16; - m_Red = 1.0; - m_Green = 0.0; - m_Blue = 0.0; - //}}AFX_DATA_INIT -} - -void CColorNewColorRampColorMapDialog::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CColorNewColorRampColorMapDialog) - DDX_Control(pDX, IDC_NewColorMap_COMBO_NewEntryColorName, m_ColorList); - DDX_Text(pDX, IDC_NewColorRamp_EDIT_base_pixel, m_base_pixel); - DDX_Text(pDX, IDC_NewColorramp_EDIT_dimension, m_dimension); - DDX_Text(pDX, IDC_NewColorMapRamp_EDIT_ColorRed, m_Red); - DDX_Text(pDX, IDC_NewColorMapRamp_EDIT_ColorGreen, m_Green); - DDX_Text(pDX, IDC_NewColorMapRamp_EDIT_ColorBlue, m_Blue); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CColorNewColorRampColorMapDialog, CDialog) - //{{AFX_MSG_MAP(CColorNewColorRampColorMapDialog) - ON_BN_CLICKED(IDC_NewColorMapRamp_BUTTON_EditColor, OnColorMapRampBUTTONEditColor) - ON_EN_CHANGE(IDC_NewColorMapRamp_EDIT_ColorRed, OnChangeColorMapRampEDITColorRed) - ON_EN_CHANGE(IDC_NewColorMapRamp_EDIT_ColorGreen, OnChangeColorMapRampEDITColorGreen) - ON_EN_CHANGE(IDC_NewColorMapRamp_EDIT_ColorBlue, OnChangeColorMapRampEDITColorBlue) - ON_CBN_SELCHANGE(IDC_NewColorMap_COMBO_NewEntryColorName, OnSelchangeColorMapCOMBONewEntryColorName) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CColorNewColorRampColorMapDialog message handlers -BOOL CColorNewColorRampColorMapDialog::OnInitDialog() -{ - CDialog::OnInitDialog(); - for (int i = 0 ;i< 517 ; i++) - { - Standard_CString TheColorName = Quantity_Color::StringName((Quantity_NameOfColor)i); - // update the CComboBox to add the enumeration possibilities. - m_ColorList.AddString( TheColorName ); - } - Quantity_Color aColor(m_Red,m_Green,m_Blue,Quantity_TOC_RGB); - m_ColorList.SetCurSel(aColor.Name()); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - - -void CColorNewColorRampColorMapDialog::OnColorMapRampBUTTONEditColor() -{ - UpdateData(true); - COLORREF m_clr ; - m_clr = RGB(m_Red*255,m_Green*255,m_Blue*255); - CColorDialog dlgColor(m_clr); - if (dlgColor.DoModal() == IDOK) - { - m_clr = dlgColor.GetColor(); - m_Red = GetRValue(m_clr)/255.; - m_Green = GetGValue(m_clr)/255.; - m_Blue = GetBValue(m_clr)/255.; - } - Quantity_Color aColor(m_Red,m_Green,m_Blue,Quantity_TOC_RGB); - m_ColorList.SetCurSel(aColor.Name()); - UpdateData(false); -} - - -void CColorNewColorRampColorMapDialog::OnChangeColorMapRampEDITColorRed() -{ - UpdateData(true); - if (m_Red<0) m_Red=0; - if (m_Red>1) m_Red=1; - - Quantity_Color aColor(m_Red,m_Green,m_Blue,Quantity_TOC_RGB); - m_ColorList.SetCurSel(aColor.Name()); - UpdateData(false); -} - -void CColorNewColorRampColorMapDialog::OnChangeColorMapRampEDITColorGreen() -{ - UpdateData(true); - if (m_Green<0) m_Green=0; - if (m_Green>1) m_Green=1; - Quantity_Color aColor(m_Red,m_Green,m_Blue,Quantity_TOC_RGB); - m_ColorList.SetCurSel(aColor.Name()); - UpdateData(false); -} -void CColorNewColorRampColorMapDialog::OnChangeColorMapRampEDITColorBlue() -{ - UpdateData(true); - if (m_Blue<0) m_Blue=0; - if (m_Blue>1) m_Blue=1; - Quantity_Color aColor(m_Red,m_Green,m_Blue,Quantity_TOC_RGB); - m_ColorList.SetCurSel(aColor.Name()); - UpdateData(false); -} - -void CColorNewColorRampColorMapDialog::OnSelchangeColorMapCOMBONewEntryColorName() -{ - // TODO: Add your control notification handler code here - UpdateData(true); - int CurSel = m_ColorList.GetCurSel(); - Quantity_NameOfColor SelectedNameOfColor = (Quantity_NameOfColor)CurSel; - Quantity_Color TheSelectedEquivalentColor(SelectedNameOfColor); - - Quantity_Parameter Red,Green,Blue; - TheSelectedEquivalentColor.Values(Red,Green,Blue,Quantity_TOC_RGB); - m_Red = Red; - m_Green = Green; - m_Blue = Blue; - UpdateData(false); -} - - -void CColorNewColorRampColorMapDialog::OnOK() -{ - UpdateData(true); - Quantity_Color TheColor(m_Red,m_Green,m_Blue,Quantity_TOC_RGB); - myColorMap = - new Aspect_ColorRampColorMap(m_base_pixel, - m_dimension, - TheColor ); - CDialog::OnOK(); -} diff --git a/samples/mfc/standard/08_HLR/src/Properties/ColorPropertyPage.cpp b/samples/mfc/standard/08_HLR/src/Properties/ColorPropertyPage.cpp deleted file mode 100755 index 36feb23bec..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/ColorPropertyPage.cpp +++ /dev/null @@ -1,294 +0,0 @@ -// ColorPropertyPage.cpp : implementation file -// - -#include "stdafx.h" - -#include "ColorPropertyPage.h" - -#include "HLRApp.h" -#include "ColorNewColorCubeColorMapDialog.h" -#include "ColorNewColorRampColorMapDialog.h" -#include "Aspect_ColorMapEntry.hxx" -#include "V2d_DefaultMap.hxx" -#include "Aspect_GenericColorMap.hxx" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CColorPropertyPage property page - -IMPLEMENT_DYNCREATE(CColorPropertyPage, CPropertyPage) - -CColorPropertyPage::CColorPropertyPage() - : CPropertyPage(CColorPropertyPage::IDD) -{ - //{{AFX_DATA_INIT(CColorPropertyPage) - m_ColorMapSize = _T("Computing..."); - m_ColorMapType = _T("Computing..."); - m_CurrentEntryRed = _T("9.999"); - m_CurrentEntryGreen = _T("9.999"); - m_CurrentEntryBlue = _T("9.999"); - m_NearsetColorName = _T("Computing..."); - m_NewEntryRed = 9.999; - m_NewEntryBlue = 9.999; - m_NewEntryGreen = 9.999; - //}}AFX_DATA_INIT -} - -BOOL CColorPropertyPage::OnInitDialog() -{ - CPropertyPage::OnInitDialog(); - - for (int i = 0 ;i< 517 ; i++) - { - Standard_CString TheColorName = Quantity_Color::StringName((Quantity_NameOfColor)i); - // update the CComboBox to add the enumeration possibilities. - m_NewEntryColorNameCtrl.AddString( TheColorName ); - } - m_NewEntryColorNameCtrl.SetCurSel(1); - // TODO: Add extra initialization here - UpdateDisplay(1); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -CColorPropertyPage::~CColorPropertyPage() -{ -} - -void CColorPropertyPage::DoDataExchange(CDataExchange* pDX) -{ - CPropertyPage::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CColorPropertyPage) - DDX_Control(pDX, IDC_ColorMap_COMBO_NewEntryColorName , m_NewEntryColorNameCtrl ); - DDX_Control(pDX, IDC_ColorMap_TAB , m_TabCtrl ); - DDX_Text (pDX, IDC_ColorMap_STATIC_Size , m_ColorMapSize ); - DDX_Text (pDX, IDC_ColorMap_STATIC_Type , m_ColorMapType ); - DDX_Text (pDX, IDC_ColorMap_STATIC_EntryColorRed , m_CurrentEntryRed ); - DDX_Text (pDX, IDC_ColorMap_STATIC_EntryColorGreen , m_CurrentEntryGreen ); - DDX_Text (pDX, IDC_ColorMap_STATIC_EntryColorBlue , m_CurrentEntryBlue ); - DDX_Text (pDX, IDC_ColorMap_STATIC_EntryColorName , m_NearsetColorName ); - DDX_Text (pDX, IDC_ColorMap_EDIT_NewEntryColorRed , m_NewEntryRed ); - DDX_Text (pDX, IDC_ColorMap_EDIT_NewEntryColorBlue , m_NewEntryBlue ); - DDX_Text (pDX, IDC_ColorMap_EDIT_NewEntryColorGreen , m_NewEntryGreen ); - //}}AFX_DATA_MAP -} - -BEGIN_MESSAGE_MAP(CColorPropertyPage, CPropertyPage) - //{{AFX_MSG_MAP(CColorPropertyPage) - ON_NOTIFY(TCN_SELCHANGE, IDC_ColorMap_TAB, OnSelchangeColorMapTAB) - ON_CBN_SELCHANGE(IDC_ColorMap_COMBO_NewEntryColorName, OnSelchangeColorMapCOMBONewEntryColorName) - ON_BN_CLICKED(IDC_ColorMap_BUTTON_UpdateCurrentEntry, OnColorMapBUTTONUpdateCurrentEntry) - ON_BN_CLICKED(IDC_ColorMap_BUTTON_NewColorCubeColorMap, OnColorMapBUTTONNewColorCubeColorMap) - ON_BN_CLICKED(IDC_ColorMap_BUTTON_NewGenericColorMap, OnColorMapBUTTONNewGenericColorMap) - ON_BN_CLICKED(IDC_ColorMap_BUTTON_NewColorRampColorMap, OnColorMapBUTTONNewColorRampColorMap) - ON_BN_CLICKED(IDC_ColorMap_BUTTON_NewEntry_EditColor, OnColorMapBUTTONNewEntryEditColor) - ON_BN_CLICKED(IDC_ColorMap_BUTTON_AddNewEntry, OnColorMapBUTTONAddNewEntry) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -void CColorPropertyPage::UpdateDisplay(int CurrentSelectionIndex) -{ - Aspect_TypeOfColorMap aColorMapType = myColorMap->Type(); - switch (aColorMapType) { - case Aspect_TOC_Generic : m_ColorMapType = _T("Generic"); ; break; - case Aspect_TOC_ColorCube : m_ColorMapType = _T("ColorCube"); break; - case Aspect_TOC_ColorRamp : m_ColorMapType = _T("ColorRamp"); break; - default : cout<<" Underknown"; - } - - int ShowOrHide; - if (aColorMapType == Aspect_TOC_Generic) - { - ShowOrHide = SW_SHOW; - GetDlgItem(IDC_ColorMap_STATIC_NewEntryNotavailable)->ShowWindow(SW_HIDE); - } - else - { - ShowOrHide = SW_HIDE; - GetDlgItem(IDC_ColorMap_STATIC_NewEntryNotavailable)->ShowWindow(SW_SHOW); - } - - GetDlgItem(IDC_ColorMap_EDIT_NewEntryColorRed)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_EDIT_NewEntryColorGreen)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_EDIT_NewEntryColorBlue)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_COMBO_NewEntryColorName)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_BUTTON_NewEntry_EditColor)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_BUTTON_UpdateCurrentEntry)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_BUTTON_AddNewEntry)->ShowWindow(ShowOrHide); - GetDlgItem(IDC_ColorMap_STATIC_NewEntryColorNameStatic)->ShowWindow(ShowOrHide); - - TCollection_AsciiString SizeMessage(myColorMap->Size()); - m_ColorMapSize = _T(SizeMessage.ToCString()); - // clear the Tab Ctrl - m_TabCtrl.DeleteAllItems(); - - TC_ITEM TabCtrlItem; - TabCtrlItem.mask = TCIF_TEXT; - - for(int i =0;i<myColorMap->Size();i++) // not <=ColorMapSize, I've enter a CSR - { - Aspect_ColorMapEntry aColorMapEntry = myColorMap->FindEntry(i); - TCollection_AsciiString EntryNumerMessage(aColorMapEntry.Index()); - TabCtrlItem.pszText = (LPSTR) EntryNumerMessage.ToCString(); - m_TabCtrl.InsertItem( aColorMapEntry.Index(), &TabCtrlItem ); - } - m_TabCtrl.SetCurSel(CurrentSelectionIndex); - - // update The Current Selected entry - Aspect_ColorMapEntry aColorMapEntry = myColorMap->FindEntry(CurrentSelectionIndex); - if (aColorMapEntry. IsAllocated () ) - { - Quantity_Color TheColor = aColorMapEntry.Color(); - Quantity_Parameter Red,Green,Blue; - TheColor.Values(Red,Green,Blue,Quantity_TOC_RGB); - TCollection_AsciiString Message; - Message = Red; - m_CurrentEntryRed = _T(Message.ToCString()); - m_NewEntryRed = Red; - Message = Green; - m_CurrentEntryGreen = _T(Message.ToCString()); - m_NewEntryGreen = Green; - Message = Blue; - m_CurrentEntryBlue = _T(Message.ToCString()); - m_NewEntryBlue = Blue; - - Standard_CString StringName = Quantity_Color::StringName(TheColor.Name()); - m_NearsetColorName = StringName; - cout<<"StringName : "<<TheColor.Name()<<endl; - m_NewEntryColorNameCtrl.SetCurSel(TheColor.Name()); - if (aColorMapType == Aspect_TOC_Generic) - if (m_TabCtrl.GetCurSel() == 0) - GetDlgItem(IDC_ColorMap_BUTTON_UpdateCurrentEntry)->ShowWindow(SW_HIDE); - else - GetDlgItem(IDC_ColorMap_BUTTON_UpdateCurrentEntry)->ShowWindow(SW_SHOW); - } - else - { - m_NearsetColorName = _T("Not Allocated"); - m_CurrentEntryRed = _T("9.999"); - m_NewEntryRed = 9.999; - m_CurrentEntryGreen = _T("9.999"); - m_NewEntryGreen = 9.999; - m_CurrentEntryBlue = _T("9.999"); - m_NewEntryBlue = 9.999; - GetDlgItem(IDC_ColorMap_BUTTON_UpdateCurrentEntry)->ShowWindow(SW_HIDE); - } - - UpdateData(false); -} -void CColorPropertyPage::OnColorMapBUTTONNewGenericColorMap() -{ - // TODO: Add your control notification handler code here - myColorMap = V2d_DefaultMap::ColorMap(); - SetModified(true); - UpdateDisplay(1); -} - -void CColorPropertyPage::OnColorMapBUTTONNewColorCubeColorMap() -{ - CColorNewColorCubeColorMapDialog aDlg(NULL); - if (aDlg.DoModal() == IDOK) - { - myColorMap = aDlg.ColorMap(); - SetModified(true); - UpdateDisplay(1); - } -} - -void CColorPropertyPage::OnColorMapBUTTONNewColorRampColorMap() -{ - CColorNewColorRampColorMapDialog aDlg(NULL); - if (aDlg.DoModal() == IDOK) - { - myColorMap = aDlg.ColorMap(); - SetModified(true); - UpdateDisplay(1); - } -} - -///////////////////////////////////////////////////////////////////////////// -// CColorPropertyPage message handlers - -void CColorPropertyPage::OnSelchangeColorMapTAB(NMHDR* pNMHDR, LRESULT* pResult) -{ - UpdateDisplay(m_TabCtrl.GetCurSel()); - *pResult = 0; -} - -void CColorPropertyPage::OnSelchangeColorMapCOMBONewEntryColorName() -{ - UpdateData(true); - int CurSel = m_NewEntryColorNameCtrl.GetCurSel(); - Quantity_NameOfColor SelectedNameOfColor = (Quantity_NameOfColor)CurSel; - Quantity_Color TheSelectedEquivalentColor(SelectedNameOfColor); - - Quantity_Parameter Red,Green,Blue; - TheSelectedEquivalentColor.Values(Red,Green,Blue,Quantity_TOC_RGB); - m_NewEntryRed = Red; - m_NewEntryGreen = Green; - m_NewEntryBlue = Blue; - UpdateData(false); -} - -void CColorPropertyPage::OnColorMapBUTTONNewEntryEditColor() -{ - int CurrentSelectedItem = m_TabCtrl.GetCurSel(); - - COLORREF m_clr ; - m_clr = RGB(m_NewEntryRed*255,m_NewEntryGreen*255,m_NewEntryBlue*255); - CColorDialog dlgColor(m_clr); - if (dlgColor.DoModal() == IDOK) - { - SetModified(TRUE); - m_clr = dlgColor.GetColor(); - m_NewEntryRed = GetRValue(m_clr)/255.; - m_NewEntryGreen = GetGValue(m_clr)/255.; - m_NewEntryBlue = GetBValue(m_clr)/255.; - } - Quantity_Color aColor(m_NewEntryRed,m_NewEntryGreen,m_NewEntryBlue,Quantity_TOC_RGB); - m_NewEntryColorNameCtrl.SetCurSel(aColor.Name()); - UpdateData(false); -} - -void CColorPropertyPage::OnColorMapBUTTONUpdateCurrentEntry() -{ - UpdateData(true); - Handle(Aspect_GenericColorMap) aGenericColorMap = Handle(Aspect_GenericColorMap)::DownCast(myColorMap); - if (aGenericColorMap.IsNull()) - Standard_Failure::Raise(" couldn't update a none Generic Color Map"); - - Aspect_ColorMapEntry aColorMapEntry = myColorMap->FindEntry( m_TabCtrl.GetCurSel()); - Quantity_Color aColor(m_NewEntryRed,m_NewEntryGreen,m_NewEntryBlue,Quantity_TOC_RGB); - aColorMapEntry.SetColor(aColor); - aGenericColorMap->AddEntry(aColorMapEntry); // in fact just update - SetModified(true); - UpdateData(true); - UpdateDisplay(m_TabCtrl.GetCurSel()); -} - -void CColorPropertyPage::OnColorMapBUTTONAddNewEntry() -{ - UpdateData(true); - Quantity_Color aColor(m_NewEntryRed,m_NewEntryGreen,m_NewEntryBlue,Quantity_TOC_RGB); - Handle(Aspect_GenericColorMap) aGenericColorMap = Handle(Aspect_GenericColorMap)::DownCast(myColorMap); - if (aGenericColorMap.IsNull()) - Standard_Failure::Raise(" couldn't update a none Generic Color Map"); - - int NewEntry = aGenericColorMap->AddEntry(aColor); - SetModified(true); - UpdateDisplay(NewEntry); - UpdateData(false); -} - -BOOL CColorPropertyPage::OnApply() -{ - myViewer->SetColorMap(myColorMap); - myViewer->Update(); - return CPropertyPage::OnApply(); -} diff --git a/samples/mfc/standard/08_HLR/src/Properties/ColorPropertyPage.h b/samples/mfc/standard/08_HLR/src/Properties/ColorPropertyPage.h deleted file mode 100755 index 517baa8f7f..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/ColorPropertyPage.h +++ /dev/null @@ -1,86 +0,0 @@ -// ColorPropertyPage.h : header file -// - -#if !defined(AFX_ColorPropertyPage_H__A815F7A3_D51B_11D1_8DDE_0800369C8A03__INCLUDED_) -#define AFX_ColorPropertyPage_H__A815F7A3_D51B_11D1_8DDE_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include "Aspect_ColorMap.hxx" -#include <resource.h> - -///////////////////////////////////////////////////////////////////////////// -// CColorPropertyPage dialog - -class CColorPropertyPage : public CPropertyPage -{ - DECLARE_DYNCREATE(CColorPropertyPage) - -private : - Handle(Aspect_ColorMap) myColorMap; -private : - Handle(V2d_Viewer) myViewer; -public: - void SetViewer(Handle(V2d_Viewer) aViewer) { - myViewer = aViewer; - myColorMap = aViewer->ColorMap(); - }; - - -// Construction -public: - CColorPropertyPage(); - ~CColorPropertyPage(); - -// Dialog Data - //{{AFX_DATA(CColorPropertyPage) - enum { IDD = IDD_DIALOG_Color }; - CComboBox m_NewEntryColorNameCtrl; - CTabCtrl m_TabCtrl; - CString m_ColorMapSize ; - CString m_ColorMapType ; - CString m_CurrentEntryRed; - CString m_CurrentEntryGreen; - CString m_CurrentEntryBlue; - CString m_NearsetColorName; - double m_NewEntryRed; - double m_NewEntryBlue; - double m_NewEntryGreen; - //}}AFX_DATA - - -// Overrides - // ClassWizard generate virtual function overrides - //{{AFX_VIRTUAL(CColorPropertyPage) - public: - virtual BOOL OnApply(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - // Generated message map functions - //{{AFX_MSG(CColorPropertyPage) - virtual BOOL OnInitDialog(); - afx_msg void OnSelchangeColorMapTAB(NMHDR* pNMHDR, LRESULT* pResult); - afx_msg void OnSelchangeColorMapCOMBONewEntryColorName(); - afx_msg void OnColorMapBUTTONUpdateCurrentEntry(); - afx_msg void OnColorMapBUTTONNewColorCubeColorMap(); - afx_msg void OnColorMapBUTTONNewGenericColorMap(); - afx_msg void OnColorMapBUTTONNewColorRampColorMap(); - afx_msg void OnColorMapBUTTONNewEntryEditColor(); - afx_msg void OnColorMapBUTTONAddNewEntry(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - void UpdateDisplay(int CurrentSelectionIndex); -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_ColorPropertyPage_H__A815F7A3_D51B_11D1_8DDE_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/08_HLR/src/Properties/FontPropertyPage.cpp b/samples/mfc/standard/08_HLR/src/Properties/FontPropertyPage.cpp deleted file mode 100755 index 3a2b3df6c2..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/FontPropertyPage.cpp +++ /dev/null @@ -1,275 +0,0 @@ -// FontPropertyPage.cpp : implementation file -// - -#include "stdafx.h" - -#include "FontPropertyPage.h" - -#include "HLRApp.h" -#include "Aspect_FontMapEntry.hxx" - -#ifdef _DEBUG -//#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CFontPropertyPage property page - -IMPLEMENT_DYNCREATE(CFontPropertyPage, CPropertyPage) - -CFontPropertyPage::CFontPropertyPage() : CPropertyPage(CFontPropertyPage::IDD) -{ - //{{AFX_DATA_INIT(CFontPropertyPage) - m_FontMapSize = _T("Computing..."); - m_CurrentEntryValue = _T("Computing..."); - m_CurrentEntryStyle = _T("Computing..."); - m_CurrentEntrySize = _T("Computing..."); - m_CurrentEntrySlant = _T("Computing..."); - m_NewEntryValue = _T(""); - m_NewEntrySize = 1.0; - m_NewEntrySlant = 0.0; - //}}AFX_DATA_INIT -} - -CFontPropertyPage::~CFontPropertyPage() -{ -} - -BOOL CFontPropertyPage::OnInitDialog() -{ - CPropertyPage::OnInitDialog(); - - m_NewEntry_Type.AddString("DEFAULT"); - m_NewEntry_Type.AddString("COURIER"); - m_NewEntry_Type.AddString("HELVETICA"); - m_NewEntry_Type.AddString("TIMES"); - m_NewEntry_Type.AddString("USERDEFINED"); - m_NewEntry_Type.SetCurSel(1); - - // TODO: Add extra initialization here - UpdateDisplay(1); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - - -void CFontPropertyPage::DoDataExchange(CDataExchange* pDX) -{ - CPropertyPage::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CFontPropertyPage) - DDX_Text (pDX, IDC_FontMap_STATIC_Size , m_FontMapSize ); - DDX_Control(pDX, IDC_FontMap_TAB , m_TabCtrl ); - DDX_Text (pDX, IDC_FontMap_STATIC_CurrentEntryValue , m_CurrentEntryValue ); - DDX_Text (pDX, IDC_FontMap_STATIC_CurrentEntryType , m_CurrentEntryStyle ); - DDX_Text (pDX, IDC_FontMap_STATIC_CurrentEntrySize , m_CurrentEntrySize ); - DDX_Text (pDX, IDC_FontMap_STATIC_CurrentEntrySlant , m_CurrentEntrySlant ); - - DDX_Control(pDX, IDC_FontMap_COMBO_NewEntryType , m_NewEntry_Type ); - DDX_Text(pDX, IDC_FontMap_EDIT_NewEntryValue, m_NewEntryValue); - DDX_Text(pDX, IDC_FontMap_EDIT_NewEntrySize, m_NewEntrySize); - DDX_Text(pDX, IDC_FontMap_EDIT_NewEntrySlant, m_NewEntrySlant); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CFontPropertyPage, CPropertyPage) - //{{AFX_MSG_MAP(CFontPropertyPage) - ON_NOTIFY(TCN_SELCHANGE, IDC_FontMap_TAB, OnSelchangeFontMapTAB) - ON_BN_CLICKED(IDC_FontMap_BUTTON_NewEntry_EditFont, OnFontMapBUTTONNewEntryEditFont) - ON_BN_CLICKED(IDC_FontMap_BUTTON_UpdateCurrent, OnFontMapBUTTONUpdateCurrent) - ON_CBN_SELCHANGE(IDC_FontMap_COMBO_NewEntryType, OnSelchangeFontMapCOMBONewEntryType) - ON_BN_CLICKED(IDC_FontMap_BUTTON_NewEntry, OnFontMapBUTTONNewEntry) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CFontPropertyPage message handlers -void CFontPropertyPage::UpdateDisplay(int CurrentSelectionIndex) -{ - // Update the size of the Width map - TCollection_AsciiString SizeMessage(myFontMap->Size()); - m_FontMapSize = _T(SizeMessage.ToCString()); - - // clear the Tab Ctrl - m_TabCtrl.DeleteAllItems(); - TC_ITEM TabCtrlItem; - TabCtrlItem.mask = TCIF_TEXT; - for(int i =1;i<=myFontMap->Size();i++) - { - Aspect_FontMapEntry aFontMapEntry = myFontMap->Entry(i); - TCollection_AsciiString EntryNumerMessage(aFontMapEntry.Index()); - TabCtrlItem.pszText = (LPSTR) EntryNumerMessage.ToCString(); - m_TabCtrl.InsertItem( aFontMapEntry.Index(), &TabCtrlItem ); - } - m_TabCtrl.SetCurSel(CurrentSelectionIndex-1); - // update the current Entry informations - Aspect_FontMapEntry aFontMapEntry = myFontMap->Entry(CurrentSelectionIndex); - - Aspect_FontStyle TheType = aFontMapEntry.Type(); - m_CurrentEntryValue = (TheType.Value() == NULL?" ":TheType.Value()); - - TCollection_AsciiString Message; - switch (TheType.Style()) - { - case Aspect_TOF_DEFAULT : Message = "Aspect_TOF_DEFAULT"; break; - case Aspect_TOF_COURIER : Message = "Aspect_TOF_COURIER"; break; - case Aspect_TOF_HELVETICA : Message = "Aspect_TOF_HELVETICA"; break; - case Aspect_TOF_TIMES : Message = "Aspect_TOF_TIMES"; break; - case Aspect_TOF_USERDEFINED : Message = "Aspect_TOF_USERDEFINED"; break; - default: Message = "Underknown"; - } - m_CurrentEntryStyle = _T(Message.ToCString()); - - Message = TheType.Size (); - m_CurrentEntrySize = _T(Message.ToCString()); - - Message = TheType.Slant (); - m_CurrentEntrySlant = _T(Message.ToCString()); - - // update The New Entry : - switch (TheType.Style()) - { - case Aspect_TOF_DEFAULT : m_NewEntry_Type.SetCurSel(0); break; - case Aspect_TOF_COURIER : m_NewEntry_Type.SetCurSel(1); break; - case Aspect_TOF_HELVETICA : m_NewEntry_Type.SetCurSel(2); break; - case Aspect_TOF_TIMES : m_NewEntry_Type.SetCurSel(3); break; - case Aspect_TOF_USERDEFINED : m_NewEntry_Type.SetCurSel(4); break; - default: ; - } - - m_NewEntryValue = (TheType.Value() == NULL?" ":TheType.Value()); - m_NewEntrySize = TheType.Size (); - m_NewEntrySlant = TheType.Slant (); - if (TheType.Style()==Aspect_TOF_USERDEFINED) - { - GetDlgItem(IDC_FontMap_EDIT_NewEntrySize)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_EDIT_NewEntrySlant)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry_EditFont)->ShowWindow(SW_SHOW); - } - else - { - GetDlgItem(IDC_FontMap_EDIT_NewEntrySize)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_EDIT_NewEntrySlant)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry_EditFont)->ShowWindow(SW_HIDE); - } - UpdateData(false); -} - -void CFontPropertyPage::OnSelchangeFontMapTAB(NMHDR* pNMHDR, LRESULT* pResult) -{ - // TODO: Add your control notification handler code here - UpdateDisplay( m_TabCtrl.GetCurSel()+1); - *pResult = 0; -} - -void CFontPropertyPage::OnSelchangeFontMapCOMBONewEntryType() -{ - UpdateData(true); - // update the New Entry Value message - if (m_NewEntry_Type.GetCurSel() == Aspect_TOF_USERDEFINED) - { - // allow the user to select a font from the common CFontDialog - GetDlgItem(IDC_FontMap_BUTTON_NewEntry_EditFont)->ShowWindow(SW_SHOW); - m_NewEntryValue = "Please Select a Font"; - // remove the posiblility to update while a font was selected - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_EDIT_NewEntrySize)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_EDIT_NewEntrySlant)->ShowWindow(SW_HIDE); - } - else - { - GetDlgItem(IDC_FontMap_EDIT_NewEntrySize)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_EDIT_NewEntrySlant)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry_EditFont)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry)->ShowWindow(SW_SHOW); - Aspect_FontStyle TheType((Aspect_TypeOfFont)m_NewEntry_Type.GetCurSel(),m_NewEntrySize); - m_NewEntryValue = (TheType.Value() == NULL?" ":TheType.Value()); - } - UpdateData(false); - -} - -#include "WNT_FontMapEntry.hxx" -void CFontPropertyPage::OnFontMapBUTTONNewEntryEditFont() -{ - Handle(WNT_FontMapEntry) anEntry = new WNT_FontMapEntry((char* const)(LPCTSTR )m_NewEntryValue); - Standard_Address anAddress = anEntry->LogFont(); - LOGFONT* lf = (LOGFONT*)(anAddress ); - CFontDialog dlg(lf); - if (dlg.DoModal() == IDOK) - { - TCHAR buff[ 255 ]; - wsprintf ( buff, "%d-%d-%d-%d-%d-%d-%d-%d-%d-%d-%d-%d-%d-%s", - lf->lfHeight, lf->lfWidth, lf->lfEscapement, lf->lfOrientation, lf->lfWeight, lf->lfItalic, - lf->lfUnderline, lf->lfStrikeOut, lf->lfCharSet, lf->lfOutPrecision, lf->lfClipPrecision, lf->lfQuality, - lf->lfPitchAndFamily, lf->lfFaceName); - - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry)->ShowWindow(SW_SHOW); - Aspect_FontStyle TheType(buff); - m_NewEntryValue = (TheType.Value() == NULL?" ":TheType.Value()); - } - UpdateData(false); -} - -void CFontPropertyPage::OnFontMapBUTTONUpdateCurrent() -{ - // The Entry to modify : - Aspect_FontMapEntry aFontMapEntry = myFontMap->Entry( m_TabCtrl.GetCurSel()+1); - - UpdateData(true); - Aspect_TypeOfFont aTypeOfFont = (Aspect_TypeOfFont)m_NewEntry_Type.GetCurSel(); - - if (aTypeOfFont == Aspect_TOF_USERDEFINED) - { - Aspect_FontStyle TheType((Standard_CString)(LPCTSTR )m_NewEntryValue); - aFontMapEntry.SetType(TheType); - } - else - { - Aspect_FontStyle TheType((Aspect_TypeOfFont)m_NewEntry_Type.GetCurSel(),m_NewEntrySize,m_NewEntrySlant); - aFontMapEntry.SetType(TheType); - } - myFontMap->AddEntry(aFontMapEntry); // in fact just update - SetModified(true); - UpdateDisplay(m_TabCtrl.GetCurSel()+1); - UpdateData(false); -} - - -void CFontPropertyPage::OnFontMapBUTTONNewEntry() -{ - // The Entry to modify : - Aspect_FontMapEntry aFontMapEntry; - - UpdateData(true); - Aspect_TypeOfFont aTypeOfFont = (Aspect_TypeOfFont)m_NewEntry_Type.GetCurSel(); - - if (aTypeOfFont == Aspect_TOF_USERDEFINED) - { - Aspect_FontStyle TheType((Standard_CString)(LPCTSTR )m_NewEntryValue); - aFontMapEntry.SetType(TheType); - } - else - { - Aspect_FontStyle TheType((Aspect_TypeOfFont)m_NewEntry_Type.GetCurSel(),m_NewEntrySize,m_NewEntrySlant); - aFontMapEntry.SetType(TheType); - } - myFontMap->AddEntry(aFontMapEntry); // in fact just update - SetModified(true); - UpdateDisplay(m_TabCtrl.GetCurSel()+1); - UpdateData(false); -} - -BOOL CFontPropertyPage::OnApply() -{ - myViewer->SetFontMap(myFontMap); - myViewer->Update(); - - return CPropertyPage::OnApply(); -} diff --git a/samples/mfc/standard/08_HLR/src/Properties/FontPropertyPage.h b/samples/mfc/standard/08_HLR/src/Properties/FontPropertyPage.h deleted file mode 100755 index 2169b59e41..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/FontPropertyPage.h +++ /dev/null @@ -1,80 +0,0 @@ -// FontPropertyPage.h : header file -// - -#if !defined(AFX_FontPropertyPage_H__A815F7A5_D51B_11D1_8DDE_0800369C8A03__INCLUDED_) -#define AFX_FontPropertyPage_H__A815F7A5_D51B_11D1_8DDE_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include "Aspect_FontMap.hxx" -#include <resource.h> - -///////////////////////////////////////////////////////////////////////////// -// CFontPropertyPage dialog - -class CFontPropertyPage : public CPropertyPage -{ - DECLARE_DYNCREATE(CFontPropertyPage) - -private : - Handle(Aspect_FontMap) myFontMap; -private : - Handle(V2d_Viewer) myViewer; -public: - void SetViewer(Handle(V2d_Viewer) aViewer) { - myViewer = aViewer; - myFontMap = aViewer->FontMap(); - }; - -// Construction -public: - CFontPropertyPage(); - ~CFontPropertyPage(); - -// Dialog Data - //{{AFX_DATA(CFontPropertyPage) - enum { IDD = IDD_DIALOG_Font }; - CString m_FontMapSize; - CTabCtrl m_TabCtrl; - CString m_CurrentEntryValue; - CString m_CurrentEntryStyle; - CString m_CurrentEntrySize; - CString m_CurrentEntrySlant; - CComboBox m_NewEntry_Type; - double m_NewEntrySize; - double m_NewEntrySlant; - CString m_NewEntryValue; - //}}AFX_DATA - -// Overrides - // ClassWizard generate virtual function overrides - //{{AFX_VIRTUAL(CFontPropertyPage) - public: - virtual BOOL OnApply(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - // Generated message map functions - //{{AFX_MSG(CFontPropertyPage) - virtual BOOL OnInitDialog(); - afx_msg void OnSelchangeFontMapTAB(NMHDR* pNMHDR, LRESULT* pResult); - afx_msg void OnFontMapBUTTONNewEntryEditFont(); - afx_msg void OnFontMapBUTTONUpdateCurrent(); - afx_msg void OnSelchangeFontMapCOMBONewEntryType(); - afx_msg void OnFontMapBUTTONNewEntry(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -private: - void UpdateDisplay(int CurrentSelectionIndex); - -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_FontPropertyPage_H__A815F7A5_D51B_11D1_8DDE_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/08_HLR/src/Properties/MarkPropertyPage.cpp b/samples/mfc/standard/08_HLR/src/Properties/MarkPropertyPage.cpp deleted file mode 100755 index 72096306b5..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/MarkPropertyPage.cpp +++ /dev/null @@ -1,180 +0,0 @@ -// MarkPropertyPage.cpp : implementation file -// - -#include "stdafx.h" - -#include "MarkPropertyPage.h" - -#include "HLRApp.h" - -#include "Aspect_MarkMap.hxx" -#include "Aspect_MarkMapEntry.hxx" -#include "TColQuantity_Array1OfLength.hxx" -#include "TColStd_SequenceOfReal.hxx" -#include "TShort_Array1OfShortReal.hxx" -#include "TColStd_Array1OfBoolean.hxx" - -#ifdef _DEBUG -//#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CMarkPropertyPage property page - -IMPLEMENT_DYNCREATE(CMarkPropertyPage, CPropertyPage) - -CMarkPropertyPage::CMarkPropertyPage() : CPropertyPage(CMarkPropertyPage::IDD) -{ - //{{AFX_DATA_INIT(CMarkPropertyPage) - m_MarkMapSize = _T("Computing..."); - m_CurrentEntryStyle = _T("Computing..."); - m_CurrentEntryXValue = _T("Computing..."); - m_CurrentEntryYValue = _T("Computing..."); - m_CurrentEntrySValue = _T("Computing..."); - //}}AFX_DATA_INIT - - -} -BOOL CMarkPropertyPage::OnInitDialog() -{ - CPropertyPage::OnInitDialog(); - - UpdateDisplay(1); - - UpdateData(false); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -CMarkPropertyPage::~CMarkPropertyPage() -{ -} - -void CMarkPropertyPage::DoDataExchange(CDataExchange* pDX) -{ - CPropertyPage::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CMarkPropertyPage) - DDX_Control(pDX, IDC_MarkMap_TAB, m_TabCtrl); - DDX_Text(pDX, IDC_MarkMap_STATIC_Size, m_MarkMapSize); - DDX_Text(pDX, IDC_MarkMap_STATIC_CurrentEntryStyle, m_CurrentEntryStyle); - DDX_Text(pDX, IDC_MarkMap_STATIC_CurrentEntryXValue, m_CurrentEntryXValue); - DDX_Text(pDX, IDC_MarkMap_STATIC_CurrentEntryYValue, m_CurrentEntryYValue); - DDX_Text(pDX, IDC_MarkMap_STATIC_CurrentEntrySValue, m_CurrentEntrySValue); - - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CMarkPropertyPage, CPropertyPage) - //{{AFX_MSG_MAP(CMarkPropertyPage) - ON_NOTIFY(TCN_SELCHANGE, IDC_MarkMap_TAB, OnSelchangeMarkMapTAB) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CMarkPropertyPage message handlers -void CMarkPropertyPage::UpdateDisplay(int CurrentSelectionIndex) -{ - TCollection_AsciiString SizeMessage(myMarkMap->Size()); - m_MarkMapSize = _T(SizeMessage.ToCString()); - - m_TabCtrl.DeleteAllItems(); - - TC_ITEM TabCtrlItem; - TabCtrlItem.mask = TCIF_TEXT; - - for(int i =1;i<=myMarkMap->Size();i++) - { - Aspect_MarkMapEntry aMarkMapEntry = myMarkMap->Entry(i); - TCollection_AsciiString EntryNumerMessage(aMarkMapEntry.Index()); - TabCtrlItem.pszText = (LPSTR) EntryNumerMessage.ToCString(); - m_TabCtrl.InsertItem( aMarkMapEntry.Index(), &TabCtrlItem ); - } - m_TabCtrl.SetCurSel(CurrentSelectionIndex-1); - - // update The Current Selected entry - Aspect_MarkMapEntry aMarkMapEntry = myMarkMap->Entry(CurrentSelectionIndex); - if (aMarkMapEntry. IsAllocated () ) - { - Aspect_MarkerStyle aMarkerStyle = aMarkMapEntry.Style() ; - switch (aMarkerStyle.Type()) { - case Aspect_TOM_POINT : m_CurrentEntryStyle = _T("Aspect_TOM_POINT"); break; - case Aspect_TOM_PLUS : m_CurrentEntryStyle = _T("Aspect_TOM_PLUS"); break; - case Aspect_TOM_STAR : m_CurrentEntryStyle = _T("Aspect_TOM_STAR"); break; - case Aspect_TOM_O : m_CurrentEntryStyle = _T("Aspect_TOM_O"); break; - case Aspect_TOM_X : m_CurrentEntryStyle = _T("Aspect_TOM_X"); break; - case Aspect_TOM_O_POINT : m_CurrentEntryStyle = _T("Aspect_TOM_O_POINT"); break; - case Aspect_TOM_O_PLUS : m_CurrentEntryStyle = _T("Aspect_TOM_O_PLUS"); break; - case Aspect_TOM_O_STAR : m_CurrentEntryStyle = _T("Aspect_TOM_O_STAR"); break; - case Aspect_TOM_O_X : m_CurrentEntryStyle = _T("Aspect_TOM_O_X"); break; - case Aspect_TOM_BALL : m_CurrentEntryStyle = _T("Aspect_TOM_BALL"); break; - case Aspect_TOM_RING1 : m_CurrentEntryStyle = _T("Aspect_TOM_RING1"); break; - case Aspect_TOM_RING2 : m_CurrentEntryStyle = _T("Aspect_TOM_RING2"); break; - case Aspect_TOM_RING3 : m_CurrentEntryStyle = _T("Aspect_TOM_RING3"); break; - case Aspect_TOM_USERDEFINED : m_CurrentEntryStyle = _T("Aspect_TOM_USERDEFINED"); break; - default : m_CurrentEntryStyle = _T("Underknown"); - } - - cout<<" aMarkerStyle Length: "<<aMarkerStyle.Length()<<endl; - - const TShort_Array1OfShortReal& aMarkerStyleXValues = aMarkerStyle.XValues() ; - const TShort_Array1OfShortReal& aMarkerStyleYValues= aMarkerStyle.YValues() ; - const TColStd_Array1OfBoolean& aMarkerStyleSValues= aMarkerStyle.SValues() ; - - TCollection_AsciiString MessageX =BuildValuesAscii(aMarkerStyleXValues); - TCollection_AsciiString MessageY =BuildValuesAscii(aMarkerStyleYValues); - TCollection_AsciiString MessageS =BuildValuesAscii(aMarkerStyleSValues); - - m_CurrentEntryXValue = _T(MessageX.ToCString()); - m_CurrentEntryYValue = _T(MessageY.ToCString()); - m_CurrentEntrySValue = _T(MessageS.ToCString()); - - } - else - { - m_CurrentEntryStyle = _T("Not Allocated"); - m_CurrentEntryXValue = _T(""); - m_CurrentEntryYValue = _T(""); - m_CurrentEntrySValue = _T(""); - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_HIDE); - } -} - -void CMarkPropertyPage::OnSelchangeMarkMapTAB(NMHDR* pNMHDR, LRESULT* pResult) -{ - UpdateDisplay(m_TabCtrl.GetCurSel()+1); - UpdateData(false); - *pResult = 0; -} - -BOOL CMarkPropertyPage::OnApply() -{ -// myViewer->SetMarkMap(myMarkMap); -// myViewer->Update(); - return CPropertyPage::OnApply(); -} - -TCollection_AsciiString CMarkPropertyPage::BuildValuesAscii(const TShort_Array1OfShortReal& anArray) -{ - TCollection_AsciiString Message; - for(int i=1;i<=anArray.Length();i++) - { - Message += anArray.Value(i); - Message += "\t"; - } - return Message; -} - -TCollection_AsciiString CMarkPropertyPage::BuildValuesAscii(const TColStd_Array1OfBoolean& anArray) -{ - TCollection_AsciiString Message; - for(int i=1;i<=anArray.Length();i++) - { - if (anArray(i)) Message += "True"; else Message += "False"; - Message += "\t"; - } - return Message; -} diff --git a/samples/mfc/standard/08_HLR/src/Properties/MarkPropertyPage.h b/samples/mfc/standard/08_HLR/src/Properties/MarkPropertyPage.h deleted file mode 100755 index e2b923f87a..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/MarkPropertyPage.h +++ /dev/null @@ -1,82 +0,0 @@ -// MarkPropertyPage.h : header file -// - -#if !defined(AFX_MarkPropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_) -#define AFX_MarkPropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include <resource.h> - -#include "V2d_Viewer.hxx" -#include "TColQuantity_Array1OfLength.hxx" -#include "TColQuantity_HArray1OfLength.hxx" -#include "TColStd_Array1OfBoolean.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CMarkPropertyPage dialog - -class CMarkPropertyPage : public CPropertyPage -{ -private : - Handle(Aspect_MarkMap) myMarkMap; -private : - Handle(V2d_Viewer) myViewer; -public: - void SetViewer(Handle(V2d_Viewer) aViewer) { - myViewer = aViewer; - myMarkMap = aViewer->MarkMap(); - }; - - DECLARE_DYNCREATE(CMarkPropertyPage) - -// Construction -public: - CMarkPropertyPage(); - ~CMarkPropertyPage(); - -// Dialog Data - //{{AFX_DATA(CMarkPropertyPage) - enum { IDD = IDD_DIALOG_Mark }; - CTabCtrl m_TabCtrl; - CComboBox m_NewEntryControl; - - CString m_MarkMapSize; - CString m_CurrentEntryStyle; - CString m_CurrentEntryXValue; - CString m_CurrentEntryYValue; - CString m_CurrentEntrySValue; - //}}AFX_DATA - - -// Overrides - // ClassWizard generate virtual function overrides - //{{AFX_VIRTUAL(CMarkPropertyPage) - public: - virtual BOOL OnApply(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - // Generated message map functions - //{{AFX_MSG(CMarkPropertyPage) - virtual BOOL OnInitDialog(); - afx_msg void OnSelchangeMarkMapTAB(NMHDR* pNMHDR, LRESULT* pResult); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -private: - void UpdateDisplay(int CurrentSelectionIndex); - - TCollection_AsciiString BuildValuesAscii(const TShort_Array1OfShortReal& anArray); - TCollection_AsciiString BuildValuesAscii(const TColStd_Array1OfBoolean& anArray); - -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_MarkPropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/08_HLR/src/Properties/PropertiesDialog.rc2 b/samples/mfc/standard/08_HLR/src/Properties/PropertiesDialog.rc2 deleted file mode 100755 index 4be558e46e..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/PropertiesDialog.rc2 +++ /dev/null @@ -1,236 +0,0 @@ -// -// resources Microsoft Visual C++ -// - -///////////////////////////////////////////////////////////////////////////// -// Add manually edited resources here... - -///////////////////////////////////////////////////////////////////////////// - -IDD_DIALOG_Color DIALOG DISCARDABLE 0, 0, 281, 186 -STYLE 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_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Font Map" -FONT 8, "MS Sans Serif" -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 DISCARDABLE 0, 0, 281, 167 -STYLE 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 DISCARDABLE 0, 0, 207, 156 -STYLE 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 DISCARDABLE 0, 0, 252, 121 -STYLE 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_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Type Map" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Size Of The Typet 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_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Mark Map" -FONT 8, "MS Sans Serif" -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 diff --git a/samples/mfc/standard/08_HLR/src/Properties/PropertiesSheet.cpp b/samples/mfc/standard/08_HLR/src/Properties/PropertiesSheet.cpp deleted file mode 100755 index 33674f116b..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/PropertiesSheet.cpp +++ /dev/null @@ -1,63 +0,0 @@ -// MapProperties.cpp : implementation file -// - -#include "stdafx.h" - -#include "PropertiesSheet.h" - -#include "HLRApp.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CPropertiesSheet - -IMPLEMENT_DYNAMIC(CPropertiesSheet, CPropertySheet) - -CPropertiesSheet::CPropertiesSheet(CWnd* pParentWnd, UINT iSelectPage) - :CPropertySheet("View Map Properties", pParentWnd, iSelectPage) -{ -} - -void CPropertiesSheet::SetViewer (Handle(V2d_Viewer) aViewer) -{ - AddPage(& m_pageWidthProperty); - m_pageWidthProperty.SetViewer(aViewer); - - AddPage(& m_pageColorProperty); - m_pageColorProperty.SetViewer(aViewer); - - AddPage(& m_pageFontProperty); - m_pageFontProperty.SetViewer(aViewer); - - AddPage(& m_pageTypeProperty); - m_pageTypeProperty.SetViewer(aViewer); - - AddPage(& m_pageMarkProperty); - m_pageMarkProperty.SetViewer(aViewer); - -} - -CPropertiesSheet::~CPropertiesSheet() -{ -} - - -BEGIN_MESSAGE_MAP(CPropertiesSheet, CPropertySheet) - //{{AFX_MSG_MAP(CPropertiesSheet) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CPropertiesSheet message handlers - -BOOL CPropertiesSheet::OnInitDialog() -{ - BOOL bResult = CPropertySheet::OnInitDialog(); - return bResult; -} - diff --git a/samples/mfc/standard/08_HLR/src/Properties/PropertiesSheet.h b/samples/mfc/standard/08_HLR/src/Properties/PropertiesSheet.h deleted file mode 100755 index fb5c0da48a..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/PropertiesSheet.h +++ /dev/null @@ -1,68 +0,0 @@ -#if !defined(AFX_PropertiesSheet_H__A815F7A6_D51B_11D1_8DDE_0800369C8A03__INCLUDED_) -#define AFX_PropertiesSheet_H__A815F7A6_D51B_11D1_8DDE_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// PropertiesSheet.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CPropertiesSheet -#include "ColorPropertyPage.h" -#include "FontPropertyPage.h" -#include "WidthPropertyPage.h" -#include "TypePropertyPage.h" -#include "MarkPropertyPage.h" - - -class CPropertiesSheet : public CPropertySheet -{ - DECLARE_DYNAMIC(CPropertiesSheet) - - - -private : - CColorPropertyPage m_pageColorProperty; - CFontPropertyPage m_pageFontProperty; - CWidthPropertyPage m_pageWidthProperty; - CTypePropertyPage m_pageTypeProperty; - CMarkPropertyPage m_pageMarkProperty; - -// Construction -public: - CPropertiesSheet(CWnd* pParentWnd = NULL, UINT iSelectPage = 0); - - void SetViewer (Handle(V2d_Viewer) aViewer); - -// Attributes -public: - -// Operations -public: - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CPropertiesSheet) - public: - virtual BOOL OnInitDialog(); - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~CPropertiesSheet(); - - // Generated message map functions -protected: - //{{AFX_MSG(CPropertiesSheet) - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_PropertiesSheet_H__A815F7A6_D51B_11D1_8DDE_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/08_HLR/src/Properties/TypePropertyPage.cpp b/samples/mfc/standard/08_HLR/src/Properties/TypePropertyPage.cpp deleted file mode 100755 index 93e710cd27..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/TypePropertyPage.cpp +++ /dev/null @@ -1,294 +0,0 @@ -// TypePropertyPage.cpp : implementation file -// - -#include "stdafx.h" - -#include "TypePropertyPage.h" - -#include "HLRApp.h" - -#ifdef _DEBUG -//#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -#include "Aspect_TypeMap.hxx" -#include "Aspect_TypeMapEntry.hxx" -#include "TColQuantity_Array1OfLength.hxx" -#include "TColStd_SequenceOfReal.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CTypePropertyPage property page - -IMPLEMENT_DYNCREATE(CTypePropertyPage, CPropertyPage) - -CTypePropertyPage::CTypePropertyPage() : CPropertyPage(CTypePropertyPage::IDD) -{ - //{{AFX_DATA_INIT(CTypePropertyPage) - m_TypeMapSize = _T("Computing..."); - m_CurrentEntryStyle = _T("Computing..."); - m_CurrentEntryValue = _T("Computing..."); - m_NewEntryValue = _T(""); - //}}AFX_DATA_INIT -} - -BOOL CTypePropertyPage::OnInitDialog() -{ - CPropertyPage::OnInitDialog(); - - // TODO: Add extra initialization here - - m_NewEntryControl.AddString("SOLID"); - m_NewEntryControl.AddString("DASH"); - m_NewEntryControl.AddString("DOT"); - m_NewEntryControl.AddString("DOTDASH"); - m_NewEntryControl.AddString("USERDEFINED"); - m_NewEntryControl.SetCurSel(1); - - UpdateDisplay(1); - - UpdateData(false); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -CTypePropertyPage::~CTypePropertyPage() -{ -} - -void CTypePropertyPage::DoDataExchange(CDataExchange* pDX) -{ - CPropertyPage::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CTypePropertyPage) - DDX_Control(pDX, IDC_TypeMap_TAB, m_TabCtrl); - DDX_Control(pDX, IDC_TypeMap_COMBO_NewEntryStyle, m_NewEntryControl); - DDX_Control(pDX, IDC_TypeMap_EDIT_NewEntryValue, m_NewEntryValueControl); - DDX_Text(pDX, IDC_TypeMap_STATIC_Size, m_TypeMapSize); - DDX_Text(pDX, IDC_TypeMap_STATIC_CurrentEntryStyle, m_CurrentEntryStyle); - DDX_Text(pDX, IDC_TypeMap_STATIC_CurrentEntryValue, m_CurrentEntryValue); - DDX_Text(pDX, IDC_TypeMap_EDIT_NewEntryValue, m_NewEntryValue); - - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CTypePropertyPage, CPropertyPage) - //{{AFX_MSG_MAP(CTypePropertyPage) - ON_BN_CLICKED(IDC_FontMap_BUTTON_NewEntry, OnFontMapBUTTONNewEntry) - ON_BN_CLICKED(IDC_FontMap_BUTTON_UpdateCurrent, OnFontMapBUTTONUpdateCurrent) - ON_EN_CHANGE(IDC_TypeMap_EDIT_NewEntryValue, OnChangeTypeMapEDITNewEntryValue) - ON_NOTIFY(TCN_SELCHANGE, IDC_TypeMap_TAB, OnSelchangeTypeMapTAB) - ON_CBN_SELCHANGE(IDC_TypeMap_COMBO_NewEntryStyle, OnSelchangeTypeMapCOMBONewEntryStyle) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CTypePropertyPage message handlers -void CTypePropertyPage::UpdateDisplay(int CurrentSelectionIndex) -{ - TCollection_AsciiString SizeMessage(myTypeMap->Size()); - m_TypeMapSize = _T(SizeMessage.ToCString()); - - m_TabCtrl.DeleteAllItems(); - - TC_ITEM TabCtrlItem; - TabCtrlItem.mask = TCIF_TEXT; - - for(int i =1;i<=myTypeMap->Size();i++) - { - Aspect_TypeMapEntry aTypeMapEntry = myTypeMap->Entry(i); - TCollection_AsciiString EntryNumerMessage(aTypeMapEntry.Index()); - TabCtrlItem.pszText = (LPSTR) EntryNumerMessage.ToCString(); - m_TabCtrl.InsertItem( aTypeMapEntry.Index(), &TabCtrlItem ); - } - m_TabCtrl.SetCurSel(CurrentSelectionIndex-1); - - // update The Current Selected entry - Aspect_TypeMapEntry aTypeMapEntry = myTypeMap->Entry(CurrentSelectionIndex); - if (aTypeMapEntry. IsAllocated () ) - { - Aspect_LineStyle TypeMapEntryType = aTypeMapEntry.Type() ; - - switch (TypeMapEntryType.Style()) { - case Aspect_TOL_SOLID : m_CurrentEntryStyle = _T("SOLID"); break; - case Aspect_TOL_DASH : m_CurrentEntryStyle = _T("DASH"); break; - case Aspect_TOL_DOT : m_CurrentEntryStyle = _T("DOT"); break; - case Aspect_TOL_DOTDASH : m_CurrentEntryStyle = _T("DOTDASH"); break; - case Aspect_TOL_USERDEFINED : m_CurrentEntryStyle = _T("USERDEFINED"); break; - default : m_CurrentEntryStyle = _T("Underknown"); - } - int NbValue = TypeMapEntryType.Length(); - TCollection_AsciiString Message = BuildValuesAscii(TypeMapEntryType.Values()); - - m_CurrentEntryValue = _T(Message.ToCString()); - - m_NewEntryControl.SetCurSel(TypeMapEntryType.Style()); - m_NewEntryValue = _T(Message.ToCString()); - if (TypeMapEntryType.Style() == Aspect_TOL_USERDEFINED) - m_NewEntryValueControl.SetReadOnly( false ); - else - m_NewEntryValueControl.SetReadOnly( true ); - } - else - { - m_CurrentEntryStyle = _T("Not Allocated"); - m_CurrentEntryValue = _T(""); - m_NewEntryValue = _T("No value"); - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_HIDE); - } -} - -void CTypePropertyPage::OnSelchangeTypeMapTAB(NMHDR* pNMHDR, LRESULT* pResult) -{ - UpdateDisplay(m_TabCtrl.GetCurSel()+1); - UpdateData(false); - *pResult = 0; -} -void CTypePropertyPage::OnSelchangeTypeMapCOMBONewEntryStyle() -{ - UpdateData(true); - // the Type Map entry change in the edit part - if (m_NewEntryControl.GetCurSel() == Aspect_TOL_USERDEFINED) - m_NewEntryValueControl.SetReadOnly( false ); - else - { - m_NewEntryValueControl.SetReadOnly( true ); - - // create a dummy map to extract the default values - Aspect_TypeMapEntry aTypeMapEntry(99,(Aspect_TypeOfLine)m_NewEntryControl.GetCurSel()); - Aspect_LineStyle TypeMapEntryType = aTypeMapEntry.Type() ; - TCollection_AsciiString Message = BuildValuesAscii(TypeMapEntryType.Values()); - - m_NewEntryValue = _T(Message.ToCString()); - } - UpdateData(false); -} - -void CTypePropertyPage::OnChangeTypeMapEDITNewEntryValue() -{ - UpdateData(true); - Handle(TColQuantity_HArray1OfLength) anArray; - Standard_Boolean IsDone = ExtractValues(TCollection_AsciiString((char *)(LPCSTR)m_NewEntryValue),anArray); - if (IsDone) - { - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry)->ShowWindow(SW_SHOW); - } - else - { - GetDlgItem(IDC_FontMap_BUTTON_UpdateCurrent)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_FontMap_BUTTON_NewEntry)->ShowWindow(SW_HIDE); - } -} - -void CTypePropertyPage::OnFontMapBUTTONNewEntry() -{ - UpdateData(true); - int NewEntry; - - if (m_NewEntryControl.GetCurSel() == Aspect_TOL_USERDEFINED) - { - Handle(TColQuantity_HArray1OfLength) anArray; - if (ExtractValues(TCollection_AsciiString((char *)(LPCSTR)m_NewEntryValue),anArray)) - { - Aspect_LineStyle aLineStyle(anArray->Array1()); - NewEntry = myTypeMap->AddEntry( aLineStyle ); - } - else Standard_Failure::Raise(" The String is not Valid "); - } - else - { - Aspect_LineStyle aLineStyle((Aspect_TypeOfLine)m_NewEntryControl.GetCurSel()); - NewEntry = myTypeMap->AddEntry( aLineStyle ); - } - - SetModified(true); - UpdateDisplay(NewEntry); - UpdateData(false); -} - -void CTypePropertyPage::OnFontMapBUTTONUpdateCurrent() -{ - UpdateData(true); - Aspect_TypeMapEntry aTypeMapEntry = myTypeMap->Entry( m_TabCtrl.GetCurSel()+1); - - if (m_NewEntryControl.GetCurSel() == Aspect_TOL_USERDEFINED) - { - Handle(TColQuantity_HArray1OfLength) anArray; - if (ExtractValues(TCollection_AsciiString((char *)(LPCSTR)m_NewEntryValue),anArray)) - { - Aspect_LineStyle aLineStyle(anArray->Array1()); - aTypeMapEntry.SetType( aLineStyle ); - } - else Standard_Failure::Raise(" The String is not Valid "); - } - else - { - Aspect_LineStyle aLineStyle((Aspect_TypeOfLine)m_NewEntryControl.GetCurSel()); - aTypeMapEntry.SetType( aLineStyle ); - } - - myTypeMap->AddEntry(aTypeMapEntry); // in fact just update - - SetModified(true); - UpdateDisplay(m_TabCtrl.GetCurSel()+1); - UpdateData(false); -} - -BOOL CTypePropertyPage::OnApply() -{ - myViewer->SetTypeMap(myTypeMap); - myViewer->Update(); - return CPropertyPage::OnApply(); -} - -Standard_Boolean CTypePropertyPage::ExtractValues(TCollection_AsciiString aMessage, - Handle(TColQuantity_HArray1OfLength)& anArray) // out -{ - TColStd_SequenceOfReal aSequenceOfReal; - Standard_Integer CurrentStartValue=1; - bool NotFinish = true; - while (NotFinish) - { - CurrentStartValue = aMessage.SearchFromEnd(";"); - if ( CurrentStartValue == aMessage.Length()) return Standard_False; - if (CurrentStartValue != -1) - { - TCollection_AsciiString aNewMessage = aMessage.Split(CurrentStartValue); - aMessage.Remove(aMessage.Length()); - if (aNewMessage.IsRealValue()) - aSequenceOfReal.Append(aNewMessage.RealValue()); - else return Standard_False; - } - else - { - if (aMessage.IsRealValue()) - aSequenceOfReal.Append(aMessage.RealValue()); - else return Standard_False; - NotFinish = false; - } - } - - anArray = new TColQuantity_HArray1OfLength(1,aSequenceOfReal.Length()); - for (int i=1;i<=aSequenceOfReal.Length();i++) - anArray->SetValue(i,aSequenceOfReal(aSequenceOfReal.Length()-i+1)); - - return Standard_True; -} - -TCollection_AsciiString CTypePropertyPage::BuildValuesAscii(const TColQuantity_Array1OfLength& anArray) -{ - TCollection_AsciiString Message; - int NbValue = anArray.Length(); - for (int j=1;j<NbValue;j++) - { - Message += anArray(j); - Message += " ; "; - } - Quantity_Length Length = anArray(NbValue); - if (Length > Precision::Confusion()) Message += Length; - else Message += "No value"; - return Message; -} diff --git a/samples/mfc/standard/08_HLR/src/Properties/TypePropertyPage.h b/samples/mfc/standard/08_HLR/src/Properties/TypePropertyPage.h deleted file mode 100755 index 59521c2b20..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/TypePropertyPage.h +++ /dev/null @@ -1,84 +0,0 @@ -// TypePropertyPage.h : header file -// - -#if !defined(AFX_TypePropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_) -#define AFX_TypePropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include <resource.h> - -#include "V2d_Viewer.hxx" -#include "TColQuantity_HArray1OfLength.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CTypePropertyPage dialog - -class CTypePropertyPage : public CPropertyPage -{ -private : - Handle(Aspect_TypeMap) myTypeMap; -private : - Handle(V2d_Viewer) myViewer; -public: - void SetViewer(Handle(V2d_Viewer) aViewer) { - myViewer = aViewer; - myTypeMap = aViewer->TypeMap(); - }; - - DECLARE_DYNCREATE(CTypePropertyPage) - -// Construction -public: - CTypePropertyPage(); - ~CTypePropertyPage(); - -// Dialog Data - //{{AFX_DATA(CTypePropertyPage) - enum { IDD = IDD_DIALOG_Type }; - CTabCtrl m_TabCtrl; - CComboBox m_NewEntryControl; - - CString m_TypeMapSize; - CString m_CurrentEntryStyle; - CString m_CurrentEntryValue; - CEdit m_NewEntryValueControl; - CString m_NewEntryValue; - //}}AFX_DATA - - -// Overrides - // ClassWizard generate virtual function overrides - //{{AFX_VIRTUAL(CTypePropertyPage) - public: - virtual BOOL OnApply(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - // Generated message map functions - //{{AFX_MSG(CTypePropertyPage) - virtual BOOL OnInitDialog(); - afx_msg void OnFontMapBUTTONNewEntry(); - afx_msg void OnFontMapBUTTONUpdateCurrent(); - afx_msg void OnChangeTypeMapEDITNewEntryValue(); - afx_msg void OnSelchangeTypeMapTAB(NMHDR* pNMHDR, LRESULT* pResult); - afx_msg void OnSelchangeTypeMapCOMBONewEntryStyle(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -private: - void UpdateDisplay(int CurrentSelectionIndex); - - TCollection_AsciiString BuildValuesAscii(const TColQuantity_Array1OfLength& anArray); - Standard_Boolean ExtractValues(TCollection_AsciiString aMessage,Handle(TColQuantity_HArray1OfLength)& anArray); - -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_TypePropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/08_HLR/src/Properties/WidthPropertyPage.cpp b/samples/mfc/standard/08_HLR/src/Properties/WidthPropertyPage.cpp deleted file mode 100755 index 521ee2b29a..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/WidthPropertyPage.cpp +++ /dev/null @@ -1,191 +0,0 @@ -// WidthPropertyPage.cpp : implementation file -// - -#include "stdafx.h" - -#include "WidthPropertyPage.h" - -#include "HLRApp.h" -#include "Aspect_WidthMapEntry.hxx" -#include "Aspect_LineStyle.hxx" - -#ifdef _DEBUG -// #define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CWidthPropertyPage property page - -IMPLEMENT_DYNCREATE(CWidthPropertyPage, CPropertyPage) - -CWidthPropertyPage::CWidthPropertyPage() : CPropertyPage(CWidthPropertyPage::IDD) -{ - //{{AFX_DATA_INIT(CWidthPropertyPage) - m_WidthMapSize = _T("Computing..."); - m_EntryType = _T("Computing..."); - m_EntryWidth = _T("Computing..."); - m_NewEntryWidth = 1; - //}}AFX_DATA_INIT -} - -CWidthPropertyPage::~CWidthPropertyPage() -{ -} - -void CWidthPropertyPage::DoDataExchange(CDataExchange* pDX) -{ - CPropertyPage::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CWidthPropertyPage) - DDX_Text (pDX, IDC_WidthMap_STATIC_Size, m_WidthMapSize); - DDX_Control (pDX, IDC_WidthMap_TAB, m_TabCtrl); - DDX_Text (pDX, IDC_WidthMap_STATIC_EntryType, m_EntryType); - DDX_Text (pDX, IDC_WidthMap_STATIC_EntryWidth, m_EntryWidth); - DDX_Control (pDX, IDC_WidthMap_COMBO_NewEntryType, m_NewEntryType); - DDX_Control (pDX, IDC_WidthMap_EDIT_NewEntryWidth, m_NewEntryWidthControl); - DDX_Text (pDX, IDC_WidthMap_EDIT_NewEntryWidth, m_NewEntryWidth); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CWidthPropertyPage, CPropertyPage) - //{{AFX_MSG_MAP(CWidthPropertyPage) - ON_NOTIFY(TCN_SELCHANGE, IDC_WidthMap_TAB, OnSelchangeDialogWidthTAB) - ON_BN_CLICKED(IDC_WidthMap_BUTTON_AddNewEntry, OnWidthMapBUTTONAddNewEntry) - ON_CBN_SELCHANGE(IDC_WidthMap_COMBO_NewEntryType, OnSelchangeWidthMapCOMBONewEntryType) - ON_BN_CLICKED(IDC_WidthMap_BUTTON_UpdateCurrentEntry, OnWidthMapBUTTONUpdateCurrentEntry) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CWidthPropertyPage message handlers - -BOOL CWidthPropertyPage::OnInitDialog() -{ - CPropertyPage::OnInitDialog(); - - // update the CComboBox to add the enumeration possibilities. - m_NewEntryType.AddString( "THIN" ); - m_NewEntryType.AddString( "MEDIUM" ); - m_NewEntryType.AddString( "THICK" ); - m_NewEntryType.AddString( "VERYTHICK" ); - m_NewEntryType.AddString( "USERDEFINED" ); - m_NewEntryType.SetCurSel(0); - - UpdateDisplay(1); - UpdateData(false); - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - - -void CWidthPropertyPage::UpdateDisplay(int CurrentSelectionIndex) -{ - // Update the size of the Width map - TCollection_AsciiString SizeMessage(myWidthMap->Size()); - m_WidthMapSize = _T(SizeMessage.ToCString()); - - // clear the Tab Ctrl - m_TabCtrl.DeleteAllItems(); - TC_ITEM TabCtrlItem; - TabCtrlItem.mask = TCIF_TEXT; - for(int i =1;i<=myWidthMap->Size();i++) - { - Aspect_WidthMapEntry aWidthMapEntry = myWidthMap->Entry(i); - - TCollection_AsciiString EntryNumerMessage(aWidthMapEntry.Index()); - TabCtrlItem.pszText = (LPSTR) EntryNumerMessage.ToCString(); - m_TabCtrl.InsertItem( aWidthMapEntry.Index(), &TabCtrlItem ); - } - m_TabCtrl.SetCurSel(CurrentSelectionIndex-1); - // update the current Entry informations - Aspect_WidthMapEntry aWidthMapEntry = myWidthMap->Entry(CurrentSelectionIndex); - - // update the current entry - switch (aWidthMapEntry.Type()) { - case Aspect_WOL_THIN : m_EntryType = _T("Aspect_WOL_THIN") ; break; - case Aspect_WOL_MEDIUM : m_EntryType = _T("Aspect_WOL_MEDIUM") ; break; - case Aspect_WOL_THICK : m_EntryType = _T("Aspect_WOL_THICK") ; break; - case Aspect_WOL_VERYTHICK : m_EntryType = _T("Aspect_WOL_VERYTHICK") ; break; - case Aspect_WOL_USERDEFINED : m_EntryType = _T("Aspect_WOL_USERDEFINED") ; break; - default : cout<<" Underknown"; - } - - TCollection_AsciiString WidthMessage(aWidthMapEntry.Width()); - m_EntryWidth = _T(WidthMessage.ToCString()); - - // update the edit / new part of the - // also update the edit part - m_NewEntryType.SetCurSel(aWidthMapEntry.Type()); - m_NewEntryWidth = aWidthMapEntry.Width(); - if (aWidthMapEntry.Type() == Aspect_WOL_USERDEFINED) - m_NewEntryWidthControl.SetReadOnly( false); - else - m_NewEntryWidthControl.SetReadOnly( true); - - if (CurrentSelectionIndex == 1) // the item 1 is not editable ( in the map by default ) - GetDlgItem(IDC_WidthMap_BUTTON_UpdateCurrentEntry)->ShowWindow(SW_HIDE); - else - GetDlgItem(IDC_WidthMap_BUTTON_UpdateCurrentEntry)->ShowWindow(SW_SHOW); -} - -void CWidthPropertyPage::OnSelchangeDialogWidthTAB(NMHDR* pNMHDR, LRESULT* pResult) -{ - UpdateDisplay( m_TabCtrl.GetCurSel()+1); - UpdateData(false); - *pResult = 0; -} - -void CWidthPropertyPage::OnSelchangeWidthMapCOMBONewEntryType() -{ - UpdateData(true); - // the Width Map entry change in the edit part - if (m_NewEntryType.GetCurSel() == Aspect_WOL_USERDEFINED) - m_NewEntryWidthControl.SetReadOnly( false); - else - { - m_NewEntryWidthControl.SetReadOnly( true); - Aspect_WidthMapEntry aTmpWidthMapEntry (99,(Aspect_WidthOfLine)m_NewEntryType.GetCurSel()); - m_NewEntryWidth = aTmpWidthMapEntry.Width(); - } - UpdateData(false); -} - -void CWidthPropertyPage::OnWidthMapBUTTONAddNewEntry() -{ - UpdateData(true); - int NewEntry; - if (m_NewEntryType.GetCurSel() == Aspect_WOL_USERDEFINED) - NewEntry =myWidthMap->AddEntry(m_NewEntryWidth); - else - NewEntry =myWidthMap->AddEntry( (Aspect_WidthOfLine)m_NewEntryType.GetCurSel()); - SetModified(true); - UpdateDisplay(NewEntry); - UpdateData(false); -} - -void CWidthPropertyPage::OnWidthMapBUTTONUpdateCurrentEntry() -{ - UpdateData(true); - - Aspect_WidthMapEntry aWidthMapEntry = myWidthMap->Entry( m_TabCtrl.GetCurSel()+1); - - if (m_NewEntryType.GetCurSel() == Aspect_WOL_USERDEFINED) - aWidthMapEntry.SetWidth(m_NewEntryWidth ); - else - aWidthMapEntry.SetType((Aspect_WidthOfLine)m_NewEntryType.GetCurSel()); - - myWidthMap->AddEntry(aWidthMapEntry); // in fact just update - SetModified(true); - UpdateDisplay(m_TabCtrl.GetCurSel()+1); - UpdateData(false); -} - -BOOL CWidthPropertyPage::OnApply() -{ - //AfxGetMainWnd()->SendMessage(WM_USERAPPLY_InMapProperties); - myViewer->SetWidthMap(myWidthMap); - myViewer->Update(); - return CPropertyPage::OnApply(); -} diff --git a/samples/mfc/standard/08_HLR/src/Properties/WidthPropertyPage.h b/samples/mfc/standard/08_HLR/src/Properties/WidthPropertyPage.h deleted file mode 100755 index 5a8e55929f..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/WidthPropertyPage.h +++ /dev/null @@ -1,78 +0,0 @@ -// WidthProperty.h : header file -// - -#if !defined(AFX_WIDTHPROPERTY_H__0F6C04B3_D5DB_11D1_8DDF_0800369C8A03__INCLUDED_) -#define AFX_WIDTHPROPERTY_H__0F6C04B3_D5DB_11D1_8DDF_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include <resource.h> - -#include "Aspect_WidthMap.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CWidthPropertyPage dialog - -class CWidthPropertyPage : public CPropertyPage -{ - DECLARE_DYNCREATE(CWidthPropertyPage) - -private : - Handle(Aspect_WidthMap) myWidthMap; -private : - Handle(V2d_Viewer) myViewer; -public: - void SetViewer(Handle(V2d_Viewer) aViewer) { - myViewer = aViewer; - myWidthMap = aViewer->WidthMap(); - }; - -// Construction -public: - CWidthPropertyPage(); - ~CWidthPropertyPage(); - -// Dialog Data - //{{AFX_DATA(CWidthPropertyPage) - enum { IDD = IDD_DIALOG_Width }; - CString m_WidthMapSize; - CTabCtrl m_TabCtrl; - CString m_EntryType; - CString m_EntryWidth; - CComboBox m_NewEntryType; - CEdit m_NewEntryWidthControl; - double m_NewEntryWidth; - //}}AFX_DATA - - -// Overrides - // ClassWizard generate virtual function overrides - //{{AFX_VIRTUAL(CWidthPropertyPage) - public: - virtual BOOL OnApply(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - // Generated message map functions - //{{AFX_MSG(CWidthPropertyPage) - afx_msg void OnSelchangeDialogWidthTAB(NMHDR* pNMHDR, LRESULT* pResult); - virtual BOOL OnInitDialog(); - afx_msg void OnWidthMapBUTTONAddNewEntry(); - afx_msg void OnSelchangeWidthMapCOMBONewEntryType(); - afx_msg void OnWidthMapBUTTONUpdateCurrentEntry(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - void UpdateDisplay(int CurrentSelectionIndex); -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_WIDTHPROPERTY_H__0F6C04B3_D5DB_11D1_8DDF_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/08_HLR/src/Properties/colornewcolorrampcolormapDialog.h b/samples/mfc/standard/08_HLR/src/Properties/colornewcolorrampcolormapDialog.h deleted file mode 100755 index f6472b100c..0000000000 --- a/samples/mfc/standard/08_HLR/src/Properties/colornewcolorrampcolormapDialog.h +++ /dev/null @@ -1,64 +0,0 @@ -// ColorNewColorRampColorMapDialog.h : header file -// - -#if !defined(AFX_ColorNewColorRampColorMapDialog_H__A45F6973_DB41_11D1_8DE5_0800369C8A03__INCLUDED_) -#define AFX_ColorNewColorRampColorMapDialog_H__A45F6973_DB41_11D1_8DE5_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include <resource.h> - -///////////////////////////////////////////////////////////////////////////// -// CColorNewColorRampColorMapDialog dialog - -class CColorNewColorRampColorMapDialog : public CDialog -{ -private : - Handle(Aspect_ColorMap) myColorMap; - -// Construction -public: - CColorNewColorRampColorMapDialog(CWnd* pParent = NULL); // standard constructor - Handle(Aspect_ColorMap) ColorMap() {return myColorMap;}; - -// Dialog Data - //{{AFX_DATA(CColorNewColorRampColorMapDialog) - enum { IDD = IDD_DIALOG_NewColorRamp }; - CComboBox m_ColorList; - int m_base_pixel; - int m_dimension; - double m_Red; - double m_Green; - double m_Blue; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CColorNewColorRampColorMapDialog) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CColorNewColorRampColorMapDialog) - virtual void OnOK(); - afx_msg void OnColorMapRampBUTTONEditColor(); - virtual BOOL OnInitDialog(); - afx_msg void OnChangeColorMapRampEDITColorRed(); - afx_msg void OnChangeColorMapRampEDITColorGreen(); - afx_msg void OnChangeColorMapRampEDITColorBlue(); - afx_msg void OnSelchangeColorMapCOMBONewEntryColorName(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_ColorNewColorRampColorMapDialog_H__A45F6973_DB41_11D1_8DE5_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp b/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp index e631b7f1fb..3a560890f8 100755 --- a/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp +++ b/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp @@ -122,22 +122,19 @@ void CSelectionDialog::OnDisplay(bool isFit) { GetDlgItem(IDC_DUMMYBUTTON)->SetRedraw(true); if(!myDisplay) { - Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice = - ((CHLRApp*)AfxGetApp())->GetGraphicDevice(); + Handle(Graphic3d_GraphicDriver) aGraphicDriver = + ((CHLRApp*)AfxGetApp())->GetGraphicDriver(); - myActiveViewer = new V3d_Viewer(theGraphicDevice,(short *) "Visu3D"); + myActiveViewer = new V3d_Viewer(aGraphicDriver,(short *) "Visu3D"); myActiveViewer->SetDefaultLights(); myActiveViewer->SetLightOn(); myActiveView = myActiveViewer->CreateView(); - Handle(WNT_Window) aWNTWindow = new WNT_Window(theGraphicDevice, - GetDlgItem(IDC_DUMMYBUTTON)->GetSafeHwnd(), - Quantity_NOC_GRAY); + Handle(WNT_Window) aWNTWindow = new WNT_Window(GetDlgItem(IDC_DUMMYBUTTON)->GetSafeHwnd(), + Quantity_NOC_GRAY); - aWNTWindow->SetDoubleBuffer(Standard_False); - - if (m_DegeneratedModeOn) myActiveView->SetDegenerateModeOn(); - myActiveView->SetWindow(aWNTWindow); + if (m_DegeneratedModeOn) myActiveView->SetDegenerateModeOn(); + myActiveView->SetWindow(aWNTWindow); myInteractiveContext = new AIS_InteractiveContext(myActiveViewer); @@ -210,7 +207,7 @@ void CSelectionDialog::OnGetShape() void CSelectionDialog::Apply() { SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myDoc->GetInteractiveContext2D()->EraseAll(Standard_False); + myDoc->GetInteractiveContext2D()->EraseAll(/*Standard_False*/); UpdateData(true); Standard_Integer DisplayMode = m_DisplayMode; @@ -312,108 +309,112 @@ void CSelectionDialog::OnHApparentContour() { Apply(); } void CSelectionDialog::OnChangeEDITNBIsos() -{ - UpdateData(true); - myDisplayableShape->SetNbIsos(m_NbIsos); - Apply(); +{ + UpdateData(true); + myDisplayableShape->SetNbIsos(m_NbIsos); + Apply(); } void CSelectionDialog::OnAlgo() -{ ShowHideButton(); +{ + ShowHideButton(); Apply(); } void CSelectionDialog::OnPolyAlgo() -{ ShowHideButton(); +{ + ShowHideButton(); Apply(); } void CSelectionDialog::OnDrawHiddenLine() { UpdateData(true); - if (m_DisplayMode >=6 ) - { m_DisplayMode=0; - UpdateData(false); } - ShowHideButton(); - Apply(); + if(m_DisplayMode >=6 ) + { + m_DisplayMode=0; + UpdateData(false); + } + ShowHideButton(); + Apply(); } void CSelectionDialog::OnUpdate2D() { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myDoc->ActivateFrame(RUNTIME_CLASS(OCC_2dView),SW_NORMAL); - UpdateProjector(); - Apply(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); + myDoc->ActivateFrame(RUNTIME_CLASS(OCC_2dView),SW_NORMAL); + UpdateProjector(); + Apply(); + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); } void CSelectionDialog::OnTopView() { - myActiveView->SetProj(V3d_Zpos); - OnDisplay(true); + myActiveView->SetProj(V3d_Zpos); + OnDisplay(true); } void CSelectionDialog::OnBottomView() { - myActiveView->SetProj(V3d_Zneg); - OnDisplay(true); + myActiveView->SetProj(V3d_Zneg); + OnDisplay(true); } void CSelectionDialog::OnLeftView() { - myActiveView->SetProj(V3d_Ypos); - OnDisplay(true); + myActiveView->SetProj(V3d_Ypos); + OnDisplay(true); } void CSelectionDialog::OnRightView() { - myActiveView->SetProj(V3d_Yneg); - OnDisplay(true); + myActiveView->SetProj(V3d_Yneg); + OnDisplay(true); } void CSelectionDialog::OnFrontView() { - myActiveView->SetProj(V3d_Xpos); - OnDisplay(true); + myActiveView->SetProj(V3d_Xpos); + OnDisplay(true); } void CSelectionDialog::OnBackView() { - myActiveView->SetProj(V3d_Xneg); - OnDisplay(true); + myActiveView->SetProj(V3d_Xneg); + OnDisplay(true); } void CSelectionDialog::OnAxoView() { - myActiveView->SetProj(V3d_XposYnegZpos); - OnDisplay(true); + myActiveView->SetProj(V3d_XposYnegZpos); + OnDisplay(true); } void CSelectionDialog::OnDegeneratedMode() { - UpdateData(true); + UpdateData(true); - if(m_DegeneratedModeOn) - { - myActiveView->SetDegenerateModeOn(); - m_DegeneratedModeOn = Standard_True; - } - else - { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myActiveView->SetDegenerateModeOff(); - m_DegeneratedModeOn = Standard_False; - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); - } - OnDisplay(false); + if(m_DegeneratedModeOn) + { + myActiveView->SetDegenerateModeOn(); + m_DegeneratedModeOn = Standard_True; + } + else + { + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); + myActiveView->SetDegenerateModeOff(); + m_DegeneratedModeOn = Standard_False; + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); + } + OnDisplay(false); } void CSelectionDialog::OnLButtonDown(UINT nFlags, CPoint point) { - CDialog::OnLButtonDown(nFlags, point); + CDialog::OnLButtonDown(nFlags, point); - if ((myPosMinX > point.x)||(myPosMaxX < point.x) || - (myPosMinY > point.y) ||(myPosMaxY < point.y)) - return; + if ((myPosMinX > point.x)||(myPosMaxX < point.x) || + (myPosMinY > point.y) ||(myPosMaxY < point.y)) + return; // save the current mouse coordinate myXmax=point.x; myYmax=point.y; @@ -421,91 +422,88 @@ void CSelectionDialog::OnLButtonDown(UINT nFlags, CPoint point) void CSelectionDialog::OnLButtonUp(UINT nFlags, CPoint point) { - CDialog::OnLButtonUp(nFlags, point); + CDialog::OnLButtonUp(nFlags, point); - if ((myPosMinX > point.x)||(myPosMaxX < point.x) || - (myPosMinY > point.y) ||(myPosMaxY < point.y)) - return; + if ((myPosMinX > point.x)||(myPosMaxX < point.x) || + (myPosMinY > point.y) ||(myPosMaxY < point.y)) + return; } void CSelectionDialog::OnRButtonDown(UINT nFlags, CPoint point) { - CDialog::OnRButtonDown(nFlags, point); + CDialog::OnRButtonDown(nFlags, point); - if ((myPosMinX > point.x)||(myPosMaxX < point.x) || - (myPosMinY > point.y) ||(myPosMaxY < point.y)) - return; + if ((myPosMinX > point.x)||(myPosMaxX < point.x) || + (myPosMinY > point.y) ||(myPosMaxY < point.y)) + return; - if ( nFlags & CASCADESHORTCUTKEY ) - { - if (!m_DegeneratedModeOn) - myActiveView->SetDegenerateModeOn(); - myActiveView->StartRotation(point.x,point.y); - OnDisplay(false); - } + if ( nFlags & CASCADESHORTCUTKEY ) + { + if (!m_DegeneratedModeOn) + myActiveView->SetDegenerateModeOn(); + myActiveView->StartRotation(point.x,point.y); + OnDisplay(false); + } } void CSelectionDialog::OnRButtonUp(UINT nFlags, CPoint point) { - CDialog::OnRButtonUp(nFlags, point); + CDialog::OnRButtonUp(nFlags, point); - if ((myPosMinX > point.x)||(myPosMaxX < point.x) || - (myPosMinY > point.y) ||(myPosMaxY < point.y)) - return; + if ((myPosMinX > point.x)||(myPosMaxX < point.x) || + (myPosMinY > point.y) ||(myPosMaxY < point.y)) + return; - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - // reset tyhe good Degenerated mode according to the strored one - // --> dynamic rotation may have change it - if (!m_DegeneratedModeOn) - myActiveView->SetDegenerateModeOff(); - else - myActiveView->SetDegenerateModeOn(); - OnDisplay(false); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); + // reset tyhe good Degenerated mode according to the strored one + // --> dynamic rotation may have change it + if (!m_DegeneratedModeOn) + myActiveView->SetDegenerateModeOff(); + else + myActiveView->SetDegenerateModeOn(); + OnDisplay(false); + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); } void CSelectionDialog::OnMouseMove(UINT nFlags, CPoint point) { - CDialog::OnMouseMove(nFlags, point); + CDialog::OnMouseMove(nFlags, point); - if ((myPosMinX > point.x)||(myPosMaxX < point.x) || - (myPosMinY > point.y) ||(myPosMaxY < point.y)) - return; + if ((myPosMinX > point.x)||(myPosMaxX < point.x) || + (myPosMinY > point.y) ||(myPosMaxY < point.y)) + return; - // ============================ LEFT BUTTON ======================= if ( nFlags & MK_LBUTTON) + {//left button + if ( nFlags & CASCADESHORTCUTKEY ) { - if ( nFlags & CASCADESHORTCUTKEY ) - { - // move with MB1 and Control : on the dynamic zooming - // Do the zoom in function of mouse's coordinates - myActiveView->Zoom(myXmax,myYmax,point.x,point.y); - // save the current mouse coordinate - myXmax = point.x; myYmax = point.y; - }// if ( nFlags & CASCADESHORTCUTKEY ) else - } else // if ( nFlags & MK_LBUTTON) - // ============================ MIDDLE BUTTON ======================= - if ( nFlags & MK_MBUTTON) + // move with MB1 and Control : on the dynamic zooming + // Do the zoom in function of mouse's coordinates + myActiveView->Zoom(myXmax,myYmax,point.x,point.y); + // save the current mouse coordinate + myXmax = point.x; myYmax = point.y; + }// if ( nFlags & CASCADESHORTCUTKEY ) else + } + else if ( nFlags & MK_MBUTTON) + { + if ( nFlags & CASCADESHORTCUTKEY ) { - if ( nFlags & CASCADESHORTCUTKEY ) - { - myActiveView->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) + myActiveView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning + myXmax = point.x; myYmax = point.y; + } + } + else if ( nFlags & MK_RBUTTON) + {//right button + if ( nFlags & CASCADESHORTCUTKEY ) { - if ( nFlags & CASCADESHORTCUTKEY ) - { - myActiveView->Rotation(point.x,point.y); - } - } else //if ( nFlags & MK_RBUTTON) - // ============================ NO BUTTON ======================= - { // No buttons - myXmax = point.x; myYmax = point.y; - } - OnDisplay(false); + myActiveView->Rotation(point.x,point.y); + } + } + else + {// No buttons + myXmax = point.x; myYmax = point.y; + } + OnDisplay(false); } void CSelectionDialog::OnOK() @@ -515,7 +513,6 @@ void CSelectionDialog::OnOK() void CSelectionDialog::OnPaint() { - CPaintDC dc(this); // device context for painting - - OnDisplay(false); + CPaintDC dc(this); // device context for painting + OnDisplay(false); } diff --git a/samples/mfc/standard/08_HLR/src/SelectionDialog.h b/samples/mfc/standard/08_HLR/src/SelectionDialog.h index c6f7cc6b6a..a618541d77 100755 --- a/samples/mfc/standard/08_HLR/src/SelectionDialog.h +++ b/samples/mfc/standard/08_HLR/src/SelectionDialog.h @@ -16,95 +16,95 @@ class CHLRDoc; class CSelectionDialog : public CDialog { -// Construction + // Construction public: - void SetTitle(CString& aTitle); - CSelectionDialog(CHLRDoc* aDoc,CWnd* pParent = NULL); // standard constructor - void OnDisplay(bool isfit); + void SetTitle(CString& aTitle); + CSelectionDialog(CHLRDoc* aDoc,CWnd* pParent = NULL); // standard constructor + void OnDisplay(bool isfit); -// Dialog Data - //{{AFX_DATA(CSelectionDialog) - enum { IDD = IDD_SelectionDialog }; - int m_Algo; - int m_DisplayMode; - int m_NbIsos; - BOOL m_DrawHiddenLine; - BOOL m_DegeneratedModeOn; - //}}AFX_DATA + // Dialog Data + //{{AFX_DATA(CSelectionDialog) + enum { IDD = IDD_SelectionDialog }; + int m_Algo; + int m_DisplayMode; + int m_NbIsos; + BOOL m_DrawHiddenLine; + BOOL m_DegeneratedModeOn; + //}}AFX_DATA -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CSelectionDialog) - protected: - virtual void DoDataExchange(CDataExchange* pDX); - //}}AFX_VIRTUAL + // Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CSelectionDialog) +protected: + virtual void DoDataExchange(CDataExchange* pDX); + //}}AFX_VIRTUAL -// Implementation + // Implementation protected: - // Generated message map functions - //{{AFX_MSG(CSelectionDialog) - virtual BOOL OnInitDialog(); - afx_msg void OnGetShape(); - afx_msg void OnDisplayDefault(); - afx_msg void OnVIsoParametrics(); - afx_msg void OnVApparentContour(); - afx_msg void OnVSewingEdges(); - afx_msg void OnVsharpEdges(); - afx_msg void OnVsmoothEdges(); - afx_msg void OnHsharpEdges(); - afx_msg void OnHsmoothEdges(); - afx_msg void OnHSewingEdges(); - afx_msg void OnHIsoParametrics(); - afx_msg void OnHApparentContour(); - afx_msg void OnChangeEDITNBIsos(); - afx_msg void OnAlgo(); - afx_msg void OnPolyAlgo(); - afx_msg void OnUpdate2D(); - afx_msg void OnTopView(); - afx_msg void OnBottomView(); - afx_msg void OnLeftView(); - afx_msg void OnRightView(); - afx_msg void OnFrontView(); - afx_msg void OnBackView(); - afx_msg void OnAxoView(); - virtual void OnOK(); - afx_msg void OnLButtonDown(UINT nFlags, CPoint point); - afx_msg void OnLButtonUp(UINT nFlags, CPoint point); - afx_msg void OnRButtonDown(UINT nFlags, CPoint point); - afx_msg void OnRButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnDrawHiddenLine(); - afx_msg void OnDegeneratedMode(); - afx_msg void OnPaint(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() + // Generated message map functions + //{{AFX_MSG(CSelectionDialog) + virtual BOOL OnInitDialog(); + afx_msg void OnGetShape(); + afx_msg void OnDisplayDefault(); + afx_msg void OnVIsoParametrics(); + afx_msg void OnVApparentContour(); + afx_msg void OnVSewingEdges(); + afx_msg void OnVsharpEdges(); + afx_msg void OnVsmoothEdges(); + afx_msg void OnHsharpEdges(); + afx_msg void OnHsmoothEdges(); + afx_msg void OnHSewingEdges(); + afx_msg void OnHIsoParametrics(); + afx_msg void OnHApparentContour(); + afx_msg void OnChangeEDITNBIsos(); + afx_msg void OnAlgo(); + afx_msg void OnPolyAlgo(); + afx_msg void OnUpdate2D(); + afx_msg void OnTopView(); + afx_msg void OnBottomView(); + afx_msg void OnLeftView(); + afx_msg void OnRightView(); + afx_msg void OnFrontView(); + afx_msg void OnBackView(); + afx_msg void OnAxoView(); + virtual void OnOK(); + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + afx_msg void OnRButtonDown(UINT nFlags, CPoint point); + afx_msg void OnRButtonUp(UINT nFlags, CPoint point); + afx_msg void OnMouseMove(UINT nFlags, CPoint point); + afx_msg void OnDrawHiddenLine(); + afx_msg void OnDegeneratedMode(); + afx_msg void OnPaint(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() private : - void UpdateProjector(); - void ShowHideButton(Standard_Boolean EnableButton=Standard_True;); - void Apply(); - CHLRDoc* myDoc; + void UpdateProjector(); + void ShowHideButton(Standard_Boolean EnableButton=Standard_True;); + void Apply(); + CHLRDoc* myDoc; - Handle(V3d_Viewer) myActiveViewer ; - Handle(V3d_View) myActiveView; - Standard_Integer myPosMaxX, myPosMinX ,myBoxX; - Standard_Integer myPosMinY, myPosMaxY ,myBoxY; - Standard_Integer myXmax; - Standard_Integer myYmax; + Handle(V3d_Viewer) myActiveViewer; + Handle(V3d_View) myActiveView; + Standard_Integer myPosMaxX, myPosMinX ,myBoxX; + Standard_Integer myPosMinY, myPosMaxY ,myBoxY; + Standard_Integer myXmax; + Standard_Integer myYmax; - Handle(AIS_InteractiveContext) myInteractiveContext; - Handle(AIS_Trihedron) myTrihedron; - Handle(ISession2D_Shape) myDisplayableShape; + Handle(AIS_InteractiveContext) myInteractiveContext; + Handle(AIS_Trihedron) myTrihedron; + Handle(ISession2D_Shape) myDisplayableShape; protected: - CBitmapButton TopView ; - CBitmapButton BottomView ; - CBitmapButton LeftView ; - CBitmapButton RightView ; - CBitmapButton FrontView ; - CBitmapButton BackView ; - CBitmapButton AxoView ; - bool myDisplay; + CBitmapButton TopView ; + CBitmapButton BottomView ; + CBitmapButton LeftView ; + CBitmapButton RightView ; + CBitmapButton FrontView ; + CBitmapButton BackView ; + CBitmapButton AxoView ; + bool myDisplay; }; //{{AFX_INSERT_LOCATION}} diff --git a/samples/mfc/standard/08_HLR/src/StdAfx.h b/samples/mfc/standard/08_HLR/src/StdAfx.h index ce954309c8..e910af7bfc 100755 --- a/samples/mfc/standard/08_HLR/src/StdAfx.h +++ b/samples/mfc/standard/08_HLR/src/StdAfx.h @@ -143,36 +143,18 @@ #include <gp_Pnt2d.hxx> #include <gp_Vec.hxx> #include <gp_Vec2d.hxx> -#include <Graphic2d_Array1OfVertex.hxx> -#include <Graphic2d_Buffer.hxx> -#include <Graphic2d_CircleMarker.hxx> -#include <Graphic2d_DisplayList.hxx> -#include <Graphic2d_Drawer.hxx> -#include <Graphic2d_PolyLine.hxx> -#include <Graphic2d_Segment.hxx> -#include <Graphic2d_SetOfCurves.hxx> -#include <Graphic2d_SetOfSegments.hxx> -#include <Graphic2d_Text.hxx> -#include <Graphic2d_Vertex.hxx> -#include <Graphic2d_View.hxx> -#include <Graphic3d_WNTGraphicDevice.hxx> #include <MMgt_TShared.hxx> #include <OSD_Environment.hxx> #include <Precision.hxx> #include <Prs3d_IsoAspect.hxx> #include <Prs3d_LineAspect.hxx> #include <Prs3d_Text.hxx> -#include <PrsMgr_PresentationManager2d.hxx> #include <Quantity_Factor.hxx> #include <Quantity_Length.hxx> #include <Quantity_NameOfColor.hxx> #include <Quantity_PhysicalQuantity.hxx> #include <Quantity_PlaneAngle.hxx> #include <Quantity_TypeOfColor.hxx> -#include <Select2D_SensitiveArc.hxx> -#include <Select2D_SensitiveBox.hxx> -#include <Select2D_SensitiveEntity.hxx> -#include <Select2D_SensitiveSegment.hxx> #include <SelectBasics_BasicTool.hxx> #include <SelectBasics_ListOfBox2d.hxx> #include <SelectMgr_EntityOwner.hxx> @@ -180,12 +162,6 @@ #include <SelectMgr_Selection.hxx> #include <SelectMgr_SelectionManager.hxx> -// for opencasdade - -//#include <Session_Selection.hxx> -//#include <Session_Session.hxx> -//#include <ShapeSchema.hxx> - #include <Standard_Boolean.hxx> #include <Standard_CString.hxx> #include <Standard_ErrorHandler.hxx> @@ -198,9 +174,6 @@ #include <StdPrs_Curve.hxx> #include <StdPrs_Point.hxx> #include <StdPrs_PoleCurve.hxx> -#include <StdSelect_SensitiveText2d.hxx> -#include <StdSelect_TextProjector2d.hxx> -#include <StdSelect_ViewerSelector2d.hxx> #include <TCollection_AsciiString.hxx> #include <TColgp_Array1OfPnt2d.hxx> #include <TColgp_HArray1OfPnt2d.hxx> @@ -216,11 +189,8 @@ #include <TopoDS_Solid.hxx> #include <TopTools_HSequenceOfShape.hxx> #include <UnitsAPI.hxx> -#include <V2d_View.hxx> -#include <V2d_Viewer.hxx> #include <V3d_View.hxx> #include <V3d_Viewer.hxx> -#include <WNT_WDriver.hxx> #include <WNT_Window.hxx> #include <HLRAlgo_Projector.hxx> diff --git a/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj b/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj index 928dedb730..9831ef4128 100644 --- a/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj +++ b/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj @@ -111,7 +111,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bind/Animation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -153,7 +153,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bind/Animation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -196,7 +196,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bin/Animation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -239,7 +239,7 @@ <SuppressStartupBanner>true</SuppressStartupBanner> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bin/Animation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/09_Animation/adm/win/vc11/Animation.vcxproj b/samples/mfc/standard/09_Animation/adm/win/vc11/Animation.vcxproj index bcd3df32a9..b0a4b25ae5 100644 --- a/samples/mfc/standard/09_Animation/adm/win/vc11/Animation.vcxproj +++ b/samples/mfc/standard/09_Animation/adm/win/vc11/Animation.vcxproj @@ -115,7 +115,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bind/Animation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -157,7 +157,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bind/Animation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -200,7 +200,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bin/Animation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -243,7 +243,7 @@ <SuppressStartupBanner>true</SuppressStartupBanner> </ResourceCompile> <Link> - <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKBRep.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bin/Animation.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/09_Animation/adm/win/vc8/Animation.vcproj b/samples/mfc/standard/09_Animation/adm/win/vc8/Animation.vcproj index e147d62ce1..b85e6ba0ef 100644 --- a/samples/mfc/standard/09_Animation/adm/win/vc8/Animation.vcproj +++ b/samples/mfc/standard/09_Animation/adm/win/vc8/Animation.vcproj @@ -80,7 +80,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win32\vc8\bind/Animation.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -177,7 +177,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win64\vc8\bind/Animation.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -275,7 +275,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win32\vc8\bin/Animation.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -372,7 +372,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win64\vc8\bin/Animation.exe" LinkIncremental="1" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/09_Animation/adm/win/vc9/Animation.vcproj b/samples/mfc/standard/09_Animation/adm/win/vc9/Animation.vcproj index 9285871ed4..409e407251 100644 --- a/samples/mfc/standard/09_Animation/adm/win/vc9/Animation.vcproj +++ b/samples/mfc/standard/09_Animation/adm/win/vc9/Animation.vcproj @@ -81,7 +81,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win32\vc9\bind/Animation.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -177,7 +177,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win64\vc9\bind/Animation.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -274,7 +274,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win32\vc9\bin/Animation.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -370,7 +370,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib mfcsample.lib TKBO.lib" + AdditionalDependencies="TKBRep.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib mfcsample.lib TKBO.lib" OutputFile="../../../..\win64\vc9\bin/Animation.exe" LinkIncremental="1" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/09_Animation/src/AnimationApp.cpp b/samples/mfc/standard/09_Animation/src/AnimationApp.cpp index 0db676840b..40619815e3 100755 --- a/samples/mfc/standard/09_Animation/src/AnimationApp.cpp +++ b/samples/mfc/standard/09_Animation/src/AnimationApp.cpp @@ -11,7 +11,7 @@ #include "AnimationView3D.h" #include "..\..\Common\res\OCC_Resource.h" -BEGIN_MESSAGE_MAP(CAnimationApp, OCC_3dApp) +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. @@ -23,9 +23,9 @@ END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CAnimationApp construction -CAnimationApp::CAnimationApp() +CAnimationApp::CAnimationApp() : OCC_App() { - SampleName = "Animation"; //for about dialog + SampleName = "Animation"; //for about dialog } ///////////////////////////////////////////////////////////////////////////// @@ -92,7 +92,7 @@ void CAnimationApp::OnAppAbout() CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CAnimationView3D *pView = (CAnimationView3D *) pChild->GetActiveView(); pView -> OnStop(); - OCC_3dApp::OnAppAbout(); + 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 index 1a110cb0d7..a05ecb3b86 100755 --- a/samples/mfc/standard/09_Animation/src/AnimationApp.h +++ b/samples/mfc/standard/09_Animation/src/AnimationApp.h @@ -8,28 +8,28 @@ #pragma once #endif // _MSC_VER >= 1000 -#include <OCC_3dApp.h> +#include <OCC_App.h> -class CAnimationApp : public OCC_3dApp +class CAnimationApp : public OCC_App { public: - CAnimationApp(); + + 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() + 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 + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAnimationApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL }; - ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} diff --git a/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp b/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp index a157f88ec3..1729c3795d 100755 --- a/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp +++ b/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp @@ -359,7 +359,7 @@ void CAnimationDoc::OnFileLoadgrid() "Points Files (*.pnt;*.pnts)|*.pnt; *.pnts|All Files (*.*)|*.*||", NULL ); - CString initdir(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir()); + CString initdir(((OCC_App*) AfxGetApp())->GetInitDataDir()); initdir += "\\..\\..\\Data\\"; dlg.m_ofn.lpstrInitialDir = initdir; diff --git a/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp b/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp index c514304701..42d1591d4b 100755 --- a/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp +++ b/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp @@ -237,19 +237,24 @@ CAnimationDoc* CAnimationView3D::GetDocument() // non-debug version is inline // CAnimationView3D message handlers void CAnimationView3D::OnFileExportImage() { - CFileDialog dlg(FALSE,_T("*.BMP"),NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - _T("BMP Files (*.BMP)|*.bmp |GIF Files (*.GIF)|*.gif | PNG Files (*.PNG)|*.png" - "|JPEG Files (*.JPEG)|*.jpeg | PPM Files (*.PPM)|*.ppm | TIFF Files (*.TIFF)" - "|*.tiff | TGA Files (*.TGA)|*.tga | EXR Files (*.EXR)|*.exr||"), - NULL ); - - if (dlg.DoModal() == IDOK) + CFileDialog aDlg (FALSE, "*.BMP", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, + "BMP Files (*.BMP)|*.bmp|" + "GIF Files (*.GIF)|*.gif|" + "PNG Files (*.PNG)|*.png|" + "JPEG Files (*.JPEG)|*.jpeg|" + "PPM Files (*.PPM)|*.ppm|" + "TIFF Files (*.TIFF)|*.tiff|" + "TGA Files (*.TGA)|*.tga|" + "EXR Files (*.EXR)|*.exr||", + NULL); + if (aDlg.DoModal() != IDOK) { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - CString aFileName = dlg.GetPathName(); - myView->Dump(aFileName); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); + return; } + + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); + myView->Dump (aDlg.GetPathName()); + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); } void CAnimationView3D::OnSize(UINT nType, int cx, int cy) diff --git a/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj b/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj index 9a0f3a0a69..b4a50409b1 100644 --- a/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj +++ b/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj @@ -113,7 +113,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bin/Convert.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -158,7 +158,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bin/Convert.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -202,7 +202,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\bind/Convert.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc10\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -246,7 +246,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\bind/Convert.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc10\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/10_Convert/adm/win/vc11/Convert.vcxproj b/samples/mfc/standard/10_Convert/adm/win/vc11/Convert.vcxproj index 0350d2ab30..24a936b32a 100644 --- a/samples/mfc/standard/10_Convert/adm/win/vc11/Convert.vcxproj +++ b/samples/mfc/standard/10_Convert/adm/win/vc11/Convert.vcxproj @@ -117,7 +117,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bin/Convert.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -162,7 +162,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bin/Convert.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -206,7 +206,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\bind/Convert.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win32\vc11\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -250,7 +250,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\bind/Convert.exe</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\..\win64\vc11\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/samples/mfc/standard/10_Convert/adm/win/vc8/Convert.vcproj b/samples/mfc/standard/10_Convert/adm/win/vc8/Convert.vcproj index 78142c3fa8..6a2d8ffc07 100644 --- a/samples/mfc/standard/10_Convert/adm/win/vc8/Convert.vcproj +++ b/samples/mfc/standard/10_Convert/adm/win/vc8/Convert.vcproj @@ -81,7 +81,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" + AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" OutputFile="../../../..\win32\vc8\bin/Convert.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -180,7 +180,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" + AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" OutputFile="../../../..\win64\vc8\bin/Convert.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -278,7 +278,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" + AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" OutputFile="../../../..\win32\vc8\bind/Convert.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -376,7 +376,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" + AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" OutputFile="../../../..\win64\vc8\bind/Convert.exe" LinkIncremental="2" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/10_Convert/adm/win/vc9/Convert.vcproj b/samples/mfc/standard/10_Convert/adm/win/vc9/Convert.vcproj index f1a67a10ea..ec31b97c40 100644 --- a/samples/mfc/standard/10_Convert/adm/win/vc9/Convert.vcproj +++ b/samples/mfc/standard/10_Convert/adm/win/vc9/Convert.vcproj @@ -82,7 +82,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" + AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" OutputFile="../../../..\win32\vc9\bin/Convert.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -180,7 +180,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" + AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" OutputFile="../../../..\win64\vc9\bin/Convert.exe" LinkIncremental="1" SuppressStartupBanner="true" @@ -277,7 +277,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" + AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" OutputFile="../../../..\win32\vc9\bind/Convert.exe" LinkIncremental="2" SuppressStartupBanner="true" @@ -374,7 +374,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV2d.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" + AdditionalDependencies="FWOSPlugin.lib PTKernel.lib TKBool.lib TKCAF.lib TKCDF.lib TKernel.lib TKFeat.lib TKFillet.lib TKGeomAlgo.lib TKHLR.lib TKMath.lib TKOffset.lib TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKV3d.lib TKBRep.lib TKG2d.lib TKG3d.lib TKGeomBase.lib mfcsample.lib" OutputFile="../../../..\win64\vc9\bind/Convert.exe" LinkIncremental="2" SuppressStartupBanner="true" diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.cpp b/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.cpp index a63132880c..6fbb30da22 100755 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.cpp +++ b/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.cpp @@ -26,19 +26,17 @@ END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // COCCDemoApp construction -COCCDemoApp::COCCDemoApp() +COCCDemoApp::COCCDemoApp() : OCC_App() { - // TODO: add construction code here, - // Place all significant initialization in InitInstance - SampleName = ""; + SampleName = ""; try { Handle(Aspect_DisplayConnection) aDisplayConnection; myGraphicDriver = Graphic3d::InitGraphicDriver (aDisplayConnection); } - catch(Standard_Failure) - { - AfxMessageBox("Fatal Error During Graphic Initialisation"); + catch (Standard_Failure) + { + AfxMessageBox ("Fatal Error During Graphic Initialisation"); } } diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.h b/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.h index ee7f12fbd2..180976da8a 100755 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.h +++ b/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.h @@ -14,41 +14,41 @@ #include "resource.h" // main symbols -#include <OCC_BaseApp.h> +#include <OCC_App.h> ///////////////////////////////////////////////////////////////////////////// // COCCDemoApp: // See OCCDemo.cpp for the implementation of this class // -class COCCDemoApp : public OCC_BaseApp +class COCCDemoApp : public OCC_App { public: + COCCDemoApp(); - Handle(Graphic3d_GraphicDriver) GetGraphicDriver() const - { return myGraphicDriver; } ; + + Handle(Graphic3d_GraphicDriver) GetGraphicDriver() const { return myGraphicDriver; } // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COCCDemoApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL + // 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() + //{{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}} diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp index 089a21dc73..70798193fb 100755 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp +++ b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp @@ -225,39 +225,28 @@ void COCCDemoDoc::OnUpdateBUTTONShowResult(CCmdUI* pCmdUI) void COCCDemoDoc::OnDumpView() { - // save current directory and restore it on exit - char aCurPath[MAX_PATH]; - ::GetCurrentDirectory(MAX_PATH, aCurPath); - - ::SetCurrentDirectory(myLastPath); - - CFileDialog *aDlg = new CFileDialog(false, "gif", "OCCView.gif", - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, "GIF Files (*.gif)|*.gif||", NULL); - - int result = aDlg->DoModal(); - if ( result == IDOK) + CFileDialog aDlg (false, "gif", "OCCView.gif", OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, + "GIF Files (*.GIF)|*.gif|" + "BMP Files (*.BMP)|*.bmp|" + "PNG Files (*.PNG)|*.png|" + "JPEG Files (*.JPEG)|*.jpeg|" + "PPM Files (*.PPM)|*.ppm|" + "TIFF Files (*.TIFF)|*.tiff|" + "TGA Files (*.TGA)|*.tga|" + "EXR Files (*.EXR)|*.exr||", NULL); + if (aDlg.DoModal() != IDOK) { - CString aFileName = aDlg->GetFileName(); - delete aDlg; - - POSITION pos = GetFirstViewPosition(); - while (pos != NULL) - { - COCCDemoView* pView = (COCCDemoView*) GetNextView(pos); - pView->UpdateWindow(); - } - - myViewer->InitActiveViews(); - Handle(V3d_View) aView = myViewer->ActiveView(); - char aStrFileName[MAX_PATH]; - strcpy_s(aStrFileName, aFileName); - aView->Dump(aStrFileName); + return; } - else - delete aDlg; - - ::GetCurrentDirectory(MAX_PATH, myLastPath); - ::SetCurrentDirectory(aCurPath); + + for (POSITION aPos = GetFirstViewPosition(); aPos != NULL;) + { + COCCDemoView* pView = (COCCDemoView* )GetNextView (aPos); + pView->UpdateWindow(); + } + myViewer->InitActiveViews(); + Handle(V3d_View) aView = myViewer->ActiveView(); + aView->Dump (aDlg.GetPathName()); } void COCCDemoDoc::Fit() diff --git a/samples/mfc/standard/Common/ISession2D/ISession2D_InteractiveContext.cpp b/samples/mfc/standard/Common/ISession2D/ISession2D_InteractiveContext.cpp deleted file mode 100755 index 9a69acc514..0000000000 --- a/samples/mfc/standard/Common/ISession2D/ISession2D_InteractiveContext.cpp +++ /dev/null @@ -1,461 +0,0 @@ -// File: ISession2D_InteractiveContext.cxx -// Created: Thu Jul 10 18:53:50 1997 -// Author: David Enjolras -// <den@zodiax.paris3.matra-dtv.fr> - - -#include "stdafx.h" -#include <OCC_MainFrame.h>// use for Message Bar - -#include "ISession2D_InteractiveContext.h" -#include <SelectMgr_EntityOwner.hxx> -#include <PrsMgr_PresentationManager2d.hxx> -#include <SelectMgr_SelectionManager.hxx> -#include <StdSelect_TextProjector2d.hxx> - -IMPLEMENT_STANDARD_HANDLE(ISession2D_InteractiveContext,MMgt_TShared) -IMPLEMENT_STANDARD_RTTIEXT(ISession2D_InteractiveContext,MMgt_TShared) - -#include "ISession2D_ObjectOwner.h" -#include "TColStd_MapIteratorOfMapOfTransient.hxx" - - ISession2D_InteractiveContext::ISession2D_InteractiveContext() -{ -} - - ISession2D_InteractiveContext::ISession2D_InteractiveContext(const Handle(V2d_Viewer)& aViewer) -{ - Initialize(aViewer); -} - -void ISession2D_InteractiveContext::Initialize(const Handle(V2d_Viewer)& aViewer) -{ - ASSERT(!aViewer.IsNull()); - myViewer = aViewer; - myPrsmgr = new PrsMgr_PresentationManager2d(myViewer->View()); - mySelectionManager = new SelectMgr_SelectionManager(); - mySelector = new StdSelect_ViewerSelector2d(); - - mySelector->Set(3); - // set Sensitivity very very important for SensitiveCurve !! - mySelector->SetSensitivity (0.5); // en mm - mySelectionManager->Add(mySelector); - myHilightColorIndex = 5; // for dynamic highlight - IsAreasDisplayed = Standard_False; - - myPrsmgr->SetHighlightColor(8); // For Static highlight -} - -void ISession2D_InteractiveContext::Display (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw ) -{ - ASSERT(!anObject.IsNull()); - myObjects.Add(anObject); - - Standard_Integer DispMode ,HiMode,SelMode; - GetDefModes(anObject,DispMode ,HiMode,SelMode); - - myPrsmgr->Display(anObject,DispMode); - - mySelectionManager->Load(anObject,mySelector); - mySelectionManager->Activate(anObject,SelMode,mySelector); - - if (Redraw) myViewer->Update(); -} - -void ISession2D_InteractiveContext::Display (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Integer aDisplayMode, - const Standard_Integer aSelectionMode, - const Standard_Boolean Redraw ) -{ - ASSERT(!anObject.IsNull()); - myObjects.Add(anObject); - ASSERT(anObject->AcceptDisplayMode(aDisplayMode)); - anObject->SetDisplayMode(aDisplayMode); - - anObject->SetSelectionMode(aSelectionMode); - - myObjects.Add(anObject); - myPrsmgr->Display(anObject,aDisplayMode); - - mySelectionManager->Load(anObject,mySelector); - mySelectionManager->Activate(anObject,aSelectionMode,mySelector); - if (Redraw) myViewer->Update(); -} - -void ISession2D_InteractiveContext::Erase (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw ) -{ - ASSERT(!myPrsmgr.IsNull()); - ASSERT(!anObject.IsNull()); - ASSERT(myObjects.Contains(anObject)); - Standard_Integer DispMode ,HiMode,SelMode; - GetDefModes(anObject,DispMode ,HiMode,SelMode); - myPrsmgr->Erase(anObject,DispMode); - mySelectionManager->Deactivate(anObject,mySelector); - if (Redraw) myViewer->Update(); -} - -void ISession2D_InteractiveContext::DisplayAll(const Standard_Boolean Redraw ) -{ - ASSERT(!myPrsmgr.IsNull()); - - TColStd_MapIteratorOfMapOfTransient It(myObjects); - for(;It.More();It.Next()){ - Handle(AIS_InteractiveObject) anObject = Handle(AIS_InteractiveObject)::DownCast(It.Key()); - Standard_Integer DispMode ,HiMode,SelMode; - GetDefModes(anObject,DispMode ,HiMode,SelMode); - myPrsmgr->Display(anObject,DispMode); - mySelectionManager->Load(anObject,mySelector); - mySelectionManager->Activate(anObject,HiMode,mySelector); - } - if (Redraw) myViewer->Update(); -} - -void ISession2D_InteractiveContext::EraseAll (const Standard_Boolean Redraw ) -{ - ASSERT(!myPrsmgr.IsNull()); - TColStd_MapIteratorOfMapOfTransient It(myObjects); - for(;It.More();It.Next()){ - Handle(AIS_InteractiveObject) anObject = Handle(AIS_InteractiveObject)::DownCast(It.Key()); - Standard_Integer DispMode ,HiMode,SelMode; - GetDefModes(anObject,DispMode ,HiMode,SelMode); - myPrsmgr->Erase(anObject,DispMode); - mySelectionManager->Deactivate(anObject,mySelector); - } - if (Redraw) myViewer->Update(); -} - -Standard_Boolean ISession2D_InteractiveContext::IsDisplayed(const Handle(AIS_InteractiveObject)& anObject, - const Standard_Integer aMode) -{ - ASSERT(!myPrsmgr.IsNull()); - ASSERT(!anObject.IsNull()); - return myPrsmgr->IsDisplayed(anObject,aMode); -} - -void ISession2D_InteractiveContext::Redisplay(const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw, - const Standard_Boolean allmodes) -{ - ASSERT(!myPrsmgr.IsNull()); - ASSERT(!anObject.IsNull()); - ASSERT(myObjects.Contains(anObject)); - - Standard_Integer DispMode ,HiMode,SelMode; - GetDefModes(anObject,DispMode ,HiMode,SelMode); - myPrsmgr->Update(anObject,DispMode); - - // WARNING : IMPLEMENTATION IS NOT FINISH !!!!!!!! - // NEED TO UPDATE THE OTHER MODES, AND SELECTION !!!!! - - // mySelectionManager->Load(anObject,mySelector); - // mySelectionManager->Activate(anObject,SelMode,mySelector); - - if (Redraw) myViewer->Update(); - -} - -void ISession2D_InteractiveContext::Clear (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw) -{ - ASSERT(!myPrsmgr.IsNull()); - ASSERT(!anObject.IsNull()); - ASSERT(myObjects.Contains(anObject)); - - Standard_Failure::Raise("NotYetImplemented"); -} - -void ISession2D_InteractiveContext::Remove (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw) -{ - ASSERT(!myPrsmgr.IsNull()); - ASSERT(!anObject.IsNull()); - ASSERT(myObjects.Contains(anObject)); - Erase(anObject,Redraw); - myObjects.Remove(anObject); -} - -void ISession2D_InteractiveContext::Highlight (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw) -{ - ASSERT(!myPrsmgr.IsNull()); - ASSERT(!anObject.IsNull()); - ASSERT(myObjects.Contains(anObject)); - Standard_Integer DispMode ,HiMode,SelMode; - GetDefModes(anObject,DispMode ,HiMode,SelMode); - myPrsmgr->Highlight(anObject,HiMode); - if(Redraw) myViewer->Update(); -} - -void ISession2D_InteractiveContext::Unhighlight (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw) -{ - ASSERT(!myPrsmgr.IsNull()); - ASSERT(!anObject.IsNull()); - ASSERT(myObjects.Contains(anObject)); - Standard_Integer DispMode ,HiMode,SelMode; - GetDefModes(anObject,DispMode ,HiMode,SelMode); - myPrsmgr->Unhighlight(anObject,HiMode); - if(Redraw) myViewer->Update(); -} - -Standard_Boolean ISession2D_InteractiveContext::IsHilighted(const Handle(AIS_InteractiveObject)& anObject) -{ - ASSERT(!myPrsmgr.IsNull()); - ASSERT(!anObject.IsNull()); - ASSERT(myObjects.Contains(anObject)); - Standard_Integer DispMode ,HiMode,SelMode; - GetDefModes(anObject,DispMode ,HiMode,SelMode); - return myPrsmgr->IsHighlighted(anObject,HiMode); -} - -Standard_Boolean ISession2D_InteractiveContext::NewProjector(const Handle(V2d_View)& aView, - Handle(Select2D_Projector)& NewProjector) // out parameter. -{ - // to be changed : here we build a new projector each time. - // or we have to define a new one only if we change : - // the View - // the view zoom factor - // the view panning - // the fonts changes. - NewProjector = new StdSelect_TextProjector2d(aView); - return Standard_True; -} - -// Manage Detected : update The Display -/*private*/ void ISession2D_InteractiveContext::ManageDetected(TColStd_MapOfTransient& aNewMapOfDetectedOwner) -{ - Standard_Boolean NeedRedraw = Standard_False; - //====================================================================== - // Treatement on the old Selection : - // for each owner : - // if the object is decomposed : Unhighlight the Owner, - // else Unhighlight the Object,except if selected - //====================================================================== - - TColStd_MapIteratorOfMapOfTransient anIterator(myMapOfDetectedOwner); - for (;anIterator.More(); - anIterator.Next()) - { - // for all owner : - Handle(ISession2D_ObjectOwner) TheOwner = - Handle(ISession2D_ObjectOwner)::DownCast(anIterator.Key()); - - Handle(AIS_InteractiveObject) TheObject = - Handle(AIS_InteractiveObject)::DownCast(TheOwner->Selectable()); - - // if the owner is not still detected - if (!aNewMapOfDetectedOwner.Contains(TheOwner)) - { - NeedRedraw = Standard_True; - // if the corresponding object is a Shape and is not Decomposed - Handle(AIS_Shape) anAISShape = Handle(AIS_Shape)::DownCast(TheObject); - Standard_Boolean TreatementOnCompleteObject = Standard_True; - if (!anAISShape.IsNull()) - if (anAISShape->AcceptShapeDecomposition() && anAISShape->HasSelectionMode()) - TreatementOnCompleteObject = Standard_False; - if(TreatementOnCompleteObject) - { - // if the corresponding object is not Selected - if (!myMapOfSelectedOwner.Contains(TheOwner)) - { - Standard_Integer DispMode ,HiMode,SelMode; - GetDefModes(TheObject,DispMode ,HiMode,SelMode); - if ( myPrsmgr->IsHighlighted(TheObject)) - myPrsmgr->Unhighlight(TheObject,HiMode); - } - } - else - { - // UnHighlight the old detected Owner, - TheOwner->Unhilight(myPrsmgr); - } - } - } - - //====================================================================== - // Treatement on the New Selection - //====================================================================== - - anIterator.Initialize(aNewMapOfDetectedOwner); - if (!anIterator.More()) ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Nothing Detected"); - for (;anIterator.More(); - anIterator.Next()) - { - // for all owner : - Handle(ISession2D_ObjectOwner) TheOwner = - Handle(ISession2D_ObjectOwner)::DownCast(anIterator.Key()); - // update the message bar - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage(TheOwner->DumpMessage().ToCString()); - Handle(AIS_InteractiveObject) TheObject = - Handle(AIS_InteractiveObject)::DownCast(TheOwner->Selectable()); - - // if the owner is not alwraidy detected - if (!myMapOfDetectedOwner.Contains(TheOwner)) - { - NeedRedraw = Standard_True; - - // if the corresponding object is a Shape and is not Decomposed - Handle(AIS_Shape) anAISShape = Handle(AIS_Shape)::DownCast(TheObject); - Standard_Boolean TreatementOnCompleteObject = Standard_True; - if (!anAISShape.IsNull()) - if (anAISShape->AcceptShapeDecomposition() && anAISShape->HasSelectionMode()) - TreatementOnCompleteObject = Standard_False; - if(TreatementOnCompleteObject) - { - // if the corresponding object is not Selected - if (!myMapOfSelectedOwner.Contains(TheOwner)) - { - Standard_Integer DispMode ,HiMode,SelMode; - GetDefModes(TheObject,DispMode ,HiMode,SelMode); - if (!myPrsmgr->IsHighlighted(TheObject)) - myPrsmgr->ColorHighlight(TheObject,myHilightColorIndex,HiMode); - } - } - else - { - // The Object Is Decomposed --> Specific Treatement on the owner - TheOwner->Hilight(myPrsmgr); - } - } - } - //====================================================================== - // set the new detected map - //====================================================================== - - // set The new detected Owner - myMapOfDetectedOwner = aNewMapOfDetectedOwner; - - if (NeedRedraw) myViewer->Update(); -} - -void ISession2D_InteractiveContext::Move(const Standard_Integer x1, - const Standard_Integer y1, - const Handle(V2d_View)& aView) -{ - Handle(Select2D_Projector) aProjector; - if (NewProjector(aView,aProjector)) // if we need a new projector - mySelector->Set(aProjector); - - mySelector->Pick(x1,y1,aView); - TColStd_MapOfTransient aNewMapOfDetectedOwner; - mySelector->Init(); - if(mySelector->More()) - { - Handle(SelectMgr_EntityOwner) aOwner = mySelector->OnePicked(); - ASSERT(aOwner->IsKind(STANDARD_TYPE(ISession2D_ObjectOwner))); - Handle(ISession2D_ObjectOwner) aNewDetectedObjectOwner = - Handle(ISession2D_ObjectOwner)::DownCast(aOwner); - aNewMapOfDetectedOwner.Add(aNewDetectedObjectOwner); - } - -ManageDetected(aNewMapOfDetectedOwner); - -} - -void ISession2D_InteractiveContext::Move(const Standard_Integer x1, - const Standard_Integer y1, - const Standard_Integer x2, - const Standard_Integer y2, - const Handle(V2d_View)& aView) -{ - Handle(Select2D_Projector) aProjector; - if (NewProjector(aView,aProjector)) // if we need a new projector - mySelector->Set(aProjector); - - mySelector->Pick(x1,y1,x2,y2,aView); - TColStd_MapOfTransient aNewMapOfDetectedOwner; - for(mySelector->Init();mySelector->More();mySelector->Next()) - { - Handle(SelectMgr_EntityOwner) aOwner = mySelector->Picked(); - ASSERT(aOwner->IsKind(STANDARD_TYPE(ISession2D_ObjectOwner))); - Handle(ISession2D_ObjectOwner) aNewDetectedObjectOwner = - Handle(ISession2D_ObjectOwner)::DownCast(aOwner); - aNewMapOfDetectedOwner.Add(aNewDetectedObjectOwner); - } - ManageDetected(aNewMapOfDetectedOwner); -} - -void ISession2D_InteractiveContext::Pick(const Standard_Boolean MultiSelection)// = Standard_False -{ - // We have a Map of all the seletected owners : myMapOfSelectedOwner; - // if we are not in MultiSelection. - // UnHighLight and keep out the map all the last selected objects - - if (!MultiSelection) - { - TColStd_MapIteratorOfMapOfTransient anIterator(myMapOfSelectedOwner); - for (;anIterator.More(); - anIterator.Next()) - { - Handle(ISession2D_ObjectOwner) TheOwner = - Handle(ISession2D_ObjectOwner)::DownCast(anIterator.Key()); - Handle(AIS_InteractiveObject) TheObject = - Handle(AIS_InteractiveObject)::DownCast(TheOwner->Selectable()); - - // UnHighLight The Last Selected ObjectObject. - Unhighlight(TheObject, // Object - Standard_False); // Redraw - } - myMapOfSelectedOwner.Clear(); - } - - TColStd_MapIteratorOfMapOfTransient anIterator(myMapOfDetectedOwner); - for (;anIterator.More(); - anIterator.Next()) - { - // for all owner : - Handle(ISession2D_ObjectOwner) TheOwner = - Handle(ISession2D_ObjectOwner)::DownCast(anIterator.Key()); - myMapOfSelectedOwner.Add(TheOwner); - - Handle(AIS_InteractiveObject) TheObject = - Handle(AIS_InteractiveObject)::DownCast(TheOwner->Selectable()); - Highlight(TheObject, // Object - Standard_False); // Redraw - } - myViewer->Update(); -} - -//======================================================================= -//function : GetDefModes -//purpose : -//======================================================================= - -void ISession2D_InteractiveContext::GetDefModes(const Handle(AIS_InteractiveObject)& anObject, - Standard_Integer& DispMode, - Standard_Integer& HiMode, - Standard_Integer& SelMode) -{ - DispMode = anObject->HasDisplayMode() ? anObject->DisplayMode() : - anObject->DefaultDisplayMode(); - - HiMode = anObject->HasHilightMode()? anObject->HilightMode():DispMode; - - SelMode = anObject->HasSelectionMode()? anObject->SelectionMode() : - 0; -} - -void ISession2D_InteractiveContext::DisplayAreas() -{ - if (IsAreasDisplayed) return; - myViewer->InitActiveViews(); - while(myViewer->MoreActiveViews()) - { - Handle(V2d_View) aView = myViewer->ActiveView(); - mySelector->DisplayAreas(aView); - myViewer->NextActiveViews(); - } - myViewer->Update(); - IsAreasDisplayed= Standard_True; -} -void ISession2D_InteractiveContext::ClearAreas() -{ - if (!IsAreasDisplayed) return; - mySelector->ClearAreas(); - myViewer->Update(); - IsAreasDisplayed= Standard_False; -} - - diff --git a/samples/mfc/standard/Common/ISession2D/ISession2D_InteractiveContext.h b/samples/mfc/standard/Common/ISession2D/ISession2D_InteractiveContext.h deleted file mode 100755 index 9f60421a6a..0000000000 --- a/samples/mfc/standard/Common/ISession2D/ISession2D_InteractiveContext.h +++ /dev/null @@ -1,149 +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 _ISession2D_InteractiveContext_HeaderFile -#define _ISession2D_InteractiveContext_HeaderFile - -#include <Standard_Macro.hxx> -#include <Standard_DefineHandle.hxx> - -#include "SelectMgr_SelectableObject.hxx" -#include "AIS_InteractiveObject.hxx" -#include <Select2D_Projector.hxx> -#include <TColStd_MapOfTransient.hxx> -#include <StdSelect_ViewerSelector2d.hxx> - -DEFINE_STANDARD_HANDLE(ISession2D_InteractiveContext,MMgt_TShared) -class ISession2D_InteractiveContext : public MMgt_TShared { - -public: - - // Methods PUBLIC - // -Standard_EXPORT ISession2D_InteractiveContext(); -Standard_EXPORT ISession2D_InteractiveContext(const Handle(V2d_Viewer)& aViewer); -virtual void Initialize(const Handle(V2d_Viewer)& aViewer) ; - -Standard_EXPORT virtual void Display (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw = Standard_True) ; -Standard_EXPORT void Display (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Integer aDisplayMode, - const Standard_Integer aSelectionMode, - const Standard_Boolean Redraw ); -virtual void Erase (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw = Standard_True) ; - -virtual void DisplayAll(const Standard_Boolean Redraw = Standard_True); -virtual void EraseAll (const Standard_Boolean Redraw = Standard_True); - - -virtual Standard_Boolean IsDisplayed(const Handle(AIS_InteractiveObject)& anObject, - const Standard_Integer aMode = -1) ; - -virtual void Redisplay(const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw = Standard_True, - const Standard_Boolean allmodes =Standard_False); - - -virtual void Clear (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw = Standard_True); - - -virtual void Remove (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw = Standard_True); - -virtual void Highlight (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw = Standard_True); - -virtual void Unhighlight (const Handle(AIS_InteractiveObject)& anObject, - const Standard_Boolean Redraw = Standard_True); - - -virtual Standard_Boolean IsHilighted(const Handle(AIS_InteractiveObject)& anObject); - -private : -Standard_Boolean NewProjector(const Handle(V2d_View)& aView, - Handle(Select2D_Projector)& NewProjector); // out parameter. -void ManageDetected(TColStd_MapOfTransient& NewMapOfDetectedOwner); -public: -virtual void Move(const Standard_Integer x1, - const Standard_Integer y1, - const Handle(V2d_View)& aView) ; -virtual void Move(const Standard_Integer x1, - const Standard_Integer y1, - const Standard_Integer x2, - const Standard_Integer y2, - const Handle(V2d_View)& aView) ; - -virtual void Pick(const Standard_Boolean MultiSelection = Standard_False); - -private : -Standard_Boolean IsAreasDisplayed; -public : -void DisplayAreas() ; -void ClearAreas() ; - - -DEFINE_STANDARD_RTTI(ISession2D_InteractiveContext) - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - -Handle(V2d_Viewer) myViewer; -Handle(PrsMgr_PresentationManager2d) myPrsmgr; - -TColStd_MapOfTransient myObjects; - - - -Standard_Integer myHilightColorIndex; -Handle(SelectMgr_SelectionManager) mySelectionManager; -Handle(StdSelect_ViewerSelector2d) mySelector; - -TColStd_MapOfTransient myMapOfDetectedOwner; -TColStd_MapOfTransient myMapOfSelectedOwner; - - - -static void GetDefModes(const Handle(AIS_InteractiveObject)& anObject, - Standard_Integer& DispMode, - Standard_Integer& HiMode, - Standard_Integer& SelMode) ; - - -}; - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/samples/mfc/standard/Common/ISession2D/ISession2D_ObjectOwner.cpp b/samples/mfc/standard/Common/ISession2D/ISession2D_ObjectOwner.cpp deleted file mode 100755 index 84d9deb91f..0000000000 --- a/samples/mfc/standard/Common/ISession2D/ISession2D_ObjectOwner.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "stdafx.h" - -#include "ISession2D_ObjectOwner.h" -#include <PrsMgr_PresentationManager2d.hxx> - -IMPLEMENT_STANDARD_HANDLE(ISession2D_ObjectOwner,SelectMgr_EntityOwner) -IMPLEMENT_STANDARD_RTTIEXT(ISession2D_ObjectOwner,SelectMgr_EntityOwner) - -ISession2D_ObjectOwner::ISession2D_ObjectOwner(const Standard_Integer aPriority) //= 0 -:SelectMgr_EntityOwner(aPriority) -{} -ISession2D_ObjectOwner::ISession2D_ObjectOwner(const Handle(SelectMgr_SelectableObject)& aSO, - const Standard_Integer aPriority ) //= 0 -:SelectMgr_EntityOwner(aSO,aPriority) -{} - - -// Presentation Management -void ISession2D_ObjectOwner::Hilight(const Handle(PrsMgr_PresentationManager)& aPM, - const Standard_Integer aMode) // = 0 -{ - ASSERT(aPM->IsKind(STANDARD_TYPE(PrsMgr_PresentationManager2d))); - if (myGo.IsNull()) - { - Handle(Graphic2d_View) aView = Handle(PrsMgr_PresentationManager2d)::DownCast(aPM)->StructureManager(); - myGo = new Graphic2d_GraphicObject(aView); - } - - Handle(Graphic2d_Text) text; - text = new Graphic2d_Text(myGo, myDumpMessage, 0, 0, 0,Aspect_TOT_SOLID,1.5); - text->SetZoomable(Standard_False); - myGo->Display(); -} - -void ISession2D_ObjectOwner::Unhilight(const Handle(PrsMgr_PresentationManager)& aPM, - const Standard_Integer aMode) // = 0 -{ - if (myGo.IsNull()) return; - myGo->RemovePrimitives(); - myGo->Display(); - myGo->Remove(); -} - diff --git a/samples/mfc/standard/Common/ISession2D/ISession2D_ObjectOwner.h b/samples/mfc/standard/Common/ISession2D/ISession2D_ObjectOwner.h deleted file mode 100755 index 6000cef144..0000000000 --- a/samples/mfc/standard/Common/ISession2D/ISession2D_ObjectOwner.h +++ /dev/null @@ -1,62 +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 _ISession2D_ObjectOwner_HeaderFile -#define _ISession2D_ObjectOwner_HeaderFile - -#include <Standard_Macro.hxx> -#include <Standard_DefineHandle.hxx> - -#include <SelectMgr_EntityOwner.hxx> - -DEFINE_STANDARD_HANDLE(ISession2D_ObjectOwner,SelectMgr_EntityOwner) -class ISession2D_ObjectOwner : public SelectMgr_EntityOwner { - -public: - - // Methods PUBLIC - // -ISession2D_ObjectOwner(const Standard_Integer aPriority = 0); -ISession2D_ObjectOwner(const Handle(SelectMgr_SelectableObject)& aSO,const Standard_Integer aPriority = 0); -DEFINE_STANDARD_RTTI(ISession2D_ObjectOwner) - -// Presentation Management -protected : -Handle(Graphic2d_GraphicObject) myGo; -public : -virtual void Hilight(const Handle(PrsMgr_PresentationManager)& aPM,const Standard_Integer aMode = 0) ; -virtual void Unhilight(const Handle(PrsMgr_PresentationManager)& aPM,const Standard_Integer aMode = 0) ; - -// Message Management -private: - TCollection_AsciiString myDumpMessage; - -public : -void SetDumpMessage(TCollection_AsciiString NewDumpMessage) -{ myDumpMessage = NewDumpMessage;} -TCollection_AsciiString DumpMessage() -{ return myDumpMessage;} -Standard_OStream& Dump(Standard_OStream& aStream) -{ aStream<<myDumpMessage; - return aStream;} -friend Standard_EXPORT Standard_OStream& operator << (Standard_OStream& astream,const Handle(ISession2D_ObjectOwner)& aOwner) -{ return aOwner->Dump(astream);} -}; - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.cpp b/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.cpp index fda3e6bedf..08bff8204a 100755 --- a/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.cpp +++ b/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.cpp @@ -45,14 +45,6 @@ void ISession2D_Shape::SetNbIsos(Standard_Integer& aNbIsos) }; - -/* virtual private */ void ISession2D_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode) -{ -} -/* virtual private */ void ISession2D_Shape::Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation) -{ -} - void ISession2D_Shape::BuildAlgo() { myAlgo = new HLRBRep_Algo(); @@ -72,12 +64,11 @@ void ISession2D_Shape::BuildPolyAlgo() myPolyAlgo->Update(); } -/* virtual private */ void ISession2D_Shape::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, - const Handle(Graphic2d_GraphicObject)& aGrObj, +void ISession2D_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, + const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode) { Standard_Integer TheMode = aMode; - Standard_Boolean DrawHiddenLine= Standard_True; if (TheMode >= 1000) { @@ -95,175 +86,227 @@ void ISession2D_Shape::BuildPolyAlgo() TopoDS_Shape Rg1LineVCompound; TopoDS_Shape RgNLineVCompound; TopoDS_Shape OutLineVCompound; - TopoDS_Shape IsoLineVCompound; // only fro Exact algo + TopoDS_Shape IsoLineVCompound; // only for Exact algo TopoDS_Shape HCompound; TopoDS_Shape Rg1LineHCompound; TopoDS_Shape RgNLineHCompound; TopoDS_Shape OutLineHCompound; - TopoDS_Shape IsoLineHCompound; // only fro Exact algo + TopoDS_Shape IsoLineHCompound; // only for Exact algo if (UsePolyAlgo) - { - if (myPolyAlgo.IsNull()) BuildPolyAlgo(); - HLRBRep_PolyHLRToShape aPolyHLRToShape; - aPolyHLRToShape.Update(myPolyAlgo); + { + if (myPolyAlgo.IsNull()) BuildPolyAlgo(); + HLRBRep_PolyHLRToShape aPolyHLRToShape; + aPolyHLRToShape.Update(myPolyAlgo); - VCompound = aPolyHLRToShape.VCompound(); - Rg1LineVCompound = aPolyHLRToShape.Rg1LineVCompound(); - RgNLineVCompound = aPolyHLRToShape.RgNLineVCompound(); - OutLineVCompound = aPolyHLRToShape.OutLineVCompound(); - HCompound = aPolyHLRToShape.HCompound(); - Rg1LineHCompound = aPolyHLRToShape.Rg1LineHCompound(); - RgNLineHCompound = aPolyHLRToShape.RgNLineHCompound(); - OutLineHCompound = aPolyHLRToShape.OutLineHCompound(); - } - else - { - if (myAlgo.IsNull()) BuildAlgo(); - HLRBRep_HLRToShape aHLRToShape(myAlgo); - - VCompound = aHLRToShape.VCompound(); - Rg1LineVCompound = aHLRToShape.Rg1LineVCompound(); - RgNLineVCompound = aHLRToShape.RgNLineVCompound(); - OutLineVCompound = aHLRToShape.OutLineVCompound(); - IsoLineVCompound = aHLRToShape.IsoLineVCompound(); - HCompound = aHLRToShape.HCompound(); - Rg1LineHCompound = aHLRToShape.Rg1LineHCompound(); - RgNLineHCompound = aHLRToShape.RgNLineHCompound(); - OutLineHCompound = aHLRToShape.OutLineHCompound(); - IsoLineHCompound = aHLRToShape.IsoLineHCompound(); - } - - if (UsePolyAlgo) - { - Handle(Graphic2d_SetOfSegments) aSetOfVSegmentsHighLighted = new Graphic2d_SetOfSegments(aGrObj); - Handle(Graphic2d_SetOfSegments) aSetOfVSegments = new Graphic2d_SetOfSegments(aGrObj); - - if (TheMode == 1) DrawCompound(VCompound , aSetOfVSegmentsHighLighted); - else DrawCompound(VCompound , aSetOfVSegments); - if (TheMode == 2) DrawCompound(Rg1LineVCompound , aSetOfVSegmentsHighLighted); - else DrawCompound(Rg1LineVCompound , aSetOfVSegments); - if (TheMode == 3) DrawCompound(RgNLineVCompound , aSetOfVSegmentsHighLighted); - else DrawCompound(RgNLineVCompound , aSetOfVSegments); - if (TheMode == 4) DrawCompound(OutLineVCompound , aSetOfVSegmentsHighLighted); - else DrawCompound(OutLineVCompound , aSetOfVSegments); - - aSetOfVSegmentsHighLighted->SetColorIndex (1); - aSetOfVSegmentsHighLighted->SetWidthIndex (1); - aSetOfVSegmentsHighLighted->SetTypeIndex (1); - aSetOfVSegments->SetColorIndex (2); - aSetOfVSegments->SetWidthIndex (2); - if (DrawHiddenLine) - { - Handle(Graphic2d_SetOfSegments) aSetOfHSegmentsHighLighted = new Graphic2d_SetOfSegments(aGrObj); - Handle(Graphic2d_SetOfSegments) aSetOfHSegments = new Graphic2d_SetOfSegments(aGrObj); - if (TheMode == 6) DrawCompound(HCompound , aSetOfHSegmentsHighLighted); - else DrawCompound(HCompound , aSetOfHSegments); - if (TheMode == 7) DrawCompound(Rg1LineHCompound , aSetOfHSegmentsHighLighted); - else DrawCompound(Rg1LineHCompound , aSetOfHSegments); - if (TheMode == 8) DrawCompound(RgNLineHCompound , aSetOfHSegmentsHighLighted); - else DrawCompound(RgNLineHCompound , aSetOfHSegments); - if (TheMode == 9) DrawCompound(OutLineHCompound , aSetOfHSegmentsHighLighted); - else DrawCompound(OutLineHCompound , aSetOfHSegments); - - aSetOfVSegments->SetTypeIndex (2); - aSetOfHSegmentsHighLighted->SetColorIndex (3); - aSetOfHSegmentsHighLighted->SetWidthIndex (3); - aSetOfHSegmentsHighLighted->SetTypeIndex (3); - aSetOfHSegments->SetColorIndex (4); - aSetOfHSegments->SetWidthIndex (4); - aSetOfHSegments->SetTypeIndex (4); - } + VCompound = aPolyHLRToShape.VCompound(); + Rg1LineVCompound = aPolyHLRToShape.Rg1LineVCompound(); + RgNLineVCompound = aPolyHLRToShape.RgNLineVCompound(); + OutLineVCompound = aPolyHLRToShape.OutLineVCompound(); + HCompound = aPolyHLRToShape.HCompound(); + Rg1LineHCompound = aPolyHLRToShape.Rg1LineHCompound(); + RgNLineHCompound = aPolyHLRToShape.RgNLineHCompound(); + OutLineHCompound = aPolyHLRToShape.OutLineHCompound(); } else { - Handle(Graphic2d_SetOfCurves) aSetOfVCurvesHighLighted = new Graphic2d_SetOfCurves(aGrObj); - Handle(Graphic2d_SetOfCurves) aSetOfVCurves = new Graphic2d_SetOfCurves(aGrObj); + if (myAlgo.IsNull()) BuildAlgo(); + HLRBRep_HLRToShape aHLRToShape(myAlgo); - if (TheMode == 1) DrawCompound(VCompound , aSetOfVCurvesHighLighted); - else DrawCompound(VCompound , aSetOfVCurves); - if (TheMode == 2) DrawCompound(Rg1LineVCompound , aSetOfVCurvesHighLighted); - else DrawCompound(Rg1LineVCompound , aSetOfVCurves); - if (TheMode == 3) DrawCompound(RgNLineVCompound , aSetOfVCurvesHighLighted); - else DrawCompound(RgNLineVCompound , aSetOfVCurves); - if (TheMode == 4) DrawCompound(OutLineVCompound , aSetOfVCurvesHighLighted); - else DrawCompound(OutLineVCompound , aSetOfVCurves); - if (TheMode == 5) DrawCompound(IsoLineVCompound , aSetOfVCurvesHighLighted); - else DrawCompound(IsoLineVCompound , aSetOfVCurves); - aSetOfVCurvesHighLighted->SetColorIndex (1); - aSetOfVCurvesHighLighted->SetWidthIndex (1); - aSetOfVCurvesHighLighted->SetTypeIndex (1); - aSetOfVCurves->SetColorIndex (2); - aSetOfVCurves->SetWidthIndex (2); - aSetOfVCurves->SetTypeIndex (2); + VCompound = aHLRToShape.VCompound(); + Rg1LineVCompound = aHLRToShape.Rg1LineVCompound(); + RgNLineVCompound = aHLRToShape.RgNLineVCompound(); + OutLineVCompound = aHLRToShape.OutLineVCompound(); + IsoLineVCompound = aHLRToShape.IsoLineVCompound(); + HCompound = aHLRToShape.HCompound(); + Rg1LineHCompound = aHLRToShape.Rg1LineHCompound(); + RgNLineHCompound = aHLRToShape.RgNLineHCompound(); + OutLineHCompound = aHLRToShape.OutLineHCompound(); + IsoLineHCompound = aHLRToShape.IsoLineHCompound(); + } - if (DrawHiddenLine) + if (UsePolyAlgo) + { + Handle(Prs3d_LineAspect) aLineAspectHighlighted = new Prs3d_LineAspect(Quantity_NOC_ALICEBLUE, + Aspect_TOL_DOTDASH,1); + Handle(Prs3d_LineAspect) aLineAspect = new Prs3d_LineAspect(Quantity_NOC_WHITE, + Aspect_TOL_SOLID,1); + + + switch(TheMode) + { + case (1): { - Handle(Graphic2d_SetOfCurves) aSetOfHCurvesHighLighted = new Graphic2d_SetOfCurves(aGrObj); - Handle(Graphic2d_SetOfCurves) aSetOfHCurves = new Graphic2d_SetOfCurves(aGrObj); - if (TheMode == 6) DrawCompound(HCompound , aSetOfHCurvesHighLighted); - else DrawCompound(HCompound , aSetOfHCurves); - if (TheMode == 7) DrawCompound(Rg1LineHCompound , aSetOfHCurvesHighLighted); - else DrawCompound(Rg1LineHCompound , aSetOfHCurves); - if (TheMode == 8) DrawCompound(RgNLineHCompound , aSetOfHCurvesHighLighted); - else DrawCompound(RgNLineHCompound , aSetOfHCurves); - if (TheMode == 9) DrawCompound(OutLineHCompound , aSetOfHCurvesHighLighted); - else DrawCompound(OutLineHCompound , aSetOfHCurves); - if (TheMode == 10) DrawCompound(IsoLineHCompound , aSetOfHCurvesHighLighted); - else DrawCompound(IsoLineHCompound , aSetOfHCurves); - - aSetOfHCurvesHighLighted->SetColorIndex (3); - aSetOfHCurvesHighLighted->SetWidthIndex (3); - aSetOfHCurvesHighLighted->SetTypeIndex (3); - aSetOfHCurves->SetColorIndex (4); - aSetOfHCurves->SetWidthIndex (4); - aSetOfHCurves->SetTypeIndex (4); + DrawCompound(aPresentation, VCompound, aLineAspectHighlighted); + break; } + case (2): + { + DrawCompound(aPresentation, Rg1LineVCompound, aLineAspectHighlighted); + break; + } + case (3): + { + DrawCompound(aPresentation, RgNLineVCompound, aLineAspectHighlighted); + break; + } + case (4): + { + DrawCompound(aPresentation, OutLineVCompound, aLineAspectHighlighted); + break; + } + default: + { + DrawCompound(aPresentation,VCompound, aLineAspect); + DrawCompound(aPresentation,Rg1LineVCompound, aLineAspect); + DrawCompound(aPresentation,RgNLineVCompound, aLineAspect); + DrawCompound(aPresentation,OutLineVCompound, aLineAspect); + } + } + + if (DrawHiddenLine) + { + Handle(Prs3d_LineAspect) aLineAspectHighlighted = new Prs3d_LineAspect(Quantity_NOC_RED, + Aspect_TOL_DOTDASH,2); + Handle(Prs3d_LineAspect) aLineAspect = new Prs3d_LineAspect(Quantity_NOC_BLUE1, + Aspect_TOL_DOTDASH,1); + + switch(TheMode) + { + case (6): + { + DrawCompound(aPresentation, HCompound, aLineAspectHighlighted); + break; + } + case (7): + { + DrawCompound(aPresentation, Rg1LineHCompound, aLineAspectHighlighted); + break; + } + case (8): + { + DrawCompound(aPresentation, RgNLineHCompound, aLineAspectHighlighted); + break; + } + case (9): + { + DrawCompound(aPresentation, OutLineHCompound, aLineAspectHighlighted); + break; + } + default: + { + DrawCompound(aPresentation, HCompound, aLineAspect); + DrawCompound(aPresentation, Rg1LineHCompound, aLineAspect); + DrawCompound(aPresentation, RgNLineHCompound, aLineAspect); + DrawCompound(aPresentation, OutLineHCompound, aLineAspect); + } + } + } + } + else + { + Handle(Prs3d_LineAspect) aLineAspectHighlighted = new Prs3d_LineAspect(Quantity_NOC_RED, + Aspect_TOL_SOLID,2); + Handle(Prs3d_LineAspect) aLineAspect = new Prs3d_LineAspect(Quantity_NOC_WHITE, + Aspect_TOL_SOLID,1); + + switch (TheMode) + { + case (1): + { + DrawCompound(aPresentation, VCompound, aLineAspectHighlighted); + break; + } + case (2): + { + DrawCompound(aPresentation, Rg1LineVCompound, aLineAspectHighlighted); + break; + } + case (3): + { + DrawCompound(aPresentation, RgNLineVCompound, aLineAspectHighlighted); + break; + } + case (4): + { + DrawCompound(aPresentation, OutLineVCompound, aLineAspectHighlighted); + break; + } + case (5): + { + DrawCompound(aPresentation, IsoLineVCompound, aLineAspectHighlighted); + break; + } + default: + { + DrawCompound(aPresentation, VCompound, aLineAspect); + DrawCompound(aPresentation, Rg1LineVCompound, aLineAspect); + DrawCompound(aPresentation, RgNLineVCompound, aLineAspect); + DrawCompound(aPresentation, OutLineVCompound, aLineAspect); + DrawCompound(aPresentation, IsoLineVCompound , aLineAspect); + } + } + + if (DrawHiddenLine) + { + Handle(Prs3d_LineAspect) aLineAspectHighlighted = new Prs3d_LineAspect(Quantity_NOC_RED, + Aspect_TOL_DOT,2); + Handle(Prs3d_LineAspect) aLineAspect = new Prs3d_LineAspect(Quantity_NOC_ALICEBLUE, + Aspect_TOL_DOT,1); + + switch(TheMode) + { + case (6): + { + DrawCompound(aPresentation, HCompound, aLineAspectHighlighted); + break; + } + case (7): + { + DrawCompound(aPresentation, Rg1LineHCompound, aLineAspectHighlighted); + break; + } + case (8): + { + DrawCompound(aPresentation, RgNLineHCompound, aLineAspectHighlighted); + break; + } + case (9): + { + DrawCompound(aPresentation, OutLineHCompound, aLineAspectHighlighted); + break; + } + case (10): + { + DrawCompound(aPresentation, IsoLineHCompound, aLineAspectHighlighted); + break; + } + default: + { + DrawCompound(aPresentation, HCompound, aLineAspect); + DrawCompound(aPresentation, Rg1LineHCompound, aLineAspect); + DrawCompound(aPresentation, RgNLineHCompound, aLineAspect); + DrawCompound(aPresentation, OutLineHCompound, aLineAspect); + DrawCompound(aPresentation, IsoLineHCompound, aLineAspect); + } + } + } } } - -void ISession2D_Shape::DrawCompound(TopoDS_Shape& aCompound,const Handle(Graphic2d_SetOfSegments)& aSetOfSegments) +void ISession2D_Shape::DrawCompound(const Handle(Prs3d_Presentation)& thePresentation, + const TopoDS_Shape& theCompound, + const Handle(Prs3d_LineAspect) theAspect) { - if (aCompound.IsNull()) + if (theCompound.IsNull()) return; - - TopExp_Explorer ex(aCompound,TopAbs_EDGE); - while (ex.More()) { - const TopoDS_Edge& CurrentEdge = TopoDS::Edge(ex.Current()); - const TopoDS_Vertex& FirstVertex=TopExp::FirstVertex(CurrentEdge); - const TopoDS_Vertex& LastVertex =TopExp::LastVertex(CurrentEdge); - gp_Pnt FirstPoint = BRep_Tool::Pnt(FirstVertex); - gp_Pnt LastPoint = BRep_Tool::Pnt(LastVertex); - aSetOfSegments->Add(FirstPoint.X(),FirstPoint.Y(),LastPoint.X(),LastPoint.Y()); - ex.Next(); - } -} - -void ISession2D_Shape::DrawCompound(TopoDS_Shape& aCompound,const Handle(Graphic2d_SetOfCurves)& aSetOfCurves) -{ - if (aCompound.IsNull()) - return; - - TopExp_Explorer ex(aCompound,TopAbs_EDGE); - Handle(Geom2d_Curve) aCurve; - Handle(Geom_Surface) aSurface; - TopLoc_Location L; - Standard_Real f,l; - while (ex.More()) { - const TopoDS_Edge& CurrentEdge = TopoDS::Edge(ex.Current()); - ASSERT(CurrentEdge.Location().IsIdentity()); - BRep_Tool::CurveOnSurface(CurrentEdge,aCurve,aSurface,L,f,l); - ASSERT(L.IsIdentity()); - Handle(Geom2d_TrimmedCurve) c= new Geom2d_TrimmedCurve(aCurve,f,l); - ASSERT(!c.IsNull()); - aSetOfCurves->Add(c); - ex.Next(); - } + myDrawer->SetWireAspect(theAspect); + StdPrs_WFDeflectionShape::Add(thePresentation,TopoDS_Shape(theCompound),myDrawer); } void ISession2D_Shape::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) -{ +{ + } diff --git a/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.h b/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.h index 751785e21d..c818d7d70a 100755 --- a/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.h +++ b/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.h @@ -6,12 +6,9 @@ #include "TopoDS_Shape.hxx" #include "SelectMgr_SelectableObject.hxx" -#include "SelectMgr_SelectableObject.hxx" +#include "Graphic3d_ArrayOfPolylines.hxx" #include "AIS_InteractiveObject.hxx" - -#include <Graphic2d_SetOfSegments.hxx> -#include <Graphic2d_SetOfCurves.hxx> #include <HLRAlgo_Projector.hxx> #include <HLRBRep_Algo.hxx> #include <HLRBRep_PolyAlgo.hxx> @@ -52,14 +49,10 @@ private: void BuildAlgo(); void BuildPolyAlgo(); +void DrawCompound(const Handle(Prs3d_Presentation)& thePresentation,const TopoDS_Shape& theCompound, const Handle(Prs3d_LineAspect) theAspect); + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; -Standard_EXPORT virtual void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation) ; - - -virtual void Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,const Handle(Graphic2d_GraphicObject)& aGrObj,const Standard_Integer aMode = 0) ; -virtual void DrawCompound(TopoDS_Shape& aCompound,const Handle(Graphic2d_SetOfSegments)& aSetOfSegments); -virtual void DrawCompound(TopoDS_Shape& aCompound,const Handle(Graphic2d_SetOfCurves)& aSetOfCurves); virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; diff --git a/samples/mfc/standard/Common/ImportExport/ImportExport.cpp b/samples/mfc/standard/Common/ImportExport/ImportExport.cpp index ebf9a0ea8c..0396646604 100755 --- a/samples/mfc/standard/Common/ImportExport/ImportExport.cpp +++ b/samples/mfc/standard/Common/ImportExport/ImportExport.cpp @@ -4,7 +4,7 @@ #include "stdafx.h" #include "ImportExport.h" -#include <OCC_BaseApp.h> +#include <OCC_App.h> #include "SaveCSFDBDlg.h" diff --git a/samples/mfc/standard/Common/OCC_2dApp.cpp b/samples/mfc/standard/Common/OCC_2dApp.cpp deleted file mode 100755 index 5ac0b7b705..0000000000 --- a/samples/mfc/standard/Common/OCC_2dApp.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// OCC_2dApp.cpp: implementation of the OCC_2dApp class. -// -////////////////////////////////////////////////////////////////////// - -#include <stdafx.h> - -#include "OCC_2dApp.h" - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -OCC_2dApp::OCC_2dApp() -{ - try - {myGraphicDevice = new WNT_GraphicDevice();} - catch(Standard_Failure) - { - AfxMessageBox("Fatal error during graphic initialization",MB_ICONSTOP); - ExitProcess(1); - } -} - diff --git a/samples/mfc/standard/Common/OCC_2dApp.h b/samples/mfc/standard/Common/OCC_2dApp.h deleted file mode 100755 index da7ec6afeb..0000000000 --- a/samples/mfc/standard/Common/OCC_2dApp.h +++ /dev/null @@ -1,28 +0,0 @@ -// OCC_2dApp.h: interface for the OCC_2dApp class. -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCC_2dAPP_H__425A644A_38ED_11D7_8611_0060B0EE281E__INCLUDED_) -#define AFX_OCC_2dAPP_H__425A644A_38ED_11D7_8611_0060B0EE281E__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "OCC_BaseApp.h" - -#include <WNT_GraphicDevice.hxx> - -class Standard_EXPORT OCC_2dApp : public OCC_BaseApp -{ -public: - OCC_2dApp(); - - Handle_WNT_GraphicDevice GetGraphicDevice() const { return myGraphicDevice; } ; - -private : - Handle_WNT_GraphicDevice myGraphicDevice; - -}; - -#endif // !defined(AFX_OCC_2dAPP_H__425A644A_38ED_11D7_8611_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/Common/OCC_2dChildFrame.cpp b/samples/mfc/standard/Common/OCC_2dChildFrame.cpp index f6ab8289e2..48a19223dc 100755 --- a/samples/mfc/standard/Common/OCC_2dChildFrame.cpp +++ b/samples/mfc/standard/Common/OCC_2dChildFrame.cpp @@ -33,26 +33,26 @@ OCC_2dChildFrame::~OCC_2dChildFrame() int OCC_2dChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { - if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) - return -1; - - if (!m_wndToolBar.Create(this) || !m_wndToolBar.LoadToolBar(IDR_2dCHILDFRAME)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } + if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) + return -1; - m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); - m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); - EnableDocking(CBRS_ALIGN_ANY); - DockControlBar(&m_wndToolBar); - - return 0; + if (!m_wndToolBar.Create(this) || !m_wndToolBar.LoadToolBar(IDR_2dCHILDFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); + EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndToolBar); + + return 0; } BOOL OCC_2dChildFrame::PreCreateWindow(CREATESTRUCT& cs) { - // TODO: Add your specialized code here and/or call the base class - - return CMDIChildWnd::PreCreateWindow(cs); + // TODO: Add your specialized code here and/or call the base class + + return CMDIChildWnd::PreCreateWindow(cs); } diff --git a/samples/mfc/standard/Common/OCC_2dDoc.cpp b/samples/mfc/standard/Common/OCC_2dDoc.cpp index 05e1e80ae8..35e2b083d2 100755 --- a/samples/mfc/standard/Common/OCC_2dDoc.cpp +++ b/samples/mfc/standard/Common/OCC_2dDoc.cpp @@ -6,7 +6,7 @@ #include "OCC_2dDoc.h" -#include "OCC_2dApp.h" +#include "OCC_App.h" #include "OCC_2dView.h" IMPLEMENT_DYNCREATE(OCC_2dDoc, CDocument) @@ -15,80 +15,59 @@ IMPLEMENT_DYNCREATE(OCC_2dDoc, CDocument) // Construction/Destruction ////////////////////////////////////////////////////////////////////// -OCC_2dDoc::OCC_2dDoc() +OCC_2dDoc::OCC_2dDoc() : OCC_BaseDoc() { - // Get the Graphic Device from the application - Handle(WNT_GraphicDevice) theGraphicDevice = - ((OCC_2dApp*)AfxGetApp())->GetGraphicDevice(); + // Get the Graphic Driver from the application + Handle(Graphic3d_GraphicDriver) aGraphicDriver = + ((OCC_App*)AfxGetApp())->GetGraphicDriver(); - // create the Viewer - TCollection_ExtendedString Name("Viewer 2D"); - TCollection_AsciiString Domain("My Domain"); - my2DViewer = new V2d_Viewer(theGraphicDevice, - Name.ToExtString(), - Domain.ToCString()); + // create the Viewer + TCollection_ExtendedString aName ("Viewer 2D"); + TCollection_AsciiString aDomain ("My Domain"); - // set default values for grids - my2DViewer->SetCircularGridValues(0,0,10,8,0); - my2DViewer->SetRectangularGridValues(0,0,10,10,0); + myViewer = new V3d_Viewer (aGraphicDriver, + aName.ToExtString(), + aDomain.ToCString()); - myAISInteractiveContext2D = new AIS2D_InteractiveContext(my2DViewer); + myViewer->SetDefaultLights(); + myViewer->SetLightOn(); + myViewer->SetDefaultViewProj (V3d_Zpos); - - AfxInitRichEdit(); - myCResultDialog.Create(CResultDialog::IDD,NULL); + // set default values for grids + myViewer->SetCircularGridValues (0, 0, 10, 8, 0); + myViewer->SetRectangularGridValues (0, 0, 10, 10, 0); - RECT dlgrect; - myCResultDialog.GetWindowRect(&dlgrect); - LONG width = dlgrect.right-dlgrect.left; - LONG height = dlgrect.bottom-dlgrect.top; + myAISContext = new AIS_InteractiveContext (myViewer); - RECT MainWndRect; - AfxGetApp()->m_pMainWnd->GetWindowRect(&MainWndRect); - LONG left = MainWndRect.left+3; - LONG top = MainWndRect.top + 108; - //LONG height = MainWndRect.bottom - MainWndRect.top; - - myCResultDialog.MoveWindow(left,top,width,height); - + AfxInitRichEdit(); } -OCC_2dDoc::~OCC_2dDoc() +void OCC_2dDoc::FitAll2DViews(Standard_Boolean theUpdateViewer) { - -} - -void OCC_2dDoc::FitAll2DViews(Standard_Boolean UpdateViewer) -{ - if (UpdateViewer) my2DViewer->Update(); - POSITION position = GetFirstViewPosition(); - while (position != (POSITION)NULL) + if (theUpdateViewer) { - OCC_2dView* pCurrentView = (OCC_2dView*)GetNextView(position); - ASSERT_VALID(pCurrentView); - pCurrentView->GetV2dView()->Fitall(); + myViewer->Update(); + } + + POSITION aPosition = GetFirstViewPosition(); + while (aPosition != (POSITION)NULL) + { + OCC_2dView* aCurrentView = (OCC_2dView*)GetNextView (aPosition); + ASSERT_VALID (aCurrentView); + aCurrentView->GetV2dView()->FitAll(); } } -void OCC_2dDoc::UpdateResultDialog(UINT anID,TCollection_AsciiString aMessage) +void OCC_2dDoc::MoveEvent(const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView) { - CString text(aMessage.ToCString()); - myCResultDialog.SetText(text); - - CString s; - if (! s.LoadString( anID )) AfxMessageBox("Error Loading String: "); - CString Title = s.Left( s.Find( '\n' )); - myCResultDialog.SetTitle(Title); - SetTitle(Title); -// myCResultDialog.ShowWindow(SW_RESTORE); + myAISContext->MoveTo (theMouseX, theMouseY, theView); } -void OCC_2dDoc::UpdateResultDialog(CString& title,TCollection_AsciiString aMessage) +void OCC_2dDoc::ShiftMoveEvent(const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView) { - CString text(aMessage.ToCString()); - myCResultDialog.SetText(text); - myCResultDialog.SetTitle(title); - SetTitle(title); -// myCResultDialog.ShowWindow(SW_RESTORE); + myAISContext->MoveTo (theMouseX, theMouseY, theView); } - diff --git a/samples/mfc/standard/Common/OCC_2dDoc.h b/samples/mfc/standard/Common/OCC_2dDoc.h index f29a4ba67e..214b155576 100755 --- a/samples/mfc/standard/Common/OCC_2dDoc.h +++ b/samples/mfc/standard/Common/OCC_2dDoc.h @@ -12,28 +12,31 @@ #include "OCC_BaseDoc.h" #include "ResultDialog.h" #include <WNT_Window.hxx> -#include <WNT_WDriver.hxx> -#include <AIS2D_InteractiveContext.hxx> class AFX_EXT_CLASS OCC_2dDoc : public OCC_BaseDoc { - DECLARE_DYNCREATE(OCC_2dDoc) + DECLARE_DYNCREATE(OCC_2dDoc) + public: - OCC_2dDoc(); - virtual ~OCC_2dDoc(); + + OCC_2dDoc(); // Operations public: - Handle_V2d_Viewer GetViewer2D () { return my2DViewer; }; - void FitAll2DViews(Standard_Boolean UpdateViewer=Standard_False); - void UpdateResultDialog(UINT anID,TCollection_AsciiString aMessage); - void UpdateResultDialog(CString& title,TCollection_AsciiString aMessage); - Handle(AIS2D_InteractiveContext) GetInteractiveContext2D() {return myAISInteractiveContext2D;}; -// Attributes -protected: - Handle_V2d_Viewer my2DViewer; - Handle_AIS2D_InteractiveContext myAISInteractiveContext2D; - CResultDialog myCResultDialog; + + Handle_V3d_Viewer GetViewer2D () { return myViewer; }; + + void FitAll2DViews(Standard_Boolean theUpdateViewer = Standard_False); + + Handle(AIS_InteractiveContext)& GetInteractiveContext() { return myAISContext; }; + + virtual void MoveEvent(const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView); + + virtual void ShiftMoveEvent(const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theViewView); }; #endif // !defined(AFX_OCC_2dDOC_H__2E048CC7_38F9_11D7_8611_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/Common/OCC_2dView.cpp b/samples/mfc/standard/Common/OCC_2dView.cpp index d47cdf05cf..175cfcc9a5 100755 --- a/samples/mfc/standard/Common/OCC_2dView.cpp +++ b/samples/mfc/standard/Common/OCC_2dView.cpp @@ -5,7 +5,7 @@ #include "OCC_2dView.h" -#include "OCC_2dApp.h" +#include "OCC_App.h" #include "OCC_2dDoc.h" #include "resource2d\RectangularGrid.h" #include "resource2d\CircularGrid.h" @@ -68,25 +68,22 @@ END_MESSAGE_MAP() OCC_2dView::OCC_2dView() { - // TODO: add construction code here + // TODO: add construction code here myCurrentMode = CurAction2d_Nothing; m_Pen = NULL; } OCC_2dView::~OCC_2dView() { - Handle(V2d_Viewer) aViewer = myV2dView->Viewer(); - aViewer->RemoveView(myV2dView); + myV2dView->Remove(); if (m_Pen) delete m_Pen; - } BOOL OCC_2dView::PreCreateWindow(CREATESTRUCT& cs) { - // TODO: Modify the Window class or styles here by modifying - // the CREATESTRUCT cs - - return CView::PreCreateWindow(cs); + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + return CView::PreCreateWindow(cs); } ///////////////////////////////////////////////////////////////////////////// @@ -94,51 +91,64 @@ BOOL OCC_2dView::PreCreateWindow(CREATESTRUCT& cs) void OCC_2dView::OnDraw(CDC* pDC) { - if (!myV2dView.IsNull()) - myV2dView->Update(); + if (!myV2dView.IsNull()) + myV2dView->Update(); } void OCC_2dView::OnInitialUpdate() { - CView::OnInitialUpdate(); + CView::OnInitialUpdate(); - Handle(WNT_Window) aWNTWindow; - aWNTWindow = new WNT_Window(((OCC_2dApp*)AfxGetApp())->GetGraphicDevice(),GetSafeHwnd()); - aWNTWindow->SetBackground(Quantity_NOC_MATRAGRAY); + Handle(WNT_Window) aWNTWindow = new WNT_Window(GetSafeHwnd(),Quantity_NOC_MATRAGRAY); + myV2dView =((OCC_2dDoc*)GetDocument())->GetViewer2D()->CreateView(); + myV2dView->SetWindow(aWNTWindow); + myV2dView->SetZClippingType(V3d_OFF); + myV2dView->SetSurfaceDetail(V3d_TEX_ALL); + // initialize the grids dialogs + TheRectangularGridDialog.Create(CRectangularGrid::IDD, NULL); + TheCircularGridDialog.Create(CCircularGrid::IDD, NULL); + TheRectangularGridDialog.SetViewer (((OCC_2dDoc*)GetDocument())->GetViewer2D()); + TheCircularGridDialog.SetViewer (((OCC_2dDoc*)GetDocument())->GetViewer2D()); - Handle(WNT_WDriver) aDriver= new WNT_WDriver(aWNTWindow); - myV2dView = new V2d_View(aDriver, ((OCC_2dDoc*)GetDocument())->GetViewer2D(),0,0,50); - - // initialyse the grids dialogs - TheRectangularGridDialog.Create(CRectangularGrid::IDD, NULL); - TheCircularGridDialog.Create(CCircularGrid::IDD, NULL); - TheRectangularGridDialog.SetViewer (((OCC_2dDoc*)GetDocument())->GetViewer2D()); - TheCircularGridDialog.SetViewer (((OCC_2dDoc*)GetDocument())->GetViewer2D()); - - 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 ) ; + 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 ) ; } void OCC_2dView::OnFileExportImage() { -CFileDialog dlg(FALSE,_T("*.BMP"),NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - _T("BMP Files (*.BMP)|*.bmp |GIF Files (*.GIF)|*.gif | PNG Files (*.PNG)|*.png" - "|JPEG Files (*.JPEG)|*.jpeg | PPM Files (*.PPM)|*.ppm | TIFF Files (*.TIFF)" - "|*.tiff | TGA Files (*.TGA)|*.tga | EXR Files (*.EXR)|*.exr||"), - NULL ); + LPCTSTR filter; + filter = _T("EXR Files (*.EXR)|*.exr|TGA Files (*.TGA)|*.tga|TIFF Files (*.TIFF)|*.tiff|" + "PPM Files (*.PPM)|*.ppm|JPEG Files(*.JPEG)|*.jpeg|PNG Files (*.PNG)|*.png|" + "GIF Files (*.GIF)|*.gif|BMP Files (*.BMP)|*.bmp|PS Files (*.PS)|*.ps|" + "EPS Files (*.EPS)|*.eps|TEX Files (*.TEX)|*.tex|PDF Files (*.PDF)|*.pdf" + "|SVG Files (*.SVG)|*.svg|PGF Files (*.PGF)|*.pgf|EMF Files (*.EMF)|*.emf||"); + CFileDialog dlg(FALSE,_T("*.BMP"),NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, + filter, + NULL ); + if (dlg.DoModal() == IDOK) { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - CString filename = dlg.GetPathName(); - Handle(WNT_Window) aWNTWindow= - Handle(WNT_Window)::DownCast(myV2dView->Driver()->Window()); - aWNTWindow->Dump ((Standard_CString)(LPCTSTR)filename); + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); + CString aFileName = dlg.GetPathName(); + CString ext = dlg.GetFileExt(); + if (!(ext.CompareNoCase("ps")) || !(ext.CompareNoCase("emf")) + || !(ext.CompareNoCase("pdf")) || !(ext.CompareNoCase("eps")) + || !(ext.CompareNoCase("tex")) || !(ext.CompareNoCase("svg")) + || !(ext.CompareNoCase("pgf"))) + { + Graphic3d_ExportFormat exFormat; + if (!(ext.CompareNoCase("ps"))) exFormat = Graphic3d_EF_PostScript; + else exFormat = Graphic3d_EF_EnhPostScript; + myV2dView->View()->Export( aFileName, exFormat ); + return; + } + myV2dView->Dump(aFileName); SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); } } @@ -149,27 +159,30 @@ if (dlg.DoModal() == IDOK) #ifdef _DEBUG void OCC_2dView::AssertValid() const { - CView::AssertValid(); + CView::AssertValid(); } void OCC_2dView::Dump(CDumpContext& dc) const { - CView::Dump(dc); + CView::Dump(dc); } -CDocument* OCC_2dView::GetDocument() // non-debug version is inline +OCC_2dDoc* OCC_2dView::GetDocument() // non-debug version is inline { - //ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(OCC_2dDoc))); - return m_pDocument; + //ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(OCC_2dDoc))); + return (OCC_2dDoc*)m_pDocument; } #endif //_DEBUG -#include <V2d_RectangularGrid.hxx> void OCC_2dView::OnBUTTONGridRectLines() { - Handle(V2d_Viewer) aViewer = myV2dView->Viewer(); - aViewer->SetGridColor(Quantity_Color(Quantity_NOC_WHITE), Quantity_Color(Quantity_NOC_WHITE)); - aViewer->ActivateGrid(Aspect_GT_Rectangular, - Aspect_GDM_Lines); + Handle(V3d_Viewer) aViewer = myV2dView->Viewer(); + Handle(Graphic3d_AspectMarker3d) aGridAspect = new Graphic3d_AspectMarker3d(Aspect_TOM_BALL,Quantity_NOC_WHITE,2); + aViewer->SetGridEcho(aGridAspect); + Standard_Integer aWidth=0, aHeight=0, anOffset=0; + myV2dView->Window()->Size(aWidth,aHeight); + aViewer->SetRectangularGridGraphicValues(aWidth,aHeight,anOffset); + aViewer->ActivateGrid(Aspect_GT_Rectangular, Aspect_GDM_Lines); + FitAll(); if (TheCircularGridDialog.IsWindowVisible()) { @@ -181,10 +194,15 @@ void OCC_2dView::OnBUTTONGridRectLines() void OCC_2dView::OnBUTTONGridRectPoints() { - Handle(V2d_Viewer) aViewer = myV2dView->Viewer(); - aViewer->ActivateGrid(Aspect_GT_Rectangular, - Aspect_GDM_Points); - aViewer->SetGridColor(Quantity_Color(Quantity_NOC_WHITE), Quantity_Color(Quantity_NOC_WHITE)); + Handle(V3d_Viewer) aViewer = myV2dView->Viewer(); + Handle(Graphic3d_AspectMarker3d) aGridAspect = new Graphic3d_AspectMarker3d(Aspect_TOM_BALL,Quantity_NOC_WHITE,2); + aViewer->SetGridEcho(aGridAspect); + Standard_Integer aWidth=0, aHeight=0, anOffset=0; + myV2dView->Window()->Size(aWidth,aHeight); + aViewer->SetRectangularGridGraphicValues(aWidth,aHeight,anOffset); + aViewer->ActivateGrid(Aspect_GT_Rectangular, Aspect_GDM_Points); + FitAll(); + if (TheCircularGridDialog.IsWindowVisible()) { TheCircularGridDialog.ShowWindow(SW_HIDE); @@ -195,10 +213,14 @@ void OCC_2dView::OnBUTTONGridRectPoints() void OCC_2dView::OnBUTTONGridCircLines() { - Handle(V2d_Viewer) aViewer = myV2dView->Viewer(); - aViewer->SetGridColor(Quantity_Color(Quantity_NOC_WHITE), Quantity_Color(Quantity_NOC_WHITE)); - aViewer->ActivateGrid(Aspect_GT_Circular, - Aspect_GDM_Lines); + Handle(V3d_Viewer) aViewer = myV2dView->Viewer(); + Handle(Graphic3d_AspectMarker3d) aGridAspect = new Graphic3d_AspectMarker3d(Aspect_TOM_BALL,Quantity_NOC_WHITE,2); + aViewer->SetGridEcho(aGridAspect); + Standard_Integer aWidth=0, aHeight=0, anOffset=0; + myV2dView->Window()->Size(aWidth,aHeight); + aViewer->SetCircularGridGraphicValues(aWidth>aHeight?aWidth:aHeight,anOffset); + aViewer->ActivateGrid(Aspect_GT_Circular, Aspect_GDM_Lines); + FitAll(); if (TheRectangularGridDialog.IsWindowVisible()) @@ -211,10 +233,14 @@ void OCC_2dView::OnBUTTONGridCircLines() void OCC_2dView::OnBUTTONGridCircPoints() { - Handle(V2d_Viewer) aViewer = myV2dView->Viewer(); - aViewer->SetGridColor(Quantity_Color(Quantity_NOC_WHITE), Quantity_Color(Quantity_NOC_WHITE)); - aViewer->ActivateGrid(Aspect_GT_Circular, - Aspect_GDM_Points); + Handle(V3d_Viewer) aViewer = myV2dView->Viewer(); + Handle(Graphic3d_AspectMarker3d) aGridAspect = new Graphic3d_AspectMarker3d(Aspect_TOM_BALL,Quantity_NOC_WHITE,2); + aViewer->SetGridEcho(aGridAspect); + Standard_Integer aWidth=0, aHeight=0, anOffset=0; + myV2dView->Window()->Size(aWidth,aHeight); + aViewer->SetCircularGridGraphicValues(aWidth>aHeight?aWidth:aHeight,anOffset); + aViewer->ActivateGrid(Aspect_GT_Circular, Aspect_GDM_Points); + FitAll(); if (TheRectangularGridDialog.IsWindowVisible()) { TheRectangularGridDialog.ShowWindow(SW_HIDE); @@ -225,32 +251,32 @@ void OCC_2dView::OnBUTTONGridCircPoints() void OCC_2dView::OnBUTTONGridValues() { - Handle(V2d_Viewer) aViewer = myV2dView->Viewer(); + Handle(V3d_Viewer) aViewer = myV2dView->Viewer(); Aspect_GridType TheGridtype = aViewer->GridType(); switch( TheGridtype ) { - case Aspect_GT_Rectangular: - TheRectangularGridDialog.UpdateValues(); - TheRectangularGridDialog.ShowWindow(SW_SHOW); - break; - case Aspect_GT_Circular: - TheCircularGridDialog.UpdateValues(); - TheCircularGridDialog.ShowWindow(SW_SHOW); - break; - default : - Standard_Failure::Raise("invalid Aspect_GridType"); + case Aspect_GT_Rectangular: + TheRectangularGridDialog.UpdateValues(); + TheRectangularGridDialog.ShowWindow(SW_SHOW); + break; + case Aspect_GT_Circular: + TheCircularGridDialog.UpdateValues(); + TheCircularGridDialog.ShowWindow(SW_SHOW); + break; + default : + Standard_Failure::Raise("invalid Aspect_GridType"); } } void OCC_2dView::OnUpdateBUTTONGridValues(CCmdUI* pCmdUI) { - Handle(V2d_Viewer) aViewer = myV2dView->Viewer(); + Handle(V3d_Viewer) aViewer = myV2dView->Viewer(); pCmdUI-> Enable( aViewer->IsActive() ); } void OCC_2dView::OnBUTTONGridCancel() -{ - Handle(V2d_Viewer) aViewer = myV2dView->Viewer(); +{ + Handle(V3d_Viewer) aViewer = myV2dView->Viewer(); aViewer->DeactivateGrid(); TheRectangularGridDialog.ShowWindow(SW_HIDE); TheCircularGridDialog.ShowWindow(SW_HIDE); @@ -258,7 +284,7 @@ void OCC_2dView::OnBUTTONGridCancel() } void OCC_2dView::OnUpdateBUTTONGridCancel(CCmdUI* pCmdUI) { - Handle(V2d_Viewer) aViewer = myV2dView->Viewer(); + Handle(V3d_Viewer) aViewer = myV2dView->Viewer(); pCmdUI-> Enable( aViewer->IsActive() ); } @@ -269,118 +295,115 @@ void OCC_2dView::OnLButtonDown(UINT nFlags, CPoint point) myXmax=point.x; myYmax=point.y; if ( nFlags & CASCADESHORTCUTKEY ) - { - // Button MB1 down Control :start zomming - // - } - else // if ( MULTISELECTIONKEY ) - { - switch (myCurrentMode) - { - case CurAction2d_Nothing : // start a drag - DragEvent2D(point.x,point.y,-1); - break; - case CurAction2d_DynamicZooming : // nothing - break; - case CurAction2d_WindowZooming : // nothing - break; - case CurAction2d_DynamicPanning :// nothing - break; - case CurAction2d_GlobalPanning :// nothing - break; - default : - Standard_Failure::Raise(" incompatible Current Mode "); - break; - } + { + // Button MB1 down Control :start zomming + // + } + else // if ( MULTISELECTIONKEY ) + { + switch (myCurrentMode) + { + case CurAction2d_Nothing : // start a drag + DragEvent2D(point.x,point.y,-1); + break; + case CurAction2d_DynamicZooming : // nothing + break; + case CurAction2d_WindowZooming : // nothing + break; + case CurAction2d_DynamicPanning :// nothing + break; + case CurAction2d_GlobalPanning :// nothing + break; + default : + Standard_Failure::Raise(" incompatible Current Mode "); + break; } + } } void OCC_2dView::OnLButtonUp(UINT nFlags, CPoint point) { - // TODO: Add your message handler code here and/or call default - if ( nFlags & CASCADESHORTCUTKEY ) - { - return; - } - else // if ( Ctrl ) - { - switch (myCurrentMode) - { - case CurAction2d_Nothing : - if (point.x == myXmin && point.y == myYmin) - { // no offset between down and up --> selectEvent - myXmax=point.x; - myYmax=point.y; - if (nFlags & MULTISELECTIONKEY ) - MultiInputEvent2D(point.x,point.y); - else - InputEvent2D (point.x,point.y); - } else - { - DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False); - myXmax=point.x; - myYmax=point.y; - if (nFlags & MULTISELECTIONKEY) - MultiDragEvent2D(point.x,point.y,1); - else - DragEvent2D(point.x,point.y,1); - } - break; - case CurAction2d_DynamicZooming : - // - myCurrentMode = CurAction2d_Nothing; - break; - case CurAction2d_WindowZooming : - myXmax=point.x; myYmax=point.y; - DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash); - 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 - myV2dView->WindowFit(myXmin,myYmin,myXmax,myYmax); - } - myCurrentMode = CurAction2d_Nothing; - break; - case CurAction2d_DynamicPanning : - myCurrentMode = CurAction2d_Nothing; - break; - case CurAction2d_GlobalPanning : - myV2dView->Place(point.x,point.y,myCurZoom); - myCurrentMode = CurAction2d_Nothing; - break; - default : - Standard_Failure::Raise(" incompatible Current Mode "); - break; - } //switch (myCurrentMode) - } // else // if ( CASCADESHORTCUTKEY ) + // TODO: Add your message handler code here and/or call default + if ( nFlags & CASCADESHORTCUTKEY ) + { + return; + } + else // if ( Ctrl ) + { + switch (myCurrentMode) + { + case CurAction2d_Nothing : + if (point.x == myXmin && point.y == myYmin) + { // no offset between down and up --> selectEvent + myXmax=point.x; + myYmax=point.y; + if (nFlags & MULTISELECTIONKEY ) + MultiInputEvent2D(point.x,point.y); + else + InputEvent2D (point.x,point.y); + } else + { + DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False); + myXmax=point.x; + myYmax=point.y; + if (nFlags & MULTISELECTIONKEY) + MultiDragEvent2D(point.x,point.y,1); + else + DragEvent2D(point.x,point.y,1); + } + break; + case CurAction2d_DynamicZooming : + // + myCurrentMode = CurAction2d_Nothing; + break; + case CurAction2d_WindowZooming : + myXmax=point.x; myYmax=point.y; + DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash); + 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 + myV2dView->WindowFit(myXmin,myYmin,myXmax,myYmax); + } + myCurrentMode = CurAction2d_Nothing; + break; + case CurAction2d_DynamicPanning : + myCurrentMode = CurAction2d_Nothing; + break; + case CurAction2d_GlobalPanning : + myV2dView->Place(point.x,point.y,myCurZoom); + myCurrentMode = CurAction2d_Nothing; + break; + default : + Standard_Failure::Raise(" incompatible Current Mode "); + break; + } //switch (myCurrentMode) + } // else // if ( CASCADESHORTCUTKEY ) } void OCC_2dView::OnMButtonDown(UINT nFlags, CPoint point) { - if ( nFlags & CASCADESHORTCUTKEY ) - { - // Button MB2 down + CASCADESHORTCUTKEY : panning init - // - } - + if ( nFlags & CASCADESHORTCUTKEY ) + { + // Button MB2 down + CASCADESHORTCUTKEY : panning init + // + } } void OCC_2dView::OnMButtonUp(UINT nFlags, CPoint point) { - if ( nFlags & CASCADESHORTCUTKEY ) - { - // Button MB2 up + CASCADESHORTCUTKEY : panning stop - // - } - + if ( nFlags & CASCADESHORTCUTKEY ) + { + // Button MB2 up + CASCADESHORTCUTKEY : panning stop + } } void OCC_2dView::OnRButtonDown(UINT nFlags, CPoint point) { #ifdef POPUPONBUTTONDOWN if ( !(nFlags & CASCADESHORTCUTKEY) ) - Popup2D(point.x,point.y); + Popup2D(point.x,point.y); #endif } @@ -388,110 +411,110 @@ void OCC_2dView::OnRButtonUp(UINT nFlags, CPoint point) { #ifndef POPUPONBUTTONDOWN if ( !(nFlags & CASCADESHORTCUTKEY) ) - Popup2D(point.x,point.y); + Popup2D(point.x,point.y); #endif } void OCC_2dView::OnMouseMove(UINT nFlags, CPoint point) { - // ============================ LEFT BUTTON ======================= + // ============================ LEFT BUTTON ======================= if ( (nFlags & MK_LBUTTON) &! (nFlags & MK_RBUTTON) ) // Left + Right is specific + { + if ( nFlags & CASCADESHORTCUTKEY ) { - if ( nFlags & CASCADESHORTCUTKEY ) - { - // move with MB1 and CASCADESHORTCUTKEY : on the dynamic zooming - // Do the zoom in function of mouse's coordinates - myV2dView->Zoom(myXmax,myYmax,point.x,point.y); - // save the current mouse coordinate in min - myXmax = point.x; - myYmax = point.y; - } - else // if ( CASCADESHORTCUTKEY ) - { - switch (myCurrentMode) - { - case CurAction2d_Nothing : - myXmax = point.x; myYmax = point.y; - DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False); - DragEvent2D(myXmax,myYmax,0); - DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_True); - break; - case CurAction2d_DynamicZooming : - myV2dView->Zoom(myXmax,myYmax,point.x,point.y); - // save the current mouse coordinate in min \n"; - myXmax=point.x; myYmax=point.y; - break; - case CurAction2d_WindowZooming : - myXmax = point.x; myYmax = point.y; - DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash); - DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash); - break; - case CurAction2d_DynamicPanning : - myV2dView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; - break; - case CurAction2d_GlobalPanning : // nothing + // move with MB1 and CASCADESHORTCUTKEY : on the dynamic zooming + // Do the zoom in function of mouse's coordinates + myV2dView->Zoom(myXmax,myYmax,point.x,point.y); + // save the current mouse coordinate in min + myXmax = point.x; + myYmax = point.y; + } + else // if ( CASCADESHORTCUTKEY ) + { + switch (myCurrentMode) + { + case CurAction2d_Nothing : + myXmax = point.x; myYmax = point.y; + DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False); + DragEvent2D(myXmax,myYmax,0); + DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_True); break; - default : - Standard_Failure::Raise(" incompatible Current Mode "); + case CurAction2d_DynamicZooming : + myV2dView->Zoom(myXmax,myYmax,point.x,point.y); + // save the current mouse coordinate in min \n"; + myXmax=point.x; myYmax=point.y; break; - }// switch (myCurrentMode) - }// if ( nFlags & CASCADESHORTCUTKEY ) else - } else // if ( nFlags & MK_LBUTTON) + case CurAction2d_WindowZooming : + myXmax = point.x; myYmax = point.y; + DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash); + DrawRectangle2D(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash); + break; + case CurAction2d_DynamicPanning : + myV2dView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning + myXmax = point.x; myYmax = point.y; + break; + case CurAction2d_GlobalPanning : // nothing + break; + default : + Standard_Failure::Raise(" incompatible Current Mode "); + break; + }// switch (myCurrentMode) + }// if ( nFlags & CASCADESHORTCUTKEY ) else + } else // if ( nFlags & MK_LBUTTON) // ============================ MIDDLE BUTTON ======================= if ( nFlags & MK_MBUTTON) { - if ( nFlags & CASCADESHORTCUTKEY ) - { - myV2dView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; + if ( nFlags & CASCADESHORTCUTKEY ) + { + myV2dView->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) &! (nFlags & MK_LBUTTON) ) // Left + Right is specific - { - }else //if ( nFlags & MK_RBUTTON) - if ( (nFlags & MK_RBUTTON) && (nFlags & MK_LBUTTON) ) - { - // in case of Left + Right : same as Middle - if ( nFlags & CASCADESHORTCUTKEY ) - { - myV2dView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; - } - }else //if ( nFlags & MK_RBUTTON)&& (nFlags & MK_LBUTTON) - // ============================ NO BUTTON ======================= - { // No buttons - myXmax = point.x; myYmax = point.y; - if (nFlags & MULTISELECTIONKEY) - MultiMoveEvent2D(point.x,point.y); - else - MoveEvent2D(point.x,point.y); - } + // ============================ RIGHT BUTTON ======================= + if ( (nFlags & MK_RBUTTON) &! (nFlags & MK_LBUTTON) ) // Left + Right is specific + { + }else //if ( nFlags & MK_RBUTTON) + if ( (nFlags & MK_RBUTTON) && (nFlags & MK_LBUTTON) ) + { + // in case of Left + Right : same as Middle + if ( nFlags & CASCADESHORTCUTKEY ) + { + myV2dView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning + myXmax = point.x; myYmax = point.y; + } + }else //if ( nFlags & MK_RBUTTON)&& (nFlags & MK_LBUTTON) + // ============================ NO BUTTON ======================= + { // No buttons + myXmax = point.x; myYmax = point.y; + if (nFlags & MULTISELECTIONKEY) + MultiMoveEvent2D(point.x,point.y); + else + MoveEvent2D(point.x,point.y); + } } void OCC_2dView::OnSize(UINT nType, int cx, int cy) { - // Take care : This fonction is call before OnInitialUpdate - if (!myV2dView.IsNull()) - myV2dView->MustBeResized(V2d_TOWRE_ENLARGE_OBJECTS); + // Take care : This fonction is call before OnInitialUpdate + if (!myV2dView.IsNull()) + myV2dView->MustBeResized(); } void OCC_2dView::OnBUTTONFitAll() { - myV2dView->Fitall(); + myV2dView->FitAll(); } void OCC_2dView::OnBUTTONGlobPanning() { //save the current zoom value - myCurZoom = myV2dView->Zoom(); + myCurZoom = myV2dView->Scale(); // Do a Global Zoom - //myV2dView->Fitall(); + myV2dView->FitAll(); // Set the mode myCurrentMode = CurAction2d_GlobalPanning; @@ -510,104 +533,102 @@ void OCC_2dView::OnBUTTONZoomWin() } void OCC_2dView::OnChangeBackground() { - Standard_Real R1, G1, B1; - Handle(Aspect_WindowDriver) aWindowDriver = myV2dView->Driver(); - Handle(Aspect_Window) aWindow = aWindowDriver->Window(); - Aspect_Background ABack = aWindow->Background(); - Quantity_Color aColor = ABack.Color(); - aColor.Values(R1,G1,B1,Quantity_TOC_RGB); - COLORREF m_clr ; - m_clr = RGB(R1*255,G1*255,B1*255); + Standard_Real R1, G1, B1; + Handle(Aspect_Window) aWindow = myV2dView->Window(); + Aspect_Background ABack = aWindow->Background(); + Quantity_Color aColor = ABack.Color(); + aColor.Values(R1,G1,B1,Quantity_TOC_RGB); + 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.; - aColor.SetValues(R1,G1,B1,Quantity_TOC_RGB); - ABack.SetColor(aColor); - aWindow->SetBackground(ABack); - myV2dView->Update(); - } + 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.; + aColor.SetValues(R1,G1,B1,Quantity_TOC_RGB); + myV2dView->SetBackgroundColor(aColor); + myV2dView->Update(); + } } void OCC_2dView::OnUpdateBUTTON2DGlobPanning(CCmdUI* pCmdUI) { - pCmdUI->SetCheck (myCurrentMode == CurAction2d_GlobalPanning); - pCmdUI->Enable (myCurrentMode != CurAction2d_GlobalPanning); + pCmdUI->SetCheck (myCurrentMode == CurAction2d_GlobalPanning); + pCmdUI->Enable (myCurrentMode != CurAction2d_GlobalPanning); } void OCC_2dView::OnUpdateBUTTON2DPanning(CCmdUI* pCmdUI) { - pCmdUI->SetCheck (myCurrentMode == CurAction2d_DynamicPanning); - pCmdUI->Enable (myCurrentMode != CurAction2d_DynamicPanning); + pCmdUI->SetCheck (myCurrentMode == CurAction2d_DynamicPanning); + pCmdUI->Enable (myCurrentMode != CurAction2d_DynamicPanning); } void OCC_2dView::OnUpdateBUTTON2DZoomProg(CCmdUI* pCmdUI) { - pCmdUI->SetCheck (myCurrentMode == CurAction2d_DynamicZooming); - pCmdUI->Enable (myCurrentMode != CurAction2d_DynamicZooming); + pCmdUI->SetCheck (myCurrentMode == CurAction2d_DynamicZooming); + pCmdUI->Enable (myCurrentMode != CurAction2d_DynamicZooming); } void OCC_2dView::OnUpdateBUTTON2DZoomWin(CCmdUI* pCmdUI) { - pCmdUI->SetCheck (myCurrentMode == CurAction2d_WindowZooming); - pCmdUI->Enable (myCurrentMode != CurAction2d_WindowZooming); + pCmdUI->SetCheck (myCurrentMode == CurAction2d_WindowZooming); + pCmdUI->Enable (myCurrentMode != CurAction2d_WindowZooming); } -void OCC_2dView::DrawRectangle2D(const Standard_Integer MinX , - const Standard_Integer MinY , - const Standard_Integer MaxX , - const Standard_Integer MaxY , - const Standard_Boolean Draw , - const LineStyle aLineStyle) +void OCC_2dView::DrawRectangle2D(const Standard_Integer MinX, + const Standard_Integer MinY, + const Standard_Integer MaxX, + const Standard_Integer MaxY, + const Standard_Boolean Draw, + const LineStyle aLineStyle) { - static int m_DrawMode; - if (!m_Pen && aLineStyle ==Solid ) - {m_Pen = new CPen(PS_SOLID, 1, RGB(0,0,0)); m_DrawMode = R2_MERGEPENNOT;} - else if (!m_Pen && aLineStyle ==Dot ) - {m_Pen = new CPen(PS_DOT, 1, RGB(0,0,0)); m_DrawMode = R2_XORPEN;} - else if (!m_Pen && aLineStyle == ShortDash) - {m_Pen = new CPen(PS_DASH, 1, RGB(255,0,0)); m_DrawMode = R2_XORPEN;} - else if (!m_Pen && aLineStyle == LongDash) - {m_Pen = new CPen(PS_DASH, 1, RGB(0,0,0)); m_DrawMode = R2_NOTXORPEN;} - else if (aLineStyle == Default) - { m_Pen = NULL; m_DrawMode = R2_MERGEPENNOT;} + static int m_DrawMode; + if (!m_Pen && aLineStyle ==Solid ) + {m_Pen = new CPen(PS_SOLID, 1, RGB(0,0,0)); m_DrawMode = R2_MERGEPENNOT;} + else if (!m_Pen && aLineStyle ==Dot ) + {m_Pen = new CPen(PS_DOT, 1, RGB(0,0,0)); m_DrawMode = R2_XORPEN;} + else if (!m_Pen && aLineStyle == ShortDash) + {m_Pen = new CPen(PS_DASH, 1, RGB(255,0,0)); m_DrawMode = R2_XORPEN;} + else if (!m_Pen && aLineStyle == LongDash) + {m_Pen = new CPen(PS_DASH, 1, RGB(0,0,0)); m_DrawMode = R2_NOTXORPEN;} + else if (aLineStyle == Default) + { m_Pen = NULL; m_DrawMode = R2_MERGEPENNOT;} - CPen* aOldPen; - CClientDC clientDC(this); - if (m_Pen) aOldPen = clientDC.SelectObject(m_Pen); - clientDC.SetROP2(m_DrawMode); + CPen* aOldPen; + CClientDC clientDC(this); + if (m_Pen) aOldPen = clientDC.SelectObject(m_Pen); + clientDC.SetROP2(m_DrawMode); - static Standard_Integer StoredMinX, StoredMaxX, StoredMinY, StoredMaxY; - static Standard_Boolean m_IsVisible; + static Standard_Integer StoredMinX, StoredMaxX, StoredMinY, StoredMaxY; + static Standard_Boolean m_IsVisible; - if ( m_IsVisible && !Draw) // move or up : erase at the old position - { - clientDC.MoveTo(StoredMinX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMaxY); - clientDC.LineTo(StoredMaxX,StoredMaxY); - clientDC.LineTo(StoredMaxX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMinY); - m_IsVisible = false; - } + if ( m_IsVisible && !Draw) // move or up : erase at the old position + { + clientDC.MoveTo(StoredMinX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMaxY); + clientDC.LineTo(StoredMaxX,StoredMaxY); + clientDC.LineTo(StoredMaxX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMinY); + m_IsVisible = false; + } - StoredMinX = min ( MinX, MaxX ); - StoredMinY = min ( MinY, MaxY ); - StoredMaxX = max ( MinX, MaxX ); - StoredMaxY = max ( MinY, MaxY); + StoredMinX = min ( MinX, MaxX ); + StoredMinY = min ( MinY, MaxY ); + StoredMaxX = max ( MinX, MaxX ); + StoredMaxY = max ( MinY, MaxY); - if (Draw) // move : draw - { - clientDC.MoveTo(StoredMinX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMaxY); - clientDC.LineTo(StoredMaxX,StoredMaxY); - clientDC.LineTo(StoredMaxX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMinY); - m_IsVisible = true; - } + if (Draw) // move : draw + { + clientDC.MoveTo(StoredMinX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMaxY); + clientDC.LineTo(StoredMaxX,StoredMaxY); + clientDC.LineTo(StoredMaxX,StoredMinY); clientDC.LineTo(StoredMinX,StoredMinY); + m_IsVisible = true; + } - if (m_Pen) clientDC.SelectObject(aOldPen); + if (m_Pen) clientDC.SelectObject(aOldPen); } @@ -617,33 +638,33 @@ void OCC_2dView::DrawRectangle2D(const Standard_Integer MinX , //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void OCC_2dView::DragEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState ) +void OCC_2dView::DragEvent2D(const Standard_Integer x, + const Standard_Integer y, + const Standard_Integer TheState) { // TheState == -1 button down // TheState == 0 move // TheState == 1 button up - static Standard_Integer theButtonDownX=0; - static Standard_Integer theButtonDownY=0; + static Standard_Integer theButtonDownX=0; + static Standard_Integer theButtonDownY=0; - if (TheState == -1) - { - theButtonDownX=x; - theButtonDownY=y; - } + if (TheState == -1) + { + theButtonDownX=x; + theButtonDownY=y; + } if (TheState == 0) { - ((OCC_2dDoc*)GetDocument())->GetInteractiveContext2D()->MoveTo(theButtonDownX,theButtonDownY,x,y,myV2dView); + ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo(x,y,myV2dView); + ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->Select(theButtonDownX,theButtonDownY,x,y,myV2dView); } if (TheState == 1) { - ((OCC_2dDoc*)GetDocument())->GetInteractiveContext2D()->Select(true); + ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->Select(true); } - } @@ -651,64 +672,62 @@ void OCC_2dView::DragEvent2D(const Standard_Integer x , // //----------------------------------------------------------------------------------------- void OCC_2dView::InputEvent2D(const Standard_Integer x , - const Standard_Integer y ) + const Standard_Integer y ) { - ((OCC_2dDoc*)GetDocument())->GetInteractiveContext2D()->Select(true); - + ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->Select(true); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void OCC_2dView::MoveEvent2D(const Standard_Integer x , - const Standard_Integer y ) +void OCC_2dView::MoveEvent2D(const Standard_Integer x, + const Standard_Integer y) { - static bool LastIsGridActiveStatus = Standard_True; - if (myV2dView->Viewer()->IsActive() ) // about the grid - { myV2dView->ShowHit(x,y); LastIsGridActiveStatus = Standard_True;} - if (!myV2dView->Viewer()->IsActive() && LastIsGridActiveStatus ) // about the grid - {myV2dView->EraseHit(); LastIsGridActiveStatus = Standard_False;} - - ((OCC_2dDoc*)GetDocument())->GetInteractiveContext2D()->MoveTo(x,y,myV2dView); - - + if(myV2dView->Viewer()->Grid()->IsActive()) + { + Quantity_Length aGridX=0,aGridY=0,aGridZ=0; + myV2dView->ConvertToGrid(x,y,aGridX,aGridY,aGridZ); + //View is not updated automatically in ConvertToGrid + myV2dView->Update(); + } + ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo(x,y,myV2dView); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void OCC_2dView::MultiMoveEvent2D(const Standard_Integer x , - const Standard_Integer y ) +void OCC_2dView::MultiMoveEvent2D(const Standard_Integer x, + const Standard_Integer y) { // MultiMoveEvent2D means we move the mouse in a multi selection mode -((OCC_2dDoc*)GetDocument())->GetInteractiveContext2D()->MoveTo(x,y,myV2dView); - +((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo(x,y,myV2dView); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- void OCC_2dView::MultiDragEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState) + const Standard_Integer y , + const Standard_Integer TheState) { - static Standard_Integer theButtonDownX=0; - static Standard_Integer theButtonDownY=0; + static Standard_Integer theButtonDownX=0; + static Standard_Integer theButtonDownY=0; - if (TheState == -1) - { - theButtonDownX=x; - theButtonDownY=y; - } + if (TheState == -1) + { + theButtonDownX=x; + theButtonDownY=y; + } if (TheState == 0) { - ((OCC_2dDoc*)GetDocument())->GetInteractiveContext2D()->MoveTo(theButtonDownX,theButtonDownY,x,y,myV2dView); + ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo(x,y,myV2dView); + ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->ShiftSelect(theButtonDownX,theButtonDownY,x,y,myV2dView);; } if (TheState == 1) { - ((OCC_2dDoc*)GetDocument())->GetInteractiveContext2D()->ShiftSelect(true); + ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->ShiftSelect(true); } } @@ -717,16 +736,16 @@ void OCC_2dView::MultiDragEvent2D(const Standard_Integer x , // //----------------------------------------------------------------------------------------- void OCC_2dView::MultiInputEvent2D(const Standard_Integer x , - const Standard_Integer y ) + const Standard_Integer y ) { - ((OCC_2dDoc*)GetDocument())->GetInteractiveContext2D()->ShiftSelect(true); + ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->ShiftSelect(true); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- void OCC_2dView::Popup2D(const Standard_Integer x, - const Standard_Integer y ) + const Standard_Integer y ) { CMenu menu; CMenu* pPopup ; @@ -739,14 +758,11 @@ void OCC_2dView::Popup2D(const Standard_Integer x, // display the popup POINT winCoord = { x , y }; - - ClientToScreen ( &winCoord); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON , winCoord.x, winCoord.y , AfxGetMainWnd()); - } void OCC_2dView::FitAll() { - myV2dView->Fitall(); + myV2dView->FitAll(); } diff --git a/samples/mfc/standard/Common/OCC_2dView.h b/samples/mfc/standard/Common/OCC_2dView.h index 451c9c1151..904cbae868 100755 --- a/samples/mfc/standard/Common/OCC_2dView.h +++ b/samples/mfc/standard/Common/OCC_2dView.h @@ -14,7 +14,8 @@ #include "Resource2d/RectangularGrid.h" #include "Resource2d/CircularGrid.h" -enum CurrentAction2d { +enum CurrentAction2d +{ CurAction2d_Nothing, CurAction2d_DynamicZooming, CurAction2d_WindowZooming, @@ -23,110 +24,126 @@ enum CurrentAction2d { }; class AFX_EXT_CLASS OCC_2dView : public OCC_BaseView -{ - DECLARE_DYNCREATE(OCC_2dView) -public: - OCC_2dView(); - virtual ~OCC_2dView(); +{ + DECLARE_DYNCREATE(OCC_2dView) + +public: + + OCC_2dView(); + + virtual ~OCC_2dView(); + + OCC_2dDoc* GetDocument(); + + Handle(V3d_View)& GetV2dView() { return myV2dView; } + + void FitAll(); - CDocument* GetDocument(); - Handle_V2d_View& GetV2dView() {return myV2dView;}; - void FitAll(); // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(OCC_2dView) - public: - virtual void OnDraw(CDC* pDC); // overridden to draw this view - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - protected: - virtual void OnInitialUpdate(); // called first time after construct + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(OCC_2dView) + public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + protected: + virtual void OnInitialUpdate(); // called first time after construct //}}AFX_VIRTUAL #ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: - //{{AFX_MSG(OCC_2dView) - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code ! - afx_msg void OnFileExportImage(); - afx_msg void OnBUTTONGridRectLines(); - afx_msg void OnBUTTONGridRectPoints(); - afx_msg void OnBUTTONGridCircLines(); - afx_msg void OnBUTTONGridCircPoints(); - afx_msg void OnBUTTONGridValues(); - afx_msg void OnUpdateBUTTONGridValues(CCmdUI* pCmdUI); - afx_msg void OnBUTTONGridCancel(); - afx_msg void OnUpdateBUTTONGridCancel(CCmdUI* pCmdUI); - 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 OnRButtonDown(UINT nFlags, CPoint point); - afx_msg void OnRButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnSize(UINT nType, int cx, int cy); - afx_msg void OnBUTTONFitAll(); - afx_msg void OnBUTTONGlobPanning(); - afx_msg void OnBUTTONPanning(); - afx_msg void OnBUTTONZoomProg(); - afx_msg void OnBUTTONZoomWin(); - afx_msg void OnUpdateBUTTON2DGlobPanning(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTON2DPanning(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTON2DZoomProg(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTON2DZoomWin(CCmdUI* pCmdUI); - afx_msg void OnChangeBackground(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() + //{{AFX_MSG(OCC_2dView) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + afx_msg void OnFileExportImage(); + afx_msg void OnBUTTONGridRectLines(); + afx_msg void OnBUTTONGridRectPoints(); + afx_msg void OnBUTTONGridCircLines(); + afx_msg void OnBUTTONGridCircPoints(); + afx_msg void OnBUTTONGridValues(); + afx_msg void OnUpdateBUTTONGridValues(CCmdUI* pCmdUI); + afx_msg void OnBUTTONGridCancel(); + afx_msg void OnUpdateBUTTONGridCancel(CCmdUI* pCmdUI); + 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 OnRButtonDown(UINT nFlags, CPoint point); + afx_msg void OnRButtonUp(UINT nFlags, CPoint point); + afx_msg void OnMouseMove(UINT nFlags, CPoint point); + afx_msg void OnSize(UINT nType, int cx, int cy); + afx_msg void OnBUTTONFitAll(); + afx_msg void OnBUTTONGlobPanning(); + afx_msg void OnBUTTONPanning(); + afx_msg void OnBUTTONZoomProg(); + afx_msg void OnBUTTONZoomWin(); + afx_msg void OnUpdateBUTTON2DGlobPanning(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTON2DPanning(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTON2DZoomProg(CCmdUI* pCmdUI); + afx_msg void OnUpdateBUTTON2DZoomWin(CCmdUI* pCmdUI); + afx_msg void OnChangeBackground(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() protected: - CurrentAction2d myCurrentMode; - Standard_Integer myXmin; - Standard_Integer myYmin; - Standard_Integer myXmax; - Standard_Integer myYmax; - Quantity_Factor myCurZoom; - enum LineStyle { Solid, Dot, ShortDash, LongDash, Default }; - CPen* m_Pen; - virtual void DrawRectangle2D (const Standard_Integer MinX , - const Standard_Integer MinY , - const Standard_Integer MaxX , - const Standard_Integer MaxY , - const Standard_Boolean Draw , - const LineStyle aLineStyle = Default ); + CurrentAction2d myCurrentMode; + Standard_Integer myXmin; + Standard_Integer myYmin; + Standard_Integer myXmax; + Standard_Integer myYmax; + Quantity_Factor myCurZoom; - virtual void DragEvent2D (const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState); - virtual void InputEvent2D (const Standard_Integer x , - const Standard_Integer y ); - virtual void MoveEvent2D (const Standard_Integer x , - const Standard_Integer y ); - virtual void MultiMoveEvent2D (const Standard_Integer x , - const Standard_Integer y ); - virtual void MultiDragEvent2D (const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState); - virtual void MultiInputEvent2D (const Standard_Integer x , - const Standard_Integer y ); - virtual void Popup2D (const Standard_Integer x , - const Standard_Integer y ); + enum LineStyle { Solid, Dot, ShortDash, LongDash, Default }; + + CPen* m_Pen; + + virtual void DrawRectangle2D (const Standard_Integer MinX, + const Standard_Integer MinY, + const Standard_Integer MaxX, + const Standard_Integer MaxY, + const Standard_Boolean Draw, + const LineStyle aLineStyle = Default); + + virtual void DragEvent2D (const Standard_Integer x, + const Standard_Integer y, + const Standard_Integer TheState); + + virtual void InputEvent2D (const Standard_Integer x, + const Standard_Integer y); + + virtual void MoveEvent2D (const Standard_Integer x, + const Standard_Integer y); + + virtual void MultiMoveEvent2D (const Standard_Integer x, + const Standard_Integer y); + + virtual void MultiDragEvent2D (const Standard_Integer x, + const Standard_Integer y, + const Standard_Integer TheState); + + virtual void MultiInputEvent2D (const Standard_Integer x, + const Standard_Integer y); + + virtual void Popup2D (const Standard_Integer x, + const Standard_Integer y); protected: + CRectangularGrid TheRectangularGridDialog; CCircularGrid TheCircularGridDialog; - Handle_V2d_View myV2dView; + Handle_V3d_View myV2dView; }; #ifndef _DEBUG // debug version in 2DDisplayView.cpp -inline CDocument* OCC_2dView::GetDocument() - { return m_pDocument; } +inline OCC_2dDoc* OCC_2dView::GetDocument() + { return (OCC_2dDoc*)m_pDocument; } #endif #endif // !defined(AFX_OCC_2dVIEW_H__2E048CC9_38F9_11D7_8611_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/Common/OCC_3dApp.cpp b/samples/mfc/standard/Common/OCC_3dApp.cpp deleted file mode 100755 index 6680db0df6..0000000000 --- a/samples/mfc/standard/Common/OCC_3dApp.cpp +++ /dev/null @@ -1,26 +0,0 @@ -// OCC_3dApp.cpp: implementation of the OCC_3dApp class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "OCC_3dApp.h" - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -OCC_3dApp::OCC_3dApp() -{ - try - {myGraphicDevice = new Graphic3d_WNTGraphicDevice();} - catch(Standard_Failure) - { - AfxMessageBox("Fatal error during graphic initialization",MB_ICONSTOP); - ExitProcess(1); - } -} - -OCC_3dApp::~OCC_3dApp() -{ - -} diff --git a/samples/mfc/standard/Common/OCC_3dApp.h b/samples/mfc/standard/Common/OCC_3dApp.h deleted file mode 100755 index 9a3fe23b33..0000000000 --- a/samples/mfc/standard/Common/OCC_3dApp.h +++ /dev/null @@ -1,28 +0,0 @@ -// OCC_3dApp.h: interface for the OCC_3dApp class. -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCC_3DAPP_H__FC7278BF_390D_11D7_8611_0060B0EE281E__INCLUDED_) -#define AFX_OCC_3DAPP_H__FC7278BF_390D_11D7_8611_0060B0EE281E__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "OCC_BaseApp.h" -#include <Standard_Macro.hxx> -#include <Handle_Graphic3d_GraphicDriver.hxx> - -class Standard_EXPORT OCC_3dApp : public OCC_BaseApp -{ -public: - OCC_3dApp(); - virtual ~OCC_3dApp(); - - Handle_Graphic3d_GraphicDriver GetGraphicDriver() const { return myGraphicDriver; } ; - -protected : - Handle_Graphic3d_GraphicDriver myGraphicDriver; -}; - -#endif // !defined(AFX_OCC_3DAPP_H__FC7278BF_390D_11D7_8611_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/Common/OCC_3dBaseDoc.cpp b/samples/mfc/standard/Common/OCC_3dBaseDoc.cpp index 15f0698958..fb2ef67834 100755 --- a/samples/mfc/standard/Common/OCC_3dBaseDoc.cpp +++ b/samples/mfc/standard/Common/OCC_3dBaseDoc.cpp @@ -7,7 +7,7 @@ #include "OCC_3dBaseDoc.h" #include "OCC_3dView.h" -#include "OCC_3dApp.h" +#include "OCC_App.h" #include <res\OCC_Resource.h> #include "ImportExport/ImportExport.h" #include "AISDialogs.h" @@ -15,29 +15,28 @@ #include <AIS_ListIteratorOfListOfInteractive.hxx> BEGIN_MESSAGE_MAP(OCC_3dBaseDoc, OCC_BaseDoc) - //{{AFX_MSG_MAP(OCC_3dBaseDoc) - ON_COMMAND(ID_FILE_IMPORT_BREP, OnFileImportBrep) - ON_COMMAND(ID_FILE_EXPORT_BREP, OnFileExportBrep) - ON_COMMAND(ID_OBJECT_ERASE, OnObjectErase) - ON_UPDATE_COMMAND_UI(ID_OBJECT_ERASE, OnUpdateObjectErase) - ON_COMMAND(ID_OBJECT_COLOR, OnObjectColor) - ON_UPDATE_COMMAND_UI(ID_OBJECT_COLOR, OnUpdateObjectColor) - ON_COMMAND(ID_OBJECT_SHADING, OnObjectShading) - ON_UPDATE_COMMAND_UI(ID_OBJECT_SHADING, OnUpdateObjectShading) - ON_COMMAND(ID_OBJECT_WIREFRAME, OnObjectWireframe) - ON_UPDATE_COMMAND_UI(ID_OBJECT_WIREFRAME, OnUpdateObjectWireframe) - ON_COMMAND(ID_OBJECT_TRANSPARENCY, OnObjectTransparency) - ON_UPDATE_COMMAND_UI(ID_OBJECT_TRANSPARENCY, OnUpdateObjectTransparency) - ON_COMMAND(ID_OBJECT_MATERIAL, OnObjectMaterial) - ON_UPDATE_COMMAND_UI(ID_OBJECT_MATERIAL, OnUpdateObjectMaterial) - ON_COMMAND(ID_OBJECT_DISPLAYALL, OnObjectDisplayall) - ON_UPDATE_COMMAND_UI(ID_OBJECT_DISPLAYALL, OnUpdateObjectDisplayall) - ON_COMMAND(ID_OBJECT_REMOVE, OnObjectRemove) - ON_UPDATE_COMMAND_UI(ID_OBJECT_REMOVE, OnUpdateObjectRemove) - //}}AFX_MSG_MAP - ON_COMMAND_EX_RANGE(ID_OBJECT_MATERIAL_BRASS,ID_OBJECT_MATERIAL_DEFAULT, OnObjectMaterialRange) - ON_UPDATE_COMMAND_UI_RANGE(ID_OBJECT_MATERIAL_BRASS,ID_OBJECT_MATERIAL_DEFAULT, OnUpdateObjectMaterialRange) - + //{{AFX_MSG_MAP(OCC_3dBaseDoc) + ON_COMMAND(ID_FILE_IMPORT_BREP, OnFileImportBrep) + ON_COMMAND(ID_FILE_EXPORT_BREP, OnFileExportBrep) + ON_COMMAND(ID_OBJECT_ERASE, OnObjectErase) + ON_UPDATE_COMMAND_UI(ID_OBJECT_ERASE, OnUpdateObjectErase) + ON_COMMAND(ID_OBJECT_COLOR, OnObjectColor) + ON_UPDATE_COMMAND_UI(ID_OBJECT_COLOR, OnUpdateObjectColor) + ON_COMMAND(ID_OBJECT_SHADING, OnObjectShading) + ON_UPDATE_COMMAND_UI(ID_OBJECT_SHADING, OnUpdateObjectShading) + ON_COMMAND(ID_OBJECT_WIREFRAME, OnObjectWireframe) + ON_UPDATE_COMMAND_UI(ID_OBJECT_WIREFRAME, OnUpdateObjectWireframe) + ON_COMMAND(ID_OBJECT_TRANSPARENCY, OnObjectTransparency) + ON_UPDATE_COMMAND_UI(ID_OBJECT_TRANSPARENCY, OnUpdateObjectTransparency) + ON_COMMAND(ID_OBJECT_MATERIAL, OnObjectMaterial) + ON_UPDATE_COMMAND_UI(ID_OBJECT_MATERIAL, OnUpdateObjectMaterial) + ON_COMMAND(ID_OBJECT_DISPLAYALL, OnObjectDisplayall) + ON_UPDATE_COMMAND_UI(ID_OBJECT_DISPLAYALL, OnUpdateObjectDisplayall) + ON_COMMAND(ID_OBJECT_REMOVE, OnObjectRemove) + ON_UPDATE_COMMAND_UI(ID_OBJECT_REMOVE, OnUpdateObjectRemove) + //}}AFX_MSG_MAP + ON_COMMAND_EX_RANGE(ID_OBJECT_MATERIAL_BRASS,ID_OBJECT_MATERIAL_DEFAULT, OnObjectMaterialRange) + ON_UPDATE_COMMAND_UI_RANGE(ID_OBJECT_MATERIAL_BRASS,ID_OBJECT_MATERIAL_DEFAULT, OnUpdateObjectMaterialRange) END_MESSAGE_MAP() @@ -47,118 +46,129 @@ END_MESSAGE_MAP() OCC_3dBaseDoc::OCC_3dBaseDoc() { - AfxInitRichEdit(); - - Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice = - ((OCC_3dApp*)AfxGetApp())->GetGraphicDevice(); - - myViewer = new V3d_Viewer(theGraphicDevice,(short *) "Visu3D"); - myViewer->SetDefaultLights(); - myViewer->SetLightOn(); - myAISContext =new AIS_InteractiveContext(myViewer); + AfxInitRichEdit(); + + Handle(Graphic3d_GraphicDriver) aGraphicDriver = + ((OCC_App*)AfxGetApp())->GetGraphicDriver(); + + myViewer = new V3d_Viewer (aGraphicDriver, Standard_ExtString("Visu3D") ); + myViewer->SetDefaultLights(); + myViewer->SetLightOn(); + myAISContext = new AIS_InteractiveContext (myViewer); } -OCC_3dBaseDoc::~OCC_3dBaseDoc() +//----------------------------------------------------------------------------------------- +// +//----------------------------------------------------------------------------------------- +void OCC_3dBaseDoc::DragEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Standard_Integer theState, + const Handle(V3d_View)& theView) { + // TheState == -1 button down + // TheState == 0 move + // TheState == 1 button up -} + static Standard_Integer aStartDragX = 0; + static Standard_Integer aStartDragY = 0; - -void OCC_3dBaseDoc::DragEvent(const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState , - const Handle(V3d_View)& aView ) -{ - - // TheState == -1 button down - // TheState == 0 move - // TheState == 1 button up - - static Standard_Integer theButtonDownX=0; - static Standard_Integer theButtonDownY=0; - - if (TheState == -1) - { - theButtonDownX=x; - theButtonDownY=y; - } - if (TheState == 1) + if (theState == -1) { - myAISContext->Select(theButtonDownX,theButtonDownY,x,y,aView); + // button down + aStartDragX = theMouseX; + aStartDragY = theMouseY; + } + + if (theState == 1) + { + // button up + myAISContext->Select (aStartDragX, aStartDragY, + theMouseX, theMouseY, + theView); } } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void OCC_3dBaseDoc::InputEvent(const Standard_Integer x , - const Standard_Integer y , - const Handle(V3d_View)& aView ) +void OCC_3dBaseDoc::InputEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView) { - myAISContext->Select(); + myAISContext->MoveTo (theMouseX, theMouseY, theView); + myAISContext->Select(); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void OCC_3dBaseDoc::MoveEvent(const Standard_Integer x , - const Standard_Integer y , - const Handle(V3d_View)& aView ) +void OCC_3dBaseDoc::MoveEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView) { - myAISContext->MoveTo(x,y,aView); + myAISContext->MoveTo (theMouseX, theMouseY, theView); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void OCC_3dBaseDoc::ShiftMoveEvent(const Standard_Integer x , - const Standard_Integer y , - const Handle(V3d_View)& aView ) +void OCC_3dBaseDoc::ShiftMoveEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView) { - myAISContext->MoveTo(x,y,aView); + myAISContext->MoveTo (theMouseX, theMouseY, theView); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void OCC_3dBaseDoc::ShiftDragEvent(const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState , - const Handle(V3d_View)& aView ) +void OCC_3dBaseDoc::ShiftDragEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Standard_Integer theState, + const Handle(V3d_View)& theView) { - static Standard_Integer theButtonDownX=0; - static Standard_Integer theButtonDownY=0; + // TheState == -1 button down + // TheState == 0 move + // TheState == 1 button up - if (TheState == -1) - { - theButtonDownX=x; - theButtonDownY=y; - } + static Standard_Integer aStartDragX = 0; + static Standard_Integer aStartDragY = 0; - if (TheState == 0) - myAISContext->ShiftSelect(theButtonDownX,theButtonDownY,x,y,aView); -} + if (theState == -1) + { + // button down + aStartDragX = theMouseX; + aStartDragY = theMouseY; + } - -//----------------------------------------------------------------------------------------- -// -//----------------------------------------------------------------------------------------- -void OCC_3dBaseDoc::ShiftInputEvent(const Standard_Integer x , - const Standard_Integer y , - const Handle(V3d_View)& aView ) -{ - myAISContext->ShiftSelect(); + if (theState == 0) + { + // button up + myAISContext->ShiftSelect (aStartDragX, aStartDragY, + theMouseX, theMouseY, + theView); + } } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void OCC_3dBaseDoc::Popup(const Standard_Integer x, - const Standard_Integer y , - const Handle(V3d_View)& aView ) +void OCC_3dBaseDoc::ShiftInputEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView) +{ + myAISContext->ShiftSelect(); +} + +//----------------------------------------------------------------------------------------- +// +//----------------------------------------------------------------------------------------- +void OCC_3dBaseDoc::Popup (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView) { Standard_Integer PopupMenuNumber=0; - myAISContext->InitCurrent(); + myAISContext->InitCurrent(); if (myAISContext->MoreCurrent()) PopupMenuNumber=1; @@ -176,9 +186,9 @@ void OCC_3dBaseDoc::Popup(const Standard_Integer x, pPopup->EnableMenuItem(5, MF_BYPOSITION | MF_DISABLED | MF_GRAYED); } - POINT winCoord = { x , y }; + POINT winCoord = { theMouseX , theMouseY }; Handle(WNT_Window) aWNTWindow= - Handle(WNT_Window)::DownCast(aView->Window()); + Handle(WNT_Window)::DownCast(theView->Window()); ClientToScreen ( (HWND)(aWNTWindow->HWindow()),&winCoord); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON , winCoord.x, winCoord.y , AfxGetMainWnd()); @@ -239,20 +249,12 @@ void OCC_3dBaseDoc::OnObjectColor() } void OCC_3dBaseDoc::OnUpdateObjectColor(CCmdUI* pCmdUI) { - /* - bool OneOrMoreIsDisplayed = false; - for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ()) - if (myAISContext->IsDisplayed(myAISContext->Current())) OneOrMoreIsDisplayed=true; - pCmdUI->Enable (OneOrMoreIsDisplayed); - */ bool OneOrMoreIsShadingOrWireframe = false; for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ()) if (myAISContext->IsDisplayed(myAISContext->Current(),0) ||myAISContext->IsDisplayed(myAISContext->Current(),1)) OneOrMoreIsShadingOrWireframe=true; pCmdUI->Enable (OneOrMoreIsShadingOrWireframe); - - } void OCC_3dBaseDoc::OnObjectErase() @@ -298,12 +300,11 @@ void OCC_3dBaseDoc::OnUpdateObjectShading(CCmdUI* pCmdUI) void OCC_3dBaseDoc::OnObjectMaterial() { - CDialogMaterial DialBox(myAISContext); - DialBox.DoModal(); - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - OCC_3dView *pView = (OCC_3dView *) pChild->GetActiveView(); -// pView->Redraw(); + CDialogMaterial DialBox(myAISContext); + DialBox.DoModal(); + CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; + CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); + OCC_3dView *pView = (OCC_3dView *) pChild->GetActiveView(); } void OCC_3dBaseDoc::OnUpdateObjectMaterial(CCmdUI* pCmdUI) @@ -397,6 +398,6 @@ void OCC_3dBaseDoc::OnUpdateObjectRemove(CCmdUI* pCmdUI) void OCC_3dBaseDoc::SetMaterial(Graphic3d_NameOfMaterial Material) { for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ()) - myAISContext->SetMaterial (myAISContext->Current(), - (Graphic3d_NameOfMaterial)(Material)); + myAISContext->SetMaterial (myAISContext->Current(), + (Graphic3d_NameOfMaterial)(Material)); } diff --git a/samples/mfc/standard/Common/OCC_3dBaseDoc.h b/samples/mfc/standard/Common/OCC_3dBaseDoc.h index 7aa7f42fa1..283d8b5afd 100755 --- a/samples/mfc/standard/Common/OCC_3dBaseDoc.h +++ b/samples/mfc/standard/Common/OCC_3dBaseDoc.h @@ -15,71 +15,71 @@ class AFX_EXT_CLASS OCC_3dBaseDoc : public OCC_BaseDoc { public: - OCC_3dBaseDoc(); - virtual ~OCC_3dBaseDoc(); - Handle_AIS_InteractiveContext& GetAISContext(){ return myAISContext; }; - Handle_V3d_Viewer GetViewer() { return myViewer; }; - void SetMaterial(Graphic3d_NameOfMaterial Material); + OCC_3dBaseDoc(); - - 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 MoveEvent (const Standard_Integer x , - const Standard_Integer y , - const Handle(V3d_View)& aView ); - virtual void ShiftMoveEvent (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 ); - virtual void Popup (const Standard_Integer x , - const Standard_Integer y , - const Handle(V3d_View)& aView ); - static void Fit(); - int OnFileImportBrep_WithInitDir(LPCTSTR InitialDir); + void SetMaterial(Graphic3d_NameOfMaterial Material); -// Generated message map functions + + virtual void DragEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Standard_Integer theState, + const Handle(V3d_View)& theView); + + virtual void InputEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView); + + virtual void MoveEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView); + + virtual void ShiftMoveEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView); + + virtual void ShiftDragEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Standard_Integer theState, + const Handle(V3d_View)& theView); + + virtual void ShiftInputEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView); + + virtual void Popup (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView); + + static void Fit(); + + int OnFileImportBrep_WithInitDir(LPCTSTR InitialDir); + + // Generated message map functions protected: - //{{AFX_MSG(OCC_3dBaseDoc) - afx_msg void OnFileImportBrep(); - afx_msg void OnFileExportBrep(); - afx_msg void OnObjectErase(); - afx_msg void OnUpdateObjectErase(CCmdUI* pCmdUI); - afx_msg void OnObjectColor(); - afx_msg void OnUpdateObjectColor(CCmdUI* pCmdUI); - afx_msg void OnObjectShading(); - afx_msg void OnUpdateObjectShading(CCmdUI* pCmdUI); - afx_msg void OnObjectWireframe(); - afx_msg void OnUpdateObjectWireframe(CCmdUI* pCmdUI); - afx_msg void OnObjectTransparency(); - afx_msg void OnUpdateObjectTransparency(CCmdUI* pCmdUI) ; - afx_msg void OnObjectMaterial(); - afx_msg void OnUpdateObjectMaterial(CCmdUI* pCmdUI); - afx_msg BOOL OnObjectMaterialRange(UINT nID); - afx_msg void OnUpdateObjectMaterialRange(CCmdUI* pCmdUI); - afx_msg void OnObjectDisplayall(); - afx_msg void OnUpdateObjectDisplayall(CCmdUI* pCmdUI); - afx_msg void OnObjectRemove(); - afx_msg void OnUpdateObjectRemove(CCmdUI* pCmdUI); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -//Attributes -protected: - Handle_V3d_Viewer myViewer; - Handle_AIS_InteractiveContext myAISContext; - + //{{AFX_MSG(OCC_3dBaseDoc) + afx_msg void OnFileImportBrep(); + afx_msg void OnFileExportBrep(); + afx_msg void OnObjectErase(); + afx_msg void OnUpdateObjectErase(CCmdUI* pCmdUI); + afx_msg void OnObjectColor(); + afx_msg void OnUpdateObjectColor(CCmdUI* pCmdUI); + afx_msg void OnObjectShading(); + afx_msg void OnUpdateObjectShading(CCmdUI* pCmdUI); + afx_msg void OnObjectWireframe(); + afx_msg void OnUpdateObjectWireframe(CCmdUI* pCmdUI); + afx_msg void OnObjectTransparency(); + afx_msg void OnUpdateObjectTransparency(CCmdUI* pCmdUI) ; + afx_msg void OnObjectMaterial(); + afx_msg void OnUpdateObjectMaterial(CCmdUI* pCmdUI); + afx_msg BOOL OnObjectMaterialRange(UINT nID); + afx_msg void OnUpdateObjectMaterialRange(CCmdUI* pCmdUI); + afx_msg void OnObjectDisplayall(); + afx_msg void OnUpdateObjectDisplayall(CCmdUI* pCmdUI); + afx_msg void OnObjectRemove(); + afx_msg void OnUpdateObjectRemove(CCmdUI* pCmdUI); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() }; #endif // !defined(AFX_OCC_3dBaseDoc_H__02CE7BD9_39BE_11D7_8611_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/Common/OCC_3dChildFrame.cpp b/samples/mfc/standard/Common/OCC_3dChildFrame.cpp index 7c99ef8b8c..77f6a8ae2b 100755 --- a/samples/mfc/standard/Common/OCC_3dChildFrame.cpp +++ b/samples/mfc/standard/Common/OCC_3dChildFrame.cpp @@ -33,19 +33,19 @@ OCC_3dChildFrame::~OCC_3dChildFrame() int OCC_3dChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { - if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) - return -1; - - if (!m_wndToolBar.Create(this) || !m_wndToolBar.LoadToolBar(IDR_3dCHILDFRAME)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } + if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) + return -1; - m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); - m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); - EnableDocking(CBRS_ALIGN_ANY); - DockControlBar(&m_wndToolBar); - - return 0; + if (!m_wndToolBar.Create(this) || !m_wndToolBar.LoadToolBar(IDR_3dCHILDFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); + EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndToolBar); + + return 0; } \ No newline at end of file diff --git a/samples/mfc/standard/Common/OCC_3dView.cpp b/samples/mfc/standard/Common/OCC_3dView.cpp index d51f223ecf..2a68322400 100755 --- a/samples/mfc/standard/Common/OCC_3dView.cpp +++ b/samples/mfc/standard/Common/OCC_3dView.cpp @@ -4,8 +4,7 @@ #include "stdafx.h" #include "OCC_3dView.h" - -#include "OCC_3dApp.h" +#include "OCC_App.h" #include "OCC_3dBaseDoc.h" #include <res\OCC_Resource.h> @@ -59,33 +58,31 @@ END_MESSAGE_MAP() OCC_3dView::OCC_3dView() { - // TODO: add construction code here - myXmin=0; - myYmin=0; - myXmax=0; - myYmax=0; - myCurZoom=0; - myWidth=0; - myHeight=0; - // will be set in OnInitial update, but, for more security : - myCurrentMode = CurAction3d_Nothing; - myDegenerateModeIsOn=Standard_True; - m_Pen = NULL; - + // TODO: add construction code here + myXmin=0; + myYmin=0; + myXmax=0; + myYmax=0; + myCurZoom=0; + myWidth=0; + myHeight=0; + // will be set in OnInitial update, but, for more security : + myCurrentMode = CurAction3d_Nothing; + myDegenerateModeIsOn=Standard_True; + m_Pen = NULL; } OCC_3dView::~OCC_3dView() { - if ( myView ) - myView->Remove(); - if (m_Pen) delete m_Pen; + if ( myView ) + myView->Remove(); + if (m_Pen) delete m_Pen; } BOOL OCC_3dView::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs - return CView::PreCreateWindow(cs); } @@ -93,26 +90,25 @@ BOOL OCC_3dView::PreCreateWindow(CREATESTRUCT& cs) // OCC_3dView drawing void OCC_3dView::OnInitialUpdate() { - CView::OnInitialUpdate(); - - myView = GetDocument()->GetViewer()->CreateView(); + CView::OnInitialUpdate(); - // set the default mode in wireframe ( not hidden line ! ) - myView->SetDegenerateModeOn(); - // store for restore state after rotation (witch is in Degenerated mode) - myDegenerateModeIsOn = Standard_True; + myView = GetDocument()->GetViewer()->CreateView(); + + // set the default mode in wireframe ( not hidden line ! ) + myView->SetDegenerateModeOn(); + // store for restore state after rotation (which is in Degenerated mode) + myDegenerateModeIsOn = Standard_True; - Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice = - ((OCC_3dApp*)AfxGetApp())->GetGraphicDevice(); - - Handle(WNT_Window) aWNTWindow = new WNT_Window(theGraphicDevice,GetSafeHwnd ()); - myView->SetWindow(aWNTWindow); - if (!aWNTWindow->IsMapped()) aWNTWindow->Map(); + Handle(Graphic3d_GraphicDriver) aGraphicDriver = + ((OCC_App*)AfxGetApp())->GetGraphicDriver(); - // store the mode ( nothing , dynamic zooming, dynamic ... ) - myCurrentMode = CurAction3d_Nothing; - + Handle(WNT_Window) aWNTWindow = new WNT_Window(GetSafeHwnd()); + myView->SetWindow(aWNTWindow); + if (!aWNTWindow->IsMapped()) aWNTWindow->Map(); + + // store the mode ( nothing , dynamic zooming, dynamic ... ) + myCurrentMode = CurAction3d_Nothing; } void OCC_3dView::OnDraw(CDC* pDC) @@ -142,10 +138,10 @@ void OCC_3dView::Dump(CDumpContext& dc) const CView::Dump(dc); } -OCC_3dBaseDoc* OCC_3dView::GetDocument() // non-debug version is inline +OCC_3dDoc* OCC_3dView::GetDocument() // non-debug version is inline { // ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(OCC_3dBaseDoc))); - return (OCC_3dBaseDoc*)m_pDocument; + return (OCC_3dDoc*)m_pDocument; } #endif //_DEBUG @@ -189,23 +185,47 @@ void OCC_3dView::OnSize(UINT nType, int cx, int cy) myView->MustBeResized(); } +// See the back View void OCC_3dView::OnBUTTONBack() -{ myView->SetProj(V3d_Xneg); } // See the back View +{ + myView->SetProj(V3d_Xneg); +} + +// See the front View void OCC_3dView::OnBUTTONFront() -{ myView->SetProj(V3d_Xpos); } // See the front View +{ + myView->SetProj(V3d_Xpos); +} +// See the bottom View void OCC_3dView::OnBUTTONBottom() -{ myView->SetProj(V3d_Zneg); } // See the bottom View +{ + myView->SetProj(V3d_Zneg); +} + +// See the top View void OCC_3dView::OnBUTTONTop() -{ myView->SetProj(V3d_Zpos); } // See the top View +{ + myView->SetProj(V3d_Zpos); +} +// See the left View void OCC_3dView::OnBUTTONLeft() -{ myView->SetProj(V3d_Ypos); } // See the left View -void OCC_3dView::OnBUTTONRight() -{ myView->SetProj(V3d_Yneg); } // See the right View +{ + myView->SetProj(V3d_Ypos); +} +// See the right View +void OCC_3dView::OnBUTTONRight() +{ + myView->SetProj(V3d_Yneg); +} + +// See the axonometric View void OCC_3dView::OnBUTTONAxo() -{ myView->SetProj(V3d_XposYnegZpos); } // See the axonometric View +{ + myView->SetProj(V3d_XposYnegZpos); +} void OCC_3dView::OnBUTTONHlrOff() { @@ -222,7 +242,9 @@ void OCC_3dView::OnBUTTONHlrOn() } void OCC_3dView::OnBUTTONPan() -{ myCurrentMode = CurAction3d_DynamicPanning; } +{ + myCurrentMode = CurAction3d_DynamicPanning; +} void OCC_3dView::OnBUTTONPanGlo() { @@ -235,11 +257,14 @@ void OCC_3dView::OnBUTTONPanGlo() } void OCC_3dView::OnBUTTONReset() -{ myView->Reset(); } +{ + myView->Reset(); +} void OCC_3dView::OnBUTTONRot() -{ myCurrentMode = CurAction3d_DynamicRotation; } - +{ + myCurrentMode = CurAction3d_DynamicRotation; +} void OCC_3dView::OnBUTTONZoomAll() { @@ -260,144 +285,143 @@ void OCC_3dView::OnLButtonDown(UINT nFlags, CPoint point) 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 : // noting - break; - case CurAction3d_DynamicPanning :// noting - break; - case CurAction3d_GlobalPanning :// noting - break; - case CurAction3d_DynamicRotation : - if (!myDegenerateModeIsOn) - myView->SetDegenerateModeOn(); - myView->StartRotation(point.x,point.y); - break; - default : - Standard_Failure::Raise(" incompatible Current Mode "); - break; - } + { + // 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 : // noting + break; + case CurAction3d_DynamicPanning :// noting + break; + case CurAction3d_GlobalPanning :// noting + break; + case CurAction3d_DynamicRotation : + if (!myDegenerateModeIsOn) + myView->SetDegenerateModeOn(); + myView->StartRotation(point.x,point.y); + break; + default : + Standard_Failure::Raise(" incompatible Current Mode "); + break; } + } } void OCC_3dView::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 - { - myXmax=point.x; myYmax=point.y; - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); - 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 : - myXmax=point.x; myYmax=point.y; - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); - 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; - if (!myDegenerateModeIsOn) - { - CWaitCursor aWaitCursor; - myView->SetDegenerateModeOff(); - myDegenerateModeIsOn = Standard_False; - } - else - { - myView->SetDegenerateModeOn(); - myDegenerateModeIsOn = Standard_True; - } - break; - default : - Standard_Failure::Raise(" incompatible Current Mode "); - break; - } //switch (myCurrentMode) - } // else // if ( Ctrl ) + 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 + { + myXmax=point.x; myYmax=point.y; + DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); + 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 : + myXmax=point.x; myYmax=point.y; + DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); + 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; + if (!myDegenerateModeIsOn) + { + CWaitCursor aWaitCursor; + myView->SetDegenerateModeOff(); + myDegenerateModeIsOn = Standard_False; + } + else + { + myView->SetDegenerateModeOn(); + myDegenerateModeIsOn = Standard_True; + } + break; + default : + Standard_Failure::Raise(" incompatible Current Mode "); + break; + } //switch (myCurrentMode) + } // else // if ( Ctrl ) } void OCC_3dView::OnMButtonDown(UINT nFlags, CPoint point) { - if ( nFlags & MK_CONTROL ) - { - // Button MB2 down Control : panning init - // SetCursor(AfxGetApp()->LoadStandardCursor()); - } + if ( nFlags & MK_CONTROL ) + { + // Button MB2 down Control : panning init + // SetCursor(AfxGetApp()->LoadStandardCursor()); + } } void OCC_3dView::OnMButtonUp(UINT nFlags, CPoint point) { - if ( nFlags & MK_CONTROL ) - { - // Button MB2 down Control : panning init - // SetCursor(AfxGetApp()->LoadStandardCursor()); - } + if ( nFlags & MK_CONTROL ) + { + // Button MB2 down Control : panning init + // SetCursor(AfxGetApp()->LoadStandardCursor()); + } } void OCC_3dView::OnRButtonDown(UINT nFlags, CPoint point) { - if ( nFlags & MK_CONTROL ) - { - // SetCursor(AfxGetApp()->LoadStandardCursor()); - if (!myDegenerateModeIsOn) - myView->SetDegenerateModeOn(); - myView->StartRotation(point.x,point.y); - } - else // if ( Ctrl ) - { - GetDocument()->Popup(point.x,point.y,myView); - } + if ( nFlags & MK_CONTROL ) + { + if (!myDegenerateModeIsOn) + myView->SetDegenerateModeOn(); + myView->StartRotation(point.x,point.y); + } + else // if ( Ctrl ) + { + GetDocument()->Popup(point.x,point.y,myView); + } } void OCC_3dView::OnRButtonUp(UINT nFlags, CPoint point) @@ -417,84 +441,82 @@ void OCC_3dView::OnRButtonUp(UINT nFlags, CPoint point) void OCC_3dView::OnMouseMove(UINT nFlags, CPoint point) { - // ============================ LEFT BUTTON ======================= + // ============================ LEFT BUTTON ======================= if ( nFlags & MK_LBUTTON) + { + if ( nFlags & MK_CONTROL ) { - 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; - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); - if (nFlags & MK_SHIFT) - GetDocument()->ShiftDragEvent(myXmax,myYmax,0,myView); - else - GetDocument()->DragEvent(myXmax,myYmax,0,myView); - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True); + // 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; + DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); + 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_False,LongDash); - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash); - 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(); + 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; - default : - Standard_Failure::Raise(" incompatible Current Mode "); + case CurAction3d_WindowZooming : + myXmax = point.x; myYmax = point.y; + DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False,LongDash); + DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True,LongDash); break; - }// switch (myCurrentMode) - }// if ( nFlags & MK_CONTROL ) else - } else // if ( nFlags & MK_LBUTTON) - // ============================ MIDDLE BUTTON ======================= - if ( nFlags & MK_MBUTTON) + 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; + default : + Standard_Failure::Raise(" incompatible Current Mode "); + break; + }// switch (myCurrentMode) + }// if ( nFlags & MK_CONTROL ) else + } + else if ( nFlags & MK_MBUTTON) + { + if ( nFlags & MK_CONTROL ) { - if ( nFlags & MK_CONTROL ) - { - myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; + 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) + } + } + else if ( nFlags & MK_RBUTTON) + { + if ( nFlags & MK_CONTROL ) { - 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 (nFlags & MK_SHIFT) - GetDocument()->ShiftMoveEvent(point.x,point.y,myView); - else - GetDocument()->MoveEvent(point.x,point.y,myView); - } + myView->Rotation(point.x,point.y); + } + } + else + { // No buttons + myXmax = point.x; myYmax = point.y; + if (nFlags & MK_SHIFT) + GetDocument()->ShiftMoveEvent(point.x,point.y,myView); + else + GetDocument()->MoveEvent(point.x,point.y,myView); + } } void OCC_3dView::DrawRectangle(const Standard_Integer MinX , diff --git a/samples/mfc/standard/Common/OCC_3dView.h b/samples/mfc/standard/Common/OCC_3dView.h index acb5ab8af5..2153fb00a7 100755 --- a/samples/mfc/standard/Common/OCC_3dView.h +++ b/samples/mfc/standard/Common/OCC_3dView.h @@ -10,7 +10,7 @@ #endif // _MSC_VER > 1000 #include "OCC_BaseView.h" -#include "OCC_3dBaseDoc.h" +#include "OCC_3dDoc.h" #include <Standard_Macro.hxx> enum CurAction3d { @@ -29,7 +29,7 @@ public: OCC_3dView(); virtual ~OCC_3dView(); - OCC_3dBaseDoc* GetDocument(); + OCC_3dDoc* GetDocument(); void FitAll() { if ( !myView.IsNull() ) myView->FitAll(); myView->ZFitAll(); }; void Redraw() { if ( !myView.IsNull() ) myView->Redraw(); }; @@ -113,8 +113,8 @@ protected: }; #ifndef _DEBUG // debug version in OCC_3dView.cpp -inline OCC_3dBaseDoc* OCC_3dView::GetDocument() - { return (OCC_3dBaseDoc*)m_pDocument; } +inline OCC_3dDoc* OCC_3dView::GetDocument() + { return (OCC_3dDoc*)m_pDocument; } #endif #endif // !defined(AFX_OCC_3DVIEW_H__1F4065AE_39C4_11D7_8611_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/Common/OCC_App.cpp b/samples/mfc/standard/Common/OCC_App.cpp new file mode 100644 index 0000000000..d55367fdde --- /dev/null +++ b/samples/mfc/standard/Common/OCC_App.cpp @@ -0,0 +1,176 @@ +// OCC_App.cpp: implementation of the OCC_App class. +// +////////////////////////////////////////////////////////////////////// + +#include <stdafx.h> + +#include "OCC_App.h" + +#include <res\OCC_Resource.h> + +#include <Standard_Version.hxx> +#include <OSD.hxx> +#include "afxwin.h" + +///////////////////////////////////////////////////////////////////////////// +// OCC_App + +BEGIN_MESSAGE_MAP(OCC_App, CWinApp) + //{{AFX_MSG_MAP(OCC_App) + 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() + +///////////////////////////////////////////////////////////////////////////// +// OCC_App construction + +OCC_App::OCC_App() : CWinApp() +{ + OSD::SetSignal (Standard_True); + SampleName = ""; + SetSamplePath (NULL); + try + { + Handle(Aspect_DisplayConnection) aDisplayConnection; + myGraphicDriver = Graphic3d::InitGraphicDriver (aDisplayConnection); + } + catch(Standard_Failure) + { + AfxMessageBox ("Fatal error during graphic initialization", MB_ICONSTOP); + ExitProcess (1); + } +} + +void OCC_App::SetSamplePath(LPCTSTR aPath) +{ + char AbsoluteExecutableFileName[MAX_PATH+1]; + HMODULE hModule = GetModuleHandle(NULL); + GetModuleFileName(hModule, AbsoluteExecutableFileName, MAX_PATH); + + SamplePath = CString(AbsoluteExecutableFileName); + int index = SamplePath.ReverseFind('\\'); + SamplePath.Delete(index+1, SamplePath.GetLength() - index - 1); + if (aPath == NULL) + SamplePath += ".."; + else{ + CString aCInitialDir(aPath); + SamplePath += "..\\" + aCInitialDir; + } +} +///////////////////////////////////////////////////////////////////////////// +// CAboutDlgStd dialog used for App About + +class CAboutDlgStd : public CDialog +{ +public: + CAboutDlgStd(); + BOOL OnInitDialog(); + + // Dialog Data + //{{AFX_DATA(CAboutDlgStd) + enum { IDD = IDD_OCC_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlgStd) +protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + + +// Implementation +protected: + //{{AFX_MSG(CAboutDlgStd) + // No message handlers + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +public: + CString ReadmeText; +}; + +CAboutDlgStd::CAboutDlgStd() : CDialog(CAboutDlgStd::IDD) +, ReadmeText(_T("")) +{ + //{{AFX_DATA_INIT(CAboutDlgStd) + //}}AFX_DATA_INIT +} + +void CAboutDlgStd::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlgStd) + //}}AFX_DATA_MAP + DDX_Text(pDX, IDC_README, ReadmeText); +} + +BEGIN_MESSAGE_MAP(CAboutDlgStd, CDialog) + //{{AFX_MSG_MAP(CAboutDlgStd) + // No message handlers + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +BOOL CAboutDlgStd::OnInitDialog(){ + CWnd* Title = GetDlgItem(IDC_ABOUTBOX_TITLE); + + CString About = "About "; + CString Sample = "Sample "; + CString SampleName = ((OCC_App*)AfxGetApp())->GetSampleName(); + CString Cascade = ", Open CASCADE Technology "; + CString Version = OCC_VERSION_STRING; + + CString strTitle = Sample + SampleName + Cascade + Version; + CString dlgTitle = About + SampleName; + + Title->SetWindowText(strTitle); + SetWindowText(dlgTitle); + if(SampleName.Find("Viewer2d")==-1) + { + CWnd* aReadmeEdit = GetDlgItem(IDC_README); + aReadmeEdit->ShowWindow(FALSE); + } + else + { + CFile aFile; + if(aFile.Open("..//..//..//README.txt",CFile::modeRead)) + { + UINT aFileLength = (UINT)aFile.GetLength(); + char* buffer=new char[aFileLength]; + aFile.Read(buffer,aFileLength); + ReadmeText.SetString(buffer); + ReadmeText.SetAt(aFileLength,'\0'); + ReadmeText.Replace("\n","\r\n"); + UpdateData(FALSE); + } + } + + CenterWindow(); + return TRUE; +} + +// App command to run the dialog +void OCC_App::OnAppAbout() +{ + CAboutDlgStd aboutDlg; + aboutDlg.DoModal(); +} + +LPCTSTR OCC_App::GetSampleName() +{ + return SampleName; +} + +LPCTSTR OCC_App::GetInitDataDir() +{ + return (LPCTSTR) SamplePath; +} + +void OCC_App::SetSampleName(LPCTSTR Name) +{ + SampleName = Name; +} diff --git a/samples/mfc/standard/Common/OCC_BaseApp.h b/samples/mfc/standard/Common/OCC_App.h old mode 100755 new mode 100644 similarity index 67% rename from samples/mfc/standard/Common/OCC_BaseApp.h rename to samples/mfc/standard/Common/OCC_App.h index 67104b928c..f079a5a0e3 --- a/samples/mfc/standard/Common/OCC_BaseApp.h +++ b/samples/mfc/standard/Common/OCC_App.h @@ -2,8 +2,8 @@ // ////////////////////////////////////////////////////////////////////// -#if !defined(AFX_OCC_BASEAPP_H__425A6447_38ED_11D7_8611_0060B0EE281E__INCLUDED_) -#define AFX_OCC_BASEAPP_H__425A6447_38ED_11D7_8611_0060B0EE281E__INCLUDED_ +#if !defined(AFX_OCC_APP_H__425A6447_38ED_11D7_8611_0060B0EE281E__INCLUDED_) +#define AFX_OCC_APP_H__425A6447_38ED_11D7_8611_0060B0EE281E__INCLUDED_ #if _MSC_VER > 1000 #pragma once @@ -11,15 +11,20 @@ #include "res\OCC_Resource.h" #include <Standard_Macro.hxx> +#include <Graphic3d_GraphicDriver.hxx> -class AFX_EXT_CLASS OCC_BaseApp : public CWinApp +class AFX_EXT_CLASS OCC_App : public CWinApp { public: void SetSampleName(LPCTSTR Name); virtual LPCTSTR GetSampleName(); LPCTSTR GetInitDataDir(); void SetSamplePath(LPCTSTR aPath); - OCC_BaseApp(); + OCC_App(); + Handle_Graphic3d_GraphicDriver GetGraphicDriver() const + { + return myGraphicDriver; + } // Implementation //{{AFX_MSG(OCC_BaseApp) @@ -29,6 +34,7 @@ public: //}}AFX_MSG DECLARE_MESSAGE_MAP() protected: + Handle_Graphic3d_GraphicDriver myGraphicDriver; public: LPCTSTR SampleName; CString SamplePath; diff --git a/samples/mfc/standard/Common/OCC_BaseApp.cpp b/samples/mfc/standard/Common/OCC_BaseApp.cpp deleted file mode 100755 index f58d695058..0000000000 --- a/samples/mfc/standard/Common/OCC_BaseApp.cpp +++ /dev/null @@ -1,143 +0,0 @@ -// OCC_BaseApp.cpp: implementation of the OCC_BaseApp class. -// -////////////////////////////////////////////////////////////////////// - -#include <stdafx.h> - -#include "OCC_BaseApp.h" - -#include <res\OCC_Resource.h> - -#include <Standard_Version.hxx> -#include <OSD.hxx> - -///////////////////////////////////////////////////////////////////////////// -// OCC_BaseApp - -BEGIN_MESSAGE_MAP(OCC_BaseApp, CWinApp) - //{{AFX_MSG_MAP(OCC_BaseApp) - 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() - -///////////////////////////////////////////////////////////////////////////// -// OCC_BaseApp construction - -OCC_BaseApp::OCC_BaseApp() -{ - OSD::SetSignal(Standard_True); - SampleName = ""; - SetSamplePath(NULL); -} - - -void OCC_BaseApp::SetSamplePath(LPCTSTR aPath) -{ - char AbsoluteExecutableFileName[MAX_PATH+1]; - HMODULE hModule = GetModuleHandle(NULL); - GetModuleFileName(hModule, AbsoluteExecutableFileName, MAX_PATH); - - SamplePath = CString(AbsoluteExecutableFileName); - int index = SamplePath.ReverseFind('\\'); - SamplePath.Delete(index+1, SamplePath.GetLength() - index - 1); - if (aPath == NULL) - SamplePath += ".."; - else{ - CString aCInitialDir(aPath); - SamplePath += "..\\" + aCInitialDir; - } -} -///////////////////////////////////////////////////////////////////////////// -// CAboutDlgStd dialog used for App About - -class CAboutDlgStd : public CDialog -{ -public: - CAboutDlgStd(); - BOOL OnInitDialog(); - -// Dialog Data - //{{AFX_DATA(CAboutDlgStd) - enum { IDD = IDD_OCC_ABOUTBOX }; - //}}AFX_DATA - - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CAboutDlgStd) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - - -// Implementation -protected: - //{{AFX_MSG(CAboutDlgStd) - // No message handlers - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -CAboutDlgStd::CAboutDlgStd() : CDialog(CAboutDlgStd::IDD) -{ - //{{AFX_DATA_INIT(CAboutDlgStd) - //}}AFX_DATA_INIT -} - -void CAboutDlgStd::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CAboutDlgStd) - //}}AFX_DATA_MAP -} - -BEGIN_MESSAGE_MAP(CAboutDlgStd, CDialog) - //{{AFX_MSG_MAP(CAboutDlgStd) - // No message handlers - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -BOOL CAboutDlgStd::OnInitDialog(){ - CWnd* Title = GetDlgItem(IDC_ABOUTBOX_TITLE); - - CString About = "About "; - CString Sample = "Sample "; - CString SampleName = ((OCC_BaseApp*)AfxGetApp())->GetSampleName(); - CString Cascade = ", Open CASCADE Technology "; - CString Version = OCC_VERSION_STRING; - - CString strTitle = Sample + SampleName + Cascade + Version; - CString dlgTitle = About + SampleName; - - Title->SetWindowText(strTitle); - SetWindowText(dlgTitle); - - CenterWindow(); - - return TRUE; -} - -// App command to run the dialog -void OCC_BaseApp::OnAppAbout() -{ - CAboutDlgStd aboutDlg; - aboutDlg.DoModal(); -} - -LPCTSTR OCC_BaseApp::GetSampleName() -{ - return SampleName; -} - -LPCTSTR OCC_BaseApp::GetInitDataDir() -{ - return (LPCTSTR) SamplePath; -} - -void OCC_BaseApp::SetSampleName(LPCTSTR Name) -{ - SampleName = Name; -} diff --git a/samples/mfc/standard/Common/OCC_BaseChildFrame.cpp b/samples/mfc/standard/Common/OCC_BaseChildFrame.cpp index 351622470c..b9f11cec4a 100755 --- a/samples/mfc/standard/Common/OCC_BaseChildFrame.cpp +++ b/samples/mfc/standard/Common/OCC_BaseChildFrame.cpp @@ -35,12 +35,12 @@ OCC_BaseChildFrame::~OCC_BaseChildFrame() #ifdef _DEBUG void OCC_BaseChildFrame::AssertValid() const { - CMDIChildWnd::AssertValid(); + CMDIChildWnd::AssertValid(); } void OCC_BaseChildFrame::Dump(CDumpContext& dc) const { - CMDIChildWnd::Dump(dc); + CMDIChildWnd::Dump(dc); } #endif //_DEBUG @@ -50,29 +50,29 @@ void OCC_BaseChildFrame::Dump(CDumpContext& dc) const void OCC_BaseChildFrame::ActivateFrame(int nCmdShow) { - POSITION pos=AfxGetApp()->GetFirstDocTemplatePosition(); - CDocTemplate* DocT=AfxGetApp()->GetNextDocTemplate(pos); + POSITION pos=AfxGetApp()->GetFirstDocTemplatePosition(); + CDocTemplate* DocT=AfxGetApp()->GetNextDocTemplate(pos); - POSITION FirstDocPosition =DocT->GetFirstDocPosition(); - POSITION p = FirstDocPosition; + POSITION FirstDocPosition =DocT->GetFirstDocPosition(); + POSITION p = FirstDocPosition; - CDocument* doc; - doc = NULL; + CDocument* doc; + doc = NULL; - if(FirstDocPosition!=NULL) - { - doc = DocT->GetNextDoc(p); - if(AfxIsValidAddress(doc, sizeof(CDocument)) && p == NULL) - { - ASSERT_VALID(doc); - POSITION position = doc->GetFirstViewPosition(); - if(position != NULL) - doc ->GetNextView(position); - if (position == NULL) - nCmdShow = SW_SHOWMAXIMIZED; - } - } + if(FirstDocPosition!=NULL) + { + doc = DocT->GetNextDoc(p); + if(AfxIsValidAddress(doc, sizeof(CDocument)) && p == NULL) + { + ASSERT_VALID(doc); + POSITION position = doc->GetFirstViewPosition(); + if(position != NULL) + doc ->GetNextView(position); + if (position == NULL) + nCmdShow = SW_SHOWMAXIMIZED; + } + } - CMDIChildWnd::ActivateFrame(nCmdShow); + CMDIChildWnd::ActivateFrame(nCmdShow); } diff --git a/samples/mfc/standard/Common/OCC_BaseDoc.h b/samples/mfc/standard/Common/OCC_BaseDoc.h index 347a3c2f5a..869d0fdba9 100755 --- a/samples/mfc/standard/Common/OCC_BaseDoc.h +++ b/samples/mfc/standard/Common/OCC_BaseDoc.h @@ -14,9 +14,49 @@ class OCC_BaseDoc : public CDocument { public: - OCC_BaseDoc(); - virtual ~OCC_BaseDoc(); + OCC_BaseDoc(); + + virtual ~OCC_BaseDoc(); + + Handle(AIS_InteractiveContext)& GetAISContext() { return myAISContext; } + + Handle(V3d_Viewer) GetViewer() { return myViewer; } + + //Events + virtual void DragEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Standard_Integer theState, + const Handle(V3d_View)& theView) {} + + virtual void InputEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView) {} + + virtual void MoveEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView) {} + + virtual void ShiftMoveEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView) {} + + virtual void ShiftDragEvent (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Standard_Integer theState, + const Handle(V3d_View)& theView) {} + + virtual void ShiftInputEvent(const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView) {} + + virtual void Popup (const Standard_Integer theMouseX, + const Standard_Integer theMouseY, + const Handle(V3d_View)& theView) {} +protected: + + Handle(V3d_Viewer) myViewer; + Handle(AIS_InteractiveContext) myAISContext; }; #endif // !defined(AFX_OCC_BASEDOC_H__2E048CC8_38F9_11D7_8611_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/Common/OCC_MainFrame.cpp b/samples/mfc/standard/Common/OCC_MainFrame.cpp index 659d32cbd6..246a9edfdc 100755 --- a/samples/mfc/standard/Common/OCC_MainFrame.cpp +++ b/samples/mfc/standard/Common/OCC_MainFrame.cpp @@ -35,100 +35,64 @@ static UINT indicators[] = OCC_MainFrame::OCC_MainFrame(BOOL withAISToolBar /*=false*/) { - m_withAISToolBar=withAISToolBar; - if(withAISToolBar){ - m_AISToolBar = new CToolBar; - } - else - m_AISToolBar = NULL; + m_withAISToolBar=withAISToolBar; + if(withAISToolBar){ + m_AISToolBar = new CToolBar; + } + else + m_AISToolBar = NULL; } OCC_MainFrame::~OCC_MainFrame() { - if (m_AISToolBar) delete m_AISToolBar; + if (m_AISToolBar) delete m_AISToolBar; } -/* -int FindMenuItem(CMenu* Menu, LPCTSTR MenuString) -{ - ASSERT(Menu); - ASSERT(::IsMenu(Menu->GetSafeHmenu())); - - int count = Menu->GetMenuItemCount(); - for (int i = 0; i < count; i++) - { - CString str; - if (Menu->GetMenuString(i, str, MF_BYPOSITION) && - (strcmp(str, MenuString) == 0)) - return i; - } - - return -1; -} -*/ - int OCC_MainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { - if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) - return -1; - - if (!m_wndToolBar.Create(this) || - !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } - - if (m_withAISToolBar){ - if (!m_AISToolBar->Create(this) || - !m_AISToolBar->LoadToolBar(IDR_TB_AIS)) - { - 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 - } + if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; - // TODO: Remove this if you don't want tool tips or a resizeable toolbar - m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | - CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + if (!m_wndToolBar.Create(this) || + !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) + { + TRACE0("Failed to create toolbar\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,AFX_IDW_DOCKBAR_TOP); - if (m_withAISToolBar){ - m_AISToolBar->SetBarStyle(m_AISToolBar->GetBarStyle() | - CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); - m_AISToolBar->EnableDocking(CBRS_ALIGN_ANY); - DockControlBarLeftOf(m_AISToolBar,&m_wndToolBar); - } - -/* - CMenu* menu = GetMenu(); - CMenu* SubMenu = menu->GetSubMenu(2); - int pos = FindMenuItem(SubMenu, "&About SampleName..."); - if (pos > -1) - { - UINT id = SubMenu->GetMenuItemID(pos); - LPCTSTR SampleName = ((OCC_BaseApp* )AfxGetApp())->GetSampleName(); - char* str=""; - strcpy(str,SampleName); - strcat(str,"..."); - char* about = "About "; - strcat(about,str); - SubMenu->ModifyMenu(id, MF_BYCOMMAND, id, about); + if (m_withAISToolBar){ + if (!m_AISToolBar->Create(this) || + !m_AISToolBar->LoadToolBar(IDR_TB_AIS)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create } -*/ - return 0; + } + + 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: Remove this if you don't want tool tips or a resizeable toolbar + m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + + // 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,AFX_IDW_DOCKBAR_TOP); + if (m_withAISToolBar){ + m_AISToolBar->SetBarStyle(m_AISToolBar->GetBarStyle() | + CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); + m_AISToolBar->EnableDocking(CBRS_ALIGN_ANY); + DockControlBarLeftOf(m_AISToolBar,&m_wndToolBar); + } + return 0; } ///////////////////////////////////////////////////////////////////////////// @@ -137,50 +101,49 @@ int OCC_MainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) #ifdef _DEBUG void OCC_MainFrame::AssertValid() const { - CMDIFrameWnd::AssertValid(); + CMDIFrameWnd::AssertValid(); } void OCC_MainFrame::Dump(CDumpContext& dc) const { - CMDIFrameWnd::Dump(dc); + CMDIFrameWnd::Dump(dc); } #endif //_DEBUG void OCC_MainFrame::SetStatusMessage(const CString & message) { - m_wndStatusBar.SetWindowText(message); + m_wndStatusBar.SetWindowText(message); } BOOL OCC_MainFrame::PreCreateWindow(CREATESTRUCT& cs) { - // TODO: Modify the Window class or styles here by modifying - // the CREATESTRUCT cs - - return CMDIFrameWnd::PreCreateWindow(cs); + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs + return CMDIFrameWnd::PreCreateWindow(cs); } void OCC_MainFrame::DockControlBarLeftOf(CToolBar* Bar,CToolBar* LeftOf) { - CRect rect; - DWORD dw; - UINT n; + CRect rect; + DWORD dw; + UINT n; - // get MFC to adjust the dimensions of all docked ToolBars - // so that GetWindowRect will be accurate - RecalcLayout(); - LeftOf->GetWindowRect(&rect); - rect.OffsetRect(1,0); - dw=LeftOf->GetBarStyle(); - n = 0; - n = (dw&CBRS_ALIGN_TOP) ? AFX_IDW_DOCKBAR_TOP : n; - n = (dw&CBRS_ALIGN_BOTTOM && n==0) ? AFX_IDW_DOCKBAR_BOTTOM : n; - n = (dw&CBRS_ALIGN_LEFT && n==0) ? AFX_IDW_DOCKBAR_LEFT : n; - n = (dw&CBRS_ALIGN_RIGHT && n==0) ? AFX_IDW_DOCKBAR_RIGHT : n; + // get MFC to adjust the dimensions of all docked ToolBars + // so that GetWindowRect will be accurate + RecalcLayout(); + LeftOf->GetWindowRect(&rect); + rect.OffsetRect(1,0); + dw=LeftOf->GetBarStyle(); + n = 0; + n = (dw&CBRS_ALIGN_TOP) ? AFX_IDW_DOCKBAR_TOP : n; + n = (dw&CBRS_ALIGN_BOTTOM && n==0) ? AFX_IDW_DOCKBAR_BOTTOM : n; + n = (dw&CBRS_ALIGN_LEFT && n==0) ? AFX_IDW_DOCKBAR_LEFT : n; + n = (dw&CBRS_ALIGN_RIGHT && n==0) ? AFX_IDW_DOCKBAR_RIGHT : n; - // When we take the default parameters on rect, DockControlBar will dock - // each Toolbar on a seperate line. By calculating a rectangle, we in effect - // are simulating a Toolbar being dragged to that location and docked. - DockControlBar(Bar,n,&rect); + // When we take the default parameters on rect, DockControlBar will dock + // each Toolbar on a seperate line. By calculating a rectangle, we in effect + // are simulating a Toolbar being dragged to that location and docked. + DockControlBar(Bar,n,&rect); } diff --git a/samples/mfc/standard/Common/OCC_MainFrame.h b/samples/mfc/standard/Common/OCC_MainFrame.h index 107105bc16..edfa0c1963 100755 --- a/samples/mfc/standard/Common/OCC_MainFrame.h +++ b/samples/mfc/standard/Common/OCC_MainFrame.h @@ -9,7 +9,7 @@ #pragma once #endif // _MSC_VER > 1000 -#include <OCC_BaseApp.h> +#include <OCC_App.h> enum OCC_MainFrm{ without_AIS_TB, diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Curve.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Curve.cpp deleted file mode 100755 index eae7018f71..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Curve.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "stdafx.h" - -#include "Sample2D_Curve.h" - - -IMPLEMENT_STANDARD_HANDLE(Sample2D_Curve,AIS2D_InteractiveObject) -IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Curve,AIS2D_InteractiveObject) - -#include <Graphic2d_SetOfCurves.hxx> -#include <Geom2dAdaptor_Curve.hxx> -#include <Bnd_Box2d.hxx> -#include <BndLib_Add2dCurve.hxx> -#include <Precision.hxx> -#include <Select2D_SensitiveBox.hxx> -#include <Select2D_SensitiveSegment.hxx> -#include <gp_Circ2d.hxx> -#include <gp_Dir2d.hxx> -#include <gp_Ax2d.hxx> - -#include <Select2D_SensitiveArc.hxx> -#include <Geom2d_Curve.hxx> -#include <GeomTools_Curve2dSet.hxx> -#include <Geom2d_TrimmedCurve.hxx> -#include <gp_Pnt2d.hxx> -#include <GCE2d_MakeSegment.hxx> -#include <gp_Vec2d.hxx> -#include <OSD_Environment.hxx> -#include <Graphic2d_Array1OfVertex.hxx> -#include <Graphic2d_PolyLine.hxx> -#include "SelectMgr_Selection.hxx" -#include "Prs2d_AspectLine.hxx" -#include "Graphic2d_TypeOfPolygonFilling.hxx" - -Sample2D_Curve::Sample2D_Curve(const Handle_Geom2d_Curve aGeom2dCurve, - const Standard_Integer aTypeOfLineIndex, - const Standard_Integer aWidthOfLineIndex, - const Standard_Integer aColorIndex) - :AIS2D_InteractiveObject() -{ - myGeom2dCurve = aGeom2dCurve; - myTypeOfLineIndex = aTypeOfLineIndex ; - myWidthOfLineIndex = aWidthOfLineIndex; - myColorIndex = aColorIndex ; -} - - -void Sample2D_Curve::SetContext(const Handle(AIS2D_InteractiveContext)& theContext) -{ - AIS2D_InteractiveObject::SetContext(theContext); - - Handle(Prs2d_AspectLine) aLineAspect = new Prs2d_AspectLine; - aLineAspect->SetTypeOfFill(Graphic2d_TOPF_EMPTY); - - Handle(Graphic2d_SetOfCurves) segment; - segment = new Graphic2d_SetOfCurves(this); - - segment->Add(myGeom2dCurve); - - aLineAspect->SetTypeIndex(myTypeOfLineIndex); - aLineAspect->SetColorIndex(myColorIndex); - aLineAspect->SetWidthIndex(myWidthOfLineIndex); - - SetAspect(aLineAspect, segment); - -} - diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Curve.h b/samples/mfc/standard/Common/Primitive/Sample2D_Curve.h deleted file mode 100755 index 77962654f3..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Curve.h +++ /dev/null @@ -1,123 +0,0 @@ -#ifndef _Sample2D_Curve_HeaderFile -#define _Sample2D_Curve_HeaderFile - -#include <Standard_Macro.hxx> -#include <Standard_DefineHandle.hxx> - - -#include <Quantity_Length.hxx> -#include <Aspect_TypeOfline.hxx> -#include <Aspect_WidthOfline.hxx> -#include <Standard_Integer.hxx> -#include <SelectMgr_SelectableObject.hxx> -#include <Handle_PrsMgr_PresentationManager2d.hxx> -#include <Handle_Graphic2d_GraphicObject.hxx> -#include <Handle_SelectMgr_Selection.hxx> -#include <Standard_OStream.hxx> -#include <Standard_IStream.hxx> -#include <Standard_CString.hxx> - -class TColGeom2d_HSequenceOfCurve; -class PrsMgr_PresentationManager2d; -class Graphic2d_GraphicObject; -class SelectMgr_Selection; -class ISession2D_ObjectOwner; - -#include "Geom2d_Curve.hxx" - -#include "AIS2D_InteractiveObject.hxx" -DEFINE_STANDARD_HANDLE(Sample2D_Curve,AIS2D_InteractiveObject) -class Sample2D_Curve : public AIS2D_InteractiveObject { - -public: - - // Methods PUBLIC - // - Standard_EXPORT Sample2D_Curve(const Handle_Geom2d_Curve aGeom2dCurve, - const Standard_Integer aTypeOfline = 1, - const Standard_Integer aWidthOfLine = 1, - const Standard_Integer aColorIndex = 4); - -inline Standard_Integer GetTypeOfLineIndex - () const; -inline void SetTypeOfLineIndex - (const Standard_Integer aNewTypeOfLineIndex) ; -inline Standard_Integer GetWidthOfLineIndex - () const; -inline void SetWidthOfLineIndex - (const Standard_Integer aNewWidthOfLineIndex) ; -inline Standard_Integer GetColorIndex - () const; -inline void SetColorIndex - (const Standard_Integer aNewColorIndex) ; - -DEFINE_STANDARD_RTTI(Sample2D_Curve) - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // -virtual void SetContext(const Handle(AIS2D_InteractiveContext)& theContext) ; - - - // Fields PRIVATE - // -Handle_Geom2d_Curve myGeom2dCurve; -Standard_Integer myTypeOfLineIndex; -Standard_Integer myWidthOfLineIndex; -Standard_Integer myColorIndex; - - -}; - - - -// other inCurve functions and methods (like "C++: function call" methods) -// - - -inline Standard_Integer Sample2D_Curve::GetTypeOfLineIndex() const -{ - return myTypeOfLineIndex ; -} - -inline void Sample2D_Curve::SetTypeOfLineIndex(const Standard_Integer aNewTypeOfLineIndex) -{ - myTypeOfLineIndex = aNewTypeOfLineIndex; -} - -inline Standard_Integer Sample2D_Curve::GetWidthOfLineIndex() const -{ - return myWidthOfLineIndex ; -} - -inline void Sample2D_Curve::SetWidthOfLineIndex(const Standard_Integer aNewWidthOfLineIndex) -{ - myWidthOfLineIndex = aNewWidthOfLineIndex; -} - -inline Standard_Integer Sample2D_Curve::GetColorIndex() const -{ - return myColorIndex ; -} - -inline void Sample2D_Curve::SetColorIndex(const Standard_Integer aNewColorIndex) -{ - myColorIndex = aNewColorIndex; -} - - - - -#endif diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp index 087744ed02..97098af174 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp @@ -2,182 +2,442 @@ #include "Sample2D_Face.h" -IMPLEMENT_STANDARD_HANDLE(Sample2D_Face,AIS2D_InteractiveObject) -IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Face,AIS2D_InteractiveObject) - -Sample2D_Face::Sample2D_Face (TopoDS_Face& aFace) - :AIS2D_InteractiveObject(),myFace(aFace) +IMPLEMENT_STANDARD_HANDLE(Sample2D_Face,AIS_InteractiveObject) +IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Face,AIS_InteractiveObject) +Sample2D_Face::Sample2D_Face (const TopoDS_Shape& theFace) +:AIS_InteractiveObject() { -myMarkerIndex = 1; -myMarkerWidth = 5; -myMarkerHeight = 5; -myFORWARDColorIndex = 2; -myREVERSEDColorIndex = 3; -myINTERNALColorIndex = 4; -myEXTERNALColorIndex = 5; -myWidthIndex = 1; -myTypeIndex = 1; + 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); } - -#include "TopExp_Explorer.hxx" -#include "BRep_Tool.hxx" -#include "TopoDS.hxx" -#include "TopoDS_Edge.hxx" -#include "TopoDS.hxx" -#include "TopoDS_Vertex.hxx" -#include "TopExp.hxx" -#include "Graphic2d_Marker.hxx" -#include "Graphic2d_PolylineMarker.hxx" -#include "gp.hxx" -#include "Prs2d_AspectLine.hxx" -#include "Graphic2d_TypeOfPolygonFilling.hxx" - -void Sample2D_Face::SetContext(const Handle(AIS2D_InteractiveContext)& theContext) +void Sample2D_Face::DrawMarker(const Handle(Geom2d_TrimmedCurve)& theCurve, const Handle(Prs3d_Presentation)& thePresentation) { - if(myFace.IsNull() || myFace.ShapeType()!=TopAbs_FACE) return; + 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)); - AIS2D_InteractiveObject::SetContext(theContext); + Handle(Graphic3d_ArrayOfPolylines) anArrow = new Graphic3d_ArrayOfPolylines(3); + anArrow->AddVertex(aLeft); + anArrow->AddVertex(aPoint); + anArrow->AddVertex(aRight); - Handle(Prs2d_AspectLine) aLineAspect_FORWARD = new Prs2d_AspectLine; - - aLineAspect_FORWARD->SetTypeOfFill(Graphic2d_TOPF_EMPTY); - aLineAspect_FORWARD->SetTypeIndex(myTypeIndex); - aLineAspect_FORWARD->SetWidthIndex(myWidthIndex); - aLineAspect_FORWARD->SetColorIndex(myFORWARDColorIndex); + Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(anArrow); + } +} - Handle(Prs2d_AspectLine) aLineAspect_REVERSED = new Prs2d_AspectLine; - aLineAspect_REVERSED->SetTypeOfFill(Graphic2d_TOPF_EMPTY); - aLineAspect_REVERSED->SetTypeIndex(myTypeIndex); - aLineAspect_REVERSED->SetWidthIndex(myWidthIndex); - aLineAspect_REVERSED->SetColorIndex(myREVERSEDColorIndex); +void Sample2D_Face::FillData(Standard_Boolean isSizesRecompute) +{ + if(myshape.IsNull() || myshape.ShapeType()!=TopAbs_FACE) return; - Handle(Prs2d_AspectLine) aLineAspect_INTERNAL = new Prs2d_AspectLine; - aLineAspect_INTERNAL->SetTypeOfFill(Graphic2d_TOPF_EMPTY); - aLineAspect_INTERNAL->SetTypeIndex(myTypeIndex); - aLineAspect_INTERNAL->SetWidthIndex(myWidthIndex); - aLineAspect_INTERNAL->SetColorIndex(myINTERNALColorIndex); + Standard_Real f,l; + TopExp_Explorer ex; + TopoDS_Face aFace = TopoDS::Face(myshape); - Handle(Prs2d_AspectLine) aLineAspect_EXTERNAL = new Prs2d_AspectLine; - aLineAspect_EXTERNAL->SetTypeOfFill(Graphic2d_TOPF_EMPTY); - aLineAspect_EXTERNAL->SetTypeIndex(myTypeIndex); - aLineAspect_EXTERNAL->SetWidthIndex(myWidthIndex); - aLineAspect_EXTERNAL->SetColorIndex(myEXTERNALColorIndex); - - // pcurves of a face - - Handle(Graphic2d_SetOfCurves) segment_FORWARD; - segment_FORWARD = new Graphic2d_SetOfCurves(this); - - Handle(Graphic2d_SetOfCurves) segment_REVERSED; - segment_REVERSED = new Graphic2d_SetOfCurves(this); - - Handle(Graphic2d_SetOfCurves) segment_INTERNAL; - segment_INTERNAL = new Graphic2d_SetOfCurves(this); - - Handle(Graphic2d_SetOfCurves) segment_EXTERNAL; - segment_EXTERNAL = new Graphic2d_SetOfCurves(this); - - Standard_Real f,l; - Standard_Integer i = 1; - myFace.Orientation(TopAbs_FORWARD); - TopExp_Explorer ex(myFace,TopAbs_EDGE); - while (ex.More()) { - const Handle(Geom2d_Curve) Curve = BRep_Tool::CurveOnSurface - (TopoDS::Edge(ex.Current()),TopoDS::Face(myFace),f,l); - - Handle(Geom2d_TrimmedCurve) c = new Geom2d_TrimmedCurve(Curve,f,l); - - if (c.IsNull()) - { - // null curve --> EDGE have a null lenght - // --> get first and last Vertices - TopoDS_Edge CurrentEdge= TopoDS::Edge(ex.Current()); - - TopoDS_Vertex FirstVertex = TopExp::FirstVertex(CurrentEdge); - TopoDS_Vertex LastVertex = TopExp::LastVertex(CurrentEdge); - - if (FirstVertex != LastVertex) - Standard_Failure::Raise("Null Edge pcurve But different vertices"); - - gp_Pnt aPnt = BRep_Tool::Pnt(FirstVertex); - - - Handle(Graphic2d_Marker) aMarker= - new Graphic2d_Marker(this,myMarkerIndex, - aPnt.X() ,aPnt.Y(), - myMarkerWidth,myMarkerHeight,0); + //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: aMarker->SetColorIndex (myFORWARDColorIndex); break; - case TopAbs_REVERSED: aMarker->SetColorIndex (myREVERSEDColorIndex); break; - case TopAbs_INTERNAL: aMarker->SetColorIndex (myINTERNALColorIndex); break; - case TopAbs_EXTERNAL: aMarker->SetColorIndex (myEXTERNALColorIndex); break; - default : break; - } - ex.Next(); - } - else { - gp_Pnt2d p1,p2; - gp_Vec2d v; - c->D1(l,p1,v); - Graphic2d_Array1OfVertex aListVertex(1,3); - if (v.Magnitude() > gp::Resolution()) { - Standard_Real L = 2; - Standard_Real H = 1; - gp_Dir2d d(v); - p2.SetCoord(- L*d.X() - H*d.Y(),- L*d.Y() + H*d.X()); - aListVertex(1)=Graphic2d_Vertex(p2.X(),p2.Y()); - - p2.SetCoord(- L*d.X() + H*d.Y(),- L*d.Y() - H*d.X()); - aListVertex(2)=Graphic2d_Vertex(0.,0.); - aListVertex(3)=Graphic2d_Vertex(p2.X(),p2.Y()); - } - - Handle(Graphic2d_PolylineMarker) aMarker= - new Graphic2d_PolylineMarker(this,p1.X(),p1.Y(),aListVertex); - - // Display the Curve - - switch (ex.Current().Orientation()) - { - case TopAbs_FORWARD: { - segment_FORWARD->Add(c); - SetAspect(aLineAspect_FORWARD, aMarker); - break; - } - case TopAbs_REVERSED: { - segment_REVERSED->Add(c); - SetAspect(aLineAspect_REVERSED, aMarker); - break; - } - case TopAbs_INTERNAL: { - segment_INTERNAL->Add(c); - SetAspect(aLineAspect_INTERNAL, aMarker); - break; - } - case TopAbs_EXTERNAL: { - segment_EXTERNAL->Add(c); - SetAspect(aLineAspect_EXTERNAL, aMarker); - break; - } - default : break; - } - } + 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); - SetAspect(aLineAspect_FORWARD, segment_FORWARD); - SetAspect(aLineAspect_REVERSED, segment_REVERSED); - SetAspect(aLineAspect_INTERNAL, segment_INTERNAL); - SetAspect(aLineAspect_EXTERNAL, segment_EXTERNAL); + 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_PresentationManager3d)& 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: { + + Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_FORWARD); + DrawMarker(aTrimmedCurve, thePresentation); + break; + } + case TopAbs_REVERSED: { + + Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_REVERSED); + DrawMarker(aTrimmedCurve, thePresentation); + break; + } + case TopAbs_INTERNAL: { + + Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_INTERNAL); + DrawMarker(aTrimmedCurve, thePresentation); + + mySeq_INTERNAL.Append(aCurve3d); + break; + } + case TopAbs_EXTERNAL: { + + Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_EXTERNAL); + DrawMarker(aTrimmedCurve, thePresentation); + break; + } + default : break; + }//end switch + } + ex.Next(); + } + //add all primitives to the presentation + Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_FORWARD); + Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(myForwardArray); + + Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_REVERSED); + Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(myReversedArray); + + Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_INTERNAL); + Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(myInternalArray); + + Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_EXTERNAL); + Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(myExternalArray); +} + +//Method for advanced customizable selection of picked object +void Sample2D_Face::HilightSelected +( const Handle(PrsMgr_PresentationManager3d)& 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()->TransformPersistenceMode(), Presentation()->TransformPersistencePoint() ); + + Standard_Integer aLength = theOwners.Length(); + Handle (SelectMgr_EntityOwner) anOwner; + + aSelectionPrs->Clear(); + FillData(); + + Prs3d_Root::NewGroup ( aSelectionPrs ); + Handle (Graphic3d_Group) aSelectGroup = Prs3d_Root::CurrentGroup ( aSelectionPrs); + + 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_PresentationManager3d)& thePM, + const Quantity_NameOfColor theColor, + const Handle(SelectMgr_EntityOwner)& theOwner) +{ + Handle( Prs3d_Presentation ) aHighlightPrs; + aHighlightPrs = GetHilightPresentation( thePM ); + if( HasPresentation() ) + aHighlightPrs->SetTransformPersistence( Presentation()->TransformPersistenceMode(), Presentation()->TransformPersistencePoint() ); + if(theOwner.IsNull()) + return; + aHighlightPrs->Clear(); + FillData(); + + //Direct highlighting + Prs3d_Root::NewGroup ( aHighlightPrs ); + Handle (Graphic3d_Group) aHilightGroup = Prs3d_Root::CurrentGroup(aHighlightPrs); + Handle(Graphic3d_AspectLine3d) aLineAspect = + new Graphic3d_AspectLine3d(theColor, 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 index 7212cdeb6c..d82c16cdc6 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Face.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Face.h @@ -4,91 +4,78 @@ #include <Standard_Macro.hxx> #include <Standard_DefineHandle.hxx> #include "TopoDS_Face.hxx" +#include <TColGeom_SequenceOfCurve.hxx> +#include <Graphic3d_ArrayOfPolylines.hxx> #include <Standard_Macro.hxx> -DEFINE_STANDARD_HANDLE(Sample2D_Face,AIS2D_InteractiveObject) -class Sample2D_Face : public AIS2D_InteractiveObject { +DEFINE_STANDARD_HANDLE(Sample2D_Face,AIS_InteractiveObject) +class Sample2D_Face : public AIS_InteractiveObject { + + + public: // Methods PUBLIC // -Standard_EXPORT Sample2D_Face (TopoDS_Face& aFace); +Standard_EXPORT Sample2D_Face (const TopoDS_Shape& theFace); DEFINE_STANDARD_RTTI(Sample2D_Face) -// myFace -private: -TopoDS_Face myFace; -public : -TopoDS_Face& Face() { return myFace;}; -void SetFace(TopoDS_Face& aFace) { myFace= aFace;}; - -// myMarkerIndex -private: -Standard_Integer myMarkerIndex; -public : -Standard_Integer& MarkerIndex() { return myMarkerIndex;}; -void SetMarkerIndex(Standard_Integer& aMarkerIndex) { myMarkerIndex= aMarkerIndex;}; - -// myMarkerWidth -private: -Quantity_Length myMarkerWidth; -public : -Quantity_Length& MarkerWidth() { return myMarkerWidth;}; -void SetMarkerWidth(Quantity_Length& aMarkerWidth) { myMarkerWidth= aMarkerWidth;}; - -// myMarkerHeight -private: -Quantity_Length myMarkerHeight; -public : -Quantity_Length& MarkerHeight() { return myMarkerHeight;}; -void SetMarkerHeight(Quantity_Length& aMarkerHeight) { myMarkerHeight= aMarkerHeight;}; - - private: -Standard_Integer myFORWARDColorIndex; -Standard_Integer myREVERSEDColorIndex; -Standard_Integer myINTERNALColorIndex; -Standard_Integer myEXTERNALColorIndex; -Standard_Integer myWidthIndex; -Standard_Integer myTypeIndex ; -public : -Standard_Integer& FORWARDColorIndex() { return myFORWARDColorIndex;}; -void SetFORWARDColorIndex(Standard_Integer& aFORWARDColorIndex) { myFORWARDColorIndex= aFORWARDColorIndex;}; -public : -Standard_Integer& REVERSEDColorIndex() { return myREVERSEDColorIndex;}; -void SetREVERSEDColorIndex(Standard_Integer& aREVERSEDColorIndex) { myREVERSEDColorIndex= aREVERSEDColorIndex;}; -public : -Standard_Integer& INTERNALColorIndex() { return myINTERNALColorIndex;}; -void SetINTERNALColorIndex(Standard_Integer& aINTERNALColorIndex) { myINTERNALColorIndex= aINTERNALColorIndex;}; -public : -Standard_Integer& EXTERNALColorIndex() { return myEXTERNALColorIndex;}; -void SetEXTERNALColorIndex(Standard_Integer& aEXTERNALColorIndex) { myEXTERNALColorIndex= aEXTERNALColorIndex;}; -public : -Standard_Integer& WidthIndex() { return myWidthIndex;}; -void SetWidthIndex(Standard_Integer& aWidthIndex) { myWidthIndex= aWidthIndex;}; -public : -Standard_Integer& TypeIndex() { return myTypeIndex;}; -void SetTypeIndex(Standard_Integer& aTypeIndex) { myTypeIndex= aTypeIndex;}; +//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; -private: - // Methods PRIVATE - // + Standard_Integer myForwardNum, + myReversedNum, + myInternalNum, + myExternalNum, + myForwardBounds, + myReversedBounds, + myInternalBounds, + myExternalBounds; -virtual void SetContext(const Handle(AIS2D_InteractiveContext)& theContext) ; +//private methods + void FillData(Standard_Boolean isSizesRecomputed = Standard_False); + void ClearSelected (); + void HilightSelected( const Handle(PrsMgr_PresentationManager3d)& thePM, + const SelectMgr_SequenceOfOwner& theOwners); + void HilightOwnerWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM, + const Quantity_NameOfColor theColor, + const Handle(SelectMgr_EntityOwner)& theOwner); + + void Compute ( const Handle(PrsMgr_PresentationManager3d)& 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;} }; - - -// other inline functions and methods (like "C++: function call" methods) -// - - - #endif diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp index f95488e06f..1bd5164d02 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp @@ -1,92 +1,44 @@ #include "stdafx.h" #include "Sample2D_Image.h" -#include <Graphic2d_View.hxx> -IMPLEMENT_STANDARD_HANDLE(Sample2D_Image,AIS2D_InteractiveObject) -IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Image,AIS2D_InteractiveObject) +IMPLEMENT_STANDARD_HANDLE(Sample2D_Image,AIS_TexturedShape) +IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Image,AIS_TexturedShape) -#include <Graphic2d_ImageFile.hxx> -Sample2D_Image::Sample2D_Image(OSD_File& aFile, - const Quantity_Length X, // = 0.0 - const Quantity_Length Y, // = 0.0 - const Quantity_Length adx, // = 0.0 - const Quantity_Length ady, // = 0.0 - const Aspect_CardinalPoints aTypeOfPlacement,// = Aspect_CP_Center - const Quantity_Factor aScale) // = 1.0 - :AIS2D_InteractiveObject() +Sample2D_Image::Sample2D_Image(TCollection_AsciiString& aFileName, + const Quantity_Length X, + const Quantity_Length Y, + const Quantity_Factor aScale) + :AIS_TexturedShape(TopoDS_Shape()) { - - myFile = aFile ; - myX = X ; - myY = Y ; - myDx = adx ; - myDy = ady ; - myTypeOfPlacement = aTypeOfPlacement ; - myScale = aScale ; - + myFilename = aFileName; + myX = X; + myY = Y; + myScale = aScale; +} +void Sample2D_Image::MakeShape() +{ + Handle(Graphic3d_Texture1D) anImageTexture = + new Graphic3d_Texture1Dsegment(myFilename); + Standard_Real coeff = (Standard_Real)(anImageTexture->GetImage()->Height())/ + (anImageTexture->GetImage()->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); } -Sample2D_Image::Sample2D_Image(Standard_CString& aFileName, - const Quantity_Length X, // = 0.0 - const Quantity_Length Y, // = 0.0 - const Quantity_Length adx, // = 0.0 - const Quantity_Length ady, // = 0.0 - const Aspect_CardinalPoints aTypeOfPlacement,// = Aspect_CP_Center - const Quantity_Factor aScale) // = 1.0) - :AIS2D_InteractiveObject() +void Sample2D_Image::SetContext(const Handle(AIS_InteractiveContext)& theContext) { - TCollection_AsciiString TheDependentName(aFileName); - OSD_Path aPath(TheDependentName); - OSD_File aFile(aPath); - myFile = aFile ; - myX = X ; - myY = Y ; - myDx = adx ; - myDy = ady ; - myTypeOfPlacement = aTypeOfPlacement ; - myScale = aScale ; - - //Attach a graphic view to this object -} - -void Sample2D_Image::SetContext(const Handle(AIS2D_InteractiveContext)& theContext) -{ - if(theContext.IsNull() || theContext->CurrentViewer().IsNull()) return; + AIS_InteractiveObject::SetContext(theContext); + MakeShape(); + this->Set(TopoDS_Shape(myFace)); + this->SetTextureFileName(myFilename); - AIS2D_InteractiveObject::SetContext(theContext); - Graphic2d_GraphicObject::SetView(theContext->CurrentViewer()->View()); - - - Handle(Graphic2d_ImageFile) aGraphic2dImageFile = new Graphic2d_ImageFile ( - this, - myFile, - myX, - myY, - myDx, - myDy, - myTypeOfPlacement, - myScale); - if (myIsZoomable) - aGraphic2dImageFile->SetZoomable(Standard_True); -} - -Standard_CString Sample2D_Image::GetFileName() const -{ - static OSD_Path aPath; - myFile.Path(aPath); - return aPath.Name().ToCString(); -} - -void Sample2D_Image::SetFileName(const Standard_CString aFileName) -{ - TCollection_AsciiString TheDependentName(aFileName); - OSD_Path aPath(TheDependentName); - OSD_File aFile(aPath); - myFile = aFile; } - diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Image.h b/samples/mfc/standard/Common/Primitive/Sample2D_Image.h index 1aab0365a7..fc38854d7f 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Image.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Image.h @@ -10,73 +10,34 @@ #include <Standard_Boolean.hxx> #include <Standard_CString.hxx> #include <Standard_Integer.hxx> -#include <Handle_SelectMgr_Selection.hxx> +#include <SelectMgr_Selection.hxx> #include <Standard_OStream.hxx> #include <Standard_IStream.hxx> -DEFINE_STANDARD_HANDLE(Sample2D_Image,AIS2D_InteractiveObject) -class Sample2D_Image : public AIS2D_InteractiveObject { +DEFINE_STANDARD_HANDLE(Sample2D_Image,AIS_TexturedShape) +class Sample2D_Image : public AIS_TexturedShape { public: - // Methods PUBLIC - // -Standard_EXPORT Sample2D_Image(OSD_File& aFile, +Standard_EXPORT Sample2D_Image(TCollection_AsciiString& aFileName, const Quantity_Length X = 0.0, const Quantity_Length Y = 0.0, - const Quantity_Length adx = 0.0, - const Quantity_Length ady = 0.0, - const Aspect_CardinalPoints aTypeOfPlacement = Aspect_CP_Center, const Quantity_Factor aScale = 1.0); -Standard_EXPORT Sample2D_Image(Standard_CString& aFileName, - const Quantity_Length X = 0.0, - const Quantity_Length Y = 0.0, - const Quantity_Length adx = 0.0, - const Quantity_Length ady = 0.0, - const Aspect_CardinalPoints aTypeOfPlacement = Aspect_CP_Center, - const Quantity_Factor aScale = 1.0); -Standard_EXPORT inline virtual OSD_File GetFile() const; -Standard_EXPORT inline virtual void SetFile(const OSD_File& anImage) ; -Standard_EXPORT virtual Standard_CString GetFileName() const; -Standard_EXPORT virtual void SetFileName(const Standard_CString anImageName) ; Standard_EXPORT inline virtual void GetCoord(Quantity_Length& X,Quantity_Length& Y) const; Standard_EXPORT inline virtual void SetCoord(const Quantity_Length X,const Quantity_Length Y) ; -Standard_EXPORT inline virtual void GetOffset(Quantity_Length& adX,Quantity_Length& adY) const; -Standard_EXPORT inline virtual void SetOffset(const Quantity_Length adX,const Quantity_Length adY) ; -Standard_EXPORT inline virtual Aspect_CardinalPoints GetTypeOfPlacement() const; -Standard_EXPORT inline virtual void SetTypeOfPlacement(const Aspect_CardinalPoints aTypeOfPlacement = Aspect_CP_Center) ; Standard_EXPORT inline Quantity_Factor GetScale() const; Standard_EXPORT inline void SetScale(const Quantity_Factor aNewScale) ; -Standard_EXPORT inline Standard_Boolean GetIsZoomable() const; -Standard_EXPORT inline void SetIsZoomable(const Standard_Boolean aIsZoomable) ; - -Standard_EXPORT virtual void SetContext(const Handle(AIS2D_InteractiveContext)& theContext) ; +Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& theContext) ; DEFINE_STANDARD_RTTI(Sample2D_Image) - +private: + void MakeShape(); protected: - - // Methods PROTECTED - // - - // Fields PROTECTED - // -OSD_File myFile; +TopoDS_Face myFace; +TCollection_AsciiString myFilename; Quantity_Length myX; Quantity_Length myY; -Quantity_Length myDx; -Quantity_Length myDy; -Aspect_CardinalPoints myTypeOfPlacement; Quantity_Factor myScale; -Standard_Boolean myIsZoomable; - -private: - - // Methods PRIVATE - // - - // Fields PRIVATE - // }; @@ -95,39 +56,6 @@ inline void Sample2D_Image::SetCoord(const Quantity_Length X, const Quantity_Le myY = Y; } -inline OSD_File Sample2D_Image::GetFile() const -{ - return myFile; -} - -inline void Sample2D_Image::SetFile(const OSD_File& aFile) -{ - myFile = aFile; -} - -inline void Sample2D_Image::GetOffset(Quantity_Length& adX,Quantity_Length& adY) const -{ - adX = myDx; - adY = myDy; -} - -inline void Sample2D_Image::SetOffset(const Quantity_Length adX,const Quantity_Length adY) -{ - myDx = adX; - myDy = adY; -} - -inline Aspect_CardinalPoints Sample2D_Image::GetTypeOfPlacement() const -{ - return myTypeOfPlacement; -} - -inline void Sample2D_Image::SetTypeOfPlacement(const Aspect_CardinalPoints aTypeOfPlacement) -{ - myTypeOfPlacement = aTypeOfPlacement; -} - - inline Quantity_Factor Sample2D_Image::GetScale() const { return myScale; @@ -138,15 +66,6 @@ inline void Sample2D_Image::SetScale(const Quantity_Factor aNewScale) myScale = aNewScale; } -inline Standard_Boolean Sample2D_Image::GetIsZoomable() const -{ - return myIsZoomable; -} - -inline void Sample2D_Image::SetIsZoomable(const Standard_Boolean aIsZoomable) -{ - myIsZoomable = aIsZoomable; -} #endif diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Line.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Line.cpp deleted file mode 100755 index b71f4934f7..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Line.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "stdafx.h" - -#include "Sample2D_Line.h" - -IMPLEMENT_STANDARD_HANDLE(Sample2D_Line,AIS2D_InteractiveObject) -IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Line,AIS2D_InteractiveObject) - -Sample2D_Line::Sample2D_Line () - :AIS2D_InteractiveObject() -{ -} - -void Sample2D_Line::SetContext(const Handle(AIS2D_InteractiveContext)& theContext) -{ - AIS2D_InteractiveObject::SetContext(theContext); - - Handle(Prs2d_AspectLine) aLineAspect = new Prs2d_AspectLine; - aLineAspect->SetTypeOfFill(Graphic2d_TOPF_FILLED); - aLineAspect->SetWidthIndex(0); - - for (int i=0;i<=13;i++) - for (int j=0;j<=5;j++) - { - Graphic2d_Array1OfVertex anArrayVertex(1,5); - anArrayVertex(1)=Graphic2d_Vertex(20.*i,10.*j+0); - anArrayVertex(2)=Graphic2d_Vertex(20.*i+10,10.*j+0); - anArrayVertex(3)=Graphic2d_Vertex(20.*i+10,10.*j+5); - anArrayVertex(4)=Graphic2d_Vertex(20.*i,10.*j+5); - anArrayVertex(5)=Graphic2d_Vertex(20.*i,10.*j+0); - Handle(Graphic2d_Polyline) aPolyline = new Graphic2d_Polyline(this,anArrayVertex); - - SetAspect(aLineAspect, aPolyline); - - aPolyline->SetInteriorColorIndex(i); // to use with Graphic2d_TOPF_FILLED - aPolyline->SetTypeIndex(j); // type of the polyline - } -} - - - - diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Line.h b/samples/mfc/standard/Common/Primitive/Sample2D_Line.h deleted file mode 100755 index 6f7150281d..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Line.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef _Sample2D_Line_HeaderFile -#define _Sample2D_Line_HeaderFile - -#include <Standard_Macro.hxx> -#include <Standard_DefineHandle.hxx> - -DEFINE_STANDARD_HANDLE(Sample2D_Line,AIS2D_InteractiveObject) -class Sample2D_Line : public AIS2D_InteractiveObject { - -public: - - // Methods PUBLIC - // -Standard_EXPORT Sample2D_Line (); - - -DEFINE_STANDARD_RTTI(Sample2D_Line) - -Standard_EXPORT virtual void SetContext(const Handle(AIS2D_InteractiveContext)& theContext); - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - // Fields PRIVATE - // - -}; - - - -// other inCurve functions and methods (like "C++: function call" methods) -// - - - -#endif diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp index c95f863b94..426dd9cc5a 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp @@ -2,110 +2,56 @@ #include "Sample2D_Markers.h" -IMPLEMENT_STANDARD_HANDLE(Sample2D_Markers,AIS2D_InteractiveObject) -IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Markers,AIS2D_InteractiveObject) - -#include "Graphic2d_Marker.hxx" -#include "Graphic2d_PolylineMarker.hxx" -#include "Graphic2d_CircleMarker.hxx" -#include "Graphic2d_EllipsMarker.hxx" +IMPLEMENT_STANDARD_HANDLE(Sample2D_Markers,AIS_InteractiveObject) +IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Markers,AIS_InteractiveObject) // generic marker -Sample2D_Markers::Sample2D_Markers (Standard_Integer anIndex , - Quantity_Length aXPosition , - Quantity_Length aYPosition , - Quantity_Length aWidth , - Quantity_Length anHeight , - Quantity_PlaneAngle anAngle ) - :myListVertex(0,0),AIS2D_InteractiveObject() +Sample2D_Markers::Sample2D_Markers (const Quantity_Length theXPosition , + const Quantity_Length theYPosition , + const Aspect_TypeOfMarker theMarkerType, + const Quantity_Color theColor, + const Standard_Real theScaleOrId) + :AIS_InteractiveObject(),myListVertex(1,1) { - myCurrentTypeOfMarker = Sample2D_CTOM_Generic; - myIndex = anIndex; - myXPosition = aXPosition; - myYPosition = aYPosition; - myWidth = aWidth ; - myHeight = anHeight ; - myAngle = anAngle ; + myXPosition = theXPosition; + myYPosition = theYPosition; + myMarkerType = theMarkerType; + myColor = theColor; + myIndex = theScaleOrId; +} + +Sample2D_Markers::Sample2D_Markers (const Quantity_Length theXPosition , + const Quantity_Length theYPosition , + const Graphic3d_Array1OfVertex& theListVertex, + const Aspect_TypeOfMarker theMarkerType, + const Quantity_Color theColor, + const Standard_Real theScaleOrId) + :AIS_InteractiveObject(),myListVertex(1,6) +{ + myXPosition = theXPosition; + myYPosition = theYPosition; + myMarkerType = theMarkerType; + myColor = theColor; + myIndex = theScaleOrId; + myListVertex = theListVertex; } -// Polyline marker -Sample2D_Markers::Sample2D_Markers (Quantity_Length aXPosition , - Quantity_Length aYPosition , - const Graphic2d_Array1OfVertex& aListVertex) - :myListVertex(1,aListVertex.Length()),AIS2D_InteractiveObject() +void Sample2D_Markers::Compute ( const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, + const Handle(Prs3d_Presentation)& aPresentation, + const Standard_Integer aMode) { - myCurrentTypeOfMarker = Sample2D_CTOM_Polyline; - myXPosition = aXPosition; - myYPosition = aYPosition; - myListVertex = aListVertex; + if(myMarkerType == Aspect_TOM_USERDEFINED) + { + Handle(Graphic3d_AspectMarker3d) aMarker = new Graphic3d_AspectMarker3d(Aspect_TOM_POINT,myColor,myIndex); + Prs3d_Root::CurrentGroup(aPresentation)->SetGroupPrimitivesAspect(aMarker); + Prs3d_Root::CurrentGroup(aPresentation)->MarkerSet(myListVertex); + } + else + { + Handle(Graphic3d_AspectMarker3d) aMarker = new Graphic3d_AspectMarker3d(myMarkerType,myColor,myIndex); + aPresentation->SetPrimitivesAspect(aMarker); + Graphic3d_Vertex aV3d(myXPosition, myYPosition, 0.); + Prs3d_Root::CurrentGroup(aPresentation)->Marker(aV3d); + } } - -// circle marker -Sample2D_Markers::Sample2D_Markers (Quantity_Length aXPosition , - Quantity_Length aYPosition , - Quantity_Length X , - Quantity_Length Y , - Quantity_Length Radius ) - :myListVertex(0,0),AIS2D_InteractiveObject() -{ - myCurrentTypeOfMarker = Sample2D_CTOM_Circle; - myXPosition = aXPosition; - myYPosition = aYPosition; - myX = X ; - myY = Y ; - myRadius = Radius ; -} - -// ellips marker -Sample2D_Markers::Sample2D_Markers (Quantity_Length aXPosition , - Quantity_Length aYPosition , - Quantity_Length X , - Quantity_Length Y , - Quantity_Length MajorRadius , - Quantity_Length MinorRadius , - Quantity_PlaneAngle anAngle ) - :myListVertex(0,0),AIS2D_InteractiveObject() -{ - myCurrentTypeOfMarker = Sample2D_CTOM_Ellips; - myXPosition = aXPosition; - myYPosition = aYPosition; - myX = X ; - myY = Y ; - myMajorRadius = MajorRadius; - myMinorRadius = MinorRadius; - myAngle = anAngle; -} - -void Sample2D_Markers::SetContext(const Handle(AIS2D_InteractiveContext)& theContext) -{ - - AIS2D_InteractiveObject::SetContext(theContext); - - if (myCurrentTypeOfMarker == Sample2D_CTOM_Generic) { - if ( myIndex == 0 ) { - Handle(Graphic2d_Marker) aMarker= - new Graphic2d_Marker(this,myXPosition ,myYPosition); - } - else { - Handle(Graphic2d_Marker) aMarker= - new Graphic2d_Marker(this,myIndex,myXPosition ,myYPosition,myWidth,myHeight,myAngle); - } - - } - - if (myCurrentTypeOfMarker == Sample2D_CTOM_Polyline) - Handle(Graphic2d_PolylineMarker) aMarker= - new Graphic2d_PolylineMarker(this,myXPosition,myYPosition,myListVertex); - - if (myCurrentTypeOfMarker == Sample2D_CTOM_Circle) - Handle(Graphic2d_CircleMarker) aMarker= - new Graphic2d_CircleMarker(this,myXPosition,myYPosition,myX ,myY,myRadius ); - - if (myCurrentTypeOfMarker == Sample2D_CTOM_Ellips) - Handle(Graphic2d_EllipsMarker) aMarker= - new Graphic2d_EllipsMarker(this,myXPosition,myYPosition,myX,myY,myMajorRadius,myMinorRadius,myAngle ); - -} - - diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h index 88950a2070..edc058d675 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h @@ -3,9 +3,9 @@ #include <Standard_Macro.hxx> #include <Standard_DefineHandle.hxx> - -DEFINE_STANDARD_HANDLE(Sample2D_Markers,AIS2D_InteractiveObject) -class Sample2D_Markers : public AIS2D_InteractiveObject { +#include <Graphic3d_Array1OfVertex.hxx> +DEFINE_STANDARD_HANDLE(Sample2D_Markers,AIS_InteractiveObject) +class Sample2D_Markers : public AIS_InteractiveObject { enum Sample2D_CurrentTypeOfMarker { Sample2D_CTOM_Generic, @@ -16,78 +16,48 @@ Sample2D_CTOM_Ellips public: - // Methods PUBLIC - // - // generic marker - Standard_EXPORT Sample2D_Markers (Standard_Integer anIndex , - Quantity_Length aXPosition , - Quantity_Length aYPosition , - Quantity_Length aWidth , - Quantity_Length anHeight , - Quantity_PlaneAngle anAngle ); + // Generic marker + Standard_EXPORT Sample2D_Markers (const Quantity_Length theXPosition , + const Quantity_Length theYPosition , + const Aspect_TypeOfMarker theMarkerType, + const Quantity_Color theColor, + const Standard_Real theScaleOrId=5.0); // Polyline marker - Standard_EXPORT Sample2D_Markers (Quantity_Length aXPosition , - Quantity_Length aYPosition , - const Graphic2d_Array1OfVertex& aListVertex); - // circle marker - Standard_EXPORT Sample2D_Markers (Quantity_Length aXPosition , - Quantity_Length aYPosition , - Quantity_Length X , - Quantity_Length Y , - Quantity_Length Radius ); - // ellips marker - Standard_EXPORT Sample2D_Markers (Quantity_Length aXPosition , - Quantity_Length aYPosition , - Quantity_Length X , - Quantity_Length Y , - Quantity_Length MajorRadius , - Quantity_Length MinorRadius , - Quantity_PlaneAngle anAngle ); + Standard_EXPORT Sample2D_Markers (const Quantity_Length theXPosition , + const Quantity_Length theYPosition , + const Graphic3d_Array1OfVertex& theListVertex, + const Aspect_TypeOfMarker theMarkerType, + const Quantity_Color theColor, + const Standard_Real theScaleOrId=2.0); + DEFINE_STANDARD_RTTI(Sample2D_Markers) - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - private: - // Methods PRIVATE - // -Standard_EXPORT virtual void SetContext(const Handle(AIS2D_InteractiveContext)& theContext); +virtual void Compute ( const Handle(PrsMgr_PresentationManager3d)& 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){}; + + - // Fields PRIVATE - // Sample2D_CurrentTypeOfMarker myCurrentTypeOfMarker; - Quantity_Length myXPosition ; Quantity_Length myYPosition ; -// specific generic markers -Standard_Integer myIndex ; +Aspect_TypeOfMarker myMarkerType; +Quantity_Color myColor; Quantity_Length myWidth ; Quantity_Length myHeight ; +Standard_Real myIndex ;//myScaleOrId // specific polyline marker -Graphic2d_Array1OfVertex myListVertex ; -// specific circle & ellips markers -Quantity_Length myX ; -Quantity_Length myY ; -// specific circle marker -Quantity_Length myRadius ; -// specific ellips marker -Quantity_Length myMajorRadius ; -Quantity_Length myMinorRadius ; - -Quantity_PlaneAngle myAngle ; - - +Graphic3d_Array1OfVertex myListVertex ; }; diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Rectagle.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Rectagle.cpp deleted file mode 100755 index b90c67f8a6..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Rectagle.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "stdafx.h" - -#include "Sample2D_Rectangle.h" - -IMPLEMENT_STANDARD_HANDLE(Sample2D_Rectangle,AIS2D_InteractiveObject) -IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Rectangle,AIS2D_InteractiveObject) - -Sample2D_Rectangle::Sample2D_Rectangle (Quantity_Length aXPosition , - Quantity_Length aYPosition , - Quantity_Length aWidth , - Quantity_Length aHeight , - Quantity_PlaneAngle anAngle ) - :myArray1OfVertex(1,5),AIS2D_InteractiveObject() -{ - myXPosition = aXPosition; - myYPosition = aYPosition; - myWidth = aWidth ; - myHeight = aHeight ; - myAngle = anAngle; - ComputeArrayOfVertex(); - -} - -void Sample2D_Rectangle::SetContext(const Handle(AIS2D_InteractiveContext)& theContext) -{ - AIS2D_InteractiveObject::SetContext(theContext); - - // add the polyline in the representation, for all modes - Handle(Graphic2d_Polyline) ThePolyline; - ThePolyline = new Graphic2d_Polyline(this, myArray1OfVertex); - ThePolyline->SetColorIndex ( 1 ); - ThePolyline->SetWidthIndex ( 1 ); - ThePolyline->SetTypeIndex ( 1 ); -} - -void Sample2D_Rectangle::ComputeArrayOfVertex() -{ - Standard_Real BottomLeftX = myXPosition ; - Standard_Real BottomLeftY = myYPosition ; - - Standard_Real BottomRightX = myXPosition+(cos(myAngle)*myWidth ) ; - Standard_Real BottomRightY = myYPosition+(sin(myAngle)*myWidth ) ; - - Standard_Real TopRightX = myXPosition+(cos(myAngle)*myWidth )+(-sin(myAngle)*myHeight ) ; - Standard_Real TopRightY = myYPosition+(sin(myAngle)*myWidth )+( cos(myAngle)*myHeight ) ; - - Standard_Real TopLeftX = myXPosition+ (-sin(myAngle)*myHeight ) ; - Standard_Real TopLeftY = myYPosition+ ( cos(myAngle)*myHeight ) ; - - myArray1OfVertex.SetValue(1,Graphic2d_Vertex(BottomLeftX , BottomLeftY )); - myArray1OfVertex.SetValue(2,Graphic2d_Vertex(BottomRightX , BottomRightY )); - myArray1OfVertex.SetValue(3,Graphic2d_Vertex(TopRightX , TopRightY )); - myArray1OfVertex.SetValue(4,Graphic2d_Vertex(TopLeftX , TopLeftY )); - myArray1OfVertex.SetValue(5,Graphic2d_Vertex(BottomLeftX , BottomLeftY )); -} - - diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Rectangle.h b/samples/mfc/standard/Common/Primitive/Sample2D_Rectangle.h deleted file mode 100755 index 75c51713d7..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Rectangle.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef _Sample2D_Rectangle_HeaderFile -#define _Sample2D_Rectangle_HeaderFile - -#include <Standard_Macro.hxx> -#include <Standard_DefineHandle.hxx> - -DEFINE_STANDARD_HANDLE(Sample2D_Rectangle,AIS2D_InteractiveObject) -class Sample2D_Rectangle : public AIS2D_InteractiveObject { - -public: - - // Methods PUBLIC - // - Standard_EXPORT Sample2D_Rectangle (Quantity_Length XPosition , - Quantity_Length YPosition , - Quantity_Length aWidth , - Quantity_Length anHeight , - Quantity_PlaneAngle anAngle ); - - -DEFINE_STANDARD_RTTI(Sample2D_Rectangle) - - -Standard_EXPORT virtual void SetContext(const Handle(AIS2D_InteractiveContext)& theContext); - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - // Fields PRIVATE - // - -Quantity_Length myXPosition ; -Quantity_Length myYPosition ; -Quantity_Length myWidth ; -Quantity_Length myHeight ; -Quantity_PlaneAngle myAngle ; - -Graphic2d_Array1OfVertex myArray1OfVertex; -void ComputeArrayOfVertex(); - -}; - - - -// other inCurve functions and methods (like "C++: function call" methods) -// - - - -#endif diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Text.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Text.cpp index 7329294357..ababc0526e 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Text.cpp +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Text.cpp @@ -2,52 +2,53 @@ #include "Sample2D_Text.h" -IMPLEMENT_STANDARD_HANDLE(Sample2D_Text,AIS2D_InteractiveObject) -IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Text,AIS2D_InteractiveObject) +IMPLEMENT_STANDARD_HANDLE(Sample2D_Text,AIS_InteractiveObject) +IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Text,AIS_InteractiveObject) -Sample2D_Text::Sample2D_Text - (const TCollection_AsciiString& aText, - const Standard_Real anX , // = 0 - const Standard_Real anY , // = 0 - const Aspect_TypeOfText aType, // = SOLID, - const Quantity_PlaneAngle anAngle, // = 0.0 - const Standard_Real aslant, // = 0.0 - const Standard_Integer aColorIndex, // = 0 - const Standard_Integer aFontIndex, // = 1 - const Quantity_Factor aScale, // = 1 - const Standard_Boolean aIsUnderline, // = Standard_False, - const Standard_Boolean aIsZoomable, // = Standard_True - const Graphic2d_TypeOfAlignment aTypeOfAlignment) // = Graphic2d_TOA_LEFT -:AIS2D_InteractiveObject() +Sample2D_Text::Sample2D_Text (const TCollection_AsciiString& theText, + const gp_Pnt& thePosition, + const Aspect_TypeOfText theType, + const Quantity_PlaneAngle theAngle, + const Quantity_Color theColor, + const Font_FontAspect theFontAspect, + const Standard_CString theFont, + const Standard_Real theHeight, + const Graphic3d_HorizontalTextAlignment theHAlign, + const Graphic3d_VerticalTextAlignment theVAlign, + const Standard_Boolean theIsZoomable) +:AIS_InteractiveObject() { - myText = aText ; - myX = anX ; - myY = anY ; - myTypeOfText = aType ; - myAngle = anAngle ; - mySlant = aslant ; - myFontIndex = aFontIndex ; - myColorIndex = aColorIndex ; - myScale = aScale ; - myWidth = 0 ; - myHeight = 0 ; - myIsUnderline = aIsUnderline ; - myIsZoomable = aIsZoomable ; - myTypeOfAlignment = aTypeOfAlignment; - + myText = theText ; + myPosition = thePosition ; + myTypeOfText = theType ; + myAngle = theAngle ; + myColor = theColor ; + myFontAspect = theFontAspect; + myFont = theFont ; + myColor = theColor ; + myHeight = theHeight ; + myIsZoomable = theIsZoomable ; + myHAlign = theHAlign ; + myVAlign = theVAlign ; } -void Sample2D_Text::SetContext(const Handle(AIS2D_InteractiveContext)& theContext) +void Sample2D_Text::Compute ( const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, + const Handle(Prs3d_Presentation)& aPresentation, + const Standard_Integer aMode) { - AIS2D_InteractiveObject::SetContext(theContext); + aPresentation->Clear(); - Handle(Graphic2d_Text) text; - text = new Graphic2d_Text(this, myText, myX, myY, myAngle,myTypeOfText,myScale); - text->SetFontIndex (myFontIndex); - text->SetColorIndex (myColorIndex); - text->SetSlant (mySlant); - text->SetUnderline (myIsUnderline); - text->SetZoomable (myIsZoomable); - text->SetAlignment (myTypeOfAlignment); + Handle_Prs3d_TextAspect asp = myDrawer->TextAspect(); + + asp->SetFont(myFont); + asp->SetColor(myColor); + asp->SetHeight(myHeight); + + asp->SetHorizontalJustification(myHAlign); + asp->SetVerticalJustification(myVAlign); + asp->Aspect()->SetTextZoomable(myIsZoomable); + asp->Aspect()->SetTextAngle(myAngle); + asp->Aspect()->SetTextFontAspect(myFontAspect); + asp->SetHeight(myHeight); + Prs3d_Text::Draw(aPresentation, asp, myText, myPosition); } - diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Text.h b/samples/mfc/standard/Common/Primitive/Sample2D_Text.h index 5762457524..efc4864c13 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Text.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Text.h @@ -2,98 +2,73 @@ #define _Sample2D_Text_HeaderFile #include <Standard_Macro.hxx> #include <Standard_DefineHandle.hxx> +#include <Graphic3d_HorizontalTextAlignment.hxx> +#include <Graphic3d_VerticalTextAlignment.hxx> +#include <TCollection_AsciiString.hxx> - -DEFINE_STANDARD_HANDLE(Sample2D_Text,AIS2D_InteractiveObject) -class Sample2D_Text : public AIS2D_InteractiveObject { +DEFINE_STANDARD_HANDLE(Sample2D_Text,AIS_InteractiveObject) +class Sample2D_Text : public AIS_InteractiveObject +{ public: - // Methods PUBLIC - // -Standard_EXPORT Sample2D_Text (const TCollection_AsciiString& aText, - const Standard_Real anX = 0 , - const Standard_Real anY = 0 , - const Aspect_TypeOfText aType = Aspect_TOT_SOLID, - const Quantity_PlaneAngle anAngle = 0.0 , - const Standard_Real aSlant = 0.0 , - const Standard_Integer aColorIndex = 0 , - const Standard_Integer aFontIndex = 1 , - const Quantity_Factor aScale = 1 , - const Standard_Boolean aIsUnderline = Standard_False, - const Standard_Boolean aIsZoomable = Standard_True, - const Graphic2d_TypeOfAlignment aTypeOfAlignment = Graphic2d_TOA_LEFT); - -Standard_EXPORT virtual void SetContext(const Handle(AIS2D_InteractiveContext)& theContext); +Standard_EXPORT + Sample2D_Text (const TCollection_AsciiString& theText,const gp_Pnt& thePosition, + const Aspect_TypeOfText theType = Aspect_TOT_SOLID, + const Quantity_PlaneAngle theAngle = 0.0 , + const Quantity_Color theColor = Quantity_NOC_YELLOW, + const Font_FontAspect theFontAspect = Font_FA_Regular, + const Standard_CString theFont = "Courier", + const Standard_Real theHeight = 1, + const Graphic3d_HorizontalTextAlignment theHAlign = Graphic3d_HTA_LEFT, + const Graphic3d_VerticalTextAlignment theVAlign = Graphic3d_VTA_BOTTOM, + const Standard_Boolean theIsZoomable = Standard_True); inline TCollection_AsciiString GetText() const { return myText ; } -inline void SetText(const TCollection_AsciiString& atext) { myText = atext; } -inline void GetCoord(Standard_Real& X, Standard_Real& Y) const { X = myX; Y = myY; } -inline void SetCoord(const Standard_Real X, const Standard_Real Y) { myX = X ; myY = Y ; } -inline Aspect_TypeOfText GetTypeOfText() const { return myTypeOfText; } -inline void SetTypeOfText(const Aspect_TypeOfText aNewTypeOfText) { myTypeOfText = aNewTypeOfText; } +inline void SetText(const TCollection_AsciiString& theText) { myText = theText; } +inline void GetCoord(gp_Pnt& thePosition) const { thePosition=gp_Pnt(myPosition); } +inline void SetCoord(const gp_Pnt& thePosition) { myPosition = thePosition; } +inline Standard_Integer GetTypeOfText() const { return myTypeOfText; } +inline void SetTypeOfText(const Aspect_TypeOfText theTypeOfText) { myTypeOfText = theTypeOfText; } inline Standard_Real GetAngle() const { return myAngle; } -inline void SetAngle(const Standard_Real aNewAngle) { myAngle = aNewAngle; } -inline Standard_Real GetSlant() const { return mySlant; } -inline void SetSlant(const Standard_Real aNewSlant) { mySlant = aNewSlant; } -inline Standard_Integer GetColorIndex() const { return myColorIndex; } -inline void SetColorIndex(const Standard_Integer aNewColorIndex) { myColorIndex = aNewColorIndex; } -inline Standard_Integer GetFontIndex() const { return myFontIndex; } -inline void SetFontIndex(const Standard_Integer aNewFontIndex) { myFontIndex = aNewFontIndex; } +inline void SetAngle(const Standard_Real theAngle) { myAngle = theAngle; } +inline Quantity_Color GetColor() const { return myColor; } +inline void SetColor(const Quantity_Color theColor) { myColor = theColor; } inline Quantity_Factor GetScale() const { return myScale; } -inline void SetScale (const Quantity_Factor aNewScale) { myScale = aNewScale; } -inline Standard_Boolean GetIsUnderline() const {return myIsUnderline;} -inline void SetIsUnderline(const Standard_Boolean aNewIsUnderline) { myIsUnderline = aNewIsUnderline;} +inline void SetScale (const Quantity_Factor theScale) { myScale = theScale; } inline Standard_Boolean GetIsZoomable() const { return myIsZoomable; } -inline void SetIsZoomable(const Standard_Boolean aNewIsZoomable) { myIsZoomable = aNewIsZoomable;} -inline Graphic2d_TypeOfAlignment GetTypeOfAlignment() const { return myTypeOfAlignment;} -inline void SetTypeOfAlignment(const Graphic2d_TypeOfAlignment aNewTypeOfAlignment) { myTypeOfAlignment= aNewTypeOfAlignment;} - +inline void SetIsZoomable(const Standard_Boolean theIsZoomable) { myIsZoomable = theIsZoomable;} DEFINE_STANDARD_RTTI(Sample2D_Text) - -protected: - - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - private: + + void Compute ( const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, + const Handle(Prs3d_Presentation)& aPresentation, + const Standard_Integer aMode); + + void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, + const Standard_Integer aMode) + { + + } - // Methods PRIVATE - // - // Fields PRIVATE - // TCollection_AsciiString myText ; -Standard_Real myX ; -Standard_Real myY ; +gp_Pnt myPosition ; Aspect_TypeOfText myTypeOfText ; Standard_Real myAngle ; -Standard_Real mySlant ; -Standard_Integer myColorIndex ; -Standard_Integer myFontIndex ; +Quantity_Color myColor ; +Standard_CString myFont ; Quantity_Factor myScale ; -Standard_Real myWidth ; Standard_Real myHeight ; -Standard_Real myXoffset ; -Standard_Real myYoffset ; - -Standard_Boolean myIsUnderline ; +Font_FontAspect myFontAspect ; Standard_Boolean myIsZoomable ; -Graphic2d_TypeOfAlignment myTypeOfAlignment ; +Graphic3d_HorizontalTextAlignment myHAlign ; +Graphic3d_VerticalTextAlignment myVAlign ; + }; -// other inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/samples/mfc/standard/Common/Resource2D/CircularGrid.h b/samples/mfc/standard/Common/Resource2D/CircularGrid.h index aa1918012f..efcfadfbe5 100755 --- a/samples/mfc/standard/Common/Resource2D/CircularGrid.h +++ b/samples/mfc/standard/Common/Resource2D/CircularGrid.h @@ -19,7 +19,7 @@ class Standard_EXPORT CCircularGrid : public CDialog // Construction public: CCircularGrid(CWnd* pParent = NULL); // standard constructor - void SetViewer(Handle(V2d_Viewer) aViewer) { myViewer = aViewer; } ; + void SetViewer(Handle(V3d_Viewer) aViewer) { myViewer = aViewer; } ; void UpdateValues(); // Dialog Data //{{AFX_DATA(CCircularGrid) @@ -55,7 +55,7 @@ protected: void UpdateDialogData(); private : - Handle(V2d_Viewer) myViewer; + Handle(V3d_Viewer) myViewer; Quantity_Length SavedXOrigin,SavedYOrigin,SavedRadiusStep; Standard_Integer SavedDivisionNumber; diff --git a/samples/mfc/standard/Common/Resource2D/RectangularGrid.h b/samples/mfc/standard/Common/Resource2D/RectangularGrid.h index 460871657a..f5cc31e78a 100755 --- a/samples/mfc/standard/Common/Resource2D/RectangularGrid.h +++ b/samples/mfc/standard/Common/Resource2D/RectangularGrid.h @@ -19,7 +19,7 @@ class Standard_EXPORT CRectangularGrid : public CDialog // Construction public: CRectangularGrid(CWnd* pParent = NULL); // standard constructor - void SetViewer(Handle(V2d_Viewer) aViewer) { myViewer = aViewer; } ; + void SetViewer(Handle(V3d_Viewer) aViewer) { myViewer = aViewer; } ; void UpdateValues(); // Dialog Data @@ -56,7 +56,7 @@ protected: void UpdateDialogData(); private : - Handle(V2d_Viewer) myViewer; + Handle(V3d_Viewer) myViewer; Quantity_Length SavedXOrigin,SavedYOrigin , SavedXStep, SavedYStep; Quantity_PlaneAngle SavedRotationAngle ; diff --git a/samples/mfc/standard/Common/StdAfx.h b/samples/mfc/standard/Common/StdAfx.h index cf5bb9d64b..7c751409e8 100755 --- a/samples/mfc/standard/Common/StdAfx.h +++ b/samples/mfc/standard/Common/StdAfx.h @@ -25,35 +25,103 @@ #pragma warning( default : 4244 ) // Issue warning 4244 #include <Standard.hxx> -#include <AIS_InteractiveContext.hxx> -#include <AIS_Shape.hxx> -#include <V3d_Viewer.hxx> -#include <V3d_View.hxx> -#include <WNT_Window.hxx> +#include <Standard_PrimitiveTypes.hxx> +#include <AIS_InteractiveContext.hxx> +#include <AIS_Line.hxx> +#include <AIS_Shape.hxx> +#include <AIS_Drawer.hxx> +#include <AIS_Point.hxx> +#include <AIS_TexturedShape.hxx> +#include <Aspect_Grid.hxx> +#include <Aspect_PolygonOffsetMode.hxx> +#include <Aspect_TypeOfText.hxx> +#include <Aspect_DisplayConnection.hxx> +#include <Aspect_AspectMarker.hxx> + +#include <BRep_Tool.hxx> +#include <BRepTools.hxx> +#include <BRepBuilderAPI_NurbsConvert.hxx> +#include <BRepPrimAPI_MakeCylinder.hxx> +#include <BRepBuilderAPI_MakeEdge.hxx> +#include <BRepBuilderAPI_MakeWire.hxx> +#include <BRepBuilderAPI_MakeFace.hxx> +#include <BRepBndLib.hxx> +#include <BRepAdaptor_HArray1OfCurve.hxx> +#include <BRepAdaptor_Curve2d.hxx> +#include <BRepBuilderAPI_MakeVertex.hxx> + + +#include <GCPnts_QuasiUniformDeflection.hxx> +#include <Geom2d_TrimmedCurve.hxx> +#include <GeomLib.hxx> +#include <Geom_Surface.hxx> +#include <Geom_Curve.hxx> +#include <Geom_Plane.hxx> +#include <Geom_CartesianPoint.hxx> +#include <Graphic3d_Group.hxx> +#include <Graphic3d_HorizontalTextAlignment.hxx> +#include <Graphic3d_VerticalTextAlignment.hxx> +#include <Graphic3d_Array1OfVertex.hxx> +#include <Graphic3d_ArrayOfPolylines.hxx> +#include <Graphic3d.hxx> +#include <Graphic3d_ExportFormat.hxx> +#include <Graphic3d_ArrayOfPolylines.hxx> +#include <Graphic3d_AspectFillArea3d.hxx> +#include <Graphic3d_AspectText3d.hxx> +#include <Graphic3d_AspectLine3d.hxx> +#include <Graphic3d_AspectMarker3d.hxx> +#include <Graphic3d_Texture1Dsegment.hxx> +#include <gp_Pln.hxx> +#include <gp.hxx> +#include <gp_Pnt2d.hxx> + +#include <Prs3d_Root.hxx> #include <Prs3d_Drawer.hxx> #include <Prs3d_IsoAspect.hxx> #include <Prs3d_ShadingAspect.hxx> +#include <Prs3d_Presentation.hxx> +#include <PrsMgr_PresentationManager3d.hxx> +#include <Prs3d_TextAspect.hxx> +#include <Prs3d_Text.hxx> -#include <BRepPrimAPI_MakeCylinder.hxx> -#include <AIS_Drawer.hxx> +#include <Select3D_ListOfSensitive.hxx> +#include <Select3D_SensitiveBox.hxx> +#include <Select3D_SensitiveCurve.hxx> +#include <Select3D_SensitiveGroup.hxx> +#include <SelectMgr_Selection.hxx> +#include <SelectMgr_SequenceOfOwner.hxx> +#include <SelectMgr_EntityOwner.hxx> +#include <ShapeBuild_Edge.hxx> +#include <StdSelect_ViewerSelector3d.hxx> #include <StdPrs_ShadedShape.hxx> #include <StdPrs_HLRPolyShape.hxx> #include <StdSelect_BRepSelectionTool.hxx> #include <StdPrs_WFDeflectionShape.hxx> +#include <StdPrs_WFShape.hxx> +#include <StdPrs_ToolRFace.hxx> +#include <StdSelect.hxx> +#include <StdSelect_BRepOwner.hxx> +#include <StdSelect_BRepSelectionTool.hxx> + +#include <TCollection_AsciiString.hxx> +#include "TopExp.hxx" #include <TopExp_Explorer.hxx> -#include <BRep_Tool.hxx> #include <TopoDS.hxx> -#include <Geom_Surface.hxx> -#include <Geom_Plane.hxx> - +#include <TopoDS_Builder.hxx> +#include <TopoDS_Compound.hxx> +#include <TopoDS_ListOfShape.hxx> +#include <TopoDS_ListIteratorOfListOfShape.hxx> +#include <TopoDS_Iterator.hxx> +#include "TopoDS_Edge.hxx" +#include "TopoDS_Vertex.hxx" #include <TopTools_HSequenceOfShape.hxx> -#include <BRepTools.hxx> +#include <TopTools_IndexedMapOfShape.hxx> -#include <BRepBuilderAPI_NurbsConvert.hxx> -#include <Graphic3d_AspectFillArea3d.hxx> -#include <Aspect_PolygonOffsetMode.hxx> -#include <Graphic3d_Group.hxx> +#include <Visual3d_View.hxx> +#include <V3d_Viewer.hxx> +#include <V3d_View.hxx> +#include <WNT_Window.hxx> //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. diff --git a/samples/mfc/standard/Common/User_Cylinder.cxx b/samples/mfc/standard/Common/User_Cylinder.cxx index 859a84e56b..c611621dc0 100755 --- a/samples/mfc/standard/Common/User_Cylinder.cxx +++ b/samples/mfc/standard/Common/User_Cylinder.cxx @@ -19,7 +19,7 @@ IMPLEMENT_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject) #include <Poly_Triangulation.hxx> #include <TColgp_Array1OfDir.hxx> #include <GProp_PGProps.hxx> -#include <Graphic3d_Array1OfVertexNC.hxx> +#include <Graphic3d_Array1OfVertex.hxx> #include <Aspect_Array1OfEdge.hxx> #include <Quantity_Color.hxx> @@ -31,548 +31,477 @@ IMPLEMENT_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject) User_Cylinder::User_Cylinder(const Standard_Real R, const Standard_Real H) : AIS_InteractiveObject(PrsMgr_TOP_ProjectorDependant) { - BRepPrimAPI_MakeCylinder S(R,H); - myShape = S.Shape(); - SetHilightMode(0); - SetSelectionMode(0); - myDrawer->SetShadingAspect(new Prs3d_ShadingAspect()); - myPlanarFaceColor = Quantity_NOC_FIREBRICK3; - myCylindricalFaceColor = Quantity_NOC_GRAY; + BRepPrimAPI_MakeCylinder S(R,H); + myShape = S.Shape(); + SetHilightMode(0); + SetSelectionMode(0); + myDrawer->SetShadingAspect(new Prs3d_ShadingAspect()); + myPlanarFaceColor = Quantity_NOC_FIREBRICK3; + myCylindricalFaceColor = Quantity_NOC_GRAY; } User_Cylinder::User_Cylinder(const gp_Ax2 CylAx2, const Standard_Real R, const Standard_Real H) : AIS_InteractiveObject(PrsMgr_TOP_ProjectorDependant) { - BRepPrimAPI_MakeCylinder S(CylAx2,R,H); - BRepBuilderAPI_NurbsConvert aNurbsConvert(S.Shape()); - myShape = aNurbsConvert.Shape(); - SetHilightMode(0); - SetSelectionMode(0); - myDrawer->SetShadingAspect(new Prs3d_ShadingAspect()); - myPlanarFaceColor = Quantity_NOC_FIREBRICK3; - myCylindricalFaceColor = Quantity_NOC_KHAKI4; + BRepPrimAPI_MakeCylinder S(CylAx2,R,H); + BRepBuilderAPI_NurbsConvert aNurbsConvert(S.Shape()); + myShape = aNurbsConvert.Shape(); + SetHilightMode(0); + SetSelectionMode(0); + myDrawer->SetShadingAspect(new Prs3d_ShadingAspect()); + myPlanarFaceColor = Quantity_NOC_FIREBRICK3; + myCylindricalFaceColor = Quantity_NOC_KHAKI4; } void User_Cylinder::Compute(const Handle_PrsMgr_PresentationManager3d& aPresentationManager, - const Handle_Prs3d_Presentation& aPresentation, - const Standard_Integer aMode ) + const Handle_Prs3d_Presentation& aPresentation, + const Standard_Integer aMode ) { -// Quantity_NameOfColor aColor; - switch (aMode) { - case 0: -// aColor = AIS_InteractiveObject::Color(); -// SetColor(aColor); -// myDrawer->WireAspect()->SetColor (aColor); - StdPrs_WFDeflectionShape::Add(aPresentation,myShape, myDrawer ); - break; - case 1: - { -/* - myDrawer->ShadingAspect()->SetMaterial(Graphic3d_NOM_BRASS); - myDrawer->SetShadingAspectGlobal(Standard_False); - TopExp_Explorer Ex; - Handle(Geom_Surface) Surface; - for (Ex.Init(myShape,TopAbs_FACE); Ex.More(); Ex.Next()) - { - Surface = BRep_Tool::Surface(TopoDS::Face(Ex.Current())); - if (Surface->IsKind(STANDARD_TYPE(Geom_Plane))) - myDrawer->ShadingAspect()->SetColor(myPlanarFaceColor); - else - myDrawer->ShadingAspect()->SetColor(myCylindricalFaceColor); - StdPrs_ShadedShape::Add(aPresentation,Ex.Current(), myDrawer); - } - - break; -*/ - - Standard_Real aTransparency = Transparency(); - Graphic3d_NameOfMaterial aMaterial = Material(); -// aColor = AIS_InteractiveObject::Color(); - + switch (aMode) { +case 0: + StdPrs_WFDeflectionShape::Add(aPresentation,myShape, myDrawer ); + break; +case 1: + { - myDrawer->SetShadingAspectGlobal(Standard_False); - TopExp_Explorer Ex; - Handle(Geom_Surface) Surface; - - for (Ex.Init(myShape,TopAbs_FACE); Ex.More(); Ex.Next()) - { - - Surface = BRep_Tool::Surface(TopoDS::Face(Ex.Current())); - myDrawer->ShadingAspect()->SetMaterial(aMaterial); - if (Surface->IsKind(STANDARD_TYPE(Geom_Plane))) - myDrawer->ShadingAspect()->SetColor(myPlanarFaceColor); - else - myDrawer->ShadingAspect()->SetColor(myCylindricalFaceColor); - - - myDrawer->ShadingAspect()->SetTransparency (aTransparency); - StdPrs_ShadedShape::Add(aPresentation,Ex.Current(), myDrawer); - } -// myDrawer->ShadingAspect()->SetMaterial(aMaterial); - //myDrawer->ShadingAspect()->SetTransparency (aTransparency); -// if(HasColor()) -// myDrawer->ShadingAspect()->SetColor (aColor); -// StdPrs_ShadedShape::Add(aPresentation,myShape, myDrawer); - - break; + Standard_Real aTransparency = Transparency(); + Graphic3d_NameOfMaterial aMaterial = Material(); + myDrawer->SetShadingAspectGlobal(Standard_False); + TopExp_Explorer Ex; + Handle(Geom_Surface) Surface; - } - case 6: //color - { - BRepTools::Clean(myShape); - BRepTools::Update(myShape); + for (Ex.Init(myShape,TopAbs_FACE); Ex.More(); Ex.Next()) + { - Handle(Graphic3d_StructureManager) aStrucMana = GetContext()->MainPrsMgr()->StructureManager(); + Surface = BRep_Tool::Surface(TopoDS::Face(Ex.Current())); + myDrawer->ShadingAspect()->SetMaterial(aMaterial); + if (Surface->IsKind(STANDARD_TYPE(Geom_Plane))) + myDrawer->ShadingAspect()->SetColor(myPlanarFaceColor); + else + myDrawer->ShadingAspect()->SetColor(myCylindricalFaceColor); - Handle(Graphic3d_Group) mygroup = Prs3d_Root::CurrentGroup(aPresentation); - myAspect = (new Prs3d_ShadingAspect())->Aspect(); - Graphic3d_MaterialAspect material = myAspect->FrontMaterial(); - material.SetReflectionModeOff(Graphic3d_TOR_AMBIENT); - material.SetReflectionModeOff(Graphic3d_TOR_DIFFUSE); - material.SetReflectionModeOff(Graphic3d_TOR_SPECULAR); - material.SetReflectionModeOff(Graphic3d_TOR_EMISSION); - myAspect->SetFrontMaterial(material); - mygroup->SetPrimitivesAspect(myAspect); - myAspect->SetEdgeOn(); + myDrawer->ShadingAspect()->SetTransparency (aTransparency); + StdPrs_ShadedShape::Add(aPresentation,Ex.Current(), myDrawer); + } + break; - myDeflection = AIS_Shape::GetDeflection(myShape,myDrawer); - BRepMesh::Mesh(myShape,myDeflection); + } +case 6: //color + { + BRepTools::Clean(myShape); + BRepTools::Update(myShape); - 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; + Handle(Graphic3d_StructureManager) aStrucMana = GetContext()->MainPrsMgr()->StructureManager(); - CColoredMeshDlg Dlg(NULL); - Dlg.DoModal(); + Handle(Graphic3d_Group) mygroup = Prs3d_Root::CurrentGroup(aPresentation); + myAspect = (new Prs3d_ShadingAspect())->Aspect(); + Graphic3d_MaterialAspect material = myAspect->FrontMaterial(); + material.SetReflectionModeOff(Graphic3d_TOR_AMBIENT); + material.SetReflectionModeOff(Graphic3d_TOR_DIFFUSE); + material.SetReflectionModeOff(Graphic3d_TOR_SPECULAR); + material.SetReflectionModeOff(Graphic3d_TOR_EMISSION); + myAspect->SetFrontMaterial(material); - myX1OnOff = Dlg.X1OnOff; + mygroup->SetPrimitivesAspect(myAspect); + myAspect->SetEdgeOn(); - myXBlueOnOff = Dlg.m_CheckXBlueOnOff; - myXGreenOnOff = Dlg.m_CheckXGreenOnOff; - myXRedOnOff = Dlg.m_CheckXRedOnOff; + myDeflection = AIS_Shape::GetDeflection(myShape,myDrawer); + BRepMesh::Mesh(myShape,myDeflection); - myY1OnOff = Dlg.Y1OnOff; + 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; - myYBlueOnOff = Dlg.m_CheckYBlueOnOff; - myYGreenOnOff = Dlg.m_CheckYGreenOnOff; - myYRedOnOff = Dlg.m_CheckYRedOnOff; + CColoredMeshDlg Dlg(NULL); + Dlg.DoModal(); - myZ1OnOff = Dlg.Z1OnOff; + myX1OnOff = Dlg.X1OnOff; - myZBlueOnOff = Dlg.m_CheckZBlueOnOff; - myZGreenOnOff = Dlg.m_CheckZGreenOnOff; - myZRedOnOff = Dlg.m_CheckZRedOnOff; + myXBlueOnOff = Dlg.m_CheckXBlueOnOff; + myXGreenOnOff = Dlg.m_CheckXGreenOnOff; + myXRedOnOff = Dlg.m_CheckXRedOnOff; - // Adds a triangulation of the shape myShape to its topological data structure. - // This triangulation is computed with the deflection myDeflection. + myY1OnOff = Dlg.Y1OnOff; + + myYBlueOnOff = Dlg.m_CheckYBlueOnOff; + myYGreenOnOff = Dlg.m_CheckYGreenOnOff; + myYRedOnOff = Dlg.m_CheckYRedOnOff; + + myZ1OnOff = Dlg.Z1OnOff; + + myZBlueOnOff = Dlg.m_CheckZBlueOnOff; + myZGreenOnOff = Dlg.m_CheckZGreenOnOff; + myZRedOnOff = Dlg.m_CheckZRedOnOff; + + // Adds a triangulation of the shape myShape to its topological data structure. + // This triangulation is computed with the deflection myDeflection. #ifdef DEBUG - cout <<"Deflection = " << myDeflection << "\n" << endl; + cout <<"Deflection = " << myDeflection << "\n" << endl; #endif - StdPrs_ToolShadedShape SST; + StdPrs_ToolShadedShape SST; - Standard_Integer NumFace; - TopExp_Explorer ExpFace; + Standard_Integer NumFace; + TopExp_Explorer ExpFace; -//khr --> + //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(); + 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 - cout << "J\'explore actuellement la face " << NumFace << "\n" << endl; + cout << "J\'explore actuellement la face " << NumFace << "\n" << 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. + 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()) - { + if (myT.IsNull()) + { #ifdef DEBUG -// cout << "Triangulation of the face "<< i <<" is null \n"<< endl; + // cout << "Triangulation of the face "<< i <<" is null \n"<< endl; #endif - return; - } - - const TColgp_Array1OfPnt& Nodes= myT->Nodes(); - - const Poly_Array1OfTriangle& triangles = myT->Triangles(); - - 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 + return; + } + + const TColgp_Array1OfPnt& Nodes= myT->Nodes(); + + const Poly_Array1OfTriangle& triangles = myT->Triangles(); + + 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 (SST.Orientation(myFace) == TopAbs_REVERSED) // si la face est "reversed" + triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2 + else + triangles(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 = Nodes(n1).Transformed(myLocation.Transformation()); + gp_Pnt q = Nodes(n2).Transformed(myLocation.Transformation()); + gp_Pnt r = Nodes(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 <-- -//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 (SST.Orientation(myFace) == TopAbs_REVERSED) // si la face est "reversed" - triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2 - else - triangles(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 = Nodes(n1).Transformed(myLocation.Transformation()); - gp_Pnt q = Nodes(n2).Transformed(myLocation.Transformation()); - gp_Pnt r = Nodes(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(); + 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 - cout << "J\'explore actuellement la face " << NumFace << "\n" << endl; + cout << "J\'explore actuellement la face " << NumFace << "\n" << 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. + 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()) - { + if (myT.IsNull()) + { #ifdef DEBUG - //cout << "Triangulation of the face "<< i <<" is null \n"<< endl; + //cout << "Triangulation of the face "<< i <<" is null \n"<< endl; #endif - return; - } - Poly_Connect pc(myT); - const TColgp_Array1OfPnt& Nodes= myT->Nodes(); - BAR = GProp_PGProps::Barycentre(Nodes); + return; + } + Poly_Connect pc(myT); + const TColgp_Array1OfPnt& Nodes= myT->Nodes(); + BAR = GProp_PGProps::Barycentre(Nodes); - const TColgp_Array1OfPnt2d& UVNodes = myT->UVNodes(); - const Poly_Array1OfTriangle& triangles = myT->Triangles(); - TColgp_Array1OfDir myNormal(Nodes.Lower(), Nodes.Upper()); - - SST.Normal(myFace, pc, myNormal); - BRepTools::UVBounds(myFace,Umin, Umax, Vmin, Vmax); - dUmax = (Umax - Umin); - dVmax = (Vmax - Vmin); + const TColgp_Array1OfPnt2d& UVNodes = myT->UVNodes(); + const Poly_Array1OfTriangle& triangles = myT->Triangles(); + TColgp_Array1OfDir myNormal(Nodes.Lower(), Nodes.Upper()); - 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 + SST.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); + //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 + for (nt = 1; nt <= nnn; nt++) + { + // triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3 + if (SST.Orientation(myFace) == TopAbs_REVERSED) // si la face est "reversed" + triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2 + else + triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3 - if (SST.Orientation(myFace) == TopAbs_REVERSED) // si la face est "reversed" - triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2 - else - triangles(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 = Nodes(n1).Transformed(myLocation.Transformation()); - gp_Pnt q = Nodes(n2).Transformed(myLocation.Transformation()); - gp_Pnt r = Nodes(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; -*/ - } - } + if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) ) + { // Associates a vertexNT to each node + gp_Pnt p = Nodes(n1).Transformed(myLocation.Transformation()); + gp_Pnt q = Nodes(n2).Transformed(myLocation.Transformation()); + gp_Pnt r = Nodes(n3).Transformed(myLocation.Transformation()); + } + } - Handle(Graphic3d_ArrayOfTriangles) aOP = new Graphic3d_ArrayOfTriangles(3 * nnn, 0, Standard_True, Standard_True); + Handle(Graphic3d_ArrayOfTriangles) aOP = new Graphic3d_ArrayOfTriangles(3 * nnn, 0, Standard_True, Standard_True); - for (nt = 1; nt <= nnn; nt++) - { + for (nt = 1; nt <= nnn; nt++) + { #ifdef DEBUG - cout << "On traite actuellement le triangle : "<< nt <<"\n"; -#endif - if (SST.Orientation(myFace) == TopAbs_REVERSED) // si la face est "reversed" - triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2 - else - triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3 + cout << "On traite actuellement le triangle : "<< nt <<"\n"; +#endif + if (SST.Orientation(myFace) == TopAbs_REVERSED) // si la face est "reversed" + triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2 + else + triangles(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); + if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) ) + { // Associates a vertexNT to each node - gp_Pnt p = Nodes(n1).Transformed(myLocation.Transformation()); - gp_Pnt q = Nodes(n2).Transformed(myLocation.Transformation()); - gp_Pnt r = Nodes(n3).Transformed(myLocation.Transformation()); + TColgp_Array1OfPnt Points(1,3); - 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()); + gp_Pnt p = Nodes(n1).Transformed(myLocation.Transformation()); + gp_Pnt q = Nodes(n2).Transformed(myLocation.Transformation()); + gp_Pnt r = Nodes(n3).Transformed(myLocation.Transformation()); - 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 + 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()); - mygroup->BeginPrimitives(); - mygroup->AddPrimitiveArray(aOP); - mygroup->EndPrimitives(); + 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 - mygroup->SetGroupPrimitivesAspect(myAspect); - }// end of the exploration of the shape in faces + Prs3d_Root::CurrentGroup (aPresentation)->AddPrimitiveArray (aOP); - break; - } - } + mygroup->SetGroupPrimitivesAspect(myAspect); + }// end of the exploration of the shape in faces + + break; + } + } } void User_Cylinder::Compute(const Handle_Prs3d_Projector& aProjector, - const Handle_Prs3d_Presentation& aPresentation) + const Handle_Prs3d_Presentation& aPresentation) { - myDrawer->EnableDrawHiddenLine(); - StdPrs_HLRPolyShape::Add(aPresentation,myShape,myDrawer,aProjector); + myDrawer->EnableDrawHiddenLine(); + StdPrs_HLRPolyShape::Add(aPresentation,myShape,myDrawer,aProjector); } void User_Cylinder::ComputeSelection(const Handle_SelectMgr_Selection& aSelection, - const Standard_Integer aMode) + 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; - } + 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; + return 2; } Standard_Boolean User_Cylinder::AcceptShapeDecomposition() const { - return Standard_True; + return Standard_True; } void User_Cylinder::SetPlanarFaceColor(const Quantity_Color acolor) { - myPlanarFaceColor = acolor; + myPlanarFaceColor = acolor; } void User_Cylinder::SetCylindricalFaceColor(const Quantity_Color acolor) { - myCylindricalFaceColor = acolor; + myCylindricalFaceColor = acolor; } 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) - + 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; - } + { + 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) + 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(); + red =1; //initializing colors parameters + green=1; + blue =1; + switch ( ColorizationMode) + { + case 0 : //normal, vert/maron + { + Standard_Real Alt= thePoint.Z(); - Standard_Real AltDelta; + Standard_Real AltDelta; - AltDelta = AltMax-AltMin; + AltDelta = AltMax-AltMin; - red = 0.5- ((0.5*(AltMax-Alt))/(AltDelta)); - // red = 1/(((1000/(AltMax-AltMin))*Alt)+1000*(1-(AltMin/(AltMax-AltMin)))); - - // green = (3*AltMax-AltMin)/(3*AltMax-8*AltMin + 7*Alt); - // green = 1/(((7/(3*AltMax-AltMin))*Alt) + 1-(7*AltMin/(3*AltMax-AltMin))); - Standard_Real A = 7*Alt-7*AltMin; - green = (3*AltMax-AltMin)/(3*AltMax-AltMin+(7*Alt-7*AltMin)); -// AfxMessageBox(green); - // green =(0.30- (((0.3-1)*(AltMax-Alt))/(AltMax-AltMin))); - - blue = 0 ; -/* - red = 0.5; - green = 0.2222; - blue = 0; -*/ - Quantity_Color color; - color.SetValues(red,green,blue, Quantity_TOC_RGB); - return color; - break; - }//end case 0 + 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 ; - case 1 : //mer-neige - { - Standard_Real Alt= thePoint.Z(); + Quantity_Color color; + color.SetValues(red,green,blue, Quantity_TOC_RGB); + return color; + break; + }//end case 0 - Standard_Real b =AltMax-AltMin; - Standard_Real a= AltMax-thePoint.Z(); + case 1 : //mer-neige + { + Standard_Real Alt= thePoint.Z(); - red =1; - green=1; - blue =1; - if (0<a && a <= (b/5)) - { - red = 1; - green = 1; - blue = 1; - } - else if ((b/5)<a && a <= (2*b/5)) - { - red = .55; - green = 0.3; - blue = 0; - } - else if ((2*b/5)<a && a <= (18*b/20)) - { - green =1/(((7/(3*AltMax-AltMin))*Alt)+(1-(7*AltMin/(3*AltMax-AltMin)))); - red = 1/(((1000/(AltMax-AltMin))*Alt)+1000*(1-(AltMin/(AltMax-AltMin)))); - blue = 0; - } - else if ((18*b/20)<a && a <= (18.5*b/20)) - { - red = 0.75; - green = 0.66; - blue = 0; - } + Standard_Real b =AltMax-AltMin; + Standard_Real a= AltMax-thePoint.Z(); - else if ((18.5*b/20)<a && a <= b) - { - red = 0.25; - green = .66; - blue = 1; - } - Quantity_Color color; - color.SetValues(red,green,blue, Quantity_TOC_RGB); - return color; - break; - }//end case 1 + red =1; + green=1; + blue =1; + if (0<a && a <= (b/5)) + { + red = 1; + green = 1; + blue = 1; + } + else if ((b/5)<a && a <= (2*b/5)) + { + red = .55; + green = 0.3; + blue = 0; + } + else if ((2*b/5)<a && a <= (18*b/20)) + { + green =1/(((7/(3*AltMax-AltMin))*Alt)+(1-(7*AltMin/(3*AltMax-AltMin)))); + red = 1/(((1000/(AltMax-AltMin))*Alt)+1000*(1-(AltMin/(AltMax-AltMin)))); + blue = 0; + } + else if ((18*b/20)<a && a <= (18.5*b/20)) + { + red = 0.75; + green = 0.66; + blue = 0; + } - case 2 : - { - gp_Pnt P (85.,0.,-105.); - gp_Vec TheVect ( P, thePoint); - Standard_Real CoordX; - Standard_Real CoordY; - Standard_Real CoordZ; + else if ((18.5*b/20)<a && a <= b) + { + red = 0.25; + green = .66; + blue = 1; + } + Quantity_Color color; + color.SetValues(red,green,blue, Quantity_TOC_RGB); + return color; + break; + }//end case 1 - CoordX = TheVect.X(); - CoordY = TheVect.Y(); - CoordZ = TheVect.Z(); -/* - Standard_Real maxixy = Max(fabs(CoordX),fabs(CoordY)); - Standard_Real maxiyz = Max(fabs(CoordY),fabs(CoordZ)); - Standard_Real Maxi = Max(maxixy,maxiyz); + case 2 : + { + gp_Pnt P (85.,0.,-105.); + gp_Vec TheVect ( P, thePoint); + Standard_Real CoordX; + Standard_Real CoordY; + Standard_Real CoordZ; -*/ - Standard_Real Distance = BAR.Distance ( P); + CoordX = TheVect.X(); + CoordY = TheVect.Y(); + CoordZ = TheVect.Z(); - //red = (abs(CoordX))/(1*Distance) ; - //green =(abs(CoordY))/(1*Distance) ; - //blue = (abs(CoordZ))/(1*Distance) ; + Standard_Real Distance = BAR.Distance ( P); - Standard_Real a =fabs(CoordX); - Standard_Real b =fabs(CoordY); - Standard_Real c =fabs(CoordZ); + Standard_Real a =fabs(CoordX); + Standard_Real b =fabs(CoordY); + Standard_Real c =fabs(CoordZ); -Standard_Real xx = a / Max(Distance,a); //(Max (Distance, Maxi)); -Standard_Real yy = b / Max(Distance,b); //(Max (Distance, Maxi)); -Standard_Real zz = c / Max(Distance,c); //(Max (Distance, Maxi)); - - - if (myXRedOnOff) - red = xx; - else if (myXGreenOnOff) - green =xx; - else if (myXBlueOnOff) - blue=xx; - - if (myYRedOnOff) - red = yy; - else if (myYGreenOnOff) - green = yy; - else if (myYBlueOnOff) - blue = yy; - - if (myZRedOnOff) - red = zz; - else if (myZGreenOnOff) - green = zz; - else if (myZBlueOnOff) - blue = zz; - - /* if (myX1OnOff) - if (myY1OnOff) - if (myZ1OnOff)*/ + Standard_Real xx = a / Max(Distance,a); //(Max (Distance, Maxi)); + Standard_Real yy = b / Max(Distance,b); //(Max (Distance, Maxi)); + Standard_Real zz = c / Max(Distance,c); //(Max (Distance, Maxi)); - Quantity_Color color; - color.SetValues(red,green,blue, Quantity_TOC_RGB); - return color; - break; - }//end case 2 - }//end switch + if (myXRedOnOff) + red = xx; + else if (myXGreenOnOff) + green =xx; + else if (myXBlueOnOff) + blue=xx; - Quantity_Color c; - return c; + if (myYRedOnOff) + red = yy; + else if (myYGreenOnOff) + green = yy; + else if (myYBlueOnOff) + blue = yy; + + if (myZRedOnOff) + red = zz; + else if (myZGreenOnOff) + green = zz; + else if (myZBlueOnOff) + blue = zz; + Quantity_Color color; + color.SetValues(red,green,blue, Quantity_TOC_RGB); + return color; + break; + }//end case 2 + }//end switch + + Quantity_Color c; + return c; } void User_Cylinder::SetColor(const Quantity_Color &aColor) { - AIS_InteractiveObject::SetColor(aColor); - SetPlanarFaceColor(aColor); - SetCylindricalFaceColor(aColor); + AIS_InteractiveObject::SetColor(aColor); + SetPlanarFaceColor(aColor); + SetCylindricalFaceColor(aColor); } diff --git a/samples/mfc/standard/Common/res/OCC_Resource.aps b/samples/mfc/standard/Common/res/OCC_Resource.aps index ccad9670938f89219079520caae8378bfc927d5e..82b47ae1357b392b99a6b50e793856e0249dd8b7 100755 GIT binary patch delta 20591 zcmbt+37AyHwSUzh`!2ID><A)Y_bkkesMynen`!CkZn}G51_qjKfPsM-_MHJm1!Tu~ zR9rC8xCS*w(We;mvT77HF($@6@g-`ENH*8V|99%v?R&d>@_qc@8@}PzJ-<_@PMzA$ zt*SGx{=M6q2YVbGD!qq>6}St|6Z)q~W{HKDG=*bLVXwETZNY*yO{?cEZ*Og0-L!ns zf~M7L=B-#bZ`DGYce5<+Aug&DVx$n%_M|L1vC}Uv??-RNWq#2_A-y%xSi%zwObI38 z;fQc;D0R79K~YHq>Sd9vqH*=IxUxEh&l73{pI`A^qLG?#)MrE!LBk&h=5n))OR1w? z7Rt-$7RZp7(}{XnQam{|gDJ}eVL@>PeOfQ`^J+AQKiF8q1-V?M0KGJ1Iu!EJr0KF? zlA(EO13n`W2t|S(uc267RYBp`U@S1xNcb8<p1Oe71j~bB3LTg(3n$hl3kiGTfzT8a zcLzm415=`bNW_RLdO51f3QnbWrpt-4j&f(<5u!Rg3c@;rCm7Vse*6T*G`e*L6rN5` z%#bcQgFc)gFP05d&>-Eik)}4t(&Cvy27HM+zc(26Ch9z)fZvG41#IUMb7)%wY`2hZ zZjeRA&5AJ)@&&w}csQB})z_gcqtaC>7SYS#kc;VK@L#zkjWKF)&B0h9TGF7Yo{-1H zCW@sBiy0A5l;sPTXr)La#NJM=jj}`@qdkpsnEW<9*eFL0y-P@szabIu#S-3dT?9>- zfQ{MyhRanhzDs8s<%o`Zl}vviXe2_$3<gm#aonbcBSy$1yTwB`8ODeyS#H$sVVfTF zOxNTx@klB;;fa}o%Ek9BB*#cZJX4HB%!t=>w?^p|;!*n1OjPFw^v+C~Cm*BFX3D|x zamt+~hZLT$avF*Hh|d$(g?Ypi6rKgPCuzkjSmeKG4<6M|+1z!}`h-6aMayw1ZkITj zjs*?3g*`)Wvy>mwmv|ICo5@*ja+cAvvt)L!3iGX8{5OS~knhK|6px~xWag_fIV;K4 zgnZTJTb1}3J=282_j7uKAHSf_@t`}K<e)L`GLy$Ep3ju#)@t~~FDX15IbWbwJj!28 zWes|)TKmN*1sT3TJmC!*9v(S{yVNCKp{HldqWoVu;BbV;HPBM=YdSq!=G47vqkeRA z6D=3NvB?n>Wj0A^g?KHEo(Kj)Q_V~h#cyfa963b(j#kc*`BksmtWm?7Cs1^?_`Qw9 zjG*C-V;bZk4A3LqpdZbVx%qF}JW<0JHc_v5i%!pxdDZVKbOsa-&q#QpQBP=!sbZO1 zyywKco|xC;(^#qa15Hk#8~%}I^W%NmoR9?_|D!T^B9VlrCR}fJrgE3~Ym#g<1T@tx zK2g+KBN)N#=QA3VV&$dcv`uF_s`<-smzRl8ZJ<78&Uc`fi!+Mu4TosZTsd(3-;!*m z#EIe`isCc;p88-s!6lkVrT8aJn+p?tt{5UwV>$+0$gE?9TYNzsb7g+@*9r||5(tE1 zMl^2C1z2Uo*(9cV4Y#2h$E7Ye)~c81!ZwmVnTv@hiw4Y-LuD6o&%+=%kLu=OK=z_m zCibR%^T64M9^gk`dXBMv^uavzf&SEEz8qRLK=M30Jz&hh8W#@Mn4Pl<Dh#rbSlkn@ zk0p|zTV&JR`IshhXv2J2Ql0BytwT=<z-VlWDvbDi8w+}(Qw$q(ivl_|U*;AS+AKaJ z?g<1{RjV)xi|FipnO|6JGt}^!r7T(Ht`H^UULeQF!8CJ$93_X)_64$_Y=q**^p15m zVGYA-7;dB!2pJ8k%T!}39YrrJkon^;VBDMF+G154Gv0lnm>`q$dCbd;CRYn9GMs>c z3uS(nDl~)VAvuU9FO=Oos-4_*o`yhOGDn%X#0hfg=HM^|mWxSFn7fP<t`L_x;p95t zcTE(RB@z1RLU}%%iQg@h#l@48<U}3T#@awoO&xx>UwCLhGkSoRT+LWV{WKMiswp-< zS`cefT#XRawN%vFSbZoShzAXp1*l8}=(c8bsw?Sf7CDvP#9MyQ=4UTN@w(ljj?P~s zN6H9QE|M3@X*7@DqIB&dIb6o*zD4M<ae97{96hAo77&RBLh*1Y5{`0n`CS<I4K!e} zEV!i6W{S@U^NMCNl!}=)qOvn)`US{eCT7us#TYqFbPYdd(>;sj;HEigc^nofuM~+i z)a!}F1FDllVwISi2FJs^xSQ%!i+MC`i5ynaY%{4rJ>7`bD3&TWT$RKU*l#g)ERiMd zB{rw0KF(9C-&IvET5K{rqIwU{$N(zDQhIR-CX{71jwZyy8#H(%fu&Nk+8BEai8>g> z#Hz#!8r*{Up^YwWK~uKVtQI*!uB46@Oem}9Xbak9H9g$|Tdk$HTd?A-qpw<^?RqL& z3eF8Qc`5R3q&Z8$vYECog|IDj`%-XjrKk998@;|1jl7+PER%&jRk_vGVh6uoAg?0- zGJx06E6ZdyZCxe@$ZJ*lVx_4s%zm1mU7qW#N?;*~O~r(j(4G&_GO>#@T_AVU=gXk+ z9#h=-RyjysPo7peTJEKmRur_4_O?RN{dBxljv9QxmRTQ)8dDO!u$rkMvPK-FGp(rT zAsV<GISx}99wkTY9B>L_JbkOK$^Olav~oGBO|+jg+{AC${S(&e=XYaHyP1By99Fx9 zK3k6Nf0T+>Aj7Rx&5zq?`U>cNJFVx(9dr|jla8gA7Z0cz5YlSIo#~)<&j5PGx9Ri> z)cbCJ6p*V;_L1ME%i3UrduVPOO23yM`E*;G>?`l12ijo1`}t8wA2aCz`mzlzdz=c| z<wf!#GTLE`@3UcZXj8lFCm*HV?Xu+3AJ|INc(9u2j_s~06OUO?ED;LFVO(#x=1Mpe zs!7qOA2*xnUo7neH&Y=ESt)zSCuqz{6!xSEH?737^<F!Q?O2KK@svruYo*MQPn+tz z1P*zU-d-t3^nS)FGm@ZT8)Qybca=~4kS<sSn?B3zW*2l<`Nfau;Z-u1wy%O|enR_J z!8AW*((sa>*+O_AL3`aTJTCDII=u>Zd5-$6hREmX;?+<U-r#DO^aWbOj~D6Y)oA5Y zbaJ&E)$vlAFkc{=@YgGs%J246iI>xGwqndM*lz<~EnZ2(Ydu)n0%~G#dpzP-X>bg< z>Bt~=4IIgNYoP9{w0#Zq{0$vjgK7UYdTI^E_wVSpjJ;0(V(j;nyB0NigDUy)CN-=D z@h#fGkGJV2CcZ;Yu0@}EkKS90f&C{syB691OoP|q@c~`74l+Na#&s~{Y1*<*j+39# zee00n485`ro#=1$Z^r&kL)QcQ2i2_y_D@>79$oKWbnAMo=AY3|*MsGA`hbaFQ2!0c z_a#l*fDB*Jk_~cH*4L5_Y>*?f{w?XT4RUzaH<Di8AjfB&mDFP+JOM!yHX@UxnH%MJ zxJbJ;qDi{Y_co#)=h2J&)|LLYQI3_}sAQ8YmE9?_3Hf@^x=qN?lkVDt?7isaO|k%f z(?|R^h;lchj@eYP8JsyZYcoc8A#LSH5#6y_j=rooE9ouN#^aHMS}M5>OMPxJEDa2W z6LHfA0bDAEQ<p8M^$5CP3$z<aQ@6m_qv(+>D7a$_2IB>^Zwq?VXeM1C$I#g=GLKGg zk^SX3PLGu1P12;TvTyzbt1vJ8|5&^x+`!+?qMUYYlR5bnHd+%6&w%p@v{X!_<J&L^ zRnsrGq3lcO<85f+Nz|)D7B^m+#eO1O@F2cu!~D%!<|=iI$%;H9Ftf(v<=zTnnYh9t zY99;4a^bOvaJ~bvT9daz)KEtUO7YTd9kQrnx}}&ep%!jmaEd5%RpMi4h7&PT{8eTs z6Ad<l=}zl;hS72{%SOGm{4Ju~P{t}mQxc=f?J(zTnz9|cF>{jS1TWX73(h&JM1r<& zhqiNVj+**dBWqgb67y`TsX`=*&-rLPfW??OO2q=3!&D{~u8(4qhS4&y&_<2ANW9S( z@C3uk3}xkFu?2b)UMk!n2g+qMZU@%>RvU=13yx1NG%Q3`V~1+F4c5jY!9binc|cVz zto>Ve!24^nIYMC{6!u1ACQGSkx3PE>%^X69QMt>+N_q*o%T}dxsDj~`tWE=Fm>DOE zHB@|+EG$}U<8|TbM)?d6Td}&TO01)4SD{~Q;zv#oCc<IZtloM;h}sC+!mru%%vD$~ zwwmcTu97|BZ7^N4m5C1Z+AB6gWh)okO&B^tN(H<S=I+IH!uv#Vm3pVPt7UI_wV6J^ z>78`+YD^#3(Np}`MQ>aU{dUtAS7XN8LpeJ^+(#8VF>(&l^qq3>B}c5v1@K9My)0kA zALVbCGIuGO`NmY#hROxe@txR#yv^e9Cj8-0oWFZwJc`}oc6x6ortmxH>z%To=$OqH zi$?=f4gN$1U%9xGT-V5g%5OUuJav(vp{Ik1;yX6t4F|D%R)gKbsREvi3wu@DuR+!B zp<5xN>fUtDDNzG^RNyQV_oZVs!Fq$Ca&bTX^%_hm4^XdbWl80O>5Se+kCIU-zLyS7 ziJ~t+MwK{DbFPJPAEIrLAs?n&`Rx&U`dZA!-={aOg~cDGudl^4`~w<%9f*(7W!ItF zkJ}<+jo2ZnQ&ofs-R??p!UlPKs*g%+$+*RT(Z1_s-h`)Y+?*l>&@%C~O*VIOKrI(1 zY2Yq7sIQVQ%1TQsD#ec#sSh`tqEv~WFlAWLPb~>GiFmZ$h&M*iBTCEQ3jLhQc3}m0 zk*4oL1y9ksU6|BgqN7ZFnVw<dEA%!$ensExLal#ILw2Lquaajs7KY#OTP|(h4Oiwh zCgsyHPXCtadHvKTG_OU5%Mia~ynz0)8|%vJ^u=xn`#lxzK|ycOWqVM<n>2e5M88EH z{Ps58u?M=mLqFliyVU!7S)jal1D1S`Uq{J5kQ-F@AFb+PyCAGSIsJy)Bi^^kfjG9* zl}m5HfBhfYd_6kIpXerj{Q1VcQ2WK}q4o!y>}Q&kwZ?brhaioXAJLe-(CIH!yB8XM zOiTBo$^S~b_o5P?(EWQ+iPQ8V6F;So_o4@%p&t8SpTE(#eHb)<rz!j3G5jNomhF?p zS^vzU-TUB4{40wd0@s|+Y(>p|`&hgY-k(cZ4trOhcaHNWrr*Ha{)LUR8?2TNh2gvP z>nw8ZmqSPV+v15NA^~r_9$OV2eB+vXzJ3E<v!H4F;bQFC4?{@$)_znpi%#rEExOPf z`{n4t-MVN`Ba$!@m^q{VpjwpuhQ}?s)6fI3P!GD|0F2R-792pU^`cz|kiR!QcmPK1 zL$4lyz53EWnX@0|90b;%st=;10W|9%8gwA-0CDj7&XRnA*i_4JH9S5sh<S48w+G>T zXVae!LRJoSI|RwOH2M&P<Wb!rIdXV@x)6K|L?J*OmKZf<*a<pv2x=A5Q=GYoB8MUG z(?c>FTe4jbL;VsOdl>QtGcpD{J$Mw+4TrJcF_i8(49{>Fy?PjR7*3xbhFdp+MjXN0 zNSbm4*eF`VZx_%_M<8l6ojd}TF=ioOAA#-{Qtum3?pPXk1AMECD8`R*wCM)uG@ibF zgPbsIf>h^3qE^fhH8^QHd-geX-sBQJ&6B4Smys-!@*7%t6I6TQN!b5}o8<Hn=Xw-H zqi&WZ=gM7uu8hU>o110cxpR-cMHZhs_qJQ)kaOq$-7Rv#xpS{ODmR=v_l39056^}B zg!?wQc;~{Y&If7p?b0}B?h{|#E}OH?o&D&Y@}6_l<vX(coaNHX-;w#}&OPF;b8EyC z^X`)Vb5s{ct0(?&H+K2XT@C*|@|knzo_w#YIA`t?58W%z{C~8|8xP3l?vsC(G2$-< zMF`gb`>c7PxI{FGu!yPuy~2xUn^=H<Yv|04vZ()Ru|~`jE5t(lze+5mN#Bx{9X^%I zCz{1Nz-{=~Dpn)sbo{?YtOaumX#DOKRr=Wk0c*gwTr7h0CUC64vsH07i;ICS5*tuN zGh|E<OQ7d}EM>|6p_uimU}rJ^I}@-Ww`QeJspFFd2Bd!Y6FCs_2J5knjH3_dYia5$ zR?Sl3E`#S9@YN)6^q;_IQ&`a|L5e0y7ph%w<!NV$QaW_E%$<QO<<$y~*CafF82BqH z%9V%(ZLMvqnino_UcE$AutTjx`;=&P4#jRX0PH9Se7;1qdG*@XHNKX4t!;~OL~~RQ z?f{769tNkZYH4k4_O`5Au(owx%c^GNtE?!Ws4$d@@2XG?n~6rq+h{_p0=~Bc_?W{+ zJU#(IuBa$gROJ-mW1tpg!!4}>F^V(tK*;=vP(-d%IqK|F4knY}yf9yxNhvLNgOq6) zLHqBP1ydEAY8V#53P%%>w)VB{r9J_Qs)DAJ`9yUm>d@&2WM0QaQ8tm!t|o#9|KX)V zJu9&zYQC5A6W+9mSK-5)=~bl@O}x5N;T5Kk(hBTXDE<l;KPweiX$4Ee&!S*j&+0hK z>$f>}t**5=3p*OlgMDxWd|`b42zj26q9=ZP<F^lf`-|x@-q(y_(;xf2{xCB!J3Ke9 z5k#-Sr4x%i;6wMoaYdQQ5;fw{jz(BZWx#EcaMVC+s<%db(&45FOA3WWrI|91cdE=6 zb*zX>CPJ7O3sN_99AtAV0sT~IhOHXxxMJ`mVvTi%uOl(tqdv;me6}d(?vGLeO&N~h zQh?hHg9>3wi5li6g(b(0W@4>VIv%>BU^5KBZ@vPp{?~y+We}wpsK~k#a-USx^FdYT z6$zt(PkIu8IzG;E!=YAqk;-NDJMM>yoNJch7}u&#D{PQikj7}z6xnmQ0<r<5jaDAQ z3hPC4rl7N`nwbjm0Rz4rVUcolNVCRD5A=5K{VH3YDoalwJfA3Pjw;9;`O)SDxOTKy z4}LdyTDC@S2a7#9^ik7>V(262;cc?83mS)B+$IOB#3$QikxKOGkcCmzZa!Q$!S}nG z6nL6YnfpU}O(JC)!_=mr9)LQ(UBe|kyi?*xmkMj;uuBztuVm*-+lc_T)h!uOA4_VJ z0s{hqzS#+DI(X9dCmcvUpU7j64UNv5GC=q!mcJ3OW1>h|Y_Oim;$o>g8OUIFRvbUa zqv4?0S3R6v^=3;`Wh&=ZheHn&n^7CUjSB2OsIf%1UnBD_$zXEqfMj6y4hSGReT{Cy zKG))YOa`;P3z7lZyC5uQE;c|^!*7QimAKuaJaerqR+P7}Eus?NV4FlGhF+(k$=KLP zX^o6s5fp-cp>J*AY7%#HUcywzPng@8348?NvPdH~8F^0xAP@N*{9cf3oYXB9N39}s z({-{B&&5__ICobZWXJA`q?NU@u)pY{i^)?(Q5%+(aqdzqZD~l#@~<2MWRT)K`cbVc z>Za1Y>1{{)t6Etw%A}jU4uciLc44A1wx+oq!yFqwI-5Hnhgl-#-X?Q<1H`<*^83)r zfF-{V?GMNyCSxCZC?HF$^r@tPK6EC4yI?ABFIBF$t$m}XwKd-6ZEb0v--bJim<X)0 zHA}7GotkKfHUp}hsAo?e=hzQ6p((4Hn^!RCm;@}aQRmau;d~uQESXVH5l*R%HLYu# zS*Wh76Pu}p>bcN_q8?u$3=gAnB9?8oj)M%Bt8yY%3Pt9r6XTrO%b2d`&i?f8D`lQJ zVW$+P6{)nUP7|ie+*U^s+6-KFrK6t7YAT?UD$Z0uO8xw?dFz_JF+V2J_{R2TY(jHy zr(;ubNm7l7R0j<XotE1Vl}f?f?Cn7|eLPhb`INSO6%V_qNng@*F%{ZVnZ-i%K@#J- z-aTn@5Z6zj1?|AW$t-i=W*pC$<h0|NB++?1lO(1d&wxyKbl?gW66T1_IGIU7Iy;$h zFm!S<<3KY`W^7EI%&6Hcz$Y&@ka0HSfcV^2PcM9K<8Y#U3CDqrBgcO@uyJrG9VcjK z2t9&NY#eari48y+h(i*k{Dd7ccT$oaSB)}`Y8+ttQ4LG#z*&!TCCWIgapX@wtl|8x zAb&*$k9Ay=4kV9jIP2i6WPXW*BkjP3S@L#DbA77B`G=}-!%n^Sth`DN>Wvc^oZ~3R zmOwCVq7d`&#l@zi2QB2etIVElEfsa)dfc|aO}d21?yx-W2q(ehK~IXZR#xlShfA7_ zvm2%6Y@FqxYDo0T|eCEl`_zq;Bv9y&eTNtSG)&cmG~!~-cDQ5SKQ)1eOzI>Q~O z2paC-2_~6e?;<M+j$WQ|!hp<J-fQaPxKLH<^S7+QYJ*Ibm2gLS5g&x#Ax@T=ZEeeE zw5(7(n0ag-Iuw+Jy=($~5AVJ0cR`WkGH(FO#+;bUM;``dNebJJ<FZh(VMevtE~-mo z`}i(dFp#C`FAP&tdKtMD8Oug8H>SknI5a<dTy|s0IOMc3dZbR~PgC#gv5c}S%T;A_ zs0;08j%;v@U=Hp07*P*S37G-5aC##n=o^UbP-2srOf$3C$SUjza5k(*tYsQYWZnve zYC~nBQ(D^;0~U}@vin!HtyshOIQDWoVF)%aQn(9CaT2COA(=DQezy$~ZCSj;<kv=3 z3emG6nK!0W{x-#p`+YV_r$aLLBKzHzUfa4Vyl4@t%b)7DIzz)Uw^IXpHmJ(uvZu{$ zi;K6lD_M@3kF-%PrBdOjx})!dj%nNcA9U-(p#s;l!*#e?hbv6#YneIFDk`VC1Qe)K zU#H3^Kz=O9m_;55<K#-vDf96c^U)(BOC~vT>hIbbT(njhQ5{>X2Gw^aOGRyHZbV7l z8j<;PQaamcuAlCaxai~Ki$3Lu1A)Ki?2}Hm8G)!_&OyuwyQeVHnTX8I_QYZ=26xz$ zo%^Am<}otN9OdTwkD@r=8GHwB&0IW9c5@=&%%-W+WbX`O$NjSV0G6!#cT#dT9hfHj zW$=U8br22+Ig4&qJIjs7a8>8+&dR>{0om=wXeUY)M`fRkLO#7;_G6`R2|u;E*|elH z{)2bOUWy-9=1yyCL=Q)0f2VxdD8**VGM`7~04I|owjYx{mC%f8ve2&Cky>SiQax_% zGIOrv8}qEbo(^q@F27Uu7|4(wy$TZKxmOl(S-7C0Dv+z%_hd{K)F34VyQA<&B7snH zI}!!pMuh37_toAX;-PR0-@4a?m=<%%UV(rZwSMkx)E}M45$7^Ixt4Vv4Fj0|-YAE$ zJBL1PUbC~~VbqRVK6EQgqRzM&N2cU`XuicHxjJ?heM1y6F3Mf7%28KKJ?f&l+k+!~ zhqTPt7$?Zrk)4q<YWI%bn<;aY0lt{29iIGIxI^T~m>M_(fTqpTtnIU8foVM?*gdqA z%m|;!z#QQ-Eb?7T($}3z3L51&i$)+$iYd%ef<`i+h9yOsv`(!^Wa<<&te_gF<t$0b z5F3{CY?F5M-m(&3B5_$~RVg#I^L8c^(}z->zn);b*;?odBqpZGvhMu5ac97UGDB}z z$TPELL7|hu5q!h=nb~rX?wd-0GyKMpEhYRWot_eYlL5vehL`vDxn>yV4jk)*;lVB0 z6^!VuVD+toJ+YKf9Y>zbP#p(|4K^L4!vmhXn5vUAbO&TQGe_ni6aXxPnWysro(w!K zh)3h(Nywt^)=L5}rjMO4x1k_DBcw+$7jwxBIm3EvBr~+ftdF9nhW0psl+YebErR;a zm3gym4%G<Q(KRWZMfI47+Elm0dDH|5eKVqbz)d^m%G^dXTjy~;Hl|u5CC(=e!=@$< zAo$|6!HYeM|8%Y#azz>&e-!B3hKkdg+PHjmBPAJ+$7?-H3D48>&<cbHsTMkbP$HH1 zo|X8e#q$v&i4@dpzGmLuAoI;e9xmu;gDmi?rW($Th&Zc2Mp$NNaLgN3qo9&!Y3_ZH z^$7%bbjIw6-0Tc?MsJ$NNx3cxt8jRe%2~onDl{|1Nih`K98n_~|D<e6o94?RJu{jj z(nFsdg=d65vEg5yFSGfJ+R`B{_=#EM0-3wS!IB#OWCA+UDcP>o=AsO#oy0(;WYHTy z2FE~gX{S&cPt4{AcPx<_@}vwh)B*Ai0Cz_}zK1mE2!_gJPYa03U|@BeQBTUuwl0}L zQ7Nh>od6DslCmpmG!%3ELRnz;&S8RnzfczPaI|Em2Szy{pAnnt@p_F|EF4u4nSP&# zZDeI-PlO#7)E{wB=0K`zc5cpa=y+Njl_P(892FqCqgfBcXPWgOdm9v9p{!D!(Nvrx z8=+HbG*%;ON+lLplwAm?Qj`Z4>4EyfB19rMgmn^G<v<bcV24zxV-QP;v|uYop3Z`; zQecDH7t3s=)^&@ur+D9DS)8F3Ol!rTA^Ivs2K=wI=&N)%HTued>aQk_eZu(;$B830 zircOvX<;=D^E_#S=K0S&1Z63ucPx=bWe$PP=qv|0H989by|l!+@u#{*YJ8R>w{lIL z@mVZjD1xz+3YQ}QOC@Hv$YG{ZE!tJP4dGjg@(iN0RN~zh?I!&j0bYtyf*388@E|-( zCFU-bLxwquuMbVd1^<w`H^2s}R;O`vY^fG?a;etjjitJW4O=Gjdn<e4jy5X`!bl~% z7Liygu?!JjDsd1AyR=T@xLCrkEeT&P({(CBu$GeGwGzu(webCj(NfUEt#ZWtWK|-G z%z&;8(2sCaT)<@Q-7e*Ln%z8-@F9dQ7)BrtvzP&oZkOqORxFo8E_H~?2m{N&aFD5@ z^>FuCS?C}nT+k_3YOoks=r;%@Q`P%oxi;e96}l}ZS&4=f+Dsd*#4UjAxg0l5Rj8UX zbS$HIXXqFgd}f6<ITCp)d`zh^xlP-BJ|f8!<+?UGLM6V3pfW3wuVTp5+t+QnuNAe+ z3l(Jw!p2l$al5YE_3g6ga)(Okfn-VOKLnDo!tb|h&APADiLonnIagYg<tw$)hga$; z^XZjZg?EwYoh(NOk9FtZF%~`sAzw=6z$z`g)k+*dqQ;TY>@m2K6T$wkp<?#^?rOEh zTD{Bs*mcB|aS>-$X*&&At;=$+*7{Fdt<_#<C62DvYX1;{X7&UcF~6hJBg~xIaX4Fg zgjqVC7GahSr$v~_CToq-#pADbOif0hr3@=oapyf^H|`Oqi#Ni4H6lHRGX2RldWL&_ zjW*EdYqVYR5q_pxrP@l&L|mGpY_bx!SkO~z<tTgdfq!GhwX5xQOaQz&0!>J+)1?fx z5|h_y1!k?&ZNF`u9IHxsV4WT$zh0;N_F0Q(_<GF~Uaxu9uh-+_c7(R6>_1<x1%6~f z12<?nmu=A5mu}F*>mbLxLBYp2=%)WYV&asTo(O4E3D-uQy9ohsin3>;?l})_)P{M< zqWoi{9HV%KY?3aOh;GtFZ9vGIqI`FgypWw#YxVcx??J@P>9Dlg92p;jMe*iu)`qLx zti{aUtf%G<D{&{H=O#PkWd_QngK2?s+(KOu9H&YggP1v$sN16Z!3ryJV2d`=qX>>u zJaQ{`FF9h)dNZ>sGDpoRas?tQRH9**HrECOU?|FM7WAwIy{i*9?$)Ib+pX*C-K|Rp zC0hk$C=q*hYgr)Y3`mK|;Cj8fTdVq&C9rspR%h}atxf_F8A{d;i*n~4E%awrqVM%G zPp!xtpuvJc7*XdiECQYD@lC>m%)nJH2jYy{aFA1@Hdy4=>-8dZi<LNWz1HJRl%`b7 z+N(SM*u7f&D-pY)pw_**uUwB%4Mlkn5gaP<k_COTR}Z^h`?NJD?8B)ymmb)snOixE z1B5+@-cZQH2=7QZH19Nw<3HfZFb)T<KAPDrRK`LW2N&<&FNYw^RF8`P7{|e^Yr(1% zBP;RbeqEcl_RCQV98xkvIZ{FVEdYO=QD=UUAk-seMZw>53QQ011;v`inMPCv2OA!> z(?`t+1W`KdIiQO^en7X(YX`LXKRckCDDR-=nS^)_m1{NvK~&;uKtoe>a?a!&5yCb8 zi6!8JgIZ*dL%NU)4{1r^Lvr}Y3`yx>AuR1%h$B&jpR|O$eMnE9-4E+(jYH^%;@Nx{ zVNJ^p>#>YCa}v7`F(C?n?Xa%fmk1+Klu<`CC4it1MOkN2ZaJdG|L}-r{^*GAb$xHp z6`F8^9<lXSV#^J3)Ho=v_S4NjB{CjPUsoKu^b}oj<*%!{QQ8lw{x}2bFOE!*L+SoU z<@r0Fc<c%J{&`t_vgr1%azd|e*agWI_~R#%Uh66^?>ZC${zwJg<aK>2aQFLe(F0K^ zu+W3u<b*D6QATfdlj8>-?aD_>{3At|NVE8mum?A+PZMsB&$n{ac9*r~0Z}Y=iYt_i zvuCfuGaFe$%_{E|LhQ_cB+^}6E&9nh;;*=Ba`x;FanD`d5jxXOce|x`8ecy-d$ucn z2aM(*8010KEZPAT7=w$r4%&ti=4${gAHUr>a0Zs*A5K3<7njN*Cl;2<uLmIl&GV?t zQ|ERV-s;DT|9$wiLvVCvVPDASKj-!!Y{Gxe?IONs_B9B0hP0R+2>Yf`h)7t_31sNt zEB|YjIx}Qm`R7~fb6cG}nYY&Y{_%NjPM*x`$K3eGp28h=VZb7B{B^Yu9eotR?e9Nz z=+p%I^ig?UR_)V=P8A;s$@9Bi`MwbMo}{rqK)=iWwxp>)z|d-XK+-Z!EPO)J^_&>@ zLrE8%CkwjuftGhYOV2a^%l|Fuq3$3K0P+1FQ?JM5;H>PQ(O5jYM1CRZ;=Ta)qB)D7 zqooY~;sx5n;H@u9+MEOM1LVBv9r}og$NnIxW3(oYd!Md+968GWOiLe^h264ItA+2- z^N%4t9O)1KNMo7K=`A179`JT~_5(?GjE4XmE{XF#q~}>c{6qSPpErC+y-wiyj}K`q zp55>ISfYdVq?aC(Io;Zk;ZubCosczI+y6?(nbGwLo#N-cpU@}#Y&uQ-p1{-hDNW$# zn7>hopW-uGq3EB}et!Pqb2`pX*B5k(pRM1}C;a^28|wEYo^#LA1U$QJ5m^*|QWpF_ DMErME delta 7928 zcmb_hd3;pW^}lB>fdoSqNSJ-igzRCqZ0v8g%#g{<Ff(Bj7+g?MmMBn>EztU_75EY0 zpo0}qTd5U6z^H7py8HyRh_$U+)>;)66x3R3S$f`^gbDcRhy3xI&u8vA_nhxJcX{vK z@4fFGTb};Gciop8VCV{?vLd4!YyS;v1LhtuF4R0}noEef1h=QU(oty}H{-Uc%~K}L z7&rB<J8)50BV*aPb(irM%XV#BwhMmf*5gZH%)nS;FPAA3&+dbqo@va)`m%%U8J5_y z4~C?1md;*Jz<zinvp2hgt*7c$`XyHFhe~c?wTX)Tpw~xPB@^f$?dVXu1jfU)?2!aN z0LDx^o561Hh_@U7U!Iw%*~4szl=14-pOef>dv4<aD1~{6O=rPXFQYtHucpzzm5HM* zr@HByZMIgl1*u+1{~n|tBq{xJlERi03E>>*v)T2=ZDY;>&yzI-S1eY6Z0mYYRxsY^ zb;Z5@fF~$4dg3EJ5oWSlEGDL6;BrQyaUtNZ55@x?Z;V-HlgAQZgRXPMLSgdQB+p>f zW~*Tc)@5tdL$5;#!7+sLN~mGjOeiNV%~p+awWFM&h}#p1NBs3Zu_22?Y{-4R(;14z zLXD!gR`hzV_a<AgP!j>>#mm_Wxvw4I4UBP$ty?TM^7*kmM_oJo`e3_T^4F5Tq21&2 zyFGD#FdPtE9?5B`4X^;V<Y=G~*W{>F!E5P5Ld+kmPlBug7Q**()Gz|i=2Sxz3v#O= zhGVI0!WFr47=_R0s$m?ynQMXZ_(N`gn1KCyTOp34d)xR#253M9+=csltKn`u-dn}* zA=?5}^2sFEk?&sY-$w=a;qX4{{3#6l?s(J_79v6{6k!%NjZlLYD~(Sx5WJ(~es`4q z0Z*eR8Wrlrk$5Z?EBg(hezsW8pC!3^aRL7w$vulT{P!e}FE(m6q@smzm@*^-tJy{Z zz>+>KFG&rHH%>eh_5?+@mGZWw%&tHvDz#^|*x1V{dsG<NZnm>mt~bYpXflz5y_)ib zsoyljSd)08Q7ct!8^fb{8rY6s=gDCQcF)(rPAtsVt9GTLn!;`&*4~i7Uc(6l+Kuz` z)vyPj$X9Fkrl5_HCVB)SQSr|6SgjVeACD650G^}rb<F6i*1mBgI^c06(RTJG3Vqe^ z7LKR#|L`F~zx`8mZ4zC>4&qkA9ikTc;HkbDa9GkVllG3N^|U2{PWG-;wI{1C_6HQ? z8aN`Mhc3&2_atqZJi~GH`qlzM$3VR7eaYo<`(trez$4K8K?Af|*q`vQT;1~LPTo*h zd_>4;V}I#nZc5IH&CWhdS-t+CbU#>a4)#&X9Hxeo6K<<wAKze)2mHZ?WDC{ouaXld zDO7L_7b+CB$5ZHtr{j^M&eX9JDNocB@VH{MA_bCp1a=bNQ}k7wN<ktXcPQy}vD0`( zA+P(p<Qzpk4vmTnk%$mXJ_J^~m3`XT*G?i*wB5!&!=O?NpW_sz)_0~eE*cK_lapev zVqZue@d*)}q4v3QSlESYX3yw$u*1r}#iL3&|BfD@qs#l&e=lKto<KO>6iqH49;?H_ z{vp|2p<v82Iu;lGQkNW6?1yU+NlP`mNVzIk$l+f&QPo#*N%Dsyo{{me5KLZ)Dl5B; z%Tx-^0I+q1l5>(TtWZKXJgL$`8eUczp*!l;2Izsq)M`k_acUi8;asw0;~KRVa&V_w z%X2Ai-%1VdP4eVQE$>6}>PlU09*7IjNWW)PJQfNCoXLBP7HB3<d7?2P))b9jb6S}K zr)%U~Nl8Mh)Lcb!>MA8@aKA=v)20Fg{^Y$}Yqc?5%Ix;U1b;wUD{8HFrpGL;f*UBw zH>>)B5r=7u!Gx2wg;0R4T4hU-6dCcjh-Bg&k4GJ?R>hqiL7H!IV(VzRD(UPHXEf=s zvr^IFii-pCyI66BwS?K=+Cm$3Mg3!?i6<Ij1KS-~q|4=lsCOgo>VrXD55wTj5skuV zf8(_%I~zj4FCNqIp(N8E*T68`s#Ai1hjr>YXXn6}5N+s~A1}><E9Go-`&~YNKzc~M zRxk6QUayCG9I98ra2%^wX&X{tdY)(*j}h}r1Z^XdTS2%++^E+<5D!yi2*1+n6ya2i zNRATRYGotPXfPASc?~5*am}QU#K#OKBD(Dc1B}Lx3`H;o!KfwD(;JoA@u@ViQ6X`0 zmohnQYyu7W=xPm*lRUp#4-;{f(FnKUt45vi_Ec0j;t$3;b=gtF?x2YKpV06-NiKgv z4U^DfGV;k(d+!M)5#}_Lo(OZ9NvoQY$|E$z#KppEsdcca1QmYW7pCDclR`Va6DSan zwnyU4M#vi0jJXABcmOL3v@io33Un|N?=2{RS-6bsKf?_L26zw;7Z~9oJXfHBIoQ*z zhq+j4E`WI$H0xkKPBj~$1zXKpScsd<8d!vfNdGyWF`M9FtSnSzNUhb?vHzi3Klmj! z6`J5tyil5lOAB*gv7}Y3&EZR^-^13bVX0(kUfUb~7kl(Gz%r>ms9zswm9$f9`@nLX z-OmIo@X3BgSc$v)6>_BL+t#UI)yg70JcfoMBY&Js`_}2TiH<1<(_#{did!M^>F|p5 z_-kBPq=6@KZIKbyke-L3r?U83ik$eA5!PY%VlzC2WyKnJ8hynYJXM^J4;5#^Z}6AJ zhJnAmF>`&Bw7sCz0(<sGXUyLy-5*w~ldZ?ol=F9ZrML*5r&5VSOEO^t21-ou0!}Y6 z!$v9<xUr-cY{JteDhxl92``dX1e-CVR0l6%acP;pE!9Z!L5_!<!--m?@zq-Jo6^4c ztI}-PhO0}pn(ZmHQ=p~J6LBVicD4hLmg;HiaiP=%yV~cuJ64vZ!)sVmrl<Xec*X83 z%c4Dps4XkYfxVK}|F`+DPtuN;Wy5|vS5`p#jok7A+HX{q8{iGe*SxknHkYU4o^m<1 zmS@7-xTf3$2XSw?i60WD`&lLJ8m^S<;9b;K7~l^$q(V=7gb5X9{vP>Zy$O!u?<)%6 zeSD{)kpGcv&Fi)N1Cq;0{)yz4^&0pyj;PeZU$B|V53#jU4<F&?N)>#Jhbq-X(Vvn1 zIHvX2!wD?xZ-A5NrScTsO_tO62$g@s=g9I2zTLkFKE?C>weTfoS#<CfR#15s0~R%$ z!+R_y_zss?%Hez5ZYhF);3-QP{D7HO6Z{kVTg%}hj<XgKpFM2t2S4Hq)?)ZKen8$! z_)oH2MxCt;uHbN6Ib6jDZG|!>!*w<@2N^xS8;mlU4A0mqWL$=Fdm(Y$V0#&H++=$N zaa_V~CXRc}t|yK=MtTN<qZE2#xx*&AMTVy>eejzXa(O1DvTjtNc4IE@CFvzZhbJ9M z$i;s-$_#Q@`*I(SyM<8PO?zx-azEs?IYnY~R~3R1@2xU|4wq7?#}})L42F)dXxtZz zh2t@QEFj(3Hn)`(Qakr=((ryHmv1sa5mr^3p%}+j8=wT|Qdx>?stceD_f_}f<%HV$ zVm@A}&gPb+p5yX)T;lf1YxCHcRWh1dY^gTIwNBi4$3+&TTX+m@wHxBrWQ2oN-wY}4 zN-1|0tGO9c+^`a|n$@=44C+WiYgpaQkX1=!EgNt%WOWi*#|Fv<UgPB(NAD4tkvb`` zK^^&Av_Xx=oT1T-4!O*U(`)h-u9VXm35|*pMT%z`H?FDC5S#9(F@O(0uF--YFV<)( zhRejQ5N!qnW8%TkC~CrPu~}K8WFF-o>lCC*L`FLcqEMTs2z9t<N9~XLk`Yxbj8kj1 zbbwq^tLAsowHz^5PK>s{*1+$g+S0jdn7p!1O|+(|Q}Fx9baJkmPa%1Et^%gwv^uqX zT1VI2ac5I>46|Em>=rg1pRP0V`w2N^p2%UR>NLb#m+Lf|hdS`Cc%x7s^n1mSx|&)x zhrq|@sffVB15`v{_YF|-`DC-qSMmiU1M?L`WxEHcR0~rnVi6i@Fe;{~tzwJt!T<%a zThD<i{tF5@GG9(CcYa_V-nt+IekE!dK@m%Q_o!rFHZX%YPDE@Rm<~%st*37!v(u%q zv89sZn+54ab>|0aiR#V|%ukn`RjgI4;IKjI#CBr*_(8W2<B8gQ(pKW5gG8cxp32AZ z;2<qeP=7A8DEVrVU(DC?CrM^3(D8L7OBZPPGbDR0RKv5lXs`;_<C?(={sP(dKOiTv zIWkzK-IN-(mp1L<1~4k#Lw5Ee;c{lkiF$NHlyzHDxTw$=4tUz{wQ9CC<#B}qp-9|G z?;IK!F|CEYOgXmBQ1VwuzB@y%ef36ceZ)hjZ^GKyHrzKv#kUhuH&exTkQ_Kut=V~F zglmi-1=O%zXdSBJuMx0yrk3v}xp}6V?;-gv)%TJ-H&es+k<6T><NHZg%+m7%Btx?_ z{B@GkX31OLNHq{0LnpvSX%I9AR%;D=Gvy3NLSgYG6QcvDmA&1`;djNFB9h(44yNqM zXHJCM*`bs<d5|TmgB>O-zCKJtBzJ0<j!5q6FeCgC2MQ)4unB^m2yB61hQA`X`e0~t zHc^?VeI#V^<J9{_o3;D|$!9j}_(_uCE%`Xa*^`KExl@5ZZoY+|maKWG*^)^Vx7=yw zpGX!H{9VE<*^)(c2QCBujO@F&82INTPi@iiGcs7YRS#d_BQ8C0;d3rCap5~up2Z6; zBXQvcmlDg}nT=m}j4VoPbA3}lIzV|n);ji0%Hs@4n|U$|?0m}XkJ0Nnm$;UBXnS;l zn%2Fff^YF@w}yCjx7$oSyW34earYvw6*Yq=oA}n^(G%Z>Jw|?!VtTb{h;dhV4E#r` zHMSY}zezT?Y4|0Qt!+x;-5hTLze2SmZ3<%Ekk=$*99MYr(C~5wh?<$pIIUDKn`E5h zF|SV6jpHQ}X&g26Dp@+m+IoX5gX7qG17zaddL#70wNz%|-ueQbO~DIZDTLm5i%$c6 zu-K=EJoNcYkdOEI%+ME?`wBpgU;E{F*p~weJmxbH&0Z!Pakaky)F}9kbb{0pVvaux zwD>4lb-2l|AqqZ3x`CqgbUe%&ZlL2~|KWwafLcAj%>-tgL$*SEa(EH%N45#ub;QAo z8uIYs@I2z-MGbw>(2z@9ENUmV_a;7G)S$-99leN?7d2EsIc{z!hYBjyxO_)CRIUt^ zLVqj^6o3UofpV}?sYc7rbg<#m0W;X8R38T9;2<pz*Y3>XRn+v0J9WI8<dL0bsKHws z`|(<;X?GPu9d2l>l+EGzaigk6d`m3;#23@zFQc2A4PfI~h&8iG^bXKP@1~<t>82N@ z)%3R5L4O;z-mAuLQyeW)kQC>V;==3!Hl5u~<!x*#y&w0o$!rQ`nn8Loo6Tw|M+xO` zB>No_b_U_^Vl&A<l58{BEQ*{$wJ6zUu{+5&oockhpmr@3Ig)xaj(Qbi0oK?;4Tx1g zy~=ixp^4u0dZ>OIrJPOa#fB@{J=YEJ|FfelUGC|B>F9$rzG?rZqg}WXvecz$yVPg_ zI>c0j)F4BDXuQ4)Up4U4khV)WA>0+5y-T^i3v0TB3y#ot3Ab^?9bLi&BeT1NON)MS zGhAD4EE{eH5<eSZyvfrQT-zs2lVn{2J~H~bo3}h-tfMQ*@QtyGF5%R-cIi^IJ#=g7 z%{xca()PD;C0zpI@Ckdm)WiCCRabCryW$tRHqT$(KB)&ZC&q(J-pfK?&^lJip@~Hx zQ)Z_=AZF9*vK{Z=)jzRCChJBg%=>p~6YtApePt6N@uf^=lkJlwbX=z6<)5>}P%hK* zndey|E-LdbvqTFiGIzJcIxbUn7r!dLmX_E<aM{~E5+_7?EIn~Wl$p0Ablph$dL@R4 zGA}DJL6rM)6AMJSDnGHV8|BEO4vjM>hNO{xhPu7noY*7!R~IEtkiUoc74TFsB#wLn zN(o>tNn8;D<>d*T7$gE_RwNdrk!^cLVx1^2RV4O^GEkW~A<Ctdi7TQ!Tba;xC%ML& z7}A|$=TYn#YhpronbY;K4TxB}(?2(h%*>LLnzfNsci21p8KV0-|0=3)v_qoxYfu)w zMU{z;4)CI%Bs)N}=Bt84*?Ca**e-tTtbs)Kw-jk6Pq#rGkr#dvc{^qH4W`J86zQeP zJ5<?Bm3mbgb#O>W<eO3tI}czSfty_&{<nVOA5H$VE}G>ll<Y^U-0AKB2dH-aXirgn zp{K)t^e4$0f{Z=vg%z#Z9&<Qj->;&xTBFvyLB-gr)xdmg6mwFFt5*+ENvWkTzLLuR E1Doo&(f|Me diff --git a/samples/mfc/standard/Common/res/OCC_Resource.h b/samples/mfc/standard/Common/res/OCC_Resource.h index b00a6d6d7e..8d82a087b1 100755 --- a/samples/mfc/standard/Common/res/OCC_Resource.h +++ b/samples/mfc/standard/Common/res/OCC_Resource.h @@ -1,5 +1,5 @@ //{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. +// Microsoft Visual C++ generated include file. // Used by OCC_Resource.rc // #define IDR_POPUP 116 @@ -20,6 +20,8 @@ #define IDD_COLORMESH 552 #define IDB_coloredmesh 554 #define IDC_RICHEDIT_ResultDialog 1001 +#define IDC_EDIT1 1004 +#define IDC_README 1005 #define ID_WINDOW_NEW3D 1151 #define ID_OBJECT_DISPLAYALL 1201 #define ID_OBJECT_MATERIAL 1205 @@ -132,7 +134,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 119 #define _APS_NEXT_COMMAND_VALUE 40034 -#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_CONTROL_VALUE 1006 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/samples/mfc/standard/Common/res/OCC_Resource.rc b/samples/mfc/standard/Common/res/OCC_Resource.rc index 0ac9c5240c..04fe07f78e 100755 --- a/samples/mfc/standard/Common/res/OCC_Resource.rc +++ b/samples/mfc/standard/Common/res/OCC_Resource.rc @@ -1,4 +1,4 @@ -//Microsoft Developer Studio generated resource script. +// Microsoft Visual C++ generated resource script. // #include "OCC_Resource.h" @@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "OCC_Resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "#include ""OCC_Resource.h""\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" @@ -62,50 +62,41 @@ END // Bitmap // -IDB_OCC_LOGO BITMAP DISCARDABLE "occ_logo.bmp" -IDR_2dCHILDFRAME BITMAP DISCARDABLE "2dChildFrameTB.bmp" -IDR_3dCHILDFRAME BITMAP DISCARDABLE "3dChildFrameTB.bmp" -IDR_TB_AIS BITMAP MOVEABLE PURE "AIS_TB.bmp" -IDB_coloredmesh BITMAP DISCARDABLE "coloredm.bmp" +IDB_OCC_LOGO BITMAP "occ_logo.bmp" +IDR_2dCHILDFRAME BITMAP "2dChildFrameTB.bmp" +IDR_3dCHILDFRAME BITMAP "3dChildFrameTB.bmp" +IDR_TB_AIS BITMAP "AIS_TB.bmp" +IDB_coloredmesh BITMAP "coloredm.bmp" ///////////////////////////////////////////////////////////////////////////// // // Dialog // -IDD_OCC_ABOUTBOX DIALOGEX 34, 22, 201, 161 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_OCC_ABOUTBOX DIALOGEX 34, 22, 284, 257 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About" FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN - CTEXT "Sample SampleName, Open CASCADE Technology OCC_Version", - IDC_ABOUTBOX_TITLE,3,8,195,8 - CTEXT "Copyright (C) 2001-2012, Open CASCADE S.A.S", - IDC_STATIC,18,99,165,8,SS_CENTERIMAGE - DEFPUSHBUTTON "OK",IDOK,56,135,88,14,WS_GROUP - CTEXT "http://www.opencascade.com",IDC_STATIC,51,115,98,8, - SS_CENTERIMAGE - CONTROL 1300,IDC_STATIC,"Static",SS_BITMAP,36,27,132,62, - WS_EX_CLIENTEDGE + CTEXT "Sample SampleName, Open CASCADE Technology OCC_Version",IDC_ABOUTBOX_TITLE,32,9,227,8 + CTEXT "Copyright (C) 2001-2013, Open CASCADE S.A.S",IDC_STATIC,53,99,165,8,SS_CENTERIMAGE + DEFPUSHBUTTON "OK",IDOK,101,233,88,14,WS_GROUP + CTEXT "http://www.opencascade.com",IDC_STATIC,92,116,98,8,SS_CENTERIMAGE + CONTROL 1300,IDC_STATIC,"Static",SS_BITMAP,73,28,132,64,WS_EX_CLIENTEDGE + EDITTEXT IDC_README,7,131,270,94,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL,WS_EX_LEFTSCROLLBAR END -IDD_ResultDialog DIALOG DISCARDABLE 0, 0, 212, 202 -STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | - WS_SYSMENU +IDD_ResultDialog DIALOG 0, 0, 212, 202 +STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU FONT 8, "MS Sans Serif" BEGIN - CONTROL "",IDC_RICHEDIT_ResultDialog,"RICHEDIT",ES_MULTILINE | - ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | - WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,0,10, - 210,160 - PUSHBUTTON "Copy selection to clipboard", - IDC_CopySelectionToClipboard,5,176,100,15 - PUSHBUTTON "Copy all to clipboard",IDC_CopyAllToClipboard,107,176, - 100,15 + CONTROL "",IDC_RICHEDIT_ResultDialog,"RICHEDIT",TCS_HOTTRACK | TCS_VERTICAL | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,0,10,210,160 + PUSHBUTTON "Copy selection to clipboard",IDC_CopySelectionToClipboard,5,176,100,15 + PUSHBUTTON "Copy all to clipboard",IDC_CopyAllToClipboard,107,176,100,15 END -IDD_GrilleRectangulaire DIALOG DISCARDABLE 0, 0, 124, 145 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_GrilleRectangulaire DIALOG 0, 0, 124, 145 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Rectangular Grid" FONT 8, "MS Sans Serif" BEGIN @@ -123,8 +114,8 @@ BEGIN LTEXT "Rotation angle ",IDC_STATIC,14,87,51,15 END -IDD_GrilleCirculaire DIALOG DISCARDABLE 0, 0, 124, 145 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_GrilleCirculaire DIALOG 0, 0, 124, 145 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Circular Grid" FONT 8, "MS Sans Serif" BEGIN @@ -133,8 +124,7 @@ BEGIN EDITTEXT IDC_CircGrid_XOrigin,73,5,45,15,ES_AUTOHSCROLL EDITTEXT IDC_CircGrid_Yorigin,73,25,45,15,ES_AUTOHSCROLL EDITTEXT IDC_CirctGrid_RadiusStep,73,45,45,15,ES_AUTOHSCROLL - EDITTEXT IDC_CircGrid_DivNumber,73,65,45,15,ES_AUTOHSCROLL | - ES_NUMBER + EDITTEXT IDC_CircGrid_DivNumber,73,65,45,15,ES_AUTOHSCROLL | ES_NUMBER EDITTEXT IDC_CircGrid_RotationAngle,73,85,45,15,ES_AUTOHSCROLL LTEXT "X Origin",IDC_STATIC,0,7,55,15 LTEXT "Y Origin",IDC_STATIC,0,27,55,15 @@ -143,109 +133,72 @@ BEGIN LTEXT "Rotation angle ",IDC_STATIC,0,87,55,15 END -IDD_AISTRANSPARENCY DIALOG DISCARDABLE 0, 0, 68, 28 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_AISTRANSPARENCY DIALOG 0, 0, 68, 28 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Transparency" FONT 8, "MS Sans Serif" BEGIN - EDITTEXT IDC_EDITAISTRANSP,15,6,27,12,ES_AUTOHSCROLL | ES_NUMBER | - WS_GROUP - CONTROL "Spin1",IDC_SPINAISTRANSP,"msctls_updown32", - UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP,41,6,11,12 + EDITTEXT IDC_EDITAISTRANSP,15,6,27,12,ES_AUTOHSCROLL | ES_NUMBER | WS_GROUP + CONTROL "Spin1",IDC_SPINAISTRANSP,"msctls_updown32",UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP,41,6,11,12 END -IDD_AISMATERIAL DIALOG DISCARDABLE 0, 0, 71, 221 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_AISMATERIAL DIALOG 0, 0, 71, 221 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Material" FONT 8, "MS Sans Serif" BEGIN LTEXT "",IDC_STATIC,15,211,8,8 - CONTROL "Copper",ID_OBJECT_MATERIAL_COPPER,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,43,56,10 - CONTROL "Aluminium",ID_OBJECT_MATERIAL_ALUMINIUM,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,3,56,10 - CONTROL "Chrome",ID_OBJECT_MATERIAL_CHROME,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,33,56,10 - CONTROL "Bronze",ID_OBJECT_MATERIAL_BRONZE,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,23,56,10 - CONTROL "Metilized",ID_OBJECT_MATERIAL_METALIZED,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,73,56,10 - CONTROL "Brass",ID_OBJECT_MATERIAL_BRASS,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,13,56,10 - CONTROL "Gold",ID_OBJECT_MATERIAL_GOLD,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,53,56,10 - CONTROL "Pewter",ID_OBJECT_MATERIAL_PEWTER,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,112,56,10 - CONTROL "Silver",ID_OBJECT_MATERIAL_SILVER,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,162,56,10 - CONTROL "Steel",ID_OBJECT_MATERIAL_STEEL,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,172,56,10 - CONTROL "Neon PHC",ID_OBJECT_MATERIAL_NEON_PHC,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,93,56,10 - CONTROL "Stone",ID_OBJECT_MATERIAL_STONE,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,182,56,10 - CONTROL "Obsidian",ID_OBJECT_MATERIAL_OBSIDIAN,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,103,56,10 - CONTROL "Jade",ID_OBJECT_MATERIAL_JADE,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,63,56,10 - CONTROL "Plastic",ID_OBJECT_MATERIAL_PLASTIC,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,122,56,10 - CONTROL "Plaster",ID_OBJECT_MATERIAL_PLASTER,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,132,56,10 - CONTROL "Shiny Plastic",ID_OBJECT_MATERIAL_SHINY_PLASTIC,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,152,56,10 - CONTROL "Satin",ID_OBJECT_MATERIAL_SATIN,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,142,56,10 - CONTROL "Neon GNC",ID_OBJECT_MATERIAL_NEON_GNC,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,83,56,10 - CONTROL "Default",ID_OBJECT_MATERIAL_DEFAULT,"Button", - BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,201,56,10 + CONTROL "Copper",ID_OBJECT_MATERIAL_COPPER,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,43,56,10 + CONTROL "Aluminium",ID_OBJECT_MATERIAL_ALUMINIUM,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,3,56,10 + CONTROL "Chrome",ID_OBJECT_MATERIAL_CHROME,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,33,56,10 + CONTROL "Bronze",ID_OBJECT_MATERIAL_BRONZE,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,23,56,10 + CONTROL "Metilized",ID_OBJECT_MATERIAL_METALIZED,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,73,56,10 + CONTROL "Brass",ID_OBJECT_MATERIAL_BRASS,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,13,56,10 + CONTROL "Gold",ID_OBJECT_MATERIAL_GOLD,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,53,56,10 + CONTROL "Pewter",ID_OBJECT_MATERIAL_PEWTER,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,112,56,10 + CONTROL "Silver",ID_OBJECT_MATERIAL_SILVER,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,162,56,10 + CONTROL "Steel",ID_OBJECT_MATERIAL_STEEL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,172,56,10 + CONTROL "Neon PHC",ID_OBJECT_MATERIAL_NEON_PHC,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,93,56,10 + CONTROL "Stone",ID_OBJECT_MATERIAL_STONE,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,182,56,10 + CONTROL "Obsidian",ID_OBJECT_MATERIAL_OBSIDIAN,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,103,56,10 + CONTROL "Jade",ID_OBJECT_MATERIAL_JADE,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,63,56,10 + CONTROL "Plastic",ID_OBJECT_MATERIAL_PLASTIC,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,122,56,10 + CONTROL "Plaster",ID_OBJECT_MATERIAL_PLASTER,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,132,56,10 + CONTROL "Shiny Plastic",ID_OBJECT_MATERIAL_SHINY_PLASTIC,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,152,56,10 + CONTROL "Satin",ID_OBJECT_MATERIAL_SATIN,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,142,56,10 + CONTROL "Neon GNC",ID_OBJECT_MATERIAL_NEON_GNC,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,83,56,10 + CONTROL "Default",ID_OBJECT_MATERIAL_DEFAULT,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,5,201,56,10 END -IDD_COLORMESH DIALOG DISCARDABLE 0, 0, 167, 194 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION +IDD_COLORMESH DIALOG 0, 0, 167, 194 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION CAPTION "Colored mesh" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,58,171,50,14 GROUPBOX "Altitude",IDC_STATIC,7,7,153,58 - CONTROL "green to brown",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON, - 19,22,132,16 - CONTROL "blue to white",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON, - 19,42,132,16 - CONTROL "Custom :",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,20,70, - 39,16 + CONTROL "green to brown",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,19,22,132,16 + CONTROL "blue to white",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,19,42,132,16 + CONTROL "Custom :",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,20,70,39,16 LTEXT "Red",IDC_STATIC,53,95,16,10 LTEXT "Green",IDC_STATIC,71,95,21,10 LTEXT "Blue",IDC_STATIC,96,95,17,10 LTEXT "X",IDC_STATIC,26,115,10,10 LTEXT "Y",IDC_STATIC,26,130,10,10 LTEXT "Z",IDC_STATIC,26,145,10,10 - CONTROL "",IDC_CHECK_XRed,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 53,115,10,8 - CONTROL "",IDC_CHECK_XGreen,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,75,115,10,8 - CONTROL "",IDC_CHECK_YRed,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 53,130,10,8 - CONTROL "",IDC_CHECK_YGreen,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,75,130,10,8 - CONTROL "",IDC_CHECK_YBlue,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 96,130,10,8 - CONTROL "",IDC_CHECK_ZRed,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 53,145,10,8 - CONTROL "",IDC_CHECK_ZGreen,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,75,145,10,8 - CONTROL "",IDC_CHECK_ZBlue,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 96,145,10,8 - CONTROL "",IDC_CHECK_XBlue,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 96,115,10,8 + CONTROL "",IDC_CHECK_XRed,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,115,10,8 + CONTROL "",IDC_CHECK_XGreen,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,75,115,10,8 + CONTROL "",IDC_CHECK_YRed,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,130,10,8 + CONTROL "",IDC_CHECK_YGreen,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,75,130,10,8 + CONTROL "",IDC_CHECK_YBlue,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,96,130,10,8 + CONTROL "",IDC_CHECK_ZRed,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,145,10,8 + CONTROL "",IDC_CHECK_ZGreen,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,75,145,10,8 + CONTROL "",IDC_CHECK_ZBlue,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,96,145,10,8 + CONTROL "",IDC_CHECK_XBlue,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,96,115,10,8 LTEXT "-1",IDC_STATIC,128,95,10,10,NOT WS_VISIBLE - CONTROL "",IDC_CHECK_X1,"Button",BS_AUTOCHECKBOX | NOT - WS_VISIBLE | WS_TABSTOP,128,115,10,8 - CONTROL "",IDC_CHECK_Y1,"Button",BS_AUTOCHECKBOX | NOT - WS_VISIBLE | WS_TABSTOP,128,130,10,8 - CONTROL "",IDC_CHECK_Z1,"Button",BS_AUTOCHECKBOX | NOT - WS_VISIBLE | WS_TABSTOP,128,145,10,8 + CONTROL "",IDC_CHECK_X1,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,128,115,10,8 + CONTROL "",IDC_CHECK_Y1,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,128,130,10,8 + CONTROL "",IDC_CHECK_Z1,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,128,145,10,8 GROUPBOX "",IDC_STATIC,21,104,120,9 GROUPBOX "",IDC_STATIC,40,86,8,73 GROUPBOX "",IDC_STATIC,115,86,8,73 @@ -259,16 +212,16 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDR_MAINFRAME ICON DISCARDABLE "MainFrame.ico" -IDR_2DTYPE ICON DISCARDABLE "2dType.ico" -IDR_3DTYPE ICON DISCARDABLE "3dType.ico" +IDR_MAINFRAME ICON "MainFrame.ico" +IDR_2DTYPE ICON "2dType.ico" +IDR_3DTYPE ICON "3dType.ico" ///////////////////////////////////////////////////////////////////////////// // // Toolbar // -IDR_2dCHILDFRAME TOOLBAR DISCARDABLE 20, 20 +IDR_2dCHILDFRAME TOOLBAR 20, 20 BEGIN BUTTON ID_BUTTON2DFitAll BUTTON ID_BUTTON2DZoomWin @@ -285,7 +238,7 @@ BEGIN BUTTON ID_BUTTON2DGridCancel END -IDR_3dCHILDFRAME TOOLBAR DISCARDABLE 20, 20 +IDR_3dCHILDFRAME TOOLBAR 20, 20 BEGIN BUTTON ID_BUTTONZoomAll BUTTON ID_BUTTONZoomWin @@ -309,7 +262,7 @@ BEGIN BUTTON ID_BUTTONHlrOn END -IDR_TB_AIS TOOLBAR DISCARDABLE 20, 20 +IDR_TB_AIS TOOLBAR 20, 20 BEGIN BUTTON ID_OBJECT_WIREFRAME BUTTON ID_OBJECT_SHADING @@ -330,7 +283,7 @@ END // Menu // -IDR_Popup2D MENU DISCARDABLE +IDR_Popup2D MENU BEGIN POPUP "Entry1" BEGIN @@ -338,7 +291,7 @@ BEGIN END END -IDR_Popup3D MENU DISCARDABLE +IDR_Popup3D MENU BEGIN POPUP "Background" BEGIN @@ -354,40 +307,26 @@ BEGIN 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 @@ -399,7 +338,7 @@ END // Accelerator // -IDR_MAINFRAME ACCELERATORS DISCARDABLE +IDR_MAINFRAME ACCELERATORS BEGIN "N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT END @@ -411,8 +350,13 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN + IDD_OCC_ABOUTBOX, DIALOG + BEGIN + BOTTOMMARGIN, 256 + END + IDD_ResultDialog, DIALOG BEGIN BOTTOMMARGIN, 201 @@ -432,30 +376,30 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Create a new document\nNew" ID_FILE_CLOSE "Close the active document\nClose" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_EXPORT_IMAGE "Export image \n Export image" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_APP_ABOUT "Display program information\nAbout" ID_APP_EXIT "Quit the application\nExit" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_WINDOW_NEW "Open another window for the active document\nNew Window" ID_WINDOW_ARRANGE "Arrange icons at the bottom of the window\nArrange Icons" @@ -463,7 +407,7 @@ BEGIN ID_WINDOW_TILE_HORZ "Arrange windows as non-overlapping tiles\nTile Windows" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_BUTTON2DFitAll "Press to zoom the application objects in the view\nFitAll" ID_BUTTON2DZoomWin "Press and drag MB1 to select a zoom window\nZoom Window" @@ -482,7 +426,7 @@ BEGIN "Press to activate circular grid with lines\nCircular grid with lines" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN AFX_IDS_SCSIZE "Change the window size" AFX_IDS_SCMOVE "Change the window position" @@ -491,12 +435,12 @@ BEGIN AFX_IDS_SCCLOSE "Close the active window" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN AFX_IDS_SCRESTORE "Restore the window to normal size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_INDICATOR_EXT "EXT" ID_INDICATOR_CAPS "CAP" @@ -506,7 +450,7 @@ BEGIN ID_INDICATOR_REC "REC" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_BUTTONZoomAll "Press to zoom the application objects in the view\nFitAll" ID_OBJECT_ERASE "Erase selected shape\nErase" @@ -526,24 +470,24 @@ BEGIN ID_BUTTONAxo "Press to select axonometric View\nAxo" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_BUTTONTop "Press to select a top View\nTop" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_OBJECT_REMOVE "Remove selected shape\nRemove" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_OBJECT_DISPLAYALL "Display all erased shapes\nDisplay" ID_OBJECT_MATERIAL "Change object material\nMaterial..." ID_OBJECT_TRANSPARENCY "Change object transparency\nTransparency..." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_OBJECT_COLOR "Change object color\nColor..." ID_OBJECT_SHADING "Put selection in shading\nShading" diff --git a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj index cf6c244493..2fe42c8802 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj +++ b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj @@ -111,7 +111,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\libd/mfcsample.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -155,7 +155,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\libd/mfcsample.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -200,7 +200,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc10\lib/mfcsample.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -246,7 +246,7 @@ <ResourceOutputFileName>$(IntDir)%(Filename).res</ResourceOutputFileName> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc10\lib/mfcsample.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -306,22 +306,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\..\Common\OCC_2dApp.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\OCC_2dChildFrame.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -370,22 +354,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\..\Common\OCC_3dApp.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\OCC_3dBaseDoc.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -450,7 +418,7 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\..\Common\OCC_BaseApp.cpp"> + <ClCompile Include="..\..\..\..\Common\OCC_App.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> @@ -666,22 +634,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Curve.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Face.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -699,22 +651,6 @@ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Image.cpp" /> - <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Line.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Markers.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -731,22 +667,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Rectagle.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Text.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -763,38 +683,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_InteractiveContext.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_ObjectOwner.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_Shape.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -827,16 +715,14 @@ <ItemGroup> <ClInclude Include="..\..\..\..\Common\AISDialogs.h" /> <ClInclude Include="..\..\..\..\Common\ImportExport\ImportExport.h" /> - <ClInclude Include="..\..\..\..\Common\OCC_2dApp.h" /> <ClInclude Include="..\..\..\..\Common\OCC_2dChildFrame.h" /> <ClInclude Include="..\..\..\..\Common\OCC_2dDoc.h" /> <ClInclude Include="..\..\..\..\Common\OCC_2dView.h" /> - <ClInclude Include="..\..\..\..\Common\OCC_3dApp.h" /> <ClInclude Include="..\..\..\..\Common\OCC_3dBaseDoc.h" /> <ClInclude Include="..\..\..\..\Common\OCC_3dChildFrame.h" /> <ClInclude Include="..\..\..\..\Common\OCC_3dDoc.h" /> <ClInclude Include="..\..\..\..\Common\OCC_3dView.h" /> - <ClInclude Include="..\..\..\..\Common\OCC_BaseApp.h" /> + <ClInclude Include="..\..\..\..\Common\OCC_App.h" /> <ClInclude Include="..\..\..\..\Common\OCC_BaseChildFrame.h" /> <ClInclude Include="..\..\..\..\Common\OCC_BaseDoc.h" /> <ClInclude Include="..\..\..\..\Common\OCC_BaseView.h" /> @@ -850,15 +736,10 @@ <ClInclude Include="..\..\..\..\Common\Resource2D\CircularGrid.h" /> <ClInclude Include="..\..\..\..\Common\ColoredMeshDlg.h" /> <ClInclude Include="..\..\..\..\Common\Resource2D\RectangularGrid.h" /> - <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Curve.h" /> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Face.h" /> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Image.h" /> - <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Line.h" /> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Markers.h" /> - <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Rectangle.h" /> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Text.h" /> - <ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_InteractiveContext.h" /> - <ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_ObjectOwner.h" /> <ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_Shape.h" /> </ItemGroup> <ItemGroup> 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 5fabcb040b..ab0406a92f 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj.filters +++ b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj.filters @@ -45,9 +45,6 @@ <ClCompile Include="..\..\..\src\mfcsample.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\OCC_2dApp.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\OCC_2dChildFrame.cpp"> <Filter>Source Files</Filter> </ClCompile> @@ -57,9 +54,6 @@ <ClCompile Include="..\..\..\..\Common\OCC_2dView.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\OCC_3dApp.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\OCC_3dBaseDoc.cpp"> <Filter>Source Files</Filter> </ClCompile> @@ -72,7 +66,7 @@ <ClCompile Include="..\..\..\..\Common\OCC_3dView.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\OCC_BaseApp.cpp"> + <ClCompile Include="..\..\..\..\Common\OCC_App.cpp"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="..\..\..\..\Common\OCC_BaseChildFrame.cpp"> @@ -111,33 +105,18 @@ <ClCompile Include="..\..\..\..\Common\Resource2D\RectangularGrid.cpp"> <Filter>Source Files\Resource2D-src</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Curve.cpp"> - <Filter>Source Files\Primitive-src</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Face.cpp"> <Filter>Source Files\Primitive-src</Filter> </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Image.cpp"> <Filter>Source Files\Primitive-src</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Line.cpp"> - <Filter>Source Files\Primitive-src</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Markers.cpp"> <Filter>Source Files\Primitive-src</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Rectagle.cpp"> - <Filter>Source Files\Primitive-src</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Text.cpp"> <Filter>Source Files\Primitive-src</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_InteractiveContext.cpp"> - <Filter>Source Files\ISession2D-src</Filter> - </ClCompile> - <ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_ObjectOwner.cpp"> - <Filter>Source Files\ISession2D-src</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_Shape.cpp"> <Filter>Source Files\ISession2D-src</Filter> </ClCompile> @@ -154,9 +133,6 @@ <ClInclude Include="..\..\..\..\Common\ImportExport\ImportExport.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\OCC_2dApp.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\..\Common\OCC_2dChildFrame.h"> <Filter>Header Files</Filter> </ClInclude> @@ -166,9 +142,6 @@ <ClInclude Include="..\..\..\..\Common\OCC_2dView.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\OCC_3dApp.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\..\Common\OCC_3dBaseDoc.h"> <Filter>Header Files</Filter> </ClInclude> @@ -181,7 +154,7 @@ <ClInclude Include="..\..\..\..\Common\OCC_3dView.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\OCC_BaseApp.h"> + <ClInclude Include="..\..\..\..\Common\OCC_App.h"> <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\..\..\..\Common\OCC_BaseChildFrame.h"> @@ -223,33 +196,18 @@ <ClInclude Include="..\..\..\..\Common\Resource2D\RectangularGrid.h"> <Filter>Header Files\Resource2D-headers</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Curve.h"> - <Filter>Header Files\Primitive-headers</Filter> - </ClInclude> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Face.h"> <Filter>Header Files\Primitive-headers</Filter> </ClInclude> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Image.h"> <Filter>Header Files\Primitive-headers</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Line.h"> - <Filter>Header Files\Primitive-headers</Filter> - </ClInclude> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Markers.h"> <Filter>Header Files\Primitive-headers</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Rectangle.h"> - <Filter>Header Files\Primitive-headers</Filter> - </ClInclude> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Text.h"> <Filter>Header Files\Primitive-headers</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_InteractiveContext.h"> - <Filter>Header Files\ISession2D-headers</Filter> - </ClInclude> - <ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_ObjectOwner.h"> - <Filter>Header Files\ISession2D-headers</Filter> - </ClInclude> <ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_Shape.h"> <Filter>Header Files\ISession2D-headers</Filter> </ClInclude> diff --git a/samples/mfc/standard/mfcsample/adm/win/vc11/mfcsample.vcxproj b/samples/mfc/standard/mfcsample/adm/win/vc11/mfcsample.vcxproj index 8ec8798d3d..e1d17fe81e 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc11/mfcsample.vcxproj +++ b/samples/mfc/standard/mfcsample/adm/win/vc11/mfcsample.vcxproj @@ -115,7 +115,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\libd/mfcsample.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -159,7 +159,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;FWOSPlugin.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\libd/mfcsample.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -204,7 +204,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win32\vc11\lib/mfcsample.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -250,7 +250,7 @@ <ResourceOutputFileName>$(IntDir)%(Filename).res</ResourceOutputFileName> </ResourceCompile> <Link> - <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV2d.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKShapeSchema.lib;PTKernel.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;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>../../../../win64\vc11\lib/mfcsample.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> @@ -310,22 +310,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\..\Common\OCC_2dApp.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\OCC_2dChildFrame.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -374,22 +358,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\..\Common\OCC_3dApp.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\OCC_3dBaseDoc.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -454,7 +422,7 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\..\Common\OCC_BaseApp.cpp"> + <ClCompile Include="..\..\..\..\Common\OCC_App.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> @@ -670,22 +638,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Curve.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Face.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -703,22 +655,6 @@ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Image.cpp" /> - <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Line.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Markers.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -735,22 +671,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Rectagle.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Text.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -767,38 +687,6 @@ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - <ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_InteractiveContext.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_ObjectOwner.cpp"> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> <ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_Shape.cpp"> <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -831,16 +719,14 @@ <ItemGroup> <ClInclude Include="..\..\..\..\Common\AISDialogs.h" /> <ClInclude Include="..\..\..\..\Common\ImportExport\ImportExport.h" /> - <ClInclude Include="..\..\..\..\Common\OCC_2dApp.h" /> <ClInclude Include="..\..\..\..\Common\OCC_2dChildFrame.h" /> <ClInclude Include="..\..\..\..\Common\OCC_2dDoc.h" /> <ClInclude Include="..\..\..\..\Common\OCC_2dView.h" /> - <ClInclude Include="..\..\..\..\Common\OCC_3dApp.h" /> <ClInclude Include="..\..\..\..\Common\OCC_3dBaseDoc.h" /> <ClInclude Include="..\..\..\..\Common\OCC_3dChildFrame.h" /> <ClInclude Include="..\..\..\..\Common\OCC_3dDoc.h" /> <ClInclude Include="..\..\..\..\Common\OCC_3dView.h" /> - <ClInclude Include="..\..\..\..\Common\OCC_BaseApp.h" /> + <ClInclude Include="..\..\..\..\Common\OCC_App.h" /> <ClInclude Include="..\..\..\..\Common\OCC_BaseChildFrame.h" /> <ClInclude Include="..\..\..\..\Common\OCC_BaseDoc.h" /> <ClInclude Include="..\..\..\..\Common\OCC_BaseView.h" /> @@ -854,15 +740,10 @@ <ClInclude Include="..\..\..\..\Common\Resource2D\CircularGrid.h" /> <ClInclude Include="..\..\..\..\Common\ColoredMeshDlg.h" /> <ClInclude Include="..\..\..\..\Common\Resource2D\RectangularGrid.h" /> - <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Curve.h" /> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Face.h" /> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Image.h" /> - <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Line.h" /> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Markers.h" /> - <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Rectangle.h" /> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Text.h" /> - <ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_InteractiveContext.h" /> - <ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_ObjectOwner.h" /> <ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_Shape.h" /> </ItemGroup> <ItemGroup> diff --git a/samples/mfc/standard/mfcsample/adm/win/vc11/mfcsample.vcxproj.filters b/samples/mfc/standard/mfcsample/adm/win/vc11/mfcsample.vcxproj.filters index 5fabcb040b..ab0406a92f 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc11/mfcsample.vcxproj.filters +++ b/samples/mfc/standard/mfcsample/adm/win/vc11/mfcsample.vcxproj.filters @@ -45,9 +45,6 @@ <ClCompile Include="..\..\..\src\mfcsample.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\OCC_2dApp.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\OCC_2dChildFrame.cpp"> <Filter>Source Files</Filter> </ClCompile> @@ -57,9 +54,6 @@ <ClCompile Include="..\..\..\..\Common\OCC_2dView.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\OCC_3dApp.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\OCC_3dBaseDoc.cpp"> <Filter>Source Files</Filter> </ClCompile> @@ -72,7 +66,7 @@ <ClCompile Include="..\..\..\..\Common\OCC_3dView.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\OCC_BaseApp.cpp"> + <ClCompile Include="..\..\..\..\Common\OCC_App.cpp"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="..\..\..\..\Common\OCC_BaseChildFrame.cpp"> @@ -111,33 +105,18 @@ <ClCompile Include="..\..\..\..\Common\Resource2D\RectangularGrid.cpp"> <Filter>Source Files\Resource2D-src</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Curve.cpp"> - <Filter>Source Files\Primitive-src</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Face.cpp"> <Filter>Source Files\Primitive-src</Filter> </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Image.cpp"> <Filter>Source Files\Primitive-src</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Line.cpp"> - <Filter>Source Files\Primitive-src</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Markers.cpp"> <Filter>Source Files\Primitive-src</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Rectagle.cpp"> - <Filter>Source Files\Primitive-src</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\Primitive\Sample2D_Text.cpp"> <Filter>Source Files\Primitive-src</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_InteractiveContext.cpp"> - <Filter>Source Files\ISession2D-src</Filter> - </ClCompile> - <ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_ObjectOwner.cpp"> - <Filter>Source Files\ISession2D-src</Filter> - </ClCompile> <ClCompile Include="..\..\..\..\Common\ISession2D\ISession2D_Shape.cpp"> <Filter>Source Files\ISession2D-src</Filter> </ClCompile> @@ -154,9 +133,6 @@ <ClInclude Include="..\..\..\..\Common\ImportExport\ImportExport.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\OCC_2dApp.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\..\Common\OCC_2dChildFrame.h"> <Filter>Header Files</Filter> </ClInclude> @@ -166,9 +142,6 @@ <ClInclude Include="..\..\..\..\Common\OCC_2dView.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\OCC_3dApp.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="..\..\..\..\Common\OCC_3dBaseDoc.h"> <Filter>Header Files</Filter> </ClInclude> @@ -181,7 +154,7 @@ <ClInclude Include="..\..\..\..\Common\OCC_3dView.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\OCC_BaseApp.h"> + <ClInclude Include="..\..\..\..\Common\OCC_App.h"> <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\..\..\..\Common\OCC_BaseChildFrame.h"> @@ -223,33 +196,18 @@ <ClInclude Include="..\..\..\..\Common\Resource2D\RectangularGrid.h"> <Filter>Header Files\Resource2D-headers</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Curve.h"> - <Filter>Header Files\Primitive-headers</Filter> - </ClInclude> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Face.h"> <Filter>Header Files\Primitive-headers</Filter> </ClInclude> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Image.h"> <Filter>Header Files\Primitive-headers</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Line.h"> - <Filter>Header Files\Primitive-headers</Filter> - </ClInclude> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Markers.h"> <Filter>Header Files\Primitive-headers</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Rectangle.h"> - <Filter>Header Files\Primitive-headers</Filter> - </ClInclude> <ClInclude Include="..\..\..\..\Common\Primitive\Sample2D_Text.h"> <Filter>Header Files\Primitive-headers</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_InteractiveContext.h"> - <Filter>Header Files\ISession2D-headers</Filter> - </ClInclude> - <ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_ObjectOwner.h"> - <Filter>Header Files\ISession2D-headers</Filter> - </ClInclude> <ClInclude Include="..\..\..\..\Common\ISession2D\ISession2D_Shape.h"> <Filter>Header Files\ISession2D-headers</Filter> </ClInclude> diff --git a/samples/mfc/standard/mfcsample/adm/win/vc8/mfcsample.vcproj b/samples/mfc/standard/mfcsample/adm/win/vc8/mfcsample.vcproj index 7dfb31f50f..9dcd89dd36 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc8/mfcsample.vcproj +++ b/samples/mfc/standard/mfcsample/adm/win/vc8/mfcsample.vcproj @@ -80,7 +80,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib" OutputFile="../../../../win32\vc8\libd/mfcsample.dll" LinkIncremental="2" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib" OutputFile="../../../../win64\vc8\libd/mfcsample.dll" LinkIncremental="2" SuppressStartupBanner="true" @@ -277,7 +277,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib" OutputFile="../../../../win32\vc8\lib/mfcsample.dll" LinkIncremental="1" SuppressStartupBanner="true" @@ -375,7 +375,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib" OutputFile="../../../../win64\vc8\lib/mfcsample.dll" LinkIncremental="1" SuppressStartupBanner="true" @@ -556,52 +556,6 @@ /> </FileConfiguration> </File> - <File - RelativePath="..\..\..\..\Common\OCC_2dApp.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\OCC_2dChildFrame.cpp" > @@ -740,52 +694,6 @@ /> </FileConfiguration> </File> - <File - RelativePath="..\..\..\..\Common\OCC_3dApp.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\OCC_3dBaseDoc.cpp" > @@ -971,7 +879,7 @@ </FileConfiguration> </File> <File - RelativePath="..\..\..\..\Common\OCC_BaseApp.cpp" + RelativePath="..\..\..\..\Common\OCC_App.cpp" > <FileConfiguration Name="Debug|Win32" @@ -1625,52 +1533,6 @@ Name="Primitive-src" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" > - <File - RelativePath="..\..\..\..\Common\Primitive\Sample2D_Curve.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\Primitive\Sample2D_Face.cpp" > @@ -1721,52 +1583,6 @@ RelativePath="..\..\..\..\Common\Primitive\Sample2D_Image.cpp" > </File> - <File - RelativePath="..\..\..\..\Common\Primitive\Sample2D_Line.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\Primitive\Sample2D_Markers.cpp" > @@ -1813,52 +1629,6 @@ /> </FileConfiguration> </File> - <File - RelativePath="..\..\..\..\Common\Primitive\Sample2D_Rectagle.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\Primitive\Sample2D_Text.cpp" > @@ -1909,98 +1679,6 @@ <Filter Name="ISession2D-src" > - <File - RelativePath="..\..\..\..\Common\ISession2D\ISession2D_InteractiveContext.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\..\Common\ISession2D\ISession2D_ObjectOwner.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\ISession2D\ISession2D_Shape.cpp" > @@ -2061,10 +1739,6 @@ RelativePath="..\..\..\..\Common\ImportExport\ImportExport.h" > </File> - <File - RelativePath="..\..\..\..\Common\OCC_2dApp.h" - > - </File> <File RelativePath="..\..\..\..\Common\OCC_2dChildFrame.h" > @@ -2077,10 +1751,6 @@ RelativePath="..\..\..\..\Common\OCC_2dView.h" > </File> - <File - RelativePath="..\..\..\..\Common\OCC_3dApp.h" - > - </File> <File RelativePath="..\..\..\..\Common\OCC_3dBaseDoc.h" > @@ -2098,7 +1768,7 @@ > </File> <File - RelativePath="..\..\..\..\Common\OCC_BaseApp.h" + RelativePath="..\..\..\..\Common\OCC_App.h" > </File> <File @@ -2161,10 +1831,6 @@ <Filter Name="Primitive-headers" > - <File - RelativePath="..\..\..\..\Common\Primitive\Sample2D_Curve.h" - > - </File> <File RelativePath="..\..\..\..\Common\Primitive\Sample2D_Face.h" > @@ -2173,18 +1839,10 @@ RelativePath="..\..\..\..\Common\Primitive\Sample2D_Image.h" > </File> - <File - RelativePath="..\..\..\..\Common\Primitive\Sample2D_Line.h" - > - </File> <File RelativePath="..\..\..\..\Common\Primitive\Sample2D_Markers.h" > </File> - <File - RelativePath="..\..\..\..\Common\Primitive\Sample2D_Rectangle.h" - > - </File> <File RelativePath="..\..\..\..\Common\Primitive\Sample2D_Text.h" > @@ -2193,14 +1851,6 @@ <Filter Name="ISession2D-headers" > - <File - RelativePath="..\..\..\..\Common\ISession2D\ISession2D_InteractiveContext.h" - > - </File> - <File - RelativePath="..\..\..\..\Common\ISession2D\ISession2D_ObjectOwner.h" - > - </File> <File RelativePath="..\..\..\..\Common\ISession2D\ISession2D_Shape.h" > @@ -2246,5 +1896,9 @@ </Filter> </Files> <Globals> + <Global + Name="RESOURCE_FILE" + Value="\OS\OCC\occt\samples\mfc\standard\Common\res\OCC_Resource.rc" + /> </Globals> </VisualStudioProject> diff --git a/samples/mfc/standard/mfcsample/adm/win/vc9/mfcsample.vcproj b/samples/mfc/standard/mfcsample/adm/win/vc9/mfcsample.vcproj index e150c78124..9dfd4f56d5 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc9/mfcsample.vcproj +++ b/samples/mfc/standard/mfcsample/adm/win/vc9/mfcsample.vcproj @@ -81,7 +81,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib" OutputFile="../../../../win32\vc9\libd/mfcsample.dll" LinkIncremental="2" SuppressStartupBanner="true" @@ -178,7 +178,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib FWOSPlugin.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib" OutputFile="../../../../win64\vc9\libd/mfcsample.dll" LinkIncremental="2" SuppressStartupBanner="true" @@ -276,7 +276,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib" OutputFile="../../../../win32\vc9\lib/mfcsample.dll" LinkIncremental="1" SuppressStartupBanner="true" @@ -373,7 +373,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV2d.lib TKV3d.lib" + AdditionalDependencies="TKVrml.lib TKStl.lib TKBrep.lib TKIGES.lib TKShHealing.lib TKStep.lib TKXSBase.lib TKShapeSchema.lib PTKernel.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 TKPCAF.lib TKPrim.lib TKPShape.lib TKService.lib TKTopAlgo.lib TKMesh.lib TKV3d.lib" OutputFile="../../../../win64\vc9\lib/mfcsample.dll" LinkIncremental="1" SuppressStartupBanner="true" @@ -553,52 +553,6 @@ /> </FileConfiguration> </File> - <File - RelativePath="..\..\..\..\Common\OCC_2dApp.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\OCC_2dChildFrame.cpp" > @@ -737,52 +691,6 @@ /> </FileConfiguration> </File> - <File - RelativePath="..\..\..\..\Common\OCC_3dApp.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\OCC_3dBaseDoc.cpp" > @@ -968,7 +876,7 @@ </FileConfiguration> </File> <File - RelativePath="..\..\..\..\Common\OCC_BaseApp.cpp" + RelativePath="..\..\..\..\Common\OCC_App.cpp" > <FileConfiguration Name="Debug|Win32" @@ -1622,52 +1530,6 @@ Name="Primitive-src" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" > - <File - RelativePath="..\..\..\..\Common\Primitive\Sample2D_Curve.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\Primitive\Sample2D_Face.cpp" > @@ -1718,52 +1580,6 @@ RelativePath="..\..\..\..\Common\Primitive\Sample2D_Image.cpp" > </File> - <File - RelativePath="..\..\..\..\Common\Primitive\Sample2D_Line.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\Primitive\Sample2D_Markers.cpp" > @@ -1810,52 +1626,6 @@ /> </FileConfiguration> </File> - <File - RelativePath="..\..\..\..\Common\Primitive\Sample2D_Rectagle.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\Primitive\Sample2D_Text.cpp" > @@ -1906,98 +1676,6 @@ <Filter Name="ISession2D-src" > - <File - RelativePath="..\..\..\..\Common\ISession2D\ISession2D_InteractiveContext.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\..\..\..\Common\ISession2D\ISession2D_ObjectOwner.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|x64" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> <File RelativePath="..\..\..\..\Common\ISession2D\ISession2D_Shape.cpp" > @@ -2058,10 +1736,6 @@ RelativePath="..\..\..\..\Common\ImportExport\ImportExport.h" > </File> - <File - RelativePath="..\..\..\..\Common\OCC_2dApp.h" - > - </File> <File RelativePath="..\..\..\..\Common\OCC_2dChildFrame.h" > @@ -2074,10 +1748,6 @@ RelativePath="..\..\..\..\Common\OCC_2dView.h" > </File> - <File - RelativePath="..\..\..\..\Common\OCC_3dApp.h" - > - </File> <File RelativePath="..\..\..\..\Common\OCC_3dBaseDoc.h" > @@ -2095,7 +1765,7 @@ > </File> <File - RelativePath="..\..\..\..\Common\OCC_BaseApp.h" + RelativePath="..\..\..\..\Common\OCC_App.h" > </File> <File @@ -2158,10 +1828,6 @@ <Filter Name="Primitive-headers" > - <File - RelativePath="..\..\..\..\Common\Primitive\Sample2D_Curve.h" - > - </File> <File RelativePath="..\..\..\..\Common\Primitive\Sample2D_Face.h" > @@ -2170,18 +1836,10 @@ RelativePath="..\..\..\..\Common\Primitive\Sample2D_Image.h" > </File> - <File - RelativePath="..\..\..\..\Common\Primitive\Sample2D_Line.h" - > - </File> <File RelativePath="..\..\..\..\Common\Primitive\Sample2D_Markers.h" > </File> - <File - RelativePath="..\..\..\..\Common\Primitive\Sample2D_Rectangle.h" - > - </File> <File RelativePath="..\..\..\..\Common\Primitive\Sample2D_Text.h" > @@ -2190,14 +1848,6 @@ <Filter Name="ISession2D-headers" > - <File - RelativePath="..\..\..\..\Common\ISession2D\ISession2D_InteractiveContext.h" - > - </File> - <File - RelativePath="..\..\..\..\Common\ISession2D\ISession2D_ObjectOwner.h" - > - </File> <File RelativePath="..\..\..\..\Common\ISession2D\ISession2D_Shape.h" >