From 9e3ca93a914f206b0a4f457d12628639ce3c004a Mon Sep 17 00:00:00 2001 From: apn Date: Fri, 10 Jul 2015 16:50:28 +0300 Subject: [PATCH] 0024002: Overall code and build procedure refactoring - samples Modified MFC samples; minor fix in headers (for building products) --- .../mfc/standard/01_Geometry/CMakeLists.txt | 14 ++- .../standard/01_Geometry/src/GeoAlgo_Sol.hxx | 2 +- .../standard/01_Geometry/src/GeomSources.cpp | 87 +++++++++--------- .../standard/01_Geometry/src/GeometryDoc.cpp | 2 +- .../standard/01_Geometry/src/GeometryDoc.h | 2 +- .../src/ISession2D/ISession2D_Curve.h | 4 +- .../src/ISession2D/ISession_Curve.h | 3 +- .../src/ISession2D/ISession_Direction.h | 4 +- .../src/ISession2D/ISession_Point.h | 4 +- .../src/ISession2D/ISession_Surface.h | 4 +- .../src/ISession2D/ISession_Text.h | 4 +- samples/mfc/standard/01_Geometry/src/StdAfx.h | 4 +- .../mfc/standard/02_Modeling/CMakeLists.txt | 16 ++-- .../02_Modeling/src/ISession_Direction.h | 6 +- .../standard/02_Modeling/src/ModelingDoc.cpp | 10 +-- samples/mfc/standard/02_Modeling/src/StdAfx.h | 3 +- .../mfc/standard/03_Viewer2d/CMakeLists.txt | 16 ++-- .../mfc/standard/04_Viewer3d/CMakeLists.txt | 14 ++- .../standard/04_Viewer3d/src/ISession_Curve.h | 4 +- .../04_Viewer3d/src/OCCDemo_Presentation.h | 10 +-- .../src/TexturesExt_Presentation.cpp | 4 +- .../src/TexturesExt_Presentation.h | 2 +- .../standard/04_Viewer3d/src/Viewer3dView.h | 1 + .../standard/05_ImportExport/CMakeLists.txt | 16 ++-- .../05_ImportExport/src/FSD_Archive.hxx | 4 +- samples/mfc/standard/06_Ocaf/CMakeLists.txt | 18 ++-- .../mfc/standard/06_Ocaf/src/DebugBrowser.hxx | 3 - .../src/Handle_OCAFSample_CommonDriver.hxx | 89 ------------------- .../06_Ocaf/src/Handle_OCAFSample_Driver.hxx | 89 ------------------- .../src/Handle_TOcafFunction_BoxDriver.hxx | 89 ------------------- .../src/Handle_TOcafFunction_CutDriver.hxx | 89 ------------------- .../src/Handle_TOcafFunction_CylDriver.hxx | 89 ------------------- .../06_Ocaf/src/Handle_TOcaf_Application.hxx | 72 --------------- samples/mfc/standard/06_Ocaf/src/OcafApp.h | 5 +- .../06_Ocaf/src/TOcafFunction_BoxDriver.cxx | 27 +----- .../06_Ocaf/src/TOcafFunction_BoxDriver.hxx | 6 +- .../06_Ocaf/src/TOcafFunction_CutDriver.cxx | 27 +----- .../06_Ocaf/src/TOcafFunction_CutDriver.hxx | 6 +- .../06_Ocaf/src/TOcafFunction_CylDriver.cxx | 27 +----- .../06_Ocaf/src/TOcafFunction_CylDriver.hxx | 6 +- .../06_Ocaf/src/TOcaf_Application.hxx | 12 +-- .../06_Ocaf/src/TOcaf_Application.ixx | 30 +------ .../standard/06_Ocaf/src/TOcaf_Commands.hxx | 5 +- .../standard/07_Triangulation/CMakeLists.txt | 16 ++-- .../07_Triangulation/src/ISession_Curve.h | 4 +- .../src/OCCDemo_Presentation.h | 10 +-- .../src/Tesselate_Presentation.cpp | 2 +- samples/mfc/standard/08_HLR/CMakeLists.txt | 14 ++- .../mfc/standard/09_Animation/CMakeLists.txt | 14 ++- .../mfc/standard/09_Animation/src/Fonc.hxx | 2 +- .../mfc/standard/10_Convert/CMakeLists.txt | 14 ++- .../10_Convert/src/Convert_Presentation.cpp | 7 +- .../10_Convert/src/Convert_Presentation.h | 6 +- .../10_Convert/src/ISession/ISession_Curve.h | 4 +- .../10_Convert/src/OCCDemo_Presentation.h | 10 +-- .../Common/ISession2D/ISession2D_Shape.h | 4 +- samples/mfc/standard/Common/OCC_3dView.cpp | 2 +- samples/mfc/standard/Common/OCC_App.cpp | 2 +- .../standard/Common/Primitive/Sample2D_Face.h | 4 +- .../Common/Primitive/Sample2D_Image.h | 4 +- .../Common/Primitive/Sample2D_Markers.h | 3 +- .../standard/Common/Primitive/Sample2D_Text.h | 4 +- samples/mfc/standard/Common/User_Cylinder.hxx | 5 +- samples/mfc/standard/mfcsample/CMakeLists.txt | 22 +++-- src/Graphic3d/Graphic3d_Camera.cxx | 4 + src/Transfer/Transfer_FinderProcess.hxx | 27 +----- 66 files changed, 269 insertions(+), 844 deletions(-) delete mode 100755 samples/mfc/standard/06_Ocaf/src/Handle_OCAFSample_CommonDriver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/Handle_OCAFSample_Driver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/Handle_TOcafFunction_BoxDriver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/Handle_TOcafFunction_CutDriver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/Handle_TOcafFunction_CylDriver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/Handle_TOcaf_Application.hxx diff --git a/samples/mfc/standard/01_Geometry/CMakeLists.txt b/samples/mfc/standard/01_Geometry/CMakeLists.txt index b64cb78cc3..05f6e2c27c 100644 --- a/samples/mfc/standard/01_Geometry/CMakeLists.txt +++ b/samples/mfc/standard/01_Geometry/CMakeLists.txt @@ -69,11 +69,17 @@ add_executable (Geometry WIN32 ${Geometry_SOURCE_FILES} set_property(TARGET Geometry PROPERTY FOLDER Samples) -install (TARGETS Geometry RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}" - ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}" - LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}") +install (TARGETS Geometry + CONFIGURATIONS Release + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Geometry + CONFIGURATIONS RelWithDebInfo + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Geometry + CONFIGURATIONS Debug + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind") -include_directories (${CMAKE_SOURCE_DIR}/src +include_directories (${CMAKE_BINARY_DIR}/inc ${Geometry_SRC_DIR} ${Geometry_ISESSION2D_DIR} ${Geometry_RESOURCE_DIR} diff --git a/samples/mfc/standard/01_Geometry/src/GeoAlgo_Sol.hxx b/samples/mfc/standard/01_Geometry/src/GeoAlgo_Sol.hxx index 334300e8c6..11de70ac81 100755 --- a/samples/mfc/standard/01_Geometry/src/GeoAlgo_Sol.hxx +++ b/samples/mfc/standard/01_Geometry/src/GeoAlgo_Sol.hxx @@ -16,7 +16,7 @@ #define _GeoAlgo_Sol_HeaderFile #ifndef _Handle_Geom_BSplineSurface_HeaderFile -#include +#include #endif #ifndef _Standard_Boolean_HeaderFile #include diff --git a/samples/mfc/standard/01_Geometry/src/GeomSources.cpp b/samples/mfc/standard/01_Geometry/src/GeomSources.cpp index f9c5322edd..79f44cea61 100755 --- a/samples/mfc/standard/01_Geometry/src/GeomSources.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeomSources.cpp @@ -6,7 +6,8 @@ #include "GeomSources.h" #include "GeometryApp.h" #include "MainFrm.h" - +#include +#include GeomSources::GeomSources() { } @@ -568,7 +569,7 @@ C->D1(param,P,V); \n\ AddSeparator(aDoc,Message); //-------------------------------------------------------------- - DisplayCurve(aDoc,C); + DisplayCurve(aDoc,Handle(Geom2d_Curve)::DownCast(C)); Handle(ISession_Direction) aDirection = new ISession_Direction(P,V); aDoc->GetISessionContext()->Display(aDirection, Standard_False); @@ -889,7 +890,7 @@ if(NbResults>0){ \n\ aString += Message2; DisplayPoint(aDoc,N,aString.ToCString(),false,0.5,0,-0.5); - DisplayCurve(aDoc,C,false); + DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(C),Quantity_NOC_YELLOW,false); if(NbResults>0) { @@ -1052,7 +1053,7 @@ if (ICQ.IsDone()){ \n\ DisplaySurface(aDoc,aSurface); Handle(Geom_Ellipse) anEllips = GC_MakeEllipse(EL).Value(); - DisplayCurve(aDoc,anEllips,false); + DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(anEllips),Quantity_NOC_YELLOW,false); TCollection_AsciiString aString; @@ -1718,7 +1719,7 @@ gp_Ax2d C2DCircleXAxis = C2DCircle->XAxis(); \n\ Message += aC2DEntityTypeName; Message += " \n"; DisplayCurve(aDoc,circ2d,4,false); - DisplayCurve(aDoc,C3D,false); + DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(C3D),Quantity_NOC_YELLOW,false); DisplayCurve(aDoc,C2D,5,false); Handle(ISession_Direction) aC3DCircleXAxisDirection = new ISession_Direction(C3DCircleXAxis.Location(),C3DCircleXAxis.Direction(),5.2); @@ -2369,7 +2370,7 @@ Handle(Geom2d_TrimmedCurve) arc = GCE2d_MakeArcOfEllipse(EE,0.0,PI/4); \n\ \n"); AddSeparator(aDoc,Message); //-------------------------------------------------------------- - Handle(Geom2d_Curve) E = GCE2d_MakeEllipse(EE); + Handle(Geom2d_Ellipse) E = GCE2d_MakeEllipse(EE); Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(E); aCurve->SetColorIndex(3); aCurve->SetTypeOfLine(Aspect_TOL_DOTDASH); @@ -3126,7 +3127,7 @@ void GeomSources::gpTest40(CGeometryDoc* aDoc) GC_MakeSegment(gp_Pnt(1,1,1),gp_Pnt(5,5,5)); Handle(Geom_TrimmedCurve) TC2 = GC_MakeSegment(gp_Pnt(1,1,0),gp_Pnt(4,5,6)); - GeomFill_Pipe aPipe3(SPL1,TC1,TC2); + GeomFill_Pipe aPipe3(Handle(Geom_Curve)::DownCast(SPL1),TC1,TC2); aPipe3.Perform(); Handle(Geom_Surface) aSurface3 = aPipe3.Surface(); Standard_CString aSurfaceEntityTypeName3="Not Computed"; @@ -3949,30 +3950,30 @@ aSPL2Box.Get( aSPL2Xmin, aSPL2Ymin, aSPL2Xmax,aSPL2Ymax); \n\ DisplayPoint(aDoc,gp_Pnt2d(aCXmin,aCYmin),Standard_CString("aCXmin,aCYmin")); DisplayPoint(aDoc,gp_Pnt2d(aCXmax,aCYmin),Standard_CString("aCXmax,aCYmin")); - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmin,aCYmax),gp_Pnt2d(aCXmax,aCYmax)) ,4); // X,Ymax - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmin,aCYmin),gp_Pnt2d(aCXmax,aCYmin)) ,4); // X,Ymin - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmin,aCYmin),gp_Pnt2d(aCXmin,aCYmax)) ,4); // Xmin,Y - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmax,aCYmin),gp_Pnt2d(aCXmax,aCYmax)) ,4); // Xmax,Y + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmin,aCYmax),gp_Pnt2d(aCXmax,aCYmax)).Value() ,4); // X,Ymax + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmin,aCYmin),gp_Pnt2d(aCXmax,aCYmin)).Value() ,4); // X,Ymin + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmin,aCYmin),gp_Pnt2d(aCXmin,aCYmax)).Value() ,4); // Xmin,Y + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aCXmax,aCYmin),gp_Pnt2d(aCXmax,aCYmax)).Value() ,4); // Xmax,Y DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmin,aSPL1Ymax),Standard_CString("aSPL1Xmin,aSPL1Ymax")); DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmax,aSPL1Ymax),Standard_CString("aSPL1Xmax,aSPL1Ymax")); DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmin,aSPL1Ymin),Standard_CString("aSPL1Xmin,aSPL1Ymin")); DisplayPoint(aDoc,gp_Pnt2d(aSPL1Xmax,aSPL1Ymin),Standard_CString("aSPL1Xmax,aSPL1Ymin")); - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmin,aSPL1Ymax),gp_Pnt2d(aSPL1Xmax,aSPL1Ymax)) ,4); // X,Ymax - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmin,aSPL1Ymin),gp_Pnt2d(aSPL1Xmax,aSPL1Ymin)) ,4); // X,Ymin - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmin,aSPL1Ymin),gp_Pnt2d(aSPL1Xmin,aSPL1Ymax)) ,4); // Xmin,Y - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmax,aSPL1Ymin),gp_Pnt2d(aSPL1Xmax,aSPL1Ymax)) ,4); // Xmax,Y + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmin,aSPL1Ymax),gp_Pnt2d(aSPL1Xmax,aSPL1Ymax)).Value() ,4); // X,Ymax + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmin,aSPL1Ymin),gp_Pnt2d(aSPL1Xmax,aSPL1Ymin)).Value() ,4); // X,Ymin + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmin,aSPL1Ymin),gp_Pnt2d(aSPL1Xmin,aSPL1Ymax)).Value() ,4); // Xmin,Y + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL1Xmax,aSPL1Ymin),gp_Pnt2d(aSPL1Xmax,aSPL1Ymax)).Value() ,4); // Xmax,Y 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 - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmin,aSPL2Ymin),gp_Pnt2d(aSPL2Xmin,aSPL2Ymax)) ,4); // Xmin,Y - DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmax,aSPL2Ymin),gp_Pnt2d(aSPL2Xmax,aSPL2Ymax)) ,4); // Xmax,Y + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmin,aSPL2Ymax),gp_Pnt2d(aSPL2Xmax,aSPL2Ymax)).Value() ,4); // X,Ymax + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmin,aSPL2Ymin),gp_Pnt2d(aSPL2Xmax,aSPL2Ymin)).Value() ,4); // X,Ymin + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmin,aSPL2Ymin),gp_Pnt2d(aSPL2Xmin,aSPL2Ymax)).Value() ,4); // Xmin,Y + DisplayCurve(aDoc,GCE2d_MakeSegment(gp_Pnt2d(aSPL2Xmax,aSPL2Ymin),gp_Pnt2d(aSPL2Xmax,aSPL2Ymax)).Value() ,4); // Xmax,Y PostProcess(aDoc,ID_BUTTON_Test_48,TheDisplayType,Message); } @@ -4029,29 +4030,29 @@ aBox.Get( aXmin, aYmin,aZmin, aXmax,aYmax,aZmax); \n\ DisplayPoint(aDoc,gp_Pnt(aXmax,aYmin,aZmax),Standard_CString("aXmax,aYmin,aZmax")); DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmin), - gp_Pnt(aXmax,aYmax,aZmin)) ,Quantity_NOC_RED); // X,Ymax,ZMin + gp_Pnt(aXmax,aYmax,aZmin)).Value() ,Quantity_NOC_RED); // X,Ymax,ZMin DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), - gp_Pnt(aXmax,aYmin,aZmin)) ,Quantity_NOC_RED); // X,Ymin,ZMin + gp_Pnt(aXmax,aYmin,aZmin)).Value() ,Quantity_NOC_RED); // X,Ymin,ZMin DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), - gp_Pnt(aXmin,aYmax,aZmin)) ,Quantity_NOC_RED); // Xmin,Y,ZMin + gp_Pnt(aXmin,aYmax,aZmin)).Value() ,Quantity_NOC_RED); // Xmin,Y,ZMin DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmin), - gp_Pnt(aXmax,aYmax,aZmin)) ,Quantity_NOC_RED); // Xmax,Y,ZMin + gp_Pnt(aXmax,aYmax,aZmin)).Value() ,Quantity_NOC_RED); // Xmax,Y,ZMin DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmax), - gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // X,Ymax,ZMax + gp_Pnt(aXmax,aYmax,aZmax)).Value() ,Quantity_NOC_RED); // X,Ymax,ZMax DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmax), - gp_Pnt(aXmax,aYmin,aZmax)) ,Quantity_NOC_RED); // X,Ymin,ZMax + gp_Pnt(aXmax,aYmin,aZmax)).Value() ,Quantity_NOC_RED); // X,Ymin,ZMax DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmax), - gp_Pnt(aXmin,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmin,Y,ZMax + gp_Pnt(aXmin,aYmax,aZmax)).Value() ,Quantity_NOC_RED); // Xmin,Y,ZMax DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmax), - gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmax,Y,ZMax + gp_Pnt(aXmax,aYmax,aZmax)).Value() ,Quantity_NOC_RED); // Xmax,Y,ZMax DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), - gp_Pnt(aXmin,aYmin,aZmax)) ,Quantity_NOC_RED); // Xmin,Ymin,Z + gp_Pnt(aXmin,aYmin,aZmax)).Value() ,Quantity_NOC_RED); // Xmin,Ymin,Z DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmin), - gp_Pnt(aXmax,aYmin,aZmax)) ,Quantity_NOC_RED); // Xmax,Ymin,Z + gp_Pnt(aXmax,aYmin,aZmax)).Value() ,Quantity_NOC_RED); // Xmax,Ymin,Z DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmin), - gp_Pnt(aXmin,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmin,Ymax,Z + gp_Pnt(aXmin,aYmax,aZmax)).Value() ,Quantity_NOC_RED); // Xmin,Ymax,Z DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmax,aZmin), - gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmax,Ymax,Z + gp_Pnt(aXmax,aYmax,aZmax)).Value() ,Quantity_NOC_RED); // Xmax,Ymax,Z PostProcess(aDoc,ID_BUTTON_Test_49,TheDisplayType,Message); } @@ -4136,29 +4137,29 @@ aBox.Get( aXmin, aYmin,aZmin, aXmax,aYmax,aZmax); \n\ // DisplaySurface(aDoc,aSurf,Quantity_NOC_GREEN); DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmin), - gp_Pnt(aXmax,aYmax,aZmin)) ,Quantity_NOC_RED); // X,Ymax,ZMin + gp_Pnt(aXmax,aYmax,aZmin)).Value() ,Quantity_NOC_RED); // X,Ymax,ZMin DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), - gp_Pnt(aXmax,aYmin,aZmin)) ,Quantity_NOC_RED); // X,Ymin,ZMin + gp_Pnt(aXmax,aYmin,aZmin)).Value() ,Quantity_NOC_RED); // X,Ymin,ZMin DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), - gp_Pnt(aXmin,aYmax,aZmin)) ,Quantity_NOC_RED); // Xmin,Y,ZMin + gp_Pnt(aXmin,aYmax,aZmin)).Value() ,Quantity_NOC_RED); // Xmin,Y,ZMin DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmin), - gp_Pnt(aXmax,aYmax,aZmin)) ,Quantity_NOC_RED); // Xmax,Y,ZMin + gp_Pnt(aXmax,aYmax,aZmin)).Value() ,Quantity_NOC_RED); // Xmax,Y,ZMin DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmax), - gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // X,Ymax,ZMax + gp_Pnt(aXmax,aYmax,aZmax)).Value() ,Quantity_NOC_RED); // X,Ymax,ZMax DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmax), - gp_Pnt(aXmax,aYmin,aZmax)) ,Quantity_NOC_RED); // X,Ymin,ZMax + gp_Pnt(aXmax,aYmin,aZmax)).Value() ,Quantity_NOC_RED); // X,Ymin,ZMax DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmax), - gp_Pnt(aXmin,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmin,Y,ZMax + gp_Pnt(aXmin,aYmax,aZmax)).Value() ,Quantity_NOC_RED); // Xmin,Y,ZMax DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmax), - gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmax,Y,ZMax + gp_Pnt(aXmax,aYmax,aZmax)).Value() ,Quantity_NOC_RED); // Xmax,Y,ZMax DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmin,aZmin), - gp_Pnt(aXmin,aYmin,aZmax)) ,Quantity_NOC_RED); // Xmin,Ymin,Z + gp_Pnt(aXmin,aYmin,aZmax)).Value() ,Quantity_NOC_RED); // Xmin,Ymin,Z DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmin,aZmin), - gp_Pnt(aXmax,aYmin,aZmax)) ,Quantity_NOC_RED); // Xmax,Ymin,Z + gp_Pnt(aXmax,aYmin,aZmax)).Value() ,Quantity_NOC_RED); // Xmax,Ymin,Z DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmin,aYmax,aZmin), - gp_Pnt(aXmin,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmin,Ymax,Z + gp_Pnt(aXmin,aYmax,aZmax)).Value() ,Quantity_NOC_RED); // Xmin,Ymax,Z DisplayCurve(aDoc,GC_MakeSegment(gp_Pnt(aXmax,aYmax,aZmin), - gp_Pnt(aXmax,aYmax,aZmax)) ,Quantity_NOC_RED); // Xmax,Ymax,Z + gp_Pnt(aXmax,aYmax,aZmax)).Value() ,Quantity_NOC_RED); // Xmax,Ymax,Z PostProcess(aDoc,ID_BUTTON_Test_50,TheDisplayType,Message); } diff --git a/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp b/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp index e7d60851c3..ae941c8575 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp @@ -1161,7 +1161,7 @@ static Standard_Boolean fixParam(Standard_Real& theParam) void CGeometryDoc::OnSimplify() { CString initfile(((OCC_App*) AfxGetApp())->GetInitDataDir()); - initfile += L"\\..\\..\\Data\\"; + initfile += L"\\..\\..\\..\\samples\\mfc\\standard\\01_Geometry\\Data\\"; initfile += L"shell1.brep"; std::filebuf aFileBuf; diff --git a/samples/mfc/standard/01_Geometry/src/GeometryDoc.h b/samples/mfc/standard/01_Geometry/src/GeometryDoc.h index 6128ff911a..3d19cc75ee 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryDoc.h +++ b/samples/mfc/standard/01_Geometry/src/GeometryDoc.h @@ -12,7 +12,7 @@ #include "OCC_3dBaseDoc.h" #include "ResultDialog.h" -class Handle_AIS_Point; +#include class CGeometryDoc : public OCC_3dBaseDoc { diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.h index 8c13b9e2ee..6db825d481 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_Curve.h @@ -23,7 +23,7 @@ class SelectMgr_Selection; #include "Geom2d_Curve.hxx" #include "AIS_InteractiveObject.hxx" - +class ISession2D_Curve; DEFINE_STANDARD_HANDLE(ISession2D_Curve,AIS_InteractiveObject) class ISession2D_Curve : public AIS_InteractiveObject { @@ -59,7 +59,7 @@ public: inline Standard_Real GetDiscretisation() const; inline void SetDiscretisation(const Standard_Real aNewDiscretisation) ; - DEFINE_STANDARD_RTTI(ISession2D_Curve) + DEFINE_STANDARD_RTTI(ISession2D_Curve,AIS_InteractiveObject) private: diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.h index eaed619246..2d3b7ff183 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Curve.h @@ -11,6 +11,7 @@ #include #include #include "AIS_InteractiveObject.hxx" +class ISession_Curve; DEFINE_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject) class ISession_Curve : public AIS_InteractiveObject @@ -19,7 +20,7 @@ public: ISession_Curve(Handle(Geom_Curve)& aCurve); virtual ~ISession_Curve(); - DEFINE_STANDARD_RTTI(ISession_Curve) + DEFINE_STANDARD_RTTI(ISession_Curve,AIS_InteractiveObject) private: 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 04a010fbd9..21689f0687 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.h @@ -9,7 +9,7 @@ #pragma once #endif // _MSC_VER >= 1000 #include "gp_Dir2d.hxx" - +class ISession_Direction; DEFINE_STANDARD_HANDLE(ISession_Direction,AIS_InteractiveObject) class ISession_Direction : public AIS_InteractiveObject { @@ -26,7 +26,7 @@ public: ISession_Direction (const gp_Pnt2d& aPnt2d,const gp_Vec2d& aVec2d); virtual ~ISession_Direction(); - DEFINE_STANDARD_RTTI(ISession_Direction) + DEFINE_STANDARD_RTTI(ISession_Direction,AIS_InteractiveObject) private: 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 3b1f589a0e..f192687729 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Point.h @@ -12,7 +12,7 @@ #include #include - +class ISession_Point; DEFINE_STANDARD_HANDLE(ISession_Point,AIS_InteractiveObject) class ISession_Point : public AIS_InteractiveObject { @@ -22,7 +22,7 @@ public: ISession_Point(const gp_Pnt2d& aPoint,Standard_Real Elevation = 0); ISession_Point(const gp_Pnt& aPoint); virtual ~ISession_Point(); - DEFINE_STANDARD_RTTI(ISession_Point) + DEFINE_STANDARD_RTTI(ISession_Point,AIS_InteractiveObject) private : diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.h index c8c2b13ac2..858a05df83 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.h @@ -11,7 +11,7 @@ #include #include - +class ISession_Surface; DEFINE_STANDARD_HANDLE(ISession_Surface,AIS_InteractiveObject) class ISession_Surface : public AIS_InteractiveObject { @@ -20,7 +20,7 @@ public: ISession_Surface(Handle(Geom_Surface)& aSurface); virtual ~ISession_Surface(); -DEFINE_STANDARD_RTTI(ISession_Surface) +DEFINE_STANDARD_RTTI(ISession_Surface,AIS_InteractiveObject) private: Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0); diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.h index 6ad46da0e4..e5065b49ac 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.h @@ -25,7 +25,7 @@ class TCollection_AsciiString; class SelectMgr_Selection; - +class ISession_Text; DEFINE_STANDARD_HANDLE(ISession_Text,AIS_InteractiveObject) class ISession_Text : public AIS_InteractiveObject { @@ -69,7 +69,7 @@ inline Quantity_Factor GetScale() const; inline void SetScale (const Quantity_Factor aNewScale) ; -DEFINE_STANDARD_RTTI(ISession_Text) +DEFINE_STANDARD_RTTI(ISession_Text,AIS_InteractiveObject) private: diff --git a/samples/mfc/standard/01_Geometry/src/StdAfx.h b/samples/mfc/standard/01_Geometry/src/StdAfx.h index 50c8ddd55f..83f6ce6a61 100755 --- a/samples/mfc/standard/01_Geometry/src/StdAfx.h +++ b/samples/mfc/standard/01_Geometry/src/StdAfx.h @@ -109,8 +109,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -129,7 +131,6 @@ #include #include #include -#include #include #include #include @@ -171,6 +172,7 @@ #include #include #include +#include #include #include #include diff --git a/samples/mfc/standard/02_Modeling/CMakeLists.txt b/samples/mfc/standard/02_Modeling/CMakeLists.txt index f1d7835bb3..00e0d8b054 100644 --- a/samples/mfc/standard/02_Modeling/CMakeLists.txt +++ b/samples/mfc/standard/02_Modeling/CMakeLists.txt @@ -39,11 +39,17 @@ add_executable ( Modeling WIN32 ${Modeling_SOURCE_FILES} set_property (TARGET Modeling PROPERTY FOLDER Samples) -install (TARGETS Modeling RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}" - ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}" - LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}") - -include_directories (${CMAKE_SOURCE_DIR}/src +install (TARGETS Modeling + CONFIGURATIONS Release + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Modeling + CONFIGURATIONS RelWithDebInfo + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Modeling + CONFIGURATIONS Debug + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind") + +include_directories (${CMAKE_BINARY_DIR}/inc ${MFC_STANDARD_SAMPLES_DIR}/02_Modeling ${Modeling_SRC_DIR} ${MFC_STANDARD_SAMPLES_DIR}/Common) diff --git a/samples/mfc/standard/02_Modeling/src/ISession_Direction.h b/samples/mfc/standard/02_Modeling/src/ISession_Direction.h index bd34207f2e..7142009bbb 100755 --- a/samples/mfc/standard/02_Modeling/src/ISession_Direction.h +++ b/samples/mfc/standard/02_Modeling/src/ISession_Direction.h @@ -15,7 +15,7 @@ #include "gp_Dir.hxx" #include "gp_Vec.hxx" #include "AIS_InteractiveObject.hxx" - +class ISession_Direction; DEFINE_STANDARD_HANDLE(ISession_Direction,AIS_InteractiveObject) class ISession_Direction : public AIS_InteractiveObject { @@ -24,7 +24,7 @@ public: 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) + DEFINE_STANDARD_RTTI(ISession_Direction,AIS_InteractiveObject) private: @@ -32,7 +32,7 @@ private: const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode); - void ComputeSelection (const class Handle_SelectMgr_Selection &,const int){}; + void ComputeSelection (const class Handle(SelectMgr_Selection) &,const int){}; private: diff --git a/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp b/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp index eb0962a1d7..a6d03bd10e 100755 --- a/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp +++ b/samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp @@ -278,7 +278,7 @@ void CModelingDoc::OnTranslation() gp_Trsf theTransformation; gp_Vec theVectorOfTranslation(-6,-6,6); - Handle (ISession_Direction) aDirection1 = new ISession_Direction(gp_Pnt(0,0,0),theVectorOfTranslation); + Handle(ISession_Direction) aDirection1 = new ISession_Direction(gp_Pnt(0,0,0),theVectorOfTranslation); myAISContext->Display(aDirection1,Standard_False); theTransformation.SetTranslation(theVectorOfTranslation); @@ -4992,10 +4992,10 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/, TopoDS_Edge Ed3 = BRepBuilderAPI_MakeEdge(C3,theSurface).Edge(); C2 = GCE2d_MakeSegment(C1->Value(C1->FirstParameter()), - C3->Value(C3->FirstParameter())); + C3->Value(C3->FirstParameter())).Value(); TopoDS_Edge Ed2 = BRepBuilderAPI_MakeEdge(C2,theSurface).Edge(); C4 = GCE2d_MakeSegment(C1->Value(C1->LastParameter()), - C3->Value(C3->LastParameter())); + C3->Value(C3->LastParameter())).Value(); TopoDS_Edge Ed4 = BRepBuilderAPI_MakeEdge(C4,theSurface).Edge(); Ed2.Reverse(); Ed3.Reverse(); @@ -5004,10 +5004,10 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/, BRepLib::BuildCurves3d(theFace); if (!BRepAlgo::IsValid(theFace)){ C2 = GCE2d_MakeSegment(C1->Value(C1->LastParameter()), - C3->Value(C3->FirstParameter())); + C3->Value(C3->FirstParameter())).Value(); TopoDS_Edge Ed2 = BRepBuilderAPI_MakeEdge(C2,theSurface).Edge(); C4 = GCE2d_MakeSegment(C3->Value(C3->LastParameter()), - C1->Value(C1->FirstParameter())); + C1->Value(C1->FirstParameter())).Value(); TopoDS_Edge Ed4 = BRepBuilderAPI_MakeEdge(C4,theSurface).Edge(); Ed3.Reverse(); theWire = BRepBuilderAPI_MakeWire(Ed1,Ed2,Ed3,Ed4); diff --git a/samples/mfc/standard/02_Modeling/src/StdAfx.h b/samples/mfc/standard/02_Modeling/src/StdAfx.h index 66f33e323b..f8b0a8f0ab 100755 --- a/samples/mfc/standard/02_Modeling/src/StdAfx.h +++ b/samples/mfc/standard/02_Modeling/src/StdAfx.h @@ -107,6 +107,7 @@ #include #include #include +#include #include #include #include @@ -133,7 +134,7 @@ #include #include #include - +#include #include "ISession_Direction.h" #include diff --git a/samples/mfc/standard/03_Viewer2d/CMakeLists.txt b/samples/mfc/standard/03_Viewer2d/CMakeLists.txt index d27ceab9b5..e482a6b64a 100644 --- a/samples/mfc/standard/03_Viewer2d/CMakeLists.txt +++ b/samples/mfc/standard/03_Viewer2d/CMakeLists.txt @@ -35,11 +35,17 @@ add_executable (Viewer2d WIN32 ${Viewer2d_SOURCE_FILES} set_property (TARGET Viewer2d PROPERTY FOLDER Samples) -install (TARGETS Viewer2d RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}" - ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}" - LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}") - -include_directories (${CMAKE_SOURCE_DIR}/src +install (TARGETS Viewer2d + CONFIGURATIONS Release + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Viewer2d + CONFIGURATIONS RelWithDebInfo + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Viewer2d + CONFIGURATIONS Debug + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind") + +include_directories (${CMAKE_BINARY_DIR}/inc ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d ${Viewer2d_SOURCE_DIR} ${MFC_STANDARD_SAMPLES_DIR}/Common) diff --git a/samples/mfc/standard/04_Viewer3d/CMakeLists.txt b/samples/mfc/standard/04_Viewer3d/CMakeLists.txt index 1c69940b07..23fa45d929 100644 --- a/samples/mfc/standard/04_Viewer3d/CMakeLists.txt +++ b/samples/mfc/standard/04_Viewer3d/CMakeLists.txt @@ -63,11 +63,17 @@ add_executable (Viewer3d WIN32 ${Viewer3d_SOURCE_FILES} set_property (TARGET Viewer3d PROPERTY FOLDER Samples) -install (TARGETS Viewer3d RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}" - ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}" - LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}") +install (TARGETS Viewer3d + CONFIGURATIONS Release + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Viewer3d + CONFIGURATIONS RelWithDebInfo + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Viewer3d + CONFIGURATIONS Debug + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind") -include_directories (${CMAKE_SOURCE_DIR}/src +include_directories (${CMAKE_BINARY_DIR}/inc ${Viewer3d_SRC_DIR} ${MFC_STANDARD_SAMPLES_DIR}/Common) diff --git a/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.h b/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.h index 940b9adc7f..b89cba6b68 100755 --- a/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.h +++ b/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.h @@ -12,7 +12,7 @@ #include #include #include - +class ISession_Curve; DEFINE_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject) class ISession_Curve : public AIS_InteractiveObject @@ -20,7 +20,7 @@ class ISession_Curve : public AIS_InteractiveObject public: ISession_Curve(const Handle(Geom_Curve)& aCurve); virtual ~ISession_Curve(); -DEFINE_STANDARD_RTTI(ISession_Curve) +DEFINE_STANDARD_RTTI(ISession_Curve,AIS_InteractiveObject) private: Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; diff --git a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h b/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h index 7a19f5e9eb..0ea90bd6b3 100755 --- a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h +++ b/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h @@ -15,11 +15,11 @@ #define WAIT_A_SECOND WaitForInput(1000) class CViewer3dDoc; -class Handle_AIS_InteractiveObject; -class Handle_AIS_Point; -class Handle_Geom_Surface; -class Handle_Geom_Curve; -class Handle_Geom2d_Curve; +#include +#include +#include +#include +#include class Quantity_Color; class OCCDemo_Presentation diff --git a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp b/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp index 5a1def4cb7..24c1d4f860 100755 --- a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp +++ b/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp @@ -146,7 +146,7 @@ Handle_AIS_TexturedShape TexturesExt_Presentation::Texturize(const TopoDS_Shape& // load texture from file if it is not an integer value // integer value indicates a number of texture in predefined TexturesExt enumeration CString initfile(((OCC_App*) AfxGetApp())->GetInitDataDir()); - initfile += "\\Data\\"; + initfile += "\\..\\..\\..\\samples\\mfc\\standard\\04_Viewer3d\\Data\\"; if (!aTFileName.IsIntegerValue()) { initfile += aTFileName.ToCString(); @@ -176,7 +176,7 @@ Standard_Boolean TexturesExt_Presentation::loadShape(TopoDS_Shape& aShape, { // create a TopoDS_Shape -> read from a brep file CString initfile(((OCC_App*) AfxGetApp())->GetInitDataDir()); - initfile += "\\Data\\"; + initfile += "\\..\\..\\..\\samples\\mfc\\standard\\04_Viewer3d\\Data\\"; initfile += aFileName.ToCString(); std::filebuf aFileBuf; diff --git a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.h b/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.h index ff4785ecb0..63d3f3a7a1 100755 --- a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.h +++ b/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.h @@ -10,9 +10,9 @@ #endif // _MSC_VER > 1000 #include "OCCDemo_Presentation.h" +#include class TopoDS_Shape; class TCollection_AsciiString; -class Handle_AIS_TexturedShape; class TexturesExt_Presentation : public OCCDemo_Presentation { diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h b/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h index f634a7d9aa..bcf2543205 100755 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h +++ b/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h @@ -11,6 +11,7 @@ #include #include #include +#include #include diff --git a/samples/mfc/standard/05_ImportExport/CMakeLists.txt b/samples/mfc/standard/05_ImportExport/CMakeLists.txt index 366715bbe4..cb50b13ff5 100644 --- a/samples/mfc/standard/05_ImportExport/CMakeLists.txt +++ b/samples/mfc/standard/05_ImportExport/CMakeLists.txt @@ -39,11 +39,17 @@ add_executable (ImportExport WIN32 ${ImportExport_SOURCE_FILES} set_property (TARGET ImportExport PROPERTY FOLDER Samples) -install (TARGETS ImportExport RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}" - ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}" - LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}") - -include_directories (${CMAKE_SOURCE_DIR}/src +install (TARGETS ImportExport + CONFIGURATIONS Release + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS ImportExport + CONFIGURATIONS RelWithDebInfo + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS ImportExport + CONFIGURATIONS Debug + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind") + +include_directories (${CMAKE_BINARY_DIR}/inc ${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport ${ImportExport_SRC_DIR} ${MFC_STANDARD_SAMPLES_DIR}/Common) diff --git a/samples/mfc/standard/05_ImportExport/src/FSD_Archive.hxx b/samples/mfc/standard/05_ImportExport/src/FSD_Archive.hxx index 9314f0fdb7..a414fded59 100755 --- a/samples/mfc/standard/05_ImportExport/src/FSD_Archive.hxx +++ b/samples/mfc/standard/05_ImportExport/src/FSD_Archive.hxx @@ -51,14 +51,14 @@ #ifndef _Standard_CString_HeaderFile #include #endif +#include +#include class Storage_StreamTypeMismatchError; class Storage_StreamFormatError; class Storage_StreamWriteError; class Storage_StreamExtCharParityError; class TCollection_AsciiString; class TCollection_ExtendedString; -class TColStd_SequenceOfAsciiString; -class TColStd_SequenceOfExtendedString; class Storage_BaseDriver; diff --git a/samples/mfc/standard/06_Ocaf/CMakeLists.txt b/samples/mfc/standard/06_Ocaf/CMakeLists.txt index 9b995dda84..e03ae5a93a 100644 --- a/samples/mfc/standard/06_Ocaf/CMakeLists.txt +++ b/samples/mfc/standard/06_Ocaf/CMakeLists.txt @@ -11,11 +11,7 @@ set (Ocaf_HEADER_FILES ${Ocaf_SRC_DIR}/NewBoxDlg.h ${Ocaf_SRC_DIR}/OcafApp.h ${Ocaf_SRC_DIR}/OcafDoc.h ${Ocaf_SRC_DIR}/OcafMainFrm.h - ${Ocaf_SRC_DIR}/Handle_TOcaf_Application.hxx ${Ocaf_SRC_DIR}/TOcaf_Commands.hxx - ${Ocaf_SRC_DIR}/Handle_TOcafFunction_BoxDriver.hxx - ${Ocaf_SRC_DIR}/Handle_TOcafFunction_CutDriver.hxx - ${Ocaf_SRC_DIR}/Handle_TOcafFunction_CylDriver.hxx ${Ocaf_SRC_DIR}/StdAfx.h ) set (Ocaf_SOURCE_FILES ${Ocaf_SRC_DIR}/NewBoxDlg.cpp ${Ocaf_SRC_DIR}/NewCylDlg.cpp @@ -55,11 +51,17 @@ add_executable (Ocaf WIN32 ${Ocaf_SOURCE_FILES} set_property (TARGET Ocaf PROPERTY FOLDER Samples) -install (TARGETS Ocaf RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}" - ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}" - LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}") +install (TARGETS Ocaf + CONFIGURATIONS Release + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Ocaf + CONFIGURATIONS RelWithDebInfo + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Ocaf + CONFIGURATIONS Debug + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind") -include_directories (${CMAKE_SOURCE_DIR}/src +include_directories (${CMAKE_BINARY_DIR}/inc ${MFC_STANDARD_SAMPLES_DIR}/06_Ocaf ${Ocaf_SRC_DIR} ${MFC_STANDARD_SAMPLES_DIR}/Common) diff --git a/samples/mfc/standard/06_Ocaf/src/DebugBrowser.hxx b/samples/mfc/standard/06_Ocaf/src/DebugBrowser.hxx index 8c12eaa992..f788826c18 100755 --- a/samples/mfc/standard/06_Ocaf/src/DebugBrowser.hxx +++ b/samples/mfc/standard/06_Ocaf/src/DebugBrowser.hxx @@ -18,9 +18,6 @@ #ifndef _Standard_Integer_HeaderFile #include #endif -#ifndef _Handle_TDocStd_Document_HeaderFile -#include -#endif class TDocStd_Document; class DebugBrowser_Attr; class DebugBrowser_DFTree; diff --git a/samples/mfc/standard/06_Ocaf/src/Handle_OCAFSample_CommonDriver.hxx b/samples/mfc/standard/06_Ocaf/src/Handle_OCAFSample_CommonDriver.hxx deleted file mode 100755 index 11e5f6f6c7..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/Handle_OCAFSample_CommonDriver.hxx +++ /dev/null @@ -1,89 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. - -#ifndef _Handle_OCAFSample_CommonDriver_HeaderFile -#define _Handle_OCAFSample_CommonDriver_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_OCAFSample_Driver_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(OCAFSample_Driver); -class OCAFSample_CommonDriver; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(OCAFSample_CommonDriver); - -class Handle(OCAFSample_CommonDriver) : public Handle(OCAFSample_Driver) { - public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - Handle(OCAFSample_CommonDriver)():Handle(OCAFSample_Driver)() {} - Handle(OCAFSample_CommonDriver)(const Handle(OCAFSample_CommonDriver)& aHandle) : Handle(OCAFSample_Driver)(aHandle) - { - } - - Handle(OCAFSample_CommonDriver)(const OCAFSample_CommonDriver* anItem) : Handle(OCAFSample_Driver)((OCAFSample_Driver *)anItem) - { - } - - Handle(OCAFSample_CommonDriver)& operator=(const Handle(OCAFSample_CommonDriver)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(OCAFSample_CommonDriver)& operator=(const OCAFSample_CommonDriver* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - OCAFSample_CommonDriver* operator->() - { - return (OCAFSample_CommonDriver *)ControlAccess(); - } - - OCAFSample_CommonDriver* operator->() const - { - return (OCAFSample_CommonDriver *)ControlAccess(); - } - - Standard_EXPORT ~Handle(OCAFSample_CommonDriver)(); - - Standard_EXPORT static const Handle(OCAFSample_CommonDriver) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/Handle_OCAFSample_Driver.hxx b/samples/mfc/standard/06_Ocaf/src/Handle_OCAFSample_Driver.hxx deleted file mode 100755 index 15bed3038b..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/Handle_OCAFSample_Driver.hxx +++ /dev/null @@ -1,89 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. - -#ifndef _Handle_OCAFSample_Driver_HeaderFile -#define _Handle_OCAFSample_Driver_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TFunction_Driver_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TFunction_Driver); -class OCAFSample_Driver; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(OCAFSample_Driver); - -class Handle(OCAFSample_Driver) : public Handle(TFunction_Driver) { - public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - Handle(OCAFSample_Driver)():Handle(TFunction_Driver)() {} - Handle(OCAFSample_Driver)(const Handle(OCAFSample_Driver)& aHandle) : Handle(TFunction_Driver)(aHandle) - { - } - - Handle(OCAFSample_Driver)(const OCAFSample_Driver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) - { - } - - Handle(OCAFSample_Driver)& operator=(const Handle(OCAFSample_Driver)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(OCAFSample_Driver)& operator=(const OCAFSample_Driver* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - OCAFSample_Driver* operator->() - { - return (OCAFSample_Driver *)ControlAccess(); - } - - OCAFSample_Driver* operator->() const - { - return (OCAFSample_Driver *)ControlAccess(); - } - - Standard_EXPORT ~Handle(OCAFSample_Driver)(); - - Standard_EXPORT static const Handle(OCAFSample_Driver) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/Handle_TOcafFunction_BoxDriver.hxx b/samples/mfc/standard/06_Ocaf/src/Handle_TOcafFunction_BoxDriver.hxx deleted file mode 100755 index 3ed07af5ff..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/Handle_TOcafFunction_BoxDriver.hxx +++ /dev/null @@ -1,89 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. - -#ifndef _Handle_TOcafFunction_BoxDriver_HeaderFile -#define _Handle_TOcafFunction_BoxDriver_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TFunction_Driver_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TFunction_Driver); -class TOcafFunction_BoxDriver; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(TOcafFunction_BoxDriver); - -class Handle(TOcafFunction_BoxDriver) : public Handle(TFunction_Driver) { - public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - Handle(TOcafFunction_BoxDriver)():Handle(TFunction_Driver)() {} - Handle(TOcafFunction_BoxDriver)(const Handle(TOcafFunction_BoxDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) - { - } - - Handle(TOcafFunction_BoxDriver)(const TOcafFunction_BoxDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) - { - } - - Handle(TOcafFunction_BoxDriver)& operator=(const Handle(TOcafFunction_BoxDriver)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(TOcafFunction_BoxDriver)& operator=(const TOcafFunction_BoxDriver* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - TOcafFunction_BoxDriver* operator->() - { - return (TOcafFunction_BoxDriver *)ControlAccess(); - } - - TOcafFunction_BoxDriver* operator->() const - { - return (TOcafFunction_BoxDriver *)ControlAccess(); - } - - Standard_EXPORT ~Handle(TOcafFunction_BoxDriver)(); - - Standard_EXPORT static const Handle(TOcafFunction_BoxDriver) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/Handle_TOcafFunction_CutDriver.hxx b/samples/mfc/standard/06_Ocaf/src/Handle_TOcafFunction_CutDriver.hxx deleted file mode 100755 index 1cf2d81e6a..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/Handle_TOcafFunction_CutDriver.hxx +++ /dev/null @@ -1,89 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. - -#ifndef _Handle_TOcafFunction_CutDriver_HeaderFile -#define _Handle_TOcafFunction_CutDriver_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TFunction_Driver_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TFunction_Driver); -class TOcafFunction_CutDriver; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(TOcafFunction_CutDriver); - -class Handle(TOcafFunction_CutDriver) : public Handle(TFunction_Driver) { - public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - Handle(TOcafFunction_CutDriver)():Handle(TFunction_Driver)() {} - Handle(TOcafFunction_CutDriver)(const Handle(TOcafFunction_CutDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) - { - } - - Handle(TOcafFunction_CutDriver)(const TOcafFunction_CutDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) - { - } - - Handle(TOcafFunction_CutDriver)& operator=(const Handle(TOcafFunction_CutDriver)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(TOcafFunction_CutDriver)& operator=(const TOcafFunction_CutDriver* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - TOcafFunction_CutDriver* operator->() - { - return (TOcafFunction_CutDriver *)ControlAccess(); - } - - TOcafFunction_CutDriver* operator->() const - { - return (TOcafFunction_CutDriver *)ControlAccess(); - } - - Standard_EXPORT ~Handle(TOcafFunction_CutDriver)(); - - Standard_EXPORT static const Handle(TOcafFunction_CutDriver) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/Handle_TOcafFunction_CylDriver.hxx b/samples/mfc/standard/06_Ocaf/src/Handle_TOcafFunction_CylDriver.hxx deleted file mode 100755 index 2fd24f9e8b..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/Handle_TOcafFunction_CylDriver.hxx +++ /dev/null @@ -1,89 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. - -#ifndef _Handle_TOcafFunction_CylDriver_HeaderFile -#define _Handle_TOcafFunction_CylDriver_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TFunction_Driver_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TFunction_Driver); -class TOcafFunction_CylDriver; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(TOcafFunction_CylDriver); - -class Handle(TOcafFunction_CylDriver) : public Handle(TFunction_Driver) { - public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - Handle(TOcafFunction_CylDriver)():Handle(TFunction_Driver)() {} - Handle(TOcafFunction_CylDriver)(const Handle(TOcafFunction_CylDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) - { - } - - Handle(TOcafFunction_CylDriver)(const TOcafFunction_CylDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) - { - } - - Handle(TOcafFunction_CylDriver)& operator=(const Handle(TOcafFunction_CylDriver)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(TOcafFunction_CylDriver)& operator=(const TOcafFunction_CylDriver* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - TOcafFunction_CylDriver* operator->() - { - return (TOcafFunction_CylDriver *)ControlAccess(); - } - - TOcafFunction_CylDriver* operator->() const - { - return (TOcafFunction_CylDriver *)ControlAccess(); - } - - Standard_EXPORT ~Handle(TOcafFunction_CylDriver)(); - - Standard_EXPORT static const Handle(TOcafFunction_CylDriver) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/Handle_TOcaf_Application.hxx b/samples/mfc/standard/06_Ocaf/src/Handle_TOcaf_Application.hxx deleted file mode 100755 index c9df8b582b..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/Handle_TOcaf_Application.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. - -#ifndef _Handle_TOcaf_Application_HeaderFile -#define _Handle_TOcaf_Application_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _Handle_TDocStd_Application_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TDocStd_Application); -class TOcaf_Application; - -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(TOcaf_Application); - - -class Handle(TOcaf_Application) : public Handle(TDocStd_Application) { - public: - Handle(TOcaf_Application)():Handle(TDocStd_Application)() {} - Handle(TOcaf_Application)(const Handle(TOcaf_Application)& aHandle) : Handle(TDocStd_Application)(aHandle) - { - } - - Handle(TOcaf_Application)(const TOcaf_Application* anItem) : Handle(TDocStd_Application)((TDocStd_Application *)anItem) - { - } - - Handle(TOcaf_Application)& operator=(const Handle(TOcaf_Application)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(TOcaf_Application)& operator=(const TOcaf_Application* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - TOcaf_Application* operator->() - { - return (TOcaf_Application *)ControlAccess(); - } - - TOcaf_Application* operator->() const - { - return (TOcaf_Application *)ControlAccess(); - } - - Standard_EXPORT ~Handle(TOcaf_Application)(); - - Standard_EXPORT static const Handle(TOcaf_Application) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/OcafApp.h b/samples/mfc/standard/06_Ocaf/src/OcafApp.h index 66fdab6335..bf1ad3f7d5 100755 --- a/samples/mfc/standard/06_Ocaf/src/OcafApp.h +++ b/samples/mfc/standard/06_Ocaf/src/OcafApp.h @@ -11,6 +11,7 @@ #include #include "OcafDoc.h" #include "TOCAF_Application.hxx" +#include class COcafApp : public OCC_App @@ -27,14 +28,14 @@ public: //}}AFX_VIRTUAL void OnFileOpen(); public: - Handle_TOcaf_Application GetApp() {return myApp;} + Handle(TOcaf_Application) GetApp() {return myApp;} private : BOOL IsViewExisting(CDocument* pDoc,CRuntimeClass* pViewClass,CView*& pView); private: - Handle_TOcaf_Application myApp; + Handle(TOcaf_Application) myApp; CMultiDocTemplate* pDocTemplateForView3d; DECLARE_MESSAGE_MAP() diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx index 8747d94c28..e976b411fd 100755 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx +++ b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx @@ -121,34 +121,10 @@ Standard_Integer TOcafFunction_BoxDriver::Execute(TFunction_Logbook& /*log*/) co TOcafFunction_BoxDriver::~TOcafFunction_BoxDriver() {} - - -Standard_EXPORT Handle_Standard_Type& TOcafFunction_BoxDriver_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("TOcafFunction_BoxDriver", - sizeof(TOcafFunction_BoxDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - // DownCast method // allow safe downcasting // -const Handle(TOcafFunction_BoxDriver) Handle(TOcafFunction_BoxDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +const Handle(TOcafFunction_BoxDriver) TOcafFunction_BoxDriver::DownCast(const Handle(Standard_Transient)& AnObject) { Handle(TOcafFunction_BoxDriver) _anOtherObject; @@ -169,6 +145,5 @@ Standard_Boolean TOcafFunction_BoxDriver::IsKind(const Handle(Standard_Type)& AT return (STANDARD_TYPE(TOcafFunction_BoxDriver) == AType || TFunction_Driver::IsKind(AType)); } -Handle_TOcafFunction_BoxDriver::~Handle_TOcafFunction_BoxDriver() {} diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.hxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.hxx index 32027c2d0a..48fd044ec2 100755 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.hxx +++ b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.hxx @@ -19,9 +19,6 @@ #ifndef _Standard_HeaderFile #include #endif -#ifndef _Handle_TOcafFunction_BoxDriver_HeaderFile -#include -#endif #ifndef _TFunction_Driver_HeaderFile #include @@ -69,7 +66,8 @@ Standard_EXPORT ~TOcafFunction_BoxDriver(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& TOcafFunction_BoxDriver_Type_(); + //Standard_EXPORT friend Handle(Standard_Type)& TOcafFunction_BoxDriver_Type_(); + Standard_EXPORT const Handle(TOcafFunction_BoxDriver) DownCast(const Handle(Standard_Transient)& AnObject); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx index e83fd92a97..0731e03b57 100755 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx +++ b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx @@ -142,34 +142,10 @@ Standard_Integer TOcafFunction_CutDriver::Execute(TFunction_Logbook& /*log*/) co TOcafFunction_CutDriver::~TOcafFunction_CutDriver() {} - - -Standard_EXPORT Handle_Standard_Type& TOcafFunction_CutDriver_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("TOcafFunction_CutDriver", - sizeof(TOcafFunction_CutDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - // DownCast method // allow safe downcasting // -const Handle(TOcafFunction_CutDriver) Handle(TOcafFunction_CutDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +const Handle(TOcafFunction_CutDriver) TOcafFunction_CutDriver::DownCast(const Handle(Standard_Transient)& AnObject) { Handle(TOcafFunction_CutDriver) _anOtherObject; @@ -190,6 +166,5 @@ Standard_Boolean TOcafFunction_CutDriver::IsKind(const Handle(Standard_Type)& AT return (STANDARD_TYPE(TOcafFunction_CutDriver) == AType || TFunction_Driver::IsKind(AType)); } -Handle_TOcafFunction_CutDriver::~Handle_TOcafFunction_CutDriver() {} diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.hxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.hxx index ad2e47fc9e..098a1e6d38 100755 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.hxx +++ b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.hxx @@ -19,9 +19,6 @@ #ifndef _Standard_HeaderFile #include #endif -#ifndef _Handle_TOcafFunction_CutDriver_HeaderFile -#include -#endif #ifndef _TFunction_Driver_HeaderFile #include @@ -69,7 +66,8 @@ Standard_EXPORT ~TOcafFunction_CutDriver(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& TOcafFunction_CutDriver_Type_(); + //Standard_EXPORT friend Handle_Standard_Type& TOcafFunction_CutDriver_Type_(); + Standard_EXPORT const Handle(TOcafFunction_CutDriver) DownCast(const Handle(Standard_Transient)& AnObject); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx index 1a88670d67..ea5a9b28d7 100755 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx +++ b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx @@ -116,34 +116,10 @@ Standard_Integer TOcafFunction_CylDriver::Execute(TFunction_Logbook& /*log*/) co TOcafFunction_CylDriver::~TOcafFunction_CylDriver() {} - - -Standard_EXPORT Handle_Standard_Type& TOcafFunction_CylDriver_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("TOcafFunction_CylDriver", - sizeof(TOcafFunction_CylDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - // DownCast method // allow safe downcasting // -const Handle(TOcafFunction_CylDriver) Handle(TOcafFunction_CylDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +const Handle(TOcafFunction_CylDriver) TOcafFunction_CylDriver::DownCast(const Handle(Standard_Transient)& AnObject) { Handle(TOcafFunction_CylDriver) _anOtherObject; @@ -164,6 +140,5 @@ Standard_Boolean TOcafFunction_CylDriver::IsKind(const Handle(Standard_Type)& AT return (STANDARD_TYPE(TOcafFunction_CylDriver) == AType || TFunction_Driver::IsKind(AType)); } -Handle_TOcafFunction_CylDriver::~Handle_TOcafFunction_CylDriver() {} diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.hxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.hxx index 94769b554e..165d21d395 100755 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.hxx +++ b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.hxx @@ -19,9 +19,6 @@ #ifndef _Standard_HeaderFile #include #endif -#ifndef _Handle_TOcafFunction_CylDriver_HeaderFile -#include -#endif #ifndef _TFunction_Driver_HeaderFile #include @@ -69,7 +66,8 @@ Standard_EXPORT ~TOcafFunction_CylDriver(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& TOcafFunction_CylDriver_Type_(); + //Standard_EXPORT friend Handle_Standard_Type& TOcafFunction_CylDriver_Type_(); + Standard_EXPORT const Handle(TOcafFunction_CylDriver) DownCast(const Handle(Standard_Transient)& AnObject); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; diff --git a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.hxx b/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.hxx index cb7d413b67..697c281ad8 100755 --- a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.hxx +++ b/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.hxx @@ -16,20 +16,13 @@ #ifndef _TOcaf_Application_HeaderFile #define _TOcaf_Application_HeaderFile -#ifndef _Handle_TOcaf_Application_HeaderFile -#include -#endif - #ifndef _TDocStd_Application_HeaderFile #include #endif #ifndef _Standard_CString_HeaderFile #include #endif -#ifndef _Handle_TDocStd_Document_HeaderFile -#include -#endif -class TColStd_SequenceOfExtendedString; +#include class TDocStd_Document; @@ -49,7 +42,8 @@ Standard_EXPORT ~TOcaf_Application(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& TOcaf_Application_Type_(); + //Standard_EXPORT friend Handle_Standard_Type& TOcaf_Application_Type_(); + Standard_EXPORT const Handle(TOcaf_Application) DownCast(const Handle(Standard_Transient)& AnObject); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; diff --git a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.ixx b/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.ixx index 29008cf1d6..95609794c1 100755 --- a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.ixx +++ b/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.ixx @@ -19,37 +19,11 @@ #endif TOcaf_Application::~TOcaf_Application() {} - - - -Standard_EXPORT Handle_Standard_Type& TOcaf_Application_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TDocStd_Application); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDocStd_Application); - static Handle_Standard_Type aType2 = STANDARD_TYPE(CDF_Application); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(CDF_Application); - static Handle_Standard_Type aType3 = STANDARD_TYPE(CDM_Application); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(CDM_Application); - static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient); - if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("TOcaf_Application", - sizeof(TOcaf_Application), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - // DownCast method // allow safe downcasting // -const Handle(TOcaf_Application) Handle(TOcaf_Application)::DownCast(const Handle(Standard_Transient)& AnObject) +const Handle(TOcaf_Application) TOcaf_Application::DownCast(const Handle(Standard_Transient)& AnObject) { Handle(TOcaf_Application) _anOtherObject; @@ -69,5 +43,5 @@ Standard_Boolean TOcaf_Application::IsKind(const Handle(Standard_Type)& AType) c { return (STANDARD_TYPE(TOcaf_Application) == AType || TDocStd_Application::IsKind(AType)); } -Handle_TOcaf_Application::~Handle_TOcaf_Application() {} + diff --git a/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.hxx b/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.hxx index 3c190026da..9725a1d05e 100755 --- a/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.hxx +++ b/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.hxx @@ -21,8 +21,8 @@ #ifndef _Standard_Real_HeaderFile #include #endif -#ifndef _Handle_TNaming_NamedShape_HeaderFile -#include +#ifndef _TNaming_NamedShape_HeaderFile +#include #endif #ifndef _Standard_Integer_HeaderFile #include @@ -32,7 +32,6 @@ class gp_Pnt; class TopoDS_Shape; class TNaming_NamedShape; class gp_XYZ; -class Handle_TDataStd_TreeNode; class TOcaf_Object; #ifndef _Standard_Macro_HeaderFile diff --git a/samples/mfc/standard/07_Triangulation/CMakeLists.txt b/samples/mfc/standard/07_Triangulation/CMakeLists.txt index dfcc5ddacd..dc9a3060be 100644 --- a/samples/mfc/standard/07_Triangulation/CMakeLists.txt +++ b/samples/mfc/standard/07_Triangulation/CMakeLists.txt @@ -41,11 +41,17 @@ add_executable (Triangulation WIN32 ${Triangulation_SOURCE_FILES} set_property (TARGET Triangulation PROPERTY FOLDER Samples) -install (TARGETS Triangulation RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}" - ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}" - LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}") - -include_directories (${CMAKE_SOURCE_DIR}/src +install (TARGETS Triangulation + CONFIGURATIONS Release + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Triangulation + CONFIGURATIONS RelWithDebInfo + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Triangulation + CONFIGURATIONS Debug + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind") + +include_directories (${CMAKE_BINARY_DIR}/inc ${MFC_STANDARD_SAMPLES_DIR}/07_Triangulation ${Triangulation_SRC_DIR} ${MFC_STANDARD_SAMPLES_DIR}/Common) diff --git a/samples/mfc/standard/07_Triangulation/src/ISession_Curve.h b/samples/mfc/standard/07_Triangulation/src/ISession_Curve.h index 940b9adc7f..b89cba6b68 100755 --- a/samples/mfc/standard/07_Triangulation/src/ISession_Curve.h +++ b/samples/mfc/standard/07_Triangulation/src/ISession_Curve.h @@ -12,7 +12,7 @@ #include #include #include - +class ISession_Curve; DEFINE_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject) class ISession_Curve : public AIS_InteractiveObject @@ -20,7 +20,7 @@ class ISession_Curve : public AIS_InteractiveObject public: ISession_Curve(const Handle(Geom_Curve)& aCurve); virtual ~ISession_Curve(); -DEFINE_STANDARD_RTTI(ISession_Curve) +DEFINE_STANDARD_RTTI(ISession_Curve,AIS_InteractiveObject) private: Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; diff --git a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h b/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h index 1e5cd9b1ab..f29fa0d40d 100755 --- a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h +++ b/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h @@ -16,11 +16,11 @@ //#include "TriangulationDoc.h" //#include class CTriangulationDoc; -class Handle_AIS_InteractiveObject; -class Handle_AIS_Point; -class Handle_Geom_Surface; -class Handle_Geom_Curve; -class Handle_Geom2d_Curve; +#include +#include +#include +#include +#include class Quantity_Color; class OCCDemo_Presentation diff --git a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp b/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp index 89ce6ec851..dce1453f2f 100755 --- a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp +++ b/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp @@ -402,7 +402,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape) void Tesselate_Presentation::sample(const Standard_CString aFileName) { CString initfile(((OCC_App*) AfxGetApp())->GetInitDataDir()); - initfile += "\\..\\..\\Data\\"; + initfile += "\\..\\..\\..\\samples\\mfc\\standard\\Data\\"; initfile += aFileName; /* diff --git a/samples/mfc/standard/08_HLR/CMakeLists.txt b/samples/mfc/standard/08_HLR/CMakeLists.txt index 5bca499262..53ac36d91e 100644 --- a/samples/mfc/standard/08_HLR/CMakeLists.txt +++ b/samples/mfc/standard/08_HLR/CMakeLists.txt @@ -63,11 +63,17 @@ add_executable (HLR WIN32 ${HLR_SOURCE_FILES} set_property (TARGET HLR PROPERTY FOLDER Samples) -install (TARGETS HLR RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}" - ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}" - LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}") +install (TARGETS HLR + CONFIGURATIONS Release + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS HLR + CONFIGURATIONS RelWithDebInfo + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS HLR + CONFIGURATIONS Debug + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind") -include_directories (${CMAKE_SOURCE_DIR}/src +include_directories (${CMAKE_BINARY_DIR}/inc ${HLR_RESOURCE_DIR} ${HLR_SRC_DIR} ${MFC_STANDARD_SAMPLES_DIR}/Common) diff --git a/samples/mfc/standard/09_Animation/CMakeLists.txt b/samples/mfc/standard/09_Animation/CMakeLists.txt index 6f57c73876..de0b539a3b 100644 --- a/samples/mfc/standard/09_Animation/CMakeLists.txt +++ b/samples/mfc/standard/09_Animation/CMakeLists.txt @@ -46,11 +46,17 @@ add_executable (Animation WIN32 ${Animation_SOURCE_FILES} set_property (TARGET Animation PROPERTY FOLDER Samples) -install (TARGETS Animation RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}" - ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}" - LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}") +install (TARGETS Animation + CONFIGURATIONS Release + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Animation + CONFIGURATIONS RelWithDebInfo + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Animation + CONFIGURATIONS Debug + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind") -include_directories (${CMAKE_SOURCE_DIR}/src +include_directories (${CMAKE_BINARY_DIR}/inc ${Animation_RESOURCE_DIR} ${Animation_SRC_DIR} ${MFC_STANDARD_SAMPLES_DIR}/Common) diff --git a/samples/mfc/standard/09_Animation/src/Fonc.hxx b/samples/mfc/standard/09_Animation/src/Fonc.hxx index a0f4eb9920..85c0825827 100755 --- a/samples/mfc/standard/09_Animation/src/Fonc.hxx +++ b/samples/mfc/standard/09_Animation/src/Fonc.hxx @@ -23,11 +23,11 @@ #include "GeomAPI_PointsToBSplineSurface.hxx" #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/samples/mfc/standard/10_Convert/CMakeLists.txt b/samples/mfc/standard/10_Convert/CMakeLists.txt index 5fe5625ab7..bc433d954c 100644 --- a/samples/mfc/standard/10_Convert/CMakeLists.txt +++ b/samples/mfc/standard/10_Convert/CMakeLists.txt @@ -63,11 +63,17 @@ add_executable (Convert WIN32 ${Convert_SOURCE_FILES} set_property (TARGET Convert PROPERTY FOLDER Samples) -install (TARGETS Convert RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}" - ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}" - LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}") +install (TARGETS Convert + CONFIGURATIONS Release + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Convert + CONFIGURATIONS RelWithDebInfo + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") +install (TARGETS Convert + CONFIGURATIONS Debug + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind") -include_directories (${CMAKE_SOURCE_DIR}/src +include_directories (${CMAKE_BINARY_DIR}/inc ${Convert_SRC_DIR} ${ISESSION_SUBDIR} ${WNT_SUBDIR} diff --git a/samples/mfc/standard/10_Convert/src/Convert_Presentation.cpp b/samples/mfc/standard/10_Convert/src/Convert_Presentation.cpp index 18e20bb3bd..b893ec3ce3 100755 --- a/samples/mfc/standard/10_Convert/src/Convert_Presentation.cpp +++ b/samples/mfc/standard/10_Convert/src/Convert_Presentation.cpp @@ -28,6 +28,7 @@ #include #include #include +#include // Initialization of global variable with an instance of this class @@ -89,7 +90,7 @@ void Convert_Presentation::DoSample() // Function : Convert_Presentation::drawSurfaceAndItsBSpline // Purpose : //================================================================ -void Convert_Presentation::drawSurfaceAndItsBSpline(Handle_Geom_Surface theSurface, +void Convert_Presentation::drawSurfaceAndItsBSpline(const Handle_Geom_Surface & theSurface, const Standard_CString theName, TCollection_AsciiString& theText) { @@ -140,7 +141,7 @@ void Convert_Presentation::drawCurveAndItsBSpline(Handle_Geom_Curve theCurve, Handle_Geom_BSplineCurve aBSpline = GeomConvert::CurveToBSplineCurve(theCurve); - drawCurve (aBSpline, BSplineColor); + drawCurve (Handle(Geom_Curve)::DownCast(aBSpline), BSplineColor); } @@ -371,7 +372,7 @@ void Convert_Presentation::sampleRevolSurface() aPoles(4) = gp_Pnt(500, 500, 0); aWeights(4) = 1; Handle(Geom_BezierCurve) aBezierCurve = new Geom_BezierCurve(aPoles, aWeights); - drawCurve(aBezierCurve); + drawCurve(Handle(Geom_Curve)::DownCast(aBezierCurve)); // creating a surface of revolution of the bezier curve around Y axis gp_Ax1 anAx(gp_Pnt(0,0,0), gp_Dir(0,1,0)); diff --git a/samples/mfc/standard/10_Convert/src/Convert_Presentation.h b/samples/mfc/standard/10_Convert/src/Convert_Presentation.h index 3715ae336f..24cc9b6cd5 100755 --- a/samples/mfc/standard/10_Convert/src/Convert_Presentation.h +++ b/samples/mfc/standard/10_Convert/src/Convert_Presentation.h @@ -10,8 +10,8 @@ #endif // _MSC_VER > 1000 #include -class Handle_Geom_Curve; -class Handle_Geom_Surface; +#include +#include class Quantity_Color; @@ -41,7 +41,7 @@ private: void drawCurveAndItsBSpline (Handle_Geom_Curve theCurve, const Standard_CString theName, TCollection_AsciiString& theText); - void drawSurfaceAndItsBSpline (Handle_Geom_Surface theSurface, + void drawSurfaceAndItsBSpline (const Handle_Geom_Surface & theSurface, const Standard_CString theName, TCollection_AsciiString& theText); private: diff --git a/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.h b/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.h index 940b9adc7f..b89cba6b68 100755 --- a/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.h +++ b/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.h @@ -12,7 +12,7 @@ #include #include #include - +class ISession_Curve; DEFINE_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject) class ISession_Curve : public AIS_InteractiveObject @@ -20,7 +20,7 @@ class ISession_Curve : public AIS_InteractiveObject public: ISession_Curve(const Handle(Geom_Curve)& aCurve); virtual ~ISession_Curve(); -DEFINE_STANDARD_RTTI(ISession_Curve) +DEFINE_STANDARD_RTTI(ISession_Curve,AIS_InteractiveObject) private: Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; diff --git a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h b/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h index e79086f8b8..8f14f0bdb2 100755 --- a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h +++ b/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h @@ -15,11 +15,11 @@ #include #include -class Handle_AIS_InteractiveObject; -class Handle_AIS_Point; -class Handle_Geom_Surface; -class Handle_Geom_Curve; -class Handle_Geom2d_Curve; +#include +#include +#include +#include +#include class Quantity_Color; class OCCDemo_Presentation diff --git a/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.h b/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.h index 397a6e4103..0c4c53c3b0 100755 --- a/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.h +++ b/samples/mfc/standard/Common/ISession2D/ISession2D_Shape.h @@ -11,7 +11,7 @@ #include #include #include "TopoDS_Shape.hxx" - +class ISession2D_Shape; DEFINE_STANDARD_HANDLE(ISession2D_Shape,AIS_InteractiveObject) class ISession2D_Shape : public AIS_InteractiveObject @@ -41,7 +41,7 @@ public: { return Standard_True; } public: - DEFINE_STANDARD_RTTI(ISession2D_Shape) + DEFINE_STANDARD_RTTI(ISession2D_Shape,AIS_InteractiveObject) private: void BuildAlgo(); diff --git a/samples/mfc/standard/Common/OCC_3dView.cpp b/samples/mfc/standard/Common/OCC_3dView.cpp index 3f4a8821b8..4842ba166c 100755 --- a/samples/mfc/standard/Common/OCC_3dView.cpp +++ b/samples/mfc/standard/Common/OCC_3dView.cpp @@ -79,7 +79,7 @@ OCC_3dView::OCC_3dView() OCC_3dView::~OCC_3dView() { - if (myView) + if (myView.IsNull()) { myView->Remove(); } diff --git a/samples/mfc/standard/Common/OCC_App.cpp b/samples/mfc/standard/Common/OCC_App.cpp index dd0360f2fa..93b1353678 100644 --- a/samples/mfc/standard/Common/OCC_App.cpp +++ b/samples/mfc/standard/Common/OCC_App.cpp @@ -63,7 +63,7 @@ void OCC_App::SetSamplePath(LPCTSTR aPath) SamplePath += ".."; else{ CString aCInitialDir(aPath); - SamplePath += "..\\" + aCInitialDir; + //SamplePath += "..\\" + aCInitialDir; } } ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Face.h b/samples/mfc/standard/Common/Primitive/Sample2D_Face.h index d82c16cdc6..08420fe182 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Face.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Face.h @@ -8,7 +8,7 @@ #include #include - +class Sample2D_Face; DEFINE_STANDARD_HANDLE(Sample2D_Face,AIS_InteractiveObject) class Sample2D_Face : public AIS_InteractiveObject { @@ -21,7 +21,7 @@ public: // Standard_EXPORT Sample2D_Face (const TopoDS_Shape& theFace); -DEFINE_STANDARD_RTTI(Sample2D_Face) +DEFINE_STANDARD_RTTI(Sample2D_Face,AIS_InteractiveObject) private: diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Image.h b/samples/mfc/standard/Common/Primitive/Sample2D_Image.h index 3a38e51fb4..ce6cb76dd5 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Image.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Image.h @@ -12,7 +12,7 @@ #include #include #include - +class Sample2D_Image; DEFINE_STANDARD_HANDLE(Sample2D_Image,AIS_TexturedShape) class Sample2D_Image : public AIS_TexturedShape { @@ -28,7 +28,7 @@ Standard_EXPORT inline Quantity_Factor GetScale() const; Standard_EXPORT inline void SetScale(const Quantity_Factor aNewScale) ; Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& theContext) ; -DEFINE_STANDARD_RTTI(Sample2D_Image) +DEFINE_STANDARD_RTTI(Sample2D_Image,AIS_TexturedShape) private: void MakeShape(); protected: diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h index 1767afe023..db40295f91 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h @@ -5,6 +5,7 @@ #include #include #include +class Sample2D_Markers; DEFINE_STANDARD_HANDLE(Sample2D_Markers,AIS_InteractiveObject) class Sample2D_Markers : public AIS_InteractiveObject { @@ -33,7 +34,7 @@ public: const Standard_Real theScaleOrId=2.0); -DEFINE_STANDARD_RTTI(Sample2D_Markers) +DEFINE_STANDARD_RTTI(Sample2D_Markers,AIS_InteractiveObject) private: diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Text.h b/samples/mfc/standard/Common/Primitive/Sample2D_Text.h index 1d5af73301..e6c33d40ee 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Text.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Text.h @@ -6,7 +6,7 @@ #include #include - +class Sample2D_Text; DEFINE_STANDARD_HANDLE(Sample2D_Text,AIS_InteractiveObject) class Sample2D_Text : public AIS_InteractiveObject { @@ -38,7 +38,7 @@ inline Standard_Boolean GetIsZoomable() const { return myIsZoomable; } inline void SetIsZoomable(const Standard_Boolean theIsZoomable) { myIsZoomable = theIsZoomable;} -DEFINE_STANDARD_RTTI(Sample2D_Text) +DEFINE_STANDARD_RTTI(Sample2D_Text,AIS_InteractiveObject) private: diff --git a/samples/mfc/standard/Common/User_Cylinder.hxx b/samples/mfc/standard/Common/User_Cylinder.hxx index 232498af7d..00ec669a3c 100755 --- a/samples/mfc/standard/Common/User_Cylinder.hxx +++ b/samples/mfc/standard/Common/User_Cylinder.hxx @@ -8,9 +8,10 @@ #include #include #include - +#include // Handle definition // +class User_Cylinder; DEFINE_STANDARD_HANDLE(User_Cylinder,AIS_InteractiveObject) class User_Cylinder: public AIS_InteractiveObject { @@ -38,7 +39,7 @@ private: // some methods like DynamicType() or IsKind() // -DEFINE_STANDARD_RTTI(User_Cylinder) +DEFINE_STANDARD_RTTI(User_Cylinder,AIS_InteractiveObject) private: // Quantity_NameOfColor myCylindricalFaceColor; // Quantity_NameOfColor myPlanarFaceColor; diff --git a/samples/mfc/standard/mfcsample/CMakeLists.txt b/samples/mfc/standard/mfcsample/CMakeLists.txt index bc484a28f0..2a3d8b6b35 100644 --- a/samples/mfc/standard/mfcsample/CMakeLists.txt +++ b/samples/mfc/standard/mfcsample/CMakeLists.txt @@ -138,11 +138,23 @@ add_library ( mfcsample SHARED ${mfcsample_SOURCE_FILES} set_property (TARGET mfcsample PROPERTY FOLDER Samples) -install (TARGETS mfcsample RUNTIME DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/bin${BUILD_POSTFIX}" - ARCHIVE DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}" - LIBRARY DESTINATION "${INSTALL_DIR}/win${COMPILER_BITNESS}/${COMPILER}/lib${BUILD_POSTFIX}") - -include_directories( ${CMAKE_SOURCE_DIR}/src +install (TARGETS mfcsample + CONFIGURATIONS Release + RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin" + ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib" + LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib") +install (TARGETS mfcsample + CONFIGURATIONS RelWithDebInfo + RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin" + ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib" + LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib") +install (TARGETS mfcsample + CONFIGURATIONS Debug + RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind" + ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd" + LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd") + +include_directories( ${CMAKE_BINARY_DIR}/inc ${MFC_STANDARD_COMMON_SAMPLES_DIR} ${COMMON_IE_DIR} ${COMMON_ISESSION2D_DIR} diff --git a/src/Graphic3d/Graphic3d_Camera.cxx b/src/Graphic3d/Graphic3d_Camera.cxx index d8a5072f07..9c2227b8ff 100644 --- a/src/Graphic3d/Graphic3d_Camera.cxx +++ b/src/Graphic3d/Graphic3d_Camera.cxx @@ -49,6 +49,10 @@ namespace // relative z-range tolerance compatible with for floating point. static Standard_Real zEpsilon (const Standard_Real theValue) { + if (theValue == 0) + { + return FLT_EPSILON; + } Standard_Real aLogRadix = Log10 (Abs (theValue)) / Log10 (FLT_RADIX); Standard_Real aExp = Floor (aLogRadix); return FLT_EPSILON * Pow (FLT_RADIX, aExp); diff --git a/src/Transfer/Transfer_FinderProcess.hxx b/src/Transfer/Transfer_FinderProcess.hxx index 48a76f731e..648ca5a47b 100644 --- a/src/Transfer/Transfer_FinderProcess.hxx +++ b/src/Transfer/Transfer_FinderProcess.hxx @@ -17,19 +17,14 @@ #ifndef _Transfer_FinderProcess_HeaderFile #define _Transfer_FinderProcess_HeaderFile -#include -#include - #include -#include -#include +#include + class Interface_InterfaceModel; class Transfer_TransientMapper; -class Standard_Transient; class Transfer_Finder; class Message_Messenger; - class Transfer_FinderProcess; DEFINE_STANDARD_HANDLE(Transfer_FinderProcess, Transfer_ProcessForFinder) @@ -79,28 +74,10 @@ public: //! Prints statistics on a given output, according mode Standard_EXPORT void PrintStats (const Standard_Integer mode, const Handle(Message_Messenger)& S) const; - - - DEFINE_STANDARD_RTTI(Transfer_FinderProcess,Transfer_ProcessForFinder) -protected: - - - - private: - - Handle(Interface_InterfaceModel) themodel; - - }; - - - - - - #endif // _Transfer_FinderProcess_HeaderFile -- 2.20.1