[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

@@ -124,7 +124,7 @@ void CurveProjectorShape::projectCurve(const TopoDS_Edge& aEdge,
Base::Vector3f cResultPoint, cSplitPoint, cPlanePnt, cPlaneNormal;
MeshCore::FacetIndex uStartFacetIdx, uCurFacetIdx;
MeshCore::FacetIndex uLastFacetIdx =
MeshCore::FACET_INDEX_MAX - 1;// use another value as FACET_INDEX_MAX
MeshCore::FACET_INDEX_MAX - 1; // use another value as FACET_INDEX_MAX
MeshCore::FacetIndex auNeighboursIdx[3];
bool GoOn;
@@ -1106,7 +1106,7 @@ void MeshProjection::projectEdgeToEdge(const TopoDS_Edge& aEdge,
const std::list<MeshCore::FacetIndex>& auFaces = it->second;
if (auFaces.size() > 2) {
continue;// non-manifold edge -> don't handle this
continue; // non-manifold edge -> don't handle this
}
// if ( clBB.IsOut( gp_Pnt(cE0.x, cE0.y, cE0.z) ) && clBB.IsOut( gp_Pnt(cE1.x, cE1.y,
// cE1.z) ) )

View File

@@ -38,7 +38,7 @@ namespace MeshCore
class MeshKernel;
class MeshGeomFacet;
class MeshFacetGrid;
}// namespace MeshCore
} // namespace MeshCore
using MeshCore::MeshGeomFacet;
using MeshCore::MeshKernel;
@@ -255,6 +255,6 @@ private:
const MeshKernel& _rcMesh;
};
}// namespace MeshPart
} // namespace MeshPart
#endif

View File

@@ -256,24 +256,24 @@ MeshCore::MeshKernel* MeshAlgos::boolean(MeshCore::MeshKernel* pMesh1,
gts_face_class(),
gts_edge_class(),
gts_vertex_class());
if (Type == 0) {// union
if (Type == 0) { // union
gts_surface_inter_boolean(si, s3, GTS_1_OUT_2);
gts_surface_inter_boolean(si, s3, GTS_2_OUT_1);
}
else if (Type == 1) {// inter
else if (Type == 1) { // inter
gts_surface_inter_boolean(si, s3, GTS_1_IN_2);
gts_surface_inter_boolean(si, s3, GTS_2_IN_1);
}
else if (Type == 2) {// diff
else if (Type == 2) { // diff
gts_surface_inter_boolean(si, s3, GTS_1_OUT_2);
gts_surface_inter_boolean(si, s3, GTS_2_IN_1);
gts_surface_foreach_face(si->s2, (GtsFunc)gts_triangle_revert, NULL);
gts_surface_foreach_face(s2, (GtsFunc)gts_triangle_revert, NULL);
}
else if (Type == 3) {// cut inner
else if (Type == 3) { // cut inner
gts_surface_inter_boolean(si, s3, GTS_1_IN_2);
}
else if (Type == 4) {// cut outer
else if (Type == 4) { // cut outer
gts_surface_inter_boolean(si, s3, GTS_1_OUT_2);
}
@@ -571,12 +571,12 @@ void MeshAlgos::LoftOnCurve(MeshCore::MeshKernel& ResultMesh,
ConnectMap[V1] = actPoint;
}
if (i)// not the first row or something to connect to
if (i) // not the first row or something to connect to
{
for (l = 0; l < actPoint.size(); l++) {
if (l)// not first point in row
if (l) // not first point in row
{
if (i == res - 1 && bEnd) {// if last row and a end to connect
if (i == res - 1 && bEnd) { // if last row and a end to connect
actPoint = ConnectMap[V2];
}

View File

@@ -116,6 +116,6 @@ public:
*/
};
}// namespace MeshPart
} // namespace MeshPart
#endif

View File

@@ -170,7 +170,7 @@ FaceUnwrapper::FaceUnwrapper(const TopoDS_Face& face)
void FaceUnwrapper::findFlatNodes(int steps, double val)
{
std::vector<long> fixed_pins;// TODO: INPUT
std::vector<long> fixed_pins; // TODO: INPUT
lscmrelax::LscmRelax mesh_flattener(this->xyz_nodes.transpose(),
this->tris.transpose(),
fixed_pins);

View File

@@ -78,4 +78,4 @@ public:
};
// clang-format on
#endif// MESHFLATTENING
#endif // MESHFLATTENING

View File

@@ -74,13 +74,13 @@
#include <NETGENPlugin_Hypothesis_2D.hxx>
#include <NETGENPlugin_NETGEN_2D.hxx>
#include <NETGENPlugin_SimpleHypothesis_2D.hxx>
#endif// HAVE_NETGEN
#endif // HAVE_NETGEN
#if defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
#endif// HAVE_SMESH
#endif // HAVE_SMESH
using namespace MeshPart;
@@ -159,7 +159,7 @@ struct Vertex
if (fabs(this->z - v.z) >= deflection) {
return this->z < v.z;
}
return false;// points are considered to be equal
return false; // points are considered to be equal
}
};
@@ -313,7 +313,7 @@ public:
return meshdata;
}
};
}// namespace MeshPart
} // namespace MeshPart
// ----------------------------------------------------------------------------
@@ -398,7 +398,7 @@ Mesh::MeshObject* Mesher::createMesh() const
hyp2d->SetQuadAllowed(allowquad);
hyp2d->SetOptimize(optimize);
hyp2d->SetSecondOrder(
secondOrder);// apply bisecting to create four triangles out of one
secondOrder); // apply bisecting to create four triangles out of one
hypoth.push_back(hyp2d);
#if SMESH_VERSION_MAJOR >= 9
@@ -531,7 +531,7 @@ Mesh::MeshObject* Mesher::createMesh() const
}
return meshdata;
#endif// HAVE_SMESH
#endif // HAVE_SMESH
}
Mesh::MeshObject* Mesher::createFrom(SMESH_Mesh* mesh) const

