Results 1 to 8 of 8

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

  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
    "The whole problem with the world is that fools and fanatics are always
    so certain of themselves, and wiser people so full of doubts."
    Bertrand Russell

  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 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
    The essential thing is what you write in the post. . . .not the numbers of posts.

  5. #5
    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)
    )
    "The whole problem with the world is that fools and fanatics are always
    so certain of themselves, and wiser people so full of doubts."
    Bertrand Russell

  6. #6
    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

  7. #7
    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
    "The whole problem with the world is that fools and fanatics are always
    so certain of themselves, and wiser people so full of doubts."
    Bertrand Russell

  8. #8
    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

    Fixo,
    I iwsh to add a block at the start of the flex (polyline). Can you assist me by directing me to resolve these issues ?
    To add the block I need to place the block on the starting point of the polyline. I then need to start the polyline 200mm forward of the inital starting point. What do i need to look at to determine the starting point of the polyline. Ialso need to work out the direction the polyline is going from the first to second point ?

    Stephen

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. 2013: Autocad Lisp (Bearing, Chord, Arc, Radius)
    By jarrod822295 in forum Survey - General
    Replies: 0
    Last Post: 2013-01-13, 11:07 PM
  4. Draw line lisp
    By rphillips.137763 in forum AutoLISP
    Replies: 3
    Last Post: 2012-06-21, 02:05 PM
  5. 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
  •