You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 32 Next »

General Program Information

Unknown macro: {float}


Southwest Isometric View



Input Definitions

Inputs Needed to Call the Elbow Function

o -The origin, the point corresponding to where the elbow will be drawn. o is also the center of the radius of curvature of the elbow.
ND - The nominal diameter of the pipe. This value along with the pipe schedule is used to determine other actual dimensions of the elbow
EN - The enumerated pipe schedule type. Each schedule of pipe has a specific number that represents it within our code.

Inputs Defined within the Elbow Function

p1 =

  • x : o0
  • y : o1
  • z : o2

p2 =

  • x : o0 - ElbowRadius(ND) + ConRaduis(ND)
  • y : o1 - ElbowRadius(ND) + ConRaduis(ND)
  • z : o2 - outerradius(ND) + SocketDepth(ND)

p3 =

  • x : o0
  • y : o1 + ElbowRadius(ND) + ConRaduis(ND)
  • z : o2 + outerradius(ND) + SocketDepth(ND)

p4 =

  • x : o0 + ElbowRadius(ND) + outerraduis(ND)
  • y : o1
  • z : o2

p5 =

  • x : o0 - ElbowRadius(ND) - innerD(ND,EN)/2
  • y : o1
  • z : o2

p6 =

  • x : o0
  • y : o1 - ElbowRadius(ND) - outerraduis(ND) - zc
  • z : o2 - ConRadius(ND)

p7 =

  • x : o0 + ElbowRadius(ND) + outerraduis(ND) + zc
  • y : o1
  • z : o2 + ConRadius(ND)

p9 =

  • x : o0
  • y : o1 + ElbowRadius(ND)
  • z : o2

p10 =

  • x : o0 - SocketDepth(ND)
  • y : o1 + ElbowRadius(ND)
  • z : o2

p11 =

  • x : o0
  • y : o1 + ElbowRadius(ND) - ConRaduis(ND)
  • z : o2

p12 =

  • x : o0 - SocketDepth(ND) - zc
  • y : o1 + ElbowRadius(ND) - outerraduis(ND)
  • z : o2

p13 =

  • x : o0 + zc
  • y : o1 + ElbowRadius(ND) + outerraduis(ND)
  • z : o2

p14 =

  • x : o0 - SocketDepth(ND)
  • y : o1 + ElbowRadius(ND) - ConRaduis(ND)
  • z : o2

p15 =

  • x : o0
  • y : o1

p16 =

  • x : o0 + zc
  • y : o1 + zc

p17 =

  • x : o0 + ElbowRadius(ND)
  • y : o1 - SocketDepth(ND)
  • z : o2

p18 =

  • x : o0 - SocketDepth(ND)
  • y : o1 + ElbowRadius(ND)
  • z : o2

R1 = ElbowRadius(ND)

R2 = outerraduis(ND)

R3 = innerD(ND,EN)/2

R4 = ConRaduis(ND)

win1 =

  • x : o0 - ElbowRadius(ND) - ConRaduis(ND) + zc
  • y : o1 - ElbowRadius(ND) - ConRaduis(ND) + zc
  • z : o2

win2 =

  • x : o0 + ElbowRadius(ND) + ConRaduis(ND) + zc
  • y : o1 + ElbowRadius(ND) + ConRaduis(ND) + zc
  • z : o2

Note: zc corresponds to the zoom constant used within AutoCAD, defined by the basics file.

Technical Program Outline

Note: All coordinates are referenced in top view in the program unless otherwise specified

Unknown macro: {float}

zoomwin- zooms on a window space directly around where the elbow is to be drawn

zoomwin <-- zoomwina(win1,win2)

win1 =

  • x : o0 - ElbowRadius(ND) - ConRaduis(ND) + zc
  • y : o1 - ElbowRadius(ND) - ConRaduis(ND) + zc
  • z : o2

win2 =

  • x : o0 + ElbowRadius(ND) + ConRaduis(ND) + zc
  • y : o1 + ElbowRadius(ND) + ConRaduis(ND) + zc
  • z : o2

Unknown macro: {float}


Top View

Southwest Isometric View

torusbig - Draws the larger torus, a 3 dimensional ring that creates the outer surface of the elbow

torusbig <-- torus(p1,R1,R2)

p1 =

  • x : o0
  • y : o1
  • z : o2

R1 = ElbowRadius(ND)

R2 = outerraduis(ND)



Unknown macro: {float}

box1 - draws a box slightly larger than the torus, in all dimensions

box1 <-- box(p2,p3)

