Salome HOME
Merge V9_dev branch into master
authorrnv <rnv@opencascade.com>
Wed, 6 Jun 2018 11:48:41 +0000 (14:48 +0300)
committerrnv <rnv@opencascade.com>
Thu, 14 Jun 2018 11:40:29 +0000 (14:40 +0300)
87 files changed:
CMakeLists.txt
CTestTestfileInstall.cmake
SalomeGEOMConfig.cmake.in
doc/salome/gui/GEOM/input/creating_lcs.doc
idl/GEOM_Gen.idl
resources/SalomeApp.xml.in
src/ARCHIMEDE/CMakeLists.txt
src/AdvancedEngine/CMakeLists.txt
src/AdvancedGUI/CMakeLists.txt
src/BREPPlugin/CMakeLists.txt
src/BasicGUI/CMakeLists.txt
src/BlockFix/BlockFix_PeriodicSurfaceModifier.cxx
src/BlockFix/BlockFix_SphereSpaceModifier.cxx
src/BlockFix/BlockFix_UnionFaces.cxx
src/BlockFix/CMakeLists.txt
src/BlocksGUI/CMakeLists.txt
src/BooleanGUI/CMakeLists.txt
src/BuildGUI/CMakeLists.txt
src/CurveCreator/CMakeLists.txt
src/CurveCreator/CurveCreator_Curve.cxx
src/CurveCreator/CurveCreator_Curve.hxx
src/CurveCreator/CurveCreator_Diff.cxx
src/CurveCreator/CurveCreator_Displayer.cxx
src/CurveCreator/CurveCreator_Displayer.hxx
src/CurveCreator/CurveCreator_ICurve.hxx
src/CurveCreator/CurveCreator_Section.cxx
src/CurveCreator/CurveCreator_Section.hxx
src/CurveCreator/CurveCreator_TableView.cxx
src/CurveCreator/CurveCreator_TableView.h
src/CurveCreator/CurveCreator_TreeView.cxx
src/CurveCreator/CurveCreator_Utils.cxx
src/CurveCreator/CurveCreator_Widget.cxx
src/CurveCreator/CurveCreator_Widget.h
src/DependencyTree/CMakeLists.txt
src/DisplayGUI/CMakeLists.txt
src/EntityGUI/CMakeLists.txt
src/EntityGUI/EntityGUI_3DSketcherDlg.cxx
src/EntityGUI/EntityGUI_PolylineDlg.cxx
src/GEOM/CMakeLists.txt
src/GEOMAlgo/CMakeLists.txt
src/GEOMAlgo/GEOMAlgo_ClsfQuad.cxx
src/GEOMAlgo/GEOMAlgo_ClsfQuad.hxx
src/GEOMAlgo/GEOMAlgo_FinderShapeOnQuad.cxx
src/GEOMAlgo/GEOMAlgo_FinderShapeOnQuad.hxx
src/GEOMBase/CMakeLists.txt
src/GEOMClient/CMakeLists.txt
src/GEOMFiltersSelection/CMakeLists.txt
src/GEOMGUI/CMakeLists.txt
src/GEOMGUI/GEOM_Displayer.cxx
src/GEOMGUI/GeometryGUI.cxx
src/GEOMImpl/CMakeLists.txt
src/GEOMImpl/GEOMImpl_IShapesOperations.cxx
src/GEOMImpl/GEOMImpl_IShapesOperations.hxx
src/GEOMImpl/GEOMImpl_PipeDriver.cxx
src/GEOMToolsGUI/CMakeLists.txt
src/GEOMUtils/CMakeLists.txt
src/GEOM_I/CMakeLists.txt
src/GEOM_I/GEOM_IShapesOperations_i.cc
src/GEOM_I/GEOM_IShapesOperations_i.hh
src/GEOM_I_Superv/CMakeLists.txt
src/GEOM_SWIG/GEOM_Nut.py [changed mode: 0755->0644]
src/GEOM_SWIG/geomBuilder.py
src/GEOM_SWIG_WITHIHM/CMakeLists.txt
src/GenerationGUI/CMakeLists.txt
src/GroupGUI/CMakeLists.txt
src/IGESPlugin/CMakeLists.txt
src/Material/CMakeLists.txt
src/MeasureGUI/CMakeLists.txt
src/MeasureGUI/MeasureGUI_FastCheckIntersectionsDlg.cxx
src/OBJECT/CMakeLists.txt
src/OBJECT/GEOM_AISShape.cxx
src/OCC2VTK/CMakeLists.txt
src/OperationGUI/CMakeLists.txt
src/PrimitiveGUI/CMakeLists.txt
src/RepairGUI/CMakeLists.txt
src/SKETCHER/CMakeLists.txt
src/STEPPlugin/CMakeLists.txt
src/STLPlugin/CMakeLists.txt
src/ShHealOper/CMakeLists.txt
src/ShapeRecognition/CMakeLists.txt
src/ShapeRecognition/ShapeRec_FeatureDetector.hxx
src/TransformationGUI/CMakeLists.txt
src/VTKPlugin/CMakeLists.txt
src/XAO/CMakeLists.txt
src/XAO/tests/CMakeLists.txt
src/XAOPlugin/CMakeLists.txt
src/XAO_Swig/CMakeLists.txt

index 75992c6a3d74a2242685a5d4cedf28a38913cfe0..a48b296a4783ef68455ac7718424443381ae9022 100755 (executable)
@@ -33,7 +33,7 @@ ENDIF(WIN32)
 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
 
 SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 4)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 5)
 SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
 SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
@@ -156,7 +156,7 @@ ENDIF(SALOME_BUILD_GUI)
 ## GEOM specifics
 ##
 
-FIND_PACKAGE(SalomeCAS REQUIRED)
+FIND_PACKAGE(SalomeOpenCASCADE REQUIRED)
 
 IF(SALOME_GEOM_USE_VTK)
   FIND_PACKAGE(SalomeVTK REQUIRED)
@@ -286,20 +286,20 @@ EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
 #      Ensure the variables are always defined for the configure:
 SET(KERNEL_ROOT_DIR "${KERNEL_ROOT_DIR}")
 SET(GUI_ROOT_DIR "${GUI_ROOT_DIR}")
-SET(CAS_ROOT_DIR "${CAS_ROOT_DIR}")
+SET(OPENCASCADE_ROOT_DIR "${OPENCASCADE_ROOT_DIR}")
 SET(VTK_ROOT_DIR "${VTK_ROOT_DIR}")
 SET(OPENCV_ROOT_DIR "${OPENCV_ROOT_DIR}")
 
 SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
 
 # Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
-SALOME_CONFIGURE_PREPARE(OpenCV CAS VTK)
+SALOME_CONFIGURE_PREPARE(OpenCV OpenCASCADE VTK)
 
 CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
     ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
     INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
     PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
-    KERNEL_ROOT_DIR GUI_ROOT_DIR CAS_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR)
+    KERNEL_ROOT_DIR GUI_ROOT_DIR OPENCASCADE_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR)
 
 #   - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?):
 #       Get the relative path of the include directory so
@@ -309,7 +309,7 @@ CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
 #    ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
 #    INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}"
 #    PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX
-#    KERNEL_ROOT_DIR GUI_ROOT_DIR CAS_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR)
+#    KERNEL_ROOT_DIR GUI_ROOT_DIR OPENCASCADE_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR)
 
 WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
     VERSION ${${PROJECT_NAME_UC}_VERSION}
index f1f002aa5762bd33dc0e918e08366a4def285ad5..6bc1687ee050069fad234325aeed23e389fee20c 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py")
+SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py")
 
 SET(COMPONENT_NAME GEOM)
 SET(TIMEOUT        300)
index 175fa3d2cf8bcb89b1cb04535c48578a73ed3ad1..d6dc181ab55550b83d709092f70719432a6f32bb 100644 (file)
@@ -57,7 +57,7 @@ SET(SALOME_GEOM_USE_VTK @SALOME_GEOM_USE_VTK@)
 
 # Level 1 prerequisites:
 SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
-SET_AND_CHECK(CAS_ROOT_DIR_EXP "@PACKAGE_CAS_ROOT_DIR@")
+SET_AND_CHECK(OPENCASCADE_ROOT_DIR_EXP "@PACKAGE_OPENCASCADE_ROOT_DIR@")
 
 # Optional level 1 prerequisites:
 IF(SALOME_GEOM_BUILD_GUI)
index 140c05c24e249a7eddf0926eb491695d0510cddf..79991586ad87b5df26f65cd0d156fa845dc9d3d3 100644 (file)
@@ -9,7 +9,7 @@ To create a <b>Local Coordinate System</b> in the <b>Main Menu</b> select <b>New
 \n <b>TUI command:</b> <em>geompy.MakeMarker(OX, OY, OZ, XDX, XDY, XDZ,
 YDX, YDY, YDZ)</em>, where OX, OY, OZ are coordinates of the origin of
 LCS, XDX, XDY, XDZ is a vector of OX direction of the LCS and YDX,
-YDY, YDZ is a vector of OY direction of the LCS.
+YDY, YDZ is a vector of OY direction of the LCS.
 \n <b>Arguments:</b> Name + Coordinates of origin, X axis direction, Y axis direction.
 
 \image html neo-localcs1.png
index dd7214a1c368ebcfa23ac92e72052af53266f9fc..e48b26a09198fa06a39d2f6cbec36c009f3ec035 100644 (file)
@@ -2464,18 +2464,18 @@ module GEOM
      *  \param theShape Shape to find sub-shapes of.
      *  \param theShapeType Type of sub-shapes to be retrieved.
      *  \param theTopLeftPoint Top left quadrangle corner
-     *  \param theTopRigthPoint Top right quadrangle corner
+     *  \param theTopRightPoint Top right quadrangle corner
      *  \param theBottomLeftPoint Bottom left quadrangle corner
-     *  \param theBottomRigthPoint Bottom right quadrangle corner
+     *  \param theBottomRightPoint Bottom right quadrangle corner
      *  \param theState The state of the sub-shapes to find.
      *  \return List of all found sub-shapes.
      */
     ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
                                     in long        theShapeType,
                                     in GEOM_Object theTopLeftPoint,
-                                    in GEOM_Object theTopRigthPoint,
+                                    in GEOM_Object theTopRightPoint,
                                     in GEOM_Object theBottomLeftPoint,
-                                    in GEOM_Object theBottomRigthPoint,
+                                    in GEOM_Object theBottomRightPoint,
                                     in shape_state theState);
 
     /*!
@@ -2568,18 +2568,18 @@ module GEOM
      *  \param theShape Shape to find sub-shapes of.
      *  \param theShapeType Type of sub-shapes to be retrieved.
      *  \param theTopLeftPoint Top left quadrangle corner
-     *  \param theTopRigthPoint Top right quadrangle corner
+     *  \param theTopRightPoint Top right quadrangle corner
      *  \param theBottomLeftPoint Bottom left quadrangle corner
-     *  \param theBottomRigthPoint Bottom right quadrangle corner
+     *  \param theBottomRightPoint Bottom right quadrangle corner
      *  \param theState The state of the sub-shapes to find.
      *  \return List of IDs of all found sub-shapes.
      */
     ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
                                          in long        theShapeType,
                                          in GEOM_Object theTopLeftPoint,
-                                         in GEOM_Object theTopRigthPoint,
+                                         in GEOM_Object theTopRightPoint,
                                          in GEOM_Object theBottomLeftPoint,
