Results 1 to 8 of 8

Thread: LISP THAT WILL DRAW A POLYINE WITH A SET RADIUS ON THE FLY

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I could stop if I wanted to
    Join Date
    2005-08
    Posts
    378
    Login to Give a bone
    0

    Cool LISP THAT WILL DRAW A POLYINE WITH A SET RADIUS ON THE FLY

    Guys,
    Does anyone have a routine that will allow the user to set a radius and then start drawing polylines and all angles will be filletted to that radius ?

    Stephen

  2. #2
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: LISP THAT WILL DRAW A POLYINE WITH A SET RADIUS ON THE FLY

    Hi Stephen,
    Take a look at FILLETRAD system variable
    in the Help file

  3. #3
    I could stop if I wanted to
    Join Date
    2005-08
    Posts
    378
    Login to Give a bone
    0

    Cool Re: LISP THAT WILL DRAW A POLYINE WITH A SET RADIUS ON THE FLY

    Thank you Fixo for tour reply.
    It isn't correct though something like this ?

    Code:
    (defun c:Fpline (/ pl)
      (command "-layer"	    "m"		     "-M-DUCT"
    	   "C"		    "4"	             "-M-DUCT"
    	   "Lt"		    "CONTINUOUS"     "-M-DUCT"
    	   ""
    	  )
      (princ "Use ESC to exit loop")
      (setvar "plinewid" 100)
      (setvar "filletrad" 600)
      (while (not
    	   (vl-catch-all-error-p
    	     (vl-catch-all-apply
    	       (function
    		 (lambda ()
    		   (progn
    		     (command "_pline")
                         (setq pl (entlast))
                         (command "_.fillet" "p" pl)
    		     (while (= (getvar "cmdactive") 1) (command pause))
    		   )
    		 )
    	       )
    	     )
    	   )
    	 )
      )
      (setvar "plinewid" 0)
      (setvar "filletrad" 0)
      (if (= (getvar "errno") 2)
        (princ "Interrupted by user")
      )
      (princ)
    )
    Last edited by Opie; 2007-09-04 at 02:11 AM. Reason: [code] tags added.

  4. #4
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: LISP THAT WILL DRAW A POLYINE WITH A SET RADIUS ON THE FLY

    Quote Originally Posted by stephen.coff View Post
    Thank you Fixo for tour reply.
    It isn't correct though something like this ?
    Try this instead, seems to working
    with my version (A2007)
    Code:
    (defun c:Fpline (/ pl)
    (command "-layer" "m" "-M-DUCT"
    "C" "4" "-M-DUCT"
    "Lt" "CONTINUOUS" "-M-DUCT"
    ""
    )
    (princ "Use ESC to exit loop")
    (setvar "plinewid" 100)
    (setvar "filletrad" 600)
    (while (not
    (vl-catch-all-error-p
    (vl-catch-all-apply
    (function
    (lambda ()
    (progn
    (command "_pline")
    ;(setq pl (entlast))
    ;(command "_.fillet" "p" pl)
    (while (= (getvar "cmdactive") 1) (command pause))
    )
    )
    )
    )
    )
    )
    (command "fillet" "P" "L")
    )
    ;;;)
    (setvar "plinewid" 0)
    (setvar "filletrad" 0)
    (if (= (getvar "errno") 2)
    (princ "Interrupted by user")
    )
    (princ)
    )

  5. #5
    I could stop if I wanted to
    Join Date
    2005-08
    Posts
    378
    Login to Give a bone
    0

    Cool Re: LISP THAT WILL DRAW A POLYINE WITH A SET RADIUS ON THE FLY

    Kennet,
    Thank you, I will look further at the thread and see what's on offer.

    Fixo,
    Thank you also, that is perfect.

    Stephen

  6. #6
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: LISP THAT WILL DRAW A POLYINE WITH A SET RADIUS ON THE FLY

    You are welcome, Stephen
    Happy coding

  7. #7
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: LISP THAT WILL DRAW A POLYINE WITH A SET RADIUS ON THE FLY

    You can play with this LINK to make a polyline with radius and more.

    : ) Happy Computing !

    kennet

Similar Threads

  1. Extract the radius of a 3D cylinder using LISP?
    By Cadapult in forum AutoLISP
    Replies: 10
    Last Post: 2018-10-14, 05:11 PM
  2. delta radius length tangent lisp
    By mgonzales361438 in forum AutoLISP
    Replies: 3
    Last Post: 2014-06-11, 07:52 AM
  3. Draw line lisp
    By rphillips.137763 in forum AutoLISP
    Replies: 3
    Last Post: 2012-06-21, 02:05 PM
  4. Any way to draw an arc by tangent, tangent, radius?
    By christo4robin in forum Revit Architecture - General
    Replies: 2
    Last Post: 2005-09-01, 01:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •