TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started 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 ?
-
Great question, I would like an answer also...
-
that would be a great answer, if any :)
-
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,
-
it is possible to use circles of certain line type
-
Nice one VovKa, great idea!
-
vovka ~
thank you good idea
but i wonder how can do that still .
can you explain more detaily ?
-
It looks reasonable, but it is far from perfect, as there are a couple of 'holes' towards the lower quadrant of the circle
-
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
-
To reply on my own code:
Be aware, just sample code, needs error checking,etc...
Also osnap off.
Jimmy
-
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