Page 1 of 2 12 LastLast
Results 1 to 12 of 17

Thread: curve fitting a set of coordinates

  1. #1
    Registered
    Join Date
    Sep 2004
    Location
    usa
    Posts
    50
    Downloads
    0
    Uploads
    0

    curve fitting a set of coordinates

    Does anyone know of a software that can take a csv or dwg file consisting of a set of x and y coordinates that describes an arc and identify the best fitting curve? I am working on a CNC grinder that is making a curved edge but the encoder that I am using leaves some jitter so that the programmed moves are not one continuous arc like move but instead many short segments that do not leave a smooth shape. I am using BobCad and Mach3.

    Thanks


  2. #2
    Registered
    Join Date
    May 2004
    Location
    United States
    Posts
    4,519
    Downloads
    0
    Uploads
    0
    Dunno your software, but most CAD software has a spline function and you can define the smoothness.
    http://www.kirkcon.com/


  3. #3
    Registered BurrMan's Avatar
    Join Date
    Dec 2008
    Location
    usa
    Posts
    2,610
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by thespindoc View Post
    Does anyone know of a software that can take a csv or dwg file consisting of a set of x and y coordinates that describes an arc and identify the best fitting curve? I am working on a CNC grinder that is making a curved edge but the encoder that I am using leaves some jitter so that the programmed moves are not one continuous arc like move but instead many short segments that do not leave a smooth shape. I am using BobCad and Mach3.

    Thanks
    Moi3d

    rhino3d

    You are looking for software that reads point data.

    post a sample file.


  4. #4
    Registered
    Join Date
    Sep 2004
    Location
    usa
    Posts
    50
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by BurrMan View Post
    Moi3d

    rhino3d

    You are looking for software that reads point data.

    post a sample file.
    here are a few points from the file
    they are only significant to .001 I really hope to use the
    points to identify the location of the part, then program
    an ideal arc move rather that a point to point move so I need
    to identify one large arc in the 8-9 foot radius range and another
    toward one end in the 4 foot range.

    -2.88209,-0.69001968891367
    -2.90209,-0.68601968825802
    -2.92209,-0.68301968962893
    -2.94209,-0.67901968897328
    -2.96209,-0.6760196828936
    -2.98209,-0.67301968426451
    -3.00209,-0.67101968766197
    -3.02209,-0.67001968563542
    -3.04209,-0.66801968903288
    -3.06209,-0.66601968497977
    -3.08209,-0.66401968837723
    -3.10209,-0.66101968974814
    -3.12209,-0.65901968569502
    -3.14209,-0.65701968909249
    -3.16209,-0.65401968301281
    -3.18209,-0.6520196789597
    -3.20209,-0.65001968980774
    -3.22209,-0.64801968575463
    -3.24209,-0.64501967967495
    -3.26209,-0.643019690523
    -3.28209,-0.64101968646988
    -3.30209,-0.63801968039021
    -3.32209,-0.63601969123825
    -3.34209,-0.63401968718514
    -3.36209,-0.63201968313202
    -3.38209,-0.62901969195351
    -3.40209,-0.62701968790039
    -3.42209,-0.62501968384728
    -3.44209,-0.62301967979416
    -3.46209,-0.62001968861565
    -3.48209,-0.61801968456253
    -3.50209,-0.61601968050942
    -3.52209,-0.61401969135746
    -3.54209,-0.61101968527779
    -3.56209,-0.60901968122467
    -3.58209,-0.60701969207272
    -3.60209,-0.6050196880196
    -3.62209,-0.60301968396649
    -3.64209,-0.60101967991337
    -3.66209,-0.59901969076142
    -3.68209,-0.5970196867083
    -3.70209,-0.59501968265518
    -3.72209,-0.59201969147667
    -3.74209,-0.59001968742356
    -3.76209,-0.58801968337044
    -3.78209,-0.58601967931732
    -3.80209,-0.58401969016537
    -3.82209,-0.58201968611225
    -3.84209,-0.58001968205914
    Last edited by thespindoc; 09-24-2011 at 12:37 AM.


  • #5
    Registered
    Join Date
    May 2004
    Location
    United States
    Posts
    4,519
    Downloads
    0
    Uploads
    0
    First I took you points list and created X, Y coordinates with it in G-code format.

    Then I opened that file with PowerStation G-code Analyzer and output a DXF file.

    Then I opened the DXF file with MasterCAM X3 to see the line segments.

    Then I added the points to the end points of the line segments for clarity.

    Then I constructed 2 arcs that seemed to best match the points.

    See attachments.
    Attached Thumbnails Attached Thumbnails curve fitting a set of coordinates-points.jpg  
    Attached Files Attached Files
    http://www.kirkcon.com/


  • #6
    Registered BurrMan's Avatar
    Join Date
    Dec 2008
    Location
    usa
    Posts
    2,610
    Downloads
    0
    Uploads
    0
    I was a bit confused about how these points would define the 9 and 4 foot arcs you described, but I took a page from txcncman's previous post and defined them as he did.

    This file will contain the imported points, the curve that defines them and a 9 foot arc and a 4 foot arc going through the 2 endpoints of the segment that was imported...

    If I ran a Tangent circle command on the 2 endpoints and ran along the curve anywhere, the best I could get was around a 40 inch arc (txcncman posted a 50 inch one I believe) So I just defined the 2 arcs at the dims you specified, then I rotated them to run through the points????

    curve fitting a set of coordinates-points_arcmove.jpg

    Anyway, maybe you could expound more about what you were looking for from these points?
    Attached Files Attached Files


  • #7
    Registered
    Join Date
    Sep 2004
    Location
    usa
    Posts
    50
    Downloads
    0
    Uploads
    0
    Thanks for all the input!

    What I am doing is developing a CNC ice skate sharpening machine, The blades
    I am working with now are about 12 inches long. They are built with an initial shape
    using an 8 or 9 foot radius circular arc over most of the blade but toward the front
    the shape varies with 1 or 2 smaller arcs. I believe splines will not be as good as
    one arc so I am trying to use the array of X/Y coordinates to locate the blade in
    space and then I can sharpen using point to point moves for blades that are old
    and have had many sharpenings but being able hopefully to gradually correct the
    shape with subsequent sharpenings. I hope with new blades to just use the location
    of the blade and describe the arcs for a smoother more consistent shape or
    idealized shape that I can hold over time with subsequent sharpenings. I believe,
    but have not tried any analysis, that programming a G03 arc will give a better shape
    than following the point to point move.

    I have also done the dxf import from G code and it works but finding the arcs and getting
    them to fit is time consuming and trying to get the arcs to line up with the points accurately
    is pretty difficult with BobCad/Cam. Hopefully I can automate the process mathematically
    from CB.

    The file I have uploaded is from a blade that is
    old and sharpened incorrectly so it is not representative but presents a worst
    case scenario. The front of the blade is to the right and it is lying horizontally on its side with the setup like a desktop mill and the grinding wheel is horizontal. It has been a labor of love over several years - love of CNC, love of fabrication, love of machining and love of skating!

    Thanks again!
    Keith
    Attached Files Attached Files


  • #8
    Registered BurrMan's Avatar
    Join Date
    Dec 2008
    Location
    usa
    Posts
    2,610
    Downloads
    0
    Uploads
    0
    Hi Spin,
    So if your contouring runners, I would think you would setup a template off of the blade type and ignore the existing cut:

    curve fitting a set of coordinates-blade_contouring.jpg

    Then you want to apply "your method" to that jig to reshape the blades:

    curve fitting a set of coordinates-blade_contouring_jig.jpg

    So you already have "your method" layed out and ready to go, and are just looking to "place the jig" to apply and remove the least amout needed to reshape the blade???

    Here is a file with the points and curve from your last post. I included a bounding box of the curve, one inch up in Y, from the curve.

    The definition of the optimal placement of your "method" would need to come from a sampling of "your perfect shape" along the "sloppy existing cut" to determine the furthest point need to be cut, to place the new contour?
    Attached Files Attached Files


  • #9
    Registered
    Join Date
    Sep 2004
    Location
    usa
    Posts
    50
    Downloads
    0
    Uploads
    0
    Yes that is the ticket!

    Just need to program alignment of "perfect shape" along the "sloppy existing cut" to determine the furthest point need to be cut, to place the new contour. Otherwise, a good blade would just need a standard contour dropped onto the old edge.

    Very Helpful Thanks!

    Keith


  • #10
    Registered BurrMan's Avatar
    Join Date
    Dec 2008
    Location
    usa
    Posts
    2,610
    Downloads
    0
    Uploads
    0
    Ok, on the same page...

    MoI has an existing command to iterate out a line at a .001 interval for the 2 curves. Here's a dramatic representation of what that looks like.

    curve fitting a set of coordinates-lineweb_perp_distance.jpg

    We would need to script it to see if could could determine the "furthest point" between the 2 and just output that location to give your result distance needed...

    I could ask the developer to see if he could cook it up, or you could join the MoI forum and ask yourself...

    If MoI cant perform this, you may need a higher end software that can perform the analysis between the 2 curves to locate the point. (Dont want to have to manually measure 200 lines!! > )

    Let me know if you want me to check, or I'll see it go by in the MoI forum...


  • #11
    Registered
    Join Date
    Sep 2004
    Location
    usa
    Posts
    50
    Downloads
    0
    Uploads
    0
    Burr,

    MoI looks very interesting. If I understand, I would then be able to look at the line lengths as a statistic to report variance from the ideal standard and know were the problem areas were? Should be able though to do it with algebraic formulas in a point by point analysis in basic?

    Keith
    Last edited by thespindoc; 09-25-2011 at 01:45 AM.


  • #12
    Registered BurrMan's Avatar
    Join Date
    Dec 2008
    Location
    usa
    Posts
    2,610
    Downloads
    0
    Uploads
    0
    Yeah, you could write your own program to do that too.. I just asked in the MoI forum if it could be scripted .. If it does, you could just import your point file against the optimal curve and hit a button and have your location... BTW: MoI's scripting interface is JavaScript.

    I'll post back here with the answer.. If it will, I'll also post an example...

    You could look at the MoI forum for the response too.. It will probably come in a few minutes!!! lol


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Need Help!- IMG to Coordinates
      By YoJoey in forum General Laser Engraving & Cutting Machine Discussion
      Replies: 4
      Last Post: 01-28-2011, 03:57 AM
    2. Newbie- Program coordinates
      By Kristy in forum FlashCut CNC
      Replies: 2
      Last Post: 01-19-2011, 03:31 PM
    3. entering curve using coordinates
      By spincaster in forum Rhino 3D
      Replies: 1
      Last Post: 11-16-2009, 03:06 PM
    4. Workpiece coordinates
      By jeffm in forum General CNC (Mill and Lathe) Control Software (NC)
      Replies: 2
      Last Post: 11-10-2008, 07:43 PM
    5. G92 coordinates
      By monaro mike in forum Fanuc
      Replies: 12
      Last Post: 07-28-2008, 08:27 AM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.