Reducing Tee - PDS - 2011 R1 - Help

Project Engineer HVAC Help

PPMProductFamily
3D Design and Visualization
PPMProduct
PDS
PPMCategory
Help

SYMBOL_PROCESSOR 'D_REDUCING_TEE'

call DEFINE_HVAC_SYMBOL_TYPE(DEG_90_TEE)

call DEFINE_ACTIVE_ORIENTATION(EAST,NORTH)

call CONVERT_UNIT(12.0,ENGLISH,testvalue)

if (WIDTH_3 .le. testvalue) then
call CONVERT_UNIT(2.25,ENGLISH,top_leg)
else
call CONVERT_UNIT(3.0,ENGLISH,top_leg)
endif

call CONVERT_UNIT(12.0,ENGLISH,defvalue)

if (TRANSITION_LENGTH .le. 0) then
trans_len = DABS(WIDTH_1 - WIDTH_2)
if (trans_len .le. 0) then
trans_len = defvalue
endif
else
trans_len = TRANSITION_LENGTH
endif

call CONVERT_UNIT(2.0,ENGLISH,outvalue)
projlen = WIDTH_3 + outvalue
projlen2 = top_leg + WIDTH_1/2.0
back_dist = -1.0 * projlen/2.0

if (SHAPE_1 .ne. SHAPE_ROUND) then
LDEPTH_1 = DEPTH_1 - (2 * LINING_THICKNESS)
IDEPTH_1 = DEPTH_1 + (2 * INSULATION_THICKNESS)
LDEPTH_2 = DEPTH_2 - (2 * LINING_THICKNESS)
IDEPTH_2 = DEPTH_2 + (2 * INSULATION_THICKNESS)
LDEPTH_3 = DEPTH_3 - (2 * LINING_THICKNESS)
IDEPTH_3 = DEPTH_3 + (2 * INSULATION_THICKNESS)
else
LDEPTH_2 = WIDTH_2 - (2 * LINING_THICKNESS)
IDEPTH_2 = WIDTH_2 + (2 * INSULATION_THICKNESS)
LDEPTH_3 = WIDTH_3 - (2 * LINING_THICKNESS)
IDEPTH_3 = WIDTH_3 + (2 * INSULATION_THICKNESS)
endif

LWIDTH_1 = WIDTH_1 - (2 * LINING_THICKNESS)
LWIDTH_2 = WIDTH_2 - (2 * LINING_THICKNESS)
LWIDTH_3 = WIDTH_3 - (2 * LINING_THICKNESS)

IWIDTH_1 = WIDTH_1 + (2 * INSULATION_THICKNESS)
IWIDTH_2 = WIDTH_2 + (2 * INSULATION_THICKNESS)
IWIDTH_3 = WIDTH_3 + (2 * INSULATION_THICKNESS)

if (SHAPE_1 .eq. SHAPE_ROUND) then ! draw a round tee
call BEGIN(SHEET_METAL)
call DEFINE_PLACEPOINT(PP1,ACTIVE_POINT)
call STORE_HVAC_PP_DATA(PP1,SHAPE_ROUND,0.,0.,INLET)

call MOVE_BY_DISTANCE(back_dist)
POINT[124] = POINT_0
call DEFINE_PLACEPOINT(PP2,ACTIVE_POINT)
call STORE_HVAC_PP_DATA(PP2,SHAPE_ROUND,WIDTH_1,0.,INLET)
call DRAW_CYLINDER(projlen,WIDTH_1)
call DRAW_CONE(trans_len,WIDTH_1,WIDTH_2)
POINT[123] = POINT_0
call DEFINE_PLACEPOINT(PP3,ACTIVE_POINT)
call STORE_HVAC_PP_DATA(PP3,SHAPE_ROUND,WIDTH_2,0.,OUTLET)

