joint all path with one line

71 views
Skip to first unread message

Boboaca Costel

unread,
Oct 8, 2020, 11:26:49 AM10/8/20
to jscut
I know that title is non very espressive for understand!
So first Hello everyone and thanks for accept me to this group...
I want know if is possible implement to js cut a function for join all path with one line ... so ... one entry that passing all paths and return to beginfoto_inkscape.png

so ... the function need to find first path closest to 0


    <path d="M10,10 L10,100 L100,100 L100,10 Z />
<path d="M20,20 L20,90 L90,90 L90,20 Z" />
<path d="M120,120 L120,200 L200,200 L200,120 Z" />

so ... first path in this case ... 

after ... find path closest with this path ...

and join two path with closest pointers

    <path d="M0,0 10,10 L10,100 L100,100 L100,10 L10,10 L20,20 L90,20 L90,90 L20,90 L20,20 L10,10Z" />

<path d="M120,120 L120,200 L200,200 L200,120 Z" />

after find closest path with path recent create ... and join in closest point 

 <path d="M0,0 10,10 L10,100 L100,100 L120,120 L120,200 L200,200 L200,120 L120,120 L100,100 L100,10 L10,10 L20,20 L90,20 L90,90 L20,90 L20,20 L10,10Z" />

this is useful for create code for foam cutters ... or in alternative ... guide me for a forum or another way to solve this problem ... because foam cutters cnc begins popular ... but principal  problem is with create a big closest path ... thanks in advance for a eventually response 


   
inkscape.svg
svg1.html
svg2.html
svg3.html
svg4.html

Kristian Myklebust

unread,
Mar 10, 2021, 1:27:57 AM3/10/21
to jscut
hi. you need to join the paths in inkscape manually for each line, I usually use LibreCAD to draw dimensionally correct drawings and importing DXF to inkscape to join the lines and save as SVG

the process is tricky and easy to miss joints so you basicly have to test all the links to see if the lines are connected togheter only then is it usable as a Cutfile for CAM

i have linked a screengrab (done with VLC so mouse pointer is missing. but you will get the idea.

doubble clik on the line you want to start with and double click again to get a Red line (sometimes i have to click a couple of times for the red line to appear) on the red line you will see a white square in each end of the line indicating the connection points. hold SHIFT key on keyboard while klicking on the connetion point. (keep the SHIFT key pressed all the time while doing this) then click the next line so that it also is red line, then select the "same" connection point (it's really the connection point of the secound line then you click the icon on the topbar menu with picture of two purple sqare joining to one (see video) then if done correctly the two line will be joined at the connection point. repeat this for all the lines that you want to connect. remember to connect it all the way around

then you save as SVG file and import to JSCUT

inkscape capture.mp4

Kristian Myklebust

unread,
Mar 10, 2021, 1:32:48 AM3/10/21
to jscut
i also notis that your SVG is not consiting of Single Path lines. it has to be drawn with single lines not this "outline type" (not sure what to call the function)
Reply all
Reply to author
Forward
0 new messages