-// Copyright (C) 2009-2012 OPEN CASCADE
+// Copyright (C) 2009-2021 OPEN CASCADE
//
// 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
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#define __AXIS(i) (&_axes[(i)*_dim])
#define __MIN(i) _minmax[i*2]
#define __MAX(i) _minmax[i*2+1]
-#define __MYID (long(this)%10000)
#define __DMP(msg) \
// cout << msg << endl
bool JacobiEigenvectorsSearch( const int _dim, vector<double>& tensor, vector<double>& _axes)
{
if ( _dim == 3 )
- __DMP( "Tensor : {"
- << "{ "<<__TENSOR(0,0) << ", "<<__TENSOR(0,1) << ", "<<__TENSOR(0,2) << "} "
- << "{ "<<__TENSOR(1,0) << ", "<<__TENSOR(1,1) << ", "<<__TENSOR(1,2) << "} "
- << "{ "<<__TENSOR(2,0) << ", "<<__TENSOR(2,1) << ", "<<__TENSOR(2,2) << "}} ");
+ {
+ __DMP( "Tensor : {"
+ << "{ "<<__TENSOR(0,0) << ", "<<__TENSOR(0,1) << ", "<<__TENSOR(0,2) << "} "
+ << "{ "<<__TENSOR(1,0) << ", "<<__TENSOR(1,1) << ", "<<__TENSOR(1,2) << "} "
+ << "{ "<<__TENSOR(2,0) << ", "<<__TENSOR(2,1) << ", "<<__TENSOR(2,2) << "}} ");
+ }
else
- __DMP( "Tensor : {"
- << "{ "<<__TENSOR(0,0) << ", "<<__TENSOR(0,1) << "} "
- << "{ "<<__TENSOR(1,0) << ", "<<__TENSOR(1,1) << "}} ");
+ {
+ __DMP( "Tensor : {"
+ << "{ "<<__TENSOR(0,0) << ", "<<__TENSOR(0,1) << "} "
+ << "{ "<<__TENSOR(1,0) << ", "<<__TENSOR(1,1) << "}} ");
+ }
const int maxRot = 5*_dim*_dim; // limit on number of rotations
const double tol = 1e-9;
//================================================================================
/*!
- * \brief Creates empty box intended to further initalization via setData()
+ * \brief Creates empty box intended to further initialization via setData()
*/
//================================================================================
getCorners( corners, &cornerBox->_minmax[0] );
double globCorner[3];
- for ( int iC = 0, nC = corners.size()/_dim; iC < nC; ++iC)
+ for ( std::size_t iC = 0, nC = corners.size()/_dim; iC < nC; ++iC)
{
cornerBox->fromLocalCS( &corners[iC*_dim], globCorner );
mmBox.addPointToBox( globCorner );
getCorners( cornersOther, box );
DirectedBoundingBox mmBox((double*)0,0,_dim); //!< empty box with CS == this->_axes
mmBox._axes = this->_axes;
- for ( int iC = 0, nC = cornersOther.size()/_dim; iC < nC; ++iC)
+ for ( std::size_t iC = 0, nC = cornersOther.size()/_dim; iC < nC; ++iC)
mmBox.addPointToBox( &cornersOther[iC*_dim] );
if ( isMinMaxOut( &mmBox._minmax[0], &this->_minmax[0], _dim ))
getCorners( cornersThis, &_minmax[0] );
DirectedBoundingBox mmBox((double*)0,0,_dim); //!< initailized _minmax
double globCorner[3];
- for ( int iC = 0, nC = cornersThis.size()/_dim; iC < nC; ++iC)
+ for ( std::size_t iC = 0, nC = cornersThis.size()/_dim; iC < nC; ++iC)
{
fromLocalCS( &cornersThis[iC*_dim], globCorner );
for ( int i = 0; i < (int)_dim; ++i )