diff --git a/src/Mod/Part/App/FaceMaker.cpp b/src/Mod/Part/App/FaceMaker.cpp index 5db6f6c640..44fa2ce2cd 100644 --- a/src/Mod/Part/App/FaceMaker.cpp +++ b/src/Mod/Part/App/FaceMaker.cpp @@ -181,28 +181,30 @@ void Part::FaceMaker::postBuild() { this->myTopoShape.setShape(this->myShape); this->myTopoShape.Hasher = this->MyHasher; this->myTopoShape.mapSubElement(this->mySourceShapes); - int i = 0; + int index = 0; const char *op = this->MyOp; if(!op) op = Part::OpCodes::Face; const auto &faces = this->myTopoShape.getSubTopoShapes(TopAbs_FACE); // name the face using the edges of its outer wire for(auto &face : faces) { - ++i; + ++index; TopoShape wire = face.splitWires(); wire.mapSubElement(face); std::set edgeNames; int count = wire.countSubShapes(TopAbs_EDGE); - for(int i=1;i<=count;++i) { + for (int index2 = 1; index2 <= count; ++index2) { Data::ElementIDRefs sids; - Data::MappedName name = face.getMappedName( - Data::IndexedName::fromConst("Edge",i), false, &sids); - if(!name) + Data::MappedName name = + face.getMappedName(Data::IndexedName::fromConst("Edge", index2), false, &sids); + if (!name) { continue; - edgeNames.emplace(wire.getElementHistory(name),name,sids); + } + edgeNames.emplace(wire.getElementHistory(name), name, sids); } - if(edgeNames.empty()) + if (edgeNames.empty()) { continue; + } std::vector names; Data::ElementIDRefs sids; @@ -211,7 +213,7 @@ void Part::FaceMaker::postBuild() { names.push_back(edgeNames.begin()->name); sids = edgeNames.begin()->sids; this->myTopoShape.setElementComboName( - Data::IndexedName::fromConst("Face",i),names,op,nullptr,&sids); + Data::IndexedName::fromConst("Face",index),names,op,nullptr,&sids); } this->myTopoShape.initCache(true); this->Done(); diff --git a/src/Mod/Part/App/TopoShape.h b/src/Mod/Part/App/TopoShape.h index 28cc8d0e7f..06439746a9 100644 --- a/src/Mod/Part/App/TopoShape.h +++ b/src/Mod/Part/App/TopoShape.h @@ -257,7 +257,7 @@ public: bool analyze(bool runBopCheck, std::ostream&) const; bool isClosed() const; bool isCoplanar(const TopoShape& other, double tol = -1) const; - bool findPlane(gp_Pln& pln, double tol = -1) const; + bool findPlane(gp_Pln& plane, double tol = -1) const; /// Returns true if the expansion of the shape is infinite, false otherwise bool isInfinite() const; /// Checks whether the shape is a planar face @@ -679,7 +679,7 @@ public: TopoShape& makeElementFace(const std::vector& shapes, const char* op = nullptr, const char* maker = nullptr, - const gp_Pln* pln = nullptr); + const gp_Pln* plane = nullptr); /** Make a planar face with the input wire or edge * * @param shape: input shape. Can be either edge, wire, or compound of @@ -688,7 +688,7 @@ public: * the operation * @param maker: optional type name of the face maker. If not given, * default to "Part::FaceMakerBullseye" - * @param pln: optional plane of the face. + * @param plane: optional plane of the face. * * @return The function creates a planar face. The original content of this * TopoShape is discarded and replaced with the new shape. The @@ -699,23 +699,23 @@ public: TopoShape& makeElementFace(const TopoShape& shape, const char* op = nullptr, const char* maker = nullptr, - const gp_Pln* pln = nullptr); + const gp_Pln* plane = nullptr); /** Make a planar face using this shape * * @param op: optional string to be encoded into topo naming for indicating * the operation * @param maker: optional type name of the face maker. If not given, * default to "Part::FaceMakerBullseye" - * @param pln: optional plane of the face. + * @param plane: optional plane of the face. * * @return The function returns a new planar face made using the wire or edge * inside this shape. The shape itself is not modified. */ TopoShape makeElementFace(const char* op = nullptr, const char* maker = nullptr, - const gp_Pln* pln = nullptr) const + const gp_Pln* plane = nullptr) const { - return TopoShape(0, Hasher).makeElementFace(*this, op, maker, pln); + return TopoShape(0, Hasher).makeElementFace(*this, op, maker, plane); } /// Filling style when making a BSpline face