Convert spline/polyline to arcs AND lines

Convert spline/polyline to arcs AND lines

Anonymous
Not applicable
7,656 Views
14 Replies
Message 1 of 15

Convert spline/polyline to arcs AND lines

Anonymous
Not applicable

I need to convert a file from an architect containing text to be cutout from a piece of steel using CNC. Each letter of text is a spline and when exploded, it becomes a series of splines (17 splines in the letter 'p' for example). I am then using PEDIT - Multiple - Precision of 10 which then gives me a series of polylines. Next I explode the polylines and obtain a very large number of either arcs or lines (251 for the letter 'p') based on PLINECONVERTMODE. I know there are lsp files around to minimize the amount of vertices in the polylines which would reduce the number of arcs and lines, but I haven't tried any yet.

 

I have 2 problems. First, I need to minimize the number of lines or arcs in each letter as a file with 17500+ lines/arc causes the CNC program to crash. In order to mimic the letter outlines as close as possible with the minimum amount of objects, I would need to convert the polyline to both arcs and lines. I know I could trace over all the letters, however I'd rather find an automated method as we have several files with different text in each. Does anyone have any suggestions? Thanks in advance.

 

Text.JPG

0 Likes
7,657 Views
14 Replies
Replies (14)
Message 2 of 15

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

welcome @Anonymous!

 

>> I know there are lsp files around to minimize the amount of vertices in the polylines which would

>> reduce the number of arcs and lines, but I haven't tried any yet.

>> I have 2 problems. First, I need to minimize the number of lines or arcs

