TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: dussla on September 21, 2008, 08:09:31 AM

Title: circular hatch draw
Post by: dussla on September 21, 2008, 08:09:31 AM
hello , friend
i am studying pave design
but i met problem.
cad hatch system  didn't draw circle hatch  below image
how can i draw hatch like this image ?
is there good app ?
Title: Re: circular hatch draw
Post by: GDF on September 21, 2008, 01:29:08 PM
Great question, I would like an answer also...
Title: Re: circular hatch draw
Post by: VovKa on September 21, 2008, 03:25:38 PM
that would be a great answer, if any :)
Title: Re: circular hatch draw
Post by: Bob Wahr on September 21, 2008, 06:55:00 PM
I don't know of any way to do it other than polar array.  It won't give you a hatch but will put the pavers in,
Title: Re: circular hatch draw
Post by: VovKa on September 22, 2008, 03:32:25 AM
it is possible to use circles of certain line type
Title: Re: circular hatch draw
Post by: MickD on September 22, 2008, 04:37:19 AM
Nice one VovKa, great idea!
Title: Re: circular hatch draw
Post by: dussla on September 22, 2008, 05:19:41 AM
vovka ~
thank you good idea
but i wonder how can do that still .
can you explain more detaily ?
Title: Re: circular hatch draw
Post by: New Shooz on September 22, 2008, 08:24:46 AM
It looks reasonable, but it is far from perfect, as there are a couple of 'holes' towards the lower quadrant of the circle
Title: Re: circular hatch draw
Post by: Jimmy D on September 22, 2008, 08:38:58 AM
Could something like this be of any help??

(defun c:CircBricks ()
(defun RadToDeg (Rads)
  (* 180.0 (/ Rads pi))
)
(setq ID (getreal "\nGive Inner Diameter..."))
(setq OD (getreal "\nGive Outer Diameter..."))
(setq BL (getreal "\nGive Brick Length..."))
(setq BW (getreal "\nGive Brick Width..."))
(setq CP (getpoint "\nSelect centerpoint of Circle..."))
(setq Pos 1)
(setq R1 (/ ID 2))
(setq End "No")
(while (= End "No")
(setq Angle1 (* (radtodeg (atan (/ BL 2.00000) (/ ID 2.00000))) 2.00000 ))
(setq R2 (sqrt (+ (expt (+ R1 BW) 2.000)(expt (/ BL 2.000) 2.000))))
(setq ItemsInCircle (fix (/ 360 Angle1)))
(setq PtRc1 (list (- (car CP)(/ BL 2.000))(+ (cadr CP)(* (/ ID 2.000) POS))))
(setq PtRc2 (list (+ (car CP)(/ BL 2.000))(+ (cadr PtRc1) (* BW POS))))
(command "_rectangle" PtRc1 PtRc2)
(command "-array" (entlast) "" "p" CP ItemsInCircle 360 "y")
(setq R1 R2)
(setq ID (* R1 2))
(if (< R2 (/ OD 2))(setq End "No")(setq End "Yes"))
(setq Pos (* POS -1))
);end while
)


Jimmy
Title: Re: circular hatch draw
Post by: Jimmy D on September 22, 2008, 08:40:45 AM
To reply on my own code:

Be aware, just sample code, needs error checking,etc...
Also osnap off.

Jimmy
Title: Re: circular hatch draw
Post by: VovKa on September 22, 2008, 02:26:14 PM
vovka ~
thank you good idea
but i wonder how can do that still .
can you explain more detaily ?
here are sample files to start with
edit test.lin to add more brick sizes