### Author Topic: Help me mistake drawing  (Read 3036 times)

0 Members and 1 Guest are viewing this topic.

#### vnanhvu

• Guest
##### Help me mistake drawing
« on: July 13, 2011, 11:39:38 AM »
Help me mistake drawing
I hope people can help me this, I would appreciate you very much. While drawing, I failed to osnap, such distance is 1000, but the fact I draw 999.99. So can you help me how to edit drawing objects all return the most accurate location (you can limit the rounding rules distances). Thank you very much

#### BlackBox

• King Gator
• Posts: 3745
##### Re: Help me mistake drawing
« Reply #1 on: July 13, 2011, 11:44:13 AM »
vnanhvu, you can do a few different things to correct this.

The first that comes to mind are for you to try selecting one side, and grip edit the end point to join the opposite side's end point(s), if one of them happens to be in the exact right location.

Hope this helps!
"How we think determines what we do, and what we do determines what we get."

#### vnanhvu

• Guest
##### Re: Help me mistake drawing
« Reply #2 on: July 13, 2011, 11:50:40 AM »
But someone was wrong to snap and lead to the wrong system for the next object. So with a drawing with many objects fails, I will take a lot of time if I corrected manually. Hope you have a better solution that to help me.

#### BlackBox

• King Gator
• Posts: 3745
##### Re: Help me mistake drawing
« Reply #3 on: July 13, 2011, 11:53:31 AM »
Perhaps I am misunderstanding your request.

Could you explain more the current condition your line work is in, and also what exactly you want the end result to be? The image above is not that clear for me to understand, with your comments.

Thanks.
"How we think determines what we do, and what we do determines what we get."

#### vnanhvu

• Guest
##### Re: Help me mistake drawing
« Reply #4 on: July 13, 2011, 12:00:56 PM »
Thanks for your interest in helping, I'm happy for that. For example, someone who, by catching the wrong place relative to the position of objects is not quite right (I want to draw three line segments: AB & C, I want the distance A to B is 1000, B to C was 2000, but Focus should be at fault in the A to B and Bto C is 999.99, & 1999.99 although I measure the size is still 1000 and 2000. can you help me edit the exact distance of 999.99 and 1999.99 on 2000 1000.

#### JNieman

• Water Moccasin
• Posts: 1655
##### Re: Help me mistake drawing
« Reply #5 on: July 13, 2011, 12:13:07 PM »
What you are asking for appears to be to mimic a "parametric" drawing system in which one object "knows" to be relevant to another object, and move with it, when the first object moves.  This, in Autocad, would require -extensive- customization.  I don't even know if LSP alone would cut it.  Sorry, that's way above my pay grade.

The only other thing I could imagine is to step through every "X" "Y" and "Z" value of each object (or other relevant dimensional properties) and round them off to the closest tenth, hundredth, or whole unit value, and simply hope for the best, and re-inspect the drawing.

#### BlackBox

• King Gator
• Posts: 3745
##### Re: Help me mistake drawing
« Reply #6 on: July 13, 2011, 12:20:07 PM »
Thanks for your interest in helping, I'm happy for that.

You're welcome.

