sec_interp.core.utils.drillhole module
Drillhole Utilities Module.
Calculations for drillhole geometry and projection.
- sec_interp.core.utils.drillhole.calculate_drillhole_trajectory(collar_point: Any, collar_z: float, survey_data: list[tuple[float, float, float]], section_azimuth: float, densify_step: float = 1.0, total_depth: float = 0.0) list[tuple[float, float, float, float, float, float]]
Calculate the 3D trajectory of a drillhole using survey data.
Calculates X, Y, Z positions along the hole using minimum curvature or tangential approximation based on survey readings (depth, azimuth, dip).
- Parameters:
collar_point – Starting point (QgsPointXY or tuple).
collar_z – Starting elevation.
survey_data – List of (depth, azimuth, inclination) tuples.
section_azimuth – Azimuth of the section line (for relative calcs).
densify_step – Distance between interpolated points in meters.
total_depth – Total depth of the hole.
- Returns:
List of (depth, x, y, z, 0.0, 0.0) trajectory points.
- sec_interp.core.utils.drillhole.interpolate_intervals_on_trajectory(trajectory: list[tuple], intervals: list[tuple[float, float, Any]], buffer_width: float) list[tuple[Any, list[tuple[float, float]], list[tuple[float, float, float]]]]
Interpolate interval attributes along drillhole trajectory.
Filters and maps geological intervals onto the 3D trajectory points that fall within the specified section buffer.
- Parameters:
trajectory – List of (depth, x, y, z, dist_along, offset) tuples.
intervals – List of (from_depth, to_depth, attribute) tuples.
buffer_width – Maximum perpendicular offset to include a point.
- Returns:
attribute: The metadata/geology associated with the interval.
points_2d: List of (distance, elevation) coordinates for rendering.
points_3d: List of (x, y, z) original coordinates for 3D export.
- Return type:
List of tuples containing
- sec_interp.core.utils.drillhole.project_trajectory_to_section(trajectory: list[tuple], line_geom: qgis.core.QgsGeometry, line_start: Any, distance_area: qgis.core.QgsDistanceArea) list[tuple[float, float, float, float, float, float, float, float]]
Project drillhole trajectory points onto the section line.
Calculates the 2D projection (distance along section) and the offset (distance from section) for each point in a 3D trajectory.
- Parameters:
trajectory – List of 3D trajectory points (depth, x, y, z, …).
line_geom – Section line geometry.
line_start – Reference start point for distance calculation.
distance_area – Distance calculation utility.
- Returns:
List of (depth, x, y, z, dist_along, offset, proj_x, proj_y) tuples.