PartDesign/App: cleanup datum's classes and headers

This commit is contained in:
Alexander Golubev 2015-09-08 11:00:17 +03:00 committed by Stefan Tröger
parent 04f3ae0605
commit 118f1cec6a
8 changed files with 15 additions and 198 deletions

View File

@ -22,48 +22,12 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <cfloat>
# include <BRepLib.hxx>
# include <BRepBuilderAPI_MakeEdge.hxx>
# include <BRepBuilderAPI_MakeFace.hxx>
# include <BRepBuilderAPI_MakeVertex.hxx>
# include <BRepBuilderAPI_MakeWire.hxx>
# include <BRepBuilderAPI_GTransform.hxx>
# include <BRep_Tool.hxx>
# include <gp_GTrsf.hxx>
# include <gp_Lin.hxx>
# include <gp_Pln.hxx>
# include <Geom_Line.hxx>
# include <Geom_Plane.hxx>
# include <Geom2d_Line.hxx>
# include <Handle_Geom_Curve.hxx>
# include <Handle_Geom_Surface.hxx>
# include <Handle_Geom_Plane.hxx>
# include <Handle_Geom2d_Line.hxx>
# include <GeomAPI_IntCS.hxx>
# include <GeomAPI_IntSS.hxx>
# include <GeomAPI_ExtremaCurveCurve.hxx>
# include <Precision.hxx>
# include <Standard_Real.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Vertex.hxx>
# include <TopoDS_Edge.hxx>
# include <TopoDS_Face.hxx>
# include <BRepAdaptor_Curve.hxx>
# include <BRepAdaptor_Surface.hxx>
# include <Standard_Version.hxx>
#endif
#include "DatumFeature.h"
#include <Base/Tools.h>
#include <Base/Console.h>
#include <Base/Exception.h>
#include "Mod/Part/App/PrimitiveFeature.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
using namespace Part;
using namespace Attacher;
@ -79,16 +43,6 @@ Datum::~Datum()
{
}
void Datum::onChanged (const App::Property* prop)
{
AttachableObject::onChanged(prop);
}
App::DocumentObjectExecReturn *Datum::execute(void)
{
return AttachableObject::execute();
}
void Datum::onDocumentRestored()
{
// This seems to be the only way to make the ViewProvider display the datum feature

View File

@ -45,9 +45,6 @@ public:
virtual ~Datum();
//short mustExecute();
/// recalculate the feature
App::DocumentObjectExecReturn *execute(void);
/// returns the type name of the view provider
virtual const char* getViewProviderName(void) const = 0;
@ -57,7 +54,6 @@ public:
/// Returns a point of the feature it counts as it's base
virtual Base::Vector3d getBasePoint () const;
protected:
void onChanged (const App::Property* prop);
void onDocumentRestored();
};

View File

@ -22,38 +22,20 @@
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
// TODO Cleanup headers (2015-09-04, Fat-Zer)
#include "DatumCS.h"
#include "DatumPoint.h"
#include "DatumPlane.h"
#include "DatumLine.h"
#include <Base/Exception.h>
#include <gp_Pln.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <TopoDS.hxx>
#include <GeomAbs_SurfaceType.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <Geom_Plane.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <GeomAbs_CurveType.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRep_Tool.hxx>
#include <gp_Quaternion.hxx>
#include <TopoDS_Vertex.hxx>
#include <QObject>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#ifndef _PreComp_
# include <BRepBuilderAPI_MakeFace.hxx>
# include <gp_Pln.hxx>
#endif
#include "DatumCS.h"
using namespace PartDesign;
// ============================================================================
PROPERTY_SOURCE(PartDesign::CoordinateSystem, Part::Datum)
CoordinateSystem::CoordinateSystem()
@ -71,11 +53,6 @@ CoordinateSystem::~CoordinateSystem()
{
}
void CoordinateSystem::onChanged(const App::Property *prop)
{
Part::Datum::onChanged(prop);
}
Base::Vector3d CoordinateSystem::getXAxis()
{
Base::Rotation rot = Placement.getValue().getRotation();

View File

@ -24,8 +24,6 @@
#ifndef PARTDESIGN_DATUMCS_H
#define PARTDESIGN_DATUMCS_H
#include <QString>
#include <App/PropertyLinks.h>
#include <Mod/Part/App/DatumFeature.h>
namespace PartDesign
@ -46,10 +44,6 @@ public:
Base::Vector3d getXAxis();
Base::Vector3d getYAxis();
Base::Vector3d getZAxis();
protected:
virtual void onChanged(const App::Property* prop);
};
} //namespace PartDesign

View File

