Convert line segments to a path
Convert line segments to a path
When using my laser cutter (fslaser.com) I create outlines in Sketchup, then export to a SVG file which I open in Inkscape. Then in Inkscape I can print to the laser cutter. The problem is sketchup creates everything in small line segments. So if I have a create a circle, I might have 48 small line segments that make up this circle. When my laser cutter goes to cut the circle out (and has to make multiple passes to get through the material) it cuts one small segment, then goes to the start of that segment and makes the second pass. Then it goes to the next line segment and and cuts it two time. If I created the circle in Inkscape, the laser cutter would go all the way around the circle as the first pass, then around again for the second pass. Is there a way in Inkscape to somehow join all the segments so it looks like one path or something to my laser printer? I'm not sure of "path" is the right terminology. Also, the circle is already grouped together, so grouping it doesn't help.
Re: Convert line segments to a path
Your problem is about circle only or all kind of segments ?
Do you have a sample svg ? (Maybe there are solutions before importing in inkscape)
Do you have a sample svg ? (Maybe there are solutions before importing in inkscape)
Re: Convert line segments to a path
It's not just circles, it's everything. Attached is an example.
- Attachments
-
- drillguide.svg
- Exported from sketchup
- (44.39 KiB) Downloaded 504 times
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Convert line segments to a path
Any chance you version of SU can export a DXF?
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Convert line segments to a path
With a single circle a manual method would be by
combining all the segments (Ctrl+K) together, selecting all nodes,
connecting the unconnected segments,
pressing Ctrl++ to remove doubles,
then selecting again all the nodes and set them to curved ones.
combining all the segments (Ctrl+K) together, selecting all nodes,
connecting the unconnected segments,
pressing Ctrl++ to remove doubles,
then selecting again all the nodes and set them to curved ones.
Re: Convert line segments to a path
scott216 wrote:It's not just circles, it's everything. Attached is an example.
I meant the svg that comes out from sketchup
Re: Convert line segments to a path
tylerdurden wrote:Any chance you version of SU can export a DXF?
No, I'm using the free version and I haven't found a plug-in that will do this.
Re: Convert line segments to a path
Lazur URH wrote:With a single circle a manual method would be by
combining all the segments (Ctrl+K) together, selecting all nodes,
connecting the unconnected segments,
pressing Ctrl++ to remove doubles,
then selecting again all the nodes and set them to curved ones.
I tried ctrl+k and it joined all the segments. Then I tried the laser cutter and it didn't help. I know you have more steps, but I'm having trouble following them. When I press ctrl and the += key, nothing happens. When I press ctrl and the + key on the numeric keypad it deletes the selected objects. So I'm not sure how to remove the doubles. Also in the last step how do I convert all the nodes to curves?
I have tried using ctrl+shift+c to convert to path, but this hasn't worked on anything so far. Inkscape says there are no objects to convert to path when I try.
Re: Convert line segments to a path
I made some progress
If I do this:
ungroup
combine
stroke to path
simplify
Then my laser cutter software no longer sees a bunch of small segments (polylines is what the laser software calls them). Instead it sees just two. So when cutting a circle that needs two passes, it will go all the way around once, then around again. But the what's strange is then it goes around again the opposite way and again the opposite way. So if I tell it to make two passes, it's actually making 4. It's as if there are two circles superimposed on one another. So this is better, but not quite right.
Attached are a few files:
shape test 1.svg - output from Sketchup. Twelve sided circle
shape test 2.svg - file after making changes: ungroup > combine > stroke to path > simplify
Laser Screenshot 1.png - screenshot of what laser software sees from shape test 2.svg
The goal would be for there to be just one polyline (that's the laser software terminology). This would make the laser cut a circle in one continuous motion.
If I do this:
ungroup
combine
stroke to path
simplify
Then my laser cutter software no longer sees a bunch of small segments (polylines is what the laser software calls them). Instead it sees just two. So when cutting a circle that needs two passes, it will go all the way around once, then around again. But the what's strange is then it goes around again the opposite way and again the opposite way. So if I tell it to make two passes, it's actually making 4. It's as if there are two circles superimposed on one another. So this is better, but not quite right.
Attached are a few files:
shape test 1.svg - output from Sketchup. Twelve sided circle
shape test 2.svg - file after making changes: ungroup > combine > stroke to path > simplify
Laser Screenshot 1.png - screenshot of what laser software sees from shape test 2.svg
The goal would be for there to be just one polyline (that's the laser software terminology). This would make the laser cut a circle in one continuous motion.
- Attachments
-
- Laser software screenshot of shape test 2.svg
- Laser Screenshot 1.PNG (124.9 KiB) Viewed 18423 times
-
- shape test 2.svg
- Combined segments
- (3.55 KiB) Downloaded 327 times
-
- shape test 1.svg
- Output from sketchup
- (4.23 KiB) Downloaded 312 times
Re: Convert line segments to a path
Here is how that method works, step by step.
- Attachments
-
- hlp76.svg
- (195.66 KiB) Downloaded 560 times
Re: Convert line segments to a path
Lazur URH wrote:Here is how that method works, step by step.
Thanks, that helps. I'm not sure I'm doing it quite the same way though.
After I combine with ctrl+k. I then selected the "Edit paths by node" tool. Then I selected everything and clicked on the Join Selected Nodes Icon. Then the status at the bottom said there were 12 nodes in Layer 1.
In you're example, after combining with ctrl+k, you say to "select all nodes and and the click the right icon" I don't know what you mean by clicking on the right icon.
Also in your last step you say select all nodes and set them curved. I tried using the tool "Make Selected Segments Curves" but that didn't see to do anything. It did change the segments so they could be curved if you did it manually, but they didn't automatically turn into a nice round circle. Or was that something you did manually?
Re: Convert line segments to a path
I was meaning these:
The first one to connect unconnected nodes, and the second to make them curved.
The first one to connect unconnected nodes, and the second to make them curved.
Re: Convert line segments to a path
This was a big help. I tried both the "Join Selected Nodes" and "Join selected endnodes with a new segment" and both convert it into one path for my laser printer.
Now I just need to see if there is a way I can run a macro or something to automate it.
Now I just need to see if there is a way I can run a macro or something to automate it.
Re: Convert line segments to a path
You can use this method on all objects together except for the Ctrl++ part.
So if you don't want any cusp nodes,
select all objects,
combine them together,
select all nodes and connect all unconnected ones.
Than break the path apart (Ctrl+Shift+K),
select each path alone and press Ctrl++ for each,
then combine the paths together, and set nodes to curved ones.
So if you don't want any cusp nodes,
select all objects,
combine them together,
select all nodes and connect all unconnected ones.
Than break the path apart (Ctrl+Shift+K),
select each path alone and press Ctrl++ for each,
then combine the paths together, and set nodes to curved ones.
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Convert line segments to a path
This free CAD was just released.
http://www.designspark.com/eng/page/mechanical
It will open the skp files and output DXF that have true arcs and circles.
I might suggest this over using Sketchup for CAD.
http://www.designspark.com/eng/page/mechanical
It will open the skp files and output DXF that have true arcs and circles.
I might suggest this over using Sketchup for CAD.
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Convert line segments to a path
as long time sketchup user i have the same problem. i installed Designspark Mechanical and i like it, im pretty sure i will have use for it in the future but i couldnt find how to convert the arcs of sketchup into real arcs.
anybody got a tip?
anybody got a tip?
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Convert line segments to a path
Unless you have SU-Pro, converting to arcs requires some fiddling. In DSM (DesignSpark Mechanical), you might need to replace the segmented arcs from SU with true arcs made by DSM. Not too difficult with 3-point arc tool, but if you have a lot of arcs, it could be a chore (but maybe easier then in Inkscape).
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Convert line segments to a path
tylerdurden wrote:Unless you have SU-Pro, converting to arcs requires some fiddling.
How do you do it in SketchUp Pro?
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Convert line segments to a path
AIUI, save/export as 3d dxf:
http://forums.sketchup.com/t/creating-a ... ter/1647/4
http://forums.sketchup.com/t/creating-a ... ter/1647/4
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/