call MOVE_TO_PLACEPOINT(PP1)
call DEFINE_ACTIVE_ORIENTATION(NORTH,WEST)
call DRAW_CYLINDER(projlen2,WIDTH_3)
POINT[122] = POINT_0
call DEFINE_PLACEPOINT(PP4,ACTIVE_POINT)
call STORE_HVAC_PP_DATA(PP4,SHAPE_ROUND,WIDTH_3,0.,OUTLET)

call BEGIN(INSULATION)
call DEFINE_ACTIVE_ORIENTATION(EAST,NORTH)
call MOVE_TO_PLACEPOINT(PP2)
call DRAW_CYLINDER(projlen,IWIDTH_1)
call DRAW_CONE(trans_len,IWIDTH_1,IWIDTH_2)
call MOVE_TO_PLACEPOINT(PP1)
call DEFINE_ACTIVE_ORIENTATION(NORTH,WEST)
call DRAW_CYLINDER(projlen2,IWIDTH_3)

call BEGIN(LINING)
call DEFINE_ACTIVE_ORIENTATION(EAST,NORTH)
call MOVE_TO_PLACEPOINT(PP2)
call DRAW_CYLINDER(projlen,LWIDTH_1)
call DRAW_CONE(trans_len,LWIDTH_1,LWIDTH_2)
call MOVE_TO_PLACEPOINT(PP1)
call DEFINE_ACTIVE_ORIENTATION(NORTH,WEST)
call DRAW_CYLINDER(projlen2,LWIDTH_3)

call BEGIN(CENTER_LINE)
call DRAW_LINE(POINT[124], POINT[123])
call DRAW_LINE(POINT[125], POINT[122])

else
if (SHAPE_1 .eq. SHAPE_RECTANGULAR) then ! draw rect tee
if (SHAPE_2 .ne. SHAPE_ROUND) then
d2 = DEPTH_2
else
d2 = WIDTH_2
endif
if (SHAPE_3 .ne. SHAPE_ROUND) then
d3 = DEPTH_3
else
d3 = WIDTH_3
endif

call BEGIN(SHEET_METAL)
call DEFINE_PLACEPOINT(PP1,ACTIVE_POINT)
call STORE_HVAC_PP_DATA(PP1,SHAPE_RECTANGULAR,0.,
0.,INLET)

call MOVE_BY_DISTANCE(back_dist)
POINT[124] = POINT_0
call DEFINE_PLACEPOINT(PP2,ACTIVE_POINT)
call STORE_HVAC_PP_DATA(PP2,SHAPE_RECTANGULAR,WIDTH_1
,DEPTH_1,INLET)
call DRAW_PROJ_RECTANGLE(WIDTH_1,DEPTH_1,projlen)
call DRAW_CON_PRISM(WIDTH_1,DEPTH_1,trans_len,WIDTH_2
,d2)
POINT[123] = POINT_0
call DEFINE_PLACEPOINT(PP3,ACTIVE_POINT)
call STORE_HVAC_PP_DATA(PP3,SHAPE_RECTANGULAR,WIDTH_2,
d2,OUTLET)

call MOVE_TO_PLACEPOINT(PP1)
call DEFINE_ACTIVE_ORIENTATION(NORTH,WEST)
call DRAW_PROJ_RECTANGLE(WIDTH_3,d3,projlen2)
POINT[122] = POINT_0
call DEFINE_PLACEPOINT(PP4,ACTIVE_POINT)
call STORE_HVAC_PP_DATA(PP4,SHAPE_RECTANGULAR,WIDTH_3,
d3,OUTLET)

call BEGIN(INSULATION)
call MOVE_TO_PLACEPOINT(PP2)
call DRAW_PROJ_RECTANGLE(IWIDTH_1,IDEPTH_1,projlen)
call DRAW_CON_PRISM(IWIDTH_1,IDEPTH_1,trans_len,
IWIDTH_2,d2)
call MOVE_TO_PLACEPOINT(PP1)
call DEFINE_ACTIVE_ORIENTATION(NORTH,WEST)
call DRAW_PROJ_RECTANGLE(IWIDTH_3,d3,projlen2)

