SVG Werkzeuge


Tools und Bibliotheken

DXF to SVG, SVG to DXF

DXF and SVG are commonly used file formats to describe vector data for machine production (like laser cutters or waterjet machines). An also commonly occuring problem to solve is a conversion between DXF to SVG or vice versa because a lot of programs use only the one or the other format to perform steps like nesting or line optimization. That makes it harder to work without data loss or errors like offsets, wrong scaling, etc.

DXF to SVG

Tested and working

  1. Use Inkscape with default DXF importer (works with AutoCAD DXF R13) - fails on polylines sometimes
  2. AutodeskInventorLaserExporter (works but is very limited to only basic entities)
  3. DXF/DWG Importer - includes tools like ...
  4. https://github.com/voyager-gold/javascript-dxf-to-svg → works but seems to ignore units/sizes/scalefactors
  5. https://github.com/abey79/vpype + https://github.com/tatarize/vpype-dxf

  6. http://www.calvina.de/pstoedit

    1. We can use winder/svgToDxf or Zigazou/svg2dxf to utilize pstoedit to convert the SVG first into an EPS, and from EPS to DXF finally. This toolchain could be integrated into Export Layers extension of InkScape for Example. We can also re-write Export Layers to integrate the inhouse DXF export extension from inkscape

Tested and failed

  1. https://github.com/mduggan/dxf2svg → did not compile using MSYS2 with GCC and make
  2. https://github.com/mondalaci/dxf2svg2kicad
  3. https://github.com/aegis1980/cad_to_shapely → QCAD has to be used manually because community edition has no command line

SVG to DXF

Possible ways to convert are ...

SVG Thumbnail Previews in Windows Explorer

Ubuntu hat diese Funktions beispielsweise von Haus aus integriert. SVG-Vorschaubilder in Windows werden nur über externe Software generiert. Dafür eignet sich beispielsweise die Erweiterung von tibold:

grafik.png

Alternativen:

SVG Splitting

SVGSplit

SVGsplit dient dazu, „Gruppen“ (<g>-Tags) in svg-Dateien in einzelne svg-Dateien aufzuteilen. Es gibt sie dann auf der Seite aus und lädt sie automatisch herunter, verpackt als Zip-Datei. Dies ist nützlich für die Erstellung von SVG-Symbolen und funktioniert sehr gut mit Adobe Illustrator oder Inkscape. Speichern Sie einfach Ihre Quelldatei als SVG und legen Sie sie in das obige Feld. Alle Ebenennamen werden zu den neuen Dateinamen für die aufgeteilten SVGs.

Slice STL in SVG Ebenen

Slicing mit IceSL

grafik.png

Output:

grafik.png

Beispiel-Import in Inkscape

grafik.png

Slicing mit Blender Laser Slicer Addon

Das folgende Addon zerschneidet ein 3D-Modell in SVG-Objekte: https://github.com/rgsouthall/laser_slicer

SVG Merging

Mehrere SVG in eine SVG verschmelzen

Um zum Beispiel geschnittenen Dateien von IceSL zu einem SVG zusammenzuführen, kann das Tool zum Zusammenführen verwendet werden.

git clone https://github.com/bruno-fs/svg_stack.git

Ein Script zum Benutzen (als merge.cmd speichern)

@echo off
setlocal enabledelayedexpansion enableextensions
dir /b /a-d *_slice_*.svg > 000_files.list
set out=
for /F %%i in (000_files.list) do set out=!out! %%i
python C:\Users\youruser\Desktop\startup_slices_SVG\svg_stack\svg_stack.py %out% > test.svg