proc getTrisolationIds { } {
global ObjectName
global ObjectIDCombo
global TrisolName
global TrisolIDCombo
set buffer [GuidoExecServer "GetActiveLayerTrisolIds" [subst {object_id = [$ObjectIDCombo getCurrentValue]}]]
set id_count [GuidoGetParamBufferValue $buffer "num_values"]
set id_array [GuidoGetParamBufferValue $buffer "trisol"]
for {set idx 0} {$idx < $id_count} {incr idx} {
lappend trisolList [lindex $id_array $idx]
}
eval [concat {$TrisolIDCombo} {setValues} $trisolList]
$ObjectName setCurrentValue [GuidoGetParamBufferValue $buffer "obj_name"]
$TrisolName setCurrentValue [GuidoGetParamBufferValue $buffer "trisol_name"]
}
proc getTrisolationName { } {
global ObjectIDCombo
global TrisolName
global TrisolIDCombo
set buffer [GuidoExecServer "GetActiveLayerTrisolName" [subst {object_id = [$ObjectIDCombo getCurrentValue] trisol_id = [$TrisolIDCombo getCurrentValue]}]]
$TrisolName setCurrentValue [GuidoGetParamBufferValue $buffer "trisolname"]
}
GuidoForm SolSimplify {
-default_buttons
-label "Simplify 3DM/DTM"
-layout BoxLayout Y_AXIS
-tip SolSimplify_TIP_0
GuidoPanel SolSimplify_PanelMain {
-border etched true
-label "Select function inputs"
-layout CentreLineLayout
GuidoLabel LayerLabel {
-label "Layer"
}
GuidoLabel LayerName {
-font_style bold
-no_mlt
}
GuidoLabel SwaLabel {
-label "New layer name"
}
GuidoField SwaName {
-display_length 18
-null false
}
GuidoLabel TargetLabel {
-label "Target"
}
GuidoButtonGroupPanel TargetRadioPanel {
-layout BoxLayout X_AXIS
GuidoRadioButton RadioTargetLayer {
-caption "Layer"
-default true
-selected_value "LAYER"
}
GuidoRadioButton RadioTargetTriobject {
-caption "Triobject"
-selected_value "TRIOBJECT"
}
GuidoRadioButton RadioTargetTrisol {
-caption "Trisolation"
-selected_value "TRISOL"
}
}
GuidoLabel ObjectIDLabel {
-label "Object ID"
}
GuidoPanel ObjectIDPanel {
-layout BoxLayout X_AXIS
GuidoComboBox ObjectIDCombo {
-max_length 6
-display_length 6
-exclusive true
-null false
-format integer
-dependency {"[$TargetRadioPanel getCurrentValue]" != "LAYER"}
-action valueChanged {[getTrisolationIds]}
}
GuidoFiller ObjectFiller {
-width 0.2
}
GuidoLabel ObjectName {}
}
GuidoLabel TrisolIDLabel {
-label "Trisolation ID"
}
GuidoPanel TrisolIDPanel {
-layout BoxLayout X_AXIS
GuidoComboBox TrisolIDCombo {
-max_length 6
-display_length 6
-exclusive true
-null false
-format integer
-dependency {"[$TargetRadioPanel getCurrentValue]" == "TRISOL"}
-action valueChanged {[getTrisolationName]}
}
GuidoFiller TrisolFiller {
-width 0.2
}
GuidoLabel TrisolName {}
}
}
GuidoPanel SolSimplify_PanelAdjust {
-border etched true
-label "Adjust function parameters"
-layout CentreLineLayout
GuidoLabel ColinearityLabel {
-label "Max colinearity of triangles"
}
GuidoField ColinearityField {
-display_length 5
-low_bound 0.001
-high_bound 1.0
-null false
-default 0.01
-format real_8
}
GuidoLabel VolumeLabel {
-label "Max allowable change in volume"
}
GuidoField VolumeField {
-display_length 5
-low_bound 0.001
-high_bound 1.0
-null false
-default 0.01
-format real_8
}
GuidoLabel DistanceLabel {
-label "Max merge distance"
}
GuidoField DistanceField {
-display_length 5
-low_bound 0.0001
-high_bound 1.0
-null false
-default 0.002
-format real_8
}
}
}
