package require java
set lastExpandValue 0
set solidsRepairClientManager [java::call com.surpac.client.ClientManager getSharedInstance]
proc ::SolidsRepairValidateProc { appName } {
global solidsRepairObjectRange
global solidsrepairTrisolRange
global solidsRepairAutoValidate
global solidsRepairSetDirection
global solidRepairExpand
global intersectionsCheck
global invalidEdgesCheck
global reversedCheck
global holesCheck
global disconnectedCheck
global twoSidedCheck
global transparencyCheck
global animateCheck
global zoomCheck
global frontClipCheck
global backClipCheck
global problem_number
global solidsRepairClientManager
set val [GuidoSSIOption get "System.Initialised"]
if { $val != "" } {
GuidoApp solidsRepairApp $appName
$solidsRepairApp setParam obj_range [$solidsRepairObjectRange getCurrentValue]
$solidsRepairApp setParam trisol_range [$solidsrepairTrisolRange getCurrentValue]
$solidsRepairApp setParam solid_void [$solidsRepairSetDirection getCurrentValue]
$solidsRepairApp setParam autoValidate [$solidsRepairAutoValidate getCurrentValue]
$solidsRepairApp setParam expandSelection [$solidRepairExpand getCurrentValue]
$solidsRepairApp setParam intersectionsCheck [$intersectionsCheck getCurrentValue]
$solidsRepairApp setParam invalidEdgesCheck [$invalidEdgesCheck getCurrentValue]
$solidsRepairApp setParam reversedCheck [$reversedCheck getCurrentValue]
$solidsRepairApp setParam holesCheck [$holesCheck getCurrentValue]
$solidsRepairApp setParam disconnectedCheck [$disconnectedCheck getCurrentValue]
$solidsRepairApp setParam twoSidedCheck [$twoSidedCheck getCurrentValue]
$solidsRepairApp setParam transparencyCheck [$transparencyCheck getCurrentValue]
$solidsRepairApp setParam animateCheck [$animateCheck getCurrentValue]
$solidsRepairApp setParam zoomCheck [$zoomCheck getCurrentValue]
$solidsRepairApp setParam frontClipCheck [$frontClipCheck getCurrentValue]
$solidsRepairApp setParam backClipCheck [$backClipCheck getCurrentValue]
$solidsRepairApp setParam problem_number [$problem_number getCurrentValue]
$solidsRepairClientManager cancelCurrentActivity
$solidsRepairApp invoke
}
}
proc ::SolidsRepairClearProc { } {
global solidsRepairObjectRange
global solidsrepairTrisolRange
global solidsRepairAutoValidate
global solidsRepairSetDirection
global solidRepairExpand
global intersectionsCheck
global invalidEdgesCheck
global reversedCheck
global holesCheck
global disconnectedCheck
global twoSidedCheck
global transparencyCheck
global animateCheck
global zoomCheck
global frontClipCheck
global backClipCheck
global problem_number
set val [GuidoSSIOption get "System.Initialised"]
if { $val != "" } {
$solidsRepairObjectRange setCurrentValue ""
$solidsrepairTrisolRange setCurrentValue ""
$solidsRepairAutoValidate setCurrentValue "Y"
$solidsRepairSetDirection setCurrentValue "solid"
$solidRepairExpand setCurrentValue "0"
$intersectionsCheck setCurrentValue "Y"
$invalidEdgesCheck setCurrentValue "Y"
$reversedCheck setCurrentValue "Y"
$holesCheck setCurrentValue "Y"
$disconnectedCheck setCurrentValue "Y"
$twoSidedCheck setCurrentValue "Y"
$transparencyCheck setCurrentValue "Y"
$animateCheck setCurrentValue "Y"
$zoomCheck setCurrentValue "Y"
$frontClipCheck setCurrentValue "Y"
$backClipCheck setCurrentValue "N"
$problem_number setCurrentValue ""
}
}
proc ::SolidsRepairOpenProc { } {
global solidsRepairObjectRange
global solidsrepairTrisolRange
global lastExpandValue
set val [GuidoSSIOption get "System.Initialised"]
if { $val != "" } {
set trisols [GuidoSSIOption get "SolidsRepairInitialTrisols"]
set objects [GuidoSSIOption get "SolidsRepairInitialObjects"]
$solidsRepairObjectRange setCurrentValue $objects
$solidsrepairTrisolRange setCurrentValue $trisols
set lastExpandValue 0
}
}
proc ::SolidsRepairExpandProc { } {
global solidRepairExpand
global lastExpandValue
set val [GuidoSSIOption get "System.Initialised"]
if { $val != "" } {
if { [$solidRepairExpand getCurrentValue] != $lastExpandValue } {
::SolidsRepairValidateProc "SOLIDS REPAIR SET PARAMETERS"
set lastExpandValue [$solidRepairExpand getCurrentValue]
}
}
}
proc ::SolidsRepairProblemNumberProc { } {
global problem_number
set val [GuidoSSIOption get "System.Initialised"]
if { $val != "" } {
if { [$problem_number getCurrentValue] != ""} {
::SolidsRepairValidateProc "SOLIDS REPAIR MOVE TO"
$problem_number setCurrentValue ""
}
}
}
proc ::SolidsRepairCheckboxKeyboardHack { checkBox } {
set val [GuidoSSIOption get "System.Initialised"]
if { $val != "" } {
if { [$checkBox getCurrentValue] == "Y" } {
$checkBox setCurrentValue "N"
} else {
$checkBox setCurrentValue "Y"
}
}
}
