h1. Inlet Channel Drawing Script
*layer2* \- [Layer{~}new~|AutoCAD Basics Layer] creates a new light grey layer, "channel."
layer2 <\- layer{~}new~("channel",ltgrey)
*channel1* \- Calls the [Channel Program|AutoCAD Channel Program] to draw a channel.
channel1 <\- ChannelDrawing(channel{~}origin~,p1,T{~}ChannelWall~)
channel{~}origin~ =
if layout 2:
* x: Plant{~}Origin0~ \- L{~}Sed~ + W{~}InletChannel~
* y: Plant{~}Origin1~ \- T{~}PlantWall~
* z: Plant{~}Origin2~ + H{~}Sed~ \- H{~}InletChannel~
if layout 3:
* x: Plant{~}Origin0~ \- L{~}Sed~ + W{~}InletChannel~
* y: Plant{~}Origin1~ \- T{~}PlantWall~
* z: Plant{~}Origin2~ + H{~}Sed~ \- H{~}InletChannel~
if layout 4 :
* x: Plant{~}Origin0~ \- L{~}Sed~ + W{~}ChannelInlet~
* y: Plant{~}Origin1~ \- T{~}PlantWall~
* z: Plant{~}Origin2~ + H{~}Sed~ \- H{~}InletChannel~
p1 = Specifies the dimensions of the channel cutout.
* x: W{~}Sed~ \- 2T{~}PlantWall~
* y: W{~}InletChannel~
* z: H{~}InletChannel~
T{~}Channel~ specifies the thickness of the channel wall.
{float:left|border=2px solid black}
[!inlet rotate 1.bmp|width=480px!|AutoCAD Channel Program]
Top View
{float}
*rotate1* \- [Rotate|AutoCAD Basics Rotate] rotates the selected object by the designated degrees.
rotate1 <\- rotate(channel{~}origin~,90)
channel{~}origin~ =
if layout 2:
* x: Plant{~}Origin0~ \- L{~}Sed~ + W{~}InletChannel~
* y: Plant{~}Origin1~ \- T{~}PlantWall~
* z: Plant{~}Origin2~ + H{~}Sed~ \- H{~}InletChannel~
if layout 3:
* x: Plant{~}Origin0~ \- L{~}Sed~ + W{~}InletChannel~
* y: Plant{~}Origin1~ \- T{~}PlantWall~
* z: Plant{~}Origin2~ + H{~}Sed~ \- H{~}InletChannel~
if layout 4 :
* x: Plant{~}Origin0~ \- L{~}Sed~ + W{~}ChannelInlet~
* y: Plant{~}Origin1~ \- T{~}PlantWall~
* z: Plant{~}Origin2~ + H{~}Sed~ \- H{~}InletChannel~
p1 = Specifies the dimensions of the channel cutout.
* x: W{~}Sed~ \- 2T{~}PlantWall~
* y: W{~}InletChannel~
* z: H{~}InletChannel~
90 = rotation angle
\\
\\
*box1* \- Creates a [box|AutoCAD Basics Box] based on two points.
box1 <\- box(channelinletwall{~}origin~,channelinletwall{~}origin~ + channelinletwall{~}dim~)
channelinletwall{~}origin~ =
* x: Plant{~}Origin0~ \- L{~}Sed~ + W{~}ChannelInlet~
* y: Plant{~}Origin1~
* z: Plant{~}Origin2~
channelinletwall{~}dim~ =
* x: T{~}ChannelWall~
* y: W{~}Sed~
* z: H{~}Sed~
*bigunion* \- [Union{~}allA~|AutoCAD Basics Unions] selects all the objects visible in the workspace and joins them all into a single object.
bigunion <\- union{~}allA~
*box2* \- Creates a [box|AutoCAD Basics Box] based on two points.
box2 <\- box(channelinletbox1{~}origin~,channelinletbox1{~}origin~ + channelinletbox1{~}dim~)
channelinletbox1{~}origin~ =
* x: Plant{~}Origin0~ \- L{~}Sed~ \- T{~}PlantWall~
* y: Plant{~}Origin1~ + (.5W{~}Sed~) - (.5L{~}ChannelInlet~)
* z: Plant{~}Origin2~ + H{~}Sed~ \- H{~}InletChannel~
channelinletbox1{~}dim~ =
* x: T{~}PlantWall~
* y: L{~}ChannelInlet~
* z: H{~}InletChannel~
*subtract2* \- [SubtractD|AutoCAD Basics Subtractions] subtracts one object from the other based on two points.
subtract2 <\- subtractD(Plant{~}Origin~,channelinletbox1{~}origin~)
Plant{~}Origin~ =
channelinletbox1{~}origin~ =
* x: Plant{~}Origin0~ \- L{~}Sed~ \- T{~}PlantWall~
* y: Plant{~}Origin1~ + (.5W{~}Sed~) - (.5L{~}ChannelInlet~)
* z: Plant{~}Origin2~ + H{~}Sed~ \- H{~}InletChannel~
*box3* \- Creates a [box|AutoCAD Basics Box] based on two points.
box3 <\- box(channelinletbox2{~}origin~,channelinletbox2{~}origin~ + channelinletbox2{~}dim~)
channelinletbox2{~}origin~ =
* x: Plant{~}Origin0~ \- L{~}Sed~
* y: Plant{~}Origin1~
* z: Plant{~}Origin2~
channelinletbox2{~}dim~ =
* x: W{~}ChannelInlet~
* y: W{~}Sed~
* z: H{~}Sed~
*subtract3* \- [SubtractD|AutoCAD Basics Subtractions] subtracts one object from the other based on two points.
subtract3 <\- subtractD(Plant{~}Origin~,channelinletbox2{~}origin~)
Plant{~}Origin~ =
channelinletbox2{~}origin~ =
* x: Plant{~}Origin0~ \- L{~}Sed~
* y: Plant{~}Origin1~
* z: Plant{~}Origin2~
*layerset* \- [Layer{~}set~|AutoCAD Basics Layer] selects the layer "0".
layerset <\- layer{~}set~("0")
*viewtops* \- Rotates the object so that it is viewed from the top.
viewtops <-viewtop1
*layerfreeze2* \- [Layer{~}freeze~|AutoCAD Basics Layer] locks the layer "channel" so that it cannot be edited.
layerfreeze2 <\- layer{~}freeze~("channel") |