Jump to content

2 POLYLINE ABOVE EACH OTHER ONE IS SLIGHTLY OFFSET


Recommended Posts

Posted

IF IN MY DRAWING THERE ARE 2 POLYLINE ABOVE  EACH OTHER ONE IS SLIGHTLY OFFSET FROM THE OTHER ONE OR THERE IS AN ERROR IN ONE POINT OR THE 2 POINTS OF PLINE , I'm looking for an efficient way to to make 2 pline is equals with same length and angle with the  right polyline which have right length ( 4.00 m not 3.97 m  as example) However, it takes from me time and efforts to fix all error Like this in the all project . How can I fix all pline errors smarter and faster??.

2pl.dwg

Posted

Some questions

 

Witch one is in the right position? how do you tell?

How are these polylines made? maybe it needs to be address there instead.

 

 

 

  • Like 2
Posted

SOME TIME YOU RECEIVE DRAWING WITH ERRORS LIKE THIS OR YOU DEAL WITH AN UNPROFESSIONAL DRAFTSMAN .. I AM SEARCH IF THERE IS A LISP TO FIX THE PROBLEM   .. AND THANKS FOR YOUR ANSWER.

Posted

will overkill work and adjust the tolerance?

  • Like 1
Posted

I TRY OVERKILL AND ITS NOT GIVE ANY CORRECTION..

  • Like 1
Posted (edited)

You would be better off delete the rectangle you don't want and redrawing using the side of the exiting rectangle as a refrence.

Modified from here to ask for two points (side of rectangle) then will ask for left or right side and a distance to draw a rectangle perpendicular to the first two points.

 

(defun c:BX (/ foo dist p1 p2 p3 ang)
  ;; Draw rectangle based on 2 or 3 picked points
  ;; Alan J. Thompson, 07.26.10
  ;; modified by mhupp pick two points a side an distance
  (defun foo (l)
    (entmake
      (append '((0 . "LWPOLYLINE") (100 . "AcDbEntity") (100 . "AcDbPolyline") (90 . 4) (70 . 129))
              (mapcar (function (lambda (p) (cons 10 (reverse (cdr (reverse (trans p 1 0))))))) l)
      )
    )
  )
  (if (and (setq p1 (getpoint "\nSpecify first point: "))
           (setq p2 (getpoint p1 "\nSpecify second point: "))
           (setq p3 (getpoint (mapcar '/ (mapcar '+ p1 p2) '(2 2 2)) "\nLeft or Right: "))
      )
      (progn 
        (setq dist (getdist "\nLength of side: "))
        (if (sin (- (angle p1 p3) (angle p1 p2)))
          (setq ang (+ (* pi 1.5) (angle p1 p2)))
          (setq ang (+ (/ pi 2.) (angle p1 p2)))
        )
      )
  )
  (if (and p1 p2 ang dist)
    (foo (list p1 p2 (polar p2 ang dist) (polar p1 ang dist)))
    
  )
 (princ)
)

 

 

Edited by mhupp
  • Like 1
Posted

I TS A GOOD IDEA IN FUTURE I DO THIS LISP ..THANKS FOR HELP .. BUT THE PROBLEM WHEN THERE IS A LOT OF ERROR LIKE THIS IN DRAWING .. I SEARCH AND SOMEONE GIVE ME THIS LISP (QUANTAL) I ATTACH IT SOLVE THE PROBLEM ..THANKS FOR HELPING ME OUT I APPRECIATE THAT.

QUANTAL.lsp

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