Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

General Program Information

Inputs Needed to Call the Grit Function

gritorigin -

  • x : tankorigin0 - tankdim0 - tankthick
  • y : [(tankorigin1 + (numtanks~tankdim1~) + (numtanks~tankthick~) + numfloctanks~flocdim1~ + (numfloctanks - 1)tankthick)- 1flocdim1/2]
  • z : tankorigin2 + flocinleth

gritdim - user input
walkwaywidth -
Δxgrit = walkwaywidth
Δygrit \= tankthick + flocdim1/2 + walkwaywidth - gritdim1 - 2gritthick
Δzgrit \= tankdim2 - channeldim2 - platformthick - flocinleth
gritthick -
platformthick -
gritpipeinr -
gritrad - user input
gritriserh - user input
gritholes - user input
gritdisp1 - user input
gritdisp2 - user input

Inputs Defined within the Grit Function

pipe2.origin

  • x : origin0 - firstdisp - ElbowRadius(2R1)
  • y : origin1
  • z : origin2 + ElbowRadius(2R1)

pipe3.origin

  • x : origin0 - firstdisp - 2ElbowRadius(2R1)
  • y : origin1
  • z : origin2 + Δz - ElbowRadius(2R1) - SocketDepth(2R1)

pipe4.origin

  • x : origin0 - Δx - 2thicktank - tankdim0 - ShortTeeLength(2R1) - SocketDepth(2R1)
  • y : origin1 + Δy + thicktank + tankdim1/2
  • z : origin2 + Δz + thickplatform + tankdim2/2 + TeeLength(2R1)/2

pipe5.origin

  • x : origin0 - Δx - 2thicktank - tankdim0 - ShortTeeLength(2R1)- SocketDepth(2R1)
  • y : origin1 + Δy + thicktank + tankdim1/2
  • z : origin2 + Δz - SocketDepth(2R1)

pipe6.origin

  • x : origin0 - Δx - thicktank - tankdim0
  • y : origin1 + Δy + thicktank + tankdim1/2
  • z : origin2 + Δz + platformthick + tankdim2/2

pipe7.origin

  • x : origin0 - Δx - thicktank - tankdim0 + seconddisp + CrossLength(2R1)
  • y : origin1 + Δy + thicktank + tankdim1/2
  • z : origin2 + Δz + platformthick + tankdim2/2

tank.origin

  • x : origin0 - Δx - thicktank
  • y : origin1 + Δy + thicktank
  • z : origin2 + Δz + thickplatform

origin

tank.dim

Δx

Δy

Δz

thick.tank

thick.platform

R1

R.hole

H.riser

num.holes

firstdisp

seconddisp

Inputs Defined within the Grit-2 Function

pipe1length = gritdisp1

pipe2length = Δzgrit - 3ElbowRadius(2gritpipeinr) - SocketDepth(2gritpipeinr)

pipe3length = ((Δxgrit + 2gritthick + gritdim0 + ShortTeeLength(2gritpipeinr) + SocketDepth(2gritpipeinr) - ElbowRadius(2gritpipeinr) - pipe1length)^2 + (Δygrit + gritthick + gritdim1/2)^2)^5 - 2ElbowRadius(2gritpipeinr)

pipe4length = gritdim2/2

pipe5length = platformthick + pipe4length - TeeLength(2gritpipeinr)/2

pipe6length = gritdisp2

pipe7length = 2SocketDepth(2gritpipeinr)

origin = gritorigin

grittankorigin =

  • x : origin0 - Δxgrit - gritthick
  • y : origin1 + Δygrit + gritthick
  • z : origin2 + Δzgrit + platformthick

pipe2origin =

  • x : origin0 - pipe1length - ElbowRadius(2gritpipeinr)
  • y : origin1
  • z : origin2 + ElbowRadius(2gritpipeinr)

pipe3origin =

  • x : origin0 - pipe1length - 2ElbowRadius(2gritpipeinr)
  • y : origin1
  • z : origin2 + pipe2length + 2ElbowRadius(2gritpipeinr)

pipe4origin =

  • x : origin0 - Δxgrit - 2gritthick - gritdim0 - ShortTeeLength(2gritpipeinr) - SocketDepth(2gritpipeinr)
  • y : origin1 + Δygrit + gritthick + gritdim1/2
  • z : origin2 + Δzgrit + pipe5length + TeeLength(2gritpipeinr)

pipe5origin =

  • x : origin0 - Δxgrit - 2gritthick - gritdim0 - ShortTeeLength(2gritpipeinr) - Socketdepth(2gritpipeinr)
  • y : origin1 + Δygrit + gritthick + gritdim1/2
  • z : origin2 + Δzgrit - SocketDepth(2gritpipeinr)

pipe6origin =

  • x : origin0 - Δxgrit - gritthick - gritdim0
  • y : origin1 + Δygrit + gritthick + gritdim1/2
  • z : origin2 + Δzgrit + pipe5length + TeeLength(2gritpipeinr)/2

pipe7origin =

  • x : origin0 - Δxgrit - gritthick - gritdim0 + pipe6length + CrossLength(2gritpipeinr)
  • y : origin1 + Δygrit + gritthick + gritdim1/2
  • z : origin2 + Δzgrit + pipe5length + TeeLength(2gritpipeinr)/2

riser1origin =

  • x : pipe7origin0~ + ShortTeeLength(2gritpipeinr) + 2SocketDepth(2gritpipeinr)
  • y : pipe7origin1 - TeeLength(2gritpipeinr)/2 - ElbowRadius(2gritpipeinr) - 2Socketdepth(2gritpipeinr)
  • z : pipe7origin2 + ElbowRadius(2gritpipeinr)

*elbow1origin =

  • x : origin0 - pipe1length - ElbowRadius(2gritpipeinr)
  • y : origin1
  • z : origin2

*elbow2origin =

  • x : pipe2origin0 - ElbowRadius(2gritpipeinr)
  • y : pipe2origin1
  • z : pipe2origin2 + pipe2length

elbow3origin =

  • x : pipe4origin0
  • y : pipe5origin1
  • z : pipe5origin2 + pipe2length

elbow4origin =

  • x : pipe7origin0 - CrossLength(2gritpipeinr)/2 - ElbowRadius(2gritpipeinr)
  • y : pipe7origin1 - CrossLength(2gritpipeinr)/2 - 2SocketDepth(2gritpipeinr)
  • z : pipe7origin2

tee1origin = pipe4origin

tee2origin =

  • x : pipe7origin0 + (ShortTeeLength(2gritpipeinr) + 2SocketDepth(2gritpipeinr))
  • y : pipe7origin1
  • z : pipe7origin2 - TeeLength(2gritpipeinr/2

Technical Program Outline

NOTE All dimensions, axis and angles are defined from a top view

layer1 - Creates a 'grit-pipe' layer for all of the pipes in the program

layer1 <-- layernew("grit-pipe", blue)

Pipe1 - Creates a pipe with an origin at the variable "origin". See Pipe Help for details on the pipe function.

Pipe1 <-- Pipe(origin, R1, firstdisp)

pipe1 length = gritdisp1

Rotate1 - the rotate3d function is used to rotate the pipe about the y axis, with the origin as the pivot, -90 degrees. Information about the rotate3d function can be found in the basics help page AutoCAD Grit Chamber Program

Image Added

Pipe2

pipe2 origin =

...

Notes: ElbowRadius is the radius of curvature of an elbow. In the script it is given as a function of the inner pipe radius. This function is defined in the Pipe Database program
SocketDepth is the connection depth for pieces such as elbows and tees which connect with pipes. In the script it is given as a function of the inner pipe radius. This function is defined in the Pipe Database program
AutoCAD Grit Chamber Program Image Added

Pipe3

pipe3 origin =

...

Note: ShortTeeLength is the length of the shorter piece of a tee; it is the distance from the center of the longer piece of the tee to just before the connection piece. To clarify this see the tee help page.In the script it is given as a function of the inner pipe radius. This function is defined in the Pipe Database program
AutoCAD Grit Chamber Program Image Added

Rotate2 - the rotate3d function is used to rotate pipe3 about the y axis, with its own origin as the pivot point, -90 degrees.
AutoCAD Grit Chamber Program Image Added

layer2 creates a new layer "grit-elbow" for all the elbows in the program
layer3 freezes the "grit-pipe" layer. When a layer is frozen, you can neither see nor alter the objects set under that layer. You only want to work with one layer at a time to avoid interference with other objects. Some elbows and pipes for example over overlap at times and this sidesteps that problem.

...

  • x: origin 0 - pipe1 length - ElbowRadius
  • y: origin 1
  • z: origin 2
    Image Added
    Note: The pipes are currently frozen, but are shown in the image to illustrate location

Rotate3 the rotate3d function is used to rotate elbow1 90 degrees about the z axis, with the above labeled rotation point as the pivot point.

rotation point = (not an actual variable in the script)

  • x: elbow1 0 + ElbowRadius
  • y: elbow1 1
  • z: elbow1 2
    Image Added

Rotate4 the rotate3d function is used to rotate elbow1 -90 degrees about the x axis. The rotation point is the same as the one used in Rotate3
Image Added Image Added

elbow2

elbow2 origin =

  • x: pipe2 origin0 - ElbowRadius
  • y: pipe2 origin1
  • z: pipe2 origin2 + pipe2 length
    Image Added

Rotate5 the rotate3d function is used to rotate elbow1 90 degrees about the x axis, with the above labeled rotation point as the pivot point.

rotation point = (not an actual variable in the script)

  • x: elbow2 0 + ElbowRadius
  • y: elbow2 1
  • z: elbow2 2
    Image Added

layer4 thaws the "grit-pipe" layer

Rotate6

elbow3

elbow3 ~ origin~ = (pipe5 has not been created yet but see frontview picture in general section for clarification)

  • x: pipe5 origin0
  • y: pipe5 origin1
  • z: pipe5 origin2 - ElbowRadius
    Image Added

Rotate7 the rotate3d function is used to rotate elbow1 \90 degrees about the z axis, with the above labeled rotation point as the pivot point. The resulting image is seen below on the left.
Image Added Image Added

Rotate8 the rotate3d function is used to rotate elbow1 -90 degrees about the x axis. The rotation point is the same as the one used in Rotate7. The resulting image is seen above on the right.

Rotate9

layer5 sets the current layer to "grit-pipe"
layer6 freezes "grit-elbow"

Pipe4

pipe4origin =

  • x : origin0 - Δxgrit - 2gritthick - gritdim0 - ShortTeeLength(2gritpipeinr) - SocketDepth(2gritpipeinr)
  • y : origin1 + Δygrit + gritthick + gritdim1/2
  • z : origin2 + Δzgrit + pipe5length + TeeLength(2gritpipeinr)

pipe4length = gritdim2/2

Pipe5

pipe5origin =

  • x : origin0 - Δxgrit - 2gritthick - gritdim0 - ShortTeeLength(2gritpipeinr) - Socketdepth(2gritpipeinr)
  • y : origin1 + Δygrit + gritthick + gritdim1/2
  • z : origin2 + Δzgrit - SocketDepth(2gritpipeinr)

pipe5length = platformthick + pipe4length - TeeLength(2gritpipeinr)/2

Pipe6

pipe6origin =

  • x : origin0 - Δxgrit - gritthick - gritdim0
  • y : origin1 + Δygrit + gritthick + gritdim1/2
  • z : origin2 + Δzgrit + pipe5length + TeeLength(2gritpipeinr)/2

pipe6length = gritdisp2

Rotate10

Pipe7

pipe7origin =

  • x : origin0 - Δxgrit - gritthick - gritdim0 + pipe6length + CrossLength(2gritpipeinr)
  • y : origin1 + Δygrit + gritthick + gritdim1/2
  • z : origin2 + Δzgrit + pipe5length + TeeLength(2gritpipeinr)/2

pipe7length = 2SocketDepth(2gritpipeinr)

Rotate11

Pipe8

Pipe9

zoom1

Pipe10and11

layer7 Creates a blue 'grit-riser' layer.

layer8 Freezes the 'gritpipe' layer.

Riser1*

Riser234

layer9 Creates a purple 'grit-cross' layer.

layer10 Freezes the 'grit-riser' layer

cross

Rotate12

Rotate13

layer11 Thaws the 'grit-elbow' layer.

layer12

layer13 Freezes the 'grit-cross' layer.

elbow4

Rotate14

Rotate15

elbow5

elbow67

layer14 Creates a new blue 'grit-tee' layer

layer15 Freezes the 'grit-elbow' layer.

Tee1

move

Tee2

Rotate16

Rotate17

layer16 Creates a new grey 'grit-tank' layer.

Tank

layer17

layer18 Freezes the 'grit-tank' layer

layer19 Freezes the 'grit-tee' layer

one

two

three

test

return stack