[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2023-09-12 13:03:02 +00:00
committed by WandererFan
parent a207d11fa4
commit e92ed45df9
435 changed files with 2669 additions and 2645 deletions

View File

@@ -147,7 +147,7 @@ int BSplineBasis::FindSpan(double fParam)
int low = _iOrder - 1;
int high = n + 1;
int mid = (low + high) / 2;// Binary search
int mid = (low + high) / 2; // Binary search
while (fParam < _vKnotVector(mid) || fParam >= _vKnotVector(mid + 1)) {
if (fParam < _vKnotVector(mid)) {
@@ -355,7 +355,7 @@ void BSplineBasis::DerivativesOfBasisFunction(int iIndex,
}
}
Derivat(k) = ND(0);// kth derivative
Derivat(k) = ND(0); // kth derivative
}
}
@@ -448,7 +448,7 @@ double BSplineBasis::DerivativeOfBasisFunction(int iIndex, int iMaxDer, double f
}
}
return ND(0);// iMax-th derivative
return ND(0); // iMax-th derivative
}
double BSplineBasis::GetIntegralOfProductOfBSplines(int iIdx1, int iIdx2, int iOrd1, int iOrd2)
@@ -825,7 +825,7 @@ Handle(Geom_BSplineSurface) ParameterCorrection::CreateSurface(const TColgp_Arra
_pvcUVParam = new TColgp_Array1OfPnt2d(points.Lower(), points.Upper());
if (_usUCtrlpoints * _usVCtrlpoints > static_cast<unsigned>(_pvcPoints->Length())) {
return nullptr;// LGS under-determined
return nullptr; // LGS under-determined
}
if (!DoInitialParameterCorrection(fSizeFactor)) {
return nullptr;
@@ -1134,7 +1134,7 @@ public:
private:
const math_Matrix& mat;
};
}// namespace Reen
} // namespace Reen
bool BSplineParameterCorrection::SolveWithSmoothing(double fWeight)
{
@@ -1197,7 +1197,7 @@ bool BSplineParameterCorrection::SolveWithSmoothing(double fWeight)
MTM(m, n) = MTM(n, m) = Mm * M.Col(n);
}
}
#else// multi-threaded
#else // multi-threaded
std::vector<int> columns(ulDim);
std::generate(columns.begin(), columns.end(), Base::iotaGen<int>(0));
ScalarProduct scalar(M);

View File

