From 363d8fee5b2575fbadccacaee365b907b9f0a077 Mon Sep 17 00:00:00 2001 From: zsiki Date: Mon, 20 May 2019 22:44:56 +0200 Subject: [PATCH] debug prints marked as comment --- src/xmlgeo.tcl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/xmlgeo.tcl b/src/xmlgeo.tcl index a27e665d..284419fd 100644 --- a/src/xmlgeo.tcl +++ b/src/xmlgeo.tcl @@ -318,6 +318,7 @@ proc GamaExport {{fn ""} {pns ""} {fixed ""}} { } ".g3d" { set used [Known3DPointsOnly $used];# at least appr. coordinates +#puts "used: $used" if {[llength $used] > 0} { ;# there are observed points set used [lsort -dictionary $used] if {[llength $pns]} { @@ -325,6 +326,7 @@ proc GamaExport {{fn ""} {pns ""} {fixed ""}} { } else { set unknowns [GeoListbox $used 0 $geoEasyMsg(lbTitle2) -1] } +#puts "unknowns: $unknowns" if {[llength $unknowns] > 0} { if {[llength $fixed]} { if {[string compare $fixed "all"] == 0} { @@ -336,6 +338,7 @@ proc GamaExport {{fn ""} {pns ""} {fixed ""}} { set fixed [GeoListbox $fixed 0 $geoEasyMsg(lbTitle5) 0] } } +#puts "fixed: $fixed" return [Gama3dXmlOut $fn $unknowns $fixed] } } else { @@ -1059,6 +1062,7 @@ proc Gama3dXmlOut {fn pns fixed {flag 0}} { global RO global SEC2CC +#puts "Gama3dXmlOut" set nmeasure 0 ;# number of observations considered set n [llength $pns] GeoDia .dia $geoEasyMsg(adjDia) nmeasure n ;# display dialog panel @@ -1070,6 +1074,7 @@ proc Gama3dXmlOut {fn pns fixed {flag 0}} { set msg_flag 0 ;# display warning on too large pure value set free_network [expr {([llength $fixed] == 0) ? 1 : 0}] foreach pn $pns { +#puts "pn: $pns" # get all references from all loaded geo data sets foreach geo $geoLoaded { global ${geo}_ref ${geo}_geo ${geo}_par @@ -1107,6 +1112,7 @@ proc Gama3dXmlOut {fn pns fixed {flag 0}} { } set ih [GetVal {3 6} $stbuf] ;# instrument height if {$ih == ""} { set ih 0 } +#puts "stations: $stations" if {[lsearch -exact $stations "$geo $stref"] != -1} { # station already processed continue @@ -1124,6 +1130,7 @@ proc Gama3dXmlOut {fn pns fixed {flag 0}} { set newst 0 ;# station is known point set stcoo [GetCoord $stpn {38 37} $geo] } +#puts "stcoo $stcoo" if {$stcoo == ""} { continue ;# no coordinate for station skip it } @@ -1139,6 +1146,7 @@ proc Gama3dXmlOut {fn pns fixed {flag 0}} { set refdir 0 set othdir 0 set lineno [expr {$stref + 1}] ;# first observation +#puts "station: $stpn" while {1} { if {[info exists ${geo}_geo($lineno)] == 0} { break ;# end of geo data set @@ -1150,7 +1158,7 @@ proc Gama3dXmlOut {fn pns fixed {flag 0}} { set p [GetVal {5 62} $pbuf] ;# point number of other end set th [GetVal 6 $pbuf] ;# target height if {$th == ""} { set th 0} -#puts $dbg "iranyzott pont $p" +#puts "iranyzott pont $p" set pcoo "" if {[lsearch -exact $pns $p] >= 0} { set newp 1 ;# p is unknown point @@ -1163,6 +1171,7 @@ proc Gama3dXmlOut {fn pns fixed {flag 0}} { set newp 0 ;# p is known point set pcoo [GetCoord $p {38 37 39} $geo] } +#puts "coords: $pcoo" if {$pcoo == ""} { incr lineno continue ;# no coord skip @@ -1170,6 +1179,7 @@ proc Gama3dXmlOut {fn pns fixed {flag 0}} { set px [GetVal {38 138} $pcoo] set py [GetVal {37 137} $pcoo] set pz [GetVal {39 139} $pcoo] +#puts "newst: $newst newp: $newp" if {($newst == 1 || $newp == 1) && \ ([lsearch -exact $fixed $stpn] > -1 || \ [lsearch -exact $pns $stpn] > -1) && \ @@ -1191,7 +1201,7 @@ proc Gama3dXmlOut {fn pns fixed {flag 0}} { set dist [Distance3d $stx $sty $stz $px $py $pz $ih $th] set measure($nmeasure) [list $stpn $p "S" $d "" $ih $th] } -#puts $dbg "sorszam: $nmeasure meres: $measure($nmeasure)" +#puts "sorszam: $nmeasure meres: $measure($nmeasure)" # repeat count set nrep [GetVal 112 $pbuf] if {$nrep == "" || $nrep <= 0} { set nrep 1 }