General Program Information

Input Definitions

Inputs Needed to Call the Elbow Function

o - the origin, a 3*1 matrix with x,y,z positions corresponding to the point where the elbow will be drawn
Pipeinr - the inner radius of the elbow

Inputs Defined within the Elbow Function

p1 =

p2 =

p3 =

p4 =

p5 =

p6 =

p7 =

p9 =

p10 =

p11 =

p12 =

p13 =

p14 =

p15 =

p16 =

p17 =

p18 =

R1 =

R2 =

R3 =

R4 =

H1 =

win1 =

win2 =

Note: zc corresponds to the zoom constant within AutoCAD and can be found in the basics file that is referenced by the elbow program.

Technical Program Outline

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

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

zoomwin <-- zoomwina(win1,win2)

win1 =

win2 =


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

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

p1 =

R1 =

R2 =

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

box1 <-- box(p2,p3)

p2 =

p3 =

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 =

p1 =

*torus*small\ - draws a smaller torus

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

p1 =

R1 =

R3 =

subtract2 - removes the left half of the smaller torus

subtract2 <-- subtractA(p4,p5)

p4 =

p5 =

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

box2 <-- box(p6,p7)

p6 =

p7 =

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

subtract3 <-- subtractD(p9,p1)

p9 =

p1 =

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

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

p9 =

R4 =

p10 =

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

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

p9 =

R2 =

p10 =

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

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

p11 =

p12 =

p13 =

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

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

p14 =

p15 =

p16 =

bigunion -

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

p1 =

p17 =

p18 =

R1 =

R2 =