From 5c573e69d3932f82a57deccc14b41c334886685a Mon Sep 17 00:00:00 2001 From: ibs Date: Thu, 21 Nov 2013 13:44:27 +0400 Subject: [PATCH] 0024355: Compiler Warning level 4 for MFC samples Some warnings were removed from MFC samples All warnings of sample projects with warning level 4 were fixed on VC9 Warnings level increased to -W4 in projects of MFC samples; sample ReadMe files added to documentation Changes in Viewer2dDoc.cpp and OcafDoc.cpp were restored. Minor corrections in documentation --- dox/FILES.txt | 5 + dox/dev_guides/building/cmake/cmake.md | 48 ++- dox/overview/Overview.md | 5 + samples/CSharp/ReadMe.md | 3 +- .../01_Geometry/adm/win/vc10/Geometry.vcxproj | 8 +- .../01_Geometry/adm/win/vc11/Geometry.vcxproj | 8 +- .../01_Geometry/adm/win/vc8/Geometry.vcproj | 302 +++++++------- .../01_Geometry/adm/win/vc9/Geometry.vcproj | 8 +- .../standard/01_Geometry/src/GeomSources.cpp | 47 +-- .../standard/01_Geometry/src/GeomSources.h | 4 +- .../standard/01_Geometry/src/GeometryDoc.cpp | 365 +++++++++-------- .../standard/01_Geometry/src/GeometryView.cpp | 20 +- .../01_Geometry/src/GeometryView2D.cpp | 10 +- .../src/ISession2D/ISession2D_Curve.cpp | 8 +- .../src/ISession2D/ISession_Curve.cpp | 10 +- .../src/ISession2D/ISession_Direction.cpp | 29 +- .../src/ISession2D/ISession_Direction.h | 9 +- .../src/ISession2D/ISession_Point.cpp | 16 +- .../src/ISession2D/ISession_Point.h | 4 +- .../src/ISession2D/ISession_Surface.cpp | 10 +- .../src/ISession2D/ISession_Text.cpp | 14 +- .../02_Modeling/adm/win/vc10/Modeling.vcxproj | 8 +- .../02_Modeling/adm/win/vc11/Modeling.vcxproj | 8 +- .../02_Modeling/adm/win/vc8/Modeling.vcproj | 116 +++--- .../02_Modeling/adm/win/vc9/Modeling.vcproj | 8 +- .../02_Modeling/src/ISession_Direction.cpp | 10 +- .../02_Modeling/src/ISession_Direction.h | 4 +- .../standard/02_Modeling/src/ModelingDoc.cpp | 16 +- .../03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj | 8 +- .../03_Viewer2d/adm/win/vc11/Viewer2d.vcxproj | 8 +- .../03_Viewer2d/adm/win/vc8/Viewer2d.vcproj | 136 +++---- .../03_Viewer2d/adm/win/vc9/Viewer2d.vcproj | 8 +- .../standard/03_Viewer2d/src/Viewer2dDoc.cpp | 3 +- .../04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj | 8 +- .../04_Viewer3d/adm/win/vc11/Viewer3d.vcxproj | 8 +- .../04_Viewer3d/adm/win/vc8/Viewer3d.vcproj | 242 ++++++------ .../04_Viewer3d/adm/win/vc9/Viewer3d.vcproj | 8 +- .../04_Viewer3d/src/ISession_Curve.cpp | 10 +- .../standard/04_Viewer3d/src/OffsetDlg.cpp | 4 +- .../standard/04_Viewer3d/src/Viewer3dDoc.cpp | 87 ++-- .../standard/04_Viewer3d/src/Viewer3dView.cpp | 20 +- .../adm/win/vc10/ImportExport.vcxproj | 8 +- .../adm/win/vc11/ImportExport.vcxproj | 8 +- .../adm/win/vc8/ImportExport.vcproj | 136 +++---- .../adm/win/vc9/ImportExport.vcproj | 8 +- .../05_ImportExport/src/FSD_Archive.cxx | 4 +- .../06_Ocaf/adm/win/vc10/Ocaf.vcxproj | 8 +- .../06_Ocaf/adm/win/vc11/Ocaf.vcxproj | 8 +- .../standard/06_Ocaf/adm/win/vc8/Ocaf.vcproj | 216 +++++----- .../standard/06_Ocaf/adm/win/vc9/Ocaf.vcproj | 8 +- samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp | 45 ++- .../06_Ocaf/src/TOcafFunction_BoxDriver.cxx | 2 +- .../06_Ocaf/src/TOcafFunction_CutDriver.cxx | 2 +- .../06_Ocaf/src/TOcafFunction_CylDriver.cxx | 2 +- .../adm/win/vc10/Triangulation.vcxproj | 8 +- .../adm/win/vc11/Triangulation.vcxproj | 8 +- .../adm/win/vc8/Triangulation.vcproj | 112 +++--- .../adm/win/vc9/Triangulation.vcproj | 8 +- .../07_Triangulation/src/ISession_Curve.cpp | 10 +- .../src/Tesselate_Presentation.cpp | 4 +- .../07_Triangulation/src/TriangulationDoc.cpp | 4 +- .../standard/08_HLR/adm/win/vc10/HLR.vcxproj | 8 +- .../standard/08_HLR/adm/win/vc11/HLR.vcxproj | 8 +- .../standard/08_HLR/adm/win/vc8/HLR.vcproj | 172 ++++---- .../standard/08_HLR/adm/win/vc9/HLR.vcproj | 8 +- samples/mfc/standard/08_HLR/src/HLRView2D.cpp | 28 +- .../adm/win/vc10/Animation.vcxproj | 8 +- .../adm/win/vc11/Animation.vcxproj | 8 +- .../09_Animation/adm/win/vc8/Animation.vcproj | 166 ++++---- .../09_Animation/adm/win/vc9/Animation.vcproj | 8 +- .../09_Animation/src/AnimationDoc.cpp | 20 +- .../09_Animation/src/AnimationView3D.cpp | 20 +- .../mfc/standard/09_Animation/src/Fonc.cxx | 8 +- .../10_Convert/adm/win/vc10/Convert.vcxproj | 8 +- .../10_Convert/adm/win/vc11/Convert.vcxproj | 8 +- .../10_Convert/adm/win/vc8/Convert.vcproj | 202 +++++----- .../10_Convert/adm/win/vc9/Convert.vcproj | 8 +- .../src/ISession/ISession_Curve.cpp | 10 +- .../10_Convert/src/WNT/OCCDemoView.cpp | 8 +- samples/mfc/standard/Common/DimensionDlg.cpp | 8 +- .../Common/ISession2D/ISession2D_Shape.cpp | 10 +- .../Common/ISession2D/ISession2D_Shape.h | 30 +- .../Common/ImportExport/ImportExport.cpp | 54 +-- samples/mfc/standard/Common/OCC_2dView.cpp | 30 +- samples/mfc/standard/Common/OCC_3dBaseDoc.cpp | 20 +- samples/mfc/standard/Common/OCC_3dDoc.cpp | 10 +- samples/mfc/standard/Common/OCC_3dView.cpp | 31 +- samples/mfc/standard/Common/OCC_BaseDoc.h | 58 +-- .../Common/Primitive/Sample2D_Face.cpp | 6 +- .../Common/Primitive/Sample2D_Markers.cpp | 6 +- .../Common/Primitive/Sample2D_Markers.h | 12 +- .../Common/Primitive/Sample2D_Text.cpp | 6 +- .../standard/Common/Primitive/Sample2D_Text.h | 4 +- samples/mfc/standard/Common/ResultDialog.cpp | 4 +- samples/mfc/standard/Common/ResultDialog.h | 4 +- samples/mfc/standard/Common/User_Cylinder.cxx | 6 +- .../mfc/standard/{readme.txt => ReadMe.md} | 26 +- .../mfcsample/adm/win/vc10/mfcsample.vcxproj | 8 +- .../mfcsample/adm/win/vc11/mfcsample.vcxproj | 8 +- .../mfcsample/adm/win/vc8/mfcsample.vcproj | 374 +++++++++--------- .../mfcsample/adm/win/vc9/mfcsample.vcproj | 8 +- .../mfc/standard/mfcsample/src/mfcsample.cpp | 2 +- 102 files changed, 1848 insertions(+), 1845 deletions(-) rename samples/mfc/standard/{readme.txt => ReadMe.md} (58%) mode change 100755 => 100644 diff --git a/dox/FILES.txt b/dox/FILES.txt index 77dd56c171..2b3d9ccfc6 100644 --- a/dox/FILES.txt +++ b/dox/FILES.txt @@ -6,7 +6,12 @@ # in the generated documentation. overview/overview.md + +../samples/mfc/standard/ReadMe.md +../samples/CSharp/ReadMe.md + tutorial/tutorial.md + technical_overview/technical_overview.md user_guides/user_guides.md diff --git a/dox/dev_guides/building/cmake/cmake.md b/dox/dev_guides/building/cmake/cmake.md index dba6939719..98fb625db5 100644 --- a/dox/dev_guides/building/cmake/cmake.md +++ b/dox/dev_guides/building/cmake/cmake.md @@ -77,19 +77,26 @@ The error message which appears at the end of configuration process, informs you which need to be defined. This error will appear until all required variables are defined correctly. Note: In cmake-gui there is "grouped" option, which groups variables with a common prefix. -###The variables with BUILD_ prefix: +### Selection of components to be built -* BUILD_TYPE - defines build configuration of the future project (Release by default) -* BUILD_ - allows including the toolkit set of the specified module to the future project or excluding it from the project. -* BUILD_TOOLKITS - allows including specific OCCT toolkits (list of items separated by a space or a semicolon) to the common set of the future project. -* BUILD_SAMPLES - allows including MFC samples (for visual studio only) to the common set of the future project. - In install folder there will be samples.bat script to execute specific sample. - List of samples is being shown by sample.bat without arguments. +The variables with "BUILD_" prefix allow specifying OCCT components and +configuration to be built: -###The variables with USE_ prefix (3rd-party libraries): +* BUILD_CONFIGURATION - defines configuration to be built (Release by default). +* BUILD_ - specify whether corresponding OCCT module should be + built (all toolkits). Note that even if whole module is not + selected for build, its toolkits used by other toolkits + selected for build will be included automatically. +* BUILD_TOOLKITS - allows including additional toolkits from non-selected + modules (should be list of toolkit names separated by a + space or a semicolon). +* BUILD_SAMPLES - specify whether OCCT MFC samples should be built. -Check USE_\ variable (USE_FREEIMAGE, USE_GL2PS, USE_TBB and USE_OPENCL) -if you want to use this 3rd-party product. +Check variables with "USE_" prefix (USE_FREEIMAGE, USE_GL2PS, USE_TBB, and +USE_OPENCL) if you want to enable use of the corresponding optional 3rd-party +library. + +### 3rd-party configuration ### 3rd-party configuration (The variables with 3RDPARTY_ prefix) @@ -100,9 +107,8 @@ At the next configuration 3rd-party product paths stored in 3RDPARTY_\ will be searched for in 3RDPARTY_DIR directory. If the structure of 3RDPARTY_DIR directory is the same as adopted in the OCCT, the directory will contain product dir, lib and header files. - **Press "Configure" ("c" key for ccmake)** +Press "Configure" ("c" key for ccmake). -Important: The names of searched libraries and header files are hardcoded. The result of the 3rdparty product search will be recorded in the corresponding variables: * 3RDPARTY_\_DIR - path to the product directory (with directory name) (e.g., D:/3rdparty/Tcl-8.5.12.0-32) @@ -112,20 +118,23 @@ The result of the 3rdparty product search will be recorded in the corresponding The search process is as follows: - - 1 level:. 3RDPARTY_DIR - - 2 level: 3RDPARTY_\_DIR\ - - 3 level: 3RDPARTY_\_LIBRARY - - 3 level: 3RDPARTY_\_INCLUDE - - 3 level: 3RDPARTY_\_DLL +1. Common path: 3RDPARTY_DIR +2. Path to particular 3rd-party library: 3RDPARTY_\_DIR +3. Paths to headers and binaries: + 1. 3RDPARTY_\_INCLUDE + 2. 3RDPARTY_\_LIBRARY + 3. 3RDPARTY_\_DLL If a variable of any level is not defined (empty or \-NOTFOUND) and the upper level variable is defined, the content of the non-defined variable will be searched for at the next configuration step. If search process in level 3 does not find the required files, it searches in default places also. -*Note*: Freetype search process tries to find ft2build.h file in 3RDPARTY_FREETYPE INCLUDE dir +**Note**: the names of searched libraries and header files are hardcoded. +Freetype search process tries to find ft2build.h file in 3RDPARTY_FREETYPE INCLUDE dir and after that adds "3RDPARTY_FREETYPE_INCLUDE /freetype2" path to common includes if it exists. -Important: If BUILD_TYPE or BITNESS variable is changed - at the next configuration + +Important: If BUILD_CONFIGURATION variable is changed - at the next configuration 3RDPARTY_ variables will be replaced by the search process result, except for the 3RDPARTY_DIR variable. *Note*: CMake will produce an error after the configuration step until all required variables are defined correctly. @@ -133,6 +142,7 @@ If the search result (include path, or library path, or dll path) does not meet you can change 3RDPARTY_\_DIR variable, clear (if they are not empty) 3RDPARTY_\_DLL, 3RDPARTY_\_INCLUDE_DIR and 3RDPARTY_\_LIBRARY variables (or clear one of them) and run the configuration process again. + At this time the search will be performed in the new identified directory and the result will be recorded to empty variables (non-empty variables will not be replaced). diff --git a/dox/overview/Overview.md b/dox/overview/Overview.md index 02313c8f3f..03299fb2e6 100644 --- a/dox/overview/Overview.md +++ b/dox/overview/Overview.md @@ -531,6 +531,8 @@ The list of MFC samples: * To start a sample use Open CASCADE Technology\\Samples\\Mfc\\ item of the Start\\Programs menu; * Read carefully readme.txt to learn about launching and compilation options. +See \subpage samples_mfc_standard "Readme" for details. + @subsubsection OCCT_OVW_SECTION_7_3_2 Qt OCCT contains three samples based on Qt application framework @@ -592,3 +594,6 @@ Export: * Step * Stl * Vrml + +See \subpage samples_csharp "Readme" for details. + diff --git a/samples/CSharp/ReadMe.md b/samples/CSharp/ReadMe.md index 62f2963d9a..4b4b427feb 100644 --- a/samples/CSharp/ReadMe.md +++ b/samples/CSharp/ReadMe.md @@ -1,4 +1,5 @@ -#### OCCT CSharp sample +OCCT CSharp sample {#samples_csharp} +================== This sample demonstrates simple way of using OCCT libraries in .Net application whitten using CSharp and Windows Forms or Windows Presentation Foundation (WPF). 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 cc9b5a3c3a..44211a6209 100644 --- a/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj +++ b/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj @@ -103,7 +103,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -146,7 +146,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -188,7 +188,7 @@ .\win32\objd/ .\win32\objd/ true - Level3 + Level4 true EditAndContinue Default @@ -232,7 +232,7 @@ .\win64\objd/ .\win64\objd/ true - Level3 + Level4 true ProgramDatabase Default 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 278cff3013..3c7a23c49f 100644 --- a/samples/mfc/standard/01_Geometry/adm/win/vc11/Geometry.vcxproj +++ b/samples/mfc/standard/01_Geometry/adm/win/vc11/Geometry.vcxproj @@ -107,7 +107,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -150,7 +150,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -192,7 +192,7 @@ .\win32\objd/ .\win32\objd/ true - Level3 + Level4 true EditAndContinue Default @@ -236,7 +236,7 @@ .\win64\objd/ .\win64\objd/ true - Level3 + Level4 true ProgramDatabase Default 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 e6c1f401aa..9cec6e1520 100644 --- a/samples/mfc/standard/01_Geometry/adm/win/vc8/Geometry.vcproj +++ b/samples/mfc/standard/01_Geometry/adm/win/vc8/Geometry.vcproj @@ -64,7 +64,7 @@ AssemblerListingLocation=".\win32\obj/" ObjectFile=".\win32\obj/" ProgramDataBaseFileName=".\win32\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -117,9 +117,9 @@ /> @@ -162,7 +162,7 @@ AssemblerListingLocation=".\win64\obj/" ObjectFile=".\win64\obj/" ProgramDataBaseFileName=".\win64\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -258,7 +258,7 @@ ObjectFile=".\win32\objd/" ProgramDataBaseFileName=".\win32\objd/" BrowseInformation="1" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="4" CompileAs="0" @@ -356,7 +356,7 @@ ObjectFile=".\win64\objd/" ProgramDataBaseFileName=".\win64\objd/" BrowseInformation="1" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" diff --git a/samples/mfc/standard/01_Geometry/src/GeomSources.cpp b/samples/mfc/standard/01_Geometry/src/GeomSources.cpp index b5da460b14..a3f333b042 100755 --- a/samples/mfc/standard/01_Geometry/src/GeomSources.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeomSources.cpp @@ -99,12 +99,12 @@ void GeomSources::PostProcess(CGeometryDoc* aDoc, aDoc->SetTitle(Title); } -void GeomSources::AddSeparator(CGeometryDoc* aDoc,TCollection_AsciiString& aMessage) +void GeomSources::AddSeparator(CGeometryDoc* /*aDoc*/,TCollection_AsciiString& aMessage) { aMessage+= "------------------------------------------------------------------------\n"; } void GeomSources::DisplayPoint(CGeometryDoc* aDoc, - gp_Pnt2d& aPoint, + const gp_Pnt2d& aPoint, const char* aText, Standard_Boolean UpdateViewer, Standard_Real anXoffset, @@ -119,7 +119,7 @@ void GeomSources::DisplayPoint(CGeometryDoc* aDoc, } void GeomSources::DisplayPoint(CGeometryDoc* aDoc, - gp_Pnt& aPoint, + const gp_Pnt& aPoint, const char* aText, Standard_Boolean UpdateViewer, Standard_Real anXoffset, @@ -224,9 +224,10 @@ Standard_Real result = A.DotCross(B,C); \n\ \n"); 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); + DisplayPoint(aDoc,gp_Pnt(C),"C (3,2,3)",false,0.1); // to add a numeric value in a TCollectionAsciiString TCollection_AsciiString Message2 (result); @@ -709,7 +710,7 @@ void GeomSources::gpTest10(CGeometryDoc* aDoc) for(;count<=N;count++) { C->D0(UA.Parameter(count),P); - Standard_Real Parameter = UA.Parameter(count); + //Standard_Real Parameter = UA.Parameter(count); // append P in a Sequence aSequence.Append(P); } @@ -1308,10 +1309,10 @@ gp_Dir A2YDirection = A2.YDirection() ; \n\ aDoc->GetAISContext()->Display(aDirection, Standard_False); Handle(ISession_Direction) aDirection2 = new ISession_Direction(P1,AXDirection,2); - aDirection2->SetText(TCollection_ExtendedString("A.XDirection")); + aDirection2->SetText("A.XDirection"); aDoc->GetAISContext()->Display(aDirection2, Standard_False); Handle(ISession_Direction) aDirection3 = new ISession_Direction(P1,AYDirection,2); - aDirection3->SetText(TCollection_ExtendedString("A.YDirection")); + aDirection3->SetText("A.YDirection"); aDoc->GetAISContext()->Display(aDirection3, Standard_False); DisplayPoint(aDoc,P2,"P2",false,0.1); @@ -1319,10 +1320,10 @@ gp_Dir A2YDirection = A2.YDirection() ; \n\ aDoc->GetAISContext()->Display(aDirection4, Standard_False); Handle(ISession_Direction) aDirection5 = new ISession_Direction(P2,A2XDirection,2); - aDirection5->SetText(TCollection_ExtendedString("A2 XDirection")); + aDirection5->SetText("A2 XDirection"); aDoc->GetAISContext()->Display(aDirection5, Standard_False); Handle(ISession_Direction) aDirection6 = new ISession_Direction(P2,A2YDirection,2); - aDirection6->SetText(TCollection_ExtendedString("A2 YDirection")); + aDirection6->SetText("A2 YDirection"); aDoc->GetAISContext()->Display(aDirection6, Standard_False); Message += "IsDirectA = "; @@ -1703,19 +1704,13 @@ gp_Ax2d C2DCircleXAxis = C2DCircle->XAxis(); \n\ DisplayCurve(aDoc,C3D,false); DisplayCurve(aDoc,C2D,5,false); - Handle(ISession_Direction) aC3DCircleXAxisDirection = new ISession_Direction((gp_Pnt)C3DCircleXAxis.Location(), - (gp_Dir)C3DCircleXAxis.Direction(), - 5.2); + Handle(ISession_Direction) aC3DCircleXAxisDirection = new ISession_Direction(C3DCircleXAxis.Location(),C3DCircleXAxis.Direction(),5.2); aDoc->GetAISContext()->Display(aC3DCircleXAxisDirection, Standard_False); - Handle(ISession_Direction) acirc2dXAxisDirection = new ISession_Direction((gp_Pnt2d)circ2dXAxis.Location(), - (gp_Dir2d)circ2dXAxis.Direction(), - 5.2); + Handle(ISession_Direction) acirc2dXAxisDirection = new ISession_Direction(circ2dXAxis.Location(),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); + Handle(ISession_Direction) aC2DCircleXAxisDirection = new ISession_Direction(C2DCircleXAxis.Location(),C2DCircleXAxis.Direction(),5.2); aDoc->GetISessionContext()->Display(aC2DCircleXAxisDirection, Standard_False); PostProcess(aDoc,ID_BUTTON_Test_24,TheDisplayType,Message.ToCString()); @@ -2149,7 +2144,7 @@ void GeomSources::gpTest30(CGeometryDoc* aDoc) gp_Circ2d C = gce_MakeCirc2d (P1,P2,P3); GccEnt_QualifiedCirc QC = GccEnt::Outside(C); GccAna_Lin2d2Tan LT (QC,P4,Precision::Confusion()); - Standard_Integer NbSol; + Standard_Integer NbSol = 0; if (LT.IsDone()) { NbSol = LT.NbSolutions(); @@ -2601,8 +2596,8 @@ void GeomSources::gpTest35(CGeometryDoc* aDoc) GeomAPI_IntCS CS (aCurve,aSurface); Handle(Geom_Curve) segment; - Standard_Integer NbSeg; - Standard_Integer NbPoints; + Standard_Integer NbSeg = 0; + Standard_Integer NbPoints = 0; if(CS.IsDone()) { NbSeg = CS.NbSegments(); @@ -3782,7 +3777,7 @@ void GeomSources::gpTest47(CGeometryDoc* aDoc) GeomAPI_PointsToBSplineSurface(array3).Surface(); GeomAPI_ExtremaSurfaceSurface ESS(aSurf1,aSurf2); - Quantity_Length dist = ESS.LowerDistance(); + //Quantity_Length dist = ESS.LowerDistance(); gp_Pnt P1,P2; ESS.NearestPoints(P1,P2); @@ -3952,10 +3947,10 @@ aSPL2Box.Get( aSPL2Xmin, aSPL2Ymin, aSPL2Xmax,aSPL2Ymax); \n\ 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(aSPL1Xmin,aSPL1Ymax),Standard_CString("aSPL2Xmin,aSPL2Ymax")); + DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmax,aSPL1Ymax),Standard_CString("aSPL2Xmax,aSPL2Ymax")); + DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmin,aSPL1Ymin),Standard_CString("aSPL2Xmin,aSPL2Ymin")); + DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmax,aSPL1Ymin),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 diff --git a/samples/mfc/standard/01_Geometry/src/GeomSources.h b/samples/mfc/standard/01_Geometry/src/GeomSources.h index fd1fce10af..cd32e2837b 100755 --- a/samples/mfc/standard/01_Geometry/src/GeomSources.h +++ b/samples/mfc/standard/01_Geometry/src/GeomSources.h @@ -79,14 +79,14 @@ private: 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 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 gp_Pnt& aPoint, const char* aText, Standard_Boolean UpdateViewer = Standard_False, Standard_Real anXoffset = 0, diff --git a/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp b/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp index a5c5e994e6..0376c6bfc8 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp @@ -243,10 +243,10 @@ void CGeometryDoc::Dump(CDumpContext& dc) const //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryDoc::DragEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState , - const Handle(V3d_View)& aView ) +void CGeometryDoc::DragEvent2D(const Standard_Integer /*x*/, + const Standard_Integer /*y*/, + const Standard_Integer /*TheState*/, + const Handle(V3d_View)& /*aView*/) { } @@ -254,9 +254,9 @@ void CGeometryDoc::DragEvent2D(const Standard_Integer x , //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryDoc::InputEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Handle(V3d_View)& aView ) +void CGeometryDoc::InputEvent2D(const Standard_Integer /*x*/, + const Standard_Integer /*y*/, + const Handle(V3d_View)& /*aView*/) { myAISContext2D->Select(Standard_True); } @@ -264,9 +264,9 @@ void CGeometryDoc::InputEvent2D(const Standard_Integer x , //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryDoc::MoveEvent2D(const Standard_Integer x, - const Standard_Integer y, - const Handle(V3d_View)& aView) +void CGeometryDoc::MoveEvent2D(const Standard_Integer x, + const Standard_Integer y, + const Handle(V3d_View)& aView) { if(aView->Viewer()->Grid()->IsActive()) { @@ -281,19 +281,19 @@ void CGeometryDoc::MoveEvent2D(const Standard_Integer x, //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryDoc::ShiftMoveEvent2D(const Standard_Integer x, - const Standard_Integer y , - const Handle(V3d_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(V3d_View)& aView) +void CGeometryDoc::ShiftDragEvent2D(const Standard_Integer /*x*/, + const Standard_Integer /*y*/, + const Standard_Integer /*TheState*/, + const Handle(V3d_View)& /*aView*/) { } @@ -301,18 +301,18 @@ void CGeometryDoc::ShiftDragEvent2D(const Standard_Integer x, //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryDoc::ShiftInputEvent2D(const Standard_Integer x, - const Standard_Integer y, - const Handle(V3d_View)& aView) +void CGeometryDoc::ShiftInputEvent2D(const Standard_Integer /*x*/, + const Standard_Integer /*y*/, + const Handle(V3d_View)& /*aView*/) { } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryDoc::Popup2D(const Standard_Integer x, - const Standard_Integer y , - const Handle(V3d_View)& aView) +void CGeometryDoc::Popup2D(const Standard_Integer x, + const Standard_Integer y, + const Handle(V3d_View)& aView) { CMenu menu; VERIFY(menu.LoadMenu(IDR_Popup3D)); @@ -1129,7 +1129,7 @@ void CGeometryDoc::OnSimplify() if (!isRead) { Path += " was not found. The sample can not be shown."; - myCResultDialog.SetText((CString)Path.ToCString()); + myCResultDialog.SetText(Path.ToCString()); return; } myAISContext->SetDisplayMode(AIS_Shaded); @@ -1138,165 +1138,164 @@ void CGeometryDoc::OnSimplify() void CGeometryDoc::simplify(const TopoDS_Shape& aShape) { - myCResultDialog.SetTitle(CString("Simplify Face")); - myCResultDialog.SetText((CString) - " TopoDS_Shape aShape;" EOL - "" EOL - " // initialize aShape" EOL - " //aShape = ..." EOL - "" EOL - " // define parameter triangulation" EOL - " Standard_Real aDeflection = 0.1;" EOL - " " EOL - " // removes all the triangulations of the faces ," EOL - " //and all the polygons on the triangulations of the edges" EOL - " BRepTools::Clean(aShape);" EOL - " // adds a triangulation of the shape aShape with the deflection aDeflection" EOL - " BRepMesh::Mesh(aShape,aDeflection);" EOL - "" EOL - " Standard_Integer aIndex = 1, nbNodes = 0;" EOL - " " EOL - " // define two sequence of points" EOL - " TColgp_SequenceOfPnt aPoints, aPoints1;" EOL - " " EOL - " // triangulation" EOL - " for(TopExp_Explorer aExpFace(aShape,TopAbs_FACE); aExpFace.More(); aExpFace.Next())" EOL - " { " EOL - " TopoDS_Face aFace = TopoDS::Face(aExpFace.Current());" EOL - " TopLoc_Location aLocation;" EOL - "" EOL - " // takes the triangulation of the face aFace" EOL - " Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);" EOL - "" EOL - " if(!aTr.IsNull())" EOL - " { " EOL - " // takes the array of nodes for this triangulation" EOL - " const TColgp_Array1OfPnt& aNodes = aTr->Nodes(); " EOL - " nbNodes = aNodes.Length();" EOL - "" EOL - " for( Standard_Integer i = 1; i <= nbNodes; i++)" EOL - " {" EOL - " // create seguence of node points in absolute coordinate system" EOL - " gp_Pnt aPnt = aNodes(i).Transformed(aLocation);" EOL - " aPoints.Append(aPnt);" EOL - " " EOL - " }" EOL - " }" EOL - " }" EOL - " " EOL - " // remove double points" EOL - " nbNodes = aPoints.Length();" EOL - " for( Standard_Integer i = 1; i <= nbNodes; i++)" EOL - " {" EOL - " gp_Pnt aPi = aPoints(i);" EOL - " for( Standard_Integer j = i + 1; j < nbNodes; j++)" EOL - " {" EOL - " gp_Pnt aPj = aPoints(j);" EOL - " if(!aPi.IsEqual(aPj,0.9))" EOL - " aIndex++;" EOL - " }" EOL - " if(aIndex == j - 1)" EOL - " aPoints1.Append(aPi);" EOL - "" EOL - " aIndex = i + 1;" EOL - " }" EOL - "" EOL - " // find max point" EOL - " aIndex = 0;" EOL - " gp_Pnt aPntMax = aPoints1(1);" EOL - " nbNodes = aPoints1.Length();" EOL - " for(i = 2; i <= nbNodes; i++)" EOL - " {" EOL - " if(aPoints1(i).X() > aPntMax.X())" EOL - " {" EOL - " aIndex = i;" EOL - " aPntMax = aPoints1(aIndex); " EOL - " } " EOL - " }" EOL - "" EOL - " // clear seguence" EOL - " aPoints.Clear();" EOL - "" EOL - " Standard_Integer nbLeftNodes = nbNodes;" EOL - "" EOL - " // ascending sort - fill aPoints with ascending " EOL - " // by X coordinate points from aPoints1" EOL - " for(i = 1; i < nbNodes; i++)" EOL - " {" EOL - " Standard_Real aMin = aPntMax.X();" EOL - " aIndex = 1;" EOL - " for( Standard_Integer j = 1; j <= nbLeftNodes; j++)" EOL - " {" EOL - " if(aPoints1(j).X() < aMin)" EOL - " {" EOL - " aMin = aPoints1(j).X();" EOL - " aIndex = j;" EOL - " } " EOL - " }" EOL - " aPoints.Append(aPoints1(aIndex));" EOL - " aPoints1.Remove(aIndex);" EOL - " nbLeftNodes = aPoints1.Length();" EOL - " }" EOL - " aPoints.Append(aPntMax);" EOL - "" EOL - " // define parameters GeomPlate_BuildPlateSurface" EOL - " Standard_Integer Degree = 3;" EOL - " Standard_Integer NbPtsOnCur = 10;" EOL - " Standard_Integer NbIter = 3;" EOL - " Standard_Integer Order = 0;" EOL - " Standard_Integer MaxSeg = 9;" EOL - " Standard_Integer MaxDegree = 5;" EOL - " Standard_Real dmax, anApproxTol = 0.001;" EOL - " Standard_Real aConstrTol = Precision::Confusion();" EOL - " " EOL - " // define object BuildPlateSurface" EOL - " GeomPlate_BuildPlateSurface BPSurf(Degree,NbPtsOnCur,NbIter);" EOL - " " EOL - " // add point constraints to GeomPlate_BuildPlateSurface object" EOL - " nbNodes = aPoints.Length();" EOL - " for (i = 1; i <= nbNodes; i++)" EOL - " BPSurf.Add(new GeomPlate_PointConstraint(aPoints(i), Order, aConstrTol));" EOL - "" EOL - " BPSurf.Perform();" EOL - "" EOL - " // make PlateSurface" EOL - " Handle(GeomPlate_Surface) PSurf;" EOL - " Handle(Geom_Surface) aSurf;" EOL - " " EOL - " if (BPSurf.IsDone())" EOL - " {" EOL - " PSurf = BPSurf.Surface();" EOL - "" EOL - " // define parameter approximation" EOL - " dmax = Max(0.01,10*BPSurf.G0Error());" EOL - "" EOL - " // make approximation" EOL - " GeomPlate_MakeApprox Mapp(PSurf,anApproxTol, MaxSeg,MaxDegree,dmax);" EOL - " aSurf = Mapp.Surface();" EOL - " }" EOL - " else " EOL - " return;" EOL - "" EOL - " ShapeAnalysis_FreeBounds aFreeBounds(aShape, Standard_False, Standard_True);" EOL - " TopoDS_Compound aClosedWires = aFreeBounds.GetClosedWires();" EOL - " TopTools_IndexedMapOfShape aWires;" EOL - " TopExp::MapShapes(aClosedWires, TopAbs_WIRE, aWires);" EOL - " TopoDS_Wire aWire;" EOL - " Standard_Integer nbWires = aWires.Extent();" EOL - " if (nbWires) " EOL - " aWire = TopoDS::Wire(aWires(1));" EOL - " else " EOL - " return;" EOL - "" EOL - " BRep_Builder B;" EOL - " TopoDS_Face aFace;" EOL - " B.MakeFace(aFace, aSurf, Precision::Confusion());" EOL - " B.Add(aFace, aWire);" EOL - " Handle_ShapeFix_Shape sfs = new ShapeFix_Shape(aFace);" EOL - " sfs->Perform();" EOL - " TopoDS_Shape aFixedFace = sfs->Shape();" EOL - " if (aFixedFace.IsNull()) " EOL - " return;" EOL); + myCResultDialog.SetTitle("Simplify Face"); + myCResultDialog.SetText(" TopoDS_Shape aShape;\n" + "\n" + " // initialize aShape\n" + " //aShape = ...\n" + "\n" + " // define parameter triangulation\n" + " Standard_Real aDeflection = 0.1;\n" + " \n" + " // removes all the triangulations of the faces ,\n" + " //and all the polygons on the triangulations of the edges\n" + " BRepTools::Clean(aShape);\n" + " // adds a triangulation of the shape aShape with the deflection aDeflection\n" + " BRepMesh::Mesh(aShape,aDeflection);\n" + "\n" + " Standard_Integer aIndex = 1, nbNodes = 0;\n" + " \n" + " // define two sequence of points\n" + " TColgp_SequenceOfPnt aPoints, aPoints1;\n" + " \n" + " // triangulation\n" + " for(TopExp_Explorer aExpFace(aShape,TopAbs_FACE); aExpFace.More(); aExpFace.Next())\n" + " { \n" + " TopoDS_Face aFace = TopoDS::Face(aExpFace.Current());\n" + " TopLoc_Location aLocation;\n" + "\n" + " // takes the triangulation of the face aFace\n" + " Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);\n" + "\n" + " if(!aTr.IsNull())\n" + " { \n" + " // takes the array of nodes for this triangulation\n" + " const TColgp_Array1OfPnt& aNodes = aTr->Nodes(); \n" + " nbNodes = aNodes.Length();\n" + "\n" + " for( Standard_Integer i = 1; i <= nbNodes; i++)\n" + " {\n" + " // create seguence of node points in absolute coordinate system\n" + " gp_Pnt aPnt = aNodes(i).Transformed(aLocation);\n" + " aPoints.Append(aPnt);\n" + " \n" + " }\n" + " }\n" + " }\n" + " \n" + " // remove double points\n" + " nbNodes = aPoints.Length();\n" + " for( Standard_Integer i = 1; i <= nbNodes; i++)\n" + " {\n" + " gp_Pnt aPi = aPoints(i);\n" + " for( Standard_Integer j = i + 1; j < nbNodes; j++)\n" + " {\n" + " gp_Pnt aPj = aPoints(j);\n" + " if(!aPi.IsEqual(aPj,0.9))\n" + " aIndex++;\n" + " }\n" + " if(aIndex == j - 1)\n" + " aPoints1.Append(aPi);\n" + "\n" + " aIndex = i + 1;\n" + " }\n" + "\n" + " // find max point\n" + " aIndex = 0;\n" + " gp_Pnt aPntMax = aPoints1(1);\n" + " nbNodes = aPoints1.Length();\n" + " for(i = 2; i <= nbNodes; i++)\n" + " {\n" + " if(aPoints1(i).X() > aPntMax.X())\n" + " {\n" + " aIndex = i;\n" + " aPntMax = aPoints1(aIndex); \n" + " } \n" + " }\n" + "\n" + " // clear seguence\n" + " aPoints.Clear();\n" + "\n" + " Standard_Integer nbLeftNodes = nbNodes;\n" + "\n" + " // ascending sort - fill aPoints with ascending \n" + " // by X coordinate points from aPoints1\n" + " for(i = 1; i < nbNodes; i++)\n" + " {\n" + " Standard_Real aMin = aPntMax.X();\n" + " aIndex = 1;\n" + " for( Standard_Integer j = 1; j <= nbLeftNodes; j++)\n" + " {\n" + " if(aPoints1(j).X() < aMin)\n" + " {\n" + " aMin = aPoints1(j).X();\n" + " aIndex = j;\n" + " } \n" + " }\n" + " aPoints.Append(aPoints1(aIndex));\n" + " aPoints1.Remove(aIndex);\n" + " nbLeftNodes = aPoints1.Length();\n" + " }\n" + " aPoints.Append(aPntMax);\n" + "\n" + " // define parameters GeomPlate_BuildPlateSurface\n" + " Standard_Integer Degree = 3;\n" + " Standard_Integer NbPtsOnCur = 10;\n" + " Standard_Integer NbIter = 3;\n" + " Standard_Integer Order = 0;\n" + " Standard_Integer MaxSeg = 9;\n" + " Standard_Integer MaxDegree = 5;\n" + " Standard_Real dmax, anApproxTol = 0.001;\n" + " Standard_Real aConstrTol = Precision::Confusion();\n" + " \n" + " // define object BuildPlateSurface\n" + " GeomPlate_BuildPlateSurface BPSurf(Degree,NbPtsOnCur,NbIter);\n" + " \n" + " // add point constraints to GeomPlate_BuildPlateSurface object\n" + " nbNodes = aPoints.Length();\n" + " for (i = 1; i <= nbNodes; i++)\n" + " BPSurf.Add(new GeomPlate_PointConstraint(aPoints(i), Order, aConstrTol));\n" + "\n" + " BPSurf.Perform();\n" + "\n" + " // make PlateSurface\n" + " Handle(GeomPlate_Surface) PSurf;\n" + " Handle(Geom_Surface) aSurf;\n" + " \n" + " if (BPSurf.IsDone())\n" + " {\n" + " PSurf = BPSurf.Surface();\n" + "\n" + " // define parameter approximation\n" + " dmax = Max(0.01,10*BPSurf.G0Error());\n" + "\n" + " // make approximation\n" + " GeomPlate_MakeApprox Mapp(PSurf,anApproxTol, MaxSeg,MaxDegree,dmax);\n" + " aSurf = Mapp.Surface();\n" + " }\n" + " else \n" + " return;\n" + "\n" + " ShapeAnalysis_FreeBounds aFreeBounds(aShape, Standard_False, Standard_True);\n" + " TopoDS_Compound aClosedWires = aFreeBounds.GetClosedWires();\n" + " TopTools_IndexedMapOfShape aWires;\n" + " TopExp::MapShapes(aClosedWires, TopAbs_WIRE, aWires);\n" + " TopoDS_Wire aWire;\n" + " Standard_Integer nbWires = aWires.Extent();\n" + " if (nbWires) \n" + " aWire = TopoDS::Wire(aWires(1));\n" + " else \n" + " return;\n" + "\n" + " BRep_Builder B;\n" + " TopoDS_Face aFace;\n" + " B.MakeFace(aFace, aSurf, Precision::Confusion());\n" + " B.Add(aFace, aWire);\n" + " Handle_ShapeFix_Shape sfs = new ShapeFix_Shape(aFace);\n" + " sfs->Perform();\n" + " TopoDS_Shape aFixedFace = sfs->Shape();\n" + " if (aFixedFace.IsNull()) \n" + " return;\n"); // define parameter triangulation Standard_Real aDeflection = 0.1; diff --git a/samples/mfc/standard/01_Geometry/src/GeometryView.cpp b/samples/mfc/standard/01_Geometry/src/GeometryView.cpp index 3e8de8db1a..4232cefd24 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryView.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeometryView.cpp @@ -98,7 +98,7 @@ void CGeometryView::OnFileExportImage() SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); } -void CGeometryView::OnSize(UINT nType, int cx, int cy) +void CGeometryView::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/) { if (!myView.IsNull()) myView->MustBeResized(); @@ -213,7 +213,7 @@ void CGeometryView::OnLButtonUp(UINT nFlags, CPoint point) } // else // if ( Ctrl ) } -void CGeometryView::OnMButtonDown(UINT nFlags, CPoint point) +void CGeometryView::OnMButtonDown(UINT nFlags, CPoint /*point*/) { if ( nFlags & MK_CONTROL ) { @@ -222,7 +222,7 @@ void CGeometryView::OnMButtonDown(UINT nFlags, CPoint point) } } -void CGeometryView::OnMButtonUp(UINT nFlags, CPoint point) +void CGeometryView::OnMButtonUp(UINT nFlags, CPoint /*point*/) { if ( nFlags & MK_CONTROL ) { @@ -248,7 +248,7 @@ void CGeometryView::OnRButtonDown(UINT nFlags, CPoint point) } } -void CGeometryView::OnRButtonUp(UINT nFlags, CPoint point) +void CGeometryView::OnRButtonUp(UINT /*nFlags*/, CPoint /*point*/) { SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); myView->SetComputedMode (myHlrModeIsOn); @@ -412,8 +412,8 @@ void CGeometryView::DragEvent(const Standard_Integer x , //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryView::InputEvent(const Standard_Integer x , - const Standard_Integer y ) +void CGeometryView::InputEvent(const Standard_Integer /*x*/, + const Standard_Integer /*y*/) { GetDocument()->GetAISContext()->Select(); } @@ -421,8 +421,8 @@ void CGeometryView::InputEvent(const Standard_Integer x , //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryView::MoveEvent(const Standard_Integer x , - const Standard_Integer y ) +void CGeometryView::MoveEvent(const Standard_Integer x, + const Standard_Integer y) { GetDocument()->GetAISContext()->MoveTo(x,y,myView); } @@ -460,8 +460,8 @@ void CGeometryView::ShiftDragEvent(const Standard_Integer x , //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CGeometryView::ShiftInputEvent(const Standard_Integer x , - const Standard_Integer y ) +void CGeometryView::ShiftInputEvent(const Standard_Integer /*x*/, + const Standard_Integer /*y*/) { GetDocument()->GetAISContext()->ShiftSelect(); } diff --git a/samples/mfc/standard/01_Geometry/src/GeometryView2D.cpp b/samples/mfc/standard/01_Geometry/src/GeometryView2D.cpp index 5e4919299b..c4d0b5065a 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryView2D.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeometryView2D.cpp @@ -39,7 +39,7 @@ CGeometryView2D::~CGeometryView2D() // CNSGView drawing -void CGeometryView2D::OnDraw(CDC* pDC) +void CGeometryView2D::OnDraw(CDC* /*pDC*/) { CGeometryDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); @@ -170,7 +170,7 @@ void CGeometryView2D::OnLButtonUp(UINT nFlags, CPoint point) } -void CGeometryView2D::OnMButtonDown(UINT nFlags, CPoint point) +void CGeometryView2D::OnMButtonDown(UINT nFlags, CPoint /*point*/) { if ( nFlags & MK_CONTROL ) { @@ -179,7 +179,7 @@ void CGeometryView2D::OnMButtonDown(UINT nFlags, CPoint point) } } -void CGeometryView2D::OnMButtonUp(UINT nFlags, CPoint point) +void CGeometryView2D::OnMButtonUp(UINT nFlags, CPoint /*point*/) { if ( nFlags & MK_CONTROL ) { @@ -201,7 +201,7 @@ void CGeometryView2D::OnRButtonDown(UINT nFlags, CPoint point) } } -void CGeometryView2D::OnRButtonUp(UINT nFlags, CPoint point) +void CGeometryView2D::OnRButtonUp(UINT /*nFlags*/, CPoint point) { OCC_2dView::Popup2D(point.x,point.y); } @@ -277,7 +277,7 @@ void CGeometryView2D::OnMouseMove(UINT nFlags, CPoint point) } } -void CGeometryView2D::OnSize(UINT nType, int cx, int cy) +void CGeometryView2D::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/) { if (!myV2dView.IsNull()) { 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 71b5cd97ab..853f5cb1b6 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.cpp @@ -29,9 +29,9 @@ ISession2D_Curve::ISession2D_Curve(const Handle_Geom2d_Curve aGeom2dCurve, myradiusratio = 1; } -void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, +void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode) + const Standard_Integer /*aMode*/) { Geom2dAdaptor_Curve anAdaptor(myGeom2dCurve); @@ -118,8 +118,8 @@ void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& aPres } } -void ISession2D_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) +void ISession2D_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, + const Standard_Integer /*aMode*/) { } 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 f3b463c323..e649376a2d 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.cpp @@ -30,7 +30,7 @@ ISession_Curve::~ISession_Curve() { } -void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, +void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode) { @@ -48,14 +48,14 @@ void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresen } } -void ISession_Curve::Compute(const Handle(Prs3d_Projector)& aProjector, - const Handle(Prs3d_Presentation)& aPresentation) +void ISession_Curve::Compute(const Handle(Prs3d_Projector)& /*aProjector*/, + const Handle(Prs3d_Presentation)& /*aPresentation*/) { } -void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) +void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, + const Standard_Integer /*aMode*/) { } 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 64ad5dcc4b..b01a86f1c8 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.cpp @@ -25,24 +25,24 @@ ISession_Direction::ISession_Direction() } -ISession_Direction::ISession_Direction(gp_Pnt& aPnt,gp_Dir& aDir,Standard_Real aLength,Standard_Real anArrowLength) +ISession_Direction::ISession_Direction(const gp_Pnt& aPnt,const gp_Dir& aDir,Standard_Real aLength,Standard_Real anArrowLength) :myPnt(aPnt),myDir(aDir),myLength(aLength),myArrowLength(anArrowLength) {} -ISession_Direction::ISession_Direction(gp_Pnt& aPnt,gp_Vec& aVec,Standard_Real anArrowLength) +ISession_Direction::ISession_Direction(const gp_Pnt& aPnt,const gp_Vec& aVec,Standard_Real anArrowLength) :myPnt(aPnt),myDir(aVec),myArrowLength(anArrowLength) { myLength = aVec.Magnitude(); } -ISession_Direction::ISession_Direction(gp_Pnt2d& aPnt2d, - gp_Dir2d& aDir2d, +ISession_Direction::ISession_Direction(const gp_Pnt2d& aPnt2d, + const gp_Dir2d& aDir2d, Standard_Real aLength) :myPnt(gp_Pnt(aPnt2d.X(),aPnt2d.Y(),0)),myDir(gp_Dir(aDir2d.X(),aDir2d.Y(),0)),myLength(aLength) {} -ISession_Direction::ISession_Direction(gp_Pnt2d& aPnt2d, - gp_Vec2d& aVec2d) +ISession_Direction::ISession_Direction(const gp_Pnt2d& aPnt2d, + const gp_Vec2d& aVec2d) :myPnt(gp_Pnt(aPnt2d.X(),aPnt2d.Y(),0)),myDir(gp_Dir(aVec2d.X(),aVec2d.Y(),0)) { myLength = aVec2d.Magnitude(); @@ -54,9 +54,9 @@ ISession_Direction::~ISession_Direction() } -void ISession_Direction::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, +void ISession_Direction::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode) + const Standard_Integer /*aMode*/) { Handle(Prs3d_ArrowAspect) anArrowAspect = myDrawer->ArrowAspect(); anArrowAspect->SetLength(myArrowLength); @@ -76,13 +76,13 @@ void ISession_Direction::Compute(const Handle(PrsMgr_PresentationManager3d)& aPr } -void ISession_Direction::Compute(const Handle(Prs3d_Projector)& aProjector, - const Handle(Prs3d_Presentation)& aPresentation) +void ISession_Direction::Compute(const Handle(Prs3d_Projector)& /*aProjector*/, + const Handle(Prs3d_Presentation)& /*aPresentation*/) { } -void ISession_Direction::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) +void ISession_Direction::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, + const Standard_Integer /*aMode*/) { } @@ -90,3 +90,8 @@ void ISession_Direction::SetText(TCollection_ExtendedString & aText) { myText = aText; } + +void ISession_Direction::SetText(Standard_CString aText) +{ + myText = aText; +} 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 5871c8de1b..20c391b4fe 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.h @@ -16,12 +16,13 @@ class ISession_Direction : public AIS_InteractiveObject public: TCollection_ExtendedString myText; void SetText(TCollection_ExtendedString& aText); + void SetText(Standard_CString 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(const gp_Pnt& aPnt,const gp_Dir& aDir,Standard_Real aLength=1,Standard_Real anArrowLength=1); + ISession_Direction(const gp_Pnt& aPnt,const 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(const gp_Pnt2d& aPnt2d,const gp_Dir2d& aDir2d,Standard_Real aLength=1); + ISession_Direction(const gp_Pnt2d& aPnt2d,const gp_Vec2d& aVec2d); virtual ~ISession_Direction(); DEFINE_STANDARD_RTTI(ISession_Direction) 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 2d957a4697..d533b9cac8 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.cpp @@ -24,13 +24,13 @@ ISession_Point::ISession_Point(Standard_Real X,Standard_Real Y ,Standard_Real Z) } -ISession_Point::ISession_Point(gp_Pnt2d& aPoint,Standard_Real Elevation) +ISession_Point::ISession_Point(const gp_Pnt2d& aPoint,Standard_Real Elevation) :myPoint(gp_Pnt(aPoint.X(),aPoint.Y(),Elevation)) { } -ISession_Point::ISession_Point(gp_Pnt& aPoint) +ISession_Point::ISession_Point(const gp_Pnt& aPoint) :myPoint(aPoint) { @@ -41,9 +41,9 @@ ISession_Point::~ISession_Point() } -void ISession_Point::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, +void ISession_Point::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode) + const Standard_Integer /*aMode*/) { Handle(Geom_CartesianPoint) aGeomPoint = new Geom_CartesianPoint(myPoint); @@ -51,13 +51,13 @@ void ISession_Point::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresen } -void ISession_Point::Compute(const Handle(Prs3d_Projector)& aProjector, - const Handle(Prs3d_Presentation)& aPresentation) +void ISession_Point::Compute(const Handle(Prs3d_Projector)& /*aProjector*/, + const Handle(Prs3d_Presentation)& /*aPresentation*/) { } -void ISession_Point::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer unMode) +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 d372fb1c5a..3b1f589a0e 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.h @@ -19,8 +19,8 @@ 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); + ISession_Point(const gp_Pnt2d& aPoint,Standard_Real Elevation = 0); + ISession_Point(const gp_Pnt& aPoint); virtual ~ISession_Point(); DEFINE_STANDARD_RTTI(ISession_Point) 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 2a370e1fd1..dccb298efc 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp @@ -31,7 +31,7 @@ ISession_Surface::~ISession_Surface() { } -void ISession_Surface::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, +void ISession_Surface::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode) { @@ -56,12 +56,12 @@ void ISession_Surface::Compute(const Handle(PrsMgr_PresentationManager3d)& aPres } -void ISession_Surface::Compute(const Handle(Prs3d_Projector)& aProjector, - const Handle(Prs3d_Presentation)& aPresentation) +void ISession_Surface::Compute(const Handle(Prs3d_Projector)& /*aProjector*/, + const Handle(Prs3d_Presentation)& /*aPresentation*/) { } -void ISession_Surface::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) +void ISession_Surface::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, + const Standard_Integer /*aMode*/) { } \ No newline at end of file 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 5d010a53a6..b754248153 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.cpp @@ -62,20 +62,20 @@ ISession_Text::~ISession_Text() } -void ISession_Text::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode) +void ISession_Text::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, + const Handle(Prs3d_Presentation)& aPresentation, + const Standard_Integer /*aMode*/) { Prs3d_Text::Draw(aPresentation,myDrawer,MyText,gp_Pnt( MyX ,MyY,MyZ )); } -void ISession_Text::Compute(const Handle(Prs3d_Projector)& aProjector, - const Handle(Prs3d_Presentation)& aPresentation) +void ISession_Text::Compute(const Handle(Prs3d_Projector)& /*aProjector*/, + const Handle(Prs3d_Presentation)& /*aPresentation*/) { } -void ISession_Text::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer unMode) +void ISession_Text::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, + const Standard_Integer /*unMode*/) { } 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 bda7433b9f..06c2279997 100644 --- a/samples/mfc/standard/02_Modeling/adm/win/vc10/Modeling.vcxproj +++ b/samples/mfc/standard/02_Modeling/adm/win/vc10/Modeling.vcxproj @@ -101,7 +101,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -143,7 +143,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default @@ -187,7 +187,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -229,7 +229,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default 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 74f8cfb174..851e0cba64 100644 --- a/samples/mfc/standard/02_Modeling/adm/win/vc11/Modeling.vcxproj +++ b/samples/mfc/standard/02_Modeling/adm/win/vc11/Modeling.vcxproj @@ -105,7 +105,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -147,7 +147,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default @@ -191,7 +191,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -233,7 +233,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default 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 21a4debf00..dc495fdc3d 100644 --- a/samples/mfc/standard/02_Modeling/adm/win/vc8/Modeling.vcproj +++ b/samples/mfc/standard/02_Modeling/adm/win/vc8/Modeling.vcproj @@ -62,7 +62,7 @@ AssemblerListingLocation=".\win32\objd/" ObjectFile=".\win32\objd/" ProgramDataBaseFileName=".\win32\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="4" CompileAs="0" @@ -116,9 +116,9 @@ /> 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 e476b55554..bd01035a97 100644 --- a/samples/mfc/standard/02_Modeling/adm/win/vc9/Modeling.vcproj +++ b/samples/mfc/standard/02_Modeling/adm/win/vc9/Modeling.vcproj @@ -63,7 +63,7 @@ AssemblerListingLocation=".\win32\objd/" ObjectFile=".\win32\objd/" ProgramDataBaseFileName=".\win32\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="4" CompileAs="0" @@ -159,7 +159,7 @@ AssemblerListingLocation=".\win64\objd/" ObjectFile=".\win64\objd/" ProgramDataBaseFileName=".\win64\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" @@ -257,7 +257,7 @@ AssemblerListingLocation=".\win32\obj/" ObjectFile=".\win32\obj/" ProgramDataBaseFileName=".\win32\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -353,7 +353,7 @@ AssemblerListingLocation=".\win64\obj/" ObjectFile=".\win64\obj/" ProgramDataBaseFileName=".\win64\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> diff --git a/samples/mfc/standard/02_Modeling/src/ISession_Direction.cpp b/samples/mfc/standard/02_Modeling/src/ISession_Direction.cpp index 97d78b2517..1dc7faacc5 100755 --- a/samples/mfc/standard/02_Modeling/src/ISession_Direction.cpp +++ b/samples/mfc/standard/02_Modeling/src/ISession_Direction.cpp @@ -21,20 +21,20 @@ IMPLEMENT_STANDARD_RTTIEXT(ISession_Direction,AIS_InteractiveObject) ////////////////////////////////////////////////////////////////////// -ISession_Direction::ISession_Direction(gp_Pnt& aPnt,gp_Pnt& aPnt2) +ISession_Direction::ISession_Direction(const gp_Pnt& aPnt,const gp_Pnt& aPnt2) :myStartPnt(aPnt),myEndPnt(aPnt2) {} -ISession_Direction::ISession_Direction(gp_Pnt& aPnt,gp_Vec& aVec) +ISession_Direction::ISession_Direction(const gp_Pnt& aPnt,const gp_Vec& aVec) :myStartPnt(aPnt) { myEndPnt = myStartPnt.Translated(aVec); } -void ISession_Direction::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode) +void ISession_Direction::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, + const Handle(Prs3d_Presentation)& aPresentation, + const Standard_Integer /*aMode*/) { Handle(Prs3d_ArrowAspect) anArrowAspect = myDrawer->ArrowAspect(); anArrowAspect->SetLength(myStartPnt.Distance(myEndPnt)); diff --git a/samples/mfc/standard/02_Modeling/src/ISession_Direction.h b/samples/mfc/standard/02_Modeling/src/ISession_Direction.h index e4c5d7997b..cfec6d22e2 100755 --- a/samples/mfc/standard/02_Modeling/src/ISession_Direction.h +++ b/samples/mfc/standard/02_Modeling/src/ISession_Direction.h @@ -21,8 +21,8 @@ class ISession_Direction : public AIS_InteractiveObject { public: ISession_Direction(); - ISession_Direction(gp_Pnt& aPnt,gp_Pnt& aPnt2); - ISession_Direction(gp_Pnt& aPnt,gp_Vec& aVec); + ISession_Direction(const gp_Pnt& aPnt,const gp_Pnt& aPnt2); + ISession_Direction(const gp_Pnt& aPnt,const gp_Vec& aVec); DEFINE_STANDARD_RTTI(ISession_Direction) diff --git a/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp b/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp index faab1a758c..51005da1ee 100755 --- a/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp +++ b/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp @@ -108,10 +108,10 @@ void CModelingDoc::OnMirror() for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){ myAISContext->Remove(aListIterator.Value()); } - TopoDS_Shape S = BRepPrimAPI_MakeWedge(60.,100.,80.,20.); + TopoDS_Shape S = BRepPrimAPI_MakeWedge(60.,100.,80.,20.); Handle(AIS_Shape) ais1 = new AIS_Shape(S); - myAISContext->SetColor(ais1,Quantity_NOC_GREEN,Standard_False); - myAISContext->SetMaterial(ais1,Graphic3d_NOM_PLASTIC,Standard_False); + myAISContext->SetColor(ais1,Quantity_NOC_GREEN,Standard_False); + myAISContext->SetMaterial(ais1,Graphic3d_NOM_PLASTIC,Standard_False); myAISContext->Display(ais1,Standard_False); gp_Trsf theTransformation; gp_Pnt PntCenterOfTheTransformation(110,60,60); @@ -277,7 +277,7 @@ void CModelingDoc::OnTranslation() myAISContext->Display(ais1,Standard_False); gp_Trsf theTransformation; gp_Vec theVectorOfTranslation(-6,-6,6); - + Handle (ISession_Direction) aDirection1 = new ISession_Direction(gp_Pnt(0,0,0),theVectorOfTranslation); myAISContext->Display(aDirection1,Standard_False); @@ -3651,7 +3651,7 @@ void CModelingDoc::OnBuilder() //Circular Edges Handle (Geom_Circle) C; - Standard_Real R = 100; + //Standard_Real R = 100; //Edge EX01 C = new Geom_Circle(gp_Ax2(gp_Pnt(100,0,100),gp_Dir(0,1,0),gp_Dir(-1,0,0)),100); @@ -4810,9 +4810,9 @@ Please, select a face to continue\nthe creation of a tangent surface."); } } -void CModelingDoc::InputEvent(const Standard_Integer x , - const Standard_Integer y , - const Handle(V3d_View)& aView ) +void CModelingDoc::InputEvent(const Standard_Integer /*x*/, + const Standard_Integer /*y*/, + const Handle(V3d_View)& /*aView*/) { myAISContext->Select(); if (myState == SELECT_EDGE_PLATE_TGTES_1) { 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 e618b81df4..e1465b5e1f 100644 --- a/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj +++ b/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj @@ -103,7 +103,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -145,7 +145,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -185,7 +185,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -227,7 +227,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default 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 492a1b4e5d..1553f60f7a 100644 --- a/samples/mfc/standard/03_Viewer2d/adm/win/vc11/Viewer2d.vcxproj +++ b/samples/mfc/standard/03_Viewer2d/adm/win/vc11/Viewer2d.vcxproj @@ -107,7 +107,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -149,7 +149,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -189,7 +189,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -231,7 +231,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default 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 79672201ce..c3e8bd8375 100644 --- a/samples/mfc/standard/03_Viewer2d/adm/win/vc8/Viewer2d.vcproj +++ b/samples/mfc/standard/03_Viewer2d/adm/win/vc8/Viewer2d.vcproj @@ -64,7 +64,7 @@ AssemblerListingLocation=".\win32\obj/" ObjectFile=".\win32\obj/" ProgramDataBaseFileName=".\win32\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -116,9 +116,9 @@ /> @@ -477,7 +477,7 @@ /> @@ -161,7 +161,7 @@ AssemblerListingLocation=".\win64\obj/" ObjectFile=".\win64\obj/" ProgramDataBaseFileName=".\win64\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -255,7 +255,7 @@ AssemblerListingLocation=".\win32\objd/" ObjectFile=".\win32\objd/" ProgramDataBaseFileName=".\win32\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="4" CompileAs="0" @@ -351,7 +351,7 @@ AssemblerListingLocation=".\win64\objd/" ObjectFile=".\win64\objd/" ProgramDataBaseFileName=".\win64\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" diff --git a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp b/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp index 796ef34938..3efcbe45a3 100755 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp +++ b/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp @@ -249,7 +249,8 @@ void CViewer2dDoc::OnBUTTONTestFace() TopoDS_Shape aFaceShape; BRep_Builder aBuilder; - Standard_Boolean result = BRepTools::Read(aFaceShape,aFileName,aBuilder); + //Standard_Boolean result = BRepTools::Read(aFaceShape,aFileName,aBuilder); + BRepTools::Read(aFaceShape,aFileName,aBuilder); if(aFaceShape.IsNull() || aFaceShape.ShapeType() != TopAbs_FACE) { 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 8335006341..fe0e4b35cd 100644 --- a/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj +++ b/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj @@ -103,7 +103,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -145,7 +145,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -186,7 +186,7 @@ .\win32\objd/ .\win32\objd/ true - Level3 + Level4 true EditAndContinue Default @@ -229,7 +229,7 @@ .\win64\objd/ .\win64\objd/ true - Level3 + Level4 true ProgramDatabase Default 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 af0778538b..de2328b3d1 100644 --- a/samples/mfc/standard/04_Viewer3d/adm/win/vc11/Viewer3d.vcxproj +++ b/samples/mfc/standard/04_Viewer3d/adm/win/vc11/Viewer3d.vcxproj @@ -107,7 +107,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -149,7 +149,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -190,7 +190,7 @@ .\win32\objd/ .\win32\objd/ true - Level3 + Level4 true EditAndContinue Default @@ -233,7 +233,7 @@ .\win64\objd/ .\win64\objd/ true - Level3 + Level4 true ProgramDatabase Default 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 598febcf00..e81d5a9018 100644 --- a/samples/mfc/standard/04_Viewer3d/adm/win/vc8/Viewer3d.vcproj +++ b/samples/mfc/standard/04_Viewer3d/adm/win/vc8/Viewer3d.vcproj @@ -64,7 +64,7 @@ AssemblerListingLocation=".\win32\obj/" ObjectFile=".\win32\obj/" ProgramDataBaseFileName=".\win32\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -116,9 +116,9 @@ /> @@ -161,7 +161,7 @@ AssemblerListingLocation=".\win64\obj/" ObjectFile=".\win64\obj/" ProgramDataBaseFileName=".\win64\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -256,7 +256,7 @@ ObjectFile=".\win32\objd/" ProgramDataBaseFileName=".\win32\objd/" BrowseInformation="1" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="4" CompileAs="0" @@ -353,7 +353,7 @@ ObjectFile=".\win64\objd/" ProgramDataBaseFileName=".\win64\objd/" BrowseInformation="1" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" diff --git a/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.cpp b/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.cpp index a19b4960ad..58ad7b7dc3 100755 --- a/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.cpp +++ b/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.cpp @@ -32,7 +32,7 @@ ISession_Curve::~ISession_Curve() { } -void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, +void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer /*aMode*/) { @@ -45,14 +45,14 @@ void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresen StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer); } -void ISession_Curve::Compute(const Handle(Prs3d_Projector)& aProjector, - const Handle(Prs3d_Presentation)& aPresentation) +void ISession_Curve::Compute(const Handle(Prs3d_Projector)& /*aProjector*/, + const Handle(Prs3d_Presentation)& /*aPresentation*/) { } -void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) +void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, + const Standard_Integer /*aMode*/) { } diff --git a/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.cpp b/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.cpp index d9e001054d..136a410996 100755 --- a/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.cpp +++ b/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.cpp @@ -214,8 +214,8 @@ void COffsetDlg::UpdateValues() BOOL IsOverlappedBoxCurrent = aAISContext->IsCurrent(aOverlappedBox); - BOOL IsAnyOverlappedObjectCurrent = - IsOverlappedCylinderCurrent || IsOverlappedSphereCurrent || IsOverlappedBoxCurrent; + /*BOOL IsAnyOverlappedObjectCurrent = + IsOverlappedCylinderCurrent || IsOverlappedSphereCurrent || IsOverlappedBoxCurrent;*/ BOOL IsCylinderCurrent = aAISContext->IsCurrent(aCylinder); diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp b/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp index a535dbd931..a749ca293a 100755 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp +++ b/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp @@ -504,9 +504,9 @@ void CViewer3dDoc::DragEvent(const Standard_Integer x , //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CViewer3dDoc::InputEvent(const Standard_Integer x , - const Standard_Integer y , - const Handle(V3d_View)& aView ) +void CViewer3dDoc::InputEvent(const Standard_Integer /*x*/, + const Standard_Integer /*y*/, + const Handle(V3d_View)& /*aView*/ ) { if (myOffsetDlg && myOffsetDlg->IsWindowVisible()) myOffsetDlg->UpdateValues(); @@ -560,7 +560,8 @@ void CViewer3dDoc::InputEvent(const Standard_Integer x , } } - TCollection_AsciiString aMessage (" TopoDS_Shape S = myAISContext->SelectedShape(); \n" + myCResultDialog.SetTitle("Change face color"); + myCResultDialog.SetText(" 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" @@ -579,11 +580,7 @@ void CViewer3dDoc::InputEvent(const Standard_Integer x , " 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")); + SetTitle("Change face color"); } } @@ -716,15 +713,12 @@ void CViewer3dDoc::OnFaces() myAISContext->OpenLocalContext(); myAISContext->ActivateStandardMode (TopAbs_FACE); - TCollection_AsciiString aMessage (" myAISContext->OpenLocalContext(); \n" + myCResultDialog.SetTitle("Standard mode: TopAbs_FACE"); + myCResultDialog.SetText(" myAISContext->OpenLocalContext(); \n" " \n" " myAISContext->ActivateStandardMode(TopAbs_FACE); \n" " \n"); - - CString aMsgStr (aMessage.ToCString()); - myCResultDialog.SetTitle (CString("Standard mode: TopAbs_FACE")); - myCResultDialog.SetText (aMsgStr); - SetTitle (CString ("Standard mode: TopAbs_FACE")); + SetTitle("Standard mode: TopAbs_FACE"); } //Set edges selection mode @@ -734,15 +728,12 @@ void CViewer3dDoc::OnEdges() myAISContext->OpenLocalContext(); myAISContext->ActivateStandardMode(TopAbs_EDGE); - TCollection_AsciiString aMessage (" myAISContext->OpenLocalContext(); \n" + myCResultDialog.SetTitle("Standard mode: TopAbs_EDGE"); + myCResultDialog.SetText(" myAISContext->OpenLocalContext(); \n" " \n" " myAISContext->ActivateStandardMode(TopAbs_EDGE); \n" " \n"); - - CString aMsgStr (aMessage.ToCString()); - myCResultDialog.SetTitle (CString ("Standard mode: TopAbs_EDGE")); - myCResultDialog.SetText (aMsgStr); - SetTitle (CString ("Standard mode: TopAbs_EDGE")); + SetTitle("Standard mode: TopAbs_EDGE"); } // Set vertices selection mode @@ -752,15 +743,12 @@ void CViewer3dDoc::OnVertices() myAISContext->OpenLocalContext(); myAISContext->ActivateStandardMode (TopAbs_VERTEX); - TCollection_AsciiString aMessage (" myAISContext->OpenLocalContext(); \n" + myCResultDialog.SetTitle("Standard mode: TopAbs_VERTEX"); + myCResultDialog.SetText(" myAISContext->OpenLocalContext(); \n" " \n" " myAISContext->ActivateStandardMode(TopAbs_VERTEX); \n" " \n"); - - CString aMsgStr (aMessage.ToCString()); - myCResultDialog.SetTitle (CString ("Standard mode: TopAbs_VERTEX")); - myCResultDialog.SetText (aMsgStr); - SetTitle (CString ("Standard mode: TopAbs_VERTEX")); + SetTitle("Standard mode: TopAbs_VERTEX"); } //Neutral selection mode @@ -768,13 +756,10 @@ void CViewer3dDoc::OnNeutral() { myAISContext->CloseAllContexts(); - TCollection_AsciiString aMessage (" myAISContext->CloseAllContexts(); \n" + myCResultDialog.SetTitle("Standard mode: Neutral"); + myCResultDialog.SetText(" myAISContext->CloseAllContexts(); \n" " \n"); - - CString aMsgStr (aMessage.ToCString()); - myCResultDialog.SetTitle (CString ("Standard mode: Neutral")); - myCResultDialog.SetText (aMsgStr); - SetTitle (CString ("Standard mode: Neutral")); + SetTitle("Standard mode: Neutral"); } // Change the color of faces on a user cylinder @@ -854,7 +839,8 @@ void CViewer3dDoc::OnFillet3d() myAISContext->Redisplay (S); } - TCollection_AsciiString aMessage (" Handle(AIS_Shape) S = Handle(AIS_Shape)::DownCast(myAISContext->Interactive()); \n" + myCResultDialog.SetTitle("Make a fillet"); + myCResultDialog.SetText(" Handle(AIS_Shape) S = Handle(AIS_Shape)::DownCast(myAISContext->Interactive()); \n" " \n" " BRepAPI_MakeFillet aFillet(S->Shape()); \n" " \n" @@ -868,11 +854,7 @@ void CViewer3dDoc::OnFillet3d() " \n" " myAISContext->Redisplay(S); \n" " \n"); - - CString aMsgStr (aMessage.ToCString()); - myCResultDialog.SetTitle (CString ("Make a fillet")); - myCResultDialog.SetText (aMsgStr); - SetTitle (CString ("Make a fillet")); + SetTitle("Make a fillet"); } // Create and display a circle with standard tools @@ -888,17 +870,14 @@ void CViewer3dDoc::OnCircle() 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" + myCResultDialog.SetTitle("Create a circle"); + myCResultDialog.SetText(" GC_MakeCircle C(gp_Pnt(-100.,-300.,0.),gp_Pnt(-50.,-200.,0.),gp_Pnt(-10.,-250.,0.)); \n" " \n" " Handle(AIS_Circle) anAISCirc = new AIS_Circle(C.Value()); \n" " \n" " myAISContext->Display(anAISCirc); \n" " \n"); - - CString aMsgStr (aMessage.ToCString()); - myCResultDialog.SetTitle (CString ("Create a circle")); - myCResultDialog.SetText (aMsgStr); - SetTitle (CString ("Create a circle")); + SetTitle("Create a circle"); } void CViewer3dDoc::OnLine() @@ -909,7 +888,8 @@ void CViewer3dDoc::OnLine() Handle(AIS_Line) anAISLine = new AIS_Line (aGeomLin); myAISContext->Display (anAISLine); - TCollection_AsciiString aMessage (" gp_Lin L(gp_Pnt(0.,0.,0.),gp_Dir(1.,0.,0.)); \n" + myCResultDialog.SetTitle("Create a line"); + myCResultDialog.SetText(" gp_Lin L(gp_Pnt(0.,0.,0.),gp_Dir(1.,0.,0.)); \n" " \n" " Handle(Geom_Line) aLine = new Geom_Line(L); \n" " \n" @@ -917,11 +897,7 @@ void CViewer3dDoc::OnLine() " \n" " myAISContext->Display(anAISLine); \n" " \n"); - - CString aMsgStr (aMessage.ToCString()); - myCResultDialog.SetTitle (CString("Create a line")); - myCResultDialog.SetText (aMsgStr); - SetTitle (CString ("Create a line")); + SetTitle("Create a line"); } void CViewer3dDoc::OnNbisos() @@ -936,15 +912,12 @@ void CViewer3dDoc::OnNbisos() 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" + myCResultDialog.SetTitle("Iso Aspect"); + myCResultDialog.SetText(" 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")); + SetTitle("Iso Aspect"); } } diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp b/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp index ef86a6e8b6..32489d8514 100755 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp +++ b/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp @@ -166,7 +166,7 @@ void CViewer3dView::OnInitialUpdate() RedrawVisMode(); } -void CViewer3dView::OnDraw(CDC* pDC) +void CViewer3dView::OnDraw(CDC* /*pDC*/) { CViewer3dDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); @@ -228,7 +228,7 @@ gp_Pnt ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aV return ResultPoint; } -void CViewer3dView::OnSize(UINT nType, int cx, int cy) +void CViewer3dView::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/) { if (!myView.IsNull()) myView->MustBeResized(); @@ -498,7 +498,7 @@ GetDocument()->UpdateResultMessageDlg("SetDirection",Message); } } -void CViewer3dView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) +void CViewer3dView::OnKeyDown(UINT nChar, UINT /*nRepCnt*/, UINT /*nFlags*/) { if( nChar == X_Key || nChar == Y_Key || nChar == Z_Key ) @@ -594,7 +594,7 @@ void CViewer3dView::OnLButtonUp(UINT nFlags, CPoint point) } // else // if ( Ctrl ) } -void CViewer3dView::OnMButtonDown(UINT nFlags, CPoint point) +void CViewer3dView::OnMButtonDown(UINT nFlags, CPoint /*point*/) { if ( nFlags & MK_CONTROL ) { @@ -603,7 +603,7 @@ void CViewer3dView::OnMButtonDown(UINT nFlags, CPoint point) } } -void CViewer3dView::OnMButtonUp(UINT nFlags, CPoint point) +void CViewer3dView::OnMButtonUp(UINT nFlags, CPoint /*point*/) { if ( nFlags & MK_CONTROL ) { @@ -629,7 +629,7 @@ void CViewer3dView::OnRButtonDown(UINT nFlags, CPoint point) } } -void CViewer3dView::OnRButtonUp(UINT nFlags, CPoint point) +void CViewer3dView::OnRButtonUp(UINT /*nFlags*/, CPoint /*point*/) { SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); myView->SetComputedMode (myHlrModeIsOn); @@ -716,7 +716,7 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point) { BRepBuilderAPI_MakeEdge MakeEdge(p1, p2); directionalEdgeShape->Set(MakeEdge.Edge()); - GetDocument()->GetAISContext()->Redisplay(directionalEdgeShape,0,-1); + GetDocument()->GetAISContext()->Redisplay(directionalEdgeShape,0,Standard_True); myCurrent_DirectionalLight->SetDirection(p2.X()-p1.X(),p2.Y()-p1.Y(),p2.Z()-p1.Z()); myView->UpdateLights(); } @@ -738,7 +738,7 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point) BRepPrimAPI_MakeCone MakeCone(gp_Ax2(p1, gp_Dir(gp_Vec(p1, p2))), 0, (p1.Distance(p2))/tan(1.04), coneHeigth); spotConeShape->Set(MakeCone.Solid()); - GetDocument()->GetAISContext()->Redisplay(spotConeShape,0,-1); + GetDocument()->GetAISContext()->Redisplay(spotConeShape,0,Standard_True); myCurrent_SpotLight->SetDirection(p2.X()-p1.X(),p2.Y()-p1.Y(),p2.Z()-p1.Z()); myView->UpdateLights(); } @@ -753,7 +753,7 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point) BRepPrimAPI_MakeCone MakeCone(gp_Ax2(p1, gp_Dir(gp_Vec(p1, p2))), 0, p2.Distance(p3), coneHeigth); spotConeShape->Set(MakeCone.Solid()); - GetDocument()->GetAISContext()->Redisplay(spotConeShape,0,-1); + GetDocument()->GetAISContext()->Redisplay(spotConeShape,0,Standard_True); myCurrent_SpotLight->SetAngle(atan(p2.Distance(p3)/p1.Distance(p2))) ; myView->UpdateLights(); } @@ -827,7 +827,7 @@ void CViewer3dView::DrawRectangle(const Standard_Integer MinX , else if (aLineStyle == Default) { m_Pen = NULL; m_DrawMode = R2_MERGEPENNOT;} - CPen* aOldPen; + CPen* aOldPen = NULL; CClientDC clientDC(this); if (m_Pen) aOldPen = clientDC.SelectObject(m_Pen); clientDC.SetROP2(m_DrawMode); 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 3dfdf4d40f..5d16c9ec84 100644 --- a/samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj +++ b/samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj @@ -103,7 +103,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -145,7 +145,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -185,7 +185,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -227,7 +227,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default 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 9965e3a095..8c8a077a72 100644 --- a/samples/mfc/standard/05_ImportExport/adm/win/vc11/ImportExport.vcxproj +++ b/samples/mfc/standard/05_ImportExport/adm/win/vc11/ImportExport.vcxproj @@ -107,7 +107,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -149,7 +149,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -189,7 +189,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -231,7 +231,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default 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 03ab453244..1e5dcfb546 100644 --- a/samples/mfc/standard/05_ImportExport/adm/win/vc8/ImportExport.vcproj +++ b/samples/mfc/standard/05_ImportExport/adm/win/vc8/ImportExport.vcproj @@ -64,7 +64,7 @@ AssemblerListingLocation=".\win32\obj/" ObjectFile=".\win32\obj/" ProgramDataBaseFileName=".\win32\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -116,9 +116,9 @@ /> @@ -618,24 +618,24 @@ /> @@ -161,7 +161,7 @@ AssemblerListingLocation=".\win64\obj/" ObjectFile=".\win64\obj/" ProgramDataBaseFileName=".\win64\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -255,7 +255,7 @@ AssemblerListingLocation=".\win32\objd/" ObjectFile=".\win32\objd/" ProgramDataBaseFileName=".\win32\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="4" CompileAs="0" @@ -351,7 +351,7 @@ AssemblerListingLocation=".\win64\objd/" ObjectFile=".\win64\objd/" ProgramDataBaseFileName=".\win64\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" diff --git a/samples/mfc/standard/05_ImportExport/src/FSD_Archive.cxx b/samples/mfc/standard/05_ImportExport/src/FSD_Archive.cxx index a2024cf9fc..f74f62749f 100755 --- a/samples/mfc/standard/05_ImportExport/src/FSD_Archive.cxx +++ b/samples/mfc/standard/05_ImportExport/src/FSD_Archive.cxx @@ -52,7 +52,7 @@ Storage_Error FSD_Archive::IsGoodFileType(const TCollection_AsciiString& if (s == Storage_VSOk) { TCollection_AsciiString l; - Standard_Integer len = strlen(FSD_Archive::MagicNumber()); + Standard_Integer len = (int)strlen(FSD_Archive::MagicNumber()); f.ReadChar(l,len); @@ -851,7 +851,7 @@ Storage_Error FSD_Archive::BeginReadInfoSection() Storage_Error s; #ifdef WNT TCollection_AsciiString l; - Standard_Integer len = strlen(FSD_Archive::MagicNumber()); + Standard_Integer len = (int)strlen(FSD_Archive::MagicNumber()); // first character is length of the magic number ReadChar(l,1); 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 999d26357f..cb9f2ecbe1 100644 --- a/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj +++ b/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj @@ -103,7 +103,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -145,7 +145,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -185,7 +185,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -227,7 +227,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default 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 f10c22bea4..52ba30379c 100644 --- a/samples/mfc/standard/06_Ocaf/adm/win/vc11/Ocaf.vcxproj +++ b/samples/mfc/standard/06_Ocaf/adm/win/vc11/Ocaf.vcxproj @@ -107,7 +107,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -149,7 +149,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -189,7 +189,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -231,7 +231,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default 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 860bedc7e2..bbfb14036d 100644 --- a/samples/mfc/standard/06_Ocaf/adm/win/vc8/Ocaf.vcproj +++ b/samples/mfc/standard/06_Ocaf/adm/win/vc8/Ocaf.vcproj @@ -64,7 +64,7 @@ AssemblerListingLocation=".\win32\obj/" ObjectFile=".\win32\obj/" ProgramDataBaseFileName=".\win32\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -116,9 +116,9 @@ /> @@ -748,24 +748,24 @@ /> @@ -161,7 +161,7 @@ AssemblerListingLocation=".\win64\obj/" ObjectFile=".\win64\obj/" ProgramDataBaseFileName=".\win64\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -255,7 +255,7 @@ AssemblerListingLocation=".\win32\objd/" ObjectFile=".\win32\objd/" ProgramDataBaseFileName=".\win32\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="4" CompileAs="0" @@ -351,7 +351,7 @@ AssemblerListingLocation=".\win64\objd/" ObjectFile=".\win64\objd/" ProgramDataBaseFileName=".\win64\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" diff --git a/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp b/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp index 329dff7d16..a71a3f73bb 100755 --- a/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp +++ b/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp @@ -95,8 +95,8 @@ COcafDoc::~COcafDoc() // Setting the number of memorized undos \n\ myOcafDoc->SetUndoLimit(10); \n\ \n"); - - myCResultDialog.SetTitle(CString("New document")); + + myCResultDialog.SetTitle("New document"); CString text(Message.ToCString()); myCResultDialog.SetText(text); @@ -158,7 +158,7 @@ myOcafDoc->CommitCommand(); \n\ \n\ \n"); - myCResultDialog.SetTitle(CString("Redo")); + myCResultDialog.SetTitle("Redo"); CString text(Message.ToCString()); myCResultDialog.SetText(text); } @@ -180,7 +180,7 @@ myOcafDoc->CommitCommand(); \n\ \n\ \n"); - myCResultDialog.SetTitle(CString("Undo")); + myCResultDialog.SetTitle("Undo"); CString text(Message.ToCString()); myCResultDialog.SetText(text); } @@ -252,7 +252,7 @@ prs->Display(1); \n\ D->CommitCommand(); \n\ \n"); - myCResultDialog.SetTitle(CString("Create box")); + myCResultDialog.SetTitle("Create box"); CString text(Message.ToCString()); myCResultDialog.SetText(text); } @@ -310,7 +310,7 @@ prs->Display(1); \n\ D->CommitCommand(); \n\ \n"); - myCResultDialog.SetTitle(CString("Create cylinder")); + myCResultDialog.SetTitle("Create cylinder"); CString text(Message.ToCString()); myCResultDialog.SetText(text); } @@ -442,7 +442,8 @@ prs->Display(1); \n\ D->CommitCommand(); \n\ } \n\ \n"); - myCResultDialog.SetTitle(CString("Modify Box")); + + myCResultDialog.SetTitle("Modify Box"); } // Case of a cylinder created with the box function driver else if(myDriverID==TOcafFunction_CylDriver::GetID()) @@ -525,7 +526,8 @@ prs->Display(1); \n\ D->CommitCommand(); \n\ } \n\ \n"); - myCResultDialog.SetTitle(CString("Modify cylinder")); + + myCResultDialog.SetTitle("Modify cylinder"); } // Case of a cut solid created with the cut function driver else if(myDriverID==TOcafFunction_CutDriver::GetID()) @@ -665,7 +667,8 @@ prs->Display(1); \n\ D->CommitCommand(); \n\ } \n\ \n"); - myCResultDialog.SetTitle(CString("Modify Cut")); + + myCResultDialog.SetTitle("Modify Cut"); } else { @@ -787,7 +790,7 @@ prs->Display(1); \n\ D->CommitCommand(); \n\ \n"); - myCResultDialog.SetTitle(CString("Cut operation")); + myCResultDialog.SetTitle("Cut operation"); CString text(Message.ToCString()); myCResultDialog.SetText(text); } @@ -853,8 +856,8 @@ void COcafDoc::OnObjectDelete() // Commit the command\n\ D->CommitCommand(); \n\ \n"); - - myCResultDialog.SetTitle(CString("Delete")); + + myCResultDialog.SetTitle("Delete"); CString text(Message.ToCString()); myCResultDialog.SetText(text); } @@ -979,7 +982,7 @@ Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); \n\ m_App->SaveAs(myOcafDoc,(TCollection_ExtendedString) TPath); \n\ \n"); - myCResultDialog.SetTitle(CString("Save a document")); + myCResultDialog.SetTitle("Save a document"); CString text(Message.ToCString()); myCResultDialog.SetText(text); } @@ -1036,7 +1039,7 @@ Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); \n\ m_App->SaveAs(myOcafDoc,(TCollection_ExtendedString) TPath); \n\ \n"); - myCResultDialog.SetTitle(CString("Save a document")); + myCResultDialog.SetTitle("Save a document"); CString text(Message.ToCString()); myCResultDialog.SetText(text); return; @@ -1113,7 +1116,7 @@ Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); \n\ m_App->SaveAs(myOcafDoc,(TCollection_ExtendedString) TPath); \n\ \n"); - myCResultDialog.SetTitle(CString("Save a document")); + myCResultDialog.SetTitle("Save a document"); CString text(Message.ToCString()); myCResultDialog.SetText(text); } @@ -1132,12 +1135,13 @@ BOOL COcafDoc::OnOpenDocument(LPCTSTR lpszPathName) TCollection_ExtendedString TPath(SPath); PathName=lpszPathName; - // open the document in the current application - PCDM_ReaderStatus RS = m_App->Open(TPath,myOcafDoc); -// CDF_RetrievableStatus RS = m_App->Open(TPath,myOcafDoc); + // open the document in the current application + //PCDM_ReaderStatus RS = m_App->Open(TPath,myOcafDoc); + m_App->Open(TPath,myOcafDoc); + //CDF_RetrievableStatus RS = m_App->Open(TPath,myOcafDoc); //connect the document CAF (myDoc) with the AISContext (myAISContext) -// TPrsStd_AISViewer::Has(myOcafDoc->Main()); + //TPrsStd_AISViewer::Has(myOcafDoc->Main()); TPrsStd_AISViewer::New(myOcafDoc->Main(),myViewer); myOcafDoc->SetUndoLimit(10); @@ -1165,7 +1169,8 @@ TPrsStd_AISViewer::New(myOcafDoc->Main(),myViewer); \n\ myOcafDoc->SetUndoLimit(10); \n\ \n\ \n"); - myCResultDialog.SetTitle(CString("Open a document")); + + myCResultDialog.SetTitle("Open a document"); CString text(Message.ToCString()); myCResultDialog.SetText(text); diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx index 759d23a356..8747d94c28 100755 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx +++ b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx @@ -83,7 +83,7 @@ Standard_Boolean TOcafFunction_BoxDriver::MustExecute(const TFunction_Logbook& l // : if there are no any mistakes occurred we return 0: // : 0 - no mistakes were found. //======================================================================= -Standard_Integer TOcafFunction_BoxDriver::Execute(TFunction_Logbook& log) const +Standard_Integer TOcafFunction_BoxDriver::Execute(TFunction_Logbook& /*log*/) const { // Get the values of dimension and position attributes Handle(TDataStd_Real) TSR; diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx index 50f3b29ea0..e3d97503c2 100755 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx +++ b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx @@ -99,7 +99,7 @@ Standard_Boolean TOcafFunction_CutDriver::MustExecute(const TFunction_Logbook& l // : 0 - no mistakes were found. //======================================================================= -Standard_Integer TOcafFunction_CutDriver::Execute(TFunction_Logbook& log) const +Standard_Integer TOcafFunction_CutDriver::Execute(TFunction_Logbook& /*log*/) const { // Let's get the arguments (OriginalNShape, ToolNShape of the object): diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx index c5f2491a8a..1a88670d67 100755 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx +++ b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx @@ -81,7 +81,7 @@ Standard_Boolean TOcafFunction_CylDriver::MustExecute(const TFunction_Logbook& l // : if there are no any mistakes occurred we return 0: // : 0 - no mistakes were found. //======================================================================= -Standard_Integer TOcafFunction_CylDriver::Execute(TFunction_Logbook& log) const +Standard_Integer TOcafFunction_CylDriver::Execute(TFunction_Logbook& /*log*/) const { // Get the values of dimension and position attributes Handle(TDataStd_Real) TSR; 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 d1d84fcd98..8a9efb710d 100644 --- a/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj +++ b/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj @@ -103,7 +103,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -145,7 +145,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -185,7 +185,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -227,7 +227,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default 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 05554f0c64..3abb9cbac8 100644 --- a/samples/mfc/standard/07_Triangulation/adm/win/vc11/Triangulation.vcxproj +++ b/samples/mfc/standard/07_Triangulation/adm/win/vc11/Triangulation.vcxproj @@ -107,7 +107,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -149,7 +149,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -189,7 +189,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -231,7 +231,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default 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 eaa2c2c049..9be328c7d0 100644 --- a/samples/mfc/standard/07_Triangulation/adm/win/vc8/Triangulation.vcproj +++ b/samples/mfc/standard/07_Triangulation/adm/win/vc8/Triangulation.vcproj @@ -64,7 +64,7 @@ AssemblerListingLocation=".\win32\obj/" ObjectFile=".\win32\obj/" ProgramDataBaseFileName=".\win32\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -116,9 +116,9 @@ /> @@ -502,24 +502,24 @@ /> @@ -161,7 +161,7 @@ AssemblerListingLocation=".\win64\obj/" ObjectFile=".\win64\obj/" ProgramDataBaseFileName=".\win64\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -255,7 +255,7 @@ AssemblerListingLocation=".\win32\objd/" ObjectFile=".\win32\objd/" ProgramDataBaseFileName=".\win32\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="4" CompileAs="0" @@ -351,7 +351,7 @@ AssemblerListingLocation=".\win64\objd/" ObjectFile=".\win64\objd/" ProgramDataBaseFileName=".\win64\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" diff --git a/samples/mfc/standard/07_Triangulation/src/ISession_Curve.cpp b/samples/mfc/standard/07_Triangulation/src/ISession_Curve.cpp index a19b4960ad..58ad7b7dc3 100755 --- a/samples/mfc/standard/07_Triangulation/src/ISession_Curve.cpp +++ b/samples/mfc/standard/07_Triangulation/src/ISession_Curve.cpp @@ -32,7 +32,7 @@ ISession_Curve::~ISession_Curve() { } -void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, +void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer /*aMode*/) { @@ -45,14 +45,14 @@ void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresen StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer); } -void ISession_Curve::Compute(const Handle(Prs3d_Projector)& aProjector, - const Handle(Prs3d_Presentation)& aPresentation) +void ISession_Curve::Compute(const Handle(Prs3d_Projector)& /*aProjector*/, + const Handle(Prs3d_Presentation)& /*aPresentation*/) { } -void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) +void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, + const Standard_Integer /*aMode*/) { } diff --git a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp b/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp index 8dcc321a79..d882bc07c4 100755 --- a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp +++ b/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp @@ -219,8 +219,8 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape) { const TColgp_Array1OfPnt& aNodes = aTr->Nodes(); aNumOfNodes += aTr->NbNodes(); - Standard_Integer aLower = aNodes.Lower(); - Standard_Integer anUpper = aNodes.Upper(); + //Standard_Integer aLower = aNodes.Lower(); + //Standard_Integer anUpper = aNodes.Upper(); const Poly_Array1OfTriangle& triangles = aTr->Triangles(); aNumOfTriangles += aTr->NbTriangles(); diff --git a/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp b/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp index c1826312c7..b05539fd20 100755 --- a/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp +++ b/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp @@ -164,7 +164,7 @@ for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) { for (Standard_Integer i=1;i<=(facing->NbTriangles());i++) { Poly_Triangle trian = tri.Value(i); - Standard_Integer index1,index2,index3,M,N; + Standard_Integer index1,index2,index3,M = 0, N = 0; trian.Get(index1,index2,index3); for (Standard_Integer j=1;j<=3;j++) { @@ -323,7 +323,7 @@ void CTriangulationDoc::OnFileNew() void CTriangulationDoc::InitViewButtons() { - POSITION pos = GetFirstViewPosition(); + //POSITION pos = GetFirstViewPosition(); /* LLS while (pos != NULL) { 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 8fe35882fd..7455a4deb9 100644 --- a/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj +++ b/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj @@ -103,7 +103,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -145,7 +145,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -185,7 +185,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -227,7 +227,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default 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 576e5ad532..4bac832c40 100644 --- a/samples/mfc/standard/08_HLR/adm/win/vc11/HLR.vcxproj +++ b/samples/mfc/standard/08_HLR/adm/win/vc11/HLR.vcxproj @@ -107,7 +107,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -149,7 +149,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -189,7 +189,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -231,7 +231,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default 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 ac923c850b..6c0aff8a17 100644 --- a/samples/mfc/standard/08_HLR/adm/win/vc8/HLR.vcproj +++ b/samples/mfc/standard/08_HLR/adm/win/vc8/HLR.vcproj @@ -64,7 +64,7 @@ AssemblerListingLocation=".\win32\obj/" ObjectFile=".\win32\obj/" ProgramDataBaseFileName=".\win32\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -116,9 +116,9 @@ /> @@ -702,24 +702,24 @@ /> @@ -161,7 +161,7 @@ AssemblerListingLocation=".\win64\obj/" ObjectFile=".\win64\obj/" ProgramDataBaseFileName=".\win64\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -255,7 +255,7 @@ AssemblerListingLocation=".\win32\objd/" ObjectFile=".\win32\objd/" ProgramDataBaseFileName=".\win32\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="4" CompileAs="0" @@ -351,7 +351,7 @@ AssemblerListingLocation=".\win64\objd/" ObjectFile=".\win64\objd/" ProgramDataBaseFileName=".\win64\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" diff --git a/samples/mfc/standard/08_HLR/src/HLRView2D.cpp b/samples/mfc/standard/08_HLR/src/HLRView2D.cpp index 8b4920ae91..aaa4864aa3 100755 --- a/samples/mfc/standard/08_HLR/src/HLRView2D.cpp +++ b/samples/mfc/standard/08_HLR/src/HLRView2D.cpp @@ -79,9 +79,9 @@ void CHLRView2D::OnInitialUpdate() //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CHLRView2D::DragEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState ) +void CHLRView2D::DragEvent2D(const Standard_Integer /*x*/, + const Standard_Integer /*y*/, + const Standard_Integer /*TheState*/) { } @@ -89,33 +89,33 @@ void CHLRView2D::DragEvent2D(const Standard_Integer x , //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CHLRView2D::InputEvent2D(const Standard_Integer x , - const Standard_Integer y ) +void CHLRView2D::InputEvent2D(const Standard_Integer /*x*/, + const Standard_Integer /*y*/) { } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CHLRView2D::MoveEvent2D(const Standard_Integer x , - const Standard_Integer y ) +void CHLRView2D::MoveEvent2D(const Standard_Integer /*x*/, + const Standard_Integer /*y*/) { } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CHLRView2D::MultiMoveEvent2D(const Standard_Integer x , - const Standard_Integer y ) +void CHLRView2D::MultiMoveEvent2D(const Standard_Integer /*x*/, + const Standard_Integer /*y*/) { } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CHLRView2D::MultiDragEvent2D(const Standard_Integer x , - const Standard_Integer y , - const Standard_Integer TheState) +void CHLRView2D::MultiDragEvent2D(const Standard_Integer /*x*/, + const Standard_Integer /*y*/, + const Standard_Integer /*TheState*/) { } @@ -123,8 +123,8 @@ void CHLRView2D::MultiDragEvent2D(const Standard_Integer x , //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CHLRView2D::MultiInputEvent2D(const Standard_Integer x , - const Standard_Integer y ) +void CHLRView2D::MultiInputEvent2D(const Standard_Integer /*x*/, + const Standard_Integer /*y*/) { } 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 4463298237..ae1b381273 100644 --- a/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj +++ b/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj @@ -101,7 +101,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -143,7 +143,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default @@ -187,7 +187,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -229,7 +229,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default 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 6fadb82234..d00c3a346a 100644 --- a/samples/mfc/standard/09_Animation/adm/win/vc11/Animation.vcxproj +++ b/samples/mfc/standard/09_Animation/adm/win/vc11/Animation.vcxproj @@ -105,7 +105,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -147,7 +147,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default @@ -191,7 +191,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -233,7 +233,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default 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 6a2186e7bf..b2fa16dcc3 100644 --- a/samples/mfc/standard/09_Animation/adm/win/vc8/Animation.vcproj +++ b/samples/mfc/standard/09_Animation/adm/win/vc8/Animation.vcproj @@ -62,7 +62,7 @@ AssemblerListingLocation=".\win32\objd/" ObjectFile=".\win32\objd/" ProgramDataBaseFileName=".\win32\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="4" CompileAs="0" @@ -116,9 +116,9 @@ /> @@ -711,24 +711,24 @@ /> @@ -353,7 +353,7 @@ AssemblerListingLocation=".\win64\obj/" ObjectFile=".\win64\obj/" ProgramDataBaseFileName=".\win64\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> diff --git a/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp b/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp index 1729c3795d..33de177666 100755 --- a/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp +++ b/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp @@ -205,9 +205,9 @@ void CAnimationDoc::DragEvent(const Standard_Integer x , //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CAnimationDoc::InputEvent(const Standard_Integer x , - const Standard_Integer y , - const Handle(V3d_View)& aView ) +void CAnimationDoc::InputEvent(const Standard_Integer /*x*/, + const Standard_Integer /*y*/, + const Handle(V3d_View)& /*aView*/ ) { myAISContext->Select(); } @@ -257,19 +257,19 @@ void CAnimationDoc::ShiftDragEvent(const Standard_Integer x , //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CAnimationDoc::ShiftInputEvent(const Standard_Integer x , - const Standard_Integer y , - const Handle(V3d_View)& aView ) +void CAnimationDoc::ShiftInputEvent(const Standard_Integer /*x*/, + const Standard_Integer /*y*/, + const Handle(V3d_View)& /*aView*/) { - myAISContext->ShiftSelect(); + myAISContext->ShiftSelect(); } //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void CAnimationDoc::Popup(const Standard_Integer x, - const Standard_Integer y , - const Handle(V3d_View)& aView ) +void CAnimationDoc::Popup(const Standard_Integer /*x*/, + const Standard_Integer /*y*/ , + const Handle(V3d_View)& /*aView*/) { } diff --git a/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp b/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp index ad9477159b..aa3ef38156 100755 --- a/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp +++ b/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp @@ -114,7 +114,7 @@ BOOL CAnimationView3D::PreCreateWindow(CREATESTRUCT& cs) ///////////////////////////////////////////////////////////////////////////// // CAnimationView3D drawing -void CAnimationView3D::OnDraw(CDC* pDC) +void CAnimationView3D::OnDraw(CDC* /*pDC*/) { CAnimationDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); @@ -245,7 +245,7 @@ void CAnimationView3D::OnFileExportImage() SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); } -void CAnimationView3D::OnSize(UINT nType, int cx, int cy) +void CAnimationView3D::OnSize(UINT /*nType*/, int cx, int cy) { m_cx = cx ; m_cy = cy ; @@ -449,7 +449,7 @@ void CAnimationView3D::OnLButtonUp(UINT nFlags, CPoint point) } // else // if ( Ctrl ) } -void CAnimationView3D::OnMButtonDown(UINT nFlags, CPoint point) +void CAnimationView3D::OnMButtonDown(UINT nFlags, CPoint /*point*/) { if ( nFlags & MK_CONTROL ) { @@ -458,7 +458,7 @@ void CAnimationView3D::OnMButtonDown(UINT nFlags, CPoint point) } } -void CAnimationView3D::OnMButtonUp(UINT nFlags, CPoint point) +void CAnimationView3D::OnMButtonUp(UINT nFlags, CPoint /*point*/) { if ( nFlags & MK_CONTROL ) { @@ -484,7 +484,7 @@ void CAnimationView3D::OnRButtonDown(UINT nFlags, CPoint point) } } -void CAnimationView3D::OnRButtonUp(UINT nFlags, CPoint point) +void CAnimationView3D::OnRButtonUp(UINT /*nFlags*/, CPoint /*point*/) { SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); myView->SetComputedMode (myHlrModeIsOn); @@ -682,7 +682,7 @@ void CAnimationView3D::DrawRectangle(const Standard_Integer MinX , else if (aLineStyle == Default) { m_Pen = NULL; m_DrawMode = R2_MERGEPENNOT;} - CPen* aOldPen; + CPen* aOldPen = NULL; CClientDC clientDC(this); if (m_Pen) aOldPen = clientDC.SelectObject(m_Pen); clientDC.SetROP2(m_DrawMode); @@ -792,7 +792,7 @@ void CAnimationView3D::OnSensitivity() } } -void CAnimationView3D::Fly (int x , int y) +void CAnimationView3D::Fly (int /*x*/ , int y) { double v [3] ; double l ; @@ -824,7 +824,7 @@ void CAnimationView3D::Fly (int x , int y) /* Rotation */ -void CAnimationView3D::Turn (int x , int y) +void CAnimationView3D::Turn (int x , int /*y*/) { gp_Vec z (0.,0.,1.) ; @@ -859,7 +859,7 @@ void CAnimationView3D::Turn (int x , int y) m_Atz = m_Eyez + aZ ; } -void CAnimationView3D::Roll (int x , int y) +void CAnimationView3D::Roll (int x , int /*y*/) { gp_Vec z (0.,0.,1.) ; @@ -893,7 +893,7 @@ void CAnimationView3D::Roll (int x , int y) m_Atz = m_Eyez + aZ ; } -void CAnimationView3D::Twist (int x , int y) +void CAnimationView3D::Twist (int x , int /*y*/) { double sens ; double a ; diff --git a/samples/mfc/standard/09_Animation/src/Fonc.cxx b/samples/mfc/standard/09_Animation/src/Fonc.cxx index c80044a7eb..d2b317eb3b 100755 --- a/samples/mfc/standard/09_Animation/src/Fonc.cxx +++ b/samples/mfc/standard/09_Animation/src/Fonc.cxx @@ -32,7 +32,7 @@ Standard_Boolean grid2surf(const CString aCStringShapeName, { char tmp_char[256] =""; strcpy_s(tmp_char,aCStringShapeName); - int i = 0, len = strlen(tmp_char); + int i = 0, len = (int)strlen(tmp_char); while (i < len) { if (tmp_char[i] == '\\') @@ -70,8 +70,8 @@ Handle(TColStd_HArray2OfReal) ReadRegularGrid(Standard_CString FileName, H = new TColStd_HArray2OfReal(C1, C2, R1, R2); - Standard_Real FirstX; - Standard_Real FirstY; + Standard_Real FirstX = 0.0; + Standard_Real FirstY = 0.0; for(R = R1; R <= R2; R++) { @@ -125,7 +125,7 @@ Handle(TColStd_HArray2OfReal) ReadRegularGrid(const CString aCStringFileName, { char tmp_char[256] =""; strcpy_s(tmp_char,aCStringFileName); - int i = 0, len = strlen(tmp_char); + int i = 0, len = (int)strlen(tmp_char); while (i < len) { if (tmp_char[i] == '\\') 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 e2ae16bdef..dd9ab78d3c 100644 --- a/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj +++ b/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj @@ -104,7 +104,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -149,7 +149,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -192,7 +192,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -236,7 +236,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default 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 987575fdd9..afb3c52dd5 100644 --- a/samples/mfc/standard/10_Convert/adm/win/vc11/Convert.vcxproj +++ b/samples/mfc/standard/10_Convert/adm/win/vc11/Convert.vcxproj @@ -108,7 +108,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -153,7 +153,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default @@ -196,7 +196,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -240,7 +240,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default 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 2e9290841d..98e9b28ceb 100644 --- a/samples/mfc/standard/10_Convert/adm/win/vc8/Convert.vcproj +++ b/samples/mfc/standard/10_Convert/adm/win/vc8/Convert.vcproj @@ -64,7 +64,7 @@ AssemblerListingLocation=".\win32\obj/" ObjectFile=".\win32\obj/" ProgramDataBaseFileName=".\win32\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -118,9 +118,9 @@ /> @@ -163,7 +163,7 @@ AssemblerListingLocation=".\win64\obj/" ObjectFile=".\win64\obj/" ProgramDataBaseFileName=".\win64\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> @@ -259,7 +259,7 @@ AssemblerListingLocation=".\win32\objd/" ObjectFile=".\win32\objd/" ProgramDataBaseFileName=".\win32\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="4" CompileAs="0" @@ -356,7 +356,7 @@ AssemblerListingLocation=".\win64\objd/" ObjectFile=".\win64\objd/" ProgramDataBaseFileName=".\win64\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" diff --git a/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.cpp b/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.cpp index a19b4960ad..58ad7b7dc3 100755 --- a/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.cpp +++ b/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.cpp @@ -32,7 +32,7 @@ ISession_Curve::~ISession_Curve() { } -void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, +void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer /*aMode*/) { @@ -45,14 +45,14 @@ void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresen StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer); } -void ISession_Curve::Compute(const Handle(Prs3d_Projector)& aProjector, - const Handle(Prs3d_Presentation)& aPresentation) +void ISession_Curve::Compute(const Handle(Prs3d_Projector)& /*aProjector*/, + const Handle(Prs3d_Presentation)& /*aPresentation*/) { } -void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) +void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, + const Standard_Integer /*aMode*/) { } diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp index 9cfcc5e900..7195257527 100755 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp +++ b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp @@ -107,7 +107,7 @@ void COCCDemoView::OnInitialUpdate() RedrawVisMode(); } -void COCCDemoView::OnDraw(CDC* pDC) +void COCCDemoView::OnDraw(CDC* /*pDC*/) { COCCDemoDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); @@ -139,7 +139,7 @@ COCCDemoDoc* COCCDemoView::GetDocument() // non-debug version is inline ///////////////////////////////////////////////////////////////////////////// // COCCDemoView message handlers -void COCCDemoView::OnSize(UINT nType, int cx, int cy) +void COCCDemoView::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/) { if (!myView.IsNull()) myView->MustBeResized(); @@ -291,7 +291,7 @@ void COCCDemoView::OnRButtonDown(UINT nFlags, CPoint point) } } -void COCCDemoView::OnRButtonUp(UINT nFlags, CPoint point) +void COCCDemoView::OnRButtonUp(UINT /*nFlags*/, CPoint /*point*/) { if (myVisMode == VIS_HLR) { @@ -431,7 +431,7 @@ void COCCDemoView::DrawRectangle(const Standard_Integer MinX, m_Pen = NULL; m_DrawMode = R2_MERGEPENNOT; } - CPen* aOldPen; + CPen* aOldPen = NULL; CClientDC clientDC(this); if (m_Pen) aOldPen = clientDC.SelectObject(m_Pen); diff --git a/samples/mfc/standard/Common/DimensionDlg.cpp b/samples/mfc/standard/Common/DimensionDlg.cpp index 1ae8cf7645..2179bf6f32 100644 --- a/samples/mfc/standard/Common/DimensionDlg.cpp +++ b/samples/mfc/standard/Common/DimensionDlg.cpp @@ -399,7 +399,7 @@ void CDimensionDlg::OnBnClickedDimRadius() //purpose : it is called when in Length tab control current tab was changed //======================================================================= -void CDimensionDlg::OnTcnSelChangeLengthTab (NMHDR *pNMHDR, LRESULT *pResult) +void CDimensionDlg::OnTcnSelChangeLengthTab (NMHDR * /*pNMHDR*/, LRESULT *pResult) { // Show this chosen tab page int aTabNum = ((CTabCtrl*) GetDlgItem (IDC_LengthTab))->GetCurSel(); @@ -420,7 +420,7 @@ void CDimensionDlg::OnTcnSelChangeLengthTab (NMHDR *pNMHDR, LRESULT *pResult) // It is used to hide the current tab here to prevent collisions. //======================================================================= -void CDimensionDlg::OnTcnSelChangingLengthTab (NMHDR *pNMHDR, LRESULT *pResult) +void CDimensionDlg::OnTcnSelChangingLengthTab (NMHDR * /*pNMHDR*/, LRESULT *pResult) { // Hide current tab page int aTabNum = ((CTabCtrl*) GetDlgItem (IDC_LengthTab))->GetCurSel(); @@ -438,7 +438,7 @@ void CDimensionDlg::OnTcnSelChangingLengthTab (NMHDR *pNMHDR, LRESULT *pResult) //purpose : it is called when in Angle tab control current tab was changed //======================================================================= -void CDimensionDlg::OnTcnSelChangeAngleTab (NMHDR *pNMHDR, LRESULT *pResult) +void CDimensionDlg::OnTcnSelChangeAngleTab (NMHDR * /*pNMHDR*/, LRESULT *pResult) { int aTabNum = ((CTabCtrl*) GetDlgItem (IDC_AngleTab))->GetCurSel(); TC_ITEM anItem; @@ -458,7 +458,7 @@ void CDimensionDlg::OnTcnSelChangeAngleTab (NMHDR *pNMHDR, LRESULT *pResult) // It is used to hide the current tab here to prevent collisions. //======================================================================= -void CDimensionDlg::OnTcnSelChangingAngleTab (NMHDR *pNMHDR, LRESULT *pResult) +void CDimensionDlg::OnTcnSelChangingAngleTab (NMHDR * /*pNMHDR*/, LRESULT *pResult) { int aTabNum = ((CTabCtrl*) GetDlgItem (IDC_AngleTab))->GetCurSel(); TC_ITEM anItem; diff --git a/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.cpp b/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.cpp index 4dd1d24d78..14f0d784cf 100755 --- a/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.cpp +++ b/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.cpp @@ -64,9 +64,9 @@ void ISession2D_Shape::BuildPolyAlgo() myPolyAlgo->Update(); } -void ISession2D_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager, - const Handle(Prs3d_Presentation)& thePresentation, - const Standard_Integer theMode) +void ISession2D_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*thePresentationManager*/, + const Handle(Prs3d_Presentation)& thePresentation, + const Standard_Integer theMode) { Standard_Integer aMode = theMode; @@ -306,8 +306,8 @@ void ISession2D_Shape::DrawCompound(const Handle(Prs3d_Presentation)& thePresent StdPrs_WFDeflectionShape::Add(thePresentation,TopoDS_Shape(theCompound),myDrawer); } -void ISession2D_Shape::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) +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 257c3d8a66..38cd560bec 100755 --- a/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.h +++ b/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.h @@ -17,42 +17,38 @@ DEFINE_STANDARD_HANDLE(ISession2D_Shape,AIS_InteractiveObject) class ISession2D_Shape : public AIS_InteractiveObject { public: - - // Methods PUBLIC - // Standard_EXPORT ISession2D_Shape (); void Standard_EXPORT Add(const TopoDS_Shape& aShape); -DEFINE_STANDARD_RTTI(ISession2D_Shape) - - -// myProjector -HLRAlgo_Projector& Projector() { return myProjector;}; +HLRAlgo_Projector& Projector() { return myProjector; } Standard_EXPORT void SetProjector(HLRAlgo_Projector& aProjector); private: Standard_Integer myNbIsos; + public : Standard_Integer& NbIsos() { return myNbIsos;}; Standard_EXPORT void SetNbIsos(Standard_Integer& aNbIsos) ; -Standard_Boolean AcceptShapeDecomposition() {return Standard_True;}; +Standard_Boolean AcceptShapeDecomposition() {return Standard_True;} -virtual Standard_Boolean AcceptSelectionMode(const Standard_Integer aMode) const -{return Standard_True; } +virtual Standard_Boolean AcceptSelectionMode(const Standard_Integer /*aMode*/) const +{return Standard_True; } +DEFINE_STANDARD_RTTI(ISession2D_Shape) private: - - // Methods PRIVATE - // void BuildAlgo(); void BuildPolyAlgo(); -void DrawCompound(const Handle(Prs3d_Presentation)& thePresentation,const TopoDS_Shape& theCompound, const Handle(Prs3d_LineAspect) theAspect); +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)& thePresentationManager,const Handle(Prs3d_Presentation)& thePresentation,const Standard_Integer theMode = 0) ; +Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager, + const Handle(Prs3d_Presentation)& thePresentation, + const Standard_Integer theMode = 0); virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; @@ -61,8 +57,6 @@ TopTools_ListOfShape myListOfShape; HLRAlgo_Projector myProjector; Handle(HLRBRep_Algo) myAlgo; Handle(HLRBRep_PolyAlgo) myPolyAlgo; - - }; diff --git a/samples/mfc/standard/Common/ImportExport/ImportExport.cpp b/samples/mfc/standard/Common/ImportExport/ImportExport.cpp index 0396646604..590f4d466d 100755 --- a/samples/mfc/standard/Common/ImportExport/ImportExport.cpp +++ b/samples/mfc/standard/Common/ImportExport/ImportExport.cpp @@ -117,41 +117,42 @@ int CImportExport::ReadBREP(const Handle_AIS_InteractiveContext& anInteractiveCo return 0; } -Handle(TopTools_HSequenceOfShape) CImportExport::ReadBREP(LPCTSTR InitialDir /* = NULL*/) // not by reference --> the sequence is created here !! +Handle(TopTools_HSequenceOfShape) CImportExport::ReadBREP(LPCTSTR /*InitialDir*/ /* = NULL*/) // not by reference --> the sequence is created here !! { CFileDialog dlg(TRUE, - NULL, - NULL, - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - "BREP Files (*.brep , *.rle)|*.brep; *.BREP; *.rle; *.RLE; |All Files (*.*)|*.*||", - NULL ); + NULL, + NULL, + OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, + "BREP Files (*.brep , *.rle)|*.brep; *.BREP; *.rle; *.RLE; |All Files (*.*)|*.*||", + NULL ); -TCHAR tchBuf[80]; + TCHAR tchBuf[80]; -CString CASROOTValue = ((GetEnvironmentVariable("CASROOT", tchBuf, 80) > 0) ? tchBuf : NULL); -CString initdir = (CASROOTValue + "\\..\\data\\occ"); + CString CASROOTValue = ((GetEnvironmentVariable("CASROOT", tchBuf, 80) > 0) ? tchBuf : NULL); + CString initdir = (CASROOTValue + "\\..\\data\\occ"); -dlg.m_ofn.lpstrInitialDir = initdir; + dlg.m_ofn.lpstrInitialDir = initdir; Handle(TopTools_HSequenceOfShape) aSequence= new TopTools_HSequenceOfShape(); if (dlg.DoModal() == IDOK) { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - CString filename = dlg.GetPathName(); + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); + CString filename = dlg.GetPathName(); TopoDS_Shape aShape; Standard_CString aFileName = (Standard_CString)(LPCTSTR)filename; - Standard_Boolean result = ReadBREP(aFileName,aShape); - if (result) + Standard_Boolean result = ReadBREP(aFileName,aShape); + if (result) { - if (!BRepAlgo::IsValid(aShape)) - MessageBox(AfxGetMainWnd()->m_hWnd,"Warning: The shape is not valid!","Cascade Warning",MB_ICONWARNING); - aSequence->Append(aShape); + if (!BRepAlgo::IsValid(aShape)) + MessageBox(AfxGetMainWnd()->m_hWnd,"Warning: The shape is not valid!","Cascade Warning",MB_ICONWARNING); + + aSequence->Append(aShape); } else - MessageBox(AfxGetMainWnd()->m_hWnd,"Error: The file was not read","Cascade Error",MB_ICONERROR); + MessageBox(AfxGetMainWnd()->m_hWnd,"Error: The file was not read","Cascade Error",MB_ICONERROR); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); + SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); } return aSequence; @@ -449,14 +450,15 @@ void CImportExport::SaveCSFDB(const Handle(AIS_InteractiveContext)& anInteractiv Standard_Boolean CImportExport::SaveCSFDB(const Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape) { Standard_Boolean result = Standard_False; - CFileSaveCSFDBDialog aDlg(NULL); - aDlg.m_TriangleMode = MgtBRep_WithTriangle; - if (aDlg.DoModal() == IDOK) { + CFileSaveCSFDBDialog aDlg(NULL); + aDlg.m_TriangleMode = MgtBRep_WithTriangle; + if (aDlg.DoModal() == IDOK) + { SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); CString filename = aDlg.GetPathName(); Standard_CString aFileName = (Standard_CString)(LPCTSTR)filename; TCollection_AsciiString Message; - MgtBRep_TriangleMode selection = aDlg.m_TriangleMode; + //MgtBRep_TriangleMode selection = aDlg.m_TriangleMode; Standard_Boolean result = SaveCSFDB(aFileName,aHSequenceOfShape,Message); if (result) { @@ -473,7 +475,7 @@ Standard_Boolean CImportExport::SaveCSFDB(const Handle(TopTools_HSequenceOfShape Standard_Boolean CImportExport::SaveCSFDB(const Standard_CString& aFileName, const Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape, TCollection_AsciiString& ReturnMessage,// out parameter - MgtBRep_TriangleMode aTriangleMode /* = MgtBRep_WithTriangle */) + MgtBRep_TriangleMode /*aTriangleMode*/ /* = MgtBRep_WithTriangle */) { Standard_Boolean ReturnValue = Standard_True; if (aHSequenceOfShape->Length() == 0) @@ -763,7 +765,7 @@ IFSelect_ReturnStatus CImportExport::ReadSTEP(const Standard_CString& aFileName, Standard_Integer nbr = aReader.NbRootsForTransfer(); aReader.PrintCheckTransfer (failsonly, IFSelect_ItemsByEntity); for ( Standard_Integer n = 1; n<=nbr; n++) { - Standard_Boolean ok = aReader.TransferRoot(n); + /*Standard_Boolean ok =*/ aReader.TransferRoot(n); } // Collecting resulting entities @@ -833,7 +835,7 @@ IFSelect_ReturnStatus CImportExport::SaveSTEP(const Handle(TopTools_HSequenceOfS return IFSelect_RetError; } - IFSelect_ReturnStatus status; + IFSelect_ReturnStatus status = IFSelect_RetVoid; CFileSaveSTEPDialog aDlg(NULL); diff --git a/samples/mfc/standard/Common/OCC_2dView.cpp b/samples/mfc/standard/Common/OCC_2dView.cpp index fd1bf3d67b..74ff4e2bc6 100755 --- a/samples/mfc/standard/Common/OCC_2dView.cpp +++ b/samples/mfc/standard/Common/OCC_2dView.cpp @@ -89,7 +89,7 @@ BOOL OCC_2dView::PreCreateWindow(CREATESTRUCT& cs) ///////////////////////////////////////////////////////////////////////////// // OCC_2dView drawing -void OCC_2dView::OnDraw(CDC* pDC) +void OCC_2dView::OnDraw(CDC* /*pDC*/) { if (!myV2dView.IsNull()) myV2dView->Update(); @@ -382,7 +382,7 @@ void OCC_2dView::OnLButtonUp(UINT nFlags, CPoint point) } // else // if ( CASCADESHORTCUTKEY ) } -void OCC_2dView::OnMButtonDown(UINT nFlags, CPoint point) +void OCC_2dView::OnMButtonDown(UINT nFlags, CPoint /*point*/) { if ( nFlags & CASCADESHORTCUTKEY ) { @@ -391,7 +391,7 @@ void OCC_2dView::OnMButtonDown(UINT nFlags, CPoint point) } } -void OCC_2dView::OnMButtonUp(UINT nFlags, CPoint point) +void OCC_2dView::OnMButtonUp(UINT nFlags, CPoint /*point*/) { if ( nFlags & CASCADESHORTCUTKEY ) { @@ -407,10 +407,18 @@ void OCC_2dView::OnRButtonDown(UINT nFlags, CPoint point) #endif } -void OCC_2dView::OnRButtonUp(UINT nFlags, CPoint point) +void OCC_2dView::OnRButtonUp(UINT +#ifndef POPUPONBUTTONDOWN + nFlags +#endif + , CPoint +#ifndef POPUPONBUTTONDOWN + point +#endif + ) { #ifndef POPUPONBUTTONDOWN - if ( !(nFlags & CASCADESHORTCUTKEY) ) + if ( !(nFlags & CASCADESHORTCUTKEY) ) Popup2D(point.x,point.y); #endif } @@ -495,7 +503,7 @@ void OCC_2dView::OnMouseMove(UINT nFlags, CPoint point) } -void OCC_2dView::OnSize(UINT nType, int cx, int cy) +void OCC_2dView::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/) { // Take care : This fonction is call before OnInitialUpdate if (!myV2dView.IsNull()) @@ -599,7 +607,7 @@ void OCC_2dView::DrawRectangle2D(const Standard_Integer MinX, else if (aLineStyle == Default) { m_Pen = NULL; m_DrawMode = R2_MERGEPENNOT;} - CPen* aOldPen; + CPen* aOldPen = NULL; CClientDC clientDC(this); if (m_Pen) aOldPen = clientDC.SelectObject(m_Pen); clientDC.SetROP2(m_DrawMode); @@ -671,8 +679,8 @@ void OCC_2dView::DragEvent2D(const Standard_Integer x, //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void OCC_2dView::InputEvent2D(const Standard_Integer x , - const Standard_Integer y ) +void OCC_2dView::InputEvent2D(const Standard_Integer /*x*/, + const Standard_Integer /*y*/) { ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->Select(true); } @@ -735,8 +743,8 @@ void OCC_2dView::MultiDragEvent2D(const Standard_Integer x , //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void OCC_2dView::MultiInputEvent2D(const Standard_Integer x , - const Standard_Integer y ) +void OCC_2dView::MultiInputEvent2D(const Standard_Integer /*x*/, + const Standard_Integer /*y*/) { ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->ShiftSelect(true); } diff --git a/samples/mfc/standard/Common/OCC_3dBaseDoc.cpp b/samples/mfc/standard/Common/OCC_3dBaseDoc.cpp index a55e2e060e..b579e8b055 100755 --- a/samples/mfc/standard/Common/OCC_3dBaseDoc.cpp +++ b/samples/mfc/standard/Common/OCC_3dBaseDoc.cpp @@ -168,9 +168,9 @@ void OCC_3dBaseDoc::ShiftDragEvent (const Standard_Integer theMouseX, //----------------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------------- -void OCC_3dBaseDoc::ShiftInputEvent (const Standard_Integer theMouseX, - const Standard_Integer theMouseY, - const Handle(V3d_View)& theView) +void OCC_3dBaseDoc::ShiftInputEvent (const Standard_Integer /*theMouseX*/, + const Standard_Integer /*theMouseY*/, + const Handle(V3d_View)& /*theView*/) { myAISContext->ShiftSelect(); } @@ -322,9 +322,9 @@ 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(); + //CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; + //CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); + //OCC_3dView *pView = (OCC_3dView *) pChild->GetActiveView(); } void OCC_3dBaseDoc::OnUpdateObjectMaterial(CCmdUI* pCmdUI) @@ -366,9 +366,9 @@ void OCC_3dBaseDoc::OnObjectTransparency() { CDialogTransparency DialBox(myAISContext); DialBox.DoModal(); - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - OCC_3dView *pView = (OCC_3dView *) pChild->GetActiveView(); + //CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; + //CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); + //OCC_3dView *pView = (OCC_3dView *) pChild->GetActiveView(); // pView->Redraw(); } @@ -429,7 +429,7 @@ void OCC_3dBaseDoc::OnObjectAddDimensions() myDimensionDlg.UpdateStandardMode (); } -void OCC_3dBaseDoc::OnUpdateObjectAddDimensions(CCmdUI* pCmdUI) +void OCC_3dBaseDoc::OnUpdateObjectAddDimensions(CCmdUI* /*pCmdUI*/) { // Check if local context is opened //pCmdUI->Enable (myAISContext->HasOpenedContext()); diff --git a/samples/mfc/standard/Common/OCC_3dDoc.cpp b/samples/mfc/standard/Common/OCC_3dDoc.cpp index 171b6a8814..ae66a7130d 100755 --- a/samples/mfc/standard/Common/OCC_3dDoc.cpp +++ b/samples/mfc/standard/Common/OCC_3dDoc.cpp @@ -36,11 +36,9 @@ OCC_3dDoc::~OCC_3dDoc() void OCC_3dDoc::PocessTextInDialog(char* aTitle, TCollection_AsciiString& aMessage) { // aMessage+= "-------------------------------- END ----------------------------------------\n"; - CString text(aMessage.ToCString()); - myCResultDialog.SetTitle(CString(aTitle)); - myCResultDialog.SetText(text); - SetTitle(CString(aTitle)); - + myCResultDialog.SetTitle(aTitle); + myCResultDialog.SetText(aMessage.ToCString()); + SetTitle(aTitle); } void OCC_3dDoc::ClearDialog() @@ -72,5 +70,5 @@ CString OCC_3dDoc::GetDialogText() void OCC_3dDoc::SetDialogTitle(TCollection_AsciiString theTitle) { - myCResultDialog.SetTitle(CString(theTitle.ToCString())); + myCResultDialog.SetTitle(theTitle.ToCString()); } diff --git a/samples/mfc/standard/Common/OCC_3dView.cpp b/samples/mfc/standard/Common/OCC_3dView.cpp index d50b687470..e53fbf10b9 100755 --- a/samples/mfc/standard/Common/OCC_3dView.cpp +++ b/samples/mfc/standard/Common/OCC_3dView.cpp @@ -108,17 +108,16 @@ void OCC_3dView::OnInitialUpdate() myCurrentMode = CurAction3d_Nothing; } -void OCC_3dView::OnDraw(CDC* pDC) -{ - CRect aRect; - GetWindowRect(aRect); - if(myWidth != aRect.Width() || myHeight != aRect.Height()) { - myWidth = aRect.Width(); - myHeight = aRect.Height(); - ::PostMessage ( GetSafeHwnd () , WM_SIZE , SW_SHOW , myWidth + myHeight*65536 ); - } - myView->Redraw(); - +void OCC_3dView::OnDraw(CDC* /*pDC*/) +{ + CRect aRect; + GetWindowRect(aRect); + if(myWidth != aRect.Width() || myHeight != aRect.Height()) { + myWidth = aRect.Width(); + myHeight = aRect.Height(); + ::PostMessage ( GetSafeHwnd () , WM_SIZE , SW_SHOW , myWidth + myHeight*65536 ); + } + myView->Redraw(); } ///////////////////////////////////////////////////////////////////////////// @@ -176,7 +175,7 @@ void OCC_3dView::OnFileExportImage() } } -void OCC_3dView::OnSize(UINT nType, int cx, int cy) +void OCC_3dView::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/) { if (!myView.IsNull()) myView->MustBeResized(); @@ -390,7 +389,7 @@ void OCC_3dView::OnLButtonUp(UINT nFlags, CPoint point) } // else // if ( Ctrl ) } -void OCC_3dView::OnMButtonDown(UINT nFlags, CPoint point) +void OCC_3dView::OnMButtonDown(UINT nFlags, CPoint /*point*/) { if ( nFlags & MK_CONTROL ) { @@ -399,7 +398,7 @@ void OCC_3dView::OnMButtonDown(UINT nFlags, CPoint point) } } -void OCC_3dView::OnMButtonUp(UINT nFlags, CPoint point) +void OCC_3dView::OnMButtonUp(UINT nFlags, CPoint /*point*/) { if ( nFlags & MK_CONTROL ) { @@ -424,7 +423,7 @@ void OCC_3dView::OnRButtonDown(UINT nFlags, CPoint point) } } -void OCC_3dView::OnRButtonUp(UINT nFlags, CPoint point) +void OCC_3dView::OnRButtonUp(UINT /*nFlags*/, CPoint /*point*/) { SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); myView->SetComputedMode (myHlrModeIsOn); @@ -530,7 +529,7 @@ void OCC_3dView::DrawRectangle(const Standard_Integer MinX , else if (aLineStyle == Default) { m_Pen = NULL; m_DrawMode = R2_MERGEPENNOT;} - CPen* aOldPen; + CPen* aOldPen = NULL; CClientDC clientDC(this); if (m_Pen) aOldPen = clientDC.SelectObject(m_Pen); clientDC.SetROP2(m_DrawMode); diff --git a/samples/mfc/standard/Common/OCC_BaseDoc.h b/samples/mfc/standard/Common/OCC_BaseDoc.h index 869d0fdba9..ebff305043 100755 --- a/samples/mfc/standard/Common/OCC_BaseDoc.h +++ b/samples/mfc/standard/Common/OCC_BaseDoc.h @@ -24,35 +24,35 @@ public: 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) {} + 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; diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp index 97098af174..f34f293337 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp @@ -172,9 +172,9 @@ void Sample2D_Face::FillData(Standard_Boolean isSizesRecompute) } } -void Sample2D_Face::Compute ( const Handle(PrsMgr_PresentationManager3d)& thePresentationManager, +void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePresentationManager*/, const Handle(Prs3d_Presentation)& thePresentation, - const Standard_Integer theMode) + const Standard_Integer /*theMode*/) { thePresentation->Clear(); myDrawer->SetWireDraw(1); @@ -385,7 +385,7 @@ void Sample2D_Face::HilightOwnerWithColor ( const Handle(PrsMgr_PresentationMana //for auto select void Sample2D_Face::ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, - const Standard_Integer theMode) + const Standard_Integer /*theMode*/) { if(myshape.IsNull()) return; diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp index 4e26df513f..f712192ffb 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp @@ -37,9 +37,9 @@ Sample2D_Markers::Sample2D_Markers (const Quantity_Length theXPosition , } -void Sample2D_Markers::Compute ( const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode) +void Sample2D_Markers::Compute (const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, + const Handle(Prs3d_Presentation)& aPresentation, + const Standard_Integer /*aMode*/) { if(myMarkerType == Aspect_TOM_USERDEFINED) { diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h index d0a16daccf..1767afe023 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h @@ -37,15 +37,15 @@ DEFINE_STANDARD_RTTI(Sample2D_Markers) private: -virtual void Compute ( const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode); +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){} ; +virtual void ComputeSelection (const Handle(SelectMgr_Selection)& /*aSelection*/, + const Standard_Integer /*aMode*/) {} -Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& theContext){}; +Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& /*theContext*/) {} diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Text.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Text.cpp index ababc0526e..cc71e63622 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Text.cpp +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Text.cpp @@ -32,9 +32,9 @@ Sample2D_Text::Sample2D_Text (const TCollection_AsciiString& theText, myVAlign = theVAlign ; } -void Sample2D_Text::Compute ( const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode) +void Sample2D_Text::Compute (const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, + const Handle(Prs3d_Presentation)& aPresentation, + const Standard_Integer /*aMode*/) { aPresentation->Clear(); diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Text.h b/samples/mfc/standard/Common/Primitive/Sample2D_Text.h index efc4864c13..a4d1e22df0 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Text.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Text.h @@ -49,8 +49,8 @@ private: const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode); - void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) + void ComputeSelection (const Handle(SelectMgr_Selection)& /*aSelection*/, + const Standard_Integer /*aMode*/) { } diff --git a/samples/mfc/standard/Common/ResultDialog.cpp b/samples/mfc/standard/Common/ResultDialog.cpp index ac89e0199b..ee815c4459 100755 --- a/samples/mfc/standard/Common/ResultDialog.cpp +++ b/samples/mfc/standard/Common/ResultDialog.cpp @@ -42,7 +42,7 @@ void CResultDialog::Empty() pEd->SetWindowText(""); } -void CResultDialog::SetText(CString & aText) +void CResultDialog::SetText(const CString & aText) { pEd = (CRichEditCtrl *) GetDlgItem (IDC_RICHEDIT_ResultDialog); pEd->SetWindowText(aText); @@ -65,7 +65,7 @@ BOOL CResultDialog::OnInitDialog() // EXCEPTION: OCX Property Pages should return FALSE } -void CResultDialog::SetTitle(CString & aTitle) +void CResultDialog::SetTitle(const CString & aTitle) { SetWindowText(aTitle); } diff --git a/samples/mfc/standard/Common/ResultDialog.h b/samples/mfc/standard/Common/ResultDialog.h index 93c23a7f1b..31c07a7289 100755 --- a/samples/mfc/standard/Common/ResultDialog.h +++ b/samples/mfc/standard/Common/ResultDialog.h @@ -21,8 +21,8 @@ class Standard_EXPORT CResultDialog : public CDialog public: CResultDialog(CWnd* pParent = NULL); - void SetTitle(CString& aTitle); - void SetText(CString& aText); + void SetTitle(const CString& aTitle); + void SetText(const CString& aText); void GetText(CString& aText); void Empty(); diff --git a/samples/mfc/standard/Common/User_Cylinder.cxx b/samples/mfc/standard/Common/User_Cylinder.cxx index c611621dc0..7048c01947 100755 --- a/samples/mfc/standard/Common/User_Cylinder.cxx +++ b/samples/mfc/standard/Common/User_Cylinder.cxx @@ -54,7 +54,7 @@ AIS_InteractiveObject(PrsMgr_TOP_ProjectorDependant) myCylindricalFaceColor = Quantity_NOC_KHAKI4; } -void User_Cylinder::Compute(const Handle_PrsMgr_PresentationManager3d& aPresentationManager, +void User_Cylinder::Compute(const Handle_PrsMgr_PresentationManager3d& /*aPresentationManager*/, const Handle_Prs3d_Presentation& aPresentation, const Standard_Integer aMode ) { @@ -238,7 +238,7 @@ case 6: //color BAR = GProp_PGProps::Barycentre(Nodes); - const TColgp_Array1OfPnt2d& UVNodes = myT->UVNodes(); + //const TColgp_Array1OfPnt2d& UVNodes = myT->UVNodes(); const Poly_Array1OfTriangle& triangles = myT->Triangles(); TColgp_Array1OfDir myNormal(Nodes.Lower(), Nodes.Upper()); @@ -388,7 +388,7 @@ Quantity_Color User_Cylinder::Color(gp_Pnt& thePoint,Standard_Real AltMin,Standa AltDelta = AltMax-AltMin; red = 0.5- ((0.5*(AltMax-Alt))/(AltDelta)); - Standard_Real A = 7*Alt-7*AltMin; + //Standard_Real A = 7*Alt-7*AltMin; green = (3*AltMax-AltMin)/(3*AltMax-AltMin+(7*Alt-7*AltMin)); blue = 0 ; diff --git a/samples/mfc/standard/readme.txt b/samples/mfc/standard/ReadMe.md old mode 100755 new mode 100644 similarity index 58% rename from samples/mfc/standard/readme.txt rename to samples/mfc/standard/ReadMe.md index ff49f0021f..10ba9ef1b3 --- a/samples/mfc/standard/readme.txt +++ b/samples/mfc/standard/ReadMe.md @@ -1,3 +1,5 @@ +MFC samples {#samples_mfc_standard} +========== 1. Description of the tree structure: --------------------------------------------- @@ -6,7 +8,7 @@ |-- 01_Geometry |-- 02_Modeling |-- 03_Viewer2d - |-- 04_Viewer3d + |-- 04_Viewer3d Projects and sources of samples |-- 05_ImportExport |-- 06_Ocaf |-- 07_Triangulation @@ -14,18 +16,18 @@ |-- 09_Animation |-- 10_Convert | - |-- All-vc"number".sln < Auxilary utility project. It depends on all other sample + |-- All-vc"number".sln Auxilary utility project. It depends on all other sample | projects, so when rebuilded it rebuilds all samples and - | mfcsample library. > + | mfcsample library. | - |-- Common < Common source and header files for samples and - | dynamic-link library mfcsample.dll. > + |-- Common Common source and header files for samples and + | dynamic-link library mfcsample.dll. | - |-- Data < Data files. > + |-- Data Data files. | - |-- mfcsample < Project for mfcsample.dll. This library is used by all + |-- mfcsample Project for mfcsample.dll. This library is used by all | samples. It contains basic funcionality that commonly - | needed in every OCC sample. > + | needed in every OCC sample. | | |-- env.bat This file is called from msvc.bat. @@ -36,22 +38,22 @@ To run the Open CASCADE Technology samples: - > execute run.bat [vc8|vc9|vc10] [win32|win64] [Release|Debug] [SampleName] + execute run.bat [vc8|vc9|vc10] [win32|win64] [Release|Debug] [SampleName] To run the Animation sample: - > execute run.bat vc8 win32 Debug Animation + execute run.bat vc8 win32 Debug Animation 3. Modifying and rebuilding samples: -------------------------------------------- You can modify, compile and launch all sample projects in MS Visual C++ at once: - > execute msvc.bat [vc8|vc9|vc10] [win32|win64] [Release|Debug] + execute msvc.bat [vc8|vc9|vc10] [win32|win64] [Release|Debug] To run all sample projects in MS Visual C++ at once: - > execute msvc.bat vc8 win32 Debug + execute msvc.bat vc8 win32 Debug Note: make sure your PATH environment variable contains a directory, diff --git a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj index 0bfe605b06..853b50358d 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj +++ b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj @@ -101,7 +101,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -145,7 +145,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default @@ -191,7 +191,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -235,7 +235,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default /p:ResGenExecuteAsTool=true;ResGenToolArchitecture=ManagedIL;ResGenTrackerSdkPath="%programfiles(x86)%\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\win64" %(AdditionalOptions) diff --git a/samples/mfc/standard/mfcsample/adm/win/vc11/mfcsample.vcxproj b/samples/mfc/standard/mfcsample/adm/win/vc11/mfcsample.vcxproj index dd79c1866c..f6c613fd91 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc11/mfcsample.vcxproj +++ b/samples/mfc/standard/mfcsample/adm/win/vc11/mfcsample.vcxproj @@ -105,7 +105,7 @@ .\win32\objd/ .\win32\objd/ .\win32\objd/ - Level3 + Level4 true EditAndContinue Default @@ -149,7 +149,7 @@ .\win64\objd/ .\win64\objd/ .\win64\objd/ - Level3 + Level4 true ProgramDatabase Default @@ -195,7 +195,7 @@ .\win32\obj/ .\win32\obj/ .\win32\obj/ - Level3 + Level4 true Default @@ -239,7 +239,7 @@ .\win64\obj/ .\win64\obj/ .\win64\obj/ - Level3 + Level4 true Default /p:ResGenExecuteAsTool=true;ResGenToolArchitecture=ManagedIL;ResGenTrackerSdkPath="%programfiles(x86)%\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\win64" %(AdditionalOptions) diff --git a/samples/mfc/standard/mfcsample/adm/win/vc8/mfcsample.vcproj b/samples/mfc/standard/mfcsample/adm/win/vc8/mfcsample.vcproj index a31a15b5d6..0731b3c9fe 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc8/mfcsample.vcproj +++ b/samples/mfc/standard/mfcsample/adm/win/vc8/mfcsample.vcproj @@ -62,7 +62,7 @@ AssemblerListingLocation=".\win32\objd/" ObjectFile=".\win32\objd/" ProgramDataBaseFileName=".\win32\objd/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="4" CompileAs="0" @@ -117,9 +117,9 @@ /> @@ -1379,24 +1379,24 @@ /> @@ -356,7 +356,7 @@ AssemblerListingLocation=".\win64\obj/" ObjectFile=".\win64\obj/" ProgramDataBaseFileName=".\win64\obj/" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" CompileAs="0" /> diff --git a/samples/mfc/standard/mfcsample/src/mfcsample.cpp b/samples/mfc/standard/mfcsample/src/mfcsample.cpp index e639df0e4b..cfce175a9a 100755 --- a/samples/mfc/standard/mfcsample/src/mfcsample.cpp +++ b/samples/mfc/standard/mfcsample/src/mfcsample.cpp @@ -47,5 +47,5 @@ DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) // Terminate the library before destructors are called AfxTermExtensionModule(mfcsampleDLL); } - return 1; // ok + return 1; // ok } \ No newline at end of file -- 2.20.1