center points for holes ?

Discussion in 'AutoCAD' started by Z, Jan 30, 2004.

  1. Z

    Z Guest

    Good day all
    I need some help with Autocad.

    I have recieved a drwaing from a client with about 400 holes on a plate. I
    need to create a CNC proram with this dwg. To do this I need center points
    for each hole. Is there a method with which AutoCad can put a point in the
    center of each hole automatically ?

    Thanking all in advance


    Rui
     
    Z, Jan 30, 2004
    #1
  2. Z

    B. W. Salt. Guest

    I don't understand why you need to put a point in the centre of each hole.
    If the drawing is dimensioned, then the holes will be dimensioned to their
    centres anyway.

    Doesn't your CNC system use a dxf version of the drawing to obtain the CNC
    data?
     
    B. W. Salt., Jan 30, 2004
    #2
  3. Z

    P.C. Guest

    Hi

    With AutoCAD you shuld check the system var. Pdmode and Pdsize.
    Changing that you have a number of different types of "points" from a
    single dot to a circle with a cross or an X or -- or almost whatever
    symbol for a "point".

    When you changed the two var's it is no problem to make an array of dots,
    the Array command will ask you the distance X and Y between the dots and how
    many and make exactly what you ask.

    P.C.
    http://home20.inet.tele.dk/h-3d/
     
    P.C., Jan 30, 2004
    #3
  4. Z

    Z Guest

    Tahnks for the help.

    Can't use the array command because the holes are in no fixed pattern. Holes
    all over the place.
     
    Z, Jan 30, 2004
    #4
  5. Z

    Z Guest

    I can import direct to CAM but I still need the center points to create a
    drilling pattern.

    Thanks anyway
     
    Z, Jan 30, 2004
    #5
  6. Try with Lisp code, good luck...


    (defun C:centers ()
    (setq circle_set (ssget))
    (setq i 0)

    (while (< i (sslength circle_set))
    (progn

    (setq crcl (entget (ssname circle_set i)))
    (setq x (nth 1 (assoc 10 crcl))
    y (nth 2 (assoc 10 crcl)))
    (setq ctpt (list x y))
    (command "_point" ctpt)
    (setq i (+ i 1))
    )
    )
    )
     
    Sinisa Knezevic, Jan 30, 2004
    #6
  7. .....of course, if you mean hole=circle
     
    Sinisa Knezevic, Jan 30, 2004
    #7
  8. Z

    CW Guest

    This works fine if the holes are in regular pattern. I get the impression
    that they aren't.
     
    CW, Jan 30, 2004
    #8
  9. Z

    Paul Turvill Guest

    Perhaps not "automatically" but the DIMCENTER command places a small cross
    at the center of a circle. Otherwise, you might consider a small LISP
    program:

    (defun C:CTRPT (/ ss n elist ctr)
    (setq ss (ssget "X" '((0 . "CIRCLE")))
    n (1- (sslength ss))
    );; setq
    (while (>= n 0)
    (setq elist (entget (ssname ss n))
    ctr (cdr (assoc 10 elist))
    n (1- n)
    );; setq
    (entmake
    (list
    '(0 . "POINT")
    (cons 10 ctr)
    );; list
    );; entmake
    );; while
    (princ)
    );; defun

    You may have to adjust PDMODE and PDSIZE to get the appearance you need.
    ___
     
    Paul Turvill, Jan 30, 2004
    #9
  10. Z

    CW Guest

    The software wouldn't be able to read the dimensions. Just knowing where the
    edges of the holes are works fine if you are milling/burning them. If you
    are drilling them, you need a center point for a target.
     
    CW, Jan 30, 2004
    #10
  11. Z

    B. W. Salt. Guest

    That does the job very well!
    Just set your 'Point' style first (dot, cross, etc.).
     
    B. W. Salt., Jan 30, 2004
    #11
  12. Z

    B. W. Salt. Guest

    Hmm. For a laser cutting machine I only need to supply the dxf, with no
    dimensions at all. Has to be accurate and full size, of course! Hole
    centres are not marked, but the holes are to size also. No good changing a
    hole dimension in the design without changing the actual hole size...
     
    B. W. Salt., Jan 30, 2004
    #12
  13. Z

    CW Guest

    Same way for a mill. The difference is that with your laser, it is cutting
    the profile of the holes. That can be done on a mill too by milling the
    holes to size with an end mill but it is far more economical, for average
    size round holes, to drill them. In that case, there needs to be a center
    mark to locate the drill.
     
    CW, Jan 31, 2004
    #13
  14. Yes, I guess that 'Point' in this case should be set according CAM
    software...I dunno much about CAD/CAM software relations so I guess only...
     
    Sinisa Knezevic, Jan 31, 2004
    #14
  15. Z

    Glen Appleby Guest

    You have received a number of interesting replies that involve
    LISP functions.

    If that doesn't work for you because you need to implement it
    differently, try just setting the running OSNAP to "center" then
    use the POINT command on each hole (if you prefer to do it
    manually). It would, then, be simply
    POINT
    < mouse click>
    <RETURN>
    <RETURN>
    <RETURN>
    (etc., until you8 have established center points for all of the
    holes)
     
    Glen Appleby, Jan 31, 2004
    #15
  16. Paul,

    DIMCENTER is one circle at a time.

    The lisp routine would get all at once.

    Just got to love it.

    W. Kirk Crawford
    Rochester Hills, Michigan
     
    W. Kirk Crawford, Jan 31, 2004
    #16
  17. Z

    R Wink Guest

    FWIW; I have a list routine called "circnt.lsp" (I think) that outputs
    the circle centers to a comma delimited text file. I use R14 and 2K2
    and it works in both as best I remember. It outputs the "X," "Y," and
    "Z" dimensions (based on the "0,0" point in the drawings. It also
    outputs the layer and the circle size (based on the number of places
    set in the precision variable). I import into Excel and sort basd on
    the layer and remove unwanted holes.
    Is this anything like what you want?
    R. Wink
     
    R Wink, Jan 31, 2004
    #17
  18. Z

    Paul Turvill Guest

    No.
    ___
     
    Paul Turvill, Feb 1, 2004
    #18
  19. Z

    CW Guest

    Paul, do you always give such long winded explanations? :) :)
     
    CW, Feb 1, 2004
    #19
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.