+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 25
  1. #1
    Senior Member CafeJr's Avatar
    Using
    AutoCAD 2010
    Join Date
    Oct 2013
    Location
    Brazil, São Paulo, Sorocaba
    Posts
    216

    Default Filling up one area with a "oriented" polyline.

    Registered forum members do not see this ad.

    Hello guys,

    Someone knows if's possible I fill up one area, as the picture, with one polyline oriented (or as a guided line), informing the lisp code the initial point, the radius of return line, and the space limits (as the limits line), horizontal or vertical to guide the lines until the whole area it's completely filled up?...

    Thanks in advance...

    Filled up one area.jpg

  2. #2
    Super Member marko_ribar's Avatar
    Computer Details
    marko_ribar's Computer Details
    Operating System:
    Windows 7 Ultimate X64
    Computer:
    Intel quad core CPU 4x2.66GHz, 8GB RAM
    Motherboard:
    INTEL compatibile
    CPU:
    quad core 4x2.66GHz
    RAM:
    8GB
    Graphics:
    NVIDIA GeForce 6600 GT
    Primary Storage:
    250 GB
    Secondary Storage:
    500 GB
    Monitor:
    Samsung 17''
    Discipline
    Architectural
    marko_ribar's Discipline Details
    Occupation
    Architecture, project designer, project visualisation
    Discipline
    Architectural
    Details
    space design - modeling and animations
    Using
    AutoCAD 2014
    Join Date
    Feb 2010
    Location
    Belgrade, Serbia, Europe
    Posts
    1,233

    Default

    This is my version, but I don't know what do you think - it may in some cases be shorter or longer fill than the opposite boundary edge (end of snake)...

    Code:
    (defun c:snakefill (/ ptlst lxm uxm lym rym p1 p2 p3 p4 ip r d1 d2 d3 d4 dmin dir dx dy ls lr lx ly n ss)
      (prompt "\nPick area...(lower-left corner+upper-right corner)")
      (command "_.rectangle" pause pause)
      (setq ptlst (mapcar 'cdr (vl-remove-if-not '(lambda (x) (eq (car x) 10)) (entget (entlast)))))
      (setq ptlst (mapcar '(lambda (x) (trans x (entlast) 1)) ptlst))
      (prompt "\nDelta X of OCS: ") (princ (distance (car ptlst) (cadr ptlst)))
      (prompt "\nDelta Y of OCS: ") (princ (distance (cadr ptlst) (caddr ptlst)))
      (initget 4)
      (setq lxm (getdist "\nPick lower X of OCS offset margin <0.0>: "))
      (if (null lxm) (setq lxm 0.0))
      (initget 4)
      (setq uxm (getdist "\nPick upper X of OCS offset margin <0.0>: "))
      (if (null uxm) (setq uxm 0.0))
      (initget 4)
      (setq lym (getdist "\nPick left Y of OCS offset margin <0.0>: "))
      (if (null lym) (setq lym 0.0))
      (initget 4)
      (setq rym (getdist "\nPick right Y of OCS offset margin <0.0>: "))
      (if (null rym) (setq rym 0.0))
      (setq p1 (mapcar '+ (car ptlst) (list lym lxm)))
      (setq p2 (mapcar '+ (cadr ptlst) (list (- rym) lxm)))
      (setq p3 (mapcar '+ (caddr ptlst) (list (- rym) (- uxm))))
      (setq p4 (mapcar '+ (cadddr ptlst) (list lym (- uxm))))
      (setq ip (getpoint "\nPick start point of snake fill: "))
      (initget 7)
      (setq r (getdist "\nPick radius of snake fill: "))
      (setq d1 (distance ip p1) d2 (distance ip p2) d3 (distance ip p3) d4 (distance ip p4))
      (setq dmin (min d1 d2 d3 d4))
      (initget 1 "X Y")
      (setq dir (getkword "\nSnake direction - parallel to X or Y of OCS (X/Y): "))
      (if (equal dmin d1)
        (progn
          (setq dx (car (mapcar '- ip p1)))
          (setq dy (cadr (mapcar '- ip p1)))
          (if (eq dir "X")
            (progn
              (setq ls (- (distance p1 p2) dx r))
              (setq lr (- (distance p1 p2) (* r 2.0)))
              (setq ly (- (distance p1 p4) dy))
              (setq n (fix (/ ly (* r 2.0))))
              (command "_.pline" ip (polar ip 0.0 ls) "a" "s" (mapcar '+ (polar ip 0.0 ls) (list r r)) (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r 2.0))) "")
              (setq ss (ssadd))
              (ssadd (entlast) ss)
              (command "_.pline" (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r 2.0))) (polar (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r 2.0))) pi lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r 2.0))) pi lr) (list (- r) r)) (mapcar '+ (polar (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r 2.0))) pi lr) (list 0.0 (* r 2.0))) "l" (polar (mapcar '+ (polar (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r 2.0))) pi lr) (list 0.0 (* r 2.0))) 0.0 lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r 2.0))) pi lr) (list 0.0 (* r 2.0))) 0.0 lr) (list r r)) (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r 2.0))) pi lr) (list 0.0 (* r 2.0))) 0.0 lr) (list 0.0 (* r 2.0))) "")
              (ssadd (entlast) ss)
              (repeat (- (fix (/ n 2.0)) 1)
                (command "_.copy" (entlast) "" '(0.0 0.0 0.0) (list 0.0 (* r 4.0) 0.0))
                (ssadd (entlast) ss)
              )
            )
            (progn
              (setq ls (- (distance p1 p4) dy r))
              (setq lr (- (distance p1 p4) (* r 2.0)))
              (setq lx (- (distance p1 p2) dx))
              (setq n (fix (/ lx (* r 2.0))))
              (command "_.pline" ip (polar ip (* pi 0.5) ls) "a" "s" (mapcar '+ (polar ip (* pi 0.5) ls) (list r r)) (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r 2.0) 0.0)) "")
              (setq ss (ssadd))
              (ssadd (entlast) ss)
              (command "_.pline" (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r 2.0) 0.0)) (polar (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r 2.0) 0.0)) (* pi -0.5) lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r 2.0) 0.0)) (* pi -0.5) lr) (list r (- r))) (mapcar '+ (polar (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r 2.0) 0.0)) (* pi -0.5) lr) (list (* r 2.0) 0.0)) "l" (polar (mapcar '+ (polar (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r 2.0) 0.0)) (* pi -0.5) lr) (list (* r 2.0) 0.0)) (* pi 0.5) lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r 2.0) 0.0)) (* pi -0.5) lr) (list (* r 2.0) 0.0)) (* pi 0.5) lr) (list r r)) (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r 2.0) 0.0)) (* pi -0.5) lr) (list (* r 2.0) 0.0)) (* pi 0.5) lr) (list (* r 2.0) 0.0)) "")
              (ssadd (entlast) ss)
              (repeat (- (fix (/ n 2.0)) 1)
                (command "_.copy" (entlast) "" '(0.0 0.0 0.0) (list (* r 4.0) 0.0 0.0))
                (ssadd (entlast) ss)
              )
            )
          )
        )
      )
      (if (equal dmin d2)
        (progn
          (setq dx (car (mapcar '- p2 ip)))
          (setq dy (cadr (mapcar '- ip p2)))
          (if (eq dir "X")
            (progn
              (setq ls (- (distance p2 p1) dx r))
              (setq lr (- (distance p2 p1) (* r 2.0)))
              (setq ly (- (distance p2 p3) dy))
              (setq n (fix (/ ly (* r 2.0))))
              (command "_.pline" ip (polar ip pi ls) "a" "s" (mapcar '+ (polar ip pi ls) (list (- r) r)) (mapcar '+ (polar ip pi ls) (list 0.0 (* r 2.0))) "")
              (setq ss (ssadd))
              (ssadd (entlast) ss)
              (command "_.pline" (mapcar '+ (polar ip pi ls) (list 0.0 (* r 2.0))) (polar (mapcar '+ (polar ip pi ls) (list 0.0 (* r 2.0))) 0.0 lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar ip pi ls) (list 0.0 (* r 2.0))) 0.0 lr) (list r r)) (mapcar '+ (polar (mapcar '+ (polar ip pi ls) (list 0.0 (* r 2.0))) 0.0 lr) (list 0.0 (* r 2.0))) "l" (polar (mapcar '+ (polar (mapcar '+ (polar ip pi ls) (list 0.0 (* r 2.0))) 0.0 lr) (list 0.0 (* r 2.0))) pi lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip pi ls) (list 0.0 (* r 2.0))) 0.0 lr) (list 0.0 (* r 2.0))) pi lr) (list (- r) r)) (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip pi ls) (list 0.0 (* r 2.0))) 0.0 lr) (list 0.0 (* r 2.0))) pi lr) (list 0.0 (* r 2.0))) "")
              (ssadd (entlast) ss)
              (repeat (- (fix (/ n 2.0)) 1)
                (command "_.copy" (entlast) "" '(0.0 0.0 0.0) (list 0.0 (* r 4.0) 0.0))
                (ssadd (entlast) ss)
              )
            )
            (progn
              (setq ls (- (distance p2 p3) dy r))
              (setq lr (- (distance p2 p3) (* r 2.0)))
              (setq lx (- (distance p1 p2) dx))
              (setq n (fix (/ lx (* r 2.0))))
              (command "_.pline" ip (polar ip (* pi 0.5) ls) "a" "s" (mapcar '+ (polar ip (* pi 0.5) ls) (list (- r) r)) (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r -2.0) 0.0)) "")
              (setq ss (ssadd))
              (ssadd (entlast) ss)
              (command "_.pline" (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r -2.0) 0.0)) (polar (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r -2.0) 0.0)) (* pi -0.5) lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r -2.0) 0.0)) (* pi -0.5) lr) (list (- r) (- r))) (mapcar '+ (polar (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r -2.0) 0.0)) (* pi -0.5) lr) (list (* r -2.0) 0.0)) "l" (polar (mapcar '+ (polar (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r -2.0) 0.0)) (* pi -0.5) lr) (list (* r -2.0) 0.0)) (* pi 0.5) lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r -2.0) 0.0)) (* pi -0.5) lr) (list (* r -2.0) 0.0)) (* pi 0.5) lr) (list (- r) r)) (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip (* pi 0.5) ls) (list (* r -2.0) 0.0)) (* pi -0.5) lr) (list (* r -2.0) 0.0)) (* pi 0.5) lr) (list (* r -2.0) 0.0)) "")
              (ssadd (entlast) ss)
              (repeat (- (fix (/ n 2.0)) 1)
                (command "_.copy" (entlast) "" '(0.0 0.0 0.0) (list (* r -4.0) 0.0 0.0))
                (ssadd (entlast) ss)
              )
            )
          )
        )
      )
      (if (equal dmin d3)
        (progn
          (setq dx (car (mapcar '- p3 ip)))
          (setq dy (cadr (mapcar '- p3 ip)))
          (if (eq dir "X")
            (progn
              (setq ls (- (distance p3 p4) dx r))
              (setq lr (- (distance p3 p4) (* r 2.0)))
              (setq ly (- (distance p3 p2) dy))
              (setq n (fix (/ ly (* r 2.0))))
              (command "_.pline" ip (polar ip pi ls) "a" "s" (mapcar '+ (polar ip pi ls) (list (- r) (- r))) (mapcar '+ (polar ip pi ls) (list 0.0 (* r -2.0))) "")
              (setq ss (ssadd))
              (ssadd (entlast) ss)
              (command "_.pline" (mapcar '+ (polar ip pi ls) (list 0.0 (* r -2.0))) (polar (mapcar '+ (polar ip pi ls) (list 0.0 (* r -2.0))) 0.0 lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar ip pi ls) (list 0.0 (* r -2.0))) 0.0 lr) (list r (- r))) (mapcar '+ (polar (mapcar '+ (polar ip pi ls) (list 0.0 (* r -2.0))) 0.0 lr) (list 0.0 (* r -2.0))) "l" (polar (mapcar '+ (polar (mapcar '+ (polar ip pi ls) (list 0.0 (* r -2.0))) 0.0 lr) (list 0.0 (* r -2.0))) pi lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip pi ls) (list 0.0 (* r -2.0))) 0.0 lr) (list 0.0 (* r -2.0))) pi lr) (list (- r) (- r))) (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip pi ls) (list 0.0 (* r -2.0))) 0.0 lr) (list 0.0 (* r -2.0))) pi lr) (list 0.0 (* r -2.0))) "")
              (ssadd (entlast) ss)
              (repeat (- (fix (/ n 2.0)) 1)
                (command "_.copy" (entlast) "" '(0.0 0.0 0.0) (list 0.0 (* r -4.0) 0.0))
                (ssadd (entlast) ss)
              )
            )
            (progn
              (setq ls (- (distance p3 p2) dy r))
              (setq lr (- (distance p3 p2) (* r 2.0)))
              (setq lx (- (distance p3 p4) dx))
              (setq n (fix (/ lx (* r 2.0))))
              (command "_.pline" ip (polar ip (* pi -0.5) ls) "a" "s" (mapcar '+ (polar ip (* pi -0.5) ls) (list (- r) (- r))) (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r -2.0) 0.0)) "")
              (setq ss (ssadd))
              (ssadd (entlast) ss)
              (command "_.pline" (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r -2.0) 0.0)) (polar (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r -2.0) 0.0)) (* pi 0.5) lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r -2.0) 0.0)) (* pi 0.5) lr) (list (- r) r)) (mapcar '+ (polar (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r -2.0) 0.0)) (* pi 0.5) lr) (list (* r -2.0) 0.0)) "l" (polar (mapcar '+ (polar (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r -2.0) 0.0)) (* pi 0.5) lr) (list (* r -2.0) 0.0)) (* pi -0.5) lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r -2.0) 0.0)) (* pi 0.5) lr) (list (* r -2.0) 0.0)) (* pi -0.5) lr) (list (- r) (- r))) (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r -2.0) 0.0)) (* pi 0.5) lr) (list (* r -2.0) 0.0)) (* pi -0.5) lr) (list (* r -2.0) 0.0)) "")
              (ssadd (entlast) ss)
              (repeat (- (fix (/ n 2.0)) 1)
                (command "_.copy" (entlast) "" '(0.0 0.0 0.0) (list (* r -4.0) 0.0 0.0))
                (ssadd (entlast) ss)
              )
            )
          )
        )
      )
      (if (equal dmin d4)
        (progn
          (setq dx (car (mapcar '- ip p4)))
          (setq dy (cadr (mapcar '- p4 ip)))
          (if (eq dir "X")
            (progn
              (setq ls (- (distance p4 p3) dx r))
              (setq lr (- (distance p4 p3) (* r 2.0)))
              (setq ly (- (distance p4 p1) dy))
              (setq n (fix (/ ly (* r 2.0))))
              (command "_.pline" ip (polar ip 0.0 ls) "a" "s" (mapcar '+ (polar ip 0.0 ls) (list r (- r))) (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r -2.0))) "")
              (setq ss (ssadd))
              (ssadd (entlast) ss)
              (command "_.pline" (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r -2.0))) (polar (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r -2.0))) pi lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r -2.0))) pi lr) (list (- r) (- r))) (mapcar '+ (polar (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r -2.0))) pi lr) (list 0.0 (* r -2.0))) "l" (polar (mapcar '+ (polar (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r -2.0))) pi lr) (list 0.0 (* r -2.0))) 0.0 lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r -2.0))) pi lr) (list 0.0 (* r -2.0))) 0.0 lr) (list r (- r))) (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip 0.0 ls) (list 0.0 (* r -2.0))) pi lr) (list 0.0 (* r -2.0))) 0.0 lr) (list 0.0 (* r -2.0))) "")
              (ssadd (entlast) ss)
              (repeat (- (fix (/ n 2.0)) 1)
                (command "_.copy" (entlast) "" '(0.0 0.0 0.0) (list 0.0 (* r -4.0) 0.0))
                (ssadd (entlast) ss)
              )
            )
            (progn
              (setq ls (- (distance p4 p1) dy r))
              (setq lr (- (distance p4 p1) (* r 2.0)))
              (setq lx (- (distance p4 p3) dx))
              (setq n (fix (/ lx (* r 2.0))))
              (command "_.pline" ip (polar ip (* pi -0.5) ls) "a" "s" (mapcar '+ (polar ip (* pi -0.5) ls) (list r (- r))) (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r 2.0) 0.0)) "")
              (setq ss (ssadd))
              (ssadd (entlast) ss)
              (command "_.pline" (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r 2.0) 0.0)) (polar (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r 2.0) 0.0)) (* pi 0.5) lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r 2.0) 0.0)) (* pi 0.5) lr) (list r r)) (mapcar '+ (polar (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r 2.0) 0.0)) (* pi 0.5) lr) (list (* r 2.0) 0.0)) "l" (polar (mapcar '+ (polar (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r 2.0) 0.0)) (* pi 0.5) lr) (list (* r 2.0) 0.0)) (* pi -0.5) lr) "a" "s" (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r 2.0) 0.0)) (* pi 0.5) lr) (list (* r 2.0) 0.0)) (* pi -0.5) lr) (list r (- r))) (mapcar '+ (polar (mapcar '+ (polar (mapcar '+ (polar ip (* pi -0.5) ls) (list (* r 2.0) 0.0)) (* pi 0.5) lr) (list (* r 2.0) 0.0)) (* pi -0.5) lr) (list (* r 2.0) 0.0)) "")
              (ssadd (entlast) ss)
              (repeat (- (fix (/ n 2.0)) 1)
                (command "_.copy" (entlast) "" '(0.0 0.0 0.0) (list (* r 4.0) 0.0 0.0))
                (ssadd (entlast) ss)
              )
            )
          )
        )
      )
      (command "_.pedit" "m" ss "" "j" "" "")
      (princ)
    )
    M.R.
    Last edited by marko_ribar; 20th Oct 2013 at 07:05 am.

    Marko Ribar, d.i.a. (graduated engineer of architecture)
    M.R. on YouTube

  3. #3
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,901

    Default

    This is close also lines can be any angel etc done for chevrons in road islands just create an inner polygon

    Code:
    ; this use the extrim command to trim shape
    ; By Alan H Jan 2012
    (defun C:Chevron ( / obj pt1 pt2 pt3 pt4 newpt1 newpt2 )
    (acet-error-init (list
                       (list   "cmdecho" 0
                             "highlight" 0
                             "regenmode" 1
                                "osmode" 0
                               "ucsicon" 0
                            "offsetdist" 0
                                "attreq" 0
                              "plinewid" 0
                             "plinetype" 1
                              "gridmode" 0
                               "celtype" "CONTINUOUS"
                             "ucsfollow" 0
                              "limcheck" 0
                       )
                       T     ;flag. True means use undo for error clean up.
                       '(if redraw_it (redraw na 4))
                      );list
    );acet-error-init
    (setq obj (car (entsel "\nPick pline or circle")))
    ; should do a object test here
    (setq whatis (cdr (assoc 0 (entget obj))))
    (if (= whatis "LWPOLYLINE")
    (princ)
    (progn
    (princ "\You have picked something other than a polyline ")
    (princ "\Remake into a pline and do again ")
    (setq dummy (getstring "\press any key"))
    (exit)
    ) ; progn
    ) ; if
    (setq pt1 (Getpoint "\nPick Line start point"))
    (setq pt2 (Getpoint pt1 "\nPick end point"))
    (command "line" pt1 pt2 "")
    (setq gap1 (getreal "\nenter spacing 1"))
    (setq gap2 (getreal "\nenter spacing 2"))
    (setq pt3 (getpoint "\nPick 1st cross point"))
    (setq pt4 (getpoint pt3 "\nPick 2nd cross point"))
    (setq dist (distance pt3 pt4))
    (setq x (fix (/ dist (+ gap1 gap2))))
    (setq newpt1 (strcat (rtos gap1 2 2) ",0.0"))
    (setq newpt2 (strcat (rtos gap2 2 2) ",0.0"))
    (repeat x 
    (command "copy" "L" "" "0,0" newpt1)
    (command "copy" "L" "" "0,0" newpt2)
    )
    (load "Extrim")
    (etrim obj pt1)
    (acet-error-restore)
    ) ; end defun
    
    (princ)
    A man who never made mistakes never made anything

  4. #4
    Senior Member CafeJr's Avatar
    Using
    AutoCAD 2010
    Join Date
    Oct 2013
    Location
    Brazil, São Paulo, Sorocaba
    Posts
    216

    Default

    Quote Originally Posted by marko_ribar View Post
    This is my version, but I don't know what do you think - it may in some cases be shorter or longer fill than the opposite boundary edge (end of snake)...
    M.R.
    Marko_ribar, thanks for help me, the code that you wrote it's almost that I need, but the lines are drawed only in a regular region (rectangle)? It's possible select other kind of region? And as the picture, the arcs following the limits of inclination... I was thinking in some thing like I fill up the region following the limits using as a "rule" to drawing the line, like: if the start point was inserted it's possible to draw the line until the limit line and where we get crossing point of the limit line (green line) it could be decreased to creat the end of first line using the radius as a reference, after that drawing the arc and follow again the "rule", doing it until the end of drawing, but I don't know if's possible work in this way.

    Thank's again and sorry about the english!...

  5. #5
    Senior Member CafeJr's Avatar
    Using
    AutoCAD 2010
    Join Date
    Oct 2013
    Location
    Brazil, São Paulo, Sorocaba
    Posts
    216

    Default

    Quote Originally Posted by BIGAL View Post
    This is close also lines can be any angel etc done for chevrons in road islands just create an inner polygon
    BIGAL, thanks, I don't know if I'm doing it wrong, but using your code I create only lines following the region (outline), is it correct?...

  6. #6
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,901

    Default

    Yes only uses 1 pline but it can have arcs etc
    A man who never made mistakes never made anything

  7. #7
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,368

    Default

    This request reminds me of this thread - perhaps that program may help.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  8. #8
    Senior Member CafeJr's Avatar
    Using
    AutoCAD 2010
    Join Date
    Oct 2013
    Location
    Brazil, São Paulo, Sorocaba
    Posts
    216

    Default

    Quote Originally Posted by Lee Mac View Post
    This request reminds me of this thread - perhaps that program may help.
    Lee Mac is almost that... but, I'm filling up a irregular region!... I'm showing another drawing to explain about it...

    Filling up one area.jpg

  9. #9
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,901

    Default

    It is solvable but its not a quick task, so I am only offering maybe a method Lee may be able to help with code

    offset outside pline as required
    create line at required angle and spacing (see my chevron.lsp) trim to new inner pline
    using a list of the lines left to right just alternate the fillet command top and bottom

    should look like image.
    A man who never made mistakes never made anything

  10. #10
    Senior Member CafeJr's Avatar
    Using
    AutoCAD 2010
    Join Date
    Oct 2013
    Location
    Brazil, São Paulo, Sorocaba
    Posts
    216

    Default

    Registered forum members do not see this ad.

    Thanks Bigal...

Similar Threads

  1. Replies: 21
    Last Post: 14th Jul 2014, 07:04 am
  2. Replies: 1
    Last Post: 4th Jan 2011, 07:59 pm
  3. Re-draw an object using polyline from nodes created by "divide" command
    By pryzmm in forum AutoLISP, Visual LISP & DCL
    Replies: 21
    Last Post: 21st Aug 2010, 05:12 am
  4. Problem with "Filling"
    By Richo in forum SketchUp
    Replies: 19
    Last Post: 26th Jul 2010, 08:32 pm
  5. How to make an area "Striped"?
    By RingSteel in forum AutoCAD Beginners' Area
    Replies: 4
    Last Post: 10th Jun 2009, 06:10 pm

Tags for this Thread

Bookmarks

Posting Permissions

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