[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 c469601f95
commit 222a2520b1
435 changed files with 2669 additions and 2645 deletions

View File

@@ -75,7 +75,7 @@ struct SketchAnalysis::Vertex_Less
if (fabs(x.v.z - y.v.z) > tolerance) {
return x.v.z < y.v.z;
}
return false;// points are considered to be equal
return false; // points are considered to be equal
}
private:
@@ -127,7 +127,7 @@ struct SketchAnalysis::Edge_Less
if (fabs(x.l - y.l) > tolerance) {
return x.l < y.l;
}
return false;// points are considered to be equal
return false; // points are considered to be equal
}
private:
@@ -154,7 +154,7 @@ private:
int SketchAnalysis::detectMissingPointOnPointConstraints(double precision,
bool includeconstruction /*=true*/)
{
std::vector<VertexIds> vertexIds;// Holds a list of all vertices in the sketch
std::vector<VertexIds> vertexIds; // Holds a list of all vertices in the sketch
// Build the list of sketch vertices
const std::vector<Part::Geometry*>& geom = sketch->getInternalGeometry();
@@ -261,7 +261,7 @@ int SketchAnalysis::detectMissingPointOnPointConstraints(double precision,
// TODO optimizing by removing constraints not applying on vertices ?
}
std::list<ConstraintIds> missingCoincidences;// Holds the list of missing coincidences
std::list<ConstraintIds> missingCoincidences; // Holds the list of missing coincidences
std::vector<VertexIds>::iterator vt = vertexIds.begin();
Vertex_EqualTo pred(precision);
@@ -271,7 +271,7 @@ int SketchAnalysis::detectMissingPointOnPointConstraints(double precision,
while (vt < vertexIds.end()) {
// Seeking for adjacent group of vertices
vt = std::adjacent_find(vt, vertexIds.end(), pred);
if (vt < vertexIds.end()) {// If one found
if (vt < vertexIds.end()) { // If one found
std::vector<VertexIds>::iterator vn;
// Holds a single group of adjacent vertices
std::set<VertexIds, VertexID_Less> vertexGrp;
@@ -363,7 +363,7 @@ int SketchAnalysis::detectMissingPointOnPointConstraints(double precision,
// this group first vertex, and previous group first vertex
for (vn = coincVertexGrps.begin() + 1; vn < coincVertexGrps.end(); ++vn) {
ConstraintIds id;
id.Type = Coincident;// default point on point restriction
id.Type = Coincident; // default point on point restriction
id.v = (vn - 1)->begin()->v;
id.First = (vn - 1)->begin()->GeoId;
id.FirstPos = (vn - 1)->begin()->PosId;
@@ -469,7 +469,7 @@ void SketchAnalysis::makeMissingPointOnPointCoincident(bool onebyone)
solvesketch(status, dofs, true);
if (status == -2) {// redundant constraints
if (status == -2) { // redundant constraints
sketch->autoRemoveRedundants(false);
solvesketch(status, dofs, false);
@@ -557,7 +557,7 @@ void SketchAnalysis::makeMissingVerticalHorizontal(bool onebyone)
solvesketch(status, dofs, true);
if (status == -2) {// redundant constraints
if (status == -2) { // redundant constraints
sketch->autoRemoveRedundants(false);
solvesketch(status, dofs, false);
@@ -766,7 +766,7 @@ void SketchAnalysis::makeMissingEquality(bool onebyone)
solvesketch(status, dofs, true);
if (status == -2) {// redundant constraints
if (status == -2) { // redundant constraints
sketch->autoRemoveRedundants(false);
solvesketch(status, dofs, false);
@@ -808,14 +808,14 @@ void SketchAnalysis::solvesketch(int& status, int& dofs, bool updategeo)
dofs = sketch->getLastDoF();
}
if (sketch->getLastHasRedundancies()) {// redundant constraints
if (sketch->getLastHasRedundancies()) { // redundant constraints
status = -2;
}
if (dofs < 0) {// over-constrained sketch
if (dofs < 0) { // over-constrained sketch
status = -4;
}
else if (sketch->getLastHasConflicts()) {// conflicting constraints
else if (sketch->getLastHasConflicts()) { // conflicting constraints
status = -3;
}
}
@@ -835,7 +835,7 @@ int SketchAnalysis::autoconstraint(double precision,
solvesketch(status, dofs, true);
if (status) {// it should not be possible at this moment as we start from a clean situation
if (status) { // it should not be possible at this moment as we start from a clean situation
THROWMT(Base::RuntimeError,
QT_TRANSLATE_NOOP("Exceptions",
"Autoconstrain error: Unsolvable sketch without constraints."));
@@ -850,8 +850,8 @@ int SketchAnalysis::autoconstraint(double precision,
// as the solver may move the geometry in the meantime and prevent correct detection
int nc = detectMissingPointOnPointConstraints(precision, includeconstruction);
if (nc > 0) {// STAGE 2a: Classify point-on-point into coincidents, endpoint perp, endpoint
// tangency
if (nc > 0) { // STAGE 2a: Classify point-on-point into coincidents, endpoint perp, endpoint
// tangency
analyseMissingPointOnPointCoincident(angleprecision);
}
@@ -876,7 +876,7 @@ int SketchAnalysis::autoconstraint(double precision,
solvesketch(status, dofs, true);
if (status == -2) {// redundants
if (status == -2) { // redundants
sketch->autoRemoveRedundants(false);
solvesketch(status, dofs, false);
}
@@ -901,7 +901,7 @@ int SketchAnalysis::autoconstraint(double precision,
solvesketch(status, dofs, true);
if (status == -2) {// redundants
if (status == -2) { // redundants
sketch->autoRemoveRedundants(false);
solvesketch(status, dofs, false);
}
@@ -932,7 +932,7 @@ int SketchAnalysis::autoconstraint(double precision,
solvesketch(status, dofs, true);
if (status == -2) {// redundants
if (status == -2) { // redundants
sketch->autoRemoveRedundants(false);
solvesketch(status, dofs, false);
}