Jump to content

Editing arc length of revcloud.lsp after it is drawn


notredave

Recommended Posts

Hello all,

 

I have tons of drawings that I have to go back in and edit the arc lengths of the revision cloud command that comes with acad 2012. Is there a lisp routine out there that anyone has that would share with me to accomplish this? Or, tell me how this can be done.

 

Thanks in advance,

David

Link to comment
Share on other sites

Since a revcloud is simply an LWPolyline with arc segments, AutoCAD no longer recognises the object as a revcloud after it has been created. In order to alter the arc length whilst retaining the appearance of a revcloud (i.e. without modifying the bulge of each arc segment), the program would need to calculate & reposition every vertex of the LWPolyline, essentially recreating the revcloud command. With this in mind, I agree with Organic that it would be simpler to redraw the revcloud.

Link to comment
Share on other sites

I suspected these might be the informed responses. If you have to redraw, note that it might go faster if you create an Object, such as a RECTANGLE, then convert that to your revision cloud using the Object option. This process might be a candidate for some LISP programming, e.g., creating a bounding rectangle for a selected object, then converting that rectangle using REVCLOUD. This may be the sort of thing nod684's tip accomplishes, but someone else will have to determine that.

Link to comment
Share on other sites

Just use revcloud and Object option again with the new arc length, click on the old revcloud. You should get a new revcloud with the new arc length, delete the old one. You might be able to automate this with a script or LISP.

  • Like 1
Link to comment
Share on other sites

Just use revcloud and Object option again with the new arc length, click on the old revcloud. You should get a new revcloud with the new arc length, delete the old one. You might be able to automate this with a script or LISP.
I didn't think of this. I do notice that it retains the old arc lengths, if they are larger, and just makes new arc lengths within the old. Could make for some interesting patterns. Fractals, anyone?
Link to comment
Share on other sites

Just use revcloud and Object option again with the new arc length, click on the old revcloud. You should get a new revcloud with the new arc length, delete the old one. You might be able to automate this with a script or LISP.

 

Nice idea SLW :thumbsup:

 

The following code should automate the task should the OP decide to follow this route:

([color=BLUE]defun[/color] c:rcupd ( [color=BLUE]/[/color] i s )
   ([color=BLUE]if[/color] ([color=BLUE]setq[/color] s ([color=BLUE]ssget[/color] (LM:RevCloudFilter)))
       ([color=BLUE]repeat[/color] ([color=BLUE]setq[/color] i ([color=BLUE]sslength[/color] s))
           ([color=BLUE]command[/color] [color=MAROON]"_.revcloud"[/color] [color=MAROON]"_O"[/color] ([color=BLUE]ssname[/color] s ([color=BLUE]setq[/color] i ([color=BLUE]1-[/color] i))) [color=MAROON]"_N"[/color])
       )
   )
   ([color=BLUE]princ[/color])
)

[color=GREEN];; RevCloud Selection Filter  -  Lee Mac[/color]
[color=GREEN];; Returns an ssget filter list permitting selection of revision clouds[/color]

([color=BLUE]defun[/color] LM:RevCloudFilter ( [color=BLUE]/[/color] bulge fuzz )
   ([color=BLUE]setq[/color] bulge (([color=BLUE]lambda[/color] ( a ) ([color=BLUE]/[/color] ([color=BLUE]sin[/color] a) ([color=BLUE]cos[/color] a))) ([color=BLUE]/[/color] ([color=BLUE]*[/color] 11.0 [color=BLUE]pi[/color]) 72.0))
         fuzz  1e-4
   )
   ([color=BLUE]list[/color]
      '(0 . [color=MAROON]"LWPOLYLINE"[/color])
      '(-4 . [color=MAROON]"<OR"[/color])
          '(-4 . [color=MAROON]"<NOT"[/color])
              '(-4 . [color=MAROON]"<OR"[/color])
                  '(-4 . [color=MAROON]">="[/color])
                   ([color=BLUE]cons[/color] 42 ([color=BLUE]+[/color] bulge fuzz))
                  '(-4 . [color=MAROON]"<="[/color])
                   ([color=BLUE]cons[/color] 42 ([color=BLUE]-[/color] bulge fuzz))
              '(-4 . [color=MAROON]"OR>"[/color])
          '(-4 . [color=MAROON]"NOT>"[/color])
          '(-4 . [color=MAROON]"<NOT"[/color])
              '(-4 . [color=MAROON]"<OR"[/color])
                  '(-4 . [color=MAROON]">="[/color])
                   ([color=BLUE]cons[/color] 42 ([color=BLUE]+[/color] ([color=BLUE]-[/color] bulge) fuzz))
                  '(-4 . [color=MAROON]"<="[/color])
                   ([color=BLUE]cons[/color] 42 ([color=BLUE]-[/color] ([color=BLUE]-[/color] bulge) fuzz))
              '(-4 . [color=MAROON]"OR>"[/color])
          '(-4 . [color=MAROON]"NOT>"[/color])
      '(-4 . [color=MAROON]"OR>"[/color])
   )
)

([color=BLUE]princ[/color])

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...