videx-3d
Version:
React 3D component library designed for sub surface visualizations in the browser
35 lines (34 loc) • 1.44 kB
TypeScript
import { PositionLog } from '../data/types/PositionLog';
import { Curve3D } from '../geometries/curve/curve-3d';
import { Vec3 } from '../types/common';
/**
* Interface for defining a trajectory. This can be used to work with wellbore trajectories,
* where the measured top, termination point and length are known. The measured length should
* be used when calculating positions of data given in MD, so that the position on the curve is
* given by:
*
* @example
* const pos = (md - trajectory.measuredTop) / trajectory.measuredLength
*
* @remarks
* Avoid using the calculated length of the curve for this purpose, as this may potentially be less precise/consistant.
* The `getPointAtDepth` function in this interface is calculated as in the above example when created using the `getTrajectory` function.
*
* @see {@link getTrajectory}
* @see {@link Curve3D}
*/
export interface Trajectory {
id: string | number;
measuredLength: number;
measuredTop: number;
measuredBottom: number;
curve: Curve3D;
getPointAtDepth: (md: number, clamped?: boolean) => Vec3 | null;
getPositionAtDepth: (md: number, clamped?: boolean) => number | null;
}
/**
* Creates an instance conforming to the `Trajectory` interface, given an id and a position log normalized to MSL depths.
*
* @see {@link Trajectory}
*/
export declare function getTrajectory(id: string, poslogMsl: PositionLog | null): Trajectory | null;