jgratton
2004-11-05, 05:51 PM
The following is being used here on all vanilla Autocad drawings. (We also use third party software on our piping drawing that has its own clouding routine but this is not a problem.)
The problem is we can't seem to control the segment width of the cloud; it depends on the length between picks. We would like all our clouds to appear the same thickness when plotted. We plot everything to fit 11X17, but most of our drawings are actually 726X508 (mm)
; CLouD.LSP < Great CLOUD Routine > Ed Gyulai 2002-03-20
; < based off an older routine that did not work well. >
(defun C:CLD ()
(setq clay (getvar "clayer"))
(if (tblsearch "LAYER" "Clouds")
(command "-layer" "t" "Clouds" "m" "Clouds"
"c" "1" "Clouds" "" "-color"
"bylayer"
)
(command "-layer" "m" "Clouds" "c" "1" "Clouds" "" "-color"
"bylayer")
) ;if
(princ)
(setvar "cmdecho" 0)
(setq p1 (getpoint "\n - Pick CLOUD start point: ")
p2 p1
dia1 (getdist p1 "\n - Show Next Point of Cloud ... ")
) ;
(setq w1 (* dia1 0.04))
(prompt "\n - Freehand Cloud, then return to start ....")
(command "pline" p1 "w" w1 w1 "a" "a" "125")
(while p1
(setq p3 (cadr (grread 1)))
(if (> (distance p1 p3) dia1)
(progn
(command p3 "a" "125")
(setq p1 p3)
)
)
(if (> (distance p1 p3) (distance p2 p3))
(progn
(command p2 "cl")
(setq p1 nil)
)
)
) ;if;while
(command "plinewid" "0")
(command "-layer" "s" clay "")
(princ
"\n - Cloud Completed... <note: normal direction is counter-clockwise>"
)
(princ)
);end
;(c:CLD)
The problem is we can't seem to control the segment width of the cloud; it depends on the length between picks. We would like all our clouds to appear the same thickness when plotted. We plot everything to fit 11X17, but most of our drawings are actually 726X508 (mm)
; CLouD.LSP < Great CLOUD Routine > Ed Gyulai 2002-03-20
; < based off an older routine that did not work well. >
(defun C:CLD ()
(setq clay (getvar "clayer"))
(if (tblsearch "LAYER" "Clouds")
(command "-layer" "t" "Clouds" "m" "Clouds"
"c" "1" "Clouds" "" "-color"
"bylayer"
)
(command "-layer" "m" "Clouds" "c" "1" "Clouds" "" "-color"
"bylayer")
) ;if
(princ)
(setvar "cmdecho" 0)
(setq p1 (getpoint "\n - Pick CLOUD start point: ")
p2 p1
dia1 (getdist p1 "\n - Show Next Point of Cloud ... ")
) ;
(setq w1 (* dia1 0.04))
(prompt "\n - Freehand Cloud, then return to start ....")
(command "pline" p1 "w" w1 w1 "a" "a" "125")
(while p1
(setq p3 (cadr (grread 1)))
(if (> (distance p1 p3) dia1)
(progn
(command p3 "a" "125")
(setq p1 p3)
)
)
(if (> (distance p1 p3) (distance p2 p3))
(progn
(command p2 "cl")
(setq p1 nil)
)
)
) ;if;while
(command "plinewid" "0")
(command "-layer" "s" clay "")
(princ
"\n - Cloud Completed... <note: normal direction is counter-clockwise>"
)
(princ)
);end
;(c:CLD)