######################################################################
#
# Macro Name    : c:/users/public/gemcom/surpac/64_beta_2/demo_data/tutorials/pit_design/_12_and_again.tcl
#
# Version       : Surpac 6.4 beta 2
#
# Creation Date : Tue Jan 15 14:37:08 2013
#
# Description   : 
#
######################################################################

# macro 11

set rampcheck "ok"
#This variable is used only to check for when a user can't create a ramp because they haven;t run the previous pit design macros.

set status [ SclFunction "BM EXIT" {} ]

set status [ SclFunction "EXIT GRAPHICS" {} ]

set status [ SclFunction "RECALL ANY FILE" {
  file="pit910.swa"
  mode="openInNewLayer"
}]

if { [catch {
set status [ SclFunction "DEFINE NEW RAMP" {
  select_point=table { winx winy objectx objecty objectz snap_projection } {
    { "-0.056" "0.727" "204.288" "791.808" "910.031" "off" }
    { "0.004" "0.783" "215.004" "798.180" "910.031" "off" }
  }
  frm05011={
    {
      ramp_name="Ramp#1"
      ramp_string="101"
      ramp_type="anti-clockwise"
      ramp_width="15"
      ramp_gradient="10"
      ramp_grade_calc_method="inside edge"
      berm_crossing_method="exit at toe"
      berm_taper_distance="30"
      switchback_angle="180"
      switchback_inner_radius="2.5"
    }
  }
}]
}]}  {
puts "To correctly select points for the ramp in the DEFINE NEW RAMP function, you must first run the previous macros for the pit design tutorial (macros _01 to _11)."
set rampcheck "not-ok"
}

