Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

General Program Information

This program draws the slots that hold the baffles in place for the vertical flocculator. Slots are only drawn when concrete baffles are used in vertical flocculators, when they are needed for structural support. Horizontal flocculators do not need slots because they are built into the walls.

Wiki Markup
h3. General Program Information

\\
{float:left|border=2px solid black}
[!slots.PNG|width=300px!|AutoCAD Channel Program]
Slots in Floc Channels
{float}\\
\\
\\
\\
\\
\\

h3. Technical Program Outline

*if statement* \- if L{~}slot~ = 0, the script will not be executed

*local* \- [Layer{~}new~|AutoCAD Basics Layer] creates a new dark grey layer, "flocchannelslot"

local <\- layer{~}new~("flocchannelslot", dkgrey)

*layerthaw4* \- layer{~}thaw~ thaws floctankwall for editing

*for loop* \- this loop counts the number of baffles per channel

x(j) - returns the number of channels in column j

*for loop* \- this loop assigns the appropriate origin and dimension to each slot. Each slot is then drawn and subtracted from the floctankwall

*slot{*}{*}{~}origin i{~}* =
* x: Plant{~}Origin0~ \- L{~}Sed~ + X{~}FlocBaffles i,j~
* y: \-L{~}slot~ + Y{~}FlocBaffles 0,j~
* z: Plant{~}Origin2~ + Z{~}FlocBaffles i,j~

*slot{*}{*}{~}dim i{~}* =
* x: T{~}FlocBaffle~
* y: W{~}FlocChannel~ + 2*L{~}slot~
* z: H{~}Floc~ \- Z{~}FlocBaffles i,j~

*boxslots* \- makes the boxes to be subtracted from the floctankwall

boxslots <\- box(slot{~}origin i~,slot{~}origin i~ + slot{~}dim i~)

*subtract4* \- subtracts each drawn slot from the floctankwall

subtract4 <\- subtractD(floc{~}origin~,slot{~}origin i~)

local <\- stack(local,layerthaw4,boxslots,subtract4)

*layerfreeze5* \- layer{~}freeze~ freezes flocktankwall for editing

layerfreeze5 <\- layer{~}freeze~("floctankwall")

local <\- stack(local,layerfreeze5)

return local



Technical Program Outline

1) An if statement checks that the slot length is not set to zero. If the slot length is set to zero, the code will not execute.

2) A new layer, "flocchannelslot" is created.

3) The slots are drawn as a single rectangle having a width of the length of the floctank plus two times the specified length of the slot.  The height of the slot spans from the top of the tank to the elevation of the bottom of the baffle. The slots are placed iteratively in each channel from the left side of the tank to the right.

4) The "floctank" layer is thawed.

5) The viewtop1 function is used to ensure that the floctank is fully in view, ensuring that the subtract function executes in a single command.

6) All of the slots are subtracted at once using the subtractDall function.

7) The layer is set to zero.

8) The "floctank" layer is frozen.

9) The "flocchannelslot" layer is frozen.