[TD] minor fixes

- typos and code formatting as reported by the CI
- some more re-sorting
This commit is contained in:
Uwe
2023-01-09 11:33:23 +01:00
parent a963ca5f8c
commit ce4a916875
6 changed files with 36 additions and 34 deletions

View File

@@ -266,11 +266,12 @@ private:
throw Py::Exception();
}
if(sortedWires.empty()) {
if (sortedWires.empty()) {
Base::Console().Warning("ATDP::edgeWalker: Wire detection failed\n");
return Py::None();
} else {
for (auto& w:sortedWires) {
}
else {
for (auto& w : sortedWires) {
PyObject* wire = new TopoShapeWirePy(new TopoShape(w));
result.append(Py::asObject(wire));
}
@@ -598,7 +599,7 @@ private:
//add the cosmetic edges also
std::vector<TechDraw::BaseGeomPtr> geoms = dvp->getEdgeGeometry();
std::vector<TopoDS_Edge> cosmeticEdges;
for (auto& g: geoms) {
for (auto& g : geoms) {
if (g->hlrVisible && g->cosmetic) {
cosmeticEdges.push_back(g->occEdge);
}
@@ -1015,9 +1016,9 @@ private:
TopoDS_Compound comp;
builder.MakeCompound(comp);
try {
for (auto& lsr:lsresult) {
for (auto& lsr : lsresult) {
std::vector<TopoDS_Edge> edgeList = lsr.getEdges();
for (auto& edge:edgeList) {
for (auto& edge : edgeList) {
if (!edge.IsNull()) {
builder.Add(comp, edge);
}

View File

@@ -404,7 +404,7 @@ bool DrawUtil::apparentIntersection(TopoDS_Edge& edge0, TopoDS_Edge& edge1, gp_P
return true;
}
gp_Vec g(D - C);//betwen a point on each line
gp_Vec g(D - C);//between a point on each line
Base::Console().Message("DU::apparentInter - C: %s D: %s g: %s\n", formatVector(C).c_str(),
formatVector(D).c_str(), formatVector(g).c_str());

View File

@@ -21,21 +21,21 @@
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#include "QDomNodeModel.h"
#include <QDomDocument>
#include <QXmlQuery>
#include <QXmlResultItems>
#include <sstream>
# include <sstream>
# include "QDomNodeModel.h"
# include <QDomDocument>
# include <QXmlResultItems>
# include <QXmlQuery>
#endif
#include <Base/Console.h>
#include "DrawPage.h"
#include "DrawUtil.h"
#include "DrawViewSymbol.h"
#include "DrawViewSymbolPy.h"// generated from DrawViewSymbolPy.xml
#include "DrawPage.h"
#include "DrawUtil.h"
using namespace TechDraw;

View File

@@ -44,10 +44,11 @@
#include <Mod/TechDraw/App/DrawViewAnnotation.h>
#include <Mod/TechDraw/App/Preferences.h>
#include "DlgStringListEditor.h"
#include "QGIViewAnnotation.h"
#include "QGCustomText.h"
#include "Rez.h"
#include "DlgStringListEditor.h"
using namespace TechDrawGui;

View File

@@ -23,16 +23,16 @@
#include "PreCompiled.h"
#ifndef _PreComp_
#include <QGraphicsColorizeEffect>
#include <QGraphicsEffect>
#include <QGraphicsItem>
#include <QRectF>
#include <cmath>
#include <sstream>
# include <cmath>
# include <sstream>
# include <QGraphicsColorizeEffect>
# include <QGraphicsEffect>
# include <QGraphicsItem>
# include <QRectF>
#endif
#include <Base/Console.h>
#include <Mod/TechDraw/App/DrawViewArch.h>
#include <Mod/TechDraw/App/DrawViewDraft.h>
#include <Mod/TechDraw/App/DrawViewSymbol.h>
@@ -43,6 +43,7 @@
#include "QGIViewSymbol.h"
#include "Rez.h"
using namespace TechDrawGui;
using namespace TechDraw;

View File

@@ -21,18 +21,17 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#include <QAction>
#include <QList>
#include <QMenu>
#include <QMessageBox>
#include <QPointer>
#include <QTextStream>
#include <boost/signals2/connection.hpp>
#include <boost_signals2.hpp>
# include <QAction>
# include <QList>
# include <QMenu>
# include <QMessageBox>
# include <QPointer>
# include <QTextStream>
# include <boost_signals2.hpp>
# include <boost/signals2/connection.hpp>
#endif
#include <App/Document.h>
@@ -43,7 +42,6 @@
#include <Gui/Document.h>
#include <Gui/MainWindow.h>
#include <Gui/ViewProviderDocumentObject.h>
#include <Mod/TechDraw/App/DrawHatch.h>
#include <Mod/TechDraw/App/DrawLeaderLine.h>
#include <Mod/TechDraw/App/DrawPage.h>
@@ -64,6 +62,7 @@
#include "ViewProviderPageExtension.h"
#include "ViewProviderTemplate.h"
using namespace TechDrawGui;
using namespace TechDraw;
namespace bp = boost::placeholders;