Author Topic: Dynamic Offset  (Read 49207 times)

0 Members and 2 Guests are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12904
  • London, England
Re: Dynamic Offset
« Reply #30 on: October 25, 2009, 08:58:14 AM »
Thanks for the bug report Hugo -

I have updated the first post to Version 1.4

The user will now be able to specify an Offset factor, and also use 'N' to specify the Offset Number directly.  :-)

Have fun,

Lee

Hugo

  • Bull Frog
  • Posts: 421
Re: Dynamic Offset
« Reply #31 on: October 26, 2009, 04:42:56 AM »
Hallo Lee

Danke funktioniert jetzt super  :-) :-) :-)


Lee Mac

  • Seagull
  • Posts: 12904
  • London, England
Re: Dynamic Offset
« Reply #32 on: October 26, 2009, 09:10:12 AM »
Excellent Hugo  :-)

Lee Mac

  • Seagull
  • Posts: 12904
  • London, England
Re: Dynamic Offset
« Reply #33 on: November 01, 2009, 11:22:36 AM »
Major Update!

I have included a Settings Dialog, so that you can change the properties of the objects that are offset   8-)

See the first post for Version 1.5

Lee Mac

  • Seagull
  • Posts: 12904
  • London, England
Re: Dynamic Offset
« Reply #34 on: December 08, 2009, 08:04:00 PM »
Following a suggestion from one of the guys over at CADTutor, I have updated the code in the first post to Version 1.6, the user may now press TAB to choose to offset either side of the object, or both sides simultaneously.

As always, your comments and suggestions are welcome :-)

Enjoy!

Lee

t-bear

  • Guest
Re: Dynamic Offset
« Reply #35 on: December 09, 2009, 05:14:05 PM »
This is great Lee...can use it on P&ID and electrical schematics.  Thanks for all the work on it...works a treat!

Lee Mac

  • Seagull
  • Posts: 12904
  • London, England
Re: Dynamic Offset
« Reply #36 on: December 09, 2009, 05:34:07 PM »
This is great Lee...can use it on P&ID and electrical schematics.  Thanks for all the work on it...works a treat!

Thanks T-Bear, your comments are much appreciated - I'm glad you like it :-)

GDF

  • Water Moccasin
  • Posts: 2081
Re: Dynamic Offset
« Reply #37 on: December 10, 2009, 10:06:25 AM »
Great tool Lee

I would suggest adding the option of deleting the original selected entity.
I have one in my toolbag for a double offset which deletes the original, that I use all of the time.

Thanks again for sharing it.
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Lee Mac

  • Seagull
  • Posts: 12904
  • London, England
Re: Dynamic Offset
« Reply #38 on: December 10, 2009, 10:23:40 AM »
Great tool Lee

I would suggest adding the option of deleting the original selected entity.
I have one in my toolbag for a double offset which deletes the original, that I use all of the time.

Thanks again for sharing it.

Nice idea Gary - I shall look to implement this :-)

Thanks  8-)

Lee

Lee Mac

  • Seagull
  • Posts: 12904
  • London, England
Re: Dynamic Offset
« Reply #39 on: December 10, 2009, 11:37:04 AM »
I have updated the code in the first post to Version 1.7 to include Gary's Suggestion  ;-)

The toggle for deleting/retaining the original objects can be changed by pressing 'D'.

Enjoy!

Lee

GDF

  • Water Moccasin
  • Posts: 2081
Re: Dynamic Offset
« Reply #40 on: December 10, 2009, 02:09:42 PM »
Wow, that was fast.

So the source button and image button are for changing color to other than by layer...shame on you. :pissed:
« Last Edit: December 10, 2009, 03:42:53 PM by GDF »
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Lee Mac

  • Seagull
  • Posts: 12904
  • London, England
Re: Dynamic Offset
« Reply #41 on: December 10, 2009, 06:27:26 PM »
Wow, that was fast.

So the source button and image button are for changing color to other than by layer...shame on you. :pissed:

Hehe... gotta provide people with the tools to break the company standards.. makes life much more fun :P

GDF

  • Water Moccasin
  • Posts: 2081
Re: Dynamic Offset
« Reply #42 on: December 11, 2009, 10:10:35 AM »
Lee, here is another request.
(1)How about adding offset of a segment of a polyline...

;; http://www.theswamp.org/index.php?topic=21933.0;all

;; OFSEGS -Gilles Chanteau- 2008/03/26
;; Offsets the selected segments of lwpolyline
;; Joined segments are offseted in a single lwpolyline
;; Keeps arcs and widthes
;; Works whatever the current UCS and the pline OCS and elevation

(2)How about offset to center...the center between two selected lines. Here is an old routine...
;;;OFCTR.LSP  Offset Line to Center (Dean Saadallah)
;;;10/12/97
(defun c:OFC (/ OS CL CD LAYR PT1 PT2 PT3 DST1 DST2)
  (setq OS (getvar "OSMODE"))
  (setq CL (getvar "CLAYER"))
  (setq CD (getvar "CMDECHO"))
  (setvar "CMDECHO" 0)
  (princ "\n* Target Layer? <")
  (prin1 (read CL))
  (setq LAYR (getstring ">:"))
  (if (equal LAYR "")
    (setq LAYR (getvar "CLAYER"))
  )
  (setvar "OSMODE" 512)
  (setq PT1 (getpoint "\n* Pick First Line *"))
  (setq PT2 PT1)
  (setvar "OSMODE" 128)
  (setq PT3 (getpoint PT1 "\n* Pick Second Line *"))
  (setvar "OSMODE" 0)
  (setq DST1 (distance PT1 PT3))
  (setq DST2 (/ DST1 2))
  (command ".offset" DST2 PT1 PT3 "")
  (command "CHPROP" "L" "" "LA" LAYR "LT" "BYLAYER" "C" "BYLAYER" "")
  (setvar "OSMODE" OS)
  (setvar "CMDECHO" CD)
) ;_ end of defun
« Last Edit: December 11, 2009, 10:17:25 AM by GDF »
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Lee Mac

  • Seagull
  • Posts: 12904
  • London, England
Re: Dynamic Offset
« Reply #43 on: December 11, 2009, 10:20:20 AM »
Nice idea Gary, and some fantastic code from Gile (as always) - but it may be difficult to implement this, as my program prompts for a SelectionSet of objects, and then proceeds to offset - I suppose I would have to change this initial prompt and add an option to select segments in addition to the other objects...  Quite a task - I shall think about it...  ;-)

But thanks for the suggestion all the same  :-)

Lee

Lee Mac

  • Seagull
  • Posts: 12904
  • London, England
Re: Dynamic Offset
« Reply #44 on: December 11, 2009, 10:22:48 AM »
(2)How about offset to center...the center between two selected lines. Here is an old routine...

This may be easier to implement - I shall see what I can do  :-)

Again, thanks for the suggestions - good ideas are hard to come by... :P

Lee