Elbow Drawing Script

layer4 - Layernew creates a new green layer "elbow."

layer4 <- layernew("elbow",green)

{float:left|border=2px solid black}
[!elbow1.bmp|width=280px!|AutoCAD Channel Program]
Top View
{float}

elbow1 - Calls the Elbow Program to create an elbow.

elbow1 <- elbow(sedtankelbow1origin,NDSedPipeEntrance,ENPipeSpec)

sedtankelbow1origin =

NDSedPipeEntrance = The nominal diameter of the pipe. This value along with the pipe schedule is used to determine other actual dimensions of the elbow

ENPipeSpec = The enumerated pipe schedule type. Each schedule of pipe is represented by a specific number within our code.

{float:left|border=2px solid black}
[!rotate6.bmp|width=280px!|AutoCAD Channel Program]
Top View
{float}

rotate6 - Rotate3d turns the object based on a given axis and degree angle.

rotate6 <- rotate3d(p1,p2,"x",-90)

Note: p1 and p2 are dummy variables used only in the program help section to designate the matrix below.

p1 =

p2 =

"x" - specifies axis that object will be rotated about.

-90 - rotation angle

{float:left|border=2px solid black}
[!rotate7.bmp|width=280px!|AutoCAD Channel Program]
Top View
{float}

rotate7 - Rotate3d turns the object based on a given axis and degree angle.

rotate7 <- rotate3d(p1,p2,"y",90)

Note: p1 and p2 are dummy variables used only in the program help section to designate the matrix below.

p1 =

p2 =

"y" - specifies axis that object will be rotated about.

90 - rotation angle.

{float:left|border=2px solid black}
[!copy1.bmp|width=280px!|AutoCAD Channel Program]
Top View
{float}

copy1 - CopyDa duplicates the selected object.

copy1 <- copyDa(p1,sedtankpipe5origin,sedtankpipe6origin,sedtankpipe7origin,sedtankpipe8origin)

Note: p1 is a dummy variable used only in the program help section to designate the matrix below.

p1 =

sedtankpipe5origin =

sedtankpipe6origin =

sedtankpipe7origin =

sedtankpipe8origin =

rotate8 <- rotate3d(p1,sedtankpipe1origin,"z",sedtankpipe5angle)

Note: p1 is a dummy variable used only in the program help section to designate the matrix below.

p1 =

sedtankpipe1origin =

"z" - specifies axis that object will be rotated about.

sedtankpipe5angle = -(rad/deg) * atan((((5*LSed)/8 - WChannel/2)/ [3 * (WSed/2 - outerradius(NDSedLaunder))/4) + outerradius(NDSedLaunder))-1)

{float:left|border=2px solid black}
[!rotate9.bmp|width=280px!|AutoCAD Channel Program]
Top View
{float}

rotate9 - Rotate3d turns the object based on a given axis and degree angle.

rotate9 <- rotate3d(p1,sedtankpipe2origin,"z".sedtankpipe6angle)

Note: p1 is a dummy variable used only in the program help section to designate the matrix below.

p1 =

sedtankpipe2origin =

"z" - specifies axis that object will be rotated about.

sedtankpipe6angle = -(rad/deg) * (((LSed/8 - WChannel/2)/ ((WSed/2 - outerradius(NDSedLaunder))/4) + outerradius(NDSedLaunder))-1)

{float:left|border=2px solid black}
[!rotate10.bmp|width=280px!|AutoCAD Channel Program]
Top View
{float}

rotate10 - Rotate3d turns the object based on a given axis and degree angle.

rotate10 <- rotate3d(p1,sedtankpipe3origin,"z".sedtankpipe7angle)

Note: p1 is a dummy variable used only in the program help section to designate the matrix below.

p1 =

sedtankpipe3origin =

"z" - specifies axis that object will be rotated about.

sedtankpipe7angle = -(rad/deg) * atan(((3*LSed/8 - WChannel/2)/ ((WSed/2 - outerradius(NDSedLaunder))/4) + outerradius(NDSedLaunder))-1)

{float:left|border=2px solid black}
[!rotate11.bmp|width=280px!|AutoCAD Channel Program]
Top View
{float}

rotate11 - Rotate3d turns the object based on a given axis and degree angle.

rotate11 <- rotate3d(p1,sedtankpipe4origin,"z".sedtankpipe8angle)

Note: p1 is a dummy variable used only in the program help section to designate the matrix below.

p1 =

sedtankpipe4origin =

"z" - specifies axis that object will be rotated about.

sedtankpipe8angle = -(rad/deg) * atan((((7*LSed)/8 - WChannel/2)/ (3*(WSed/2 - outerradius(NDSedLaunder))/4) + outerradius(NDSedLaunder))-1)

layerset - Layerset selects the layer "0".

layerset <- layerset("0")

layerfreeze4 - Layerfreeze locks the layer "elbow" so that it cannot be edited.

layerfreeze4 <- layerfreeze("elbow")

layer5 - Layernew creates a new green layer "elbowa."

layer5 <- layernew("elbowa",green)

{float:left|border=2px solid black}
[!elbow5.bmp|width=280px!|AutoCAD Channel Program]
Top View
{float}

elbow5 - Calls the Elbow Program to create an elbow.

elbow5 <- elbow(sedtankelbow5origin,NDSedPipeEntrance,ENPipeSpec)

sedtankelbow5origin =

NDSedPipeEntrance = The nominal diameter of the pipe. This value along with the pipe schedule is used to determine other actual dimensions of the elbow

ENPipeSpec = The enumerated pipe schedule type. Each schedule of pipe is represented by a specific number within our code.

