#!/bin/csh
# This is a program for the example Genesis Tooling Forms.
# This file will exist in form 1.
# The purpose of this program is to prompt the user to perform any manual cleanup required.
# It is called by the "Action Manual Cleanup" button.
# 
# Written by Ian Ticehurst (Autom8 Ltd.)
# Version 1A. Date: 11.09.00 - Initial design and development.
# Version 1B. Date: 11.12.00 - Add source of info. file to support gui creation.
# Version 1C. Date: 12.12.00 - Re-write the gui windows to use the sourced font and colours.
# Version 1D. Date: 05.02.01 - Modify to only check job path if job moved from original location.
#                            - Text changes to remove abbreviations and ensure American spelling.
#                            - Add save time update to forms.
# Version 1E. Date: 09.02.01 - Modify the setting and useage of $TMP.
# Version 1F. Date: 14.03.01 - Check how "$GENESIS_EDIR" is set to ensure paths are set correctly.
######################################################################### 
source $_genesis_root/sys/scripts/include_me

set_in_progress genform1 mcu

# Close Form
COM close_form,job=$JOB,form=genform1

# Put window on screen advising user to create backup step.
o_tooling
o FONT $NORM_FONT
o BG $NORM_COL
o BW 0
o LABEL Backup Creation Pop-up
o LABEL It is advisable to create a copy of the current step at this stage.
o LABEL "Do you want to create a copy step?"
o RADIO cre_stp Options: V 1 992222
o Yes, create copy step
o No, do not create copy step
o END
o FONT $HINT_FNT
o BG $HINT_COL
o LABEL Hint: This can be used to check the cleanup cycle later
o BG $NORM_COL
o END

do_gui

if ($cre_stp == 1) then
   # Create tmp step (deleting previous if it exists).
   COM copy_entity,type=step,source_job=$JOB,source_name=pcb,dest_job=$JOB,dest_name=tmp_step
endif

# Ask user to perform any contourisation required.
o_tooling
o FONT $NORM_FNT
o BG $NORM_COL
o BW 0
o "LABEL Manual Cleanup (1) Pop-up"
o LABEL Graphic editor will be opened
o LABEL Examine each layer and perform any contourization required.
o FONT $HINT_FNT
o BG $HINT_COL
o LABEL Hint: Unselect pads before running contourize function
o LABEL "(unless you need to lose the pads into the contour shape)"
o LABEL Also note that using a tolerance greater than 0.2 mils
o LABEL invokes fast contourization
o BG $NORM_COL
o END

do_gui

# Open editor on step "pcb".
COM open_entity,job=$JOB,type=step,name=pcb
set group=$COMANS
AUX set_group,group=$group

# Pause script and ask user to complete manual cleanup.
PAUSE Press continue when contourization is done

# Ask user to perform any other manual cleanup required.
o_tooling
o FONT $NORM_FNT
o BG $NORM_COL
o BW 0
o LABEL "Manual Cleanup (2) Pop-up"
o LABEL Perform any other manual cleanup required.
o FONT $HINT_FNT
o BG $HINT_COL
o LABEL Hint - Typically this will be pad construction where:
o LABEL 1. The shape of the drawn pads does not match a Genesis standard shape.
o LABEL 2. The size of the drawn pads is outside of the automatic cleanup limits.
o LABEL 3. The construction of the drawn pads needs to be under user control.
o BG $NORM_COL
o END

do_gui

PAUSE Press continue when cleanup is done

COM editor_page_close

# Open Form
COM show_form,job=$JOB,form=genform1

set_complete genform1 mcu

save_job

exit 0
