All: Reformat according to new standard

This commit is contained in:
pre-commit-ci[bot]
2025-11-11 13:49:01 +01:00
committed by Kacper Donat
parent eafd18dac0
commit 25c3ba7338
2390 changed files with 154630 additions and 115818 deletions

View File

@@ -69,13 +69,13 @@
#ifndef HAVE_ACOSH
#define HAVE_ACOSH
# define HAVE_ACOSH
#endif
#ifndef HAVE_ASINH
#define HAVE_ASINH
# define HAVE_ASINH
#endif
#ifndef HAVE_ATANH
#define HAVE_ATANH
# define HAVE_ATANH
#endif
@@ -279,8 +279,7 @@ public:
MeshCore::MeshProjection meshProjection(kernel);
Base::Vector3f v1 = Base::convertTo<Base::Vector3f>(last.point);
Base::Vector3f v2 = Base::convertTo<Base::Vector3f>(pick.point);
Base::Vector3f vd =
Base::convertTo<Base::Vector3f>(viewer->getViewer()->getViewDirection());
Base::Vector3f vd = Base::convertTo<Base::Vector3f>(viewer->getViewer()->getViewDirection());
if (meshProjection.projectLineOnMesh(*grid, v1, last.facet, v2, pick.facet, vd, polyline)) {
if (polyline.size() > 1) {
if (cutLines.empty()) {
@@ -344,10 +343,7 @@ void CurveOnMeshHandler::enableApproximation(bool on)
d_ptr->approximate = on;
}
void CurveOnMeshHandler::setParameters(int maxDegree,
GeomAbs_Shape cont,
double tol3d,
double angle)
void CurveOnMeshHandler::setParameters(int maxDegree, GeomAbs_Shape cont, double tol3d, double angle)
{
d_ptr->par.maxDegree = maxDegree;
d_ptr->par.cont = cont;
@@ -487,11 +483,7 @@ Handle(Geom_BSplineCurve) CurveOnMeshHandler::approximateSpline(const std::vecto
// GeomAPI_PointsToBSpline fit(pnts, d_ptr->par.weight1, d_ptr->par.weight2,
// d_ptr->par.weight3,
// d_ptr->par.maxDegree, d_ptr->par.cont, d_ptr->par.tol3d);
GeomAPI_PointsToBSpline fit(pnts,
1,
d_ptr->par.maxDegree,
d_ptr->par.cont,
d_ptr->par.tol3d);
GeomAPI_PointsToBSpline fit(pnts, 1, d_ptr->par.maxDegree, d_ptr->par.cont, d_ptr->par.tol3d);
Handle(Geom_BSplineCurve) spline = fit.Curve();
return spline;
}
@@ -512,9 +504,11 @@ void CurveOnMeshHandler::approximateEdge(const TopoDS_Edge& edge, double toleran
pts.reserve(numNodes);
for (int i = aNodes.Lower(); i <= aNodes.Upper(); i++) {
const gp_Pnt& p = aNodes.Value(i);
pts.emplace_back(static_cast<float>(p.X()),
static_cast<float>(p.Y()),
static_cast<float>(p.Z()));
pts.emplace_back(
static_cast<float>(p.X()),
static_cast<float>(p.Y()),
static_cast<float>(p.Z())
);
}
d_ptr->curve->setPoints(pts);
@@ -608,8 +602,7 @@ void CurveOnMeshHandler::Private::vertexCallback(void* ud, SoEventCallback* cb)
if (!self->d_ptr->wireClosed) {
Gui::ViewProvider* vp = view->getViewProviderByPathFromTail(pp->getPath());
if (vp && vp->isDerivedFrom<MeshGui::ViewProviderMesh>()) {
MeshGui::ViewProviderMesh* mesh =
static_cast<MeshGui::ViewProviderMesh*>(vp);
MeshGui::ViewProviderMesh* mesh = static_cast<MeshGui::ViewProviderMesh*>(vp);
const SoDetail* detail = pp->getDetail();
if (detail && detail->getTypeId() == SoFaceDetail::getClassTypeId()) {
// get the mesh and build a grid
@@ -619,7 +612,8 @@ void CurveOnMeshHandler::Private::vertexCallback(void* ud, SoEventCallback* cb)
}
else if (self->d_ptr->mesh != mesh) {
Gui::getMainWindow()->statusBar()->showMessage(
tr("Wrong mesh selected"));
tr("Wrong mesh selected")
);
return;
}