From c1a2348e33a3d910c067243d101deb22a3a09d0d Mon Sep 17 00:00:00 2001 From: j-dowsett Date: Fri, 10 Jan 2014 11:31:14 +0000 Subject: [PATCH] Applying tanderson's patch to replace invertY with (1,-1) scaling of SVG itself. Commented out invertY as no longer used. --- src/Mod/Drawing/App/FeatureViewPart.cpp | 2 +- src/Mod/Drawing/App/ProjectionAlgos.cpp | 66 +++++++++++++++---------- src/Mod/Drawing/App/ProjectionAlgos.h | 4 +- 3 files changed, 43 insertions(+), 29 deletions(-) diff --git a/src/Mod/Drawing/App/FeatureViewPart.cpp b/src/Mod/Drawing/App/FeatureViewPart.cpp index c1d7527da..ec100db57 100644 --- a/src/Mod/Drawing/App/FeatureViewPart.cpp +++ b/src/Mod/Drawing/App/FeatureViewPart.cpp @@ -194,7 +194,7 @@ App::DocumentObjectExecReturn *FeatureViewPart::execute(void) bool smooth = ShowSmoothLines.getValue(); try { - ProjectionAlgos Alg(ProjectionAlgos::invertY(shape),Dir); + ProjectionAlgos Alg(shape,Dir); result << "" << endl << output.exportEdges(H) << "" << endl; @@ -169,14 +178,15 @@ std::string ProjectionAlgos::getSVG(ExtractionType type, double scale, double to if (!HO.IsNull() && (type & WithHidden)) { double width = hiddenscale; BRepMesh::Mesh(HO,tolerance); - result << "" << endl << output.exportEdges(HO) << "" << endl; @@ -184,13 +194,14 @@ std::string ProjectionAlgos::getSVG(ExtractionType type, double scale, double to if (!VO.IsNull()) { double width = scale; BRepMesh::Mesh(VO,tolerance); - result << "" << endl << output.exportEdges(VO) << "" << endl; @@ -198,13 +209,14 @@ std::string ProjectionAlgos::getSVG(ExtractionType type, double scale, double to if (!V.IsNull()) { double width = scale; BRepMesh::Mesh(V,tolerance); - result << "" << endl << output.exportEdges(V) << "" << endl; @@ -212,13 +224,14 @@ std::string ProjectionAlgos::getSVG(ExtractionType type, double scale, double to if (!V1.IsNull() && (type & WithSmooth)) { double width = scale; BRepMesh::Mesh(V1,tolerance); - result << "" << endl << output.exportEdges(V1) << "" << endl; @@ -226,14 +239,15 @@ std::string ProjectionAlgos::getSVG(ExtractionType type, double scale, double to if (!H1.IsNull() && (type & WithSmooth) && (type & WithHidden)) { double width = hiddenscale; BRepMesh::Mesh(H1,tolerance); - result << "" << endl << output.exportEdges(H1) << "" << endl; @@ -247,7 +261,7 @@ std::string ProjectionAlgos::getDXF(ExtractionType type, double scale, double to { std::stringstream result; DXFOutput output; - + result << "0" << endl << "SECTION" << endl @@ -257,9 +271,9 @@ std::string ProjectionAlgos::getDXF(ExtractionType type, double scale, double to if (!H.IsNull() && (type & WithHidden)) { //float width = 0.15f/scale; BRepMesh::Mesh(H,tolerance); - result //<< "