import { Vector3 } from 'three';
import { LineTubeGeometry } from "./LineTubeGeometry";
import { SegmentColorizer } from './SegmentColorizer';
/**
 * GCode renderer which parses a GCode file and displays it using
 * three.js. Use .element() to retrieve the DOM canvas element.
 */
export declare class GCodeParser {
    private combinedLines;
    private gCode;
    min?: Vector3;
    max?: Vector3;
    private minTemp;
    private maxTemp;
    private minSpeed;
    private maxSpeed;
    private layerIndex;
    /**
     * Width of travel-lines. Use 0 to hide them.
     *
     * @type number
     */
    travelWidth: number;
    /**
     * Set any colorizer implementation to change the segment color based on the segment
     * metadata. Some default implementations are provided.
     *
     * @type SegmentColorizer
     */
    colorizer: SegmentColorizer;
    /**
     * The number of radial segments per line.
     * Less (e.g. 3) provides faster rendering with less memory usage.
     * More (e.g. 8) provides a better look.
     *
     * @default 8
     * @type number
     */
    radialSegments: number;
    /**
     * Internally the rendered object is split into several. This allows to reduce the
     * memory consumption while rendering.
     * You can set the number of points per object.
     * In most cases you can leave this at the default.
     *
     * @default 120000
     * @type number
     */
    pointsPerObject: number;
    /**
     * Creates a new GCode renderer for the given gcode.
     * It initializes the canvas to the given size and
     * uses the passed color as background.
     *
     * @param {string} gCode
     * @param {number} width
     * @param {number} height
     * @param {Color} background
     */
    constructor(gCode: string);
    /**
     * This can be used to retrieve some min / max values which may
     * be needed as param for a colorizer.
     * @returns {{
     *         minTemp: number | undefined,
     *         maxTemp: number,
     *         minSpeed: number | undefined,
     *         maxSpeed: number
     *     }}
     */
    getMinMaxValues(): {
        minTemp: number | undefined;
        maxTemp: number;
        minSpeed: number | undefined;
        maxSpeed: number;
    };
    /**
     * Recalculate the bounding box with the new point.
     * @param {Vector3} newPoint
     */
    private calcMinMax;
    /**
     * Parses a string cmd value.
     * The first char has to be a letter.
     * If value is not set (undefined | "") or if the resulting number is NaN,
     * the default value is returned.
     *
     * If the defaultValue is a number, the result can never be undefined due to type constraints.
     *
     * @param value
     * @param defaultValue {number | undefined} may be any number or undefined.
     * @returns if the defaultValue is undefined, this can be undefined. Else it will always be a number.
     */
    private parseValue;
    /**
     * Pre-calculates the min max metadata which may be needed for the colorizers.
     */
    private calcMinMaxMetadata;
    /**
     * Reads the GCode and crates a mesh of it.
     */
    parse(): Promise<void>;
    /**
     * Slices the rendered model based on the passed start and end point numbers.
     * (0, pointsCount()) renders everything
     *
     * Note: Currently negative values are not allowed.
     *
     * @param {number} start the starting segment
     * @param {number} end the ending segment (excluding)
     */
    slice(start?: number, end?: number): void;
    /**
     * Slices the rendered model based on the passed start and end line numbers.
     * (0, layerCount()) renders everything
     *
     * Note: Currently negative values are not allowed.
     *
     * @param {number} start the starting layer
     * @param {number} end the ending layer (excluding)
     */
    sliceLayer(start?: number, end?: number): void;
    /**
     * disposes everything which is dispose able.
     * Call this always before destroying the instance.""
     */
    dispose(): void;
    /**
     * Get the amount of points in the model.
     *
     * @returns {number}
     */
    pointsCount(): number;
    /**
     * Get the amount of layers in the model.
     * This is an approximation which may be incorrect if the
     * nozzle moves downwards mid print.
     *
     * @returns {number}
     */
    layerCount(): number;
    /**
     * You can get the internal geometries generated from the gcode.
     * Use only if you know what you do.
     * @returns the internal generated geometries.
     */
    getGeometries(): LineTubeGeometry[];
}