-                                         in GEOM_Object theBottomRigthPoint,
+                                         in GEOM_Object theBottomRightPoint,
                                          in shape_state theState);
 
     /*!
index 72d1c700f3316c1664809564f058d7ae4b1779d9..94972c6d5caf9c067df5b5094d736d9d5317f0fa 100755 (executable)
@@ -30,9 +30,8 @@
     <parameter name="version" value="@SALOMEGEOM_VERSION@"/>
   </section>
   <section name="geom_help" >
-    <parameter name="sub_menu"          value="%1 module"/>
-    <parameter name="User's Guide"      value="%GEOM_ROOT_DIR%/share/doc/salome/gui/GEOM/index.html"/>
-    <parameter name="Developer's Guide" value="%GEOM_ROOT_DIR%/share/doc/salome/tui/GEOM/index.html"/>
+    <parameter name="User's Guide/Geometry module/User's Guide"           value="%GEOM_ROOT_DIR%/share/doc/salome/gui/GEOM/index.html"/>
+    <parameter name="Developer's Guide/Geometry module/Developer's Guide" value="%GEOM_ROOT_DIR%/share/doc/salome/tui/GEOM/index.html"/>
   </section>
   <section name="resources">
     <!-- Module resources -->
@@ -70,7 +69,7 @@
     <parameter name="geom_preview"        value="true"  />
     <parameter name="hide_input_object"   value="true"  />
     <parameter name="material"            value="[ Default ]" />
-    <parameter name="predef_materials"    value="true" />
+    <parameter name="predef_materials"    value="false" />
     <parameter name="edge_width"          value="1" />
     <parameter name="isolines_width"      value="1" />
     <parameter name="preview_edge_width"  value="1" />
index b703f4abc1fa5ba2b78346124e1b86c5f5f48b66..bc9333f9e5ba49238fea030d79a70297096582ca 100755 (executable)
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PTHREAD_INCLUDE_DIR}
   )
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS( 
-  ${CAS_DEFINITIONS} 
+  ${OpenCASCADE_DEFINITIONS} 
   )
 
 # libraries to link to
-SET(_link_LIBRARIES 
-  ${CAS_KERNEL} ${CAS_MODELER} ${CAS_TKMesh} 
+SET(_link_LIBRARIES
+  ${OpenCASCADE_FoundationClasses_LIBRARIES}
+  ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   )
 
index f5aafa1ef809a776dfc66b09a6afe972466473ff..a3c22838955d09475a2ab0b2154e7fb4aa15884c 100755 (executable)
@@ -23,7 +23,7 @@
 INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PROJECT_SOURCE_DIR}/src/GEOMImpl
   ${PROJECT_SOURCE_DIR}/src/GEOM
@@ -37,7 +37,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   )
 
index d8981ab14721eb3b1d65ddccee1895951c498036..c909e35c92edb76fbb3f6bfb169442443a7b036a 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -48,7 +48,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index 318debd1666614fe702593c423623079f05c5a15..754e2d6d2a53403eb7f7a78573b247b62eb9ba17 100644 (file)
@@ -25,7 +25,7 @@ ENDIF()
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
   ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
@@ -47,7 +47,7 @@ ENDIF()
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   )
   
@@ -63,7 +63,7 @@ ENDIF()
 
 # libraries to link to
 SET(_link_engine_LIBRARIES
-  ${CAS_TKBREP}
+  ${OpenCASCADE_ModelingData_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   ${KERNEL_OpUtil}
   SalomeIDLGEOM
index 64f157654dcb4e556403d115009c934a74a2d63b..054431a003a3eb4aba1216d63475b86812815341 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -44,7 +44,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index e7399f2f5a0405088a500181fec43248ec90522b..85c27a127e142a15ac4432b59a98e0837e7ab7bc 100644 (file)
@@ -196,7 +196,7 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge&
     Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
     Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
 
-    //taking into accound the orientation of the seam
+    //taking into account the orientation of the seam
     C = BRep_Tool::CurveOnSurface(E,F,f,l);
     Tol = BRep_Tool::Tolerance(E);
 
index ace1f9059d00ab033863d49512dbd3fa613a4a49..ec9aba59a8a7c7cbb658b1002d34fd2200cbae8c 100644 (file)
@@ -213,7 +213,7 @@ Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve2d(const TopoDS_Edge& E,c
     Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
     Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
 
-    //taking into accound the orientation of the seam
+    //taking into account the orientation of the seam
     C = BRep_Tool::CurveOnSurface(E,F,f,l);
     Tol = BRep_Tool::Tolerance(E);
 
index 771e8f0cb82fcc4237c053e83cee98f0e2cebed1..0c9497a2c4afe4e05bc2329ddcafa4379b7cb7f2 100644 (file)
@@ -644,7 +644,7 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
           TopoDS_Wire aWireFixed = sfw->Wire();
           aContext->Replace(aWire,aWireFixed);
           // add resulting wire
-          if(isEdge3d) {
+          if (isEdge3d) {
             B.Add(aResult,aWireFixed);
           }
           else  {
@@ -655,40 +655,42 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
             ShapeAnalysis_WireOrder sawo(Standard_False, 0);
             ShapeAnalysis_Edge sae;
             Standard_Integer aLastEdge = nbEdges;
-            for(Standard_Integer j = 1; j <= nbEdges; j++) {
+            for (Standard_Integer j = 1; j <= nbEdges; j++) {
               Standard_Real f,l;
               //smh protection on NULL pcurve
               Handle(Geom2d_Curve) c2d;
-              if(!sae.PCurve(sbwd->Edge(j),aResult,c2d,f,l)) {
+              if (!sae.PCurve(sbwd->Edge(j),aResult,c2d,f,l)) {
                 aLastEdge--;
                 continue;
               }
               sawo.Add(c2d->Value(f).XY(),c2d->Value(l).XY());
             }
-            sawo.Perform();
-
-            // constructind one degenerative edge
-            gp_XY aStart, anEnd, tmp;
-            Standard_Integer nbFirst = sawo.Ordered(1);
-            TopoDS_Edge anOrigE = TopoDS::Edge(sbwd->Edge(nbFirst).Oriented(TopAbs_FORWARD));
-            ShapeBuild_Edge sbe;
-            TopoDS_Vertex aDummyV;
-            TopoDS_Edge E = sbe.CopyReplaceVertices(anOrigE,aDummyV,aDummyV);
-            sawo.XY(nbFirst,aStart,tmp);
-            sawo.XY(sawo.Ordered(aLastEdge),tmp,anEnd);
-
-            gp_XY aVec = anEnd-aStart;
-            Handle(Geom2d_Line) aLine = new Geom2d_Line(aStart,gp_Dir2d(anEnd-aStart));
-
-            B.UpdateEdge(E,aLine,aResult,0.);
-            B.Range(E,aResult,0.,aVec.Modulus());
-            Handle(Geom_Curve) C3d;
-            B.UpdateEdge(E,C3d,0.);
-            B.Degenerated(E,Standard_True);
-            TopoDS_Wire aW;
-            B.MakeWire(aW);
-            B.Add(aW,E);
-            B.Add(aResult,aW);
+            if (aLastEdge > 0) {
+              sawo.Perform();
+
+              // constructing one degenerative edge
+              gp_XY aStart, anEnd, tmp;
+              Standard_Integer nbFirst = sawo.Ordered(1);
+              TopoDS_Edge anOrigE = TopoDS::Edge(sbwd->Edge(nbFirst).Oriented(TopAbs_FORWARD));
+              ShapeBuild_Edge sbe;
+              TopoDS_Vertex aDummyV;
+              TopoDS_Edge E = sbe.CopyReplaceVertices(anOrigE,aDummyV,aDummyV);
+              sawo.XY(nbFirst,aStart,tmp);
+              sawo.XY(sawo.Ordered(aLastEdge),tmp,anEnd);
+
+              gp_XY aVec = anEnd-aStart;
+              Handle(Geom2d_Line) aLine = new Geom2d_Line(aStart,gp_Dir2d(anEnd-aStart));
+
+              B.UpdateEdge(E,aLine,aResult,0.);
+              B.Range(E,aResult,0.,aVec.Modulus());
+              Handle(Geom_Curve) C3d;
+              B.UpdateEdge(E,C3d,0.);
+              B.Degenerated(E,Standard_True);
+              TopoDS_Wire aW;
+              B.MakeWire(aW);
+              B.Add(aW,E);
+              B.Add(aResult,aW);
+            }
           }
         }
 
index 66b4a17efeddb167ddbdc6decd9df85dd08a579f..a9086710ff9d7d1b6acbb25e366fdd779cc5628c 100755 (executable)
@@ -21,7 +21,7 @@
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PTHREAD_INCLUDE_DIR}
   ${CMAKE_CURRENT_SOURCE_DIR}
@@ -29,14 +29,13 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   )
 
 # libraries to link to
 SET(_link_LIBRARIES
-  ${CAS_KERNEL}
-  ${CAS_TKOffset} ${CAS_TKBool} ${CAS_TKBO}
-  ${CAS_TKShHealing}
+  ${OpenCASCADE_FoundationClasses_LIBRARIES}
+  ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   )
 
index 9da8499d4dc4529657f894b5a856e09bb034f27b..13257d4fec54e34bbe05428ce0c1d44bca3bb0d0 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -44,7 +44,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index 114cd639b9f85e577b2c1653c5b027546e706413..dbede3706d9c0b7e3887c3fba8a08f138e14e399 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -44,7 +44,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index 125740200706d50bc651d22b8a6aba068bd5a7fa..5cbbdbc19dce9359ffe34a1f9f26fd327d5f03f1 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -44,7 +44,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index c4981791ca0892d6b69a1811091af48efba09d94..ca96258752ed0421926720a85088767e661edf88 100644 (file)
@@ -26,7 +26,7 @@ ENDIF(SALOME_BUILD_GUI)
 # additional include directories
 INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_SOURCE_DIR}/src/GEOMUtils
@@ -34,7 +34,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${QT_DEFINITIONS}
 )
 
index e307e81606b14a7c727d9e08613b6e9e2a38f27f..35843c83a7b8ec70dcbf16942592ba4eee3fe545 100644 (file)
@@ -56,7 +56,11 @@ CurveCreator_Curve::CurveCreator_Curve( const CurveCreator::Dimension theDimensi
   myNbRedos   (0),
   myUndoDepth (-1),
   myOpLevel(0),
-  mySkipSorting(false)
+  mySkipSorting(false),
+  myPointAspectColor (Quantity_NOC_ROYALBLUE4), 
+  myCurveColor (Quantity_NOC_RED),
+  myEraseAll(true),
+  myLineWidth(1)
 {
 }
 
@@ -249,13 +253,16 @@ void CurveCreator_Curve::getCoordinates( int theISection, int theIPoint, double&
   }
 }
 
-void CurveCreator_Curve::redisplayCurve()
+void CurveCreator_Curve::redisplayCurve(bool preEraseAllObjects)
 {
   //DEBTRACE("redisplayCurve");
-  if( myDisplayer ) {
-    myDisplayer->eraseAll( false );
+  if( myDisplayer ) 
+  {
+    if (preEraseAllObjects)
+      myDisplayer->eraseAll( false );
+    else
+      myDisplayer->erase( myAISShape, false);
     myAISShape = NULL;
-
     myDisplayer->display( getAISObject( true ), true );
   }
 }
@@ -357,8 +364,12 @@ bool CurveCreator_Curve::redo()
 bool CurveCreator_Curve::clearInternal()
 {
   // erase curve from the viewer
-  if( myDisplayer ) {
-    myDisplayer->eraseAll( true );
+  if( myDisplayer )
+  {
+    if (myEraseAll)
+      myDisplayer->eraseAll( true );
+    else
+      myDisplayer->erase(myAISShape, false);
     myAISShape = NULL;
   }
   // Delete all allocated data.
@@ -394,6 +405,23 @@ bool CurveCreator_Curve::clear()
   return res;
 }
 
+//=======================================================================
+// function: clear
+// purpose:
+//=======================================================================
+void CurveCreator_Curve::SetEraseAllState(bool toEraseAll)
+{
+  myEraseAll = toEraseAll;
+}
+//=======================================================================
+// function: clear
+// purpose:
+//=======================================================================
+bool CurveCreator_Curve::GetEraseAllState() const
+{
+  return myEraseAll;
+}
+
 //! For internal use only! Undo/Redo are not used here.
 bool CurveCreator_Curve::joinInternal( const std::list<int>& theSections )
 {
@@ -422,7 +450,7 @@ bool CurveCreator_Curve::joinInternal( const std::list<int>& theSections )
       break;
   }
 
-  redisplayCurve();
+  redisplayCurve(false);
   return res;
 }
 
@@ -465,7 +493,7 @@ int CurveCreator_Curve::addSectionInternal
   aSection->myIsClosed = theIsClosed;
   aSection->myPoints   = thePoints;
   mySections.push_back(aSection);
-  redisplayCurve();
+  redisplayCurve(false);
   return mySections.size()-1;
 }
 
@@ -525,7 +553,7 @@ bool CurveCreator_Curve::removeSectionInternal( const int theISection )
     delete *anIterRm;
     mySections.erase(anIterRm);
   }
-  redisplayCurve();
+  redisplayCurve(false);
   return true;
 }
   
@@ -616,14 +644,14 @@ bool CurveCreator_Curve::setClosedInternal( const int theISection,
       aSection = (CurveCreator_Section*)getSection( i );
       if( aSection ) {
         aSection->myIsClosed = theIsClosed;
-        redisplayCurve();
+        redisplayCurve(false);
       }
     }
   } else {
     aSection = (CurveCreator_Section*)getSection( theISection );
     if ( aSection ) {
       aSection->myIsClosed = theIsClosed;
-      redisplayCurve();
+      redisplayCurve(false);
     }
   }
   return true;
@@ -706,12 +734,12 @@ bool CurveCreator_Curve::setSectionTypeInternal( const int theISection,
       if ( aSection )
         aSection->myType = theType;
     }
-    redisplayCurve();
+    redisplayCurve(false);
   } else {
     aSection = (CurveCreator_Section*)getSection( theISection );
     if ( aSection && aSection->myType != theType ){
       aSection->myType = theType;
-      redisplayCurve();
+      redisplayCurve(false);
     }
   }
   return true;
@@ -772,7 +800,7 @@ bool CurveCreator_Curve::addPointsInternal( const CurveCreator::SectionsMap &the
     }
   }
   if(res)
-    redisplayCurve();
+    redisplayCurve(false);
   return res;
 }
 
@@ -830,7 +858,7 @@ bool CurveCreator_Curve::setPointInternal( const CurveCreator::SectionsMap &theS
     }
   }
   if(res)
-    redisplayCurve();
+    redisplayCurve(false);
   
   return res;
 }
@@ -914,7 +942,7 @@ bool CurveCreator_Curve::removePointsInternal( const SectionToPointList &thePoin
     aRes = removeSectionPoints(aSectionId, anIt->second);
   }
   if( aRes)
-    redisplayCurve();
+    redisplayCurve(false);
 
   return aRes;
 }
@@ -971,32 +999,39 @@ CurveCreator::Coordinates CurveCreator_Curve::getPoint( const int theISection,
 // function: getPoints
 // purpose:
 //=======================================================================
-CurveCreator::Coordinates CurveCreator_Curve::getPoints( const int theISection ) const
+CurveCreator::Coordinates CurveCreator_Curve::getCoords( int theISection ) const
 {
-  //DEBTRACE("getPoints");
   CurveCreator_Section* aSection = (CurveCreator_Section*)getSection( theISection );
   return aSection ? aSection->myPoints : CurveCreator::Coordinates();
 }
 
+Handle(TColgp_HArray1OfPnt) CurveCreator_Curve::GetDifferentPoints( int theISection ) const
+{
+  //DEBTRACE("getPoints");
+  CurveCreator_Section* aSection = (CurveCreator_Section*)getSection( theISection );
+  return aSection ? aSection->GetDifferentPoints( (int)myDimension ) : Handle(TColgp_HArray1OfPnt)();
+}
+
 void CurveCreator_Curve::constructAISObject()
 {
   //DEBTRACE("constructAISObject");
   TopoDS_Shape aShape;
   CurveCreator_Utils::constructShape( this, aShape );
-
-  myAISShape = new AIS_Shape( aShape );
+  myAISShape = new AIS_Shape( aShape );  
+  myAISShape->SetColor( myCurveColor );
+  myAISShape->SetWidth( myLineWidth );
   Handle(Prs3d_PointAspect) anAspect = myAISShape->Attributes()->PointAspect();
   anAspect->SetScale( 3.0 );
   anAspect->SetTypeOfMarker(Aspect_TOM_O_POINT);
-  anAspect->SetColor(Quantity_NOC_ROYALBLUE4);
+  anAspect->SetColor(myPointAspectColor);
   myAISShape->Attributes()->SetPointAspect( anAspect );
-
 }
 
 Handle(AIS_InteractiveObject) CurveCreator_Curve::getAISObject( const bool theNeedToBuild ) const
 {
   //DEBTRACE("getAISObject");
-  if ( !myAISShape && theNeedToBuild ) {
+  if ( !myAISShape && theNeedToBuild ) 
+  {
     CurveCreator_Curve* aCurve = (CurveCreator_Curve*)this;
     aCurve->constructAISObject();
   }
index 74667f4f0753483013f4f6306d258ba1423dcedf..08239f4e7564c78761dbbb9ea198526644818a46 100644 (file)
@@ -36,6 +36,7 @@ struct CurveCreator_Section;
 class CurveCreator_Displayer;
 class AIS_Shape;
 class AIS_InteractiveObject;
+class Quantity_Color;
 
 /**
  *  The CurveCreator_Curve object is represented as one or more sets of
@@ -108,7 +109,7 @@ protected:
 public: // TODO: remove public
   void getCoordinates( int theISection, int theIPoint, double& theX, double& theY, double& theZ ) const;
 protected:  // TODO: remove public
-  void redisplayCurve();
+  void redisplayCurve(bool preEraseAllObjects = true);
 
 public:
   /************   Implementation of INTERFACE methods   ************/
@@ -139,6 +140,14 @@ public:
   //! Clear the polyline (remove all sections)
   virtual bool clear();
 
+  //! set erase-all state
+  //! if true => erase all objects from viever, else remove only the current curve
+  void SetEraseAllState(bool toEraseAll);
+
+  //! get erase-all state
+  //! if true => erase all objects from viever, else remove only the current curve
+  bool GetEraseAllState() const;
+
   //! For internal use only! Undo/Redo are not used here.
   virtual bool joinInternal( const std::list<int>& theSections );
 
@@ -261,7 +270,9 @@ public:
   /**
    * Get points of a section (the total points in Curve if theISection is equal to -1)..
    */
-  virtual CurveCreator::Coordinates getPoints( const int theISection = -1 ) const;
+  virtual Handle(TColgp_HArray1OfPnt) GetDifferentPoints( int theISection = -1 ) const;
+
+  CurveCreator::Coordinates getCoords( int theISection = -1 ) const;
 
 
   /**
@@ -292,7 +303,7 @@ public:
   /**
    *  Get the curve AIS object
    */
