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

Wiki Markup
h3. General Program Information

{float:left|border=2px solid black}
[!1a1b.bmp|width=480px280px!|AutoCAD PipeTee Program][!1b1a.bmp|width=480px280px!|AutoCAD PipeTee Program]Front View
Southeast Isometric View
{float}
\\
\\

h3. Input Definitions


h5. Inputs Needed to Call the Tee Function

origin - A 3*1 matrix with 



Input Definitions

Inputs Needed to Call the Tee Function

origin - A 3*1 matrix with x,y,z

...

positions

...

corresponding

...

to

...

the

...

point

...

where

...

the

...

tee

...

will

...

be

...

drawn.

...


ND

...

-

...

The

...

nominal

...

diameter

...

of

...

the

...

tee.

...

This

...

value

...

along

...

with

...

the

...

pipe

...

schedule

...

is

...

used

...

to

...

determine

...

other

...

actual

...

dimensions

...

of

...

the tee.
EN- The enumerated pipe schedule type. Each schedule of pipe is represented by a specific number within our code.

Inputs Defined within Pipe Database

R1 - The inner radius of the main pipe, defined by outerradius(ND)
R2 - The outer radius of the main pipe, defined by innerD(ND,ED)/2
R3 - The outer radius of the sockets of the tee, defined by ConRadius(ND)
L - The length of the main pipe of the tee, defined by ShortTeeLength(ND)*2
H - The depth of the sockets of the tee, defined by SocketDepth(ND)

Inputs Defined within the Tee Function

p1 =

  • x : origin0
  • y : origin1
  • z : origin2

p2 =

  • x : origin0
  • y : origin1
  • z : origin2 + L/2

p3 =

  • x : origin0 + R2
  • y : origin1
  • z : origin2 + L/2

p4 =

  • x : origin0 - R1
  • y : origin1
  • z : origin2

p5 =

  • x : origin0 + L/2
  • y : origin1 + R1
  • z : origin2 + L/2

p7 =

  • x : origin0 - R3
  • y : origin1
  • z : origin2

p8 =

  • x : origin0 - R1
  • y : origin1
  • z : origin2

p9 =

  • x : origin0
  • y : origin1 - H
  • z : -origin1 - R3

p10 =

  • x : origin0
  • y : origin2 + L/2

p11 =

  • x : origin0 + zc
  • y : origin2 + L/2 - zc

p12 =

  • x : origin0 + zc
  • y : origin2 + L/2

ND - The nominal diameter of the pipe. This value along with the pipe schedule is used to determine other actual dimensions of the tee.
R1 - The inner radius of the main pipe.
R2 - The outer radius of the main pipe.
R3 - The outer radius of the sockets of the tee.
L - The length of the main pipe of the tee.
H - The depth of the sockets of the tee.

win1 =

  • x : origin0 - (L/2 + H)
  • y : origin1 - R3
  • z : origin2

win2 =

  • x : origin0 + (L/2 + H)
  • y : origin1 + R3
  • z : origin2

EN-The enumerated pipe schedule type. Each schedule of pipe is represented by a specific number within our code.

Note: zc corresponds to the zoom constant used within AutoCAD, defined by the basics file.

Technical Program Outline

Note: All coordinates are referenced in top view in the program unless otherwise specified

Wiki Markup
 tee.
R1 - The inner radius of the main pipe.
R2 - The outer radius of the main pipe.
R3 - The outer radius of the sockets of the tee.
L - The length of the skinnier pipes of the tee.
H - The length (or depth) of the sockets of the tee.
EN\- The enumerated pipe schedule type.  Each schedule of pipe is represented by a specific number within our code.

h5. Inputs Defined within the Tee Function

p1 =
* x : origin{~}0~
* y : origin{~}1~
* z : origin{~}2~

p2 =
* x : origin{~}0~
* y : origin{~}1~
* z : origin{~}2~ + L/2

p3 =
* x : origin{~}0~ + innerD(ND, EN)/2
* y : origin{~}1~
* z : origin{~}2~ + L/2

p4 =
* x : origin{~}0~ \- R1
* y : origin{~}1~
* z : origin{~}2~

p5 =
* x : origin{~}0~ + L/2
* y : origin{~}1~ + R1
* z : origin{~}2~ + L/2

p7 =
* x : origin{~}0~ \- R3
* y : origin{~}1~
* z : origin{~}2~

p8 =
* x : origin{~}0~ \- R1
* y : origin{~}1~
* z : origin{~}2~ \

p9 =
* x : origin{~}0~
* y : origin{~}1~ \- H
* z : \-origin{~}1~ \- R3

p10 =
* x : origin{~}0~
* y : origin{~}2~ + L/2

p11 =
* x : origin{~}0~ + zc
* y : origin{~}2~ + L/2 - zc

p12 =
* x : origin{~}0~ + zc
* y : origin{~}2~ + L/2

ND

R1

R2

R3

L

H

win1 =
* x : origin{~}0~ \- (L/2 + H)
* y : origin{~}1~ \- R3
* z : origin{~}2~

win2 =
* x : origin{~}0~ + (L/2 + H)
* y : origin{~}1~ + R3
* z : origin{~}2~

EN

*Note:* zc corresponds to the zoom constant used within AutoCAD, defined by the basics file.

h3. Technical Program Outline

*Note:* All coordinates are referenced in top view in the program unless otherwise specified

{float:left|border=2px solid black}
[!2.bmp|width=280px480px!|AutoCAD PipeTee Program]
Southeast Isometric View
{float}
*zoom{*}{*}{~}win{~}*\- zooms on a window space directly around where the tee is to be drawn.  The points win1 and win2 are used to select this window size, based on including the space of the tee and a zoom constant (zc) to ensure the entire drawing will be within the frame.

zoom{~}win~ <-\- zoom{~}wina~(win1,win2)

win1 =
* x : origin{~}0~ \- (L/2 + H)
* y : origin{~}1~ \- R3
* z : origin{~}2~

win2 =
* x : origin{~}0~ + (L/2 + H)
* y :

zoomwin- zooms on a window space directly around where the tee is to be drawn.  The points win1 and win2 are used to select this window size, based on including the space of the tee and a zoom constant (zc) to ensure the entire drawing will be within the frame.

zoomwin <-- zoomwina(win1,win2)

win1 =

  • x : origin0 - (L/2 + H)
  • y : origin1 - R3
  • z : origin2

win2 =

  • x : origin0 + (L/2 + H)
  • y : origin1 + R3
  • z : origin2



Wiki Markup
 origin{~}1~ + R3
* z : origin{~}2~

\\
\\


{float:left|border=2px solid black}
[!3.bmp|width=280px!|AutoCAD PipeTee Program]
Southeast Isometric View
{float}









cylinder1 - creates a cylinder with length 'L' that comes out of the page.

cylinder2 - creates a cylinder with length 'L/2'.

union1 - unions the two cylinders.

cylinder3 - creates a cylinder with length 'L'.

cylinder4 - creates a cylinder with length 'L/2'.

[!tee subtract1 subtract2.JPG|width=32,height=32!|AutoCAD Pipe Program]

subtract1 - subtracts the portion of cylinder2 and cylinder4 that are inside the cylinders creating a hollow pipe out of cylinder2 and cylinder4.

subtract2 - subtracts cylinder 3 from cylinder 1 creating a hollow pipe coming out of the page.

[!tee H pipe.JPG|width=32,height=32!|AutoCAD Pipe Program]
*tee viewed from viewfront*

cylinder5 - creates a cylinder with a depth 'H' and radius 'R3' into the page.

cylinder6 - creates a cylinder with a depth 'H' and radius 'R1' into the page.

subtract3 - subtracts cylinder 6 from cylinder 5 creating a hollow pipe with length 'H'.

viewfront - sets the workspace so that the user is viewing the object from the front.

[!tee mirror dimensions.JPG|width=32,height=32!|AutoCAD Pipe Program]

zoom ~win1~ \- zooms the workspace to a focus area&nbsp;

mirror1 - mirrors the bottom pipe 90 degrees clockwise.

mirror2 - mirrors the bottom pipe 180 degrees.

bigunion1 - joins all four pipes.

Pipe- Draws a pipe of length L, with origin at p1, which will be the longer section of the tee.

pipe1 <-- Pipe(p1,ND,L,EN)

p1 = origin

ND = The nominal diameter

L = The length of the main pipe of the tee.

EN = The pipe schedule



Wiki Markup
{float:left|border=2px solid black}
[!4a.bmp|width=280px!|AutoCAD Tee Program]
Southeast Isometric View
{float}

pipe2 - Draws a pipe of half the length of pipe1, which will be rotated to become the cross part of the tee. The origin starts at L/2, the middle of pipe1. All other dimensions are the same as pipe1.

pipe2 <-- Pipe(p2,ND,L/2,EN)

p2 =

  • x : origin0
  • y : origin1
  • z : origin2 + L/2

ND = The nominal diameter

L/2 = half the length of the main pipe

EN = The enumerated pipe schedule



Wiki Markup
{float:left|border=2px solid black}
[!5c.bmp|width=280px!|AutoCAD Tee Program]
Front View
[!5b.bmp|width=280px!|AutoCAD Tee Program]
Southeast Isometric View
{float}

rotate1- rotates pipe2 90 degrees using p2 to select pipe2, then using p3 to specify where on the y-axis to rotate.

rotate1 <-- rotate3d(p3,p2,"y",90)

p3 =

  • x : origin0 + R2
  • y : origin1
  • z : origin2 + L/2

p2 =

  • x : origin0
  • y : origin1
  • z : origin2 + L/2

"y" - specifies which dimension to rotate in

90 - specifies how many degrees to rotate

Wiki Markup
{float:left|border=2px solid black}
[!6.bmp|width=280px!|AutoCAD Tee Program]
Southeast Isometric View
[!6b.bmp|width=280px!|AutoCAD Tee Program]
Top View
{float}

union1 - unites pipe1 and pipe2 to act as one solid unit, instead of 2 separate pieces, using p4 to select pipe1 and p5 to select pipe2.
union1 <-- unionA(p4,p5)

p4 =

  • x : origin0 - R1
  • y : origin1
  • z : origin2

p5 =

  • x : origin0 + L/2
  • y : origin1 + R1
  • z : origin2 + L/2



Wiki Markup
{float:left|border=2px solid black}
[!7.bmp|width=280px!|AutoCAD Tee Program]
Southeast Isometric View
{float}

cylinder1 - Draws a cylinder of length L and a radius of R2 at the origin

cylinder1 <-- cylinderA(p1,R2,L)

p1 = origin

R2 = The outer radius of the main pipe.

L = The length of the main pipe of the tee.



Wiki Markup
{float:left|border=2px solid black}
[!8.bmp|width=480px!|AutoCAD Tee Program]
{float}

subtract1- subtracts cylinder1 from the tee using p4 to select the tee as the object to be subtracted from, and using p3 to select the inner cylinder as the object to be subtracted.

subtract1 <-- subtractA(p4,p3)

p4 =

  • x : origin0 - R1
  • y : origin1
  • z : origin2

p3 =

  • x : origin0 + R2
  • y : origin1
  • z : origin2 + L/2



Wiki Markup
{float:left|border=2px solid black}
[!9.bmp|width=280px!|AutoCAD Tee Program]
Southeast Isometric View
{float}

cylinder5- creates a cylinder of depth H, to draw it down from the origin, and radius R3 positioned at the origin, forming the outer surface for the socket of the tee.

cylinder5 <-- cylinderC(p1,R3,-H)

p1 = origin

R3 = The outer radius of the sockets of the tee.

H = The depth of the sockets of the tee.

Wiki Markup
{float:left|border=2px solid black}
[!10.bmp|width=480px!|AutoCAD Tee Program]
{float}

cylinder6- creates a cylinder of depth H and radius R3 positioned at the origin, forming the inner surface for the socket of the tee.

cylinder6 <-- cylinderA(p1,R1,-H)

p1 = origin

R1 = The inner radius of the main pipe

H = The depth of the sockets of the tee



Wiki Markup
{float:left|border=2px solid black}
[!11.bmp|width=280px!|AutoCAD Tee Program]
Free Rotation used to show the socket is now hollow
{float}

subtract3- subtracts cylinder6 from cylinder5 by using p7 to select cylinder6 as the object to be subtracted from, and using p8 to select cylinder5 as the object to be subtracted.

subtract3 <-- subtractA(p7,p8)

p7 =

  • x : origin0 - R3
  • y : origin1
  • z : origin2

p8 =

  • x : origin0 - R1
  • y : origin1
  • z : origin2

Wiki Markup
{float:left|border=2px solid black}
[!12.bmp|width=280px!|AutoCAD Tee Program]
{float}

viewfront- sets the workspace so that the user is viewing the object from the front
viewfront <-- viewfront

Wiki Markup
{float:left|border=2px solid black}
[!13.bmp|width=280px!|AutoCAD Tee Program]
{float}

mirror1 - replicates the original socket drawn onto the orthogonal end of the tee by selecting the hollow cylinder using p9, then reflecting it over a mirror line created using p10 and p11 to give the slope and direction of the mirror line.

mirror1 <-- mirrorA(p9,p10,p11)

p9 =

  • x : origin0
  • y : origin1 - H
  • z : -origin1 - R3

p10 =

  • x : origin0
  • y : origin2 + L/2

p11 =

  • x : origin0 + zc
  • y : origin2 + L/2 - zc



Wiki Markup
{float:left|border=2px solid black}
[!14.bmp|width=280px!|AutoCAD Tee Program]
Before mirror2
[!14c.bmp|width=280px!|AutoCAD Tee Program]
After mirror2
{float}

mirror2 - replicates the original socket drawn onto the opposite end of the tee by selecting the hollow cylinder using p9, then reflecting it over a mirror line created using p10 and p12 to give the slope and direction of the mirror line.

mirror2 <-- mirrorA(p9,p10,p12)

p9 =

  • x : origin0
  • y : origin1 - H
  • z : -origin1 - R3

p10 =

  • x : origin0
  • y : origin2 + L/2

p12 =

  • x : origin0 + zc
  • y : origin2 + L/2

Wiki Markup
{float:left|border=2px solid black}
[!1b.bmp|width=280px!|AutoCAD Tee Program]
Southeast Isometric View
{float}

bigunion1- Unites all components of the tee to act as a single unit

bigunion1 <-- unionallA