diff --git a/src/Mod/Drawing/App/FeatureViewPart.cpp b/src/Mod/Drawing/App/FeatureViewPart.cpp index 3d09db914..f4f755338 100644 --- a/src/Mod/Drawing/App/FeatureViewPart.cpp +++ b/src/Mod/Drawing/App/FeatureViewPart.cpp @@ -76,11 +76,13 @@ PROPERTY_SOURCE(Drawing::FeatureViewPart, Drawing::FeatureView) FeatureViewPart::FeatureViewPart(void) { static const char *group = "Shape view"; + static const char *vgroup = "Drawing view"; ADD_PROPERTY_TYPE(Direction ,(0,0,1.0),group,App::Prop_None,"Projection direction"); ADD_PROPERTY_TYPE(Source ,(0),group,App::Prop_None,"Shape to view"); ADD_PROPERTY_TYPE(ShowHiddenLines ,(false),group,App::Prop_None,"Control the appearance of the dashed hidden lines"); ADD_PROPERTY_TYPE(ShowSmoothLines ,(false),group,App::Prop_None,"Control the appearance of the smooth lines"); + ADD_PROPERTY_TYPE(LineWidth,(0.35),vgroup,App::Prop_None,"The thickness of the resulting lines"); } FeatureViewPart::~FeatureViewPart() @@ -196,7 +198,7 @@ App::DocumentObjectExecReturn *FeatureViewPart::execute(void) ProjectionAlgos::SvgExtractionType type = ProjectionAlgos::Plain; if (hidden) type = (ProjectionAlgos::SvgExtractionType)(type|ProjectionAlgos::WithHidden); if (smooth) type = (ProjectionAlgos::SvgExtractionType)(type|ProjectionAlgos::WithSmooth); - result << Alg.getSVG(type, this->Scale.getValue()); + result << Alg.getSVG(type, this->LineWidth.getValue() / this->Scale.getValue()); result << "" << endl; diff --git a/src/Mod/Drawing/App/FeatureViewPart.h b/src/Mod/Drawing/App/FeatureViewPart.h index 466cad207..68ad3551f 100644 --- a/src/Mod/Drawing/App/FeatureViewPart.h +++ b/src/Mod/Drawing/App/FeatureViewPart.h @@ -52,6 +52,7 @@ public: App::PropertyVector Direction; App::PropertyBool ShowHiddenLines; App::PropertyBool ShowSmoothLines; + App::PropertyFloat LineWidth; /** @name methods overide Feature */ diff --git a/src/Mod/Drawing/App/ProjectionAlgos.cpp b/src/Mod/Drawing/App/ProjectionAlgos.cpp index cb82c3e8e..77a2191f0 100644 --- a/src/Mod/Drawing/App/ProjectionAlgos.cpp +++ b/src/Mod/Drawing/App/ProjectionAlgos.cpp @@ -153,8 +153,10 @@ std::string ProjectionAlgos::getSVG(SvgExtractionType type, float scale) { std::stringstream result; SVGOutput output; + float hfactor = 0.15f / 0.35f; + if (!H.IsNull() && (type & WithHidden)) { - float width = 0.15f/scale; + float width = hfactor * scale; BRepMesh::Mesh(H,0.1); result << "" << endl << output.exportEdges(H) << "" << endl; } if (!HO.IsNull() && (type & WithHidden)) { - float width = 0.15f/scale; + float width = hfactor * scale; BRepMesh::Mesh(HO,0.1); result << "" << endl << output.exportEdges(HO) << "" << endl; } if (!VO.IsNull()) { - float width = 0.35f/scale; + float width = scale; BRepMesh::Mesh(VO,0.1); result << "" << endl; } if (!V.IsNull()) { - float width = 0.35f/scale; + float width = scale; BRepMesh::Mesh(V,0.1); result << "" << endl; } if (!V1.IsNull() && (type & WithSmooth)) { - float width = 0.35f/scale; + float width = scale; BRepMesh::Mesh(V1,0.1); result << "" << endl; } if (!H1.IsNull() && (type & WithSmooth) && (type & WithHidden)) { - float width = 0.15f/scale; + float width = hfactor * scale; BRepMesh::Mesh(H1,0.1); result << "" << endl << output.exportEdges(H1)