-  virtual Handle(AIS_InteractiveObject) getAISObject( const bool theNeedToBuild = false ) const;
+  virtual Handle(AIS_InteractiveObject) getAISObject( const bool theNeedToBuild = false) const;
 
 protected:
   /**
@@ -322,6 +333,9 @@ public:
   CurveCreator::Sections          mySections;   //!< curve data
   CurveCreator::Dimension         myDimension;  //!< curve dimension
   CurveCreator_Displayer*         myDisplayer;  //!< curve displayer
+  Quantity_Color myPointAspectColor;
+  Quantity_Color myCurveColor;
+  double myLineWidth;
 
 private:
 
@@ -332,6 +346,7 @@ private:
   int                             myUndoDepth;
   int                             myOpLevel;
   AIS_Shape*                      myAISShape;   //!< AIS shape
+  bool                            myEraseAll;
 };
 
 #endif
index e27bd0aad39b61ad46b76436c02c7112f6133cb2..362e451e4c2fbf752e565536f812ed9b72bc6678 100644 (file)
@@ -336,7 +336,7 @@ bool CurveCreator_Diff::init(const CurveCreator_Curve *theCurve,
               aSectionId = anIt->first;
               aPointId = anIt->second;
               const CurveCreator::Coordinates &aPoints =
-                      theCurve->getPoints(aSectionId);
+                      theCurve->getCoords(aSectionId);
               CurveCreator::Coordinates::const_iterator anIterBegin =
                   aPoints.begin() + (aDim*aPointId);
               CurveCreator::Coordinates::const_iterator anIterEnd = 
@@ -526,7 +526,7 @@ bool CurveCreator_Diff::addSectionToUndo
                        CurveCreator_Operation &theOperation) const
 {
   const std::string aName = theCurve->getSectionName(theIndex);
-  const CurveCreator::Coordinates &aPnts = theCurve->getPoints(theIndex);
+  const CurveCreator::Coordinates &aPnts = theCurve->getCoords(theIndex);
   const CurveCreator::SectionType aType = theCurve->getSectionType(theIndex);
   const bool isClosed = theCurve->isClosed(theIndex);
 
index 61285c96297437177147d53022a4c678289b6580..4ac2e0450c8cd90950c71da118acfb8c75eefd30 100644 (file)
@@ -54,14 +54,22 @@ void CurveCreator_Displayer::eraseAll( bool isUpdate )
 {
   if(myObjects.empty())
     return;
-  for( int i = 0 ; i < myObjects.size() ; i++ ){
+  for( int i = 0 ; i < myObjects.size() ; i++ )
     myContext->Erase(myObjects[i], Standard_False);
-  }
   myObjects.clear();
   if( isUpdate )
     myContext->UpdateCurrentViewer();
 }
 
+void CurveCreator_Displayer::erase( const Handle(AIS_InteractiveObject)& theObject, bool isUpdate )
+{
+  if(theObject.IsNull())
+    return;
+  myContext->Erase(theObject, Standard_False);
+  if( isUpdate )
+    myContext->UpdateCurrentViewer();
+}
+
 Quantity_Color CurveCreator_Displayer::getActiveColor( bool isHL )
 {
   if( isHL ){
@@ -70,6 +78,13 @@ Quantity_Color CurveCreator_Displayer::getActiveColor( bool isHL )
   return Quantity_Color( 0., 1., 0., Quantity_TOC_RGB );
 }
 
+void CurveCreator_Displayer::Update()
+{
+  for( int i = 0 ; i < myObjects.size() ; i++ )
+    myContext->Update(myObjects[i], Standard_True);
+  myContext->UpdateCurrentViewer();
+}
+
 /*void CurveCreator_Displayer::highlight( const AISObjectsList& theObjects, bool isHL )
 {
   return;
index d78b2a2f26d7fe5779638795b75da3613dea39e4..9528c8616240cd2d70f322dd92c1f024b9d891ae 100644 (file)
@@ -38,6 +38,8 @@ public:
 
   void display( const Handle(AIS_InteractiveObject)& theObject, bool isUpdate );
   void eraseAll( bool isUpdate );
+  void erase( const Handle(AIS_InteractiveObject)& theObject, bool isUpdate );
+  void Update();
   //void highlight( const AISObjectsList& theObjects, bool isHL );
 
 protected:
index 150e37d2e363328ec9fbb2e5e30a67d80125ee03..d1a2e48bccc6d6bb0160076dd1385256c67335ce 100644 (file)
@@ -59,8 +59,7 @@ struct CURVECREATOR_EXPORT CurveCreator_ISection
   virtual ~CurveCreator_ISection() {}
 
   //! Calculates the different points of the section.
-  virtual void GetDifferentPoints(
-    const int theDimension, Handle(TColgp_HArray1OfPnt)& thePoints) const = 0;
+  virtual Handle(TColgp_HArray1OfPnt) GetDifferentPoints( int theDimension ) const = 0;
 };
 
 /**
@@ -192,7 +191,7 @@ public:
   /**
    * Get points of a section (the total points in Curve if theISection is equal to -1)..
    */
-  virtual CurveCreator::Coordinates getPoints( const int theISection = -1 ) const = 0;
+  virtual Handle(TColgp_HArray1OfPnt) GetDifferentPoints( int theISection = -1 ) const = 0;
 
   /**
    *  Get number of points in specified section or (the total number of points
index e2298c092acbcb95fb860e13ec9018fb9451482c..51f83fab663475c8890880c93949b6e63d6a2694 100644 (file)
@@ -30,16 +30,24 @@ const double POINT_CONFUSION = 1e-4;
 // function: GetDifferentPoints
 // purpose:
 //=======================================================================
-void CurveCreator_Section::GetDifferentPoints(
-  const int theDimension, Handle(TColgp_HArray1OfPnt)& thePoints) const
+Handle(TColgp_HArray1OfPnt) CurveCreator_Section::GetDifferentPoints( int theDimension ) const
 {
+  Handle(TColgp_HArray1OfPnt) points;
+
   std::vector<gp_Pnt> aTmpPoints;
+
   CurveCreator::Coordinates::const_iterator aPIt = myPoints.begin();
   CurveCreator::Coordinates::const_iterator aPItLast = myPoints.end();
-  const gp_Pnt aFirstPoint(
-    *aPIt, *(aPIt + 1), (theDimension == 2) ? 0 : *(aPIt + 2));
-  gp_Pnt aPoint = aFirstPoint;
-  aTmpPoints.push_back(aPoint);
+
+  gp_Pnt aFirstPoint;
+  gp_Pnt aPoint;
+
+  if( myPoints.size() > 0 )
+  {
+    aFirstPoint = gp_Pnt(*aPIt, *(aPIt + 1), (theDimension == 2) ? 0 : *(aPIt + 2));
+    aPoint = aFirstPoint;
+    aTmpPoints.push_back(aPoint);
+  }
 
   for (; aPIt != aPItLast; aPIt += theDimension)
   {
@@ -62,9 +70,11 @@ void CurveCreator_Section::GetDifferentPoints(
     }
   }
 
-  thePoints = new TColgp_HArray1OfPnt(1, aPointCount);
+  points = new TColgp_HArray1OfPnt(1, aPointCount);
   for (int aPI = 0; aPI < aPointCount; ++aPI)
   {
-    thePoints->SetValue(aPI + 1, aTmpPoints[aPI]);
+    points->SetValue(aPI + 1, aTmpPoints[aPI]);
   }
+
+  return points;
 }
index 9ad98048a55af66eff13c46625335763580099ad..07b1bc9731309da0fbe70a75f42c008b1ea81d98 100644 (file)
@@ -36,13 +36,13 @@ struct CURVECREATOR_EXPORT CurveCreator_Section :
   CurveCreator_Section() : myName("Section"),myType(CurveCreator::Polyline), myIsClosed(false)
   { }
 
-  std::string               myName; //!< section name
+  std::string               myName;     //!< section name
   CurveCreator::Coordinates myPoints;   //!< points coordinates
   CurveCreator::SectionType myType;     //!< type of the section
   bool                      myIsClosed; //!< closed or not
 
   //! A virtual method.
-  void GetDifferentPoints(const int theDimension, Handle(TColgp_HArray1OfPnt)& thePoints) const;
+  Handle(TColgp_HArray1OfPnt) GetDifferentPoints( int theDimension ) const;
 };
 
 #endif
index bda45103e5bb853f1bf6e54bea75ec9f47434ffb..a6d819dcd78830415b57251a2e85853b2e76a527 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "CurveCreator_TableView.h"
 #include "CurveCreator_UtilsICurve.hxx"
+#include "CurveCreator_Widget.h"
 
 #include <gp_Pnt.hxx>
 
@@ -94,10 +95,14 @@ void CurveCreator_TableItemDelegate::setModelData( QWidget* theEditor,
     QItemDelegate::setModelData( theEditor, theModel, theIndex );
 }
 
+
+
+
 CurveCreator_TableView::CurveCreator_TableView( CurveCreator_ICurve* theCurve,
-                                                QWidget* theParent,
+                                                CurveCreator_Widget* theParent,
                                                 const QStringList& theCoordTitles )
-: QTableWidget( theParent ), myCurve( theCurve )
+  : QTableWidget( theParent ), myWidget( theParent ),
+    myCurve( theCurve ), myCurrentSortId( -1 ), myCurrentSortOrder( Qt::AscendingOrder )
 {
   setItemDelegate( new CurveCreator_TableItemDelegate( this ) );
   setVisible( false );
@@ -199,5 +204,22 @@ int CurveCreator_TableView::getPointId( const int theRowId ) const
 
 void CurveCreator_TableView::OnHeaderClick( int theLogicalId )
 {
-  sortByColumn( theLogicalId, Qt::AscendingOrder );
+  if( theLogicalId == myCurrentSortId )
+    if( myCurrentSortOrder == Qt::AscendingOrder )
+      myCurrentSortOrder = Qt::DescendingOrder;
+    else
+      myCurrentSortOrder = Qt::AscendingOrder;
+
+  sortByColumn( theLogicalId, myCurrentSortOrder );
+
+  CurveCreator_ICurve::SectionToPointList selected;
+  for( int r=0, n=rowCount(); r<n; r++ )
+  {
+    int section = item( r, 0 )->data( Qt::UserRole ).toInt();
+    int point = item( r, 1 )->data( Qt::UserRole ).toInt();
+    selected.push_back( CurveCreator_ICurve::SectionToPoint( section, point ) );
+  }
+  myWidget->setSelectedPoints( selected );
+
+  myCurrentSortId = theLogicalId;
 }
index bfc0e9b69b23db5c78d6bcd53c9e6eaae21f9f42..16db2385695b71761e826b4564eb5fb2daf0b1ac 100644 (file)
@@ -25,6 +25,8 @@
 #include <QItemDelegate>
 #include <QTableWidget>
 
+class CurveCreator_Widget;
+
 class CurveCreator_TableItemDelegate : public QItemDelegate
 {
 public:
@@ -39,12 +41,12 @@ public:
                                  const QModelIndex& theIndex ) const;
 };
 
-class CurveCreator_TableView : public QTableWidget
+class CURVECREATOR_EXPORT CurveCreator_TableView : public QTableWidget
 {
   Q_OBJECT
 
 public:
-  CurveCreator_TableView( CurveCreator_ICurve* theCurve, QWidget* theParent = 0,
+  CurveCreator_TableView( CurveCreator_ICurve* theCurve, CurveCreator_Widget* theParent,
                           const QStringList& theCoordTitles = QStringList() );
   ~CurveCreator_TableView() {};
 
@@ -63,12 +65,15 @@ public:
    */
   int getPointId( const int theRowId ) const;
 
-private slots:
+public slots:
   void OnHeaderClick( int );
 
 private:
+  CurveCreator_Widget* myWidget;
   CurveCreator_ICurve* myCurve;
 
+  int           myCurrentSortId;
+  Qt::SortOrder myCurrentSortOrder;
 };
 
 #endif // CURVECREATOR_TABLEVIEW_H
index 6a8ecec53101ef42b2c9143490fc1edd56aaf15e..89f2606c3586f3eb1832f526c465a87b8dd68a37 100644 (file)
@@ -212,9 +212,13 @@ int CurveCreator_TreeViewModel::getPoint( const QModelIndex& theIndx ) const
 
 void CurveCreator_TreeViewModel::setCurve( CurveCreator_ICurve* theCurve )
 {
-  myCurve = theCurve;
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+  myCurve = theCurve;
   reset();
+#else
+  beginResetModel();
+  myCurve = theCurve;
+  endResetModel();
 #endif
 }
 
index 77de8c2d83c924cac5400ae1828e7b18387ab552..6408b38dc705d63231a5dffd67f820ac42258ce8 100644 (file)
@@ -309,9 +309,7 @@ void CurveCreator_Utils::constructShape(
     }
 
     // Get the different points.
-    const CurveCreator_ISection* aSection = theCurve->getSection(aSectionI);
-    Handle(TColgp_HArray1OfPnt) aPoints;
-    aSection->GetDifferentPoints(theCurve->getDimension(), aPoints);
+    Handle(TColgp_HArray1OfPnt) aPoints = theCurve->GetDifferentPoints( aSectionI );
     const int aPointCount = aPoints->Length();
     const bool isClosed = theCurve->isClosed(aSectionI);
 