@@ -137,7 +137,7 @@ public:
virtual void
SetKnots(TColStd_Array1OfReal& vKnots, TColStd_Array1OfInteger& vMults, int iOrder = 1);
protected:// Member
protected: // Member
// Knot vector
TColStd_Array1OfReal _vKnotVector;
@@ -269,10 +269,10 @@ class ReenExport ParameterCorrection
public:
// Constructor
explicit ParameterCorrection(
unsigned usUOrder = 4, // Order in u-direction (order = degree + 1)
unsigned usVOrder = 4, // Order in v-direction
unsigned usUCtrlpoints = 6, // Qty. of the control points in the u-direction
unsigned usVCtrlpoints = 6);// Qty. of the control points in the v-direction
unsigned usUOrder = 4, // Order in u-direction (order = degree + 1)
unsigned usVOrder = 4, // Order in v-direction
unsigned usUCtrlpoints = 6, // Qty. of the control points in the u-direction
unsigned usVCtrlpoints = 6); // Qty. of the control points in the v-direction
virtual ~ParameterCorrection()
{
@@ -351,23 +351,23 @@ public:
virtual void EnableSmoothing(bool bSmooth = true, double fSmoothInfl = 1.0f);
protected:
bool _bGetUVDir; //! Determines whether u/v direction is given
bool _bSmoothing; //! Use smoothing
double _fSmoothInfluence; //! Influence of smoothing
unsigned _usUOrder; //! Order in u-direction
unsigned _usVOrder; //! Order in v-direction
unsigned _usUCtrlpoints; //! Number of control points in the u-direction
unsigned _usVCtrlpoints; //! Number of control points in the v-direction
Base::Vector3d _clU; //! u-direction
Base::Vector3d _clV; //! v-direction
Base::Vector3d _clW; //! w-direction (perpendicular to u & v directions)
TColgp_Array1OfPnt* _pvcPoints {nullptr}; //! Raw data point list
TColgp_Array1OfPnt2d* _pvcUVParam {nullptr};//! Parameter value for the points in the list
TColgp_Array2OfPnt _vCtrlPntsOfSurf; //! Array of control points
TColStd_Array1OfReal _vUKnots; //! Knot vector of the B-spline surface in the u-direction
TColStd_Array1OfReal _vVKnots; //! Knot vector of the B-spline surface in the v-direction
TColStd_Array1OfInteger _vUMults;//! Multiplicity of the knots in the knot vector
TColStd_Array1OfInteger _vVMults;//! Multiplicity of the knots in the knot vector
bool _bGetUVDir; //! Determines whether u/v direction is given
bool _bSmoothing; //! Use smoothing
double _fSmoothInfluence; //! Influence of smoothing
unsigned _usUOrder; //! Order in u-direction
unsigned _usVOrder; //! Order in v-direction
unsigned _usUCtrlpoints; //! Number of control points in the u-direction
unsigned _usVCtrlpoints; //! Number of control points in the v-direction
Base::Vector3d _clU; //! u-direction
Base::Vector3d _clV; //! v-direction
Base::Vector3d _clW; //! w-direction (perpendicular to u & v directions)
TColgp_Array1OfPnt* _pvcPoints {nullptr}; //! Raw data point list
TColgp_Array1OfPnt2d* _pvcUVParam {nullptr}; //! Parameter value for the points in the list
TColgp_Array2OfPnt _vCtrlPntsOfSurf; //! Array of control points
TColStd_Array1OfReal _vUKnots; //! Knot vector of the B-spline surface in the u-direction
TColStd_Array1OfReal _vVKnots; //! Knot vector of the B-spline surface in the v-direction
TColStd_Array1OfInteger _vUMults; //! Multiplicity of the knots in the knot vector
TColStd_Array1OfInteger _vVMults; //! Multiplicity of the knots in the knot vector
};
///////////////////////////////////////////////////////////////////////////////////////////////
@@ -385,10 +385,10 @@ class ReenExport BSplineParameterCorrection: public ParameterCorrection
public:
// Constructor
explicit BSplineParameterCorrection(
unsigned usUOrder = 4, // Order in u-direction (order = degree + 1)
unsigned usVOrder = 4, // Order in the v-direction
unsigned usUCtrlpoints = 6, // Qty. of the control points in u-direction
unsigned usVCtrlpoints = 6);// Qty. of the control points in v-direction
unsigned usUOrder = 4, // Order in u-direction (order = degree + 1)
unsigned usVOrder = 4, // Order in the v-direction
unsigned usUCtrlpoints = 6, // Qty. of the control points in u-direction
unsigned usVCtrlpoints = 6); // Qty. of the control points in v-direction
~BSplineParameterCorrection() override = default;
@@ -491,14 +491,14 @@ protected:
virtual void CalcThirdSmoothMatrix(Base::SequencerLauncher&);
protected:
BSplineBasis _clUSpline; //! B-spline basic function in the u-direction
BSplineBasis _clVSpline; //! B-spline basic function in the v-direction
math_Matrix _clSmoothMatrix;//! Matrix of smoothing functionals
math_Matrix _clFirstMatrix; //! Matrix of the 1st smoothing functionals
math_Matrix _clSecondMatrix;//! Matrix of the 2nd smoothing functionals
math_Matrix _clThirdMatrix; //! Matrix of the 3rd smoothing functionals
BSplineBasis _clUSpline; //! B-spline basic function in the u-direction
BSplineBasis _clVSpline; //! B-spline basic function in the v-direction
math_Matrix _clSmoothMatrix; //! Matrix of smoothing functionals
math_Matrix _clFirstMatrix; //! Matrix of the 1st smoothing functionals
math_Matrix _clSecondMatrix; //! Matrix of the 2nd smoothing functionals
math_Matrix _clThirdMatrix; //! Matrix of the 3rd smoothing functionals
};
}// namespace Reen
} // namespace Reen
#endif// REEN_APPROXSURFACE_H
#endif // REEN_APPROXSURFACE_H

