Inkscape.org
Creating New Extensions change fill of all sub path automatic
  1. #1
    costycnc costycnc @costycnc

    Hi all! Exist a extension that can transform from ini.svg

    to result.svg  

    So if a path is over another path need to change fill ... alternative black and white.

    I modified potrace algorithm to create gcode for foam cutter ... the gcode created for foam cutter is little complicate ,alghoritm need to compare any point of  unique path with all points of all paths and find path that is closer ,because need have a unique line from begin to end and all cuts that entry in path need to out in same point.

    I create a extension from old inkscape ... but seem that is very slow ... need to wait a lot of time until finished ... so... potrace transform a svg to raster and calculate line ... but paths need to be black white alternate same result.svg .

    My extension is at costycnc.it/cm8  ... so if load a image that can be also svg ...  will be transformed more quickly in gcode for foam cutter. Problem is that exists more svg like this and i dont know if exists a quickly solution for transform in black and white alternate fill!

    I hope that i explain better my problem and somebody can give me a solution! Thanks in advance!

  2. #2
    costycnc costycnc @costycnc

    I rispond myself ... i thing that Bbox is a solution! Can help me anybody?

  3. #3
    inklinea inklinea @inklinea⛰️

    You can make a list of all the bounding boxes in the image, then order them by size.

    I do not think this would be a complete solution, would still require manual work, unless you are able to tag the objects when the are created.

    The only think I could think of, is 1. Fill the object with the largest bounding box black. 2. Fill the objects with a bounding box size under a certain value black too ? 3. Fill everything else white.

     

Inkscape Inkscape.org Inkscape Forum Creating New Extensions change fill of all sub path automatic