call BEGIN(LINING)
call MOVE_TO_PLACEPOINT(PP2)
call DRAW_PROJ_RECTANGLE(LWIDTH_1,LDEPTH_1,projlen)
call DRAW_CON_PRISM(LWIDTH_1,LDEPTH_1,trans_len,
LWIDTH_2,d2)
call MOVE_TO_PLACEPOINT(PP1)
call DEFINE_ACTIVE_ORIENTATION(NORTH,WEST)
call DRAW_PROJ_RECTANGLE(LWIDTH_3,d3,projlen2)

call BEGIN(CENTER_LINE)
call DRAW_LINE(POINT[124], POINT[123])
call DRAW_LINE(POINT[125], POINT[122])

else
if (SHAPE_1 .eq. SHAPE_FLAT_OVAL) then !flat oval tee
if (SHAPE_2 .ne. SHAPE_ROUND) then
if (WIDTH_1 .lt. DEPTH_1) then
d2 = WIDTH_2
id2 = IWIDTH_2
ld2 = LWIDTH_2
else
d2 = DEPTH_2
id2 = IDEPTH_2
ld2 = LDEPTH_2
endif
else
d2 = WIDTH_2
id2 = IWIDTH_2
ld2 = LWIDTH_2
endif
if (SHAPE_3 .ne. SHAPE_ROUND) then
if (WIDTH_1 .lt. DEPTH_1) then
d3 = WIDTH_3
id3 = IWIDTH_3
ld3 = LWIDTH_3
else
d3 = DEPTH_3
id3 = IDEPTH_3
ld3 = LDEPTH_3
endif
else
d3 = WIDTH_3
id3 = IWIDTH_3
ld3 = LWIDTH_3
endif

call BEGIN(SHEET_METAL)
call DEFINE_PLACEPOINT(PP1,ACTIVE_POINT)
call STORE_HVAC_PP_DATA(PP1,SHAPE_FLAT_OVAL,0.,
0.,INLET)

call MOVE_BY_DISTANCE(back_dist)
POINT[124] = POINT_0
call DEFINE_PLACEPOINT(PP2,ACTIVE_POINT)
call STORE_HVAC_PP_DATA(PP2,SHAPE_FLAT_OVAL,
WIDTH_1,DEPTH_1,INLET)
call DEFINE_ACTIVE_ORIENTATION(EAST,NORTH)
if (WIDTH_1 .lt. DEPTH_1) then
face_seg_len_1 = DEPTH_1 - WIDTH_1
call USER_FUNCTION('FLAT_OVAL_PRISM2',projlen,
face_seg_len_1,WIDTH_1,face_seg_len_1,
WIDTH_1,0.,0.,1)
face_seg_len_2 = DEPTH_2 - d2
call USER_FUNCTION('FLAT_OVAL_PRISM2',trans_len,
face_seg_len_1,WIDTH_1,face_seg_len_2,d2,0.,0.,1)
else
face_seg_len_1 = WIDTH_1 - DEPTH_1
call USER_FUNCTION('FLAT_OVAL_PRISM',projlen,
face_seg_len_1,DEPTH_1,face_seg_len_1,
DEPTH_1,0.,0.,1)
face_seg_len_2 = WIDTH_2 - d2
call USER_FUNCTION('FLAT_OVAL_PRISM',trans_len,
face_seg_len_1,DEPTH_1,face_seg_len_2,d2,
0.,0.,1)
endif
POINT[123] = POINT_0
call DEFINE_PLACEPOINT(PP3,ACTIVE_POINT)
call STORE_HVAC_PP_DATA(PP3,SHAPE_FLAT_OVAL,
WIDTH_2,d2,OUTLET)

call MOVE_TO_PLACEPOINT(PP1)
call DEFINE_ACTIVE_ORIENTATION(NORTH,WEST)

