FEM: modernize C++: use range-based for loop

This commit is contained in:
wmayer
2023-08-14 19:45:24 +02:00
committed by wwmayer
parent 664a08043e
commit 009f9f2222
37 changed files with 460 additions and 534 deletions

View File

@@ -120,11 +120,10 @@ void ViewProviderFemConstraintTransform::updateData(const App::Property* prop)
// Points and Normals are always updated together
Gui::coinRemoveAllChildren(pShapeSep);
for (std::vector<Base::Vector3d>::const_iterator p = points.begin(); p != points.end();
p++) {
SbVec3f base(p->x, p->y, p->z);
SbVec3f basex(p->x, p->y, p->z);
SbVec3f basey(p->x, p->y, p->z);
for (const auto & point : points) {
SbVec3f base(point.x, point.y, point.z);
SbVec3f basex(point.x, point.y, point.z);
SbVec3f basey(point.x, point.y, point.z);
double x_axis_x = 1;
double x_axis_y = 0;
@@ -280,9 +279,8 @@ void ViewProviderFemConstraintTransform::updateData(const App::Property* prop)
pShapeSep->addChild(sepAx);
}
for (std::vector<Base::Vector3d>::const_iterator p = points.begin(); p != points.end();
p++) {
SbVec3f base(p->x, p->y, p->z);
for (const auto & point : points) {
SbVec3f base(point.x, point.y, point.z);
SbVec3f dir(n->x, n->y, n->z);
base = base + dir * scaledlengthA; //OvG: Scaling
SbRotation rot(SbVec3f(0, 1, 0), dir);