View File

@@ -256,6 +256,6 @@ private:
std::string buffer;
};
}// namespace MeshPart
} // namespace MeshPart
#endif// MESHPART_MESHER_H
#endif // MESHPART_MESHER_H

View File

@@ -78,5 +78,5 @@
#include <TopoDS_Shape.hxx>
#include <gp_Pln.hxx>
#endif// _PreComp_
#endif // _PreComp_
#endif

View File

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

View File

@@ -169,7 +169,7 @@ private:
bool connectEdges;
double epsilon;
};
}// namespace MeshPartGui
} // namespace MeshPartGui
CrossSections::CrossSections(const Base::BoundBox3d& bb, QWidget* parent, Qt::WindowFlags fl)
: QDialog(parent, fl)
@@ -296,7 +296,7 @@ void CrossSections::apply()
bool connectEdges = ui->checkBoxConnect->isChecked();
double eps = ui->spinEpsilon->value();
#if 1// multi-threaded sections
#if 1 // multi-threaded sections
for (auto it : obj) {
const Mesh::MeshObject& mesh = static_cast<Mesh::Feature*>(it)->Mesh.getValue();

View File

@@ -110,6 +110,6 @@ private:
Gui::TaskView::TaskBox* taskbox;
};
}// namespace MeshPartGui
} // namespace MeshPartGui
#endif// MESHPARTGUI_CROSSSECTIONS_H
#endif // MESHPARTGUI_CROSSSECTIONS_H

View File

@@ -319,7 +319,7 @@ public:
std::list<std::vector<Base::Vector3f>> cutLines;
bool wireClosed {false};
double distance {1};
double cosAngle {0.7071};// 45 degree
double cosAngle {0.7071}; // 45 degree
bool approximate {true};
ViewProviderCurveOnMesh* curve;
Gui::ViewProviderDocumentObject* mesh {0};

View File

@@ -41,7 +41,7 @@ namespace Gui
{
class View3DInventor;
class ViewProvider;
}// namespace Gui
} // namespace Gui
namespace MeshPartGui
{
@@ -102,6 +102,6 @@ private:
std::unique_ptr<Private> d_ptr;
};
}// namespace MeshPartGui
} // namespace MeshPartGui
#endif// MESHPARTGUI_CURVEONMESH_H
#endif // MESHPARTGUI_CURVEONMESH_H

View File

@@ -76,6 +76,6 @@
#include <Inventor/nodes/SoPointSet.h>
#include <Inventor/nodes/SoSeparator.h>
#endif//_PreComp_
#endif //_PreComp_
#endif// __PRECOMPILED_GUI__
#endif // __PRECOMPILED_GUI__

View File

@@ -83,6 +83,6 @@ private:
Gui::TaskView::TaskBox* taskbox;
};
}// namespace MeshPartGui
} // namespace MeshPartGui
#endif// MESHPART_GUI_TASKCURVEONMESH_H
#endif // MESHPART_GUI_TASKCURVEONMESH_H

View File

@@ -35,7 +35,7 @@ namespace App
{
class Document;
class SubObjectT;
}// namespace App
} // namespace App
namespace MeshPartGui
{
@@ -140,6 +140,6 @@ private:
Tessellation* widget;
};
}// namespace MeshPartGui
} // namespace MeshPartGui
#endif// MESHPARTGUI_TESSELLATION_H
#endif // MESHPARTGUI_TESSELLATION_H

View File

@@ -32,7 +32,7 @@
using namespace MeshPartGui;
#if 0// needed for Qt's lupdate utility
#if 0 // needed for Qt's lupdate utility
qApp->translate("Workbench", "MeshPart");
#endif

View File

@@ -45,7 +45,7 @@ protected:
Gui::ToolBarItem* setupCommandBars() const override;
};
}// namespace MeshPartGui
} // namespace MeshPartGui
#endif// MESHPARTGUI_WORKBENCH_H
#endif // MESHPARTGUI_WORKBENCH_H

View File

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