package require java
proc graphicalEllipsoid { formHandle } {
$formHandle hide
set visualiserForm [java::new com.surpac.gui.VisualiserForm 1]
$visualiserForm setMajorSemi [$formHandle getField semi_major0]
$visualiserForm setMajorMinor [$formHandle getField minor0]
$visualiserForm setBearing [$formHandle getField azimuth0]
$visualiserForm setDip [$formHandle getField dip0]
$visualiserForm setPlunge [$formHandle getField plunge0]
$visualiserForm interactFrame
if {[$visualiserForm getReturnStatus] == 1 } {
$formHandle setField semi_major0 [$visualiserForm getMajorSemi]
$formHandle setField minor0 [$visualiserForm getMajorMinor]
$formHandle setField azimuth0 [$visualiserForm getBrg]
$formHandle setField dip0 [$visualiserForm getDip]
$formHandle setField plunge0 [$visualiserForm getPlunge]
}
$visualiserForm destroyFrame
$formHandle show
}
proc retrieveVariogramModelParameters { file } {
set name [$file getCurrentValue]
if {"$name" != ""} {
set buffer [GuidoExecServer "GetVariogramModellingParameters" [subst {VGModelName = "$name"} ]]
set status [GuidoGetParamBufferValue $buffer status]
if {$status >= 0} {
global model
$model setCurrentValue [GuidoGetParamBufferValue $buffer ModelType]
global nugget
$nugget setCurrentValue [GuidoGetParamBufferValue $buffer Nugget]
set num_structures [GuidoGetParamBufferValue $buffer NumStructures]
if {$num_structures > 5} {
set num_structures 5
}
for {set idx 0} {$idx < $num_structures} {incr idx} {
global sill$idx
upvar 0 "sill$idx" field
set val [format %.6f [GuidoGetParamBufferValue $buffer "Sill$idx"]]
$field setCurrentValue $val
if {"$idx" == 1} {
$model setCurrentValue "Nested Spherical"
}
global range$idx
upvar 0 "range$idx" field
set val [format %.3f [GuidoGetParamBufferValue $buffer "Range$idx"]]
$field setCurrentValue $val
}
}
}
return 1
}
GuidoForm frm20255 {
-default_buttons
-label "Ik Variogram Parameters"
-layout BoxLayout Y_AXIS
-tip "20255_TIP_001"
GuidoPanel frm20255_24 {
-layout CentreLineLayout
GuidoLabel frm20255_2 {
-label Cutoff:
}
GuidoLabel cutoff {
-font_style bold
}
GuidoFiller frm20255_22 {
-height 1
}
GuidoFiller frm20255_23 {
-height 1
}
GuidoFileBrowserField vg_model_file_name {
-action valueChanged {[retrieveVariogramModelParameters $vg_model_file_name]}
-display_length 32
-file_access read
-file_mask "*.vgm *.not"
-format none
-label "Variogram file name"
-max_length 256
-null true
-translate none
-tip GST_VG_FILENAME_TIP
}
GuidoComboBox model {
-label "Model Type:"
-value_in "Spherical" "Nested Spherical" "Exponential" "Gaussian" "Hole Effect"
-null false
-format none
}
}
GuidoFiller frm20255_25 {
-height 1
}
GuidoPanel parameters {
-layout BoxLayout Y_AXIS
GuidoPanel row0 {
-layout GridLayout 1 9
GuidoLabel 0_0 {
-label "Structure"
}
GuidoLabel 0_1 {
-label "Nugget"
}
GuidoLabel 0_2 {
-label "Sill"
}
GuidoLabel 0_3 {
-label "Range"
}
GuidoLabel 0_4 {
-label "Bearing"
}
GuidoLabel 0_5 {
-label "Plunge"
}
GuidoLabel 0_6 {
-label "Dip"
}
GuidoLabel 0_7 {
-label "Major/Semi"
}
GuidoLabel 0_8 {
-label "MINOR_RATIO_LABEL"
}
}
GuidoPanel row0 {
-layout GridLayout 1 9
GuidoLabel struc0 {
-label "1"
}
GuidoField nugget {
-null false
-default 0
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20101_TIP_003"
-translate upper
}
GuidoField sill0 {
-null false
-default 0
-display_length 6
-format double
-low_bound 0
-max_length 10
-null false
-tip "20255_TIP_004"
-translate upper
}
GuidoField range0 {
-null false
-default 0
-display_length 6
-format double
-high_bound 999999
-low_bound 0
-max_length 10
-null false
-tip "20255_TIP_005"
-translate upper
}
GuidoField azimuth0 {
-null false
-default 0
-display_length 6
-format double
-high_bound 360
-low_bound 0
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField plunge0 {
-null false
-default 0
-display_length 6
-format double
-high_bound 90
-low_bound -90
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField dip0 {
-null false
-default 0
-display_length 6
-format double
-high_bound 90
-low_bound -90
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField semi_major0 {
-null false
-default 1
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_006"
-translate upper
}
GuidoField minor0 {
-null false
-default 1
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_006"
-translate upper
}
}
GuidoPanel row1 {
-layout GridLayout 1 9
GuidoLabel struc1 {
-label "2"
}
GuidoFiller nugget1_hidden {
}
GuidoField sill1 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-decimals 3
-display_length 6
-format double
-low_bound 0
-max_length 10
-null true
-tip "20255_TIP_004"
-translate upper
}
GuidoField range1 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-decimals 3
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_005"
-translate upper
}
GuidoField azimuth1 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-display_length 6
-format double
-high_bound 360
-low_bound 0
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField plunge1 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-display_length 6
-format double
-high_bound 90
-low_bound -90
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField dip1 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-display_length 6
-format double
-high_bound 90
-low_bound -90
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField semi_major1 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 1
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_006"
-translate upper
}
GuidoField minor1 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 1
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_006"
-translate upper
}
}
GuidoPanel row2 {
-layout GridLayout 1 9
GuidoLabel struc2 {
-label "3"
}
GuidoFiller nugget2_hidden {
}
GuidoField sill2 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-decimals 3
-display_length 6
-format double
-low_bound 0
-max_length 10
-null true
-tip "20255_TIP_004"
-translate upper
}
GuidoField range2 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-decimals 3
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_005"
-translate upper
}
GuidoField azimuth2 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-display_length 6
-format double
-high_bound 360
-low_bound 0
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField plunge2 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-display_length 6
-format double
-high_bound 90
-low_bound -90
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField dip2 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-display_length 6
-format double
-high_bound 90
-low_bound -90
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField semi_major2 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 1
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_006"
-translate upper
}
GuidoField minor2 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 1
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_006"
-translate upper
}
}
GuidoPanel row3 {
-layout GridLayout 1 9
GuidoLabel struc3 {
-label "4"
}
GuidoFiller nugget3_hidden {
}
GuidoField sill3 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-decimals 3
-display_length 6
-format double
-low_bound 0
-max_length 10
-null true
-tip "20255_TIP_004"
-translate upper
}
GuidoField range3 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-decimals 3
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_005"
-translate upper
}
GuidoField azimuth3 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-display_length 6
-format double
-high_bound 360
-low_bound 0
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField plunge3 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-display_length 6
-format double
-high_bound 90
-low_bound -90
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField dip3 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-display_length 6
-format double
-high_bound 90
-low_bound -90
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField semi_major3 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 1
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_006"
-translate upper
}
GuidoField minor3 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 1
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_006"
-translate upper
}
}
GuidoPanel row4 {
-layout GridLayout 1 9
GuidoLabel struc4 {
-label "5"
}
GuidoFiller nugget4_hidden {
}
GuidoField sill4 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-decimals 3
-display_length 6
-format double
-low_bound 0
-max_length 10
-null true
-tip "20255_TIP_004"
-translate upper
}
GuidoField range4 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-decimals 3
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_005"
-translate upper
}
GuidoField azimuth4 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-display_length 6
-format double
-high_bound 360
-low_bound 0
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField plunge4 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-display_length 6
-format double
-high_bound 90
-low_bound -90
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField dip4 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 0
-display_length 6
-format double
-high_bound 90
-low_bound -90
-max_length 10
-null false
-tip "20255_TIP_006"
-translate upper
}
GuidoField semi_major4 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 1
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_006"
-translate upper
}
GuidoField minor4 {
-dependency {"[ $model getCurrentValue]" == "Nested Spherical"}
-default 1
-display_length 6
-format double
-low_bound 0
-max_length 10
-tip "20255_TIP_006"
-translate upper
}
}
}
GuidoPanel evPanel {
-layout BoxLayout Y_AXIS
GuidoFiller ev1_1 {
-height 0.2
}
GuidoPanel evPanel2 {
-layout FlowLayout
GuidoButton visualiser {
-caption "Ellipsoid Visualiser"
-action valueChanged {[graphicalEllipsoid $frm20255]}
-tip "A Visual Representation of the Search Ellipsoid"
}
}
GuidoFiller ev1_2 {
-height 0.2
}
}
}
