PDA

View Full Version : Addition to Revision Cloud



martyk
2004-07-14, 08:10 PM
Greetings all! Is there a Lisp routine out there that will turn a shape drawn with the polyline command, or even a circle, into the "bumps" of the revision cloud? Thanks!

sinc
2004-07-14, 08:45 PM
Plain vanilla AutoCAD includes the REVCLOUD command that does exactly that (at least in 2004; I don't know about earlier versions)...

martyk
2004-07-15, 01:26 PM
Thanks for your input Richards.64879! We are currently using AutoCad 2002 but I went to another machine which has 2005 on it and it works exactly as you said it would. I'll just wait for 2005 as we are looking to roll that out here very soon. Thanks again!

jhohman
2004-07-15, 01:46 PM
The REVCLOUD command is available in 2002, but it is part of the express tools only, Autodesk must have added it to "vanilla" AutoCAD with the 2004 release.

CAB2k
2004-07-24, 05:53 PM
You may want to try my pl2cloud routine.
Found here.
http://www.theswamp.org/forum/index.php?topic=1319.0

You may need to register to view this forum. So if you don't go directly to the link,
just register, it's free, and you will ba able to download it.

CAB

peter
2004-07-25, 04:45 PM
Here is a simple revision cloud program


The original question was could you turn an existing polyline into a cloud.

(cloudx2 (car (entsel)))) will do that with loading the routines below.

The there might be a problem with the direction of the bulges. The bulge routine below changes their orientation.

Peter Jamtgaard



(defun C:Cloud (/ entSelection)
(vl-load-com)
(princ "\nDraw polyline clockwise around area: ")
(vl-cmdf "pline")
(setq entSelection (entlast))
(while (= (getvar "cmdactive") 1)
(vl-cmdf pause)
)
(if (/= entSelection (entlast))(cloudx2 (entlast)))
)
(defun Cloudx2 (entSelection / objSelection
sngIncrement
sngLength
sngPosition
ssSelections)
(if debug (princ "\nCloudx2 "))
(setq objSelection (vlax-ename->vla-object entSelection)
)
(vla-put-closed objSelection :vlax-true)
(initget 6)
(if (not (setq sngDist (getdist "\nEnter relative arc diameter ")))
(setq sngDist 0.125)
)

(setq sngLength (vlax-curve-getDistAtParam objSelection
(vlax-curve-getEndParam objSelection)
)
sngPosition 0
sngIncrement (* (getvar "dimscale")
sngDist
)

)
(setvar "cmdecho" 0)
(while (< sngPosition (- sngLength sngIncrement))
(vl-cmdf "arc")
(vl-cmdf (vlax-curve-getPointAtDist objSelection sngPosition))
(setq sngPosition (+ sngPosition sngIncrement))
(vl-cmdf "E")
(vl-cmdf (vlax-curve-getPointAtDist objSelection sngPosition))
(vl-cmdf "Angle" 180)
(if ssSelections
(setq ssSelections (ssAdd (entlast) ssSelections))
(setq ssSelections (ssAdd (entlast)))
)
)
(vl-cmdf "arc")
(vl-cmdf (vlax-curve-getPointAtDist objSelection sngPosition))
(vl-cmdf "E")
(vl-cmdf (vlax-curve-getPointAtDist objSelection 0))
(vl-cmdf "Angle" 180)
(vl-cmdf "pedit" (entlast) "y" "j" ssSelections "" "")
(entdel entSelection)
)

(defun C:BULGE (/ CNT COORDS DIV EOBJ )
(setq EOBJ (vlax-ename->vla-object (car (entsel "Select pline: "))))
(if EOBJ
(progn
(setq COORDS (vlax-safearray->list
(vlax-variant-value
(vla-get-coordinates EOBJ)
)
)
)
(setq CNT 0)
(if (or (= (vla-get-objectname EOBJ) "AcDb2dPolyline")
(= (vla-get-objectname EOBJ) "AcDb3dPolyline")
)
(setq DIV 3)
(setq DIV 2)
)
(while (< CNT (/ (length COORDS) DIV))
(if (< (vla-getbulge EOBJ CNT) 0.0)
(vla-setbulge EOBJ CNT 1.0)
(vla-setbulge EOBJ CNT -1.0)
)
(setq CNT (1+ CNT))
)
)
)
(prin1)
)

CHRIS.HAMMOND39575
2004-08-04, 06:19 AM
Hi,

Release 10 came with this Cloud routine. It works well but if you can figure out how to change the colour to 'bylayer' it would make it even easier.

Chris

robert_l_bob_tucker
2004-08-05, 02:45 PM
I have attached (I hope I did it correctly) a .txt file to this thread name Ortho_cloud.txt. You can simply change the extension to .lsp if you want. The routine draws a revision cloud along a straight path, the intent was to provide a clean cloud where drawings are conjested. Try it and if you like it let me know.

Bob Tucker

dgonzales
2010-06-01, 07:00 PM
I have attached (I hope I did it correctly) a .txt file to this thread name Ortho_cloud.txt. You can simply change the extension to .lsp if you want. The routine draws a revision cloud along a straight path, the intent was to provide a clean cloud where drawings are conjested. Try it and if you like it let me know.

Bob Tucker

AWESOME!!!
Totally works. Instructions are a little confusing at first but the .lsp totally works.

THANKS!!