Author Topic: BW Pipe Elbow Program  (Read 4028 times)

0 Members and 1 Guest are viewing this topic.

fisherridge

  • Guest
BW Pipe Elbow Program
« on: August 13, 2010, 11:37:08 AM »
I have an idea for a program that may or not be a challenge for you guys.
I was a contract piping designer when I was employed before the recession.
There are expensive 3rd party programs for process piping but small offices can't afford them.
I used freeware programs for 2d pipe, flanges and 90 degree elbows. I couldn't find one that would draw the 90 degree elbows in rotation for turn down (or up) at an angle which are often needed. I would just build a block for size and rotation as needed.
A program to draw 90 degree elbows by size and rotated in 5 degree increments would be very nice. Better yet would be a program to draw them at any angle.
I would be glad to create a .dat file for the elbow dimensions.
Showing wall thickness in hidden line by schedule may also be an option.
Most commonly used are 1/2" thru 12", although some manufacturers list to 48".

Thanks,
Mike

LE3

  • Guest
Re: BW Pipe Elbow Program
« Reply #1 on: August 13, 2010, 11:45:42 AM »
This sounds more like a request versus showing a great solution, like all the ones that have been posted here.

Try posting in one of the public programming forums, and maybe someone there might end up taking this as a challenge, maybe if that not end up a lot of homework to-do, for them.


Good luck!

LE3

  • Guest
Re: BW Pipe Elbow Program
« Reply #2 on: August 13, 2010, 11:54:00 AM »
I did something about that, but there is no source code open nor a command, but might give you an idea:
http://www.theswamp.org/index.php?topic=32092.msg376331#msg376331

cmwade77

  • Swamp Rat
  • Posts: 1447
Re: BW Pipe Elbow Program
« Reply #3 on: August 13, 2010, 11:56:31 AM »
We use SDUCT here when we have to draw pipes in double line....it is meant for ductwork; however, we have found that it works well for double line pipes as well. It can also do turn ups and turn downs.

fisherridge

  • Guest
Re: BW Pipe Elbow Program
« Reply #4 on: August 13, 2010, 05:43:41 PM »
Please see the attached image.
It is a 45 degree roll using two 3" nps 90 degree bw ells.
I created the block with the ellipse in two halves to make the example shown.
The other half of the ellipses could have been changed to hidden.

cmwade77

  • Swamp Rat
  • Posts: 1447
Re: BW Pipe Elbow Program
« Reply #5 on: August 13, 2010, 06:27:02 PM »
First off, I have to say it.....if you like that level of presentation, never switch to Revit MEP, it simply can not do it.

Secondly, that is way more detail than we ever would do for our needs, so haven't really had a need to do it.

fixo

  • Guest
Re: BW Pipe Elbow Program
« Reply #6 on: August 14, 2010, 06:47:54 AM »
I have an idea for a program that may or not be a challenge for you guys.
I was a contract piping designer when I was employed before the recession.
There are expensive 3rd party programs for process piping but small offices can't afford them.
I used freeware programs for 2d pipe, flanges and 90 degree elbows. I couldn't find one that would draw the 90 degree elbows in rotation for turn down (or up) at an angle which are often needed. I would just build a block for size and rotation as needed.
A program to draw 90 degree elbows by size and rotated in 5 degree increments would be very nice. Better yet would be a program to draw them at any angle.
I would be glad to create a .dat file for the elbow dimensions.
Showing wall thickness in hidden line by schedule may also be an option.
Most commonly used are 1/2" thru 12", although some manufacturers list to 48".

Thanks,
Mike