View File

@@ -250,4 +250,4 @@ Handle(Geom_BSplineSurface) BSplineFitting::perform()
return Handle(Geom_BSplineSurface)();
#endif
}
#endif// HAVE_PCL_OPENNURBS
#endif // HAVE_PCL_OPENNURBS

View File

@@ -58,8 +58,8 @@ private:
double myBoundaryWeight;
};
}// namespace Reen
} // namespace Reen
#endif// HAVE_PCL_OPENNURBS
#endif // HAVE_PCL_OPENNURBS
#endif// REEN_BSPLINEFITTING_H
#endif // REEN_BSPLINEFITTING_H

View File

@@ -58,5 +58,5 @@
#include <QFutureWatcher>
#include <QtConcurrentMap>
#endif// _PreComp_
#endif // _PreComp_
#endif

View File

@@ -155,4 +155,4 @@ void RegionGrowing::perform(const std::vector<Base::Vector3f>& myNormals)
}
}
#endif// HAVE_PCL_SEGMENTATION
#endif // HAVE_PCL_SEGMENTATION

View File

@@ -55,6 +55,6 @@ private:
std::list<std::vector<int>>& myClusters;
};
}// namespace Reen
} // namespace Reen
#endif// REEN_REGIONGROWING_H
#endif // REEN_REGIONGROWING_H

View File

@@ -140,4 +140,4 @@ double SampleConsensus::perform(std::vector<float>& parameters, std::vector<int>
return ransac.getProbability();
}
#endif// HAVE_PCL_SAMPLE_CONSENSUS
#endif // HAVE_PCL_SAMPLE_CONSENSUS

View File

@@ -59,6 +59,6 @@ private:
const std::vector<Base::Vector3d>& myNormals;
};
}// namespace Reen
} // namespace Reen
#endif// REEN_SAMPLECONSENSUS_H
#endif // REEN_SAMPLECONSENSUS_H

View File

@@ -156,7 +156,7 @@ void Segmentation::perform(int ksearch)
extract.filter(*cloud_cylinder);
}
#endif// HAVE_PCL_SEGMENTATION
#endif // HAVE_PCL_SEGMENTATION
// ----------------------------------------------------------------------------
@@ -212,4 +212,4 @@ void NormalEstimation::perform(std::vector<Base::Vector3d>& normals)
}
}
#endif// HAVE_PCL_FILTERS
#endif // HAVE_PCL_FILTERS

View File

@@ -83,6 +83,6 @@ private:
double searchRadius;
};
}// namespace Reen
} // namespace Reen
#endif// REEN_SEGMENTATION_H
#endif // REEN_SEGMENTATION_H

View File

@@ -114,9 +114,9 @@ void SurfaceTriangulation::perform(int ksearch)
gp3.setSearchRadius(searchRadius);
gp3.setMu(mu);
gp3.setMaximumNearestNeighbors(100);
gp3.setMaximumSurfaceAngle(M_PI / 4);// 45 degrees
gp3.setMinimumAngle(M_PI / 18); // 10 degrees
gp3.setMaximumAngle(2 * M_PI / 3); // 120 degrees
gp3.setMaximumSurfaceAngle(M_PI / 4); // 45 degrees
gp3.setMinimumAngle(M_PI / 18); // 10 degrees
gp3.setMaximumAngle(2 * M_PI / 3); // 120 degrees
gp3.setNormalConsistency(false);
gp3.setConsistentVertexOrdering(true);
@@ -171,9 +171,9 @@ void SurfaceTriangulation::perform(const std::vector<Base::Vector3f>& normals)
gp3.setSearchRadius(searchRadius);
gp3.setMu(mu);
gp3.setMaximumNearestNeighbors(100);
gp3.setMaximumSurfaceAngle(M_PI / 4);// 45 degrees
gp3.setMinimumAngle(M_PI / 18); // 10 degrees
gp3.setMaximumAngle(2 * M_PI / 3); // 120 degrees
gp3.setMaximumSurfaceAngle(M_PI / 4); // 45 degrees
gp3.setMinimumAngle(M_PI / 18); // 10 degrees
gp3.setMaximumAngle(2 * M_PI / 3); // 120 degrees
gp3.setNormalConsistency(true);
gp3.setConsistentVertexOrdering(true);
@@ -785,4 +785,4 @@ void MeshConversion::convert(const pcl::PolygonMesh& pclMesh, Mesh::MeshObject&
meshObject.harmonizeNormals();
}
#endif// HAVE_PCL_SURFACE
#endif // HAVE_PCL_SURFACE

