Wiki Markup |
---|
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 to draw a channel.
channel1 <- ChannelDrawing(channelorigin,p1,TChannelWall)
channelorigin =
if layout 2:
- x: PlantOrigin0 - LSed + WInletChannel
- y: PlantOrigin1 - TPlantWall
- z: PlantOrigin2 + HSed - HInletChannel
if layout 3:
- x: PlantOrigin0 - LSed + WInletChannel
- y: PlantOrigin1 - TPlantWall
- z: PlantOrigin2 + HSed - HInletChannel
if layout 4 :
- x: PlantOrigin0 - LSed + WChannelInlet
- y: PlantOrigin1 - TPlantWall
- z: PlantOrigin2 + HSed - HInletChannel
p1 = Specifies the dimensions of the channel cutout.
- x: WSed - 2TPlantWall
- y: WInletChannel
- z: HInletChannel
TChannel specifies the thickness of the channel wall.
rotate1 - Rotate rotates the selected object by the designated degrees.
rotate1 <- rotate(channelorigin,90)
When sedlayout = 1, channelorigin is 3*1 matrix with x,y,z points corresponding to where the channel will be drawn. Channelorigin is called from the Channel Program.
90 = rotation angle
box1 - Creates a box based on two points.
box1 <- box(channelinletwallorigin,channelinletwallorigin + channelinletwalldim)
channelinletwallorigin =
- x: PlantOrigin0 - LSed + WChannelInlet
- y: PlantOrigin1
- z: PlantOrigin2
channelinletwalldim =
- x: TChannelWall
- y: WSed
- z: HSed
bigunion - UnionallA selects all the objects visible in the workspace and joins them all into a single object.
bigunion <- unionallA
box2 - Creates a box based on two points.
box2 <- box(channelinletbox1origin,channelinletbox1origin + channelinletbox1dim)
channelinletbox1origin =
- x: PlantOrigin0 - LSed - TPlantWall
- y: PlantOrigin1 + (.5WSed) - (.5LChannelInlet)
- z: PlantOrigin2 + HSed - HInletChannel
channelinletbox1dim =
- x: TPlantWall
- y: LChannelInlet
- z: HInletChannel
subtract2 - SubtractD subtracts one object from the other based on two points.
subtract2 <- subtractD(PlantOrigin,channelinletbox1origin)
PlantOrigin =
channelinletbox1origin =
- x: PlantOrigin0 - LSed - TPlantWall
- y: PlantOrigin1 + (.5WSed) - (.5LChannelInlet)
- z: PlantOrigin2 + HSed - HInletChannel
box3 - Creates a box based on two points.
box3 <- box(channelinletbox2origin,channelinletbox2origin + channelinletbox2dim)
channelinletbox2origin =
- x: PlantOrigin0 - LSed
- y: PlantOrigin1
- z: PlantOrigin2
channelinletbox2dim =
- x: WChannelInlet
- y: WSed
- z: HSed
subtract3 - SubtractD subtracts one object from the other based on two points.
subtract3 <- subtractD(PlantOrigin,channelinletbox2origin)
PlantOrigin =
channelinletbox2origin =
- x: PlantOrigin0 - LSed
- y: PlantOrigin1
- z: PlantOrigin2
layerset - Layerset selects the layer "0".
layerset <- layerset("0")
viewtops - Rotates the object so that it is viewed from the top.
viewtops <-viewtop1
layerfreeze2 - Layerfreeze locks the layer "channel" so that it cannot be edited.
...
*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") |