SclDrillholeXYZ
Overview
This command calculates the X, Y, Z, azimuth and dip values at a specified depth down the drillhole. A geology database must be connected for this command to execute successfully.
Synopsis
$DatabaseHandle SclDrillholeXYZ $holeid $depth xpos ypos zpos azimuth dip
Description
Calculate the downhole X, Y, Z, azimuth and dip values for the specified drill hole and assign these values to the variables in the argument list.
Arguments
- DatabaseHandle
- holeid
- depth
- xpos
- ypos
- zpos
- azimuth
- dip
The variable must contain a valid geology database handle.
Passed by value. The hole ID for which a downhole depth is to be calculated must be stored in this variable.
Passed by value. This is the downhole depth at which the X, Y, Z, azimuth and dip is to be calculated.
Passed by reference. The X value at the specified depth is assigned to this variable.
Passed by reference. The Y value at the specified depth is assigned to this variable.
Passed by reference. The Z value at the specified depth is assigned to this variable.
Passed by reference. The azimuth in decimal degrees is assigned to this variable.
Passed by reference. The dip in decimal degrees is assigned to this variable. The convention for dip is 0 is horizontal, 90 is vertically up and -90 is vertically down.
Returns
Returns $SCL_TRUE on successful execution. Throws a TCL error if there is no database connected or if the specified drillhole does not exist in the database.
Examples
#
# Open a database and display down XYZ values, azimuth and dip at 2m intervals
# then close the database before the script terminates
#
SclOpenDatabase DatabaseHandle "woody.ddb"
$DatabaseHandle SclDrillholeMaxDepth "WD004" maxdepth
for {set depth 0} {$depth < $maxdepth} {incr depth 2} {
$DatabaseHandle SclDrillholeXYZ "WD004" 0.0 xpos ypos zpos azimuth dip
puts "Hole ID=WD004, [format "at depth %.2f X=%.3f Y=%.3f Z=%.3f Azimuth=%.3f Dip=%.3f"\
$depth $xpos $ypos $zpos $azimuth $dip] "
}
$DatabaseHandle SclDrillholeXYZ "WD004" $maxdepth xpos ypos zpos azimuth dip
puts "Hole ID=WD004, [format "max depth %.2f X=%.3f Y=%.3f Z=%.3f Azimuth=%.3f Dip=%.3f"\
$maxdepth $xpos $ypos $zpos $azimuth $dip] "
SclCloseDatabase DatabaseHandle
|
#
# Get the handle to an existing database and display down XYZ
# values, azimuth and dip at 2m intervals - leave the database
# connected on completion
#
if {[sclDatabases SclCountItems] < 1} {
error "No databases are connected"
}
sclDatabases SclGetItem DatabaseHandle 0
$DatabaseHandle SclDrillholeMaxDepth "WD004" maxdepth
for {set depth 0} {$depth < $maxdepth} {incr depth 2} {
$DatabaseHandle SclDrillholeXYZ "WD004" 0.0 xpos ypos zpos azimuth dip
puts "Hole ID=WD004, [format "at depth %.2f X=%.3f Y=%.3f Z=%.3f Azimuth=%.3f Dip=%.3f"\
$depth $xpos $ypos $zpos $azimuth $dip] "
}
$DatabaseHandle SclDrillholeXYZ "WD004" $maxdepth xpos ypos zpos azimuth dip
puts "Hole ID=WD004, [format "max depth %.2f X=%.3f Y=%.3f Z=%.3f Azimuth=%.3f Dip=%.3f"\
$maxdepth $xpos $ypos $zpos $azimuth $dip] "
|