[TD] P* - T*: remove unused includes

- also sort includes
- also additions to precompiled header
This commit is contained in:
Uwe
2022-10-06 02:36:48 +02:00
parent d8a5004e41
commit 55f0cf4255
15 changed files with 99 additions and 214 deletions

View File

@@ -356,6 +356,7 @@
// HLR*
#include <HLRAlgo_Projector.hxx>
#include <HLRAppli_ReflectLines.hxx>
#include <HLRBRep_Algo.hxx>
#include <HLRBRep_HLRToShape.hxx>
#include <HLRBRep_PolyAlgo.hxx>
#include <HLRBRep_PolyHLRToShape.hxx>

View File

@@ -30,13 +30,12 @@
#include <App/Application.h>
#include <App/Material.h>
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/FileInfo.h>
#include <Base/Parameter.h>
#include <Base/Vector3D.h>
#include "Preferences.h"
//getters for parameters used in multiple places.
//ensure this is in sync with preference page user interfaces

View File

@@ -23,11 +23,10 @@
#ifndef Preferences_h_
#define Preferences_h_
#include <App/Material.h>
#include <string>
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <string>
class QString;

View File

@@ -22,62 +22,27 @@
//this file originally part of TechDraw workbench
//migrated to TechDraw workbench 2022-01-26 by Wandererfan
#include "PreCompiled.h"
#ifndef _PreComp_
# include <sstream>
# include <BRepAdaptor_Curve.hxx>
# include <Geom_Circle.hxx>
# include <gp_Circ.hxx>
# include <gp_Elips.hxx>
# include <BRepLib.hxx>
# include <BRepMesh_IncrementalMesh.hxx>
# include <HLRAlgo_Projector.hxx>
# include <HLRBRep_Algo.hxx>
# include <HLRBRep_HLRToShape.hxx>
# include <gp_Ax2.hxx>
# include <gp_Dir.hxx>
# include <gp_Pnt.hxx>
# include <TopExp_Explorer.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Shape.hxx>
#endif
#include <Bnd_Box.hxx>
#include <BRepBndLib.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <HLRBRep_Algo.hxx>
#include <TopoDS_Shape.hxx>
#include <HLRTopoBRep_OutLiner.hxx>
#include <HLRAlgo_Projector.hxx>
#include <HLRBRep_ShapeBounds.hxx>
#include <HLRBRep_HLRToShape.hxx>
#include <gp_Ax2.hxx>
#include <gp_Pnt.hxx>
#include <gp_Dir.hxx>
#include <gp_Vec.hxx>
#include <Poly_Polygon3D.hxx>
#include <Poly_Triangulation.hxx>
#include <Poly_PolygonOnTriangulation.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <BRep_Tool.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <BRepLib.hxx>
#include <BRepAdaptor_CompCurve.hxx>
#include <Approx_Curve3d.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_BezierCurve.hxx>
#include <GeomConvert_BSplineCurveToBezierCurve.hxx>
#include <GeomConvert_BSplineCurveKnotSplitting.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Base/Exception.h>
#include <Base/FileInfo.h>
#include <Base/Tools.h>
#include <Mod/Part/App/PartFeature.h>
#include "ProjectionAlgos.h"
#include "TechDrawExport.h"
using namespace TechDraw;
using namespace std;
@@ -86,7 +51,6 @@ using namespace std;
//===========================================================================
ProjectionAlgos::ProjectionAlgos(const TopoDS_Shape &Input, const Base::Vector3d &Dir)
: Input(Input), Direction(Dir)
{
@@ -113,7 +77,7 @@ void ProjectionAlgos::execute()
Handle( HLRBRep_Algo ) brep_hlr = new HLRBRep_Algo;
brep_hlr->Add(Input);
gp_Ax2 transform(gp_Pnt(0, 0,0), gp_Dir(Direction.x, Direction.y, Direction.z));
gp_Ax2 transform(gp_Pnt(0, 0, 0), gp_Dir(Direction.x, Direction.y, Direction.z));
HLRAlgo_Projector projector( transform );
brep_hlr->Projector(projector);
brep_hlr->Update();

View File

@@ -22,17 +22,16 @@
//this file originally part of Drawing workbench
//migrated to TechDraw workbench 2022-01-26 by Wandererfan
#ifndef TechDrawProjectionAlgos_h_
#define TechDrawProjectionAlgos_h_
#include <map>
#include <string>
#include <TopoDS_Shape.hxx>
#include <Base/Vector3D.h>
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <map>
#include <TopoDS_Shape.hxx>
#include <Base/Vector3D.h>
#include <string>
class BRepAdaptor_Curve;

View File

@@ -20,32 +20,20 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <cassert>
#endif
/// Here the FreeCAD includes sorted by Base, App, Gui......
#include <Base/Exception.h>
#include <Base/Console.h>
#include <Base/Reader.h>
#include <Base/Writer.h>
#include <Base/Console.h>
#include "Cosmetic.h"
#include "CenterLinePy.h"
#include "PropertyCenterLineList.h"
#include "CenterLinePy.h"
using namespace App;
using namespace Base;
using namespace std;
using namespace TechDraw;
//**************************************************************************
// PropertyCenterLineList
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -137,18 +125,19 @@ void PropertyCenterLineList::setPyObject(PyObject *value)
void PropertyCenterLineList::Save(Writer &writer) const
{
writer.Stream() << writer.ind() << "<CenterLineList count=\"" << getSize() <<"\">" << endl;
writer.Stream() << writer.ind() << "<CenterLineList count=\"" << getSize() << "\">"
<< std::endl;
writer.incInd();
for (int i = 0; i < getSize(); i++) {
writer.Stream() << writer.ind() << "<CenterLine type=\""
<< _lValueList[i]->getTypeId().getName() << "\">" << endl;
<< _lValueList[i]->getTypeId().getName() << "\">" << std::endl;
writer.incInd();
_lValueList[i]->Save(writer);
writer.decInd();
writer.Stream() << writer.ind() << "</CenterLine>" << endl;
writer.Stream() << writer.ind() << "</CenterLine>" << std::endl;
}
writer.decInd();
writer.Stream() << writer.ind() << "</CenterLineList>" << endl ;
writer.Stream() << writer.ind() << "</CenterLineList>" << std::endl;
}
void PropertyCenterLineList::Restore(Base::XMLReader &reader)

View File

@@ -20,32 +20,20 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <cassert>
#endif
/// Here the FreeCAD includes sorted by Base, App, Gui......
#include <Base/Exception.h>
#include <Base/Console.h>
#include <Base/Reader.h>
#include <Base/Writer.h>
#include <Base/Console.h>
#include "Cosmetic.h"
#include "CosmeticEdgePy.h"
#include "PropertyCosmeticEdgeList.h"
#include "CosmeticEdgePy.h"
using namespace App;
using namespace Base;
using namespace std;
using namespace TechDraw;
//**************************************************************************
// PropertyCosmeticEdgeList
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -139,18 +127,19 @@ void PropertyCosmeticEdgeList::setPyObject(PyObject *value)
void PropertyCosmeticEdgeList::Save(Writer &writer) const
{
writer.Stream() << writer.ind() << "<CosmeticEdgeList count=\"" << getSize() <<"\">" << endl;
writer.Stream() << writer.ind() << "<CosmeticEdgeList count=\"" << getSize() << "\">"
<< std::endl;
writer.incInd();
for (int i = 0; i < getSize(); i++) {
writer.Stream() << writer.ind() << "<CosmeticEdge type=\""
<< _lValueList[i]->getTypeId().getName() << "\">" << endl;
<< _lValueList[i]->getTypeId().getName() << "\">" << std::endl;
writer.incInd();
_lValueList[i]->Save(writer);
writer.decInd();
writer.Stream() << writer.ind() << "</CosmeticEdge>" << endl;
writer.Stream() << writer.ind() << "</CosmeticEdge>" << std::endl;
}
writer.decInd();
writer.Stream() << writer.ind() << "</CosmeticEdgeList>" << endl ;
writer.Stream() << writer.ind() << "</CosmeticEdgeList>" << std::endl;
}
void PropertyCosmeticEdgeList::Restore(Base::XMLReader &reader)

View File

@@ -20,32 +20,20 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <cassert>
#endif
/// Here the FreeCAD includes sorted by Base, App, Gui......
#include <Base/Exception.h>
#include <Base/Console.h>
#include <Base/Reader.h>
#include <Base/Writer.h>
#include <Base/Console.h>
#include "Cosmetic.h"
#include "CosmeticVertexPy.h"
#include "PropertyCosmeticVertexList.h"
#include "CosmeticVertexPy.h"
using namespace App;
using namespace Base;
using namespace std;
using namespace TechDraw;
//**************************************************************************
// PropertyCosmeticVertexList
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -139,18 +127,19 @@ void PropertyCosmeticVertexList::setPyObject(PyObject *value)
void PropertyCosmeticVertexList::Save(Writer &writer) const
{
writer.Stream() << writer.ind() << "<CosmeticVertexList count=\"" << getSize() <<"\">" << endl;
writer.Stream() << writer.ind() << "<CosmeticVertexList count=\"" << getSize() << "\">"
<< std::endl;
writer.incInd();
for (int i = 0; i < getSize(); i++) {
writer.Stream() << writer.ind() << "<CosmeticVertex type=\""
<< _lValueList[i]->getTypeId().getName() << "\">" << endl;
<< _lValueList[i]->getTypeId().getName() << "\">" << std::endl;
writer.incInd();
_lValueList[i]->Save(writer);
writer.decInd();
writer.Stream() << writer.ind() << "</CosmeticVertex>" << endl;
writer.Stream() << writer.ind() << "</CosmeticVertex>" << std::endl;
}
writer.decInd();
writer.Stream() << writer.ind() << "</CosmeticVertexList>" << endl ;
writer.Stream() << writer.ind() << "</CosmeticVertexList>" << std::endl;
}
void PropertyCosmeticVertexList::Restore(Base::XMLReader &reader)

View File

@@ -20,32 +20,20 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <cassert>
#endif
/// Here the FreeCAD includes sorted by Base, App, Gui......
#include <Base/Exception.h>
#include <Base/Console.h>
#include <Base/Reader.h>
#include <Base/Writer.h>
#include <Base/Console.h>
#include "Cosmetic.h"
#include "GeomFormatPy.h"
#include "PropertyGeomFormatList.h"
#include "GeomFormatPy.h"
using namespace App;
using namespace Base;
using namespace std;
using namespace TechDraw;
//**************************************************************************
// PropertyGeomFormatList
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -151,18 +139,19 @@ void PropertyGeomFormatList::setPyObject(PyObject *value)
void PropertyGeomFormatList::Save(Writer &writer) const
{
writer.Stream() << writer.ind() << "<GeomFormatList count=\"" << getSize() <<"\">" << endl;
writer.Stream() << writer.ind() << "<GeomFormatList count=\"" << getSize() << "\">"
<< std::endl;
writer.incInd();
for (int i = 0; i < getSize(); i++) {
writer.Stream() << writer.ind() << "<GeomFormat type=\""
<< _lValueList[i]->getTypeId().getName() << "\">" << endl;
<< _lValueList[i]->getTypeId().getName() << "\">" << std::endl;
writer.incInd();
_lValueList[i]->Save(writer);
writer.decInd();
writer.Stream() << writer.ind() << "</GeomFormat>" << endl;
writer.Stream() << writer.ind() << "</GeomFormat>" << std::endl;
}
writer.decInd();
writer.Stream() << writer.ind() << "</GeomFormatList>" << endl ;
writer.Stream() << writer.ind() << "</GeomFormatList>" << std::endl;
}
void PropertyGeomFormatList::Restore(Base::XMLReader &reader)

View File

@@ -26,14 +26,14 @@
#include "PreCompiled.h"
#include "QDomNodeModel.h"
#include <QDomNode>
#include <QDomDocument>
#include <QUrl>
#include <QVector>
#include <QDomNode>
#include "QDomNodeModel.h"
#include <QSourceLocation>
#include <QUrl>
#include <QVariant>
#include <QVector>
class PrivateDomNodeWrapper: public QDomNode
{

View File

@@ -26,8 +26,8 @@
#ifndef QDOMNODEMODEL_H_
#define QDOMNODEMODEL_H_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <QAbstractXmlNodeModel>
#include <QDomDocument>

View File

@@ -24,40 +24,29 @@
#ifndef _PreComp_
# include <sstream>
# include <BRep_Builder.hxx>
# include <BRepAlgoAPI_Fuse.hxx>
# include <BRepTools.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Iterator.hxx >
# include <TopoDS_Vertex.hxx>
#endif
#include <BRep_Builder.hxx>
#include <BRepAlgoAPI_Fuse.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <BRepTools.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <App/Application.h>
#include <App/Document.h>
#include <App/GroupExtension.h>
#include <App/Part.h>
#include <App/Link.h>
#include <Base/BoundBox.h>
#include <App/Part.h>
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/FileInfo.h>
#include <Base/Parameter.h>
#include <Base/Placement.h>
#include <Mod/Part/App/PartFeature.h>
#include <Mod/Part/App/PrimitiveFeature.h>
#include <Mod/Part/App/FeaturePartCircle.h>
#include <Mod/Part/App/TopoShape.h>
#include <Mod/Part/App/PropertyTopoShape.h>
#include "ShapeExtractor.h"
#include "DrawUtil.h"
using namespace TechDraw;
std::vector<TopoDS_Shape> ShapeExtractor::getShapes2d(const std::vector<App::DocumentObject*> links)

View File

@@ -23,8 +23,6 @@
#ifndef ShapeExtractor_h_
#define ShapeExtractor_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <TopoDS_Shape.hxx>
#include <App/DocumentObject.h>
@@ -32,6 +30,8 @@
#include <Base/Type.h>
#include <Base/Vector3D.h>
#include <Mod/TechDraw/TechDrawGlobal.h>
namespace TechDraw
{

View File

@@ -22,65 +22,43 @@
//this file originally part of TechDraw workbench
//migrated to TechDraw workbench 2022-01-26 by Wandererfan
#include "PreCompiled.h"
#ifndef _PreComp_
# include <sstream>
# include <cmath>
# include <sstream>
# include <Approx_Curve3d.hxx>
# include <BRep_Tool.hxx>
# include <BRepAdaptor_Curve.hxx>
# include <Geom_Circle.hxx>
# include <BRepBuilderAPI_MakeEdge.hxx>
# include <BRepLProp_CLProps.hxx>
# include <Geom_BezierCurve.hxx>
# include <Geom_BSplineCurve.hxx>
# include <GeomConvert_BSplineCurveKnotSplitting.hxx>
# include <GeomConvert_BSplineCurveToBezierCurve.hxx>
# include <gp_Ax2.hxx>
# include <gp_Dir.hxx>
# include <gp_Circ.hxx>
# include <gp_Elips.hxx>
# include <gp_Pnt.hxx>
# include <gp_Vec.hxx>
# include <Poly_Polygon3D.hxx>
# include <Standard_Failure.hxx>
# include <Standard_Version.hxx>
# include <TColStd_Array1OfReal.hxx>
# include <TopExp_Explorer.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Edge.hxx>
# include <TopoDS_Shape.hxx>
# if OCC_VERSION_HEX < 0x070600
# include <BRepAdaptor_HCurve.hxx>
# endif
#endif
#include <Bnd_Box.hxx>
#include <BRepBndLib.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <HLRBRep_Algo.hxx>
#include <TopoDS_Shape.hxx>
#include <HLRTopoBRep_OutLiner.hxx>
#include <HLRAlgo_Projector.hxx>
#include <HLRBRep_ShapeBounds.hxx>
#include <HLRBRep_HLRToShape.hxx>
#include <gp_Ax2.hxx>
#include <gp_Pnt.hxx>
#include <gp_Dir.hxx>
#include <gp_Vec.hxx>
#include <Poly_Polygon3D.hxx>
#include <Poly_Triangulation.hxx>
#include <Poly_PolygonOnTriangulation.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_CompCurve.hxx>
#include <Approx_Curve3d.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_BezierCurve.hxx>
#include <GeomConvert_BSplineCurveToBezierCurve.hxx>
#include <GeomConvert_BSplineCurveKnotSplitting.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <BRepLProp_CLProps.hxx>
#include <Standard_Failure.hxx>
#include <Standard_Version.hxx>
#if OCC_VERSION_HEX < 0x070600
#include <BRepAdaptor_HCurve.hxx>
#endif
#include <Base/Tools.h>
#include "TechDrawExport.h"
#include <Base/Tools.h>
#include <Base/Vector3D.h>
#if OCC_VERSION_HEX >= 0x070600
using BRepAdaptor_HCurve = BRepAdaptor_Curve;
@@ -242,7 +220,7 @@ void SVGOutput::printCircle(const BRepAdaptor_Curve& c, std::ostream& out)
else {
// See also https://developer.mozilla.org/en/SVG/Tutorial/Paths
char xar = '0'; // x-axis-rotation
char las = (l-f > D_PI) ? '1' : '0'; // large-arc-flag
char las = (l-f > M_PI) ? '1' : '0'; // large-arc-flag
char swp = (a < 0) ? '1' : '0'; // sweep-flag, i.e. clockwise (0) or counter-clockwise (1)
out << "<path d=\"M" << s.X() << " " << s.Y()
<< " A" << r << " " << r << " "
@@ -289,7 +267,7 @@ void SVGOutput::printEllipse(const BRepAdaptor_Curve& c, int id, std::ostream& o
}
// arc of ellipse
else {
char las = (l-f > D_PI) ? '1' : '0'; // large-arc-flag
char las = (l-f > M_PI) ? '1' : '0'; // large-arc-flag
char swp = (a < 0) ? '1' : '0'; // sweep-flag, i.e. clockwise (0) or counter-clockwise (1)
out << "<path d=\"M" << s.X() << " " << s.Y()
<< " A" << r1 << " " << r2 << " "
@@ -554,8 +532,8 @@ void DXFOutput::printCircle(const BRepAdaptor_Curve& c, std::ostream& out)
double bx = e.X() - p.X();
double by = e.Y() - p.Y();
double start_angle = atan2(ay, ax) * 180/D_PI;
double end_angle = atan2(by, bx) * 180/D_PI;
double start_angle = atan2(ay, ax) * 180 / M_PI;
double end_angle = atan2(by, bx) * 180 / M_PI;
if(a > 0){

View File

@@ -22,15 +22,15 @@
//this file originally part of Drawing workbench
//migrated to TechDraw workbench 2022-01-26 by Wandererfan
#ifndef TECHDRAW_EXPORT_H
#define TECHDRAW_EXPORT_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <string>
#include <TopoDS_Edge.hxx>
#include <Mod/TechDraw/TechDrawGlobal.h>
class TopoDS_Shape;
class BRepAdaptor_Curve;