if (WIDTH_1 .lt. DEPTH_1) then
face_seg_len_3 = DEPTH_3 - d3
call USER_FUNCTION('FLAT_OVAL_PRISM2',projlen2,
face_seg_len_3,d3,face_seg_len_3,d3,0.,0.,1)
else
face_seg_len_3 = WIDTH_3 - d3
call USER_FUNCTION('FLAT_OVAL_PRISM',projlen2,
face_seg_len_3,d3,face_seg_len_3,d3,0.,0.,1)
endif
POINT[122] = POINT_0
call DEFINE_PLACEPOINT(PP4,ACTIVE_POINT)
call STORE_HVAC_PP_DATA(PP4,SHAPE_FLAT_OVAL,
WIDTH_3,d3,OUTLET)

call BEGIN(INSULATION)
call MOVE_TO_PLACEPOINT(PP2)
call DEFINE_ACTIVE_ORIENTATION(EAST,NORTH)

if (WIDTH_1 .lt. DEPTH_1) then
call USER_FUNCTION('FLAT_OVAL_PRISM2',projlen,
face_seg_len_1,IWIDTH_1,face_seg_len_1,
IWIDTH_1,0.,0.,1)
call USER_FUNCTION('FLAT_OVAL_PRISM2',trans_len,
face_seg_len_1,IWIDTH_1,face_seg_len_2,id2,
0.,0.,1)
call MOVE_TO_PLACEPOINT(PP1)
call DEFINE_ACTIVE_ORIENTATION(NORTH,WEST)
call USER_FUNCTION('FLAT_OVAL_PRISM2',projlen2,
face_seg_len_3,id3,face_seg_len_3,id3,0.,0.,1)
else
call USER_FUNCTION('FLAT_OVAL_PRISM',projlen,
face_seg_len_1,IDEPTH_1,face_seg_len_1,
IDEPTH_1,0.,0.,1)
call USER_FUNCTION('FLAT_OVAL_PRISM',trans_len,
face_seg_len_1,IDEPTH_1,face_seg_len_2,id2,
0.,0.,1)
call MOVE_TO_PLACEPOINT(PP1)
call DEFINE_ACTIVE_ORIENTATION(NORTH,WEST)
call USER_FUNCTION('FLAT_OVAL_PRISM',projlen2,
face_seg_len_3,id3,face_seg_len_3,id3,0.,
0.,1)
endif
call BEGIN(LINING)
call MOVE_TO_PLACEPOINT(PP2)
call DEFINE_ACTIVE_ORIENTATION(EAST,NORTH)
if (WIDTH_1 .lt. DEPTH_1) then
call USER_FUNCTION('FLAT_OVAL_PRISM2',projlen,
face_seg_len_1,LWIDTH_1,face_seg_len_1,
LWIDTH_1,0.,0.,1)
call USER_FUNCTION('FLAT_OVAL_PRISM2',trans_len,
face_seg_len_1,LWIDTH_1,face_seg_len_2,ld2,
0.,0.,1)
call MOVE_TO_PLACEPOINT(PP1)
call DEFINE_ACTIVE_ORIENTATION(NORTH,WEST)
call USER_FUNCTION('FLAT_OVAL_PRISM2',projlen2,
face_seg_len_3,ld3,face_seg_len_3,ld3,0.,
0.,1)
else
call USER_FUNCTION('FLAT_OVAL_PRISM',projlen,
face_seg_len_1,LDEPTH_1,face_seg_len_1,
LDEPTH_1,0.,0.,1)
call USER_FUNCTION('FLAT_OVAL_PRISM',trans_len,
face_seg_len_1,LDEPTH_1,face_seg_len_2,ld2,
0.,0.,1)
call MOVE_TO_PLACEPOINT(PP1)
call DEFINE_ACTIVE_ORIENTATION(NORTH,WEST)
call USER_FUNCTION('FLAT_OVAL_PRISM',projlen2,
face_seg_len_3,ld3,face_seg_len_3,ld3,0.,
0.,1)
endif
call BEGIN(CENTER_LINE)
call DRAW_LINE(POINT[124], POINT[123])
call DRAW_LINE(POINT[125], POINT[122])
endif
endif
endif

STOP
END