The export to SVG is in the same file, however, it actually uses the getSVG.py module. This takes the FreeCAD Shapes and outputs a string with the representation of the SVG object.
This getSVG module is also used by Arch in the Arch SectionPlane, and thus by TechDraw to produce the TechDraw ArchView.
Pull request #3749 tries to improve getSVG by cleaning up the code, separating it into functions, instead of them being inside a huge function. More optimizations could be done, such as writing a single function for a single type of object (dimension, angular dimension, pipe, ..., and general "Shape", the last one).
A new member is very good at SVG, so maybe he can look into our code and tell us what looks okay, and what doesn't so we can investigate.
Current issues
* getSVG produces wrong export of Arch Pipe.
* split the different if-then-else branches of getSVG in separate functions for ease of use.
* importSVG may choke on some badly constructed SVGs; maybe we need to make it more robust.
* Conversion from an imported SVG to Sketch is a good workflow, but it seems it is currently broken through the use of Draft Draft2Sketch. If I remember a previous conversation the problem is that the geometry created during import is composed of BSplines instead of simple straight lines, so it fails calculating some normals.
* Split importSVG into importer and exporter, just like importIFC and exportIFC in Arch.
Threads:
* Inkscape svg file convert to sketcher file
* Regression in Draft To Sketch; this thread explains the issue with the Draft to Sketch conversion. We probably need to rollback some changes that were introduced. Notice that the functions in DraftGeomUtils.py were moved to different modules, so now the problem seems to be in draftgeoutils/geometry.py
* Simple test file of the import error, SVG cannot be converted to a sketch