Skip to content

Commit

Permalink
debug prints marked as comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zsiki committed May 20, 2019
1 parent 8db49a6 commit 363d8fe
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/xmlgeo.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,15 @@ 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]} {
set unknowns $pns
} 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} {
Expand All @@ -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 {
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -1163,13 +1171,15 @@ 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
}
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) && \
Expand All @@ -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 }
Expand Down

0 comments on commit 363d8fe

Please sign in to comment.