Start from this point
Code: [Select]
(defun C:try(/ arcrad dia ea1 ea2 ea3 len1 len2 lset orig pa1 pb1 pb2 pb3
     pc1 pc2 plb plt pm1 pm2 pm3 prb prt rad sa1 sa2 sa3)
(setq orig (getpoint "\n  >> Pick center >> ")
     
      dia 100;(getdist "\nEnter pipe diameter: ")
     
      rad (/ dia 2)
     
      arcrad dia
     
      len1 750;(getdist "\nEnter pipe length: ")
     
      len2 250;(getdist "\nEnter elbow length (straight part only): ")
      )

  (setq pc1 (list (- (car orig)(/ len1 2))(cadr orig))

pc2 (list (+ (car orig)(/ len1 2))(cadr orig))

plb (list (car pc1)(- (cadr pc1) rad))

plt (list (car pc1)(+ (cadr pc1) rad))

prb (list (car pc2)(- (cadr pc1) rad))

prt (list (car pc2)(+ (cadr pc1) rad))
)
  (command "._line" "_non" plt "_non" prt ""
   
   "._line" "_non" plb "_non" prb "")
 

(command "._ellipse" "_a" "_c" "_non" pc1 "_non" plt "_non" (polar pc1 0 (/ rad 2)) plb plt

"._ellipse" "_a" "_c" "_non" pc2 "_non" prt "_non" (polar pc2 0 (/ rad 2)) prb prt )

(setq pa1 (list (car pc1)(- (cadr pc1) arcrad))
     
      sa1 pc1
     
      ea1 (list (- (car pc1) arcrad)(cadr pa1))
     
      sa2 plt
     
      ea2 (list (- (car ea1 )rad) (cadr ea1))
     
      sa3 plb
     
      ea3 (list (+ (car ea1) rad) (cadr ea1))
      )
 
(setq lset (ssadd))
 
  (command "._arc" "_c" "_non" pa1 "_non" sa1 "_non" ea1)
 
  (ssadd (entlast) lset)
 
  (command "._arc" "_c" "_non" pa1 "_non" sa2 "_non" ea2)
 
  (ssadd (entlast) lset)
 
  (command "._arc" "_c" "_non" pa1 "_non" sa3 "_non" ea3)
 
  (ssadd (entlast) lset)
 
  (command "._line"  "_non" ea3 "_non" ea2 "")

   (setq pb1 (list (car ea1)(- (cadr ea1) len2))

pm1 (list (- (car pb1)(/ rad 2)) (+ (cadr pb1)(/ rad 4)))

pb2 (list (car ea2)(- (cadr ea2) len2))

pm2 (list (+ (car pb1)(/ rad 2)) (- (cadr pb1)(/ rad 4)))

pb3 (list (car ea3)(- (cadr ea3) len2))

pm3 (list (car pm1)(- (cadr pb1)(/ rad 4)))
   
   )
   (command "._line"  "_non" pb2 "_non" ea2 "")
 
  (ssadd (entlast) lset)
 
          (command "._line"  "_non" pb3 "_non" ea3 "")
 
  (ssadd (entlast) lset)
 
   (command "._spline" "_non" pb2 "_non" pm1 "_non" pb1 "_non" pm2  "_non" pb3 "" "" "")
 
(ssadd (entlast) lset)
 
           (command "._arc" "_non" pb2 "_non" pm3 "_non" pb1)
 
  (ssadd (entlast) lset)
 
  (command "._copybase" orig lset "")

  (command "._pasteclip" orig "")
 
  (command "._rotate" lset "" (getvar 'lastpoint)  180.)
   
  (princ)
  )

~'J'~

fisherridge

  • Guest
Re: BW Pipe Elbow Program
« Reply #7 on: August 14, 2010, 11:11:10 AM »
Thanks to all.
I revisited my BW 90 block library and finished it this morning.
I now have 667 blocks to draw 90 degree bw ells in sizes from 1/2" to 48" and in rotations from 0 to 90 in 5 degree increments with 22.5, 52.5 and 67.5 thrown in.
Example is attached.

Thanks,
Mike

KirkN

  • Guest
Re: BW Pipe Elbow Program
« Reply #8 on: August 17, 2010, 03:36:48 PM »
If you went to all of that work, why don't you put them all together into a dynamic block? It would be a lot more user-friendly.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: BW Pipe Elbow Program
« Reply #9 on: August 17, 2010, 04:34:57 PM »
Quote
I now have 667 blocks

Sounds like you need a good Block Manager . . .  :wink:
James Buzbee
Windows 8

Andrea

  • Water Moccasin
  • Posts: 2372
Re: BW Pipe Elbow Program
« Reply #10 on: August 17, 2010, 05:04:50 PM »
If you went to all of that work, why don't you put them all together into a dynamic block? It would be a lot more user-friendly.

Welcome to theswamp KirkN   :police:

fish...
why do not not use 3D elbow, rotate on Y axis and than flatten it ?
Keep smile...

fisherridge

  • Guest
Re: BW Pipe Elbow Program
« Reply #11 on: August 17, 2010, 10:51:17 PM »
jbuzbee,
Yes, a good block manager is a necessity.

Andrea,
I'm glad you posted here.
I just tonight installed your SBlock V1.0.
It works great.
I run 2005, so no dynamic blocks.

KirkN,
I am embarrased to admit that I have yet to use 3D.

Thanks to all you guys for being kind to an old man realtively new to AutoCAD.
I have no business in this forum.
I just collect list routines, especially one with dialog boxes that draws things.

Thanks,
Mike




CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: BW Pipe Elbow Program
« Reply #12 on: August 18, 2010, 07:26:11 AM »
Mike,
Everyone is welcome here.
And if they are polite they can stay as long as they like.  8-)
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.