Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the number of calculation points AutoCAD uses for curves 1

Status
Not open for further replies.

John2004

Mechanical
Mar 29, 2004
237
Hi everyone,

Can anyone please tell me if there is a command that allows you to control the amount of calculation points AutoCAD uses or recognizes on a curve ?

I created a cam curve with some third party software and used 10 calculation points per each degree of cam rotation. However, after importing the DXF file into AutoCAD, It does not seem to be using anywhere near that many calculation points, and if you zoom in a little, you can really see how the curve is pieced together between the calculation points. If AutoCAD were using all of the calculation points, the cam curve would be much smoother.

If I convert the curve to a polyline and then use the fit command, then the curve gets smoother. Also, I can run a spline through the calculation points that AutoCAD displays and the curve seems smoother. In any event, it would be best if I could first get AutoCAD to recognize and/or use 10 calculation points per each degree of cam rotation as I originally intended.

I prefer to keep using AutoCAD 14 for this as I prefer the layout for 2D stuff, but I have access to AutoCAD 2007 if really needed.

Thanks for your help.
John
 
Replies continue below

Recommended for you

I think you need to inspect the DXF file to see what's actually there to import.



Mike Halloran
Pembroke Pines, FL, USA
 
Hi Mike,

Is there a way I can inspect the DXF for the number of calculation points before I open it in AutoCAD ?

Perhaps using AutoCAD to run a spline through the existing points is the best way to smooth the curve.

I assumed that the number of calculation points I chose would be included in the DXF file, but perhaps the software just uses the chosen number of calculation points for the polar coordinate output.

If the CNC machine was programmed right from the polar coordinate output, I don't think there would be a problem. However, since it was programmed from the CAD file, and since it was translated to IGUS before programming, perhaps that's were some of the problem is coming from.

If I zoom in on the curve in AutoCAD, I can see it's pieced together with segments that range from .01" on up to .03" long, & a 1/32" long segment is fairly long when you want an accurate curve. The smaller the radius of curvature the more choppy it looks, and it seems like that's the area that it's binding.

They either need to program right from the polar coordinates which may be time consuming & error prone due to the number of coordinates, or I need to find some way to insure that the file they use for programming has the smoothest possible curve, and that it's efficient for them to program the CNC machine from the file.

Thanks
John
 
A specification that describes the DXF file format came with your copy of AutoCAD, and is available on the Web. The format is public, and fairly well documented. It will take you a while to get the hang of it, but eventually you'll figure it out. Autodesk's document says that programs that read DXF files should be flexible with respect to the order and format of the contents. AutoCAD itself is not.

A DXF file is a plain text file. For a complex part, it can get very long, with many lines of text, but not very wide. A corresponding IGES file is typically larger than a DXF file, mostly because the lines in an IGES file are right- justified and filled with spaces, probably for reasons having to do with punchcard formats decades ago.

I would try to avoid passing the data through an IGES file, not because there is anything wrong with the format, but because most of the translators have bugs.

For file viewing, I like to use Vern Buerg's DOS program named LIST, because it won't accidentally change a file. For editing, you can change the DXF file's extension to txt, and later change it back. If it's short, Notepad can handle it. If it's bigger than ~32k, you'll need a different editor. It's important that the file be saved as _only_ plain text, with no formatting codes or other funny business.

AutoCAD itself normally maintains point coordinates and such to 16 decimal digits. I'm suspicious that perhaps the cam generation program did some truncation that is causing you problems. The point of looking into the DXF file is to understand exactly what entities are in it, and to what resolution they are stored.

I would stay away from splines. AutoCAD handles them differently from other lines, and not very well.



Mike Halloran
Pembroke Pines, FL, USA
 
If your snap mode is set to zero, do you have the same
problem? Is it only a screen problem or does it also
plot incorrectly? Have you used the pline command?
Do you have enough units ie decimal places set to
differentiate the coordinates. I am thinking if your
units were set to two decimal places and you dxf in
a drawing with coordinates of 6 places, would it truncate
the coordinates to 2 decimal places?
 
The SPLINESEGS system variable may appy here (or not ) :)
 
Have you tried to turn OSNAP off before you open the file? I don't really know about *.dxf, but when I run a script file with many points and don't turn OSNAP off, I get similar results.
 
Hi everyone,

Thanks for your replies.

Turning off OSNAP prior to opening the file and using the SPLINESEGS command made no difference. I tried adjusting the precision of the units but it had no effect. It's not a screen problem, when I snap to the points along the curve, it does not have 10 points per degree of cam rotation like I want.

If I use the PEDIT command to convert the curve into a polyline, the number of points along the curve remains the same. However, if I then apply the PEDIT "FIT" command, the curve seems to get smoother and has more points. I think it's basically a spline curve at that point, but it looks smoother.

It seems CNC programming the curve direct from the polar coordinates may be the best bet. I wish there were a program that would let me paste in the tabulated polar coordinates, and then convert that to the code that they need for the CNC machine.

Thanks again,
John
 
That means your program doesn't put out the 10 points per degree as advertised. However, I have made many cams using self generated points (through Excel or Mathcad and, programmatically, through script files) and I have never come across a case where I needed more than four per degree and this goes up to 24.00" barrel cams. If you use Autocad Mechanical, they create splined cam curves - pretty good fit actually, but you'll need a machine that accepts splines. A fitted polyline is not the same. Autocad simply replaces the straight line segments with arcs. That way it looks smoother and they meet your original datapoints with no loss of accuracy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor