Inlet Pipe Drawing Script - layout 1
viewtops - Adjust workspace so that the object is being viewed from the top.
viewtops <- viewtop1
layerthawc - Layerthaw unlocks the layer "channel" so that it can be edited.
layerthawc <- layerthaw("channel")
layersetc - Layerset selects the layer "channel".
layersetc <- layerset("channel")
cylinder1 - CylinderA creates a cylinder based on three dimensions.
cylinder1 <- cylinderA(sedtankpipe1origin,outerradius(NDSedPipeEntrance),-TChannelWall)
sedtankpipe1origin =
- x: tankorigin0 - LSed + WChannel/2
- y: tankorigin1 + WSed/2 + outerradius(NDSedLaunder) + 3*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + HSed - HChannel
cylinder2 - CylinderA creates a cylinder based on three dimensions.
cylinder2 <- cylinderA(sedtankpipe2origin,outerradius(NDSedPipeEntrance),-TChannelWall)
sedtankpipe2origin =
- x: tankorigin0 - LSed + WChannel/2
- y: tankorigin1 + WSed/2 + outerradius(NDSedLaunder) + 1*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + HSed - HChannel
cylinder3 - CylinderC creates a cylinder based on three dimensions.
cylinder3 <- cylinderC(sedtankpipe3origin,outerradius(NDSedPipeEntrance),-TChannelWall)
sedtankpipe3origin =
- x: tankorigin0 - LSed + WChannel/2
- y: tankorigin1 + WSed/2 - outerradius(NDSedLaunder) - 1*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + HSed - HChannel
cylinder4 - CylinderA creates a cylinder based on three dimensions.
cylinder4 <- cylinderA(sedtankpipe4origin,outerradius(NDSedPipeEntrance),-TChannelWall)
sedtankpipe4origin =
- x: tankorigin0 - LSed + WChannel/2
- y: tankorigin1 + WSed/2 - outerradius(NDSedLaunder) - 3*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + HSed - HChannel
subtract1 - SubtractH subtracts a selected object based on three specified points.
subtract1 <- subtractH(channelorigin,p1,p2)
channelorigin =
- if layout 1-3:
- x: tankorigin0 - LSed + WChannel
- y: tankorigin1 - TPlantWall
- z: tankorigin2 + HSed - HChannel
- if layout4:
- x: tankorigin0 - LSed -TChannelWall
- y: tankorigin1 - TPlantWall
- z: tankorigin2 + HSed - HChannel
p1 =
- x: sedtankpipe1origin0 + outerradius(NDSedPipeEntrance)
- y: sedtankpipe1origin1 + outerradius(NDSedPipeEntrance)
- z: sedtankpipe1origin2
p2 =
- x: sedtankpipe4origin0 - outerradius(NDSedPipeEntrance)
- y: sedtankpipe4origin1 - outerradius(NDSedPipeEntrance)
- z: sedtankpipe4origin2
holes2 -
holes2 <- concat(cylinder1,cylinder2,cylinder3)
holes3 -
holes3 <- concat(cylinder4,subtract1)
layerset - Layerset selects the layer "0".
layerset <- layerset("0")
layerfreeze - Layerfreeze locks the layer "channel" so that it cannot be edited.
layerfreeze <- layerfreeze("channel")
layer3 - Layernew creates a new blue layer "pipe".
layer3 <- layernew("pipe",blue)
pipe1 - Calls the Pipe Program to create a pipe.
pipe1 <- Pipe(sedtankpipe1origin,NDSedPipeEntrance,-sedtankpipe1length,ENPipeSpec)
sedtankpipe1origin =
- x: tankorigin0 - LSed + WChannel/2
- y: tankorigin1 + WSed/2 + outerradius(NDSedLaunder) + 3*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + HSed - HChannel
NDSedPipeEntrance = Nominal diameter of entrance pipe from the inlet channel to the sedimentation tank.
sedtankpipe1length = HSed - HInletChannel - (WSed/2 * tank(ANSedBottom) + ElbowRadius(NDSedPipeEntrance))-ElbowRadius(NDSedPipeEntrance)
ENPipeSpec = enumerated pipe schedule type. Each schedule of pipe is represented by a specific number within our code.
pipe2 - Calls the Pipe Program to create a pipe.
pipe2 <- Pipe(sedtankpipe2origin,NDSedPipeEntrance,-sedtankpipe1length,ENPipeSpec)
sedtankpipe2origin =
- x: tankorigin0 - LSed + WChannel/2
- y: tankorigin1 + WSed/2 + outerradius(NDSedLaunder) + 1*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + HSed - HChannel
NDSedPipeEntrance = Nominal diameter of entrance pipe from the inlet channel to the sedimentation tank.
sedtankpipe1length = HSed - HInletChannel - (WSed/2 * tank(ANSedBottom) + ElbowRadius(NDSedPipeEntrance))-ElbowRadius(NDSedPipeEntrance)
ENPipeSpec = enumerated pipe schedule type. Each schedule of pipe is represented by a specific number within our code.
pipe3 - Calls the Pipe Program to create a pipe.
pipe3 <- Pipe(sedtankpipe3origin,NDSedPipeEntrance,-sedtankpipe1length,ENPipeSpec)
sedtankpipe3origin =
- x: tankorigin0 - LSed + WChannel/2
- y: tankorigin1 + WSed/2 - outerradius(NDSedLaunder) - 1*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + HSed - HChannel
NDSedPipeEntrance = Nominal diameter of entrance pipe from the inlet channel to the sedimentation tank.
sedtankpipe1length = HSed - HInletChannel - (WSed/2 * tank(ANSedBottom) + ElbowRadius(NDSedPipeEntrance))-ElbowRadius(NDSedPipeEntrance)
ENPipeSpec = enumerated pipe schedule type. Each schedule of pipe is represented by a specific number within our code.
pipe4 - Calls the Pipe Program to create a pipe.
pipe4 <- Pipe(sedtankpipe4origin,NDSedPipeEntrance,-sedtankpipe1length,ENPipeSpec)
sedtankpipe4origin =
- x: tankorigin0 - LSed + WChannel/2
- y: tankorigin1 + WSed/2 - outerradius(NDSedLaunder) - 3*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + HSed - HChannel
pipe5 - Calls the Pipe Program to create a pipe.
pipe5 <- Pipe(sedtankpipe5origin,NDSedPipeEntrance,-sedtankpipe5length,ENPipeSpec)
sedtankpipe5origin =
- x: tankorigin0 - LSed + WChannel/2 + ElbowRadius(NDSedPipeEntrance)
- y: tankorigin1 + WSed/2 + outerradius(NDSedLaunder) + 3*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + WSed/2*tan(ANSedBottom) + ElbowRadius(NDSedPipeEntrance)
rotatepipe5 - Rotate3d turns the object based on a given axis and degree angle.
rotatepipe5 <- rotate3d(p1,sedtankpipe5origin,"y",90)
p1 =
- x: sedtankpipe5origin0 + innerD(NDSedPipeEntrance,ENPipeSpec)/2
- y: sedtankpipe5origin1
- z: sedtankpipe5origin2
"y" - specifies axis that object will be rotated about.
rotate2a - Rotate3d turns the object based on a given axis and degree angle.
rotate2a - rotate3d(p1,sedtankpipe1origin,"z",sedtankpipe5angle)
sedtankpipe1origin =
- x: tankorigin0 - LSed + WChannel/2
- y: tankorigin1 + WSed/2 + outerradius(NDSedLaunder) + 3*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + HSed - HChannel
p1 =
- x: sedtankpipe5origin0
- y: sedtankpipe5origin1 + innerD(NDSedPipeEntrance,ENPipeSpec)/2
- z: sedtankpipe5origin2 + innerD(NDSedPipeEntrance,ENPipeSpec)/2
"z" - specifies axis that object will be rotated about.
pipe6 - Calls the Pipe Program to create a pipe.
pipe6 <- Pipe(sedtankpipe6origin,NDSedPipeEntrance,sedtankpipe6length,ENPipeSpec)
sedtankpipe6origin =
- x: tankorigin0 - LSed + WChannel/2 + ElbowRadius(NDSedPipeEntrance)
- y: tankorigin1 + WSed/2 + outerradius(NDSedLaunder) + 1*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + WSed/2*tan(ANSedBottom) + ElbowRadius(NDSedPipeEntrance)
rotate3 - Rotate3d turns the object based on a given axis and degree angle.
rotate3 <- rotate3d(p1,sedtankpipe6origin,"y",90)
p1 =
- x: sedtankpipeorigin0 + innerD(NDSedPipeEntrance,ENPipeSpec)/2
- y: sedtankpipe5origin1
- z: sedtankpipe5origin0
sedtankpipe6origin =
- x: tankorigin0 - LSed + WChannel/2 + ElbowRadius(NDSedPipeEntrance)
- y: tankorigin1 + WSed/2 + outerradius(NDSedLaunder) + 1*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + WSed/2*tan(ANSedBottom) + ElbowRadius(NDSedPipeEntrance)
"y" - specifies axis that object will be rotated about.
rotate3a - Rotate3d turns the object based on a given axis and degree angle.
rotate3a <- rotate3d(p1,sedtankpipe2origin,"z",sedtankpipe6angle)
p1 =
- x: sedtankpipe6origin0
- y: sedtankpipe6origin1 + innerD(NDSedPipeEntrance,ENPipeSpec)/2
- z: sedtankpipe6origin2 + innerD(NDSedPipeEntrance,ENPipeSpec)/2
sedtankpipe2origin =
- x: tankorigin0 - LSed + WChannel/2
- y: tankorigin1 + WSed/2 + outerradius(NDSedLaunder) + 1*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + HSed - HChannel
"y" - specifies axis that object will be rotated about.
pipe7 - Calls the Pipe Program to create a pipe.
pipe7 <- Pipe(sedtank7origin,NDSedPipeEntrance,sedtankpipe7length,ENPipeSpec)
sedtankpipe7origin =
- x: tankorigin0 - LSed + WChannel/2 + ElbowRadius(NDSedPipeEntrance)
- y: tankorigin1 + WSed/2 - outerradius(NDSedLaunder) - 1*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + WSed/2*tan(ANSedBottom) + ElbowRadius(NDSedPipeEntrance)
rotate4 - Rotate3d turns the object based on a given axis and degree angle.
rotate4 <- rotate3d(p1,sedtankpipe7origin,"y",90)
p1 =
- x: sedtankpipe7origin0 + innerD(NDSedPipeEntrance,ENPipeSpec)/2
- y: sedtankpipe7origin1
- z: sedtankpipe7origin2
sedtankpipe7origin =
- x: tankorigin0 - LSed + WChannel/2 + ElbowRadius(NDSedPipeEntrance)
- y: tankorigin1 + WSed/2 - outerradius(NDSedLaunder) - 1*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + WSed/2*tan(ANSedBottom) + ElbowRadius(NDSedPipeEntrance)
"y" - specifies axis that object will be rotated about.
rotate4a - Rotate3d turns the object based on a given axis and degree angle.
rotate4a <- rotate3d(p1,sedtankpipe3origin,"z",sedtankpipe7angle)
p1 =
- x: sedtankpipe7origin0
- y: sedtankpipe7origin1 + innerD(NDSedPipeEntrance,ENPipeSpec)/2
- z: sedtankpipe7origin2 + innerD(NDSedPipeEntrance,ENPipeSpec)/2
sedtankpipe3origin =
- x: tankorigin0 - LSed + WChannel/2
- y: tankorigin1 + WSed/2 - outerradius(NDSedLaunder) - 1*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + HSed - HChannel
"z" - specifies axis that object will be rotated about.
pipe8 - Calls the Pipe Program to create a pipe.
pipe8 <- Pipe(sedtankpipe8origin,NDSedPipeEntrance,sedtankpipe8length,ENPipeSpec)
sedtankpipe8origin =
- x: tankorigin0 - LSed + WChannel/2 + ElbowRadius(NDSedPipeEntrance)
- y: tankorigin1 + WSed/2 - outerradius(NDSedLaunder) - 3*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + WSed/2*tan(ANSedBottom) + ElbowRadius(NDSedPipeEntrance)
rotate5 - Rotate3d turns the object based on a given axis and degree angle.
rotate5 <- rotate3d(p1,sedtankpipe8origin,"y",90)
p1 =
- x: sedtankpipe8origin0 + innerD(NDSedPipeEntrance,ENPipeSpec)/2
- y: sedtankpipe8origin1
- z: sedtankpipe8origin2
sedtankpipe8origin =
- x: tankorigin0 - LSed + WChannel/2 + ElbowRadius(NDSedPipeEntrance)
- y: tankorigin1 + WSed/2 - outerradius(NDSedLaunder) - 3*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + WSed/2*tan(ANSedBottom) + ElbowRadius(NDSedPipeEntrance)
"y" - specifies axis that object will be rotated about.
rotate5a - Rotate3d turns the object based on a given axis and degree angle.
rotate5a <- rotate3d(p1,sedtankpipe4origin,"z",sedtankpipe8angle)
p1 =
- x: sedtankpipe8origin0
- y: sedtankpipe8origin1 + innerD(NDSedPipeEntrance,ENPipeSpec)/2
- z: sedtankpipe8origin2 + innerD(NDSedPipeEntrance,ENPipeSpec)/2
sedtankpipe4origin =
- x: tankorigin0 - LSed + WChannel/2
- y: tankorigin1 + WSed/2 - outerradius(NDSedLaunder) - 3*(WSed/2 - outerradius(NDSedLaunder))/4
- z: tankorigin2 + HSed - HChannel
"z" - specifies axis that object will be rotated about.
pipe9 - Calls the Pipe Program to create a pipe.
pipe9 <- Pipe(sedtankpipe9origin,NDSedPipeEntrance,sedtankpipe9length,ENPipeSpec)
sedtankpipe9origin =
- x: tankorigin0 - (7*LSed)/8
- y: tankorigin1 + WSed/2
- z: tankorigin2 + SSedInlet
pipe10 - Calls the Pipe Program to create a pipe.
pipe10 <- Pipe(sedtankpipe10origin,NDSedPipeEntrance,sedtankpipe9length,ENPipeSpec)
sedtankpipe10origin =
- x: tankorigin0 - (5*LSed)/8
- y: tankorigin1 + WSed/2
- z: tankorigin2 + SSedInlet
pipe11 - Calls the Pipe Program to create a pipe.
pipe11 <- Pipe(sedtankpipe11origin,NDSedPipeEntrance,sedtankpipe9length,ENPipeSpec)
sedtankpipe11origin =
- x: tankorigin0 - (3*LSed)/8
- y: tankorigin1 + WSed/2
- z: tankorigin2 + SSedInlet
pipe12 - Calls the Pipe Program to create a pipe.
pipe12 <- Pipe(sedtankpipe12origin,NDSedPipeEntrance,sedtankpipe9length,ENPipeSpec)
sedtankpipe12origin =
- x: tankorigin0 - (LSed)/8
- y: tankorigin1 + WSed/2
- z: tankorigin2 + SSedInlet
layerfreeze2 - Layerfreeze locks the layer "pipe" so that it cannot be edited.
layerfreeze2 <- layerfreeze("pipe")
cylinder5 - CylinderA creates a cylinder based on three dimensions.
cylinder5 <- cylinderA(sedtankpipe14origin,outerradius(NDSedLaunder),-TPlantWall)
sedtankpipe14origin =
- x: tankorigin0 - LSed
- y: tankorigin1 + WSed/2
- z: tankorigin2 + HSed - HChannel - TMp
rotate2 - Rotate3d turns the object based on a given axis and degree angle.
rotate2 <- rotae3d(p1,sedtankpipe14origin,"y",90)
p1 =
- x: sedtankpipe14origin0 + outerradius(NDSedLaunder)
- y: sedtankpipe14origin1
- z: sedtankpipe14origin2
sedtankpipe14origin =
- x: tankorigin0 - LSed
- y: tankorigin1 + WSed/2
- z: tankorigin2 + HSed - HChannel - TMp
"y" - specifies axis that object will be rotated about.
subtract2 - SubtractD subtracts a selected object based on two specified points.
subtract2 <- subtractD(PlantOrigin,p1)
p1 =
- x: sedtankpipe14origin0
- y: sedtankpipe14origin1 + outerradius(NDSedLaunder)
- z: sedtankpipe14origin2
holes1 -
holes1 <- concat(cylinder5,rotate2)
layerthawp - Layerthaw unlocks the layer "pipe" so that it can be edited.
layerthawp <-layerthaw("pipe")
layersetp - Layerset selects the layer "pipe".
layersetp <- layerset("pipe")
pipe13 - Calls the Pipe Program to create a pipe.
pipe13 <- Pipe(sedtankpipe13origin,NDSedLaunder,sedtankpipe13length,ENPipeSpec)
sedtankpipe13origin =
- x: tankorigin0 - LSed + WChannel + TChannelWall + ElbowRadius(NDSedLaunder)
- y: tankorigin1 + WSed/2
- z: tankorigin2 + HSed - HChannel - TMp + ElbowRadius(NDSedLaunder)
pipe14 - Calls the Pipe Program to create a pipe.
pipe14 <- Pipe(sedtankpipe14origin,NDSedLaunder,sedtankpipe14length,ENPipeSpec)
sedtankpipe14origin =
- x: tankorigin0 - LSed
- y: tankorigin1 + WSed/2
- z: tankorigin2 + HSed - HChannel - TMp
rotate6 - Rotate3d turns the object based on a given axis and degree angle.
rotate6 <- rotate3d(p1,sedtankpipe14origin,"y",90)
p1 =
- x: sedtankpipe14origin0 + innerD(NDSedLaunder,ENPipeSpec)/2
- y: sedtankpipe14origin1
- z: sedtankpipe14origin2
sedtankpipe14origin =
- x: tankorigin0 - LSed
- y: tankorigin1 + WSed/2
- z: tankorigin2 + HSed - HChannel - TMp
"y" - specifies axis that object will be rotated about.
layerfreeze3 - Layerfreeze locks the layer "channel" so that it cannot be edited.
layerfreeze3 <- layerfreeze("pipe")