center points for holes ?

Jan 30, 2004 18 Replies

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


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 versi> Good day all

Hi

"Z" skrev i en meddelelse news: snipped-for-privacy@news1.mweb.co.za...

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.

formatting link

Tahnks for the help.

Can't use the array command because the holes are in no fixed pattern. Holes all over the place.

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

Thanks anyway

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)) ) ) )

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. ___

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.

That does the job very well! Just set your 'Point' style first (dot, cross, etc.).

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...

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.

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>

(etc., until you8 have established center points for all of the holes)

-- "Who we are and who we become depends, in part, on whom we love."

-- "A General Theory Of Love" Thanks, Mom ______________________________________________________________ Glen Appleby snipped-for-privacy@armory.com

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

Paul Turvill wrote:

I wonder if OSNAP CEN POINT ALL would work?

-Mike-

Paul, do you always give such long winded explanations? :) :)

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required