View File

@@ -208,6 +208,6 @@ private:
Mesh::MeshObject& myMesh;
};
}// namespace Reen
} // namespace Reen
#endif// REEN_SURFACETRIANGULATION_H
#endif // REEN_SURFACETRIANGULATION_H

View File

@@ -50,7 +50,7 @@ public:
Module()
: Py::ExtensionModule<Module>("ReverseEngineeringGui")
{
initialize("This module is the ReverseEngineeringGui module.");// register with Python
initialize("This module is the ReverseEngineeringGui module."); // register with Python
}
private:
@@ -61,7 +61,7 @@ PyObject* initModule()
return Base::Interpreter().addModule(new Module);
}
}// namespace ReverseEngineeringGui
} // namespace ReverseEngineeringGui
/* Python entry */

View File

@@ -74,6 +74,6 @@ private:
Gui::TaskView::TaskBox* taskbox;
};
}// namespace ReenGui
} // namespace ReenGui
#endif// REENGUI_FITBSPLINESURFACE_H
#endif // REENGUI_FITBSPLINESURFACE_H

View File

@@ -70,6 +70,6 @@ private:
Gui::TaskView::TaskBox* taskbox;
};
}// namespace ReenGui
} // namespace ReenGui
#endif// REENGUI_POISSON_H
#endif // REENGUI_POISSON_H

View File

@@ -53,6 +53,6 @@
#include <QMessageBox>
#include <QPushButton>
#endif//_PreComp_
#endif //_PreComp_
#endif// __PRECOMPILED_GUI__
#endif // __PRECOMPILED_GUI__

View File

@@ -81,6 +81,6 @@ private:
Gui::TaskView::TaskBox* taskbox;
};
}// namespace ReverseEngineeringGui
} // namespace ReverseEngineeringGui
#endif// REVERSEENGINEERINGGUI_SEGMENTATION_H
#endif // REVERSEENGINEERINGGUI_SEGMENTATION_H

View File

@@ -105,6 +105,6 @@ private:
Gui::TaskView::TaskBox* taskbox;
};
}// namespace ReverseEngineeringGui
} // namespace ReverseEngineeringGui
#endif// REVERSEENGINEERINGGUI_SEGMENTATIONMANUAL_H
#endif // REVERSEENGINEERINGGUI_SEGMENTATIONMANUAL_H

View File

@@ -30,7 +30,7 @@
using namespace ReverseEngineeringGui;
#if 0// needed for Qt's lupdate utility
#if 0 // needed for Qt's lupdate utility
qApp->translate("Workbench", "Reverse Engineering");
#endif

View File

@@ -46,7 +46,7 @@ protected:
Gui::ToolBarItem* setupCommandBars() const override;
};
}// namespace ReverseEngineeringGui
} // namespace ReverseEngineeringGui
#endif// REENGUI_WORKBENCH_H
#endif // REENGUI_WORKBENCH_H

View File

@@ -44,4 +44,4 @@
#endif
#endif
#endif// REEN_GLOBAL_H
#endif // REEN_GLOBAL_H