[Sketch] Gui: A - D: remove unused headers

- also some sorting
This commit is contained in:
Uwe
2022-12-11 21:51:14 +01:00
parent 170cf81fd5
commit 08932bd92d
29 changed files with 120 additions and 201 deletions

View File

@@ -22,9 +22,6 @@
#include "PreCompiled.h"
#include <CXX/Extensions.hxx>
#include <CXX/Objects.hxx>
#include <Base/Console.h>
#include <Base/Interpreter.h>
#include <Base/PyObjectBase.h>
@@ -32,14 +29,15 @@
#include <Gui/BitmapFactory.h>
#include <Gui/Language/Translator.h>
#include <Gui/WidgetFactory.h>
#include "Workbench.h"
#include "ViewProviderSketch.h"
#include "ViewProviderPython.h"
#include "PropertyConstraintListItem.h"
#include "SketcherSettings.h"
#include "SoDatumLabel.h"
#include "SoZoomTranslation.h"
#include "SketcherSettings.h"
#include "PropertyConstraintListItem.h"
#include "ViewProviderPython.h"
#include "ViewProviderSketch.h"
#include "ViewProviderSketchGeometryExtension.h"
#include "Workbench.h"
// create the commands
@@ -58,7 +56,6 @@ void loadSketcherResource()
Gui::Translator::instance()->refresh();
}
namespace SketcherGui {
class Module : public Py::ExtensionModule<Module>
{

View File

@@ -20,38 +20,31 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <TopoDS_Shape.hxx>
# include <TopoDS_Face.hxx>
# include <TopoDS.hxx>
# include <BRepAdaptor_Surface.hxx>
# include <QApplication>
# include <QInputDialog>
# include <QMessageBox>
#endif
#include <App/DocumentObjectGroup.h>
#include <App/OriginFeature.h>
#include <Gui/Application.h>
#include <Gui/Document.h>
#include <Gui/CommandT.h>
#include <Gui/Control.h>
#include <Gui/Document.h>
#include <Gui/MainWindow.h>
#include <Gui/SelectionFilter.h>
#include <Gui/SelectionObject.h>
#include <Mod/Sketcher/App/SketchObjectSF.h>
#include <Mod/Sketcher/App/Constraint.h>
#include <Mod/Sketcher/App/SketchObject.h>
#include <Mod/Part/App/Attacher.h>
#include <Mod/Part/App/Part2DObject.h>
#include "SketchOrientationDialog.h"
#include "SketchMirrorDialog.h"
#include "ViewProviderSketch.h"
#include "SketchOrientationDialog.h"
#include "TaskSketcherValidation.h"
#include "../App/Constraint.h"
#include "ViewProviderSketch.h"
using namespace std;
using namespace SketcherGui;

View File

@@ -20,7 +20,6 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <QMessageBox>
@@ -28,19 +27,17 @@
#include <Gui/Action.h>
#include <Gui/Application.h>
#include <Gui/CommandT.h>
#include <Gui/Document.h>
#include <Gui/MainWindow.h>
#include <Gui/Selection.h>
#include <Gui/SelectionObject.h>
#include <Gui/CommandT.h>
#include <Gui/MainWindow.h>
#include <Gui/BitmapFactory.h>
#include <Mod/Part/App/Geometry.h>
#include <Mod/Sketcher/App/SketchObject.h>
#include "ViewProviderSketch.h"
#include "GeometryCreationMode.h"
#include "Utils.h"
#include "ViewProviderSketch.h"
using namespace std;
using namespace SketcherGui;

View File

@@ -20,41 +20,37 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <cfloat>
# include <QMessageBox>
# include <Precision.hxx>
# include <QPainter>
# include <Precision.hxx>
#endif
#include <App/Application.h>
#include <Base/Tools.h>
#include <Base/Tools2D.h>
#include <App/Application.h>
#include <Gui/Action.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/CommandT.h>
#include <Gui/DlgCheckableMessageBox.h>
#include <Gui/Document.h>
#include <Gui/MainWindow.h>
#include <Gui/Selection.h>
#include <Gui/SelectionFilter.h>
#include <Gui/SelectionObject.h>
#include <Gui/CommandT.h>
#include <Gui/MainWindow.h>
#include <Gui/Action.h>
#include <Gui/BitmapFactory.h>
#include <Gui/DlgCheckableMessageBox.h>
#include <Mod/Part/App/Geometry.h>
#include <Mod/Sketcher/App/SketchObject.h>
#include <Mod/Sketcher/App/Sketch.h>
#include <Mod/Sketcher/App/GeometryFacade.h>
#include <Mod/Sketcher/App/SketchObject.h>
#include "Utils.h"
#include "ViewProviderSketch.h"
#include "DrawSketchHandler.h"
#include "ui_InsertDatum.h"
#include "EditDatumDialog.h"
#include "CommandConstraints.h"
#include "DrawSketchHandler.h"
#include "EditDatumDialog.h"
#include "ui_InsertDatum.h"
#include "Utils.h"
#include "ViewProviderSketch.h"
using namespace std;
using namespace SketcherGui;

View File

@@ -20,72 +20,57 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Inventor/events/SoKeyboardEvent.h>
# include <Inventor/nodes/SoPickStyle.h>
# include <QApplication>
# include <QInputDialog>
# include <QMessageBox>
# include <QString>
# include <cstdlib>
# include <qdebug.h>
# include <GC_MakeEllipse.hxx>
# include <boost/math/special_functions/fpclassify.hpp>
# include <memory>
#endif
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Tools.h>
# include <QApplication>
# include <QString>
#endif
#include <App/OriginFeature.h>
#include <Gui/Action.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/Document.h>
#include <Gui/CommandT.h>
#include <Gui/Document.h>
#include <Gui/MainWindow.h>
#include <Gui/Selection.h>
#include <Gui/SelectionFilter.h>
#include <Mod/Sketcher/App/SketchObject.h>
#include <Mod/Part/App/DatumFeature.h>
#include <Mod/Part/App/BodyBase.h>
#include <Mod/Part/App/Geometry2d.h>
#include <Mod/Sketcher/App/Constraint.h>
#include "ViewProviderSketch.h"
#include "DrawSketchHandler.h"
#include "Utils.h"
#include <Gui/SoFCUnifiedSelection.h>
#include <Gui/View3DInventor.h>
#include <Gui/View3DInventorViewer.h>
#include <Gui/SoFCUnifiedSelection.h>
#include <Gui/ToolBarManager.h>
#include <Mod/Part/App/DatumFeature.h>
#include <Mod/Part/App/Geometry2d.h>
#include <Mod/Sketcher/App/Constraint.h>
#include <Mod/Sketcher/App/SketchObject.h>
#include "GeometryCreationMode.h"
#include "Utils.h"
#include "ViewProviderSketch.h"
#include "DrawSketchHandlerLine.h"
#include "DrawSketchHandlerRectangle.h"
#include "DrawSketchHandlerPolygon.h"
#include "DrawSketchHandlerLineSet.h"
#include "DrawSketchHandlerCircle.h"
#include "DrawSketchHandlerEllipse.h"
// DrawSketchHandler* must be last includes
#include "DrawSketchHandler.h"
#include "DrawSketchHandlerArc.h"
#include "DrawSketchHandlerArcOfEllipse.h"
#include "DrawSketchHandlerArcOfHyperbola.h"
#include "DrawSketchHandlerArcOfParabola.h"
#include "DrawSketchHandlerBSpline.h"
#include "DrawSketchHandlerPoint.h"
#include "DrawSketchHandlerFillet.h"
#include "DrawSketchHandlerTrimming.h"
#include "DrawSketchHandlerExtend.h"
#include "DrawSketchHandlerSplitting.h"
#include "DrawSketchHandlerExternal.h"
#include "DrawSketchHandlerCarbonCopy.h"
#include "DrawSketchHandlerCircle.h"
#include "DrawSketchHandlerEllipse.h"
#include "DrawSketchHandlerExtend.h"
#include "DrawSketchHandlerExternal.h"
#include "DrawSketchHandlerFillet.h"
#include "DrawSketchHandlerLine.h"
#include "DrawSketchHandlerLineSet.h"
#include "DrawSketchHandlerPoint.h"
#include "DrawSketchHandlerPolygon.h"
#include "DrawSketchHandlerRectangle.h"
#include "DrawSketchHandlerSlot.h"
#include "DrawSketchHandlerSplitting.h"
#include "DrawSketchHandlerTrimming.h"
using namespace std;
using namespace SketcherGui;

View File

@@ -20,38 +20,32 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Inventor/SbString.h>
# include <cfloat>
# include <QMessageBox>
# include <Precision.hxx>
# include <QApplication>
# include <Standard_Version.hxx>
# include <QInputDialog>
# include <QMessageBox>
# include <Inventor/SbString.h>
#endif
#include <Base/Console.h>
#include <Base/UnitsApi.h>
#include <App/Application.h>
#include <Base/Console.h>
#include <Gui/Action.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/CommandT.h>
#include <Gui/Document.h>
#include <Gui/MainWindow.h>
#include <Gui/Selection.h>
#include <Gui/SelectionObject.h>
#include <Gui/CommandT.h>
#include <Gui/MainWindow.h>
#include <Gui/Action.h>
#include <Gui/BitmapFactory.h>
#include "ViewProviderSketch.h"
#include "DrawSketchHandler.h"
#include <Mod/Part/App/Geometry.h>
#include <Mod/Sketcher/App/SketchObject.h>
#include "DrawSketchHandler.h"
#include "Utils.h"
#include "ViewProviderSketch.h"
using namespace std;
using namespace SketcherGui;

View File

@@ -20,41 +20,35 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <cfloat>
# include <memory>
# include <QMessageBox>
# include <Precision.hxx>
# include <QApplication>
# include <QMessageBox>
# include <Inventor/SbString.h>
#endif
#include <Base/Console.h>
#include <App/Application.h>
#include <Base/Console.h>
#include <Gui/Action.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/CommandT.h>
#include <Gui/Document.h>
#include <Gui/MainWindow.h>
#include <Gui/Selection.h>
#include <Gui/SelectionObject.h>
#include <Gui/CommandT.h>
#include <Gui/MainWindow.h>
#include <Gui/Action.h>
#include <Gui/BitmapFactory.h>
#include "ViewProviderSketch.h"
#include "DrawSketchHandler.h"
#include <Mod/Part/App/Geometry.h>
#include <Mod/Sketcher/App/SketchObject.h>
#include <Mod/Sketcher/App/SolverGeometryExtension.h>
#include "ViewProviderSketch.h"
#include "DrawSketchHandler.h"
#include "SketchRectangularArrayDialog.h"
#include "Utils.h"
#include "ViewProviderSketch.h"
using namespace std;
using namespace SketcherGui;

View File

@@ -20,15 +20,10 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <cfloat>
# include <QMessageBox>
# include <Precision.hxx>
# include <QApplication>
# include <Standard_Version.hxx>
# include <QMessageBox>
#endif
#include <Base/Console.h>
@@ -51,6 +46,7 @@
#include "Utils.h"
using namespace std;
using namespace SketcherGui;
using namespace Sketcher;

View File

@@ -20,45 +20,33 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Standard_math.hxx>
# include <Inventor/nodes/SoTranslation.h>
# include <Inventor/nodes/SoText2.h>
# include <Inventor/nodes/SoFont.h>
# include <QPainter>
# include <QGuiApplication>
# include <cmath>
# include <QGuiApplication>
# include <QPainter>
#endif // #ifndef _PreComp_
/// Here the FreeCAD includes sorted by Base,App,Gui......
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Interpreter.h>
#include <Base/Tools.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/CommandT.h>
#include <Gui/Document.h>
#include <Gui/Macro.h>
#include <Gui/MainWindow.h>
#include <Gui/View3DInventorViewer.h>
#include <Gui/View3DInventor.h>
#include <Mod/Part/App/Geometry.h>
#include <Gui/View3DInventorViewer.h>
#include <Mod/Sketcher/App/SketchObject.h>
#include "DrawSketchHandler.h"
#include "ViewProviderSketch.h"
#include "CommandConstraints.h"
#include "Utils.h"
#include "ViewProviderSketch.h"
using namespace SketcherGui;
using namespace Sketcher;
/************************************ Attorney *******************************************/
inline void ViewProviderSketchDrawSketchHandlerAttorney::setConstraintSelectability(ViewProviderSketch &vp, bool enabled /*= true*/)

View File

@@ -20,16 +20,17 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandler_H
#define SKETCHERGUI_DrawSketchHandler_H
#include <Base/Tools2D.h>
#include <Mod/Sketcher/App/Constraint.h>
#include <Inventor/SbString.h>
#include <Gui/Selection.h>
#include <Mod/Sketcher/App/Constraint.h>
#include "AutoConstraint.h"
class QPixmap;
namespace Sketcher {

View File

@@ -20,13 +20,11 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerArc_H
#define SKETCHERGUI_DrawSketchHandlerArc_H
#include "GeometryCreationMode.h"
#include "Utils.h"
using namespace std;

View File

@@ -20,13 +20,11 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerArcOfEllipse_H
#define SKETCHERGUI_DrawSketchHandlerArcOfEllipse_H
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,13 +20,13 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerArcOfHyperbola_H
#define SKETCHERGUI_DrawSketchHandlerArcOfHyperbola_H
#include <boost/math/special_functions/fpclassify.hpp>
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {
@@ -53,9 +53,9 @@ public:
void mouseMove(Base::Vector2d onSketchPos) override
{
if (Mode==STATUS_SEEK_First) {
if (Mode == STATUS_SEEK_First) {
setPositionText(onSketchPos);
if (seekAutoConstraint(sugConstr1, onSketchPos, Base::Vector2d(0.f,0.f))) {
if (seekAutoConstraint(sugConstr1, onSketchPos, Base::Vector2d(0.f, 0.f))) {
renderSuggestConstraintsCursor(sugConstr1);
return;
}
@@ -73,7 +73,7 @@ public:
}
drawEdit(EditCurve);
if (seekAutoConstraint(sugConstr2, onSketchPos, Base::Vector2d(0.f,0.f),
if (seekAutoConstraint(sugConstr2, onSketchPos, Base::Vector2d(0.f, 0.f),
AutoConstraint::CURVE)) {
renderSuggestConstraintsCursor(sugConstr2);
return;
@@ -88,7 +88,7 @@ public:
double angleatpoint = acosh(((onSketchPos.x-centerPoint.x)*cos(phi)+(onSketchPos.y-centerPoint.y)*sin(phi))/a);
double b=(onSketchPos.y-centerPoint.y-a*cosh(angleatpoint)*sin(phi))/(sinh(angleatpoint)*cos(phi));
if(!boost::math::isnan(b)){
if (!boost::math::isnan(b)) {
for (int i=15; i >= -15; i--) {
// P(U) = O + MajRad*Cosh(U)*XDir + MinRad*Sinh(U)*YDir
//double angle = i*M_PI/16.0;
@@ -108,7 +108,7 @@ public:
}
drawEdit(EditCurve);
if (seekAutoConstraint(sugConstr3, onSketchPos, Base::Vector2d(0.f,0.f))) {
if (seekAutoConstraint(sugConstr3, onSketchPos, Base::Vector2d(0.f, 0.f))) {
renderSuggestConstraintsCursor(sugConstr3);
return;
}

View File

@@ -20,13 +20,11 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerArcOfParabola_H
#define SKETCHERGUI_DrawSketchHandlerArcOfParabola_H
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,13 +20,14 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerBSpline_H
#define SKETCHERGUI_DrawSketchHandlerBSpline_H
#include <QInputDialog>
#include <Inventor/events/SoKeyboardEvent.h>
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,13 +20,11 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerCarbonCopy_H
#define SKETCHERGUI_DrawSketchHandlerCarbonCopy_H
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,13 +20,11 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerCircle_H
#define SKETCHERGUI_DrawSketchHandlerCircle_H
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,14 +20,15 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerEllipse_H
#define SKETCHERGUI_DrawSketchHandlerEllipse_H
#include <cmath>
#include <QDebug>
#include <GC_MakeEllipse.hxx>
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,13 +20,11 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerExtend_H
#define SKETCHERGUI_DrawSketchHandlerExtend_H
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,13 +20,11 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerExternal_H
#define SKETCHERGUI_DrawSketchHandlerExternal_H
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,12 +20,13 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerFillet_H
#define SKETCHERGUI_DrawSketchHandlerFillet_H
#include <QMessageBox>
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -19,13 +19,11 @@
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerLine_H
#define SKETCHERGUI_DrawSketchHandlerLine_H
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,13 +20,14 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerLineSet_H
#define SKETCHERGUI_DrawSketchHandlerLineSet_H
#include <boost/math/special_functions/fpclassify.hpp>
#include <Inventor/events/SoKeyboardEvent.h>
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,12 +20,11 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerPoint_H
#define SKETCHERGUI_DrawSketchHandlerPoint_H
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,15 +20,13 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerPolygon_H
#define SKETCHERGUI_DrawSketchHandlerPolygon_H
#include "GeometryCreationMode.h"
#include "Utils.h"
#include "SketcherRegularPolygonDialog.h"
namespace SketcherGui {
extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp

View File

@@ -20,13 +20,11 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerRectangle_H
#define SKETCHERGUI_DrawSketchHandlerRectangle_H
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,12 +20,11 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerSlot_H
#define SKETCHERGUI_DrawSketchHandlerSlot_H
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,13 +20,11 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerSplitting_H
#define SKETCHERGUI_DrawSketchHandlerSplitting_H
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {

View File

@@ -20,13 +20,11 @@
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerTrimming_H
#define SKETCHERGUI_DrawSketchHandlerTrimming_H
#include "GeometryCreationMode.h"
#include "Utils.h"
namespace SketcherGui {