From 6ac399e5aaab8ef856b30db9cce0a0b9831acbea Mon Sep 17 00:00:00 2001 From: WandererFan Date: Mon, 19 Jun 2017 14:12:57 -0400 Subject: [PATCH] Handle "floating" straight edges in Svg BRep_Tool::Polygon3D assumes the edge has polygon representation - ie already been "tesselated". this is not true for all edges, especially "floating edges". --- src/Mod/Drawing/App/DrawingExport.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Mod/Drawing/App/DrawingExport.cpp b/src/Mod/Drawing/App/DrawingExport.cpp index fed8816aa0..cc3ad8728c 100644 --- a/src/Mod/Drawing/App/DrawingExport.cpp +++ b/src/Mod/Drawing/App/DrawingExport.cpp @@ -434,6 +434,19 @@ void SVGOutput::printGeneric(const BRepAdaptor_Curve& c, int id, std::ostream& o c = 'L'; } out << "\" />" << endl; + } else if (c.GetType() == GeomAbs_Line) { + //BRep_Tool::Polygon3D assumes the edge has polygon representation - ie already been "tesselated" + //this is not true for all edges, especially "floating edges" + double f = c.FirstParameter(); + double l = c.LastParameter(); + gp_Pnt s = c.Value(f); + gp_Pnt e = c.Value(l); + char c = 'M'; + out << "" << endl; } }