Author Topic: Strengthen the dimensioning  (Read 9006 times)

0 Members and 2 Guests are viewing this topic.

Stefan

  • Bull Frog
  • Posts: 319
  • The most I miss IRL is the Undo button
Re: Strengthen the dimensioning
« Reply #15 on: September 25, 2014, 05:39:04 PM »
Didn't had much time lately... This is what I have till now, and I apologize sincerely for the code; it is ugly, undocumented and very little tested.

About the lisp. It takes every perpendicular and tangent direction or every curve that pass thru dimension's definition points, plus horizontal, vertical and aligned orientation (in current UCS). After playing a little bit, I found it very annoying when are too much objects and/or very close orientations.
Try to select a common intersection of at least 3 lines and you'll see what I'm talking about...

But I really like the opportunity to have horizontal, vertical and aligned dimension in one command. I've done a "light" version including just these options and I've already replaced dimlinear command on my autocad. I can tell you, I am extremely delighted about it.

That's all for now, though there are still many things to fix, but it's not gonna happen too soon, at least not me.


Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Strengthen the dimensioning
« Reply #16 on: September 25, 2014, 05:55:06 PM »
Nicely done Stefan - relatively concise code for a lot of functionality  :-)

Stefan

  • Bull Frog
  • Posts: 319
  • The most I miss IRL is the Undo button
Re: Strengthen the dimensioning
« Reply #17 on: September 25, 2014, 06:03:22 PM »
Nicely done Stefan - relatively concise code for a lot of functionality  :-)
Thank you Lee.  I forgot to mention that (entmod (cons -1 ename) ... saw it in one of your lisp. Elegant!!

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Strengthen the dimensioning
« Reply #18 on: September 25, 2014, 06:24:01 PM »
Nicely done Stefan - relatively concise code for a lot of functionality  :-)
Thank you Lee.  I forgot to mention that (entmod (cons -1 ename) ... saw it in one of your lisp. Elegant!!
Thanks Stefan - though, I probably saw it somewhere else too!  :-)

chlh_jd

  • Guest
Re: Strengthen the dimensioning
« Reply #19 on: September 25, 2014, 07:00:37 PM »
Nicely done Stefan - relatively concise code for a lot of functionality  :-)
1+  :-)

liuhaixin88

  • Guest
Re: Strengthen the dimensioning
« Reply #20 on: September 25, 2014, 08:37:24 PM »
Didn't had much time lately... This is what I have till now, and I apologize sincerely for the code; it is ugly, undocumented and very little tested.

About the lisp. It takes every perpendicular and tangent direction or every curve that pass thru dimension's definition points, plus horizontal, vertical and aligned orientation (in current UCS). After playing a little bit, I found it very annoying when are too much objects and/or very close orientations.
Try to select a common intersection of at least 3 lines and you'll see what I'm talking about...

But I really like the opportunity to have horizontal, vertical and aligned dimension in one command. I've done a "light" version including just these options and I've already replaced dimlinear command on my autocad. I can tell you, I am extremely delighted about it.

That's all for now, though there are still many things to fix, but it's not gonna happen too soon, at least not me.

Thank you very much ! You helped me, also help the most people .great !

andy_lee

  • Newt
  • Posts: 147
Re: Strengthen the dimensioning
« Reply #21 on: September 25, 2014, 08:43:19 PM »
cool ! nice routine ! many thanks stefan
andy.
Best regards.

RolandOrzabal

  • Newt
  • Posts: 86
  • "memories fade but the scars still linger"
Re: Strengthen the dimensioning
« Reply #22 on: September 25, 2014, 08:45:45 PM »
cool! thanks for sharing stefan :)
"memories fade but the scars still linger"

lamarn

  • Swamp Rat
  • Posts: 636
Re: Strengthen the dimensioning
« Reply #23 on: September 28, 2014, 04:01:55 PM »
Very  nice function. Would be even more nice if it could work in a 3d plane taking into account the Z values of picked points.
Something with this function below i use to dim a 3D point.


Code: [Select]
(defun C:d3d () (dim3d))
(defun dim3d (/ cme osm e pnt1 pnt2 pnt3 a1 b1 c1)
  (setq cme (getvar "cmdecho"))
  (setvar "cmdecho" 0)
  (command "undo" "mark")
  (setq osm (getvar "osmode"))
  (setq e (car (entsel)))
  (command "ucs" "v")
  (setvar "osmode" 33)
  (setq pnt1 (getpoint "\nPick the first point  "))
  (setq pnt2 (getpoint "\nPick the second point  "))
  (setvar "osmode" 0)
  (setq pnt3 (getpoint "\nPick dimension line location  "))
  (command "point" pnt1)
  (setq a1 (entlast))
  (command "point" pnt2)
  (setq b1 (entlast))
  (command "point" pnt3)
  (setq c1 (entlast))
  (command "ucs" "3point" pnt1 pnt2 "")
  (setq pnt1 (cdr (assoc 10 (entget a1))))
  (setq pnt2 (cdr (assoc 10 (entget b1))))
  (setq pnt3 (cdr (assoc 10 (entget c1))))
  (setq pnt1 (trans pnt1 0 1))
  (setq pnt2 (trans pnt2 0 1))
  (setq pnt3 (trans pnt3 0 1))
  (command "dim" "hor" pnt1 pnt2 pnt3 "" ^c)
  (command "erase" a1 b1 c1 "")
  (command "ucs" "p")
  (command "ucs" "p")
  (setvar "osmode" osm)
  (setvar "cmdecho" cme)
  (princ)
)
« Last Edit: September 28, 2014, 07:37:57 PM by CAB »
Design is something you should do with both hands. My 2d hand , my 3d hand ..

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Strengthen the dimensioning
« Reply #24 on: September 28, 2014, 07:20:56 PM »
Based on the dimensionstration, I like it.

:-)
very punny.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.