######################################################################
#
# Macro Name    : c:/users/public/gemcom/surpac/62/demo_data/tutorials/road_design/3d_road_fill_volume.tcl
#
# Version       : Surpac 6.2
#
# Creation Date : Thu Jun 09 10:57:51 2011
#
# Description   : 
#
######################################################################

set status [ SclFunction "EXIT GRAPHICS" {} ]

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

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

set status [ SclFunction "INTERSECT DTMS" {
  frm00092={
    {
      _action="display"
      object1_id="1"
      outloc="road_fill_boundary"
      int_str="1"
      trisolation2_id="1"
      dtmloc2="topo4fill"
      dtmloc1="road_fill"
      trisolation1_id="1"
      object2_id="1"
    }
  }
  frm00121={
    {
      _action="display"
    }
  }
}]

set status [ SclFunction "FACES OFF" {} ]

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

set status [ SclFunction "CLEAN STRING" {
  frm00605={
    {
      _action="display"
      operation="Closure"
      closure="delete open"
      dimension="2D"
    }
  }
select_point={
    {
      winx="-0.493"
      winy="0.224"
      objectx="18368.653"
      objecty="57462.296"
      objectz="5163.794"
    }
  }
}]

set status [ SclFunction "CLEAN STRING" {
  frm00605={
    {    
      _action="display"
      operation="Minimum Area"
      min_area_action="remove"
      min_area="100"
      absolute="absolute"
      dimension="2D"
    }
  }
select_point={
    {
      winx="-0.241"
      winy="-0.216"
      objectx="18735.250"
      objecty="57177.000"
      objectz="5110.962"
    }
  }
}]

set status [ SclFunction "CLEAN STRING" {
  frm00605={
    {         
      _action="display"
      operation="Duplicate Point"
      dup_pnts_action="remove"
      dup_pnts_target="string"
      dup_pnts_dist_min="0"
      dup_pnts_dist=".5"
      dimension="3D"
    }
  }
select_point={
    {
      winx="-0.241"
      winy="-0.216"
      objectx="18735.250"
      objecty="57177.000"
      objectz="5110.962"
    }
  }
}]

set status [ SclFunction "FACES ON" {} ]

set status [ SclFunction "FILE SAVE" {
  frmsaveFileAs={
    {
      _action="display"
      AutoCAD={
        version="Autocad 24 (2010)"
      }
      output_file="surpac2str:road_fill_boundary"
      outputExt=".str"
      saveStyle="N"
      Datamine={
        binary_precision="Single"
      }
      Surpac={
        FileFormat="text"
        ForceValidation="true"
        Purpose=""
        ForceCompatibility="true"
        range=""
      }
      output_type="Surpac String Files"
    }
  }
  frm00121={
    {
      _action="display"
    }
  }
}]

set status [ SclFunction "DTM VOLUMES" {
  frm00095={
    {
      _action="display"
      nstr="1"
      trisolation1_id="1"
      loc3="topo"
      loc2="road_fill_boundary"
      nqual="0"
      loc1="road_fill"
      report_by_elevation="N"
      trisolation2_id="1"
      upper_surface_object_name=""
      upper_surface_trisolation_name=""
      nsurf="2"
      density="2.000"
      combdy="Y"
      object1_id="1"
      lower_surface_object_name=""
      object2_id="1"
      detailed_report="N"
      lower_surface_trisolation_name=""
      elevation_range="940,1070,10"
      decimals="2"
    }
  }
  frm00573={
    {
      _action="display"
      save_bdy="N"
      new_bdy_loc="bdyres"
      report_format=".not"
      notloc="road_fill_volume"
    }
  }
  frm00121={
    {
      _action="display"
    }
  }
  frm00097=table { savedtm dtmloc } {
    { "N" "" }
    { "N" "" }
  }
}]

puts ""
puts ""
puts ""
puts ""
puts "Macro 3d_road_fill_volume.tcl completed."
puts ""
puts ""