p2 =

  • x : o0 - ElbowRadius(ND) + ConRaduis(ND)
  • y : o1 - ElbowRadius(ND) + ConRaduis(ND)
  • z : o2 - outerradius(ND) + SocketDepth(ND)

p3 =

  • x : o0
  • y : o1 + ElbowRadius(ND) + ConRaduis(ND)
  • z : o2 + outerradius(ND) + SocketDepth(ND)

Unknown macro: {float}


Before Subtract

After Subtract

subtract1 - removes the box that was drawn over half of the torus in order to make it a half torus
subtract1<-- subtractD(p4,p1)

p4 =

  • x : o0 + ElbowRadius(ND) + outerraduis(ND)
  • y : o1
  • z : o2

p1 =

  • x : o0
  • y : o1
  • z : o2

Unknown macro: {float}

*torus*small\ - draws a smaller torus

torussmall <-- torus(p1,R1,R3)

p1 =

  • x : o0
  • y : o1
  • z : o2

R1 = ElbowRadius(ND)

R3 = innerD(ND,EN)/2



Unknown macro: {float}


Before Subtract

After Subtract

subtract2 - removes the smaller torus, making the large torus hollow

subtract2 <-- subtractA(p4,p5)

p4 =

  • x : o0 + ElbowRadius(ND) + outerraduis(ND)
  • y : o1
  • z : o2

p5 =

  • x : o0 - ElbowRadius(ND) - innerD(ND,EN)/2
  • y : o1
  • z : o2



Unknown macro: {float}

box2- draws a box over the lower half of the remaining torus

box2 <-- box(p6,p7)

p6 =

  • x : o0
  • y : o1 - ElbowRadius(ND) - outerraduis(ND) - zc
  • z : o2 - ConRadius(ND)

p7 =

  • x : o0 + ElbowRadius(ND) + outerraduis(ND) + zc
  • y : o1
  • z : o2 + ConRadius(ND)



Unknown macro: {float}

subtract3 - removes the box that was drawn in the previous step

subtract3 <-- subtractD(p9,p1)

p9 =

  • x : o0
  • y : o1 + ElbowRadius(ND)
  • z : o2

p1 =

  • x : o0
  • y : o1
  • z : o2



Unknown macro: {float}

outercylinder - draws a cylinder at the end of the elbow to form the outer surface of a socket

outercylinder <-- cylinderB(p9,R4,P10)

p9 =

  • x : o0
  • y : o1 + ElbowRadius(ND)
  • z : o2

R4 = ConRaduis(ND)

p10 =

  • x : o0 - SocketDepth(ND)
  • y : o1 + ElbowRadius(ND)
  • z : o2



Unknown macro: {float}



Southwest Isometric View

innercylinder - draws a smaller cylinder within the larger cylinder, forming the inner surface of a socket

innercylinder <-- cylinderB(p9,R2,p10)

p9 =

  • x : o0
  • y : o1 + ElbowRadius(ND)
  • z : o2

R2 = outerraduis(ND)

p10 =

  • x : o0 - SocketDepth(ND)
  • y : o1 + ElbowRadius(ND)
  • z : o2



Unknown macro: {float}

subtract4 - removes the smaller cylinder, creating a hollow socket at the end of the elbow

subtract4 <-- subtractH(p11,p12,p13)

p11 =

  • x : o0
  • y : o1 + ElbowRadius(ND) - ConRaduis(ND)
  • z : o2

p12 =

  • x : o0 - SocketDepth(ND) - zc
  • y : o1 + ElbowRadius(ND) - outerraduis(ND)
  • z : o2

p13 =

  • x : o0 + zc
  • y : o1 + ElbowRadius(ND) + outerraduis(ND)
  • z : o2

Unknown macro: {float}


mirror - replicates the socket drawn onto the opposite end of the elbow

mirror <-- mirrorA(p14,p15,p16)

p14 =

  • x : o0 - SocketDepth(ND)
  • y : o1 + ElbowRadius(ND) - ConRaduis(ND)
  • z : o2

p15 =

  • x : o0
  • y : o1

p16 =

  • x : o0 + zc
  • y : o1 + zc



Unknown macro: {float}


bigunion - unites all the pieces drawn so the elbow will act as one unit, instead of three separate units.

bigunion <-- bigunionelbow(p1,p17,p18,R1,R2)

p1 =

  • x : o0
  • y : o1
  • z : o2

p17 =

  • x : o0 + ElbowRadius(ND)
  • y : o1 - SocketDepth( ND)
  • z : o2

p18 =

  • x : o0 - SocketDepth(ND)
  • y : o1 + ElbowRadius(ND)
  • z : o2

R1 = ElbowRadius(ND)

R2 = outerraduis(ND)

  • No labels