h3. General Program Information
This script draws the tank that houses the inner walls and baffles of the floc tank. The script then draws the inner walls and subtracts the ports between the channels.
{float:left|border=2px solid black}
[!Floc Tank Basics.PNG|width=450px!|AutoCAD Channel Program]
Floc Tank with Wall Removed
{float}
h3. Technical Program Outline
*local* \- [Layer{~}new~|AutoCAD Basics Layer] creates a new dark grey layer, "floctank."
local <\- layer{~}new~("floctank",dkgrey)
*local* \- is redefined as the "floctank" layer and the tank that houses the inner walls of the baffles and the floc tank, both stacked.
local <\- stack(local, Tank(floc{~}origin~, totalfloc{~}dim~, T{~}PlantWall~))
*for loop* \- the for loop draws the inner walls and then subtracts the ports between channels for each wall. Local is then stacked with the inner walls and subtractions iteratively.
for i from 0..N{~}FlocChannels~ \- 2
local<-stack(local, box(wall{~}origin 0,i~, wall{~}origin 0,i~ + wall{~}dim~), box(flocport{~}origin 0,i~, flocport{~}origin 0,i~ + flocport{~}dim 0,i~), subtract(wall{~}origin~, flocport{~}origin~))
*bigunion1* unions all objects drawn thus far into a single object.
bigunion1 <\- union{~}allA~
*layerset1* \- selects the layer "0"
layerset1 <\- layer{~}set~ ("0")
*layerfreeze1* \- [Layer{~}freeze~|AutoCAD Basics Layer] locks the layer "floctank" so that it cannot be edited.
layerfreeze1 <\- layer{~}freeze~("floctank")
*one* <\- stack(local, bigunion1, layerset1, layerfreeze1)
*floc{*}{*}{~}origin{~}* =
* x: Plant{~}Origin0~
* y: Plant~origin1\~ + N{~}SedTanks~(W{~}Sed~ + T{~}PlantWall~)
* z: Plant{~}Origin2~
*totalfloc{*}{*}{~}dim{~}* =
* x: L{~}FlocTank~/N{~}FlocChannels~
* y: (N{~}FlocChannels~\*W{~}FlocChannels~) + ((N{~}Floc Channels~ \- 1)*T{~}PlantWall~)
* z: H{~}Floc~
*T{*}{*}{~}PlantWall{~}* \- specifies the thickness of the tank.
\\
\\ |