Problem with creating a curve line with precise coordinates

Problem with creating a curve line with precise coordinates

assen_pandov
Participant Participant
2,103 Views
23 Replies
Message 1 of 24

Problem with creating a curve line with precise coordinates

assen_pandov
Participant
Participant

Hello,

 

I'm trying to create a curve line 61cm with exact coordinate points...  I need precise coordinate on each 16,5mm.

If I use the spline the line doesn't pass on the exact coordinates even if I give tolerance 0.0000.

When I convert it to poly line and  put high precision the CNC struggles to do smooth curve..

If I do it directly with poly line and after that give a "curve fit" should it be better?

 

Those are the coordinates I need:

0,5.884

0,29.603

7.5,5.504

7.5,29.944

24,4.723

24,30.626

40.5,4.108

40.5,31.235

57,3.502

57,31.800

73.5,2.899

73.5,32.325

90,2.422

90,32.784

106.5,1.991

106.5,33.193

123,1.558

123,33.575

139.5,1.212

139.5,33.892

156,0.944

156,34.139

172.5,0.695

172.5,34.373

189,0.484

189,34.568

205.5,0.326

205.5,34.705

222,0.185

222,34.837

238.5,0.073

238.5,34.941

255,-0.006

255,35.006

271.5,-0.064

271.5,35.059

288,-0.098

288,35.091

304.5,-0.110

304.5,35.102

321,-0.098

321,35.091

337.5,-0.064

337.5,35.059

354,-0.006

354,35.006

370.5,0.082

370.5,34.914

387,0.200

387,34.802

403.5,0.351

403.5,34.660

420,0.536

420,34.469

436.5,0.775

436.5,34.256

453,1.058

453,34.003

469.5,1.375

469.5,33.675

486,1.781

486,33.306

502.5,2.292

502.5,32.850

519,2.780

519,32.331

535.5,3.377

535.5,31.765

552,4.105

552,31.115

568.5,4.777

568.5,30.402

585,5.555

585,29.635

601.5,6.500

601.5,28.791

609,6.935

609,28.374

 

Can someone suggest me the best way to do it simple, smooth and accurate ?

 

Thanks in advance

0 Likes
2,104 Views
23 Replies
Replies (23)
Message 2 of 24

Kent1Cooper
Consultant
Consultant

@assen_pandov wrote:

.... If I use the spline the line doesn't pass on the exact coordinates even if I give tolerance 0.0000. ....


It does for me:

Kent1Cooper_0-1612279175507.png

I put your coordinates into a file that I called junk.txt, in a place where AutoCAD knows to look.  They came in one XY pair per line [I had to remove blank lines between coordinate-value lines], so the file is like this:

0,5.884
0,29.603
7.5,5.504
7.5,29.944

....