{float:left|border=2px solid black}
[!rotate14.bmp|width=280px!|AutoCAD Channel Program]
Top View
{float}

rotate14 - Rotate3d turns the object based on a given axis and degree angle.

rotate14 <- rotate3d(p1,p2,"x",90)

Note: p1 and p2 are dummy variables used only in the program help section to designate the matrix below.

p1 =

p2 =

"x" - specifies axis that object will be rotated about.

90 - specifies rotation angle.

{float:left|border=2px solid black}
[!copy2.bmp|width=280px!|AutoCAD Channel Program]
Top View
{float}

copy2 - CopyDa duplicates the selected objuect.

copy2 <- copyDa(p1,sedtankelbow5origin,sedtankelbow6origin,sedtankelbow7origin,sedtankelbow8origin)

Note: p1 is a dummy variable used only in the program help section to designate the matrix below.

p1 =

sedtankelbow5origin =

sedtankelbow6origin =

sedtankelbow7origin =

sedtankelbow8origin =

rotate15 <- rotate3d(p1,sedtankpipe9origin,"z".sedtankpipe6angle)

Note: p1 is a dummy variable used only in the program help section to designate the matrix below.

p1 =

sedtankelbow9origin =

"z" - specifies axis that object will be rotated about.

sedtankpipe6angle = -(rad/deg) * (((LSed/8 - WChannel/2)/ ((WSed/2 - outerradius(NDSedLaunder))/4) + outerradius(NDSedLaunder))-1)

{float:left|border=2px solid black}
[!rotate16.bmp|width=700px!|AutoCAD Channel Program]
Top View
{float}

rotate16 - Rotate3d turns the object based on a given axis and degree angle.

rotate16 <- rotate3d(p1,sedtankpipe10origin,"z".sedtankpipe7angle)

Note: p1 is a dummy variable used only in the program help section to designate the matrix below.

p1 =

sedtankelbow10origin =

"z" - specifies axis that object will be rotated about.

sedtankpipe7angle = -(rad/deg) * atan(((3*LSed/8 - WChannel/2)/ ((WSed/2 - outerradius(NDSedLaunder))/4) + outerradius(NDSedLaunder))-1)

{float:left|border=2px solid black}
[!rotate17.bmp|width=700px!|AutoCAD Channel Program]
Top View
{float}

rotate17 - Rotate3d turns the object based on a given axis and degree angle.

rotate17 <- rotate3d(p1,sedtankpipe11origin,"z".sedtankpipe5angle)

Note: p1 is a dummy variable used only in the program help section to designate the matrix below.

p1 =

sedtankpipe11origin =

"z" - specifies axis that object will be rotated about.

sedtankpipe5{~}angle - specifies rotation angle.

{float:left|border=2px solid black}
[!rotate18.bmp|width=700px!|AutoCAD Channel Program]
Top View
{float}

rotate18 - Rotate3d turns the object based on a given axis and degree angle.

rotate18 <- rotate3d(p1,sedtankpipe12origin,"z".sedtankpipe8angle)

Note: p1 is a dummy variable used only in the program help section to designate the matrix below.

p1 =

sedtankpipe12origin =

"z" - specifies axis that object will be rotated about.

sedtankpipe8{~}angle - specifies rotation angle.

layerset - Layerset selects the layer "0".

layerset <- layerset("0")

layerfreeze5 - Layerfreeze locks the layer "elbowa" so that it cannot be edited.

layerfreeze5 <- layerfreeze("elbowa")

layer6 - Layerfreeze locks the layer "elbowb" so that it cannot be edited.

layer6 <- layernew("elbowb",green)

elbow9 - Calls the Elbow Program to create an elbow.

elbow9 <- elbow(sedtankelbow9origin,NDSedLaunder,ENPipeSpec)

sedtankelbow9origin =

NDSedPipeEntrance = The nominal diameter of the pipe. This value along with the pipe schedule is used to determine other actual dimensions of the elbow

ENPipeSpec = The enumerated pipe schedule type. Each schedule of pipe is represented by a specific number within our code.

rotate19 - Rotate3d turns the object based on a given axis and degree angle.

rotate19 <- rotate3d(p1,p2,"z",90)

Note: p1 and p2 are dummy variables used only in the program help section to designate the matrix below.

p1 =

p2 =

"z" - specifies axis that object will be rotated about.

90 - specifies rotation angle.

rotate20 - Rotate3d turns the object based on a given axis and degree angle.

rotate20 <- rotate3d(p1,p2,"x",90)

Note: p1 and p2 are dummy variables used only in the program help section to designate the matrix below.

p1 =

p2 =

"x" - specifies axis that object will be rotated about.

90 - specifies rotation angle.

elbow10 - Calls the Elbow Program to create an elbow.

elbow10 <- elbow(sedtankelbow10origin,NDSedLaunder,ENPipeSpec)

sedtankelbow10origin =

NDSedPipeEntrance = The nominal diameter of the pipe. This value along with the pipe schedule is used to determine other actual dimensions of the elbow

ENPipeSpec = The enumerated pipe schedule type. Each schedule of pipe is represented by a specific number within our code.

rotate21 - Rotate3d turns the object based on a given axis and degree angle.

rotate21 <- rotate3d(p1,p2,"x",-90)

Note: p1 and p2 are dummy variables used only in the program help section to designate the matrix below.

p1 =

p2 =

"x" - specifies axis that object will be rotated about.

-90 - specifies rotation angle.

layerset - Layerset selects the layer "0".

layerset <- layerset("0")

layerfreeze6 - Layerfreeze locks the layer "elbowb" so that it cannot be edited.

layerfreeze6 <- layerfreeze("elbowb")