+ Reply to Thread
Page 2 of 5 FirstFirst 1 2 3 4 ... LastLast
Results 11 to 20 of 47
  1. #11
    Senior Member lrm's Avatar
    Computer Details
    lrm's Computer Details
    Operating System:
    Windows 7 64-bit
    RAM:
    16 GB
    Discipline
    Education
    lrm's Discipline Details
    Occupation
    Teacher, AEC and mechanical
    Discipline
    Education
    Details
    Civil and Mechanical
    Using
    AutoCAD 2014
    Join Date
    Jan 2010
    Location
    Massachusetts, USA
    Posts
    341

    Default

    Registered forum members do not see this ad.

    We need to think of AutoCAD as having two type of splines, “old” splines and “new” splines. An old spline is created by using the spline option with a polyline (PEDIT S). A “new” spline is created with the SPLINE command. The old splines are mathematically known as B-splines and the new splines are NURBS (non-uniform rational B-splines).

    The red spline in your drawing is a new spline. Your goal is to make an old spline from a new spline. To do this we need to know the location of the Control Vertices (CVs) of the new spline.

    To see the location of the CVs select the spline and click the pull-down (red down arrow).

    Note that Fit is checked. This was the method used to define the spline.

    Change the method to Control Vertices and you should see something like this.


    We now want to create a LWPolyline using these 7 CVs. I do not know a method for using OSNAP to access the CV’s so we can use the LIST command to get the CV coordinates.

    Code:
    Command: LIST
    
    Select objects: 1 found
    Select objects:
    
                      SPLINE    Layer: "SPLINE"
                                Space: Model space
                       Handle = 1b0
                               Length: 3065.2641
                                Order: 4
                           Properties: Planar, Non-Rational, Non-Periodic
                     Parametric Range: Start   0.0000
                                         End2970.0202
             Number of control points: 7
                       Control Points: X = 541.6263 , Y = 768.4563 , Z = 0.0000
                                       X = 621.0883 , Y = 1130.7741, Z = 0.0000
                                       X = 803.7368 , Y = 1963.5846, Z = 0.0000
                                       X = 1615.7148, Y = 263.7842 , Z = 0.0000
                                       X = 2083.8971, Y = 1586.3669, Z = 0.0000
                                       X = 2443.1443, Y = 1280.3963, Z = 0.0000
                                       X = 2561.1183, Y = 1179.9179, Z = 0.0000
    You can type these coordinates in to create the polyline or use notepad to create a script. I created a script file that looked like this.

    Code:
    pline
    541.6263,768.4563
    621.0883,1130.7741
    803.7368,1963.5846
    1615.7148,263.7842
    2083.8971,1586.3669
    2443.1443,1280.3963
    2561.1183,1179.9179
    The file is a text file but has the extension .scr. The file starts with the pline command. Make sure there are no blank characters and that there are two blank lines at the end of the file so the pline command will terminate. Use the SCRIPT command to create the polyline. You should see something like this.


    Using PEDIT with the S option will convert the polyline to a spline and will look something like this.



    Notice that there is a difference between the two splines. This is because some of the NURBS parameter values (not the location of the CV values) used in the creation of the new spline (red) are not compatible with the pline spline. The slope at the beginning at end of the spline should be good. We can fudge the shape of our pline spline to better approximate the orginal by moving some of the CVs (but not the first two or the last two). For example, moving the 4th CV up a bit will provide a closer match between the two splines.





    Here is the final result.


    Your CNC machine should be able to handle this “old” spline. Delete the original red spline and check it out.
    Note, fi you would rather not go through the hassle of creating a script file you could just create a polyline of where you think the CVs should be. You can use OSNAP END for the start and end of the polyline. Note that the location of the second CV defines the slope of the spline at the beginning. Its distance from the spline start defines the radius of curvature at the start. Take a guess where the other CVs are and then modify their location as needed. With a little practice you will get a good feel for where the CVs need to be.

    Good luck.
    Lee
    spl2arcs-lee.dwg

  2. #12
    Forum Newbie
    Using
    not applicable
    Join Date
    Mar 2016
    Posts
    5

    Default

    Quote Originally Posted by SEANT View Post
    As a test, what shows up in your CAM software after importing this file?
    I will check it out and let you know.

  3. #13
    Forum Deity SEANT's Avatar
    Using
    AutoCAD 2014
    Join Date
    Aug 2005
    Location
    Rhode Island
    Posts
    2,447

    Default

    Even if the processing software balks at the format, try importing to your illustration software. This is what I get when importing to CorelDraw 12.

    The curves on the left - the original AutoCAD spline - looks like it might be problematic. The subdivided group of curves on the left look like native CorelDraw curves. If your illustration software native curves work well with the CNC processor, then perhaps these will as well.

    P.S. Maybe a CorelDraw - Arrange - Combine would further assist the process.
    Attached Files

  4. #14
    Super Moderator SLW210's Avatar
    Computer Details
    SLW210's Computer Details
    Operating System:
    Windows 7 PRO 64-bit
    Computer:
    IBM Lenovo
    Motherboard:
    ACPI x64
    CPU:
    Pentium(R) i5 4570 @ 3.2GHz
    RAM:
    8 GB RAM
    Graphics:
    Nvidia Quadro 600 1GB
    Primary Storage:
    300 GB
    Secondary Storage:
    650GB
    Monitor:
    2x ThinkVision 24"
    Discipline
    Multi-disciplinary
    SLW210's Discipline Details
    Occupation
    Design Draftsman
    Discipline
    Multi-disciplinary
    Details
    Mostly do drafting related to manufacturing. From doing site layouts with proposed updates, additions and renovations to be budgeted and submitted for bid, to updating and changing existing drawings to reflect maintenance and repair/revision work done on site.
    Using
    AutoCAD 2011
    Join Date
    May 2007
    Location
    South Florida, USA
    Posts
    11,720

    Default

    Can you post an example .dxf and/or .ai of what works and what doesn't?

    What software does your CNC use?

    Did you try the LISP in Post #10?
    “A narrow mind and a fat head invariably come on the same person” Zig Zigler



  5. #15
    Forum Deity SEANT's Avatar
    Using
    AutoCAD 2014
    Join Date
    Aug 2005
    Location
    Rhode Island
    Posts
    2,447

    Default

    I’d like to continue this discussion despite what may be an OP that “has left the building”.

    I’ve prepped numerous files destined for outsourcing to CNC shops, though have never had direct access to the CAM/Post Processing/G-code/Hardware (hence to be called “Pipeline”).

    Not all the shops had similar requirements. Certainly that could be due to differing components of the Pipeline. I’m sure the older the setup, the less capabilities it was likely to have.

    My concern was that some of vendors had hardware Pipelines with plenty of capability, but operator Pipelines hampered by the unwillingness to venture from what was already known. None of the vendors that I’ve dealt with were willing to test alternate methods of dealing with free-form cutting paths. The excuse was always heavy workloads (probably true, good for them).

    It would be helpful to find a CNC programmer that’s very interested in exploring all the options of the Pipeline, as well as the extended pipeline including file prepped by customers.

  6. #16
    Forum Deity SEANT's Avatar
    Using
    AutoCAD 2014
    Join Date
    Aug 2005
    Location
    Rhode Island
    Posts
    2,447

    Default

    There was a previous statement that all curves are eventually reduced to some incremental straight line. Be that as it may, I think the CAM/CNC manufactures understand arcs, at least, well enough to eliminate unnecessary Acceleration/Decelerations, to produce smooth cuts from the linear movement. Perhaps that built in processing extends through tangential curve connections, thus allowing scj’s routine or a splined poly with appropriate Splinesegs setting to smooth out the cutting process.

    In addition, it sounds like some CAM/CNC manufactures understand spline style curves as well. Well enough to play with the Accel/Decel to facilitate smooth cuts. Certainly Beziers are the most basic, and should be the first to be included. But it is not hard to imagine all types of Nurbs Curves would eventually be processed in a similar fashion. Or maybe they are already included, but the operators need some additional training and/or a more open mind.

  7. #17
    Full Member
    Using
    AutoCAD LT 2011
    Join Date
    Feb 2010
    Location
    Connecticut
    Posts
    87

    Default

    Our CNC waterjet is vintage 2000, running a Windows 98 based program. It is an ESAB table, original software was Sigmanest and WinPost G-code generator. It will not read a spline curve, it wants arcs and lines. The posting process provides a line of code for each machine movement so if you have 200 tiny short straight lines forming a single arc, as often happens when clients provide me drawings done in Corel Draw, that is 200 lines of code for a single arc. Machine movements smaller than the kerf allowance of the tip are problematic, in my experience.

    My understanding of G-code for our purposes is there are 3 basic machine movements; a straight line, a counter-clockwise arc and a clockwise arc G1, G2, G3. The arcs are based on the centerpoint of the arc, need a radius, a length of arc and a direction, G2 or G3, CW or CCW. All contours are defined this way. Other machine functions, such as process on and off, traverse, kerf on and off are also controlled with other G and M codes from the posting process.

    Splines don't seem to have this basic information (CP, radius, arc length) and our setup will not read them. We are a 3 axis shop, X,Y and Z (Z being vertical height). Newer software and posting processors may be able to. In addition, 5 axis movement at the head of whatever machine may require splines and perhaps the software and posting process will recognize them without fuss.

    This is simplified as I am not a programmer, merely an operator, and lack the education and terminology to go much beyond this point. If I provide a drawing for a client to have processed by someone else, it is always lines and arcs, no splines.

  8. #18
    Senior Member lrm's Avatar
    Computer Details
    lrm's Computer Details
    Operating System:
    Windows 7 64-bit
    RAM:
    16 GB
    Discipline
    Education
    lrm's Discipline Details
    Occupation
    Teacher, AEC and mechanical
    Discipline
    Education
    Details
    Civil and Mechanical
    Using
    AutoCAD 2014
    Join Date
    Jan 2010
    Location
    Massachusetts, USA
    Posts
    341

    Default

    As I mentioned earlier, CAD systems and machine tools approximate smooth curves as a series of straight lines when they are drawn on the screen, printed on paper, or cut with a machine tool. This is true for arcs as well as splines. This is true even when the arc or spline is stored in the computer file as a smooth curve. For arcs there is a variety of ways that it can be stored such as its center location, the radius, the start angle and the final angle. The way an arc is stored is not related to the way it was defined by the user. For example, an arc can be specified by a user by giving a start point, an end point, and a radius (this method assumes either a CCW or CW direction) but it will still be stored in the format defined by the CAD system.

    In the picture below you can see that the number of straight line segments need to make an arc look smooth depends on how large it will appear when it is drawn on the screen. Small radius arcs can be sufficiently approximated with a smaller number of chords than a larger radius arc.



    Most post processors for machine tools include software that can be handed the definition of an arc and generate a series of straight line segments that will produce a cut that is sufficiently smooth enough to be an acceptable arc. This software knows how many chords are needed to approximate the arc to yield sufficient precision. The smaller the radius the fewer the chords.

    Splines are similar to arcs in that they are stored as smooth curves but instead of using a center point, radius and angles, splines use points known as Control Vertices (CVs). A long smooth spline can be represented by just a small number of CVs.

    Now, here is where things get messy with AutoCAD. As I mentioned in a previous post (#11) there are two types of splines in AutoCAD, “old” splines and “new” splines. The DXF output for old splines is a series of chords specified as a series of vertex statements (see post #9). You can search the DXF file and you will see a series of statements that look like this:
    Code:
    AcDb2dVertex
     10
    4.330213794252784
     20
    20.04452757003263
     30
    0.0
    “AcDb2dVertex” indicates that what follows is an AutoCAD Database 2D Vertex (point). The number following the 10 is the x coordinate, the number following the 20 is the y value, and the 0.0 after the 30 is the z value. A post processor given this type of information does not need to know how to handle a spline since it has a series of points. Note, you can adjust the total number of points that are used to approximate the shape of the spline by changing the value of splinesegs before using pedit to create the spline (you must use pedit decurve after changing the splinesegs value then the spline option). Increasing the value of splinesegs will create more “vertex” statements in the DXF file.

    It is interesting to note that the AutoCAD software automatically create more chords (segments) where the spline has a small radius of curvature and fewer chords where the spline curvature is flatter.

    If the DXF file contains the definition of a “new” spline the file will have the location of the CV points instead of a series of vertices. In this case, if the post processor does not include software for converting CV points into a series of chords it will not be able to cut the smooth curve.

    How do you tell the difference between an old and new spline? If you select a spline and the properties window indicates “2D Polyline” it is an old spline (a B-spline). If “spline” is indicated it is a new (NURBS) spline.

    Lee

  9. #19
    Forum Deity SEANT's Avatar
    Using
    AutoCAD 2014
    Join Date
    Aug 2005
    Location
    Rhode Island
    Posts
    2,447

    Default

    Quote Originally Posted by Quik&Easy View Post
    Our CNC waterjet is vintage 2000, running a Windows 98 based program. It is an ESAB table, original software was Sigmanest and WinPost G-code generator. It will not read a spline curve, it wants arcs and lines . . . .
    Most of the vendors I’ve dealt with have Software/Hardware of similar vintage. And they have all made similar statements. No DWG/DXF splines (nor Ellipse unless PELLIPSE is set to 1). Oddly enough, though, and similar to the OP, Bezier Curves from Adobe Illustrator usually were fine.

    Quote Originally Posted by lrm View Post
    As I mentioned earlier, CAD systems and machine tools approximate smooth curves as a series of straight lines when they are drawn on the screen, printed on paper, or cut with a machine tool. This is true for arcs as well as splines. . . . .




    Most post processors for machine tools include software that can be handed the definition of an arc and generate a series of straight line segments that will produce a cut that is sufficiently smooth enough to be an acceptable arc. This software knows how many chords are needed to approximate the arc to yield sufficient precision. . . . .

    Now, here is where things get messy with AutoCAD. As I mentioned in a previous post (#11) there are two types of splines in AutoCAD, “old” splines and “new” splines. The DXF output for old splines is a series of chords specified as a series of vertex statements (see post #9). . . . .


    It is interesting to note that the AutoCAD software automatically create more chords (segments) where the spline has a small radius of curvature and fewer chords where the spline curvature is flatter.

    If the DXF file contains the definition of a “new” spline the file will have the location of the CV points instead of a series of vertices. In this case, if the post processor does not include software for converting CV points into a series of chords it will not be able to cut the smooth curve.

    . . . .

    Lee
    I’m willing to accept that the current state of the art translates any curve to incremental linear movements. But clearly there is more to it than that. None of the CNC shops ever complain about Arcs and Circles. They would complain about faceted curves (Fonts geometry converted to polys, for example) because the constant accel/deccelerations at the vertices was tough on the equipment and/or the material being cut (again, similarly as stated by the OP).

    The processor must interpret the micro- faceting of the G02-G03 in such a fashion as to eliminate the harsh accelerations. I suspect that the same applies to Bezier curves.

    Even if a Pipeline’s processor could handle Beziers, though, it may not handle B-Splines through Nurbs Splines. Hence the rejection of any AutoCAD based file containing such. And, consequently, the mad scramble by the CAD jockey to reduce everything back to short line segments (Let the vendor complain that I’m vibrating his CNC equipment to death).

    So this raises the question: If a CAD jockey uses splines, what format to use? If you’re saying an “Old Spline” is just a bunch of straight segments – that doesn’t help the CNC vendor (though, the jockey could set SPLINESEGS to a negative value and at least send tangent arcs). But is there any way to generate curved geometry in AutoCAD that mimics what comes from Adobe Illustrator, i.e., CNC compatible Bezier Curves?

  10. #20
    Senior Member lrm's Avatar
    Computer Details
    lrm's Computer Details
    Operating System:
    Windows 7 64-bit
    RAM:
    16 GB
    Discipline
    Education
    lrm's Discipline Details
    Occupation
    Teacher, AEC and mechanical
    Discipline
    Education
    Details
    Civil and Mechanical
    Using
    AutoCAD 2014
    Join Date
    Jan 2010
    Location
    Massachusetts, USA
    Posts
    341

    Default

    Registered forum members do not see this ad.

    is there any way to generate curved geometry in AutoCAD that mimics what comes from Adobe Illustrator, i.e., CNC compatible Bezier Curves?
    Can you post an output file of a single "S" shaped spline from Illustrator?

Similar Threads

  1. Drawing curves
    By chfarley in forum AutoCAD Beginners' Area
    Replies: 1
    Last Post: 9th Jun 2011, 02:37 pm
  2. Contours with curves?
    By longcrier in forum Civil 3D & LDD
    Replies: 7
    Last Post: 5th Dec 2008, 07:08 pm
  3. Easement curves?
    By Ratbacto in forum AutoCAD Drawing Management & Output
    Replies: 12
    Last Post: 12th Nov 2007, 04:23 am
  4. Curves
    By TheTank in forum AutoCAD General
    Replies: 4
    Last Post: 27th Dec 2005, 10:51 pm
  5. curves
    By morlando in forum AutoCAD General
    Replies: 2
    Last Post: 14th Apr 2005, 05:17 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts