diff --git a/src/App/MappedElement.cpp b/src/App/MappedElement.cpp index 35f20e0600..e3ddcf6bef 100644 --- a/src/App/MappedElement.cpp +++ b/src/App/MappedElement.cpp @@ -107,7 +107,7 @@ void IndexedName::set(const char *name, for (const char *n=name, *t=type; *n; ++n) { if (*n != *t || j >= i) break; - ++i; + ++j; ++t; if (!*t) { this->type = type; @@ -118,8 +118,8 @@ void IndexedName::set(const char *name, if (allowOthers) { auto res = NameSet.insert(QByteArray::fromRawData(name, i)); - if (res.second) - res.first->mutate(); + if (res.second) + res.first->mutate(); this->type = res.first->bytes.constData(); } else this->type = ""; diff --git a/src/Mod/Part/App/TopoShapeEx.cpp b/src/Mod/Part/App/TopoShapeEx.cpp index dc7b58d1d8..9bcdaf884d 100644 --- a/src/Mod/Part/App/TopoShapeEx.cpp +++ b/src/Mod/Part/App/TopoShapeEx.cpp @@ -1534,8 +1534,7 @@ static std::vector prepareProfiles(const std::vector &shap if (shape.ShapeType() == TopAbs_FACE) { shape = sh.splitWires().getShape(); } else if (shape.ShapeType() == TopAbs_WIRE) { - BRepBuilderAPI_MakeWire mkWire(TopoDS::Wire(shape)); - shape = mkWire.Wire(); + // do nothing } else if (shape.ShapeType() == TopAbs_EDGE) { BRepBuilderAPI_MakeWire mkWire(TopoDS::Edge(shape)); shape = mkWire.Wire(); @@ -2921,7 +2920,7 @@ TopoShape::sortEdges(std::list& edges, bool keepOrder, double tol) } else if (pEI->v1.SquareDistance(first) <= tol3d) { first = pEI->v2; - sorted.push_back(reverseEdge(pEI->edge)); + sorted.push_front(reverseEdge(pEI->edge)); edges.erase(pEI->it); edge_points.erase(pEI); pEI = edge_points.begin();