May I ask why are you asking here a question that you might have solved by yourself`?

 

You know there exist some tools but you tell us that you have not tried them ... So what are you expecting now?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 3 of 15

Anonymous
Not applicable

No, I don't believe I have answered my question. I've never worked with a lsp before and have no idea how to use it. Plus I don't want to waste hours and hours trying to make it work if it won't actually do what I need it to.  Further to this, the lsp will delete vertices but I am still stuck with either only lines or only arcs. So it's only a partial solution. Lines don't make a very nice 'o' and arcs don't make a very nice 'M'. Hence why I asked if it's possible to convert polylines to both lines and arcs.

 

Wouldn't ask for help if I already knew how to deal with the issue... Been searching forums and online for days and haven't found a solution so it's time to ask for help. Hoping someone can give me useful advice.    

Message 4 of 15

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> I don't believe I have answered my question. I've never worked

>> with a lsp before and have no idea how to use it.

When you have found applications for that situation these downloads most probably also show how to load and how to start them

And not all apps are based on Lisp, so they might be loaded in different ways ... it's always necessary to look for a description for the tool you are currently investigating.

 

>> Plus I don't want to waste hours and hours trying to make it

>> work if it won't actually do what I need it to

We also don't want to waste our hours. But when we send you now links to possible solutions who else than you could say "that's what I need or not". Only you can test it and find a way to work with a tool A better as tool B or use it mixed to get the best of both or ....

 

>> Hence why I asked if it's possible to convert polylines to both lines and arcs.

Where is the difference for your CNC system to get straight arcs or lines?

 

>> Been searching forums and online for days and haven't found a solution

That sounds different to "have not tried" ... because only then you can see how a tool is working (or not working) with your type of data.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 5 of 15

Anonymous
Not applicable

>> Plus I don't want to waste hours and hours trying to make it

>> work if it won't actually do what I need it to

We also don't want to waste our hours. But when we send you now links to possible solutions who else than you could say "that's what I need or not". Only you can test it and find a way to work with a tool A better as tool B or use it mixed to get the best of both or ....

 

My intent is not to waste anyone's hours. You are willingly answering my posts. I'm hoping that someone on this planet has had this situation before and can say 'Oh yeah, I did this and this...'. The lsp or add-ons (etc) I've found suggested in other posts would not work for my application based on the descriptions I read (yes I did read them). And yes, of course I will try tools if someone suggests them.

 

>> Hence why I asked if it's possible to convert polylines to both lines and arcs.

Where is the difference for your CNC system to get straight arcs or lines?

 

I don't understand what you mean... When converting polylines to arcs only, pedit uses dozens of small arcs for a straight edge. On the other hand, when converting to lines only, pedit makes a single line (yay!). I suppose if pedit would make one straight arc, that would be good. Haven't seen that happen when playing around with various settings.

 

>> Been searching forums and online for days and haven't found a solution

That sounds different to "have not tried" ... because only then you can see how a tool is working (or not working) with your type of data.

 

The 'Solutions' I found in forums and other places have mostly been tools aimed at a single entity (not thousands as in my case) and would not be useful for this project. Contrary to your thoughts, I did investigate what I found by reading descriptions. I didn't see the use in trying it if it would be more work than manually drawing the letters.

 

0 Likes
Message 6 of 15

Patchy
Mentor
Mentor

Would you happen to know what font name this is?

0 Likes
Message 7 of 15

Anonymous
Not applicable

It's a custom font the architect modified to make sure the 'counter' (middle of letters) wouldn't fall out. I believe it's based on Knockout 27. Would it be helpful for me to get the font file from them?

 

Thanks!

0 Likes
Message 8 of 15

Patchy
Mentor
Mentor

Definitely. With that font you can make a letter lines and arcs, no more splines that CNC doesn't like to work with.

Message 9 of 15

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

.... I suppose if pedit would make one straight arc, that would be good. Haven't seen that happen when playing around with various settings. ....


I don't have an "Oh, yeah, I did this..." solution for you, but just so you know:  There's no such thing as a "straight Arc."  You can try  to draw a 3-point Arc with Snap or Ortho on so you can give it 3 points that are in a straight line, and it will scold you.  [The reason is that its center point, which is part of what AutoCAD stores about an Arc, would need to be infinitely far away.]  So you would need to find something that converts a straight edge to a Line, or line segment, instead, if you can find one that doesn't also make curves into multiple short line segments.

Kent Cooper, AIA
Message 10 of 15

Patchy
Mentor
Mentor

Get the font and an app on Autodesk site and redo, takes about 10 minutes.

Men say this.JPG

0 Likes
Message 11 of 15

Kent1Cooper
Consultant
Consultant

@Patchy wrote:

Get the font and an app on Autodesk site and redo, takes about 10 minutes.

 


That has Lines for the straight parts, but the curves are Splines, not Arcs, which leaves the OP with the same issue....  @Anonymous, if you then convert the resulting Splines [only] to Polylines with arc segments, can you get a high-enough accuracy at the same time as a low-enough memory consumption?

Kent Cooper, AIA
Message 12 of 15

Patchy
Mentor
Mentor

My bad, it's not complete yet with a pass of autolisp, But it reduced a lot of splines ☺☺☺

Message 13 of 15

Anonymous
Not applicable

@Patchy wrote:

Definitely. With that font you can make a letter lines and arcs, no more splines that CNC doesn't like to work with.


Thanks! I will ask for the font file. 🙂

0 Likes
Message 14 of 15

Anonymous
Not applicable

@Kent1Cooper wrote:

@Patchy wrote:

Get the font and an app on Autodesk site and redo, takes about 10 minutes.

 


That has Lines for the straight parts, but the curves are Splines, not Arcs, which leaves the OP with the same issue....  @Anonymous, if you then convert the resulting Splines [only] to Polylines with arc segments, can you get a high-enough accuracy at the same time as a low-enough memory consumption?


@Kent1Cooper Yes, I think I would be able to get a high enough accuracy doing it that way, especially if I run a lisp to minimize the vertices (as suggested by @Patchy). Do you know of a specific app or there are several?

Thanks very much for the help! Greatly appreciated!

0 Likes
Message 15 of 15

leeminardi
Mentor
Mentor

I took the file that was posted by @Anonymous and used splinedit to combine all the individual splines of one letter into a single spline.  I then used splinedit again to convert the spline to a polyline using 3 different tolerance values.  You can see the results below.  Although there are no arc used the results may be acceptable. Straight line segments use several chords when only one is needed.  These could be address manually or perhaps there is a program to do it.

s1.JPG

 

lee.minardi
0 Likes