Jump to content

SVG Toolpath Reader - size? mm?


greens83

Recommended Posts

Posted · SVG Toolpath Reader - size? mm?

Hello,

 

Hoping someone can shed some light on this for me. I have drawn a toolpath in adobe illustrator at the exact size I want it (in mm) 

However when I open the SVG saved from illustrator into Cura it is significantly smaller. 

Does anyone know what Cura/SVG Toolpath Reader identifies as the dimensions/units of the SVG file? It says on GitHub its mm, but it is definitely not coming in as mm. The Illustrator file is definitely drawn in mm. Artboard set too mm. Rulers confirm outer dims are exactly as I want them.

 

Any suggestions or info would be very much appreciated.

  • Link to post
    Share on other sites

    Posted · SVG Toolpath Reader - size? mm?

    Well the error is hopefully EXACTLY 25.4X and if you click on the part and set the scale tool to 2540% and that gets it close then it's probably exactly that.  Also often it is off by EXACTLY 10x.  So try those 2 scales and hopefully that will explain a lot.  If it's too small by 25.4 then illustrator is probably switching to inches at the last second when it saves the file.  If it is off by 10X then illustrator is probably switching to cm at the last second when it saves the file.

    • Like 1
    Link to post
    Share on other sites

    Posted · SVG Toolpath Reader - size? mm?

    Hi, thanks for the reply. I cant manually scale the toolpath in cura. There is no option to do that. The scale looks to be about 20% too small. Weird. All I can do is make it too big to start with but I have no way of knowing by how much!

  • Link to post
    Share on other sites

    Posted · SVG Toolpath Reader - size? mm?

    I can see in the svg file (via notepad) that the viewbox is set to the size of the build plate (223 x 223)

    width="223px" height="223px" viewBox="0 0 223 223"

    So all I can assume is that the svg toolpath reader plugin is somehow reading 223 not as 223mm but as another unit or has some conversion factor? or something I dont understand about svg files is dictating the size.

     @ghostkeeper can you help me out here please?

  • Link to post
    Share on other sites

    Posted · SVG Toolpath Reader - size? mm?

    Ok through trial and error I got it to come in at the right scale. If anyone else runs into this with svg form adobe illustrator here's what I did.  Save as - SVG, tick use artboards. settings here:

    396405671_Screenshot2021-11-0817_04_59.thumb.png.9749ecd6332ca35f42381e879bde8513.png

    No idea which ones made it come in as scaled. It was just trial and error.

     

     

    • Thanks 1
    Link to post
    Share on other sites

    Posted · SVG Toolpath Reader - size? mm?

    Admittedly, it's hard to get right. This is where the scale is determined (in particular the unit_w and unit_h variables, determining how big each unit length of the SVG will be IRL): https://github.com/Ghostkeeper/SVGToolpathReader/blob/b12fc84aad90f2d4a9dac00d1c676b47dda4b0d8/Parser.py#L1352-L1372

     

    In effect, the viewBox property determines how big the image should become, in millimetres. The image width and height determine how it should scale the image to be in that viewbox. It doesn't do any clipping.

     

    Looking at this now, it does seem to be somewhat different than how SVGs are normally rendered on a screen. This may need some fixing, if you can post an example in Github Issues of an SVG that goes wrong: https://github.com/Ghostkeeper/SVGToolpathReader/issues

  • Link to post
    Share on other sites

    Posted (edited) · SVG Toolpath Reader - size? mm?

    Thanks for the response @ghostkeeper

    I tried to attach svg in github issues and here but neither accept the file type. I'm not sure If this problem is limited to Illustrator though. Lots of people complaining about the svg output on Adobe forums.

     

    Its such a useful tool with a lot of potential imo, thank you for making it available. Id love to see it better integrated into Cura though. It would be much more friendly If it could be used and displayed with other imported stl files over the top of the drawn toolpath so you can see how it will line up and dont have to cut and paste gcode. Another file format like dxf would be great too. I'm sure I'm asking for far too much and it would be a lot more complicated to implement than I realise!

    Edited by greens83
  • Link to post
    Share on other sites

    Posted · SVG Toolpath Reader - size? mm?

    I have figured out a better way to do what I wanted the svg toolpath to do and thought Id share.

     

    I drew my toolpath in autocad. I made sure the lines were a nozzle width apart. I then extruded the line into a surface (open polyline so it doesn't become a solid volume). Now I print using the 'surface' mode in cura. I use the per model settings to make this toolpath/extruded surface my first layer and then print whatever I want on top of it. Works perfectly.

    • Thanks 1
    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.8 Stable released 🎉
        In the Cura 5.8 stable release, everyone can now tune their Z seams to look better than ever. Method series users get access to new material profiles, and the base Method model now has a printer profile, meaning the whole Method series is now supported in Cura!
        • 5 replies
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...