Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
copyrights are updated
[modules/hydro.git]
/
src
/
HYDROData
/
HYDROData_IProfilesInterpolator.h
diff --git
a/src/HYDROData/HYDROData_IProfilesInterpolator.h
b/src/HYDROData/HYDROData_IProfilesInterpolator.h
index c1a0949d2adafa47ba5f2b90cb4c8c8af8836a8f..1bbc4754a18f5c992d172171680c6d92f2407e31 100644
(file)
--- a/
src/HYDROData/HYDROData_IProfilesInterpolator.h
+++ b/
src/HYDROData/HYDROData_IProfilesInterpolator.h
@@
-1,8
+1,4
@@
-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
+// Copyright (C) 2014-2015 EDF-R&D
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
@@
-25,10
+21,15
@@
#include "HYDROData.h"
#include "HYDROData.h"
+#include <TCollection_AsciiString.hxx>
+#include <NCollection_Sequence.hxx>
+
#include <string>
#include <vector>
#include <map>
#include <string>
#include <vector>
#include <map>
+class gp_XYZ;
+
/**
* Errors that could appear on interpolation calculations.
/**
* Errors that could appear on interpolation calculations.
@@
-63,7
+64,7
@@
public:
* Get description of the interpolation algorithm.
* \return the description string
*/
* Get description of the interpolation algorithm.
* \return the description string
*/
- HYDRODATA_EXPORT virtual
std::s
tring GetDescription() const = 0;
+ HYDRODATA_EXPORT virtual
TCollection_AsciiS
tring GetDescription() const = 0;
/**
* Set profiles as vectors of point coordinates [x1, y1, z1, x2, y2, z2, ...].
/**
* Set profiles as vectors of point coordinates [x1, y1, z1, x2, y2, z2, ...].
@@
-72,6
+73,14
@@
public:
*/
HYDRODATA_EXPORT virtual void SetProfiles( const std::vector<double> theProfile1, const std::vector<double> theProfile2 );
*/
HYDRODATA_EXPORT virtual void SetProfiles( const std::vector<double> theProfile1, const std::vector<double> theProfile2 );
+ /**
+ * Set profiles as sequences of gp_XYZ points.
+ * \param theProfile1 the first profile points
+ * \param theProfile1 the second profile points
+ */
+ HYDRODATA_EXPORT virtual void SetProfiles( const NCollection_Sequence<gp_XYZ>& theProfile1,
+ const NCollection_Sequence<gp_XYZ>& theProfile2 );
+
/**
* Set number of profiles to compute.
* \param theNumber the number of profiles to be computed
/**
* Set number of profiles to compute.
* \param theNumber the number of profiles to be computed
@@
-83,7
+92,8
@@
public:
* \param the parameter name
* \param the parameter value
*/
* \param the parameter name
* \param the parameter value
*/
- HYDRODATA_EXPORT virtual void SetParameter( const std::string& theName, const std::string& theValue );
+ HYDRODATA_EXPORT virtual void SetParameter( const TCollection_AsciiString& theName,
+ const TCollection_AsciiString& theValue );
/**
* Get the last error code.
/**
* Get the last error code.
@@
-95,7
+105,7
@@
public:
* Get string description of the last error.
* \return the string description
*/
* Get string description of the last error.
* \return the string description
*/
- HYDRODATA_EXPORT virtual
std::s
tring GetErrorMessage() const;
+ HYDRODATA_EXPORT virtual
TCollection_AsciiS
tring GetErrorMessage() const;
/**
* Reset interpolator state: both input and output data are reset.
/**
* Reset interpolator state: both input and output data are reset.
@@
-110,16
+120,23
@@
public:
/**
* Get number of calculated profiles ( could be less than the number of profiles to be computed set as a parameter ).
/**
* Get number of calculated profiles ( could be less than the number of profiles to be computed set as a parameter ).
- *
@
return the number of really calculated profiles
+ *
\
return the number of really calculated profiles
*/
HYDRODATA_EXPORT virtual int GetCalculatedProfilesNumber() const;
/**
*/
HYDRODATA_EXPORT virtual int GetCalculatedProfilesNumber() const;
/**
- * Get result profile by index.
+ * Get result profile by index
as a vector of point coordinates [x1, y1, z1, x2, y2, z2, ...]
.
* \param theProfileIndex the profile index [0, <number of profiles to compute>]
* \return the profile with the given index or empty vector if the index is out of range
*/
* \param theProfileIndex the profile index [0, <number of profiles to compute>]
* \return the profile with the given index or empty vector if the index is out of range
*/
- HYDRODATA_EXPORT std::vector<double> GetResultProfile( const int theProfileIndex ) const;
+ HYDRODATA_EXPORT std::vector<double> GetResultProfileCoords( const int theProfileIndex ) const;
+
+ /**
+ * Get result profile by index as a sequence of gp_XYZ points.
+ * \param theProfileIndex the profile index [0, <number of profiles to compute>]
+ * \return the profile with the given index or empty sequence if the index is out of range
+ */
+ HYDRODATA_EXPORT NCollection_Sequence<gp_XYZ> GetResultProfilePoints( const int theProfileIndex ) const;
protected:
/**
protected:
/**
@@
-135,16
+152,28
@@
protected:
HYDRODATA_EXPORT virtual void SetErrorMessage( const std::string& theMessage );
/**
HYDRODATA_EXPORT virtual void SetErrorMessage( const std::string& theMessage );
/**
- * Get the first profile.
+ * Get the first profile
coordinates
.
* \return the first profile points
*/
* \return the first profile points
*/
- HYDRODATA_EXPORT std::vector<double> GetFirstProfile() const;
+ HYDRODATA_EXPORT std::vector<double> GetFirstProfile
Coords
() const;
/**
/**
- * Get the second profile.
+ * Get the second profile
coordinates
.
* \return the second profile points
*/
* \return the second profile points
*/
- HYDRODATA_EXPORT std::vector<double> GetSecondProfile() const;
+ HYDRODATA_EXPORT std::vector<double> GetSecondProfileCoords() const;
+
+ /**
+ * Get the first profile points.
+ * \return the first profile points
+ */
+ HYDRODATA_EXPORT NCollection_Sequence<gp_XYZ> GetFirstProfilePoints() const;
+
+ /**
+ * Get the second profile points.
+ * \return the second profile points
+ */
+ HYDRODATA_EXPORT NCollection_Sequence<gp_XYZ> GetSecondProfilePoints() const;
/**
* Get number of profiles to compute.
/**
* Get number of profiles to compute.
@@
-158,11
+187,20
@@
protected:
HYDRODATA_EXPORT void ClearResults();
/**
HYDRODATA_EXPORT void ClearResults();
/**
- * Insert the calculated profile to the resuls.
- * \param theProfile the
profile to insert
+ * Insert the calculated profile to the resuls
as a list of coordinates
.
+ * \param theProfile the
list of coordinates [x1, y1, z1, x2, y2, z2, ...]
*/
HYDRODATA_EXPORT void InsertResultProfile( const std::vector<double>& theProfile );
*/
HYDRODATA_EXPORT void InsertResultProfile( const std::vector<double>& theProfile );
+ /**
+ * Insert the calculated profile to the resuls as a list of points.
+ * \param theProfile the list of points gp_XYZ
+ */
+ HYDRODATA_EXPORT void InsertResultProfile( const NCollection_Sequence<gp_XYZ>& theProfile );
+
+private:
+ NCollection_Sequence<gp_XYZ> GetPoints( const std::vector<double>& theCoords ) const;
+
private:
std::vector<double> myProfile1, myProfile2; ///< the two input profiles
int myResultProfilesNumber; ///< the number of profiles to compute
private:
std::vector<double> myProfile1, myProfile2; ///< the two input profiles
int myResultProfilesNumber; ///< the number of profiles to compute
@@
-171,7
+209,7
@@
private:
InterpolationError myErrorCode; ///< the last error code
std::string myErrorMessage; ///< the last error message
InterpolationError myErrorCode; ///< the last error code
std::string myErrorMessage; ///< the last error message
- std::vector<
std::vector<double>
> myResultProfiles; ///< the list of result profiles
+ std::vector<
std::vector<double>
> myResultProfiles; ///< the list of result profiles
};
#endif
};
#endif