# macro 12
if {$rampcheck == "ok"} {
set status [ SclFunction "EXPAND SEGMENT BY BERM WIDTH" {
  select_point={
    {
      winx="-0.047"
      winy="0.737"
      objectx="206.026"
      objecty="792.967"
      objectz="910.031"
      snap_projection="off"
    }
  }
  frm05008={
    {
      _action=display
      horizontal_direction="expand"
      bench_width="5"
      limiting_elevation="0"
      bench_creation_method="always"
      bench_gradient="0"
      bench_width_method="block model"
      berm_attribute="berm_width"
      delta_z_limit="0"
      switchback={
        {
          add_switchback="Y"
          ramp_name="Ramp#1"
          switchback_angle="180"
          switchback_inner_radius="2.5"
        }
      }
    }
  }
}]

set status [ SclFunction "WINDOW IN" {
  window_drag={
    {
      winx1="-0.427"
      winy1="0.977"
      winx2="0.296"
      winy2="0.510"
      objectx1="138.830"
      objecty1="820.482"
      objectz1="895.000"
      objectx2="266.560"
      objecty2="766.899"
      objectz2="895.000"
    }
  }
}]

set status [ SclFunction "WINDOW IN" {
  window_drag={
    {
      winx1="0.301"
      winy1="-0.068"
      winx2="0.677"
      winy2="-0.300"
      objectx1="178.127"
      objecty1="814.705"
      objectz1="895.000"
      objectx2="227.374"
      objecty2="795.006"
      objectz2="895.000"
    }
  }
}]

set status [ SclFunction "POINT DELETE" {
  select_point=table { winx winy objectx objecty objectz snap_projection } {
    { "0.640" "0.046" "210.367" "816.193" "910.031" "off" }
    { "0.564" "-0.018" "206.570" "814.129" "910.031" "off" }
    { "0.456" "-0.184" "201.121" "808.680" "910.031" "off" }
    { "0.422" "-0.361" "199.388" "802.901" "910.031" "off" }
    { "0.415" "-0.470" "199.057" "799.351" "910.031" "off" }
    { "0.273" "-0.018" "191.875" "814.129" "910.031" "off" }
    { "0.320" "-0.263" "194.269" "806.121" "910.031" "off" }
    { "0.420" "-0.533" "199.305" "797.288" "910.031" "off" }
    { "0.243" "-0.045" "190.389" "813.221" "910.031" "off" }
  }
}]

set status [ SclFunction "UNDO" {} ]

set status [ SclFunction "POINT DELETE" {
  select_point=table { winx winy objectx objecty objectz snap_projection } {
    { "0.383" "-0.351" "197.406" "802.992" "909.983" "off" }
    { "0.376" "-0.232" "197.076" "806.872" "910.011" "off" }
    { "0.383" "-0.048" "197.406" "812.900" "910.005" "off" }
    { "0.368" "0.008" "196.663" "814.717" "909.965" "off" }
    { "0.479" "-0.018" "202.277" "813.891" "909.986" "off" }
    { "0.499" "0.048" "203.268" "816.038" "909.986" "off" }
    { "0.541" "0.078" "205.414" "817.028" "910.002" "off" }
  }
}]

set status [ SclFunction "ACTIVATE PLANE" {
  type="Plan view"
  group="BM_sections"
  plane="915El"
}]

set status [ SclFunction "EXPAND SEGMENT BY BENCH HEIGHT" {
  select_point={
    {
      winx="-0.034"
      winy="0.124"
      objectx="176.438"
      objecty="818.514"
      objectz="909.992"
      snap_projection="off"
    }
  }
  frm05006={
    {
      _action=display
      bench_height="10"
      limit_z_value="9999"
      z_direction="up"
      horizontal_direction="expand"
    }
  }
}]

set status [ SclFunction "EXPAND SEGMENT BY BERM WIDTH" {
  select_point={
    {
      winx="-0.230"
      winy="0.154"
      objectx="166.531"
      objecty="819.347"
      objectz="919.970"
      snap_projection="off"
    }
  }
  frm05008={
    {
      _action=display
      horizontal_direction="expand"
      bench_width="5"
      limiting_elevation="0"
      bench_creation_method="always"
      bench_gradient="0"
      bench_width_method="block model"
      berm_attribute="berm_width"
      delta_z_limit="0"
      switchback={
        {
          add_switchback="N"
          ramp_name="Ramp#1"
          switchback_angle="180"
          switchback_inner_radius="2.5"
        }
      }
    }
  }
}]

set status [ SclFunction "EXPAND SEGMENT BY BENCH HEIGHT" {
  select_point={
    {
      winx="-0.289"
      winy="0.296"
      objectx="163.559"
      objecty="823.970"
      objectz="919.976"
      snap_projection="off"
    }
  }
  frm05006={
    {
      _action=display
      bench_height="10"
      limit_z_value="9999"
      z_direction="up"
      horizontal_direction="expand"
    }
  }
}]

set status [ SclFunction "ACTIVATE PLANE" {
  type="Plan view"
  group="BM_sections"
  plane="925El"
}]


set status [ SclFunction "EXPAND SEGMENT BY BERM WIDTH" {
  select_point={
    {
      winx="-0.328"
      winy="0.394"
      objectx="161.578"
      objecty="827.031"
      objectz="929.990"
      snap_projection="off"
    }
  }
  frm05008={
    {
      _action=display
      horizontal_direction="expand"
      bench_width="5"
      limiting_elevation="0"
      bench_creation_method="always"
      bench_gradient="0"
      bench_width_method="block model"
      berm_attribute="berm_width"
      delta_z_limit="0"
      switchback={
        {
          add_switchback="Y"
          ramp_name="Ramp#1"
          switchback_angle="180"
          switchback_inner_radius="2.5"
        }
      }
    }
  }
}]

set status [ SclFunction "LAYER OPTIONS" {
  layername="ore_blocks.str"
  visible="false"
}]

set status [ SclFunction "LAYER OPTIONS" {
  layername="whittle_pit28.str"
  visible="false"
}]

set status [ SclFunction "ZOOM ALL" {} ]

set status [ SclFunction "DELETE CUTTING PLANES" {} ]

set status [ SclFunction "ERASE TEMPORARY MARKERS" {} ]

}

puts ""
puts ""
puts " Macro _12_design_switchback.tcl completed"
puts ""