@@ -617,6 +615,12 @@ void CurveCreator_Utils::setSelectedPoints( Handle(AIS_InteractiveContext) theCo
   theContext->SetAutomaticHilight( Standard_False );
 
   Handle(SelectMgr_Selection) aSelection = anAISShape->Selection( AIS_Shape::SelectionMode( TopAbs_VERTEX ) );
+
+  CurveCreator_ICurve::SectionToPointList::const_iterator anIt = thePoints.begin(),
+                                                          aLast = thePoints.end();
+  bool isFound = false;
+  for( int i=0; i<aSize; i++ )
+  {
   for( aSelection->Init(); aSelection->More(); aSelection->Next() )
   {    
     const Handle(SelectMgr_SensitiveEntity) aHSenEntity = aSelection->Sensitive();
@@ -629,12 +633,6 @@ void CurveCreator_Utils::setSelectedPoints( Handle(AIS_InteractiveContext) theCo
     gp_Pnt anOwnerPnt = aSenPnt->Point();
     Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner)::DownCast( aSenPnt->OwnerId() );
 
-
-    CurveCreator_ICurve::SectionToPointList::const_iterator anIt = thePoints.begin(),
-                                                                   aLast = thePoints.end();
-    bool isFound = false;
-    for( int i=0; i<aSize; i++ )
-    {
       bool isIntersect = fabs( aPntsToSelect[i].X() - anOwnerPnt.X() ) < LOCAL_SELECTION_TOLERANCE &&
                          fabs( aPntsToSelect[i].Y() - anOwnerPnt.Y() ) < LOCAL_SELECTION_TOLERANCE;
       if( isIntersect )
index ae0c67d91ba8641a3eec5353e2e24c029bc19eac..8a7feb465f0b3c1df3bec85855ce94e5866a8435 100644 (file)
@@ -80,11 +80,10 @@ CurveCreator_Widget::CurveCreator_Widget(QWidget* parent,
                                          CurveCreator_ICurve *theCurve,
                                          const int theActionFlags,
                                          const QStringList& theCoordTitles,
-                                         Qt::WindowFlags fl,
-                                         int theLocalPointRowLimit )
+                                         Qt::WindowFlags fl )
 : QWidget(parent), myNewSectionEditor(NULL), myCurve(theCurve), mySection(0),
   myDragStarted( false ), myDragInteractionStyle( SUIT_ViewModel::STANDARD ),
-  myOCCViewer( 0 ), myLocalPointRowLimit( theLocalPointRowLimit ),
+  myOCCViewer( 0 ),
   myOld2DMode(OCCViewer_ViewWindow::No2dMode)
 {
   bool isToEnableClosed = !( theActionFlags & DisableClosedSection );
@@ -1460,16 +1459,16 @@ void CurveCreator_Widget::updateLocalPointView()
   CurveCreator_Utils::getSelectedPoints( aContext, myCurve, myLocalPoints );
   int aNbPoints = myLocalPoints.size();
 
-  bool isRowLimit = aNbPoints > myLocalPointRowLimit;
-  myLocalPointView->setVisible( getActionMode() == ModificationMode && !isRowLimit );
+  //bool isRowLimit = aNbPoints > myLocalPointRowLimit;
+  myLocalPointView->setVisible( getActionMode() == ModificationMode/* && !isRowLimit */);
 
-  if ( !isRowLimit ) {
-    bool isBlocked = myLocalPointView->blockSignals(true);
+  //if ( !isRowLimit ) {
+  bool isBlocked = myLocalPointView->blockSignals(true);
 
-    myLocalPointView->setLocalPointsToTable( myLocalPoints );
+  myLocalPointView->setLocalPointsToTable( myLocalPoints );
 
-    myLocalPointView->blockSignals( isBlocked );
-  }
+  myLocalPointView->blockSignals( isBlocked );
+  //}
 }
 
 /**
index da38404a6127ef3be372d8b2a4ee21137524db91..e91e50249f27a1ec4dbd19a1d19e9e559f9d2fdc 100644 (file)
@@ -71,8 +71,7 @@ public:
                                 CurveCreator_ICurve *theCurve,
                                 const int theActionFlags = NoFlags,
                                 const QStringList& theCoordTitles = QStringList(),
-                                Qt::WindowFlags fl=0,
-                                int theLocalPointRowLimit = 20);
+                                Qt::WindowFlags fl=0);
 
   // OCC viewer manipulation
   void setOCCViewer( OCCViewer_Viewer* theViewer );
@@ -95,14 +94,18 @@ public:
 
   void SetViewer2DMode(const bool To2D);
 
+  void setSelectedPoints( const CurveCreator_ICurve::SectionToPointList& =
+                               CurveCreator_ICurve::SectionToPointList() );
+
+  void updateLocalPointView();
+  void setLocalPointContext( const bool theOpen, const bool isUpdateTable = false );
+
 signals:
   void selectionChanged();
   void subOperationStarted( QWidget*, bool );
   void subOperationFinished( QWidget* );
 
 public slots:
-
-protected slots:
   void     onAdditionMode(bool checked);
   void     onModificationMode(bool checked);
   void     onDetectionMode(bool checked);
@@ -162,13 +165,15 @@ protected:
                  BRING_TOGETHER_ID
   };
 
+public:
+  QAction* getAction(ActionId theId);
+  QAction* getAction(ActionMode theMode);
+
 private:
   OCCViewer_Viewer* getOCCViewer();
 
   QAction* createAction( ActionId theId, const QString& theName, const QPixmap& theImage,
                          const QString& theToolTip, const QKeySequence& theShortcut );
-  QAction* getAction(ActionId theId);
-  QAction* getAction(ActionMode theMode);
 
   void updateActionsStates();
   void updateUndoRedo();
@@ -179,14 +184,10 @@ private:
   void insertPointToSelectedSegment( const int theXPosition,
                                      const int theYPosition );
   void moveSelectedPoints( const int theXPosition, const int theYPosition );
-  void updateLocalPointView();
-  void setLocalPointContext( const bool theOpen, const bool isUpdateTable = false );
 
   void setDragStarted( const bool theState, const QPoint& thePoint = QPoint() );
 
   void getSelectedPoints( CurveCreator_ICurve::SectionToPointList& thePoints );
-  void setSelectedPoints( const CurveCreator_ICurve::SectionToPointList& =
-                               CurveCreator_ICurve::SectionToPointList() );
 
   void stopActionMode();
 
index e233bf9ca1726e72d8483f83f0fb65dc7c14b67b..9c5543dae44d35aabc7d4e82bade080b48f625d8 100644 (file)
@@ -25,7 +25,7 @@ INCLUDE(UseQtExt)
 INCLUDE_DIRECTORIES(
   ${QT_INCLUDES}
   ${GUI_INCLUDE_DIRS}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${PROJECT_SOURCE_DIR}/src/GEOMGUI
   ${PROJECT_SOURCE_DIR}/src/GEOMBase
   ${PROJECT_SOURCE_DIR}/src/GEOM
@@ -40,7 +40,7 @@ ADD_DEFINITIONS(
   ${QT_DEFINITIONS}
   ${GUI_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   )
 IF(WIN32)
   ADD_DEFINITIONS(-DNOGDI)
index b9e0a8cdf40fb3151d00733d4215eaecd283c659..554b1fba92a89d6575e3d522f32756711a31eab6 100755 (executable)
@@ -24,7 +24,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -38,7 +38,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index c42e5095d105dde20b0ad2051e783963d2ffcc12..c1cdaa3f30bb006ffc6eb5e4df1e00af6d239a11 100755 (executable)
@@ -27,7 +27,7 @@ INCLUDE_DIRECTORIES(
   ${VTK_INCLUDE_DIRS}
   ${OPENCV_INCLUDE_DIR}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -50,7 +50,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   ${OPENCV_DEFINITIONS}
index 1a3f06fab2d887a5db9925e2608b4cc56d3dabc3..060c0c17e2c7419cb33fb94c6af91d60c2f1cd08 100755 (executable)
@@ -1481,9 +1481,9 @@ void EntityGUI_3DSketcherDlg::displayDimensions (bool store)
                  0.0); 
     
     // Express the coordinates in the reference coordinate system (OXY)
-    gp_Trsf aTranform = toReferenceSystem(P0);
-    P1.Transform(aTranform);    
-    P2.Transform(aTranform);
+    gp_Trsf aTransform = toReferenceSystem(P0);
+    P1.Transform(aTransform);    
+    P2.Transform(aTransform);
     P1.Translate(Origin, P0);
     P2.Translate(Origin, P0);
     
index 98a73d3ec5ac0b43e56970317eabe446f9067c47..b31a3ace523b158783da918759d023ff6c976f08 100644 (file)
@@ -252,7 +252,7 @@ void EntityGUI_PolylineDlg::GetCurveParams(GEOM::ListOfListOfDouble &theCoords,
 
   for (i = 0; i < aNbSec; ++i) {
     // Set coordinates
-    CurveCreator::Coordinates aCoords   = myCurve->getPoints(i);
+    CurveCreator::Coordinates aCoords   = myCurve->getCoords(i);
     const int                 aNbPoints = aCoords.size();
 
     theCoords[i].length(aNbPoints);
index 9a34d081b15d3d749037303bff9b8ee354dea46f..30ec5585ef21295e94addd467c9dba0bc07a424d 100755 (executable)
@@ -21,7 +21,7 @@
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PROJECT_SOURCE_DIR}/src/SKETCHER
@@ -30,18 +30,12 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   )
 
 # libraries to link to
 SET(_link_LIBRARIES
-  ${CAS_OCAFVIS}
-  ${CAS_TKLCAF}
-  ${CAS_TKCDF}
-  ${CAS_TKG3d}
-  ${CAS_TKStdL}
-  ${CAS_TKStd}
-  ${CAS_TKBin}
+  ${OpenCASCADE_ApplicationFramework_LIBRARIES} ${OpenCASCADE_ModelingData_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   ${KERNEL_OpUtil}
   GEOMSketcher
index 3e3c48620f772385b16d0ad8d9c6c4e96557886f..7ac1924202cd30ec45c1b58b15aedb5492719b9a 100755 (executable)
@@ -21,7 +21,7 @@
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PROJECT_SOURCE_DIR}/src/GEOMUtils
   ${PROJECT_SOURCE_DIR}/src/GEOM
@@ -30,12 +30,13 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   )
 
 # libraries to link to
 SET(_link_LIBRARIES
-  ${CAS_KERNEL} ${CAS_TKBool} ${CAS_TKBO} ${CAS_TKMesh}
+  ${OpenCASCADE_FoundationClasses_LIBRARIES}
+  ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
   GEOMbasic GEOMUtils
   ${KERNEL_SALOMELocalTrace}
   )
@@ -48,7 +49,6 @@ SET(GEOMAlgo_HEADERS
   GEOMAlgo_BndSphere.hxx
   GEOMAlgo_BndSphereTree.hxx
   GEOMAlgo_BoxBndTree.hxx
-  GEOMAlgo_BuilderShape.hxx
   GEOMAlgo_Clsf.hxx
   GEOMAlgo_ClsfBox.hxx
   GEOMAlgo_ClsfQuad.hxx
index 3c7cb4279a6c99cc5d9335df2419c227405d0a59..63c6b8747770e3d063e59aaeb6c8eb2ab840a1b5 100644 (file)
@@ -54,14 +54,14 @@ GEOMAlgo_ClsfQuad::~GEOMAlgo_ClsfQuad()
 //purpose  :
 //=======================================================================
 void GEOMAlgo_ClsfQuad::SetCorners(const gp_Pnt &theTopLeftPoint,
-                                   const gp_Pnt &theTopRigthPoint,
+                                   const gp_Pnt &theTopRightPoint,
                                    const gp_Pnt &theBottomLeftPoint,
-                                   const gp_Pnt &theBottomRigthPoint)
+                                   const gp_Pnt &theBottomRightPoint)
 {
   myPoints.resize(6);
   myPoints[0] = theTopLeftPoint;
-  myPoints[1] = theTopRigthPoint;
-  myPoints[2] = theBottomRigthPoint;
+  myPoints[1] = theTopRightPoint;
+  myPoints[2] = theBottomRightPoint;
   myPoints[3] = theBottomLeftPoint;
   myPoints[4] = myPoints[0];
   myPoints[5] = myPoints[1];
@@ -118,15 +118,15 @@ void GEOMAlgo_ClsfQuad::SetCorners(const gp_Pnt &theTopLeftPoint,
 //purpose  :
 //=======================================================================
 void GEOMAlgo_ClsfQuad::GetCorners(gp_Pnt &theTopLeftPoint,
-                                   gp_Pnt &theTopRigthPoint,
+                                   gp_Pnt &theTopRightPoint,
                                    gp_Pnt &theBottomLeftPoint,
-                                   gp_Pnt &theBottomRigthPoint) const
+                                   gp_Pnt &theBottomRightPoint) const
 {
   if (myPoints.size() == 6) {
     theTopLeftPoint     = myPoints[0];
-    theTopRigthPoint    = myPoints[1];
+    theTopRightPoint    = myPoints[1];
     theBottomLeftPoint  = myPoints[3];
-    theBottomRigthPoint = myPoints[2];
+    theBottomRightPoint = myPoints[2];
   }
 }
 
index 95ec33d5a084a9a2a4ede3b947a6fab64323cbc2..32d6d12b1dc2a8cf3f14fcf326200367750a4899 100644 (file)
@@ -56,15 +56,15 @@ public:
 
   Standard_EXPORT
     void SetCorners(const gp_Pnt &theTopLeftPoint,
-                    const gp_Pnt &theTopRigthPoint,
+                    const gp_Pnt &theTopRightPoint,
                     const gp_Pnt &theBottomLeftPoint,
-                    const gp_Pnt &theBottomRigthPoint);
+                    const gp_Pnt &theBottomRightPoint);
 
   Standard_EXPORT
     void GetCorners(gp_Pnt &theTopLeftPoint,
-                    gp_Pnt &theTopRigthPoint,
+                    gp_Pnt &theTopRightPoint,
                     gp_Pnt &theBottomLeftPoint,
-                    gp_Pnt &theBottomRigthPoint) const;
+                    gp_Pnt &theBottomRightPoint) const;
 
   Standard_EXPORT
     virtual  void Perform();
index 20e5ca9d082c409805d24ea7f1a6c1e7867e55fd..e58444a4dec4faaf2a25f60488c6ce6024160028 100644 (file)
 
 
 GEOMAlgo_FinderShapeOnQuad::GEOMAlgo_FinderShapeOnQuad(const gp_Pnt & theTopLeftPoint,
-                                                       const gp_Pnt & theTopRigthPoint,
+                                                       const gp_Pnt & theTopRightPoint,
                                                        const gp_Pnt & theBottomLeftPoint,
-                                                       const gp_Pnt & theBottomRigthPoint)
+                                                       const gp_Pnt & theBottomRightPoint)
 {
   myPoints.resize(6);
   myPoints[0] = theTopLeftPoint    ;
-  myPoints[1] = theTopRigthPoint   ;
-  myPoints[2] = theBottomRigthPoint;
+  myPoints[1] = theTopRightPoint   ;
+  myPoints[2] = theBottomRightPoint;
   myPoints[3] = theBottomLeftPoint ;
   myPoints[4] = myPoints[0];
   myPoints[5] = myPoints[1];
index 79dd75756b29a3a99c921f0a097325ae1298ada0..a8ab868e99f55668c7bf435ccd3ffb392bf6e2d6 100644 (file)
@@ -40,9 +40,9 @@ public:
 
   Standard_EXPORT
   GEOMAlgo_FinderShapeOnQuad(const gp_Pnt & theTopLeftPoint,
-                             const gp_Pnt & theTopRigthPoint,
+                             const gp_Pnt & theTopRightPoint,
                              const gp_Pnt & theBottomLeftPoint,
-                             const gp_Pnt & theBottomRigthPoint);
+                             const gp_Pnt & theBottomRightPoint);
 
 protected:
 
index 77243000589e26a851231e6f58fdb7ff80217411..c9c111fda136ecedc03d7195678698a70cd49e4d 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -42,7 +42,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index 8f6a204f98a401e09b2643426385ea6110515509..a220557692b82163434bfe9d097099aa11b05172 100755 (executable)
@@ -22,7 +22,7 @@
 # additional include directories
 INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -31,14 +31,14 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   )
 
 # libraries to link to
 SET(_link_LIBRARIES
   SalomeIDLGEOM
-  ${CAS_TKBRep}
+  ${OpenCASCADE_ModelingData_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   )
 
index 14b748cd617c4b14e890e9ba3420564e789aed70..c15263af03b557fbd9ce720f7f98371dd93d8515 100755 (executable)
@@ -23,7 +23,7 @@
 INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -34,7 +34,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
@@ -43,7 +43,7 @@ ADD_DEFINITIONS(
 SET(_link_LIBRARIES
   SalomeIDLGEOM
   GEOMClient
-  ${CAS_TKBRep}
+  ${OpenCASCADE_ModelingData_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   ${GUI_SalomeApp}
   )
index 9dd7a50d8fdec939708ba4c409fe137c3b95572f..db8aacf2c04d089accc3ff00fbca177f9bc965be 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -42,7 +42,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   ${OPENCV_DEFINITIONS}
index 56e82b81ea64a0383189e9a2b1cefb2e35176ec7..0311bf0f27663341b61b8640fba1114345ab90b2 100755 (executable)
@@ -836,10 +836,12 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
   AISShape->Attributes()->SetUnFreeBoundaryAspect( anAspect );
   
   // - free boundaries color
-  anAspect = AISShape->Attributes()->FreeBoundaryAspect();
-  anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() : 
+  Handle(Prs3d_LineAspect) aFreeBoundaryAspect =
+    new Prs3d_LineAspect (Quantity_NOC_RED, Aspect_TOL_SOLID, 1.0);
+  *aFreeBoundaryAspect->Aspect() = *AISShape->Attributes()->FreeBoundaryAspect()->Aspect();
+  aFreeBoundaryAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() : 
                       SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::FreeBndColor ) ).value<QColor>() ) );
-  AISShape->Attributes()->SetFreeBoundaryAspect( anAspect );
+  AISShape->Attributes()->SetFreeBoundaryAspect( aFreeBoundaryAspect );
   
   // - standalone edges color
   anAspect = AISShape->Attributes()->WireAspect();
index d859307d51f403552460633a5a92d95b248a8e62..27995b8fe3a95ac46b6bca7c0432fe5fe3bc3c87 100755 (executable)
@@ -2256,7 +2256,11 @@ void GeometryGUI::contextMenuPopup( const QString& client, QMenu* menu, QString&
   getApp()->selectionMgr()->selectedObjects( lst );
 
   //Add submenu for predefined materials
-  bool isPredefMat = SUIT_Session::session()->resourceMgr()->booleanValue( "Geometry", "predef_materials" );
+  // RNV: '#23552: Unable to use the contextual menu of Object Browser window' issue: 
+  //      Temporary solution: do not show 'Materials' submenu forcibly
+  //bool isPredefMat = SUIT_Session::session()->resourceMgr()->booleanValue( "Geometry", "predef_materials" );
+  bool isPredefMat = false;
+  
   if ( ( client == "OCCViewer" || client == "VTKViewer" ) && lst.Extent() > 0 ) {
     QtxPopupMgr* mgr = popupMgr();
     //get parrent for submenu
@@ -2376,8 +2380,9 @@ void GeometryGUI::createPreferences()
   int defl = addPreference( tr( "PREF_DEFLECTION" ), genGroup,
                             LightApp_Preferences::DblSpin, "Geometry", "deflection_coeff" );
 
-  addPreference( tr( "PREF_PREDEF_MATERIALS" ), genGroup,
-                 LightApp_Preferences::Bool, "Geometry", "predef_materials" );
+  // RNV: Temporary hide this preference, because of the '#23552: Unable to use the contextual menu of Object Browser window' issue
+  //addPreference( tr( "PREF_PREDEF_MATERIALS" ), genGroup,
+  //               LightApp_Preferences::Bool, "Geometry", "predef_materials" );
 
   int material = addPreference( tr( "PREF_MATERIAL" ), genGroup,
                                 LightApp_Preferences::Selector,
index 79b3a9b99af7583585b9c536a9d5f4296fbb9b2c..8eaa88a06a2ed0dd54fb65f2ba6cad88c4ea221d 100755 (executable)
@@ -21,7 +21,7 @@
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PYTHON_INCLUDE_DIRS}
@@ -39,14 +39,13 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${PYTHON_DEFINITIONS}
   )
 
 # libraries to link to
 SET(_link_LIBRARIES
-  ${CAS_TKFeat}
-  ${CAS_TKFillet}
+  ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
   ${PYTHON_LIBRARIES}
   ShHealOper GEOMbasic BlockFix GEOMAlgo GEOMUtils GEOMSketcher GEOMArchimede XAO
   ${KERNEL_SALOMELocalTrace}
index 5c911c08e9f2ed31741c6a4a763c45abc9e367bf..46a9c78a44e5ca1ee026c89ff5c108ea76319c4a 100644 (file)
@@ -4179,9 +4179,9 @@ Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetShapesOnSphere
     * \param theShape - the shape to explore
     * \param theShapeType - type of sub-shape of theShape
     * \param theTopLeftPoint - top left quadrangle corner
-    * \param theTopRigthPoint - top right quadrangle corner
+    * \param theTopRightPoint - top right quadrangle corner
     * \param theBottomLeftPoint - bottom left quadrangle corner
-    * \param theBottomRigthPoint - bottom right quadrangle corner
+    * \param theBottomRightPoint - bottom right quadrangle corner
     * \param theState - required state
     * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
    */
@@ -4190,25 +4190,25 @@ Handle(TColStd_HSequenceOfInteger)
   GEOMImpl_IShapesOperations::getShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
                                                         const Standard_Integer     theShapeType,
                                                         const Handle(GEOM_Object)& theTopLeftPoint,
-                                                        const Handle(GEOM_Object)& theTopRigthPoint,
+                                                        const Handle(GEOM_Object)& theTopRightPoint,
                                                         const Handle(GEOM_Object)& theBottomLeftPoint,
-                                                        const Handle(GEOM_Object)& theBottomRigthPoint,
+                                                        const Handle(GEOM_Object)& theBottomRightPoint,
                                                         const GEOMAlgo_State       theState)
 {
   SetErrorCode(KO);
 
   if ( theShape.IsNull() ||
        theTopLeftPoint.IsNull() ||
-       theTopRigthPoint.IsNull() ||
+       theTopRightPoint.IsNull() ||
        theBottomLeftPoint.IsNull() ||
-       theBottomRigthPoint.IsNull() )
+       theBottomRightPoint.IsNull() )
     return NULL;
 
   TopoDS_Shape aShape = theShape->GetValue();
   TopoDS_Shape aTL = theTopLeftPoint->GetValue();
-  TopoDS_Shape aTR = theTopRigthPoint->GetValue();
+  TopoDS_Shape aTR = theTopRightPoint->GetValue();
   TopoDS_Shape aBL = theBottomLeftPoint->GetValue();
-  TopoDS_Shape aBR = theBottomRigthPoint->GetValue();
+  TopoDS_Shape aBR = theBottomRightPoint->GetValue();
 
   if (aShape.IsNull() ||
       aTL.IsNull() ||
@@ -4308,9 +4308,9 @@ Handle(TColStd_HSequenceOfInteger)
     * \param theShape - the shape to explore
     * \param theShapeType - type of sub-shape of theShape
     * \param theTopLeftPoint - top left quadrangle corner
-    * \param theTopRigthPoint - top right quadrangle corner
+    * \param theTopRightPoint - top right quadrangle corner
     * \param theBottomLeftPoint - bottom left quadrangle corner
-    * \param theBottomRigthPoint - bottom right quadrangle corner
+    * \param theBottomRightPoint - bottom right quadrangle corner
     * \param theState - required state
     * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
    */
@@ -4319,9 +4319,9 @@ Handle(TColStd_HSequenceOfTransient)
     GEOMImpl_IShapesOperations::GetShapesOnQuadrangle (const Handle(GEOM_Object)& theShape,
                                                        const Standard_Integer     theShapeType,
                                                        const Handle(GEOM_Object)& theTopLeftPoint,
-                                                       const Handle(GEOM_Object)& theTopRigthPoint,
+                                                       const Handle(GEOM_Object)& theTopRightPoint,
                                                        const Handle(GEOM_Object)& theBottomLeftPoint,
-                                                       const Handle(GEOM_Object)& theBottomRigthPoint,
+                                                       const Handle(GEOM_Object)& theBottomRightPoint,
                                                        const GEOMAlgo_State       theState)
 {
   // Find indices
@@ -4329,9 +4329,9 @@ Handle(TColStd_HSequenceOfTransient)
     getShapesOnQuadrangleIDs( theShape,
                               theShapeType,
                               theTopLeftPoint,
-                              theTopRigthPoint,
+                              theTopRightPoint,
                               theBottomLeftPoint,
-                              theBottomRigthPoint,
+                              theBottomRightPoint,
                               theState);
   if ( aSeqOfIDs.IsNull() || aSeqOfIDs->IsEmpty() )
     return NULL;
@@ -4353,9 +4353,9 @@ Handle(TColStd_HSequenceOfTransient)
     << theShape << ", "
     << TopAbs_ShapeEnum(theShapeType) << ", "
     << theTopLeftPoint << ", "
-    << theTopRigthPoint << ", "
+    << theTopRightPoint << ", "
     << theBottomLeftPoint << ", "
-    << theBottomRigthPoint << ", "
+    << theBottomRightPoint << ", "
     << theState << ")";
 
   SetErrorCode(OK);
@@ -4369,9 +4369,9 @@ Handle(TColStd_HSequenceOfTransient)
     * \param theShape - the shape to explore
     * \param theShapeType - type of sub-shape of theShape
     * \param theTopLeftPoint - top left quadrangle corner
-    * \param theTopRigthPoint - top right quadrangle corner
+    * \param theTopRightPoint - top right quadrangle corner
     * \param theBottomLeftPoint - bottom left quadrangle corner
-    * \param theBottomRigthPoint - bottom right quadrangle corner
+    * \param theBottomRightPoint - bottom right quadrangle corner
     * \param theState - required state
     * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
    */
@@ -4380,9 +4380,9 @@ Handle(TColStd_HSequenceOfInteger)
   GEOMImpl_IShapesOperations::GetShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
                                                         const Standard_Integer     theShapeType,
                                                         const Handle(GEOM_Object)& theTopLeftPoint,
-                                                        const Handle(GEOM_Object)& theTopRigthPoint,
+                                                        const Handle(GEOM_Object)& theTopRightPoint,
                                                         const Handle(GEOM_Object)& theBottomLeftPoint,
-                                                        const Handle(GEOM_Object)& theBottomRigthPoint,
+                                                        const Handle(GEOM_Object)& theBottomRightPoint,
                                                         const GEOMAlgo_State       theState)
 {
   // Find indices
@@ -4390,9 +4390,9 @@ Handle(TColStd_HSequenceOfInteger)
     getShapesOnQuadrangleIDs( theShape,
                               theShapeType,
                               theTopLeftPoint,
-                              theTopRigthPoint,
+                              theTopRightPoint,
                               theBottomLeftPoint,
-                              theBottomRigthPoint,
+                              theBottomRightPoint,
                               theState);
   if ( aSeqOfIDs.IsNull() || aSeqOfIDs->IsEmpty() )
     return NULL;
@@ -4401,8 +4401,8 @@ Handle(TColStd_HSequenceOfInteger)
 
   // The GetShapesOnCylinder() doesn't change object so no new function is required.
   Handle(GEOM_BaseObject) lastObj = GEOM::GetCreatedLast(theShape,theTopLeftPoint);
-  lastObj = GEOM::GetCreatedLast(lastObj,theTopRigthPoint);
-  lastObj = GEOM::GetCreatedLast(lastObj,theBottomRigthPoint);
+  lastObj = GEOM::GetCreatedLast(lastObj,theTopRightPoint);
+  lastObj = GEOM::GetCreatedLast(lastObj,theBottomRightPoint);
   lastObj = GEOM::GetCreatedLast(lastObj,theBottomLeftPoint);
   Handle(GEOM_Function) aFunction = lastObj->GetLastFunction();
 
@@ -4413,9 +4413,9 @@ Handle(TColStd_HSequenceOfInteger)
     << theShape << ", "
     << TopAbs_ShapeEnum(theShapeType) << ", "
     << theTopLeftPoint << ", "
-    << theTopRigthPoint << ", "
+    << theTopRightPoint << ", "
     << theBottomLeftPoint << ", "
-    << theBottomRigthPoint << ", "
+    << theBottomRightPoint << ", "
     << theState << ")";
 #endif // DUMP_SUBSHAPE_IDS
 
index b6d11a822dbe3ea325179c051b6bc6c2af36f63a..838583f87ab6746f55f69d2d0fa2a2538c6e6b62 100644 (file)
@@ -275,9 +275,9 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
     * \param theShape - the shape to explore
     * \param theShapeType - type of sub-shape of theShape
     * \param theTopLeftPoint - top left quadrangle corner
-    * \param theTopRigthPoint - top right quadrangle corner
+    * \param theTopRightPoint - top right quadrangle corner
     * \param theBottomLeftPoint - bottom left quadrangle corner
-    * \param theBottomRigthPoint - bottom right quadrangle corner
+    * \param theBottomRightPoint - bottom right quadrangle corner
     * \param theState - required state
     * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
    */
@@ -285,9 +285,9 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
     GetShapesOnQuadrangle (const Handle(GEOM_Object)& theShape,
                            const Standard_Integer     theShapeType,
                            const Handle(GEOM_Object)& theTopLeftPoint,
-                           const Handle(GEOM_Object)& theTopRigthPoint,
+                           const Handle(GEOM_Object)& theTopRightPoint,
                            const Handle(GEOM_Object)& theBottomLeftPoint,
-                           const Handle(GEOM_Object)& theBottomRigthPoint,
+                           const Handle(GEOM_Object)& theBottomRightPoint,
                            const GEOMAlgo_State       theState);
 
   /*!
@@ -295,9 +295,9 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
     * \param theShape - the shape to explore
     * \param theShapeType - type of sub-shape of theShape
     * \param theTopLeftPoint - top left quadrangle corner
-    * \param theTopRigthPoint - top right quadrangle corner
+    * \param theTopRightPoint - top right quadrangle corner
     * \param theBottomLeftPoint - bottom left quadrangle corner
-    * \param theBottomRigthPoint - bottom right quadrangle corner
+    * \param theBottomRightPoint - bottom right quadrangle corner
     * \param theState - required state
     * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
    */
@@ -305,9 +305,9 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
     GetShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
                               const Standard_Integer     theShapeType,
                               const Handle(GEOM_Object)& theTopLeftPoint,
-                              const Handle(GEOM_Object)& theTopRigthPoint,
+                              const Handle(GEOM_Object)& theTopRightPoint,
                               const Handle(GEOM_Object)& theBottomLeftPoint,
-                              const Handle(GEOM_Object)& theBottomRigthPoint,
+                              const Handle(GEOM_Object)& theBottomRightPoint,
                               const GEOMAlgo_State       theState);
 
   Standard_EXPORT Handle(GEOM_Object) GetShapesOnCylinderOld (Handle(GEOM_Object)    theShape,
@@ -572,9 +572,9 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
    * \param theShape - the shape to explore
    * \param theShapeType - type of sub-shape of theShape
    * \param theTopLeftPoint - top left quadrangle corner
-   * \param theTopRigthPoint - top right quadrangle corner
+   * \param theTopRightPoint - top right quadrangle corner
    * \param theBottomLeftPoint - bottom left quadrangle corner
-   * \param theBottomRigthPoint - bottom right quadrangle corner
+   * \param theBottomRightPoint - bottom right quadrangle corner
    * \param theState - required state
    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
    */
@@ -582,9 +582,9 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
     getShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
                               const Standard_Integer     theShapeType,
                               const Handle(GEOM_Object)& theTopLeftPoint,
-                              const Handle(GEOM_Object)& theTopRigthPoint,
+                              const Handle(GEOM_Object)& theTopRightPoint,
                               const Handle(GEOM_Object)& theBottomLeftPoint,
-                              const Handle(GEOM_Object)& theBottomRigthPoint,
+                              const Handle(GEOM_Object)& theBottomRightPoint,
                               const GEOMAlgo_State       theState);
 
   /*!
index d84397a4c72512f8fdd7c2b85dbf4b3c4b29d629..aab459299de06e618e3ebc1d9fc5192d03fe34bc 100644 (file)
@@ -209,17 +209,13 @@ static bool FillForOtherEdges(const TopoDS_Shape& F1,
                               const TopoDS_Shape& V1,
                               TopTools_IndexedDataMapOfShapeShape& FF)
 {
-  //cout<<"FillForOtherEdges"<<endl;
   // find other pairs for vertexes and edges
   // creating map of vertex edges for both faces
   TopTools_IndexedDataMapOfShapeListOfShape aMapVertEdge1;
   TopExp::MapShapesAndAncestors(F1, TopAbs_VERTEX, TopAbs_EDGE, aMapVertEdge1);
-  if (!FF.Contains(F1))
-    MESSAGE("    FillForOtherEdges: map FF not contains key F1");
-  if (!FF.Contains(E1))
-    MESSAGE("    FillForOtherEdges: map FF not contains key E1");
-  if (!FF.Contains(V1))
-    MESSAGE("    FillForOtherEdges: map FF not contains key V1");
+  if (!FF.Contains(F1)) MESSAGE("    FillForOtherEdges: map FF not contains key F1");
+  if (!FF.Contains(E1)) MESSAGE("    FillForOtherEdges: map FF not contains key E1");
+  if (!FF.Contains(V1)) MESSAGE("    FillForOtherEdges: map FF not contains key V1");
   const TopoDS_Shape& F2 = FF.FindFromKey(F1);
   const TopoDS_Shape& E2 = FF.FindFromKey(E1);
   const TopoDS_Shape& V2 = FF.FindFromKey(V1);
@@ -233,26 +229,18 @@ static bool FillForOtherEdges(const TopoDS_Shape& F1,
 
   ShapeAnalysis_Edge sae;
   while(1) {
-    if (!aMapVertEdge1.Contains(VS1))
-      MESSAGE ("    FillForOtherEdges: map aMapVertEdge1 not contains key VS1");
+    if (!aMapVertEdge1.Contains(VS1)) MESSAGE ("    FillForOtherEdges: map aMapVertEdge1 not contains key VS1");
     const TopTools_ListOfShape& aList1 = aMapVertEdge1.FindFromKey(VS1);
-    //TopoDS_Shape E1next;
     TopTools_ListIteratorOfListOfShape anIter1(aList1);
     if (anIter1.Value().IsSame(ES1)) {
       anIter1.Next();
     }
-    //E1next = anIter1.Value();
-    if (!aMapVertEdge2.Contains(VS2))
-      MESSAGE ("    FillForOtherEdges: map aMapVertEdge2 not contains key VS2");
+    if (!aMapVertEdge2.Contains(VS2)) MESSAGE ("    FillForOtherEdges: map aMapVertEdge2 not contains key VS2");
     const TopTools_ListOfShape& aList2 = aMapVertEdge2.FindFromKey(VS2);
-    //TopoDS_Shape E2next;
     TopTools_ListIteratorOfListOfShape anIter2(aList2);
     if (anIter2.Value().IsSame(ES2)) {
       anIter2.Next();
     }
-    //E2next = anIter2.Value();
-    //ES1 = TopoDS::Edge(E1next);
-    //ES2 = TopoDS::Edge(E2next);
     ES1 = TopoDS::Edge(anIter1.Value());
     ES2 = TopoDS::Edge(anIter2.Value());
     if (!FF.Contains(ES1)) {
@@ -287,7 +275,6 @@ static bool FillCorrespondingEdges(const TopoDS_Shape& FS1,
                                    const TopoDS_Wire& aWirePath,
                                    TopTools_IndexedDataMapOfShapeShape& FF)
 {
-  //cout<<"FillCorrespondingEdges"<<endl;
   // find corresponding edges
   TopExp_Explorer expw1(FS1,TopAbs_WIRE);
   TopoDS_Wire aWire1 = TopoDS::Wire(expw1.Current());
@@ -318,8 +305,6 @@ static bool FillCorrespondingEdges(const TopoDS_Shape& FS1,
   TopoDS_Vertex V21 = sae.LastVertex(E1);
   gp_Pnt P11 = BRep_Tool::Pnt(V11);
   gp_Pnt P21 = BRep_Tool::Pnt(V21);
-  //cout<<"P11("<<P11.X()<<","<<P11.Y()<<","<<P11.Z()<<")"<<endl;
-  //cout<<"P21("<<P21.X()<<","<<P21.Y()<<","<<P21.Z()<<")"<<endl;
   // find corresponding vertexes from created shape
   TopoDS_Vertex VN11,VN21;
   for (exp.Init(aShape, TopAbs_VERTEX); exp.More(); exp.Next()) {
@@ -370,8 +355,6 @@ static bool FillCorrespondingEdges(const TopoDS_Shape& FS1,
   TopoDS_Vertex V12,V22;
   gp_Pnt PN12 = BRep_Tool::Pnt(VN12);
   gp_Pnt PN22 = BRep_Tool::Pnt(VN22);
-  //cout<<"PN12("<<PN12.X()<<","<<PN12.Y()<<","<<PN12.Z()<<")"<<endl;
-  //cout<<"PN22("<<PN22.X()<<","<<PN22.Y()<<","<<PN22.Z()<<")"<<endl;
   TopoDS_Edge E2;
   TopExp_Explorer expe;
   for (expe.Init(FS2, TopAbs_EDGE); expe.More(); expe.Next()) {
@@ -414,8 +397,6 @@ static bool FillCorrespondingEdges(const TopoDS_Shape& FS1,
                                    const TopoDS_Vertex& aLoc2,
                                    TopTools_IndexedDataMapOfShapeShape& FF)
 {
-  //cout<<"FillCorrespondingEdges"<<endl;
-
   gp_Pnt P1 = BRep_Tool::Pnt(aLoc1);
   gp_Pnt P2 = BRep_Tool::Pnt(aLoc2);
   gp_Vec aDir(P1,P2);
@@ -435,8 +416,6 @@ static bool FillCorrespondingEdges(const TopoDS_Shape& FS1,
     TopoDS_Vertex V2 = sae.LastVertex(E1);
     gp_Pnt Ptmp1 = BRep_Tool::Pnt(V1);
     gp_Pnt Ptmp2 = BRep_Tool::Pnt(V2);
-    //cout<<"P11("<<P11.X()<<","<<P11.Y()<<","<<P11.Z()<<")"<<endl;
-    //cout<<"P21("<<P21.X()<<","<<P21.Y()<<","<<P21.Z()<<")"<<endl;
     if (P1.Distance(Ptmp1)<tol) {
       V21 = V2;
       break;
@@ -516,7 +495,6 @@ static void FindNextPairOfFaces(const TopoDS_Shape& aCurFace,
                                 TopTools_IndexedDataMapOfShapeShape& FF,
                                 GEOMImpl_IPipe* aCI)
 {
-  //cout<<"FindNextPairOfFaces"<<endl;
   TopExp_Explorer anExp;
   for (anExp.Init(aCurFace, TopAbs_EDGE); anExp.More(); anExp.Next()) {
     TopoDS_Shape E1 = anExp.Current();
@@ -524,8 +502,7 @@ static void FindNextPairOfFaces(const TopoDS_Shape& aCurFace,
       if (aCI) delete aCI;
       Standard_ConstructionError::Raise("FindNextPairOfFaces: Can not find edge in map");
     }
-    if (!FF.Contains(E1))
-      MESSAGE ("    FindNextPairOfFaces: map FF not contains key E1");
+    if (!FF.Contains(E1)) MESSAGE ("    FindNextPairOfFaces: map FF not contains key E1");
     const TopoDS_Shape& E2 = FF.FindFromKey(E1);
     TopExp_Explorer anExpV;
     anExpV.Init(E1, TopAbs_VERTEX);
@@ -535,8 +512,7 @@ static void FindNextPairOfFaces(const TopoDS_Shape& aCurFace,
       Standard_ConstructionError::Raise("FindNextPairOfFaces: Can not find vertex in map");
     }
 
-    if (!aMapEdgeFaces1.Contains(E1))
-      MESSAGE ("    FindNextPairOfFaces: map aMapEdgeFaces1 not contains key E1");
+    if (!aMapEdgeFaces1.Contains(E1)) MESSAGE ("    FindNextPairOfFaces: map aMapEdgeFaces1 not contains key E1");
     const TopTools_ListOfShape& aList1 = aMapEdgeFaces1.FindFromKey(E1);
     if (aList1.Extent()<2)
       continue;
@@ -548,11 +524,9 @@ static void FindNextPairOfFaces(const TopoDS_Shape& aCurFace,
     if (FF.Contains(F1other))
       continue;
 
-    if (!FF.Contains(aCurFace))
-      MESSAGE ("    FindNextPairOfFaces: map FF not contains key aCurFace");
+    if (!FF.Contains(aCurFace)) MESSAGE ("    FindNextPairOfFaces: map FF not contains key aCurFace");
     const TopoDS_Shape& F2 = FF.FindFromKey(aCurFace);
-    if (!aMapEdgeFaces2.Contains(E2))
-      MESSAGE ("    FindNextPairOfFaces: map aMapEdgeFaces2 not contains key E2");
+    if (!aMapEdgeFaces2.Contains(E2)) MESSAGE ("    FindNextPairOfFaces: map aMapEdgeFaces2 not contains key E2");
     const TopTools_ListOfShape& aList2 = aMapEdgeFaces2.FindFromKey(E2);
     if (aList2.Extent()<2) {
       if (aCI) delete aCI;
@@ -584,8 +558,6 @@ static void FindFirstPairFaces(const TopoDS_Shape& S1, const TopoDS_Shape& S2,
                                TopoDS_Vertex& V1, TopoDS_Vertex& V2,
                                TopoDS_Shape& FS1, TopoDS_Shape& FS2)
 {
-  //cout<<"FindFirstPairFaces"<<endl;
-
   // check if vertexes are sub-shapes of sections
   gp_Pnt P1 = BRep_Tool::Pnt(V1);
   gp_Pnt P2 = BRep_Tool::Pnt(V2);
@@ -612,13 +584,6 @@ static void FindFirstPairFaces(const TopoDS_Shape& S1, const TopoDS_Shape& S2,
     }
   }
 
-  //gp_Pnt P1new = BRep_Tool::Pnt(V1new);
-  //gp_Pnt P2new = BRep_Tool::Pnt(V2new);
-  //cout<<"  P1("<<P1.X()<<","<<P1.Y()<<","<<P1.Z()<<")"<<endl;
-  //cout<<"  P2("<<P2.X()<<","<<P2.Y()<<","<<P2.Z()<<")"<<endl;
-  //cout<<"  P1new("<<P1new.X()<<","<<P1new.Y()<<","<<P1new.Z()<<")"<<endl;
-  //cout<<"  P2new("<<P2new.X()<<","<<P2new.Y()<<","<<P2new.Z()<<")"<<endl;
-
   // replace vertexes if it is needed
   if (!V1.IsSame(V1new)) {
     V1 = V1new;
@@ -732,6 +697,93 @@ static TopoDS_Shape RemoveFaces(const TopoDS_Shape &theShapeFrom,
   return aResult;
 }
 
+//=======================================================================
+//function : makeSolid
+//purpose  : auxilary for CreatePipeWithDifferentSections
+//=======================================================================
+Standard_Boolean makeSolid(
+  BRepOffsetAPI_MakePipeShell aBuilder,
+  const TopoDS_Shape& aSh1,
+  const TopoDS_Shape& aSh2,
+  TopoDS_Shape& aShape)
+{
+  Standard_Boolean isDone = Standard_True;
+  Standard_Integer nbPlanar = 0;
+  if (aSh1.ShapeType() == TopAbs_FACE && aSh2.ShapeType() == TopAbs_FACE)
+  {
+    Handle(Geom_Surface) aS = BRep_Tool::Surface(TopoDS::Face(aSh1));
+    if (aS->IsKind(STANDARD_TYPE(Geom_Plane))) {
+      nbPlanar++;
+    }
+    else if (aS->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
+      Handle(Geom_RectangularTrimmedSurface) aTS = Handle(Geom_RectangularTrimmedSurface)::DownCast(aS);
+      if (aTS->BasisSurface()->IsKind(STANDARD_TYPE(Geom_Plane))) {
+        nbPlanar++;
+      }
+    }
+    aS = BRep_Tool::Surface(TopoDS::Face(aSh2));
+    if (aS->IsKind(STANDARD_TYPE(Geom_Plane))) {
+      nbPlanar++;
+    }
+    else if (aS->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
+      Handle(Geom_RectangularTrimmedSurface) aTS = Handle(Geom_RectangularTrimmedSurface)::DownCast(aS);
+      if (aTS->BasisSurface()->IsKind(STANDARD_TYPE(Geom_Plane))) {
+        nbPlanar++;
+      }
+    }
+  }
+  if (nbPlanar < 2) {
+    TopoDS_Shape aPipe = aBuilder.Shape();
+    // make sewing for result
+    Handle(BRepBuilderAPI_Sewing) aSewing = new BRepBuilderAPI_Sewing;
+    Standard_Real aTol = Precision::Confusion();
+    aSewing->SetTolerance(aTol);
+    aSewing->SetFaceMode(Standard_True);
+    aSewing->SetFloatingEdgesMode(Standard_False);
+    aSewing->SetNonManifoldMode(Standard_False);
+    TopExp_Explorer anExp;
+    for (anExp.Init(aPipe, TopAbs_FACE); anExp.More(); anExp.Next()) {
+      aSewing->Add(anExp.Current());
+    }
+    aSewing->Add(aSh1);
+    aSewing->Add(aSh2);
+    aSewing->Perform();
+    aShape = aSewing->SewedShape();
+    if (aShape.ShapeType() == TopAbs_SHELL) {
+      // Build a solid.
+      BRepBuilderAPI_MakeSolid aMkSolid;
+      aMkSolid.Add(TopoDS::Shell(aShape));
+      if (!aMkSolid.IsDone()) {
+        isDone = Standard_False;
+      }
+      else {
+        TopoDS_Solid aSolid = aMkSolid.Solid();
+        BRepClass3d_SolidClassifier aSC(aSolid);
+        aSC.PerformInfinitePoint(Precision::Confusion());
+        if (aSC.State() == TopAbs_IN) {
+          aShape = aSolid.Reversed();
+        }
+        else {
+          aShape = aSolid;
+        }
+      }
+    }
+    else {
+      isDone = Standard_False;
+    }
+  }
+  else {
+    isDone = Standard_False;
+  }
+  if (!isDone) {
+    isDone = aBuilder.MakeSolid();
+    if (isDone) {
+      aShape = aBuilder.Shape();
+    }
+  }
+  return isDone;
+}
+
 //=======================================================================
 //function : CreatePipeWithDifferentSections
 //purpose  :
@@ -845,7 +897,6 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections
     double tol = BRep_Tool::Tolerance(edge);
     TopoDS_Vertex VF = sae.FirstVertex(edge);
     gp_Pnt PF = BRep_Tool::Pnt(VF);
-    //cout<<"PF("<<PF.X()<<","<<PF.Y()<<","<<PF.Z()<<")"<<endl;
     if (PF.Distance(PLocs.First()) > tol) {
       Standard_ConstructionError::Raise
         ("First location shapes is not coincided with first vertex of aWirePath");
@@ -981,7 +1032,6 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections
       P1 = P2;
     }
     int LastLoc = 1;
-    //cout<<"Edges.Length()="<<Edges.Length()<<endl;
     for (i=2; i<=Edges.Length(); i++) {
         TopoDS_Edge edge = TopoDS::Edge(Edges.Value(i));
         double tol = BRep_Tool::Tolerance(edge);
@@ -1269,14 +1319,20 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections
 
         Standard_Boolean isDone = BuildPipeShell(aBuilder);
 
-        if (isDone && NeedCreateSolid) {
-          isDone = aBuilder.MakeSolid();
+        if (isDone) {
+          if (NeedCreateSolid) {
+            TopoDS_Shape aSh1 = aSeqFaces.Value(1);
+            TopoDS_Shape aSh2 = aSeqFaces.Value(aSeqFaces.Length());
+            isDone = makeSolid(aBuilder, aSh1, aSh2, aShape);
+          }
+          else {
+            aShape = aBuilder.Shape();
+          }
         }
 
         if (!isDone) {
           Standard_ConstructionError::Raise("Pipe construction failure");
         }
-        aShape = aBuilder.Shape();
 
         if (isCreateGroups) {
           // Make groups.
@@ -1407,7 +1463,6 @@ static TopoDS_Shape CreatePipeForShellSections(const TopoDS_Wire& aWirePath,
     double tol = BRep_Tool::Tolerance(edge);
     TopoDS_Vertex VF = sae.FirstVertex(edge);
     gp_Pnt PF = BRep_Tool::Pnt(VF);
-    //cout<<"PF("<<PF.X()<<","<<PF.Y()<<","<<PF.Z()<<")"<<endl;
     if (PF.Distance(PLocs.First()) > tol) {
       if (aCI) delete aCI;
       Standard_ConstructionError::Raise
@@ -1966,8 +2021,7 @@ static TopoDS_Shape CreatePipeForShellSections(const TopoDS_Wire& aWirePath,
             aShell = TopoDS::Shell(aSewShape);
             GProp_GProps aSystem;
             BRepGProp::VolumeProperties(aShell, aSystem);
-            if (aSystem.Mass()<0) {
-              //cout<<"aSewShape is reversed"<<endl;
+            if (aSystem.Mass() < 0) {
               aShell.Reverse();
             }
             if (BRep_Tool::IsClosed(aShell)) {
@@ -2038,7 +2092,6 @@ static TopoDS_Shape CreatePipeForShellSections(const TopoDS_Wire& aWirePath,
 //=======================================================================
 static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI)
 {
-  //cout<<"CreatePipeShellsWithoutPath"<<endl;
   int i,j;
   BRep_Builder B;
 
@@ -2102,7 +2155,6 @@ static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI)
     for (anExp.Init(aShBase2, TopAbs_FACE); anExp.More(); anExp.Next()) {
       nbf2++;
     }
-    //cout<<"nbf1="<<nbf1<<" nbf2="<<nbf2<<endl;
     if (nbf1!=nbf2) {
       if (aCI) delete aCI;
       Standard_ConstructionError::Raise("Different number of faces in the sections");
@@ -2163,7 +2215,6 @@ static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI)
     // auxiliary map vertex->edge for created pipe edges
     TopTools_IndexedDataMapOfShapeShape VPE;
     ShapeAnalysis_Edge sae;
-    //cout<<"FF.Extent()="<<FF.Extent()<<endl;
     int nbff = 0;
     for (j=1; j<=FF.Extent(); j++) {
       TopoDS_Shape F1 = FF.FindKey(j);
@@ -2300,26 +2351,13 @@ static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI)
 
         double fp,lp;
         Handle(Geom_Curve) C1 = BRep_Tool::Curve(E1,fp,lp);
-        //bool IsConicC1 = false;
-        //if (C1->IsKind(STANDARD_TYPE(Geom_Conic))) {
-        //  IsConicC1 = true;
-        //  cout<<"C1 - Geom_Conic"<<endl;
-        //}
         if (C1->IsKind(STANDARD_TYPE(Geom_Line)) || C1->IsKind(STANDARD_TYPE(Geom_Conic))) {
           C1 = new Geom_TrimmedCurve(C1,fp,lp);
         }
-        //if (IsConicC1) {
-        //  double tol = BRep_Tool::Tolerance(E1);
-        //  GeomConvert_ApproxCurve ApxC1(C1,tol,GeomAbs_C1,10,5);
-        //  C1 = ApxC1.Curve();
-        //}
         Handle(Geom_Curve) C3 = BRep_Tool::Curve(E3,fp,lp);
         if (C3->IsKind(STANDARD_TYPE(Geom_Line)) || C3->IsKind(STANDARD_TYPE(Geom_Conic))) {
           C3 = new Geom_TrimmedCurve(C3,fp,lp);
         }
-        //filebuf fic;
-        //ostream os(&fic);
-        //os.precision(15);
         Handle(Geom_BSplineCurve) CE1 =
           GeomConvert::CurveToBSplineCurve(C1,Convert_RationalC1);
         if (CE1->Degree()<3)
@@ -2475,8 +2513,7 @@ static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI)
         aShell = TopoDS::Shell(aSewShape);
         GProp_GProps aSystem;
         BRepGProp::VolumeProperties(aShell, aSystem);
-        if (aSystem.Mass()<0) {
-          //cout<<"aSewShape is reversed"<<endl;
+        if (aSystem.Mass() < 0) {
           aShell.Reverse();
         }
         if (BRep_Tool::IsClosed(aShell)) {
index 520fe3ec2a62007f04549c13de435e4caccb42b9..50e8b799a811187bcc480cc638f0343b5fcdff4a 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -44,7 +44,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index 7016ee5640d180b2c81ac53d9408a88dbfae381f..86515758aebb27d7d4549529af310910d128614c 100755 (executable)
@@ -21,7 +21,7 @@
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIR}
   ${LIBXML2_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
@@ -30,19 +30,15 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${LIBXML2_DEFINITIONS}
   )
 
 # libraries to link to
 SET(_link_LIBRARIES
-  ${CAS_TKBRep} ${CAS_TKShHealing} ${CAS_TKMesh} ${CAS_TKGeomAlgo}
-  ${CAS_TKTopAlgo}
-  ${CAS_TKG2d}
-  ${CAS_TKG3d}
-  ${CAS_TKV3d}
-  ${CAS_TKGeomBase}
-  ${CAS_TKBO}
+  ${OpenCASCADE_ModelingData_LIBRARIES} 
+  ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} 
+  ${OpenCASCADE_Visualization_LIBRARIES}
   ${LIBXML2_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   )
index aef81b998425c0adf6d81625e3f532772a39afc6..4e7651403f3cb9e6b61ee31434eed4f5e1429e9e 100755 (executable)
@@ -23,7 +23,7 @@
 INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PROJECT_SOURCE_DIR}/src/GEOMImpl
   ${PROJECT_SOURCE_DIR}/src/GEOM
@@ -37,7 +37,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   )
 
index e7a0b404d6bc296d687bb287c81cc034646a7b66..6aa10a803c95b7da28bd0c9418f5bddae7e78742 100644 (file)
@@ -1432,9 +1432,9 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnQuadrangle
                                                 (GEOM::GEOM_Object_ptr theShape,
                                                  CORBA::Long           theShapeType,
                                                  GEOM::GEOM_Object_ptr theTopLeftPoint,
-                                                 GEOM::GEOM_Object_ptr theTopRigthPoint,
+                                                 GEOM::GEOM_Object_ptr theTopRightPoint,
                                                  GEOM::GEOM_Object_ptr theBottomLeftPoint,
-                                                 GEOM::GEOM_Object_ptr theBottomRigthPoint,
+                                                 GEOM::GEOM_Object_ptr theBottomRightPoint,
                                                  GEOM::shape_state     theState)
 {
   GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
@@ -1445,21 +1445,21 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnQuadrangle
   //Get the reference objects
   Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
   Handle(::GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
-  Handle(::GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
+  Handle(::GEOM_Object) aTopRightPoint = GetObjectImpl(theTopRightPoint);
   Handle(::GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
-  Handle(::GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
+  Handle(::GEOM_Object) aBottomRightPoint = GetObjectImpl(theBottomRightPoint);
 
   if (aShape.IsNull() ||
       aTopLeftPoint.IsNull() ||
-      aTopRigthPoint.IsNull() ||
+      aTopRightPoint.IsNull() ||
       aBottomLeftPoint.IsNull() ||
-      aBottomRigthPoint.IsNull())
+      aBottomRightPoint.IsNull())
     return aSeq._retn();
 
   //Get Shapes On Quadrangle
   Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->GetShapesOnQuadrangle
     (aShape, theShapeType,
-     aTopLeftPoint, aTopRigthPoint, aBottomLeftPoint, aBottomRigthPoint,
+     aTopLeftPoint, aTopRightPoint, aBottomLeftPoint, aBottomRightPoint,
      ShapeState(theState));
   if (!GetOperations()->IsDone() || aHSeq.IsNull())
     return aSeq._retn();
@@ -1669,9 +1669,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnQuadrangleIDs
                                                 (GEOM::GEOM_Object_ptr theShape,
                                                  CORBA::Long           theShapeType,
                                                  GEOM::GEOM_Object_ptr theTopLeftPoint,
-                                                 GEOM::GEOM_Object_ptr theTopRigthPoint,
+                                                 GEOM::GEOM_Object_ptr theTopRightPoint,
                                                  GEOM::GEOM_Object_ptr theBottomLeftPoint,
-                                                 GEOM::GEOM_Object_ptr theBottomRigthPoint,
+                                                 GEOM::GEOM_Object_ptr theBottomRightPoint,
                                                  GEOM::shape_state     theState)
 {
   GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
@@ -1682,21 +1682,21 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnQuadrangleIDs
   //Get the reference objects
   Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
   Handle(::GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
-  Handle(::GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
+  Handle(::GEOM_Object) aTopRightPoint = GetObjectImpl(theTopRightPoint);
   Handle(::GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
-  Handle(::GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
+  Handle(::GEOM_Object) aBottomRightPoint = GetObjectImpl(theBottomRightPoint);
 
   if (aShape.IsNull() ||
       aTopLeftPoint.IsNull() ||
-      aTopRigthPoint.IsNull() ||
+      aTopRightPoint.IsNull() ||
       aBottomLeftPoint.IsNull() ||
-      aBottomRigthPoint.IsNull() )
+      aBottomRightPoint.IsNull() )
     return aSeq._retn();
 
   //Get Shapes On Quadrangle
   Handle(TColStd_HSequenceOfInteger) aHSeq = GetOperations()->GetShapesOnQuadrangleIDs
     (aShape, theShapeType,
-     aTopLeftPoint, aTopRigthPoint, aBottomLeftPoint, aBottomRigthPoint,
+     aTopLeftPoint, aTopRightPoint, aBottomLeftPoint, aBottomRightPoint,
      ShapeState(theState));
   if (!GetOperations()->IsDone() || aHSeq.IsNull())
     return aSeq._retn();
index f6e483daa3d7328ad731d3bc1230d18e51bbc21a..c48e6b7e176f76882d5e9a546c8a3b79645b77a9 100644 (file)
@@ -201,9 +201,9 @@ class GEOM_I_EXPORT GEOM_IShapesOperations_i :
   GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
                                          CORBA::Long           theShapeType,
                                          GEOM::GEOM_Object_ptr theTopLeftPoint,
-                                         GEOM::GEOM_Object_ptr theTopRigthPoint,
+                                         GEOM::GEOM_Object_ptr theTopRightPoint,
                                          GEOM::GEOM_Object_ptr theBottomLeftPoint,
-                                         GEOM::GEOM_Object_ptr theBottomRigthPoint,
+                                         GEOM::GEOM_Object_ptr theBottomRightPoint,
                                          GEOM::shape_state     theState);
 
   GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
@@ -239,9 +239,9 @@ class GEOM_I_EXPORT GEOM_IShapesOperations_i :
   GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
                                               CORBA::Long           theShapeType,
                                               GEOM::GEOM_Object_ptr theTopLeftPoint,
-                                              GEOM::GEOM_Object_ptr theTopRigthPoint,
+                                              GEOM::GEOM_Object_ptr theTopRightPoint,
                                               GEOM::GEOM_Object_ptr theBottomLeftPoint,
-                                              GEOM::GEOM_Object_ptr theBottomRigthPoint,
+                                              GEOM::GEOM_Object_ptr theBottomRightPoint,
                                               GEOM::shape_state     theState);
 
   GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
index f2e8589e1e75beb523aa0e9a4ecbf305e8f9a2e4..a2b02dce617937577068df5bb435fc18b89f8a95 100755 (executable)
@@ -30,7 +30,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   )
 
old mode 100755 (executable)
new mode 100644 (file)
index ef95300..290b212
@@ -75,7 +75,7 @@ Fillet_1 = geompy.MakeFillet(Common_1, 10, geompy.ShapeType["EDGE"], [5])
 geompy.addToStudy(Fillet_1, "Fillet_1")
 
 #Chamfer applying
-Chamfer_1 = geompy.MakeChamferEdge(Fillet_1, 10, 10, 15, 49 )
+Chamfer_1 = geompy.MakeChamferEdge(Fillet_1, 10, 10, 44, 114 )
 geompy.addToStudy(Chamfer_1, "Chamfer_1")
 
 Chamfer_2 = geompy.MakeChamferEdge(Chamfer_1, 10, 10, 20, 30 )
index a0952d792d36065913629a75c104a1d83ea1699e..3ae88b3da24fae51f11a68975698b0fed9e67af9 100644 (file)
@@ -5671,9 +5671,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @param theShape Shape to find sub-shapes of.
         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
-        #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
+        #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
-        #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
+        #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
@@ -5684,8 +5684,8 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @ref swig_GetShapesOnQuadrangle "Example"
         @ManageTransactions("ShapesOp")
         def GetShapesOnQuadrangle(self, theShape, theShapeType,
-                                  theTopLeftPoint, theTopRigthPoint,
-                                  theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
+                                  theTopLeftPoint, theTopRightPoint,
+                                  theBottomLeftPoint, theBottomRightPoint, theState, theName=None):
             """
             Find in theShape all sub-shapes of type theShapeType, situated relatively
             the specified quadrangle by the certain way, defined through theState parameter.
@@ -5694,9 +5694,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 theShape Shape to find sub-shapes of.
                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
                 theTopLeftPoint Point, specifying top left corner of a quadrangle
-                theTopRigthPoint Point, specifying top right corner of a quadrangle
+                theTopRightPoint Point, specifying top right corner of a quadrangle
                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
-                theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
+                theBottomRightPoint Point, specifying bottom right corner of a quadrangle
                 theState The state of the sub-shapes to find (see GEOM::shape_state)
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
@@ -5707,8 +5707,8 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
             """
             # Example: see GEOM_TestOthers.py
             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
-                                                        theTopLeftPoint, theTopRigthPoint,
-                                                        theBottomLeftPoint, theBottomRigthPoint, theState)
+                                                        theTopLeftPoint, theTopRightPoint,
+                                                        theBottomLeftPoint, theBottomRightPoint, theState)
             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
             self._autoPublish(aList, theName, "shapeOnQuadrangle")
             return aList
@@ -5718,9 +5718,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @param theShape Shape to find sub-shapes of.
         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
-        #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
+        #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
-        #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
+        #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
         #
         #  @return List of all found sub-shapes indices.
@@ -5728,8 +5728,8 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
         @ManageTransactions("ShapesOp")
         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
-                                     theTopLeftPoint, theTopRigthPoint,
-                                     theBottomLeftPoint, theBottomRigthPoint, theState):
+                                     theTopLeftPoint, theTopRightPoint,
+                                     theBottomLeftPoint, theBottomRightPoint, theState):
             """
             Find in theShape all sub-shapes of type theShapeType, situated relatively
             the specified quadrangle by the certain way, defined through theState parameter.
@@ -5738,9 +5738,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 theShape Shape to find sub-shapes of.
                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
                 theTopLeftPoint Point, specifying top left corner of a quadrangle
-                theTopRigthPoint Point, specifying top right corner of a quadrangle
+                theTopRightPoint Point, specifying top right corner of a quadrangle
                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
-                theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
+                theBottomRightPoint Point, specifying bottom right corner of a quadrangle
                 theState The state of the sub-shapes to find (see GEOM::shape_state)
 
             Returns:
@@ -5749,8 +5749,8 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
 
             # Example: see GEOM_TestOthers.py
             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
-                                                           theTopLeftPoint, theTopRigthPoint,
-                                                           theBottomLeftPoint, theBottomRigthPoint, theState)
+                                                           theTopLeftPoint, theTopRightPoint,
+                                                           theBottomLeftPoint, theBottomRightPoint, theState)
             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
             return aList
 
index 0ce7aacb6a1023fded34492c57207906cef20ab7..0e76c8e8e3e7efb3b1f59f0a4f1a71d92f262b33 100755 (executable)
@@ -27,7 +27,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -47,7 +47,7 @@ SET_SOURCE_FILES_PROPERTIES(libGEOM_SwigPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index 57511ff0f6f93587a72482335d6ce9bee122a68a..dd19de3ced7b9f3118669440935519e67a8c2312 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -44,7 +44,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index 44daf1f986384fd76e5f731a15bcbf3f1f896d77..91e8eab6180d7b09dc12cfb95a2c464748f2e38c 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -46,7 +46,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index 1951791e24351d16baaf5ba434ee09304d0be8d0..06bbac9f6d04149f41f740981185d2922e7bbc94 100644 (file)
@@ -25,7 +25,7 @@ ENDIF()
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
   ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
@@ -47,7 +47,7 @@ ENDIF()
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   )
   
@@ -63,7 +63,7 @@ ENDIF()
 
 # libraries to link to
 SET(_link_engine_LIBRARIES
-  ${CAS_TKIGES}
+  ${OpenCASCADE_DataExchange_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   ${KERNEL_OpUtil}
   SalomeIDLGEOM
index 8d30a34939e7cc76aa5c9c355f20026a8428ed19..0f6b20fd18f1169e047c53c7b98a2b39a60e876a 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${QT_INCLUDE_DIRS}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -37,7 +37,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
@@ -46,7 +46,7 @@ ADD_DEFINITIONS(
 SET(_link_LIBRARIES
   GEOMObject
   GEOMClient
-  ${CAS_TKBRep}
+  ${OpenCASCADE_ModelingData_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   ${GUI_SalomeApp}
   )
index 7bbd751773ab97841ff5ebc1f8e680d16d860068..bd39b13a6d16dd5cf1b48da30297bcf2b8c8f216 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -46,7 +46,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index 696e5ac1be0c679c660e3f3cc86f1f4ccf1fd659..cdd6a42be7e556918857835818421029e405800c 100644 (file)
@@ -413,10 +413,10 @@ void MeasureGUI_FastCheckIntersectionsDlg::SetEditCurrentArgument()
 // function : OnGaps()
 // purpose  :
 //=================================================================================
-void MeasureGUI_FastCheckIntersectionsDlg::OnGaps(bool cheked)
+void MeasureGUI_FastCheckIntersectionsDlg::OnGaps(bool checked)
 {
   clear();
-  myTolerance->setEnabled(cheked);
+  myTolerance->setEnabled(checked);
 }
 //=================================================================================
 // function : SelectionIntoArgument
index 4674ac750c62db0cae7ed8b549cd6a5e5b52f74e..d81339efe26b3aedf2d48a688a5fd9c5775dce4e 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${VTK_INCLUDE_DIRS}
   ${PTHREAD_INCLUDE_DIR}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -38,7 +38,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
@@ -47,8 +47,8 @@ ADD_DEFINITIONS(
 SET(_link_LIBRARIES
   OCC2VTK
   SalomeIDLGEOM
-  ${CAS_TKBRep}
-  ${CAS_TKOpenGl}
+  ${OpenCASCADE_ModelingData_LIBRARIES}
+  ${OpenCASCADE_Visualization_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   ${GUI_SalomeObject}
   ${GUI_SVTK}
index d2cbff7b460db55c3942396d49547ea2d63129c4..09a544781f76af8f756b6737d6948aac33cd5c20 100644 (file)
@@ -41,6 +41,7 @@
 #include <Graphic3d_AspectLine3d.hxx>
 #include <Graphic3d_AspectMarker3d.hxx>
 #include <Graphic3d_AspectText3d.hxx>
+#include <Prs3d.hxx>
 #include <Prs3d_Arrow.hxx>
 #include <Prs3d_IsoAspect.hxx>
 #include <Prs3d_ShadingAspect.hxx>
@@ -49,6 +50,7 @@
 #include <SelectMgr_IndexedMapOfOwner.hxx>
 #include <SelectMgr_Selection.hxx>
 #include <StdPrs_ShadedShape.hxx>
+#include <StdPrs_ToolTriangulatedShape.hxx>
 #include <StdSelect_BRepOwner.hxx>
 #include <StdSelect_DisplayMode.hxx>
 #include <TColStd_IndexedMapOfInteger.hxx>
@@ -227,6 +229,15 @@ void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresent
   bool isTopLev = isTopLevel() && switchTopLevel();
   switch (aMode) {
     case Wireframe:
+    // Begin 0023271: [CEA 1823] Deflection Coefficient not taken into account in wireframe
+    {
+      StdPrs_ToolTriangulatedShape::ClearOnOwnDeflectionChange (myshape, myDrawer, Standard_True);
+
+      // After this call if type of deflection is relative
+      // computed deflection coefficient is stored as absolute.
+      Prs3d::GetDeflection (myshape, myDrawer);
+    }
+    // End 0023271
     case CustomHighlight:
     {
       if(isTopLev) {
index 677b78e0e64a927967567a6fc1593a1e8aba35e7..2bcd3c52803a5d7739a206ae6792fb63bd73d956 100755 (executable)
@@ -21,7 +21,7 @@
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${VTK_INCLUDE_DIRS}
   ${CMAKE_CURRENT_SOURCE_DIR}
@@ -30,15 +30,14 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   )
 
 # libraries to link to
 SET(_link_LIBRARIES
   vtkFiltersCore
-  ${CAS_KERNEL} 
-  ${CAS_TKMesh} ${CAS_TKTopAlgo}
-  ${CAS_MODELER}
+  ${OpenCASCADE_FoundationClasses_LIBRARIES}
+  ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   GEOMUtils
   )
index 96ea57ecfb8b946bb3bc5b1fc2d797d0b9eed999..94cfc4c2d72831bf529a0d284f0a3ef31b763656 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -45,7 +45,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index feaa3fddcfed43ad59449001f1625efd3d59d06b..81769bfdbd9e3758d36a0fac511bbde492fd5034 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -43,7 +43,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index adb30f5981536614ae514017160e891fdaa5c4e9..be378a8e6ec963d86f15c6f56765c4ea3c9d2d0a 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -46,7 +46,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index d3330454038b297118fd6f8b42a6fb66f2213d7f..edf52fef3f982f95b8a4d899445ba775a5ef2870 100755 (executable)
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PTHREAD_INCLUDE_DIR}
   )
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   )
 
 # libraries to link to
 SET(_link_LIBRARIES
-  ${CAS_KERNEL} 
-  ${CAS_TKGeomAlgo} ${CAS_TKTopAlgo}
-  ${CAS_TKBRep}
-  ${CAS_TKG2d}
+  ${OpenCASCADE_FoundationClasses_LIBRARIES}
+  ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
+  ${OpenCASCADE_ModelingData_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   )
 
index 43c32c141fb2a3f3d2009c8f13c7c9b850d49554..f10b4550d936bd557d1aad4307e80d0f9c68e9b4 100644 (file)
@@ -25,7 +25,7 @@ ENDIF()
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
   ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
@@ -47,7 +47,7 @@ ENDIF()
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   )
     
@@ -63,8 +63,7 @@ ENDIF()
 
 # libraries to link to
 SET(_link_engine_LIBRARIES
-  ${CAS_TKSTEP}
-  ${CAS_TKSTEPBase}
+  ${OpenCASCADE_DataExchange_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   ${KERNEL_OpUtil}
   SalomeIDLGEOM
index 6e95a8a942212ffb60eadb1c3638b41756e8ad1a..5dff8b54211bb46083d89a2d99dd73b70d69c019 100644 (file)
@@ -25,7 +25,7 @@ ENDIF()
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
   ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
@@ -47,7 +47,7 @@ ENDIF()
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   )
   
@@ -63,7 +63,7 @@ ENDIF()
 
 # libraries to link to
 SET(_link_engine_LIBRARIES
-  ${CAS_TKSTL}
+  ${OpenCASCADE_DataExchange_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   ${KERNEL_OpUtil}
   SalomeIDLGEOM
index 45a4f55c8a35730067ab4b5121e87f7d70fedbfa..123c8b9ce26a1ddb9bbfd32a1336d7ebfb2daddd 100755 (executable)
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${CMAKE_CURRENT_SOURCE_DIR}
   )
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   )
 
 # libraries to link to
 SET(_link_LIBRARIES
-  ${CAS_TKCAF} ${CAS_TKShHealing} ${CAS_TKBool}
+  ${OpenCASCADE_ApplicationFramework_LIBRARIES} ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   )
 
index 78372f5ac9379dc7d0a5d3d028e8fca96849aed0..dc550f509aaf8484499957a4e8b1bcb715a8b677 100755 (executable)
@@ -22,7 +22,6 @@
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  #${CAS_INCLUDE_DIRS}
   ${KERNEL_INCLUDE_DIRS}
   ${OPENCV_INCLUDE_DIR}
   ${QT_INCLUDES}
@@ -31,7 +30,6 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  #${CAS_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
 IF(NOT SALOME_GUI_BUILD_WITH_QT5)
index 1bd0a28be3f6f01ae27187070eccbc49767c9b40..e7b5d7b07516b266d29dccc1ab379601d243c8f9 100644 (file)
 // Author : Renaud NEDELEC, Open CASCADE S.A.S.
 
 // OpenCV includes
-#include <cv.h>
-#include <highgui.h>
-#include <opencv2/imgproc/imgproc.hpp>
-#include <opencv2/highgui/highgui.hpp>
+// RNV: Workaround: HAVE_TBB definition from OCCT conflicts with OPENCV, undef it.
+//      This workaround will be removed after correction of the
+//      https://tracker.dev.opencascade.org/view.php?id=28457 issue.
+#ifdef HAVE_TBB
+ #undef HAVE_TBB
+ #include <cv.h>
+ #include <highgui.h>
+ #include <opencv2/imgproc/imgproc.hpp>
+ #include <opencv2/highgui/highgui.hpp>
+ #define HAVE_TBB
+#else
+ #include <cv.h>
+ #include <highgui.h>
+ #include <opencv2/imgproc/imgproc.hpp>
+ #include <opencv2/highgui/highgui.hpp>
+#endif
 
 // Qt
 #include <QRect>
index 4a87ff97310a34b2d8bc22523a3eed633184d9bb..ae6b4ee87b2c109ffca7238e09174a17631ea9ae 100755 (executable)
@@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -44,7 +44,7 @@ INCLUDE_DIRECTORIES(
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   ${QT_DEFINITIONS}
   )
index d79e0e962b800336cc03ad740d99588d5fe3eddf..bde2a4380d2525ed9d8b26ff271b1e107f571385 100644 (file)
@@ -25,7 +25,7 @@ ENDIF()
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${VTK_INCLUDE_DIRS}
   ${KERNEL_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
@@ -49,7 +49,7 @@ ENDIF()
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   )
    
@@ -65,7 +65,6 @@ ENDIF()
 
 # libraries to link to
 SET(_link_engine_LIBRARIES
-  ${CAS_TKVTK}
   ${KERNEL_SALOMELocalTrace}
   ${KERNEL_OpUtil}
   SalomeIDLGEOM
index b746ea647aff06ac33ca0c5151e30821b8bc8383..63dcdaf5f6ea80274ab8044b85bbe5abab337cfd 100644 (file)
@@ -27,20 +27,21 @@ ENDIF(SALOME_BUILD_TESTS)
 INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${LIBXML2_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   )
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
   ${LIBXML2_DEFINITIONS} 
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   )
 
 # libraries to link to
 SET(_link_LIBRARIES
   ${PTHREAD_LIBRARIES}
   ${LIBXML2_LIBRARIES}
-  ${CAS_TKBRep} ${CAS_TKTopAlgo} ${CAS_TKG2d}
+  ${OpenCASCADE_ModelingData_LIBRARIES}
+  ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
   )
 
 # --- headers ---
index 7bad36ceaea0863c17f43636aaaf6e354f7c7133..c051b82f108bd0ade6532731f82955f1acb292c0 100644 (file)
@@ -22,13 +22,13 @@ ADD_SUBDIRECTORY(data)
 # additional include directories
 INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${CPPUNIT_INCLUDE_DIRS}
   )
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${CPPUNIT_DEFINITIONS}
   )
 
index a66566ad92589909fe48270de705915638e71fbd..503b8324ad5c2bcba02f8bb85d9483c4bf0d06aa 100644 (file)
@@ -25,7 +25,7 @@ ENDIF()
 
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${PROJECT_BINARY_DIR}/idl
   ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
@@ -49,7 +49,7 @@ ENDIF()
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   ${OMNIORB_DEFINITIONS}
   )
   
@@ -65,7 +65,6 @@ ENDIF()
 
 # libraries to link to
 SET(_link_engine_LIBRARIES
-  ${CAS_TKXAO}
   ${KERNEL_SALOMELocalTrace}
   ${KERNEL_OpUtil}
   SalomeIDLGEOM
index 1d5e10a046b1db5088274e0d39b5c4776a8099c6..8d771be5cabf0f0da69c986f0ea6e3b84a33d99d 100644 (file)
@@ -25,14 +25,14 @@ INCLUDE(${SWIG_USE_FILE})
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
   ${PTHREAD_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
+  ${OpenCASCADE_INCLUDE_DIR}
   ${PROJECT_SOURCE_DIR}/src/XAO
 )
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
   ${PYTHON_DEFINITIONS}
-  ${CAS_DEFINITIONS}
+  ${OpenCASCADE_DEFINITIONS}
   )
 
 # libraries to link to