For example, someone who, by catching the wrong place relative to the position of objects is not quite right (I want to draw three line segments: AB & C, I want the distance A to B is 1000, B to C was 2000, but Focus should be at fault in the A to B and Bto C is 999.99, & 1999.99 although I measure the size is still 1000 and 2000. can you help me edit the exact distance of 999.99 and 1999.99 on 2000 1000.

Have you tried using the lengthen command?

Code: [Select]
`Command: lenLENGTHENSelect an object or [DElta/Percent/Total/DYnamic]: tSpecify total length or [Angle] <1.0000)>: 1000Select an object to change or [Undo]:`
"How we think determines what we do, and what we do determines what we get."

#### mjfarrell

• Seagull
• Posts: 14444
• Every Student their own Lesson
##### Re: Help me mistake drawing
« Reply #7 on: July 13, 2011, 12:22:04 PM »
or perhaps explore the options of MPEDIT>>Join
and or

PLJOIN joins two or more polylines whose ends do not meet exactly. PLJOIN prompts for a selection set of polylines and a fuzz distance. The fuzz distance is the maximum distance two endpoints of individual polylines can be separated but still be joined. Depending on the setting of the new PJOINMODE command, the individual polylines are joined by either inserting a new segment or by trimming or extending the two segments to their common or extended intersection point, respectively.

Although none of the current suggestions are really going to correct lines that were drawn incorrectly, consecutively to each other.

Michael Farrell
http://primeservicesglobal.com/

#### vnanhvu

• Guest
##### Re: Help me mistake drawing
« Reply #8 on: July 13, 2011, 12:39:10 PM »

#### Lee Mac

• Seagull
• Posts: 12295
• London, England
##### Re: Help me mistake drawing
« Reply #9 on: July 13, 2011, 12:48:21 PM »
The only other thing I could imagine is to step through every "X" "Y" and "Z" value of each object (or other relevant dimensional properties) and round them off to the closest tenth, hundredth, or whole unit value, and simply hope for the best, and re-inspect the drawing.

Code: [Select]
`(defun c:RoundItAndHope ( / fuzz ss i )  (setq fuzz 1e-3) ;; Tolerance  (if (setq ss (ssget "_:L" '((0 . "LINE,LWPOLYLINE"))))    (repeat (setq i (sslength ss))      (entmod        (mapcar          (function            (lambda ( pair )              (if (member (car pair) '(10 11))                (cons (car pair) (mapcar '(lambda ( x ) (LM:Roundto x fuzz)) (cdr pair)))                pair              )            )          )          (entget (ssname ss (setq i (1- i))))        )      )    )  )  (princ))      (defun LM:Roundto ( n p / f )  (setq n (- n (setq f (rem n p))))  (if (< 0.5 (/ (abs f) p)) ((if (minusp n) - +) n p) n))`

#### BlackBox

• King Gator
• Posts: 3745
##### Re: Help me mistake drawing
« Reply #10 on: July 13, 2011, 01:03:23 PM »
Although none of the current suggestions are really going to correct lines that were drawn incorrectly, consecutively to each other.

This is where I've been getting stuck... when I first saw the OP's attached pic, I thought of grip editing the endpoints, pedit, and fillet.

But that last line (quoted in red) made me think of lengthen. I don't know for sure; hopefully the drawing being uploaded will clarify better.
"How we think determines what we do, and what we do determines what we get."

#### vnanhvu

• Guest
##### Re: Help me mistake drawing
« Reply #11 on: July 13, 2011, 01:52:54 PM »
I upload my pic & drawing for you. I hope you can help me. Thanks for all.

#### Stefan

• Bull Frog
• Posts: 221
##### Re: Help me mistake drawing
« Reply #12 on: July 13, 2011, 02:26:44 PM »
I use this lisp in similar situations, especially when Qdim give me those nasty "0" dims...
Setting precision to 1 (may be less, but I use to set precision equal to drawing unit or half of it..) seems to fix your dwg...
Didn't  test, but Lee's seems to do the same thing

Code: [Select]
`(defun C:FIXPOZ (/ fix_lst fix_nr s_set precision)  (defun FIX_LIST (lst / l1)    (if (listp lst)      (foreach n lst (setq l1 (append l1 (list (FIX_NR n)))) )      (setq l1 (FIX_NR lst))      )    l1    )    (defun FIX_NR (nr / smn)    (if (minusp nr) (setq smn -1 nr (- 0 nr)) (setq smn 1))    (* smn (atof (rtos (/ nr precision) 2 0)) precision)    )  (defun DO_SORT (a / i j li_elem sub_list new_sub_list)  (setq i 0)  (repeat (sslength a)    (setq li_elem (entget (ssname a i)))    (setq j 0)    (repeat (length li_elem)      (setq sub_list (nth j li_elem))      (if (member (car sub_list) '(10 11 13 14 40)) (setq new_sub_list (cons (car sub_list) (FIX_LIST (cdr sub_list)))) (setq new_sub_list nil));;;      (if (member (car sub_list) '(40 41)) (setq new_sub_list (FIX_LIST sub_list)) (setq new_sub_list nil))      (if new_sub_list (setq li_elem (subst new_sub_list sub_list li_elem)))      (setq j (+ 1 j))      )    (entmod li_elem)    (setq i (+ 1 i))    )  )  (and    (setq s_set (ssget '((0 . "*LINE,ARC,HATCH,CIRCLE,DIM*,INSERT")))) ;*TEXT    (princ "\nSet repositioning precision...")    (setq precision (getreal "\nPrecison: "))    (/= precision 0)    (DO_SORT s_set)    )  (princ))`

#### vnanhvu

• Guest
##### Re: Help me mistake drawing
« Reply #13 on: July 13, 2011, 02:47:01 PM »
I tested both Lee's & Phanaem's lisp, but i dont know why Lee's lisp no effect, and Phanaem's lisp good. Thank Lee and Phanaem very much, thanks for all, thanks Theswamp

#### Stefan

• Bull Frog
• Posts: 221
##### Re: Help me mistake drawing
« Reply #14 on: July 13, 2011, 02:55:37 PM »
It is because of precision... It MUST be grater the positioning error... So changing "fuzz" value in Lee's code from 1e-3 to 1 will make it work as you need