[Drawing] App: remove unused headers
- also some sorting - also enable precompiled header
This commit is contained in:
@@ -12,17 +12,17 @@
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/PyObjectBase.h>
|
||||
#include <Base/Interpreter.h>
|
||||
|
||||
#include "FeaturePage.h"
|
||||
#include "FeatureView.h"
|
||||
#include "FeatureViewPart.h"
|
||||
#include "FeatureViewAnnotation.h"
|
||||
#include "FeatureViewSymbol.h"
|
||||
#include "FeatureProjection.h"
|
||||
#include "FeatureViewSpreadsheet.h"
|
||||
#include <Base/PyObjectBase.h>
|
||||
|
||||
#include "FeatureClip.h"
|
||||
#include "FeaturePage.h"
|
||||
#include "FeatureProjection.h"
|
||||
#include "FeatureView.h"
|
||||
#include "FeatureViewAnnotation.h"
|
||||
#include "FeatureViewPart.h"
|
||||
#include "FeatureViewSpreadsheet.h"
|
||||
#include "FeatureViewSymbol.h"
|
||||
#include "PageGroup.h"
|
||||
|
||||
|
||||
|
||||
@@ -21,18 +21,17 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <boost/regex.hpp>
|
||||
#endif
|
||||
|
||||
#include <CXX/Extensions.hxx>
|
||||
#include <CXX/Objects.hxx>
|
||||
|
||||
#include <Mod/Part/App/TopoShapePy.h>
|
||||
#include "ProjectionAlgos.h"
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Interpreter.h>
|
||||
#include <Base/VectorPy.h>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#include <Mod/Part/App/OCCError.h>
|
||||
#include <Mod/Part/App/TopoShapePy.h>
|
||||
|
||||
#include "ProjectionAlgos.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -59,6 +59,18 @@ SOURCE_GROUP("Mod" FILES ${Drawing_SRCS})
|
||||
SOURCE_GROUP("Features" FILES ${Features_SRCS})
|
||||
SOURCE_GROUP("Algorithms" FILES ${DrawingAlgos_SRCS})
|
||||
|
||||
SET(DrawingComplete_SRCS
|
||||
${Drawing_SRCS}
|
||||
${DrawingAlgos_SRCS}
|
||||
${Features_SRCS}
|
||||
)
|
||||
|
||||
if(FREECAD_USE_PCH)
|
||||
add_definitions(-D_PreComp_)
|
||||
GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${DrawingComplete_SRCS})
|
||||
ADD_MSVC_PRECOMPILED_HEADER(Drawing PreCompiled.h PreCompiled.cpp PCH_SRCS)
|
||||
endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(Drawing SHARED ${Drawing_SRCS} ${Features_SRCS} ${DrawingAlgos_SRCS})
|
||||
target_link_libraries(Drawing ${Drawing_LIBS})
|
||||
|
||||
|
||||
@@ -20,67 +20,44 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#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_Circ.hxx>
|
||||
# include <gp_Dir.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 <BRepAPI_MakeOutLine.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 "DrawingExport.h"
|
||||
#include <Base/Tools.h>
|
||||
#include <Base/Vector3D.h>
|
||||
|
||||
#include "DrawingExport.h"
|
||||
|
||||
|
||||
#if OCC_VERSION_HEX >= 0x070600
|
||||
using BRepAdaptor_HCurve = BRepAdaptor_Curve;
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef DRAWING_EXPORT_H
|
||||
#define DRAWING_EXPORT_H
|
||||
|
||||
@@ -28,6 +27,7 @@
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <Mod/Drawing/DrawingGlobal.h>
|
||||
|
||||
|
||||
class TopoDS_Shape;
|
||||
class BRepAdaptor_Curve;
|
||||
|
||||
|
||||
@@ -20,28 +20,19 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <iostream>
|
||||
# include <sstream>
|
||||
#endif
|
||||
|
||||
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/Console.h>
|
||||
#include <Base/FileInfo.h>
|
||||
#include <App/Application.h>
|
||||
#include <boost/regex.hpp>
|
||||
#include <iostream>
|
||||
|
||||
#include "FeatureClip.h"
|
||||
#include "FeatureView.h"
|
||||
|
||||
|
||||
using namespace Drawing;
|
||||
using namespace std;
|
||||
|
||||
|
||||
//===========================================================================
|
||||
// FeaturePage
|
||||
//===========================================================================
|
||||
@@ -99,8 +90,8 @@ App::DocumentObjectExecReturn *FeatureClip::execute(void)
|
||||
svg << "<g clip-path=\"url(#" << Label.getValue() << ")\">" << endl;
|
||||
|
||||
// get through the children and collect all the views
|
||||
const std::vector<App::DocumentObject*> &Grp = Group.getValues();
|
||||
for (std::vector<App::DocumentObject*>::const_iterator It= Grp.begin();It!=Grp.end();++It) {
|
||||
const vector<App::DocumentObject*> &Grp = Group.getValues();
|
||||
for (vector<App::DocumentObject*>::const_iterator It= Grp.begin();It!=Grp.end();++It) {
|
||||
if ((*It)->getTypeId().isDerivedFrom(Drawing::FeatureView::getClassTypeId())) {
|
||||
Drawing::FeatureView *View = static_cast<Drawing::FeatureView *>(*It);
|
||||
svg << View->ViewResult.getValue() << endl;
|
||||
|
||||
@@ -20,15 +20,14 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef _FeatureClip_h_
|
||||
#define _FeatureClip_h_
|
||||
|
||||
|
||||
#include <App/DocumentObjectGroup.h>
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <Mod/Drawing/DrawingGlobal.h>
|
||||
|
||||
|
||||
namespace Drawing
|
||||
{
|
||||
|
||||
|
||||
@@ -20,31 +20,28 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <fstream>
|
||||
# include <iostream>
|
||||
# include <iterator>
|
||||
# include <sstream>
|
||||
|
||||
# include <boost/regex.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
#include <Base/Exception.h>
|
||||
#include <App/Application.h>
|
||||
#include <Base/Console.h>
|
||||
#include <Base/FileInfo.h>
|
||||
#include <App/Application.h>
|
||||
#include <boost/regex.hpp>
|
||||
#include <iterator>
|
||||
|
||||
#include "FeaturePage.h"
|
||||
#include "FeatureView.h"
|
||||
#include "FeatureClip.h"
|
||||
#include "FeatureView.h"
|
||||
|
||||
|
||||
using namespace Drawing;
|
||||
using namespace std;
|
||||
|
||||
|
||||
//===========================================================================
|
||||
// FeaturePage
|
||||
//===========================================================================
|
||||
|
||||
@@ -20,13 +20,10 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef _FeaturePage_h_
|
||||
#define _FeaturePage_h_
|
||||
|
||||
|
||||
#include <App/DocumentObjectGroup.h>
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyFile.h>
|
||||
#include <Mod/Drawing/DrawingGlobal.h>
|
||||
|
||||
@@ -34,7 +31,6 @@
|
||||
namespace Drawing
|
||||
{
|
||||
|
||||
|
||||
/** Base class of all View Features in the drawing module
|
||||
*/
|
||||
class DrawingExport FeaturePage: public App::DocumentObjectGroup
|
||||
|
||||
@@ -20,36 +20,29 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <sstream>
|
||||
|
||||
# include <BRep_Builder.hxx>
|
||||
# include <Standard_Failure.hxx>
|
||||
# include <TopoDS_Compound.hxx>
|
||||
#endif
|
||||
|
||||
|
||||
#include <Base/Writer.h>
|
||||
#include <Base/Reader.h>
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/FileInfo.h>
|
||||
|
||||
#include "FeatureProjection.h"
|
||||
#include "ProjectionAlgos.h"
|
||||
|
||||
|
||||
using namespace Drawing;
|
||||
|
||||
|
||||
PROPERTY_SOURCE(Drawing::FeatureProjection, Part::Feature)
|
||||
|
||||
|
||||
FeatureProjection::FeatureProjection()
|
||||
{
|
||||
static const char *group = "Projection";
|
||||
ADD_PROPERTY_TYPE(Source ,(nullptr),group,App::Prop_None,"Shape to project");
|
||||
ADD_PROPERTY_TYPE(Direction ,(Base::Vector3d(0,0,1)),group,App::Prop_None,"Projection direction");
|
||||
ADD_PROPERTY_TYPE(Direction, (Base::Vector3d(0, 0, 1)), group, App::Prop_None,
|
||||
"Projection direction");
|
||||
ADD_PROPERTY_TYPE(VCompound ,(true),group,App::Prop_None,"Projection parameter");
|
||||
ADD_PROPERTY_TYPE(Rg1LineVCompound ,(true),group,App::Prop_None,"Projection parameter");
|
||||
ADD_PROPERTY_TYPE(RgNLineVCompound ,(true),group,App::Prop_None,"Projection parameter");
|
||||
|
||||
@@ -20,22 +20,18 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef DRAWING_FEATUREPROJECTION
|
||||
#define DRAWING_FEATUREPROJECTION
|
||||
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyGeo.h>
|
||||
#include <Mod/Part/App/PartFeature.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include <Mod/Drawing/DrawingGlobal.h>
|
||||
#include <Mod/Part/App/PartFeature.h>
|
||||
|
||||
|
||||
namespace Drawing
|
||||
{
|
||||
|
||||
|
||||
/** Base class of all View Features in the drawing module
|
||||
*/
|
||||
class DrawingExport FeatureProjection : public Part::Feature
|
||||
|
||||
@@ -20,24 +20,18 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <sstream>
|
||||
# include <Standard_Failure.hxx>
|
||||
#endif
|
||||
|
||||
|
||||
#include <Base/Writer.h>
|
||||
#include <Base/Reader.h>
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/FileInfo.h>
|
||||
|
||||
#include "FeatureView.h"
|
||||
|
||||
using namespace Drawing;
|
||||
|
||||
using namespace Drawing;
|
||||
|
||||
//===========================================================================
|
||||
// FeatureView
|
||||
@@ -46,21 +40,25 @@ using namespace Drawing;
|
||||
PROPERTY_SOURCE(Drawing::FeatureView, App::DocumentObject)
|
||||
|
||||
|
||||
|
||||
FeatureView::FeatureView(void)
|
||||
{
|
||||
static const char *group = "Drawing view";
|
||||
ADD_PROPERTY_TYPE(X ,(0),group,App::Prop_None,"X position of the view on the drawing in modelling units (mm)");
|
||||
ADD_PROPERTY_TYPE(Y ,(0),group,App::Prop_None,"Y position of the view on the drawing in modelling units (mm)");
|
||||
ADD_PROPERTY_TYPE(Scale ,(1.0),group,App::Prop_None,"Scale factor of the view");
|
||||
ADD_PROPERTY_TYPE(Rotation ,(0),group,App::Prop_None,"Rotation of the view in degrees counterclockwise");
|
||||
static const char* group = "Drawing view";
|
||||
ADD_PROPERTY_TYPE(X, (0), group, App::Prop_None,
|
||||
"X position of the view on the drawing in modelling units (mm)");
|
||||
ADD_PROPERTY_TYPE(Y, (0), group, App::Prop_None,
|
||||
"Y position of the view on the drawing in modelling units (mm)");
|
||||
ADD_PROPERTY_TYPE(Scale, (1.0), group, App::Prop_None, "Scale factor of the view");
|
||||
ADD_PROPERTY_TYPE(Rotation, (0), group, App::Prop_None,
|
||||
"Rotation of the view in degrees counterclockwise");
|
||||
// The 'Visible' property is handled by the view provider exclusively. It has the 'Output' flag set to
|
||||
// avoid to call the execute() method. The view provider touches the page object, instead.
|
||||
App::PropertyType propType = static_cast<App::PropertyType>(App::Prop_Hidden|App::Prop_Output);
|
||||
ADD_PROPERTY_TYPE(Visible, (true),group,propType,"Control whether view is visible in page object");
|
||||
App::PropertyType propType =
|
||||
static_cast<App::PropertyType>(App::Prop_Hidden | App::Prop_Output);
|
||||
ADD_PROPERTY_TYPE(Visible, (true), group, propType,
|
||||
"Control whether view is visible in page object");
|
||||
|
||||
App::PropertyType type = (App::PropertyType)(App::Prop_Hidden);
|
||||
ADD_PROPERTY_TYPE(ViewResult ,(nullptr),group,type,"Resulting SVG fragment of that view");
|
||||
ADD_PROPERTY_TYPE(ViewResult, (nullptr), group, type, "Resulting SVG fragment of that view");
|
||||
}
|
||||
|
||||
FeatureView::~FeatureView()
|
||||
@@ -73,7 +71,8 @@ App::DocumentObjectExecReturn *FeatureView::recompute(void)
|
||||
return App::DocumentObject::recompute();
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
App::DocumentObjectExecReturn* ret = new App::DocumentObjectExecReturn(e.GetMessageString());
|
||||
App::DocumentObjectExecReturn* ret =
|
||||
new App::DocumentObjectExecReturn(e.GetMessageString());
|
||||
if (ret->Why.empty()) ret->Why = "Unknown OCC exception";
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -20,24 +20,18 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _FeatureView_h_
|
||||
#define _FeatureView_h_
|
||||
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyGeo.h>
|
||||
#include <App/FeaturePython.h>
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <Mod/Drawing/DrawingGlobal.h>
|
||||
|
||||
|
||||
namespace Drawing
|
||||
{
|
||||
|
||||
|
||||
/** Base class of all View Features in the drawing module
|
||||
*/
|
||||
class DrawingExport FeatureView : public App::DocumentObject
|
||||
|
||||
@@ -20,24 +20,18 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <iomanip>
|
||||
# include <sstream>
|
||||
#endif
|
||||
|
||||
#include <iomanip>
|
||||
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/FileInfo.h>
|
||||
|
||||
#include "FeatureViewAnnotation.h"
|
||||
|
||||
|
||||
using namespace Drawing;
|
||||
using namespace std;
|
||||
|
||||
|
||||
//===========================================================================
|
||||
// FeatureViewAnnotation
|
||||
//===========================================================================
|
||||
@@ -51,7 +45,8 @@ FeatureViewAnnotation::FeatureViewAnnotation(void)
|
||||
|
||||
ADD_PROPERTY_TYPE(Text ,(""),vgroup,App::Prop_None,"The text to be displayed");
|
||||
ADD_PROPERTY_TYPE(Font ,("Sans"),vgroup,App::Prop_None,"The name of the font to use");
|
||||
ADD_PROPERTY_TYPE(TextColor,(0.0f,0.0f,0.0f),vgroup,App::Prop_None,"The color of the text");
|
||||
ADD_PROPERTY_TYPE(TextColor, (0.0f, 0.0f, 0.0f), vgroup, App::Prop_None,
|
||||
"The color of the text");
|
||||
}
|
||||
|
||||
FeatureViewAnnotation::~FeatureViewAnnotation()
|
||||
@@ -60,7 +55,7 @@ FeatureViewAnnotation::~FeatureViewAnnotation()
|
||||
|
||||
App::DocumentObjectExecReturn *FeatureViewAnnotation::execute(void)
|
||||
{
|
||||
std::stringstream result,hr,hg,hb;
|
||||
stringstream result,hr,hg,hb;
|
||||
const App::Color& c = TextColor.getValue();
|
||||
hr << hex << setfill('0') << setw(2) << (int)(255.0*c.r);
|
||||
hg << hex << setfill('0') << setw(2) << (int)(255.0*c.g);
|
||||
@@ -74,7 +69,7 @@ App::DocumentObjectExecReturn *FeatureViewAnnotation::execute(void)
|
||||
<< " fill=\"#" << hr.str() << hg.str() << hb.str() << "\">" << endl;
|
||||
|
||||
int index=0;
|
||||
for (std::vector<std::string>::const_iterator it = Text.getValues().begin(); it != Text.getValues().end(); ++it) {
|
||||
for (vector<string>::const_iterator it = Text.getValues().begin(); it != Text.getValues().end(); ++it) {
|
||||
result << "<tspan x=\"0\" dy=\"1em\">" << it->c_str() << "</tspan>" << endl;
|
||||
index++;
|
||||
}
|
||||
|
||||
@@ -20,23 +20,19 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _FeatureViewAnnotation_h_
|
||||
#define _FeatureViewAnnotation_h_
|
||||
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include "FeatureView.h"
|
||||
#include <App/FeaturePython.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
|
||||
#include "FeatureView.h"
|
||||
|
||||
|
||||
namespace Drawing
|
||||
{
|
||||
|
||||
|
||||
/** Base class of all View Features in the drawing module
|
||||
*/
|
||||
class DrawingExport FeatureViewAnnotation : public FeatureView
|
||||
|
||||
@@ -20,56 +20,26 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <sstream>
|
||||
# include <TopoDS_Shape.hxx>
|
||||
#endif
|
||||
|
||||
|
||||
#include <HLRBRep_Algo.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <HLRTopoBRep_OutLiner.hxx>
|
||||
//#include <BRepAPI_MakeOutLine.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 <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 <Base/Exception.h>
|
||||
#include <Base/FileInfo.h>
|
||||
#include <Mod/Part/App/PartFeature.h>
|
||||
|
||||
#include "FeatureViewPart.h"
|
||||
#include "ProjectionAlgos.h"
|
||||
|
||||
|
||||
using namespace Drawing;
|
||||
using namespace std;
|
||||
|
||||
|
||||
//===========================================================================
|
||||
// FeatureViewPart
|
||||
//===========================================================================
|
||||
|
||||
App::PropertyFloatConstraint::Constraints FeatureViewPart::floatRange = {0.01,5.0,0.05};
|
||||
App::PropertyFloatConstraint::Constraints FeatureViewPart::floatRange = {0.01, 5.0, 0.05};
|
||||
|
||||
PROPERTY_SOURCE(Drawing::FeatureViewPart, Drawing::FeatureView)
|
||||
|
||||
|
||||
@@ -20,23 +20,19 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _FeatureViewPart_h_
|
||||
#define _FeatureViewPart_h_
|
||||
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include "FeatureView.h"
|
||||
#include <App/FeaturePython.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
|
||||
#include "FeatureView.h"
|
||||
|
||||
|
||||
namespace Drawing
|
||||
{
|
||||
|
||||
|
||||
/** Base class of all View Features in the drawing module
|
||||
*/
|
||||
class DrawingExport FeatureViewPart : public FeatureView
|
||||
|
||||
@@ -20,25 +20,21 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <iomanip>
|
||||
# include <sstream>
|
||||
#endif
|
||||
|
||||
#include <iomanip>
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/FileInfo.h>
|
||||
#include <App/Property.h>
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyUnits.h>
|
||||
#include "FeatureViewSpreadsheet.h"
|
||||
#include <Base/Exception.h>
|
||||
#include <Mod/Spreadsheet/App/Cell.h>
|
||||
#include <Mod/Spreadsheet/App/Sheet.h>
|
||||
|
||||
#include "FeatureViewSpreadsheet.h"
|
||||
|
||||
|
||||
using namespace Drawing;
|
||||
using namespace std;
|
||||
|
||||
//===========================================================================
|
||||
// FeatureViewSpreadsheet
|
||||
@@ -98,35 +94,38 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void)
|
||||
std::vector<std::string> columns;
|
||||
std::vector<int> rows;
|
||||
try {
|
||||
for (unsigned int i=0; i<scellstart.length(); ++i) {
|
||||
for (unsigned int i = 0; i < scellstart.length(); ++i) {
|
||||
if (isdigit(scellstart[i])) {
|
||||
columns.push_back(scellstart.substr(0,i));
|
||||
rows.push_back(std::atoi(scellstart.substr(i,scellstart.length()-1).c_str()));
|
||||
columns.push_back(scellstart.substr(0, i));
|
||||
rows.push_back(std::atoi(scellstart.substr(i, scellstart.length() - 1).c_str()));
|
||||
}
|
||||
}
|
||||
for (unsigned int i=0; i<scellend.length(); ++i) {
|
||||
for (unsigned int i = 0; i < scellend.length(); ++i) {
|
||||
if (isdigit(scellend[i])) {
|
||||
std::string startcol = columns.back();
|
||||
std::string endcol = scellend.substr(0,i);
|
||||
std::string endcol = scellend.substr(0, i);
|
||||
bool valid = false;
|
||||
for (std::vector<std::string>::const_iterator j = availcolumns.begin(); j != availcolumns.end(); ++j) {
|
||||
if ( (*j) == startcol) {
|
||||
if ( (*j) != endcol) {
|
||||
for (std::vector<std::string>::const_iterator j = availcolumns.begin();
|
||||
j != availcolumns.end(); ++j) {
|
||||
if ((*j) == startcol) {
|
||||
if ((*j) != endcol) {
|
||||
valid = true;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (valid) {
|
||||
if ( (*j) == endcol) {
|
||||
if ((*j) == endcol) {
|
||||
columns.push_back((*j));
|
||||
valid = false;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
columns.push_back((*j));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
int endrow = std::atoi(scellend.substr(i,scellend.length()-1).c_str());
|
||||
for (int j=rows.back()+1; j<=endrow; ++j) {
|
||||
int endrow = std::atoi(scellend.substr(i, scellend.length() - 1).c_str());
|
||||
for (int j = rows.back() + 1; j <= endrow; ++j) {
|
||||
rows.push_back(j);
|
||||
}
|
||||
}
|
||||
@@ -139,12 +138,13 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void)
|
||||
std::string ViewName = Label.getValue();
|
||||
std::stringstream result,hr,hg,hb;
|
||||
const App::Color& c = Color.getValue();
|
||||
hr << hex << setfill('0') << setw(2) << (int)(255.0*c.r);
|
||||
hg << hex << setfill('0') << setw(2) << (int)(255.0*c.g);
|
||||
hb << hex << setfill('0') << setw(2) << (int)(255.0*c.b);
|
||||
result << "<g id=\"" << ViewName << "\" transform=\"translate(" << X.getValue() << "," << Y.getValue() << ")"
|
||||
<< " rotate(" << Rotation.getValue() << ")"
|
||||
<< " scale(" << Scale.getValue() << ")\">" << endl;
|
||||
hr << std::hex << std::setfill('0') << std::setw(2) << (int)(255.0 * c.r);
|
||||
hg << std::hex << std::setfill('0') << std::setw(2) << (int)(255.0 * c.g);
|
||||
hb << std::hex << std::setfill('0') << std::setw(2) << (int)(255.0 * c.b);
|
||||
result << "<g id=\"" << ViewName << "\" transform=\"translate(" << X.getValue() << ","
|
||||
<< Y.getValue() << ")"
|
||||
<< " rotate(" << Rotation.getValue() << ")"
|
||||
<< " scale(" << Scale.getValue() << ")\">" << std::endl;
|
||||
|
||||
// fill the cells
|
||||
float rowoffset = 0.0;
|
||||
@@ -154,9 +154,10 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void)
|
||||
std::string celltext;
|
||||
Spreadsheet::Sheet* sheet = static_cast<Spreadsheet::Sheet*>(link);
|
||||
std::vector<std::string> skiplist;
|
||||
for (std::vector<std::string>::const_iterator col = columns.begin(); col != columns.end(); ++col) {
|
||||
for (std::vector<std::string>::const_iterator col = columns.begin(); col != columns.end();
|
||||
++col) {
|
||||
// create a group for each column
|
||||
result << " <g id=\"" << ViewName << "_col" << (*col) << "\">" << endl;
|
||||
result << " <g id=\"" << ViewName << "_col" << (*col) << "\">" << std::endl;
|
||||
for (std::vector<int>::const_iterator row = rows.begin(); row != rows.end(); ++row) {
|
||||
// get cell size
|
||||
std::stringstream srow;
|
||||
@@ -186,26 +187,26 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void)
|
||||
std::string textstyle = "";
|
||||
Spreadsheet::Cell* cell = sheet->getCell(address);
|
||||
if (cell) {
|
||||
App::Color f,b;
|
||||
App::Color f, b;
|
||||
std::set<std::string> st;
|
||||
int colspan, rowspan;
|
||||
if (cell->getBackground(b)) {
|
||||
std::stringstream br,bg,bb;
|
||||
br << hex << setfill('0') << setw(2) << (int)(255.0*b.r);
|
||||
bg << hex << setfill('0') << setw(2) << (int)(255.0*b.g);
|
||||
bb << hex << setfill('0') << setw(2) << (int)(255.0*b.b);
|
||||
std::stringstream br, bg, bb;
|
||||
br << std::hex << std::setfill('0') << std::setw(2) << (int)(255.0 * b.r);
|
||||
bg << std::hex << std::setfill('0') << std::setw(2) << (int)(255.0 * b.g);
|
||||
bb << std::hex << std::setfill('0') << std::setw(2) << (int)(255.0 * b.b);
|
||||
bcolor = "#" + br.str() + bg.str() + bb.str();
|
||||
}
|
||||
if (cell->getForeground(f)) {
|
||||
std::stringstream fr,fg,fb;
|
||||
fr << hex << setfill('0') << setw(2) << (int)(255.0*f.r);
|
||||
fg << hex << setfill('0') << setw(2) << (int)(255.0*f.g);
|
||||
fb << hex << setfill('0') << setw(2) << (int)(255.0*f.b);
|
||||
std::stringstream fr, fg, fb;
|
||||
fr << std::hex << std::setfill('0') << std::setw(2) << (int)(255.0 * f.r);
|
||||
fg << std::hex << std::setfill('0') << std::setw(2) << (int)(255.0 * f.g);
|
||||
fb << std::hex << std::setfill('0') << std::setw(2) << (int)(255.0 * f.b);
|
||||
fcolor = "#" + fr.str() + fg.str() + fb.str();
|
||||
}
|
||||
if (cell->getStyle(st)) {
|
||||
for (std::set<std::string>::const_iterator i = st.begin(); i != st.end(); ++i) {
|
||||
if ((*i) == "bold")
|
||||
if ((*i) == "bold")
|
||||
textstyle = textstyle + "font-weight: bold; ";
|
||||
else if ((*i) == "italic")
|
||||
textstyle = textstyle + "font-style: italic; ";
|
||||
@@ -213,15 +214,15 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void)
|
||||
textstyle = textstyle + "text-decoration: underline; ";
|
||||
}
|
||||
}
|
||||
if (cell->getSpans(rowspan,colspan)) {
|
||||
for (int i=0; i<colspan; ++i) {
|
||||
for (int j=0; j<rowspan; ++j) {
|
||||
App::CellAddress nextcell(address.row()+j,address.col()+i);
|
||||
if (cell->getSpans(rowspan, colspan)) {
|
||||
for (int i = 0; i < colspan; ++i) {
|
||||
for (int j = 0; j < rowspan; ++j) {
|
||||
App::CellAddress nextcell(address.row() + j, address.col() + i);
|
||||
if (i > 0)
|
||||
cellwidth = cellwidth + sheet->getColumnWidth(nextcell.col());
|
||||
if (j > 0)
|
||||
cellheight = cellheight + sheet->getRowHeight(nextcell.row());
|
||||
if ( (i > 0) || (j > 0) )
|
||||
if ((i > 0) || (j > 0))
|
||||
skiplist.push_back(nextcell.toString());
|
||||
}
|
||||
}
|
||||
@@ -230,27 +231,35 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void)
|
||||
}
|
||||
// skip cell if found in skiplist
|
||||
if (std::find(skiplist.begin(), skiplist.end(), address.toString()) == skiplist.end()) {
|
||||
result << " <rect x=\"" << coloffset << "\" y=\"" << rowoffset << "\" width=\"" << cellwidth
|
||||
<< "\" height=\"" << cellheight << "\" style=\"fill:" << bcolor << ";stroke-width:"
|
||||
<< LineWidth.getValue()/Scale.getValue() << ";stroke:#" << hr.str() << hg.str() << hb.str() << ";\" />" << endl;
|
||||
result << " <rect x=\"" << coloffset << "\" y=\"" << rowoffset << "\" width=\""
|
||||
<< cellwidth << "\" height=\"" << cellheight << "\" style=\"fill:" << bcolor
|
||||
<< ";stroke-width:" << LineWidth.getValue() / Scale.getValue() << ";stroke:#"
|
||||
<< hr.str() << hg.str() << hb.str() << ";\" />" << std::endl;
|
||||
if (alignment & Spreadsheet::Cell::ALIGNMENT_LEFT)
|
||||
result << " <text style=\"" << textstyle << "\" x=\"" << coloffset + FontSize.getValue()/2 << "\" y=\"" << rowoffset + 0.75 * cellheight << "\" font-family=\"" ;
|
||||
result << " <text style=\"" << textstyle << "\" x=\""
|
||||
<< coloffset + FontSize.getValue() / 2 << "\" y=\""
|
||||
<< rowoffset + 0.75 * cellheight << "\" font-family=\"";
|
||||
if (alignment & Spreadsheet::Cell::ALIGNMENT_HCENTER)
|
||||
result << " <text text-anchor=\"middle\" style=\"" << textstyle << "\" x=\"" << coloffset + cellwidth/2 << "\" y=\"" << rowoffset + 0.75 * cellheight << "\" font-family=\"" ;
|
||||
result << " <text text-anchor=\"middle\" style=\"" << textstyle << "\" x=\""
|
||||
<< coloffset + cellwidth / 2 << "\" y=\""
|
||||
<< rowoffset + 0.75 * cellheight << "\" font-family=\"";
|
||||
if (alignment & Spreadsheet::Cell::ALIGNMENT_RIGHT)
|
||||
result << " <text text-anchor=\"end\" style=\"" << textstyle << "\" x=\"" << coloffset + (cellwidth - FontSize.getValue()/2) << "\" y=\"" << rowoffset + 0.75 * cellheight << "\" font-family=\"" ;
|
||||
result << Font.getValue() << "\"" << " font-size=\"" << FontSize.getValue() << "\""
|
||||
<< " fill=\"" << fcolor << "\">" << celltext << "</text>" << endl;
|
||||
result << " <text text-anchor=\"end\" style=\"" << textstyle << "\" x=\""
|
||||
<< coloffset + (cellwidth - FontSize.getValue() / 2) << "\" y=\""
|
||||
<< rowoffset + 0.75 * cellheight << "\" font-family=\"";
|
||||
result << Font.getValue() << "\""
|
||||
<< " font-size=\"" << FontSize.getValue() << "\""
|
||||
<< " fill=\"" << fcolor << "\">" << celltext << "</text>" << std::endl;
|
||||
}
|
||||
rowoffset = rowoffset + cellheight;
|
||||
}
|
||||
result << " </g>" << endl;
|
||||
result << " </g>" << std::endl;
|
||||
rowoffset = 0.0;
|
||||
coloffset = coloffset + cellwidth;
|
||||
}
|
||||
|
||||
// close the containing group
|
||||
result << "</g>" << endl;
|
||||
result << "</g>" << std::endl;
|
||||
|
||||
// Apply the resulting fragment
|
||||
ViewResult.setValue(result.str().c_str());
|
||||
|
||||
@@ -20,15 +20,15 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef _FeatureViewSpreadsheet_h_
|
||||
#define _FeatureViewSpreadsheet_h_
|
||||
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
|
||||
#include "FeatureView.h"
|
||||
|
||||
|
||||
namespace Drawing
|
||||
{
|
||||
|
||||
|
||||
@@ -20,26 +20,21 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <iomanip>
|
||||
# include <iterator>
|
||||
# include <sstream>
|
||||
|
||||
# include <boost/regex.hpp>
|
||||
#endif
|
||||
|
||||
#include <iomanip>
|
||||
#include <iterator>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/FileInfo.h>
|
||||
|
||||
#include "FeatureViewSymbol.h"
|
||||
|
||||
|
||||
using namespace Drawing;
|
||||
using namespace std;
|
||||
|
||||
|
||||
//===========================================================================
|
||||
// FeatureViewSymbol
|
||||
//===========================================================================
|
||||
|
||||
@@ -20,23 +20,19 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _FeatureViewSymbol_h_
|
||||
#define _FeatureViewSymbol_h_
|
||||
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include "FeatureView.h"
|
||||
#include <App/FeaturePython.h>
|
||||
#include <App/PropertyStandard.h>
|
||||
|
||||
#include "FeatureView.h"
|
||||
|
||||
|
||||
namespace Drawing
|
||||
{
|
||||
|
||||
|
||||
/** Base class of all View Features in the drawing module
|
||||
*/
|
||||
class DrawingExport FeatureViewSymbol : public FeatureView
|
||||
|
||||
@@ -20,17 +20,15 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <sstream>
|
||||
#endif
|
||||
|
||||
#include "PageGroup.h"
|
||||
|
||||
using namespace Drawing;
|
||||
|
||||
using namespace Drawing;
|
||||
|
||||
//===========================================================================
|
||||
// PageGroup
|
||||
|
||||
@@ -20,15 +20,10 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _PageGroup_h_
|
||||
#define _PageGroup_h_
|
||||
|
||||
|
||||
#include <App/DocumentObjectGroup.h>
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include <Mod/Drawing/DrawingGlobal.h>
|
||||
|
||||
@@ -36,7 +31,6 @@
|
||||
namespace Drawing
|
||||
{
|
||||
|
||||
|
||||
/** Base class of all View Features in the drawing module
|
||||
*/
|
||||
class DrawingExport PageGroup : public App::DocumentObjectGroup
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef DRAWING_PRECOMPILED_H
|
||||
#define DRAWING_PRECOMPILED_H
|
||||
|
||||
@@ -29,188 +28,50 @@
|
||||
#ifdef _PreComp_
|
||||
|
||||
// standard
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <iterator>
|
||||
#include <sstream>
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <bitset>
|
||||
|
||||
// boost
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
// OpenCasCade =====================================================================================
|
||||
// Base
|
||||
#include <Standard_Version.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
#include <Standard_GUID.hxx>
|
||||
#include <Standard_AbortiveTransaction.hxx>
|
||||
#include <Standard_Address.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Byte.hxx>
|
||||
#include <Standard_Character.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
#include <Standard_DimensionError.hxx>
|
||||
#include <Standard_DimensionMismatch.hxx>
|
||||
#include <Standard_DivideByZero.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_ExtCharacter.hxx>
|
||||
#include <Standard_ExtString.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
#include <Standard_GUID.hxx>
|
||||
#include <Standard_ImmutableObject.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_InternalType.hxx>
|
||||
#include <Standard_IStream.hxx>
|
||||
#include <Standard_KindOfType.hxx>
|
||||
#include <Standard_LicenseError.hxx>
|
||||
#include <Standard_LicenseNotFound.hxx>
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <Standard_math.hxx>
|
||||
#include <Standard_MultiplyDefined.hxx>
|
||||
#include <Standard_NegativeValue.hxx>
|
||||
#include <Standard_NoMoreObject.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Standard_NullObject.hxx>
|
||||
#include <Standard_NullValue.hxx>
|
||||
#include <Standard_NumericError.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
#include <Standard_OutOfMemory.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_Overflow.hxx>
|
||||
#include <Standard_Persistent.hxx>
|
||||
#include <Standard_Persistent_proto.hxx>
|
||||
#include <Standard_PrimitiveTypes.hxx>
|
||||
#include <Standard_ProgramError.hxx>
|
||||
#include <Standard_RangeError.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_ShortReal.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Standard_Storable.hxx>
|
||||
#include <Standard_Stream.hxx>
|
||||
#include <Standard_TooManyUsers.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Transient_proto.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_TypeDef.hxx>
|
||||
#include <Standard_TypeMismatch.hxx>
|
||||
#include <Standard_Underflow.hxx>
|
||||
#include <Standard_UUID.hxx>
|
||||
#include <Standard_WayOfLife.hxx>
|
||||
#if OCC_VERSION_HEX < 0x060700
|
||||
#include <Standard_ctype.hxx>
|
||||
#include <Standard_OId.hxx>
|
||||
#endif
|
||||
|
||||
|
||||
#include <TCollection_ExtendedString.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TColStd_SequenceOfExtendedString.hxx>
|
||||
|
||||
// OpenCasCade
|
||||
#include <Approx_Curve3d.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepBuilderAPI.hxx>
|
||||
#include <BRepBuilderAPI_MakeEdge.hxx>
|
||||
#include <BRepBuilderAPI_MakePolygon.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <BRepTools_ShapeSet.hxx>
|
||||
#include <BRepBuilderAPI_Copy.hxx>
|
||||
#include <BRepCheck_Analyzer.hxx>
|
||||
#include <BRepCheck_Result.hxx>
|
||||
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
|
||||
|
||||
#include <BRepTools.hxx>
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
#include <GCE2d_MakeSegment.hxx>
|
||||
#include <GCPnts_TangentialDeflection.hxx>
|
||||
#include <Geom_Axis2Placement.hxx>
|
||||
#include <Geom_CartesianPoint.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <BRepLProp_CLProps.hxx>
|
||||
#include <BRepMesh_IncrementalMesh.hxx>
|
||||
#include <BRepLib.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Geom_ConicalSurface.hxx>
|
||||
#include <Geom_CylindricalSurface.hxx>
|
||||
#include <Geom_Ellipse.hxx>
|
||||
#include <Geom_Hyperbola.hxx>
|
||||
#include <Geom_SphericalSurface.hxx>
|
||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <Geom_SurfaceOfRevolution.hxx>
|
||||
#include <Geom_Parabola.hxx>
|
||||
#include <Geom_Plane.hxx>
|
||||
#include <Geom_ToroidalSurface.hxx>
|
||||
#include <GeomTools_Curve2dSet.hxx>
|
||||
#include <gp_Ax2d.hxx>
|
||||
#include <GeomConvert_BSplineCurveKnotSplitting.hxx>
|
||||
#include <GeomConvert_BSplineCurveToBezierCurve.hxx>
|
||||
#include <gp_Ax2.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <gp_Circ2d.hxx>
|
||||
#include <gp_Cone.hxx>
|
||||
#include <gp_Cylinder.hxx>
|
||||
#include <gp_Dir2d.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Elips.hxx>
|
||||
#include <gp_Hypr.hxx>
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <gp_Parab.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
#include <gp_Sphere.hxx>
|
||||
#include <gp_Torus.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Quantity_NameOfColor.hxx>
|
||||
#include <Quantity_PhysicalQuantity.hxx>
|
||||
#include <Quantity_TypeOfColor.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_IStream.hxx>
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColgp_HArray1OfPnt2d.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
#include <TColStd_MapIteratorOfMapOfTransient.hxx>
|
||||
#include <TColStd_MapOfTransient.hxx>
|
||||
#include <HLRBRep_Algo.hxx>
|
||||
#include <HLRBRep_HLRToShape.hxx>
|
||||
#include <HLRAlgo_Projector.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_Compound.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Solid.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopTools_HSequenceOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <UnitsAPI.hxx>
|
||||
#include <BRepPrimAPI_MakeBox.hxx>
|
||||
#include <BRepPrimAPI_MakeCylinder.hxx>
|
||||
#if OCC_VERSION_HEX < 0x070600
|
||||
# include <BRepAdaptor_HCurve.hxx>
|
||||
#endif
|
||||
|
||||
#endif // _PreComp_
|
||||
#endif
|
||||
|
||||
|
||||
@@ -20,62 +20,29 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#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 <gp_Ax2.hxx>
|
||||
# include <gp_Dir.hxx>
|
||||
# include <gp_Pnt.hxx>
|
||||
# include <HLRBRep_Algo.hxx>
|
||||
# include <HLRBRep_HLRToShape.hxx>
|
||||
# include <HLRAlgo_Projector.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 "DrawingExport.h"
|
||||
|
||||
|
||||
using namespace Drawing;
|
||||
using namespace std;
|
||||
|
||||
@@ -84,7 +51,6 @@ using namespace std;
|
||||
//===========================================================================
|
||||
|
||||
|
||||
|
||||
ProjectionAlgos::ProjectionAlgos(const TopoDS_Shape &Input, const Base::Vector3d &Dir)
|
||||
: Input(Input), Direction(Dir)
|
||||
{
|
||||
|
||||
@@ -20,14 +20,15 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef _ProjectionAlgos_h_
|
||||
#define _ProjectionAlgos_h_
|
||||
|
||||
#include <Mod/Drawing/DrawingGlobal.h>
|
||||
#include <Base/Vector3D.h>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <string>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
#include <Base/Vector3D.h>
|
||||
#include <Mod/Drawing/DrawingGlobal.h>
|
||||
|
||||
|
||||
class BRepAdaptor_Curve;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user