Results 1 to 3 of 3

Thread: Isometric Rectangle

  1. #1
    Member
    Join Date
    2011-08
    Posts
    6
    Login to Give a bone
    0

    Default Isometric Rectangle

    I can create an isometric rectangle just by drawing 4 lines at the correct angles. Can you create an isometric rectangle as you would a normal rectangle using only 2 points?

  2. #2
    Certified AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    5,069
    Login to Give a bone
    0

    Default Re: Isometric Rectangle

    Possible, with a LISP routine. There's nothing OOTB that i'm aware of. The Ellipse command has an Isocircle option, but none of the rectangle or polygon commands do.

  3. #3
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Isometric Rectangle

    Try this lisp:
    Code:
    (defun c:IsoRect (/ pt1 pt2 iso getColor c)
      (defun getColor (/ C)
        (list
          (cond
            ((wcmatch (setq c (strcase (getvar 'CeColor))) "BYLAYER") '(62 . 256))
            ((wcmatch c "BYBLOCK") '(62 . 0))
            (t (cons 62 (atoi c)))
          )
        )
      )
      (if (and (setq pt1 (getpoint "Pick 1st point of rectangle: "))
               (setq pt2 (getpoint pt1 "Pick 2nd point of rectangle: "))
          )
        (if (entmake (append
                   (list '(0 . "LWPOLYLINE")
                         '(100 . "AcDbEntity")
                         (cons 67 (if (or (= (getvar 'TileMode) 1) (> (getvar 'CVport) 1)) 0 1))
                         (cons 410 (if (or (= (getvar 'TileMode) 1) (> (getvar 'CVport) 1)) "Model" (getvar 'CTab)))
                         (cons 8 (getvar 'CLayer))
                         (cons 6 (getvar 'CeLType))
                   )
                   (getColor)
                   (list '(100 . "AcDbPolyline")
                         '(90 . 4)
                         '(70 . 1)
                         (cons 10 pt1)
                         '(91 . 0)
                         (cons 10
                               (inters pt1
                                       (polar pt1
                                              (if (= (setq iso (getvar 'SnapIsoPair)) 2)
                                                (- (/ pi 6))
                                                (/ pi 6)
                                              )
                                              1.
                                       )
                                       pt2
                                       (polar pt2
                                              (if (= iso 1)
                                                (* (/ pi 6) 5)
                                                (/ pi 2)
                                              )
                                              1.
                                       )
                                       nil
                               )
                         )
                         '(91 . 0)
                         (cons 10 pt2)
                         '(91 . 0)
                         (cons 10
                               (inters
                                 pt2
                                 (polar pt2
                                        (if (= iso 2)
                                          (- (/ pi 6))
                                          (/ pi 6)
                                        )
                                        1.
                                 )
                                 pt1
                                 (polar pt1
                                        (if (= iso 1)
                                          (* (/ pi 6) 5)
                                          (/ pi 2)
                                        )
                                        1.
                                 )
                                 nil
                               )
                         )
                         '(91 . 0)
                         '(210 0.0 0.0 1.0)
                   )
                 )
        )
          (princ "Done.")
          (princ "Error")
        )
      )
      (princ)
    )

Similar Threads

  1. 3 Point Rectangle
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 6
    Last Post: 2012-08-15, 02:53 AM
  2. Lisp for rectangle
    By RRS1987 in forum AutoLISP
    Replies: 2
    Last Post: 2011-10-24, 02:58 AM
  3. Rectangle
    By sandrews.253556 in forum Dynamic Blocks - Sharing
    Replies: 0
    Last Post: 2010-07-28, 04:01 PM
  4. 2011: grips on rectangle
    By dzatto in forum ACA General
    Replies: 1
    Last Post: 2010-06-08, 12:33 PM
  5. Replies: 3
    Last Post: 2009-04-15, 07:30 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
  •