Code Red > AutoLISP (Vanilla / Visual)

Making a curve smooth

(1/2) > >>

Vikram:
I have made a VC program which takes a text file with points and make a dxf file out of it. So I have a drawing with many small line segments. You can see the curve here https://www.photobox.co.uk/my/photo/full?photo_id=502293294980

There are many bumps in this curve. I want this drawing to be smooth and in appropriate shape.I tried using spline it does not help. I tried pldiet.lsp,it helped me at some extent but it didn't clear all bumps. I want a method or lisp program which can quickly form a smooth curve maintaing the original shape.
I have uploaded the drawing test.dxf in attachment. You can use it to see whole drawing.

roy_043:
It is a bit unclear what you want. But maybe creating a 2D polyline through the points and changing Fit/Smooth to Cubic is what you are looking for.

Vikram:
Did you see the drawing? there are bulges in the curve which are not getting cleared even by using PEDIT-Spline and Fit. Its a 2d polyline. I want that curve to be continuous and smooth. I have to use it for cutting of wheel. If there are small bulges in that 2d polyline it results in imperfect cutting

BIGAL:
Don't whinge about what was offered !

The only way to fix is to increase the step size if you have a 100 points make it 400. The more the smoother, a cnc has a stepper motor called that it rotates a small amount to do a curve there are two, one each in X & Y the smaller the step the better the curve.

You want a "best fit arc" curve program, that shape was very ugly. They are out there. The fit curve would be where I would start. At the simplest every 3 points are turned into arcs then compare radius replace and continue. I had a go manually and got something much better. Where did the co-ords come from.

Ps Autocad will not open the dxf Briscad does.

Ps post an image not add for some company.

Vikram:
I have tried segmenting that line in points more than 400. There is a scanner which uses laser to scan the cords from center of the wheel to the edge.It collects these cords and write it in a txt/tap file. Which I later convert in dxf. I have used the option of Fit and Spline. It just converts the sharp corners in a bump. Is there are lisp which will approximate the line and ignore the points which are out of the smooth curve? Approximation or Interpolation can help. Actually I also tried another way by reducing the points in the line by using PLDiet.lsp It even helped me till some extent like 80% but there are still some bumps.You can see it in second pic. I actually used PLDiet and the used spline to smooth the line. You can see the result in attached PLDtest.dxf

The user who is going to use this is rookie CAD user. So I want to make things simple for him. Just some option which will smoothen this line same like the Spline option which just converts blocks in curves.
That line is the surface of the wheel spokes of a car. if the line is smooth the cutting will be also smooth.
Ps: I'm new to this forum and don't know how to post image here so shared a url of the uploaded pic! Sorry for inconvenience. I have attached the image to the message

Navigation

[0] Message Index

[#] Next page

Go to full version