@ -22,56 +22,14 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <cfloat>
# include <BRepLib.hxx>
# include <BRepBuilderAPI_MakeEdge.hxx>
# include <BRepBuilderAPI_MakeFace.hxx>
# include <BRepBuilderAPI_MakeVertex.hxx>
# include <BRepBuilderAPI_MakeWire.hxx>
# include <BRepBuilderAPI_GTransform.hxx>
# include <BRep_Tool.hxx>
# include <gp_GTrsf.hxx>
# include <gp_Ax3.hxx>
# include <gp_Pnt.hxx>
# include <gp_Lin.hxx>
# include <gp_Pln.hxx>
# include <gp_Circ.hxx>
# include <gp_Cylinder.hxx>
# include <Geom_Line.hxx>
# include <Geom_Plane.hxx>
# include <Geom_CylindricalSurface.hxx>
# include <Geom2d_Line.hxx>
# include <Handle_Geom_Curve.hxx>
# include <Handle_Geom_Surface.hxx>
# include <Handle_Geom_Plane.hxx>
# include <Handle_Geom2d_Line.hxx>
# include <Handle_Standard_Type.hxx>
# include <GeomAPI_IntCS.hxx>
# include <GeomAPI_IntSS.hxx>
# include <GeomAPI_ExtremaCurveCurve.hxx>
# include <Precision.hxx>
# include <Standard_Real.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Vertex.hxx>
# include <TopoDS_Edge.hxx>
# include <TopoDS_Face.hxx>
# include <BRepAdaptor_Curve.hxx>
# include <BRepAdaptor_Surface.hxx>
# include <Standard_Version.hxx>
#endif
// TODO Cleanup Headers (2015-09-04, Fat-Zer)
#include <QObject>
#include "DatumPoint.h"
#include "DatumLine.h"
#include "DatumPlane.h"
#include <Base/Tools.h>
#include <Base/Console.h>
#include <Base/Exception.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
using namespace PartDesign;
using namespace Attacher;
@ -95,11 +53,6 @@ Line::~Line()
{
}
void Line::onChanged(const App::Property *prop)
{
Part::Datum::onChanged(prop);
}
Base::Vector3d Line::getDirection() const
{
Base::Rotation rot = Placement.getValue().getRotation();

View File

@ -24,11 +24,7 @@
#ifndef PARTDESIGN_DATUMLINE_H
#define PARTDESIGN_DATUMLINE_H
#include <QString>
#include <App/PropertyLinks.h>
#include <App/GeoFeature.h>
#include <Mod/Part/App/DatumFeature.h>
#include <Mod/Part/App/AttachableObject.h>
namespace PartDesign
{
@ -46,10 +42,6 @@ public:
}
Base::Vector3d getDirection() const;
protected:
virtual void onChanged(const App::Property* prop);
};
} //namespace PartDesign

View File

@ -22,54 +22,15 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <cfloat>
# include <BRepLib.hxx>
# include <BRepBuilderAPI_MakeEdge.hxx>
# include <BRepBuilderAPI_MakeFace.hxx>
# include <BRepBuilderAPI_MakeVertex.hxx>
# include <BRepBuilderAPI_MakeWire.hxx>
# include <BRepBuilderAPI_GTransform.hxx>
# include <BRep_Tool.hxx>
# include <gp_GTrsf.hxx>
# include <gp_Lin.hxx>
# include <gp_Pln.hxx>
# include <gp_Cylinder.hxx>
# include <Geom_Line.hxx>
# include <Geom_Plane.hxx>
# include <Geom_CylindricalSurface.hxx>
# include <Geom2d_Line.hxx>
# include <Handle_Geom_Curve.hxx>
# include <Handle_Geom_Surface.hxx>
# include <Handle_Geom_Plane.hxx>
# include <Handle_Geom2d_Line.hxx>
# include <GeomAPI_IntCS.hxx>
# include <GeomAPI_IntSS.hxx>
# include <GeomAPI_ExtremaCurveCurve.hxx>
# include <GeomAPI_ProjectPointOnSurf.hxx>
# include <Precision.hxx>
# include <Standard_Real.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Vertex.hxx>
# include <TopoDS_Edge.hxx>
# include <TopoDS_Face.hxx>
# include <BRepAdaptor_Curve.hxx>
# include <BRepAdaptor_Surface.hxx>
# include <Standard_Version.hxx>
#endif
// TODO Cleanup headers (2015-09-04, Fat-Zer)
#include <QObject>
#include "DatumPoint.h"
#include "DatumLine.h"
#include "DatumPlane.h"
#include <Base/Tools.h>
#include <Base/Console.h>
#include <Base/Exception.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#ifndef _PreComp_
# include <BRepBuilderAPI_MakeFace.hxx>
# include <gp_Pln.hxx>
# include <gp_Pnt.hxx>
#endif
#include "DatumPlane.h"
using namespace PartDesign;
using namespace Attacher;
@ -93,11 +54,6 @@ Plane::~Plane()
{
}
void Plane::onChanged(const App::Property *prop)
{
Part::Datum::onChanged(prop);
}
Base::Vector3d Plane::getNormal()
{
Base::Rotation rot = Placement.getValue().getRotation();

View File

@ -24,8 +24,6 @@
#ifndef PARTDESIGN_DATUMPLANE_H
#define PARTDESIGN_DATUMPLANE_H
#include <QString>
#include <App/PropertyLinks.h>
#include <Mod/Part/App/DatumFeature.h>
namespace PartDesign
@ -44,9 +42,6 @@ public:
}
Base::Vector3d getNormal();
protected:
virtual void onChanged(const App::Property* prop);
};
} //namespace PartDesign