[I hope that's the right sequence, and not straight down your left column and then up the right, or something].  Then:

 

(setq file (open (findfile "junk.txt") "r"))
Command: SPLINE

Current settings: Method=Fit Knots=Chord
Specify first point or [Method/Knots/Object]: (while (setq pt (read-line file)) (command pt))

 

and ended with Enter to conclude the Spline command, and (close file).

 

The Spline does pass exactly through those coordinates.  Do you perhaps have the Method option set for Control Vertices rather than Fit Points?

Kent Cooper, AIA
0 Likes
Message 3 of 24

assen_pandov
Participant
Participant

Sorry i put two curve lines... take just one column..

0 Likes
Message 4 of 24

assen_pandov
Participant
Participant

for example on coordiante 370.5,0.082 it passes on 0,0868 .. and it's same with almost all the points..

0 Likes
Message 5 of 24

Kent1Cooper
Consultant
Consultant

@assen_pandov wrote:

Sorry i put two curve lines... take just one column..


That makes a difference to the result:

Kent1Cooper_0-1612280446644.png

but not to the fact that it does go through those exact coordinates, and therefore to the question -- what is the Method option set to in your Spline command, if that's how you're doing it?

Kent Cooper, AIA
0 Likes
Message 6 of 24

assen_pandov
Participant
Participant

method fit points (I paste all the coordinates and give tolerance 0.0000) but still when you zoom they don't pass on exact coordinates

0 Likes
Message 7 of 24

Kent1Cooper
Consultant
Consultant

@assen_pandov wrote:

method fit points (I paste all the coordinates and give tolerance 0.0000) but still when you zoom they don't pass on exact coordinates


I tried it by just pasting in the list, rather than with the AutoLisp read-the-file approach, and it also goes exactly through those locations.  I don't have any idea why it would not work for you, unless maybe you're in a UCS other than World Coordinates.  Can you post a drawing file with your results?

Kent Cooper, AIA
0 Likes
Message 8 of 24

Patchy
Mentor
Mentor

I couldn't get them to go through the points neither, they are off by a hair of a flea

Your cnc can handle that.

 

0 Likes
Message 9 of 24

Kent1Cooper
Consultant
Consultant

@Patchy wrote:

I couldn't get them to go through the points neither, they are off by a hair of a flea

....


Even in your posted drawing, they do go precisely through those coordinates.  I select the Polyline, hover over a grip until it locks on, and look at the Coordinates display, here at the second vertex from each end:

Kent1Cooper_0-1612286947673.png     Kent1Cooper_1-1612287159208.png

 

The coordinates agree down to the full 8 decimal places it can display.  I checked a variety of them [not every one], and all agreed exactly.  Where are you seeing them being off?

 

 

Kent Cooper, AIA
0 Likes
Message 10 of 24

Patchy
Mentor
Mentor

I see it when I zoomed in really close.

The point goes thru but the spline is off a little bit.

I zoomed.JPG

0 Likes
Message 11 of 24

assen_pandov
Participant
Participant

Sorry was driving, will try to post a file or a picture, but I'm new and I will check how to do it now..

 

This curve is for a speed skating template..even 0,01-2 makes a difference of the desire result..

0 Likes
Message 12 of 24

Kent1Cooper
Consultant
Consultant

Okay, so it's not a question of fit points not being at the right place, which is what I had assumed.  That kind of deviation appears to be the nature of Splines generally, though I'm not sure.

Kent Cooper, AIA
0 Likes
Message 13 of 24

assen_pandov
Participant
Participant

You did poly line or spline? 

0 Likes
Message 14 of 24

assen_pandov
Participant
Participant

Do you think if I do poly line and put "curve fit" can do the work? or will not be smooth enough?

0 Likes
Message 15 of 24

Kent1Cooper
Consultant
Consultant

I did a Spline [see my first Reply].

Kent Cooper, AIA
0 Likes
Message 16 of 24

assen_pandov
Participant
Participant

I'm sorry for the stupid question, but how can I do my coordinates more precise and I'm using auto cad 2018, should I always safe the file in older version?

0 Likes
Message 17 of 24

assen_pandov
Participant
Participant

If I change "arc and smoothness circle" to "1" is really off, if I put it to 20000 it's closer.. should I leave it to 20000?

0 Likes
Message 18 of 24

Patchy
Mentor
Mentor

Have you actually use the file with cnc yet? many don't read splines, they read arcs and polylines

So does it make any difference where it show on the screen and the coordinate points is what matter.

0 Likes
Message 19 of 24

assen_pandov
Participant
Participant

Well I tried it on poly line, but it wasn't with the best result, I tried to put it more accurate with coordinate point on each 1,5mm but it was too much and then the CNC was cutting it was stopping on those point and make small wholes in the metal... so I realise that small steps is not working well

0 Likes
Message 20 of 24

Kent1Cooper
Consultant
Consultant

@assen_pandov wrote:

.... should I always safe the file in older version?


Does it come out more precisely in older versions?  [The drawing you attached has the same issue when opened in 2019 that I have here.]

Kent Cooper, AIA
0 Likes