# Mandatory products:
-FIND_PACKAGE(SalomePythonInterp REQUIRED)
-FIND_PACKAGE(SalomePythonLibs REQUIRED)
+FIND_PACKAGE(SalomePython REQUIRED)
+#FIND_PACKAGE(SalomePythonInterp REQUIRED)
+#FIND_PACKAGE(SalomePythonLibs REQUIRED)
FIND_PACKAGE(SalomeCAS REQUIRED)
FIND_PACKAGE(SalomeVTK REQUIRED)
FIND_PACKAGE(SalomeOmniORB REQUIRED)
double l2 = 1 -l0 -l1;
//DEBTRACE("l0, l1, l2: " << l0 << " " << l1 << " " << l2);
- if ((l0>=0) and (l0<=1) and (l1>=0) and (l1<=1) and (l2>=0) and (l2<=1))
+ if ((l0>=0) && (l0<=1) && (l1>=0) && (l1<=1) && (l2>=0) && (l2<=1))
{
z = l0*v[0][2] + l1*v[1][2] + l2*v[2][2];
return true;
double d1= ProjectPointToCurve(aEndPs[1].XYZ(), adaptorOldCurve,p[1]);
double d2= ProjectPointToCurve(midPnt.XYZ(), adaptorOldCurve, p[2]);
DEBTRACE("d0: "<<d0<<" d1: "<<d1<<" d2: "<<d2<<" p0: "<<p[0]<<" p1: "<<p[1]<<" p2: "<<p[2]);
- if ((d0 < 1.e-3) and (d1 < 1.e-3) and (d2 < 1.e-3)) // we got the good old curve (and the good section)
+ if ((d0 < 1.e-3) && (d1 < 1.e-3) && (d2 < 1.e-3)) // we got the good old curve (and the good section)
{
double pmin = p[0];
double pmax = p[1];
}
else // old section closed: check if we use first or last points...
{
- if((pmin < pmax) and((abs(pmin - pfirst)> 1.e-3) and (abs(pmax - plast) >1.e-3))) // internal points forward
+ if((pmin < pmax) && ((abs(pmin - pfirst)> 1.e-3) && (abs(pmax - plast) >1.e-3))) // internal points forward
forward = true;
- else if ((pmin > pmax) and((abs(pmin - plast)> 1.e-3) and (abs(pmax - pfirst) >1.e-3))) // internal points reverse
+ else if ((pmin > pmax) && ((abs(pmin - plast)> 1.e-3) && (abs(pmax - pfirst) >1.e-3))) // internal points reverse
{
pmin = p[1];
pmax = p[0];
forward = false;
}
- else if ((abs(pmin - plast) <1.e-3) and (p[2] < pmax)) // forward, replace pmin par pfirst
+ else if ((abs(pmin - plast) <1.e-3) && (p[2] < pmax)) // forward, replace pmin par pfirst
pmin = pfirst;
- else if ((abs(pmin - plast) <1.e-3) and (p[2] > pmax)) // reverse
+ else if ((abs(pmin - plast) <1.e-3) && (p[2] > pmax)) // reverse
{
pmin = p[1];
pmax = p[0];
forward = false;
}
- else if ((abs(pmax - pfirst) <1.e-3) and (p[2] < pmin)) // reverse
+ else if ((abs(pmax - pfirst) <1.e-3) && (p[2] < pmin)) // reverse
{
pmin = p[1];
pmax = p[0];
forward = false;
}
- else if ((abs(pmax - pfirst) <1.e-3) and (p[2] > pmin)) // forward, replace pmax par plast
+ else if ((abs(pmax - pfirst) <1.e-3) && (p[2] > pmin)) // forward, replace pmax par plast
pmax = plast;
}
DEBTRACE("forward: "<< forward << " pmin " << pmin << " pmax " << pmax);
gp_XYZ p(aPoint.X(), aPoint.Y(), 0);
double param =-1;
double d = ProjectPointToCurve(p, adaptorOldCurve, param);
- if ((param > pmin) and (param < pmax))
+ if ((param > pmin) && (param < pmax))
{
DEBTRACE("param: " << param);
aPointsList.Append(aPoint);
gp_XYZ p(aPoint.X(), aPoint.Y(), 0);
double param =-1;
double d = ProjectPointToCurve(p, adaptorOldCurve, param);
- if ((param > pmin) and (param < pmax))
+ if ((param > pmin) && (param < pmax))
{
DEBTRACE("param: " << param);
aPointsList.Append(aPoint);
bool isEmpty() const { return myChildren == 0; }
inline double getPrecision() {return myPrecision; }
- inline double setPrecision(double precision) {myPrecision = precision; }
+ inline void setPrecision(double precision) {myPrecision = precision; }
protected:
double z1 = x1*ya -xa*y1; // v1^va: z component
double z2 = x2*yb -xb*y2; // v2^vb: z component
bool isBetween = true;
- if (((z1<0) and (z2<0)) or ((z1>=0) and (z2>=0)))
+ if (((z1<0) && (z2<0)) || ((z1>=0) && (z2>=0)))
{
isBetween = false;
}
double dl1 = (aLastPnt1.X()-xg)*(aLastPnt1.X()-xg) + (aLastPnt1.Y()-yg)*(aLastPnt1.Y()-yg);
double df2 = (aFirstPnt2.X()-xg)*(aFirstPnt2.X()-xg) + (aFirstPnt2.Y()-yg)*(aFirstPnt2.Y()-yg);
double dl2 = (aLastPnt2.X()-xg)*(aLastPnt2.X()-xg) + (aLastPnt2.Y()-yg)*(aLastPnt2.Y()-yg);
- double r2 = fmax(df1,dl1);
- r2 = fmax(r2,df2);
- r2 = fmax(r2,dl2);
+ double r2 = std::max(df1,dl1);
+ r2 = std::max(r2,df2);
+ r2 = std::max(r2,dl2);
double d2 = (thePoint.X()-xg)*(thePoint.X()-xg) + (thePoint.Y()-yg)*(thePoint.Y()-yg);
if (d2 > r2)
isBetween = false;
include(../../CMake/Common.cmake)
-include(UsePyQt4)
+include(../../CMake/UsePyQt4EXT.cmake)
+#include(UsePyQt4)
# --- options ---
# sip files / to be processed by sip
SET(_sip_files
HYDROData.sip
- HYDROData_AltitudeObject.sip
- HYDROData_Application.sip
- HYDROData_ArtificialObject.sip
- HYDROData_Bathymetry.sip
- HYDROData_CalculationCase.sip
- HYDROData_Channel.sip
- HYDROData_Confluence.sip
- HYDROData_Digue.sip
- HYDROData_Document.sip
- HYDROData_Entity.sip
- HYDROData_IAltitudeObject.sip
- HYDROData_IInterpolator.sip
- HYDROData_Image.sip
- HYDROData_ImmersibleZone.sip
- HYDROData_IPolyline.sip
- HYDROData_IProfilesInterpolator.sip
- HYDROData_LandCoverMap.sip
- HYDROData_NaturalObject.sip
- HYDROData_Object.sip
- HYDROData_ObstacleAltitude.sip
- HYDROData_Obstacle.sip
- HYDROData_Polyline3D.sip
- HYDROData_PolylineXY.sip
- HYDROData_Profile.sip
- HYDROData_ProfileUZ.sip
- HYDROData_Region.sip
- HYDROData_River.sip
- HYDROData_SequenceOfObjects.sip
- HYDROData_ShapesGroup.sip
- HYDROData_SplitShapesGroup.sip
- HYDROData_StreamAltitude.sip
- HYDROData_Stream.sip
- HYDROData_StricklerTable.sip
- HYDROData_Zone.sip
- CAS/gp_XY.sip
- CAS/gp_XYZ.sip
- CAS/NCollection_Sequence.sip
- CAS/TCollection_AsciiString.sip
)
SET(_add_SOURCES
- sipHYDROPyNCollection_Sequence0100HYDROData_IPolylineSectionType.cc
- sipHYDROPyNCollection_Sequence0100Handle_HYDROData_Entity.cc
- sipHYDROPyNCollection_Sequence0100TCollection_AsciiString.cc
- sipHYDROPyNCollection_Sequence0100gp_XY.cc
- sipHYDROPyNCollection_Sequence0100gp_XYZ.cc
- sipHYDROPyNCollection_Sequence1800.cc
- sipHYDROPyNCollection_Sequence2400.cc
- sipHYDROPyNCollection_Sequence2600.cc
- sipHYDROPyTCollection_AsciiString.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPycmodule.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPygp_XY.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPygp_XYZ.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_AltitudeObject.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Application.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_ArtificialObject.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Bathymetry.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_CalculationCase.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Channel.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Confluence.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Digue.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Document.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Entity.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_IAltitudeObject.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_IInterpolator.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Image.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_ImmersibleZone.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_IPolyline.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_IProfilesInterpolator.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_LandCoverMap.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_NaturalObject.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Object.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Obstacle.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_ObstacleAltitude.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Polyline3D.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_PolylineXY.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Profile.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_ProfileUZ.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Region.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_River.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_ShapesGroup.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_SplitShapesGroup.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Stream.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_StreamAltitude.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_StricklerTable.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Zone.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100gp_XY.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100gp_XYZ.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100Handle_HYDROData_Entity.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100HYDROData_IPolylineSectionType.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100TCollection_AsciiString.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence1800.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence2400.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence2600.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyTCollection_AsciiString.cc
)
# --- sources ---
# sources / sip wrappings
-PYQT4_WRAP_SIP(_sip_SOURCES ${_sip_files} SOURCES ${_add_SOURCES})
+PYQT4_WRAP_SIP_EXT( _sip_SOURCES ${_sip_files} ) # SOURCES ${_add_SOURCES})
# sources / to compile
-SET(HYDROPy_SOURCES ${_sip_SOURCES})
+SET(HYDROPy_SOURCES ${_sip_SOURCES} ${_add_SOURCES})
# --- rules ---
)
add_definitions(
- -DLIGHT_MODE -DHYDRODATA_STATIC -DHYDROGUI_STATIC
+ -DLIGHT_MODE -DHYDRODATA_STATIC -DHYDROGUI_STATIC -D__WIN32__ -D__x86__ -D_WIN64 -D_WIN32_WINNT=0x0400 -D__NT__ -D__OSVERSION__=4
)
IF( ${WIN32} )
add_definitions( -DWNT )
ENDIF()
-SET( CPPUNIT_INCLUDES $ENV{cppUNIT_ROOT}/include )
+SET( CPPUNIT_INCLUDES $ENV{CPPUNIT_ROOT_DIR}/include )
SET( CAS_INCLUDES $ENV{CASROOT}/inc )
-SET( QT_INCLUDES $ENV{QTDIR}/include $ENV{QTDIR}/include/QtCore $ENV{QTDIR}/include/QtGui $ENV{QTDIR}/include/QtTest )
+SET( QT_INCLUDES $ENV{QT_ROOT_DIR}/include $ENV{QT_ROOT_DIR}/include/QtCore $ENV{QT_ROOT_DIR}/include/QtGui $ENV{QT_ROOT_DIR}/include/QtTest )
SET( KERNEL_INCLUDES $ENV{KERNEL_ROOT_DIR}/include/salome )
SET( GUI_INCLUDES $ENV{GUI_ROOT_DIR}/include/salome )
SET( GEOM_INCLUDES $ENV{GEOM_ROOT_DIR}/include/salome )
ENDIF()
SET( CAS_LIBRARIES TKernel TKLCAF TKCAF TKCDF TKMath TKG2d TKG3d TKBRep TKGeomBase TKTopAlgo TKGeomAlgo TKBool TKShHealing TKXSBase TKOffset TKHLR TKBO TKV3d TKService TKMesh )
-link_directories( $ENV{QTDIR}/lib )
+link_directories( $ENV{QT_ROOT_DIR}/lib )
IF( ${WIN32} )
SET( QT_LIBRARIES QtCored4 QtGuid4 QtTestd4 )
ELSE()
SET( QT_LIBRARIES QtCore QtGui QtTest )
ENDIF()
-link_directories( $ENV{cppUNIT_ROOT}/lib )
+link_directories( $ENV{CPPUNIT_ROOT_DIR}/lib )
IF( ${WIN32} )
SET( CPPUNIT_LIBRARIES cppunitd )
ELSE()
add_executable( HYDROData_tests ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${EXTERNAL_FILES} ${PROJECT_MOC_HEADERS} )
target_link_libraries( HYDROData_tests ${GUI_LIBRARIES} ${GEOM_LIBRARIES} ${CAS_LIBRARIES} ${QT_LIBRARIES} ${CPPUNIT_LIBRARIES} shapelib HYDROData)
-IF( ${WIN32} )
- add_custom_command( TARGET HYDROData_tests POST_BUILD COMMAND $(TargetPath) COMMENT "Running tests" )
-ENDIF()
+#IF( ${WIN32} )
+# add_custom_command( TARGET HYDROData_tests POST_BUILD COMMAND $(TargetPath) COMMENT "Running tests" )
+#ENDIF()
INSTALL(TARGETS HYDROData_tests EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})