Author Topic: Line hop routine anyone??  (Read 3045 times)

0 Members and 1 Guest are viewing this topic.

PDJ

  • Guest
Line hop routine anyone??
« on: September 20, 2005, 03:55:31 PM »
I think I used to have this routine but, I haven't been able to find it yet. 

What I need is like when you have a circuit or electrical drawing and one line crosses another without an actual connection, the line basically is broken and then an arc is drawn between the two broken parts.  So, you have one solid line say running north to south and the line running from east to west has a chunk taken out of it where it crosses the N/S line and an arc spanning the chunk, in a sense, hopping over the N/S wire..

It would be nice if the chunk that's removed and the arc were somehow able to be set to a certain amount or radius or somethin, know what I mean??

OK, that's what I got.. Any ideas??

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Line hop routine anyone??
« Reply #1 on: September 20, 2005, 03:58:51 PM »
I have a routine that breaks the line, could be modified pretty easily
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Line hop routine anyone??
« Reply #2 on: September 20, 2005, 03:59:35 PM »
Code: [Select]
(DEFUN C:Bkwr (/ PT PT1 PT2 PT3 A1)
  (modes '("CMDECHO" "osmode" "orthomode"))
  (PROMPT "\n \nBreak @ Intersection")
  (INITGET 1)
  (SETVAR "OSMODE" 32)
  (COMMAND "SNAP" "OFF")
  (setq dsc (getvar "dimscale"))
  (SETQ PT1 (GETPOINT "\n\n Pick intersection to be broken: "))
  (SETVAR "OSMODE" 0)
  (INITGET 33)
  (SETVAR "OSMODE" 512)
  (SETQ PT (GETPOINT PT1 "\n Pick Line to be broken: "))
  (IF (= BRKW NIL)
    (SETQ BRKW 0.0625) ;set wire gap here. Gap is double the value set
  )
  (SETQ A1  (ANGLE PT1 PT)
PT2 (POLAR PT1 A1 (* dsc BRKW))
PT3 (POLAR PT1 (+ A1 PI) (* dsc BRKW))
  )
  (COMMAND ".BREAK" PT "F" PT2 PT3)
  (moder)
)

Just add the code for an arc after the break part
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Line hop routine anyone??
« Reply #3 on: September 20, 2005, 04:00:49 PM »
modes and moder are system setvar store routines.  You might need those if you dont have them already, OR just do 2 setq's
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Dommy2Hotty

  • Swamp Rat
  • Posts: 1127
Re: Line hop routine anyone??
« Reply #4 on: September 20, 2005, 04:03:58 PM »
Courtesy of Resource Cad


EDIT: DELETED ATTACHMENT
« Last Edit: September 23, 2005, 03:07:40 PM by Dommy2Hotty »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

PDJ

  • Guest
Re: Line hop routine anyone??
« Reply #6 on: September 20, 2005, 05:16:43 PM »
Thanks mega bunches for the help guys.. Post a request before lunch and have multiple solutions by the time you get back.. Can't get any better than that..

Amsterdammed

  • Guest
Re: Line hop routine anyone??
« Reply #7 on: September 21, 2005, 04:13:20 AM »
Yes, isn't the swamp a great place!!!!!!!!!!!!! :laugh:

John Hancock

  • Guest
Re: Line hop routine anyone??
« Reply #8 on: September 21, 2005, 11:49:10 AM »
YES ! ! !  The Swamp is great ! ! ! !  :-)  :-)  :-)

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Line hop routine anyone??
« Reply #9 on: September 24, 2005, 12:08:59 AM »
no...the swamp is the best ! 8-)
Keep smile...

hyposmurf

  • Guest
Re: Line hop routine anyone??
« Reply #10 on: September 25, 2005, 05:43:53 AM »
I use CAB's routine for trimming pipework/electrical cabling crossovers.The time it takes to move pipes to align with a new architects layout.Don't think allot of the engineers realise the lines have to moved offset trimmed etc,on a complex drawing this can take a while.CAB's  routine  is a Godsend. :-)


CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Line hop routine anyone??
« Reply #11 on: September 25, 2005, 09:08:02 AM »
Not sure if you were referring to this routine http://www.theswamp.org/forum/index.php?topic=2651.msg67536#msg67536

or the one I modified originally by A.Henderson http://www.theswamp.org/forum/index.php?topic=2651.msg33953#msg33953



Thanks for the mention. Glad you have found the routine helpful.
It's amazing how much cumulative time is saved with all the lisp helpers! :-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Peter Jamtgaard

  • Guest
Re: Line hop routine anyone??
« Reply #12 on: September 26, 2005, 12:50:53 PM »
Here is another version.
Code: [Select]
(defun C:Hop (/ lstIntPOint
                 lstPoint1
                 lstPoint2
                 objSelection1
                 objSelection2
                 sngDistance
                 sngDistance1
                 sngDistance2
                 sngRadius
              )
 (setq objSelection1 (vlax-ename->vla-object
                      (car (entsel "\nSelect line to be broken: ")))
       objSelection2 (vlax-ename->vla-object
                      (car (entsel "\nSelect line to NOT be broken: ")))
       sngRadius     (getdist "\nEnter radius: ")
       lstIntPoint  (vlax-safearray->list
                     (variant-value
                      (vla-intersectwith objSelection1 objSelection2 0)))
       sngDistance  (vlax-curve-getdistatpoint objSelection1 lstIntPoint)
       sngDIstance1 (- sngDistance sngRadius)
       sngDIstance2 (+ sngDistance sngRadius)
 )                   
 (vl-cmdf "break"
          (vlax-vla-object->ename objSelection1)
          "f"
          (setq lstPOint1 (vlax-curve-getpointatdist objSelection1 sngDistance1))
          (setq lstPOint2 (vlax-curve-getpointatdist objSelection1 sngDistance2))
 )
 (vl-cmdf "arc"
           lstPOint1
          "c"
          lstIntPOint
          lstPoint2
 )       
)