import time
from gzip import GzipFile
from os import path as op

import numpy as np
from numpy.typing import NDArray

from ..util import logger

# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# This module was taken from visvis

class WavefrontReader:
    def __init__(self, f): ...
    @classmethod
    def read(cls, fname: str): ...
    def readLine(self): ...
    def readTuple(self, line, n=3): ...
    def readFace(self, line): ...
    def _absint(self, i, ref): ...
    def _calculate_normals(self): ...
    def finish(self): ...

class WavefrontWriter:
    def __init__(self, f): ...
    @classmethod
    def write(
        cls,
        fname: str,
        vertices: NDArray,
        faces: NDArray,
        normals,
        texcoords: NDArray,
        name: str = "",
        reshape_faces: bool = True,
    ): ...
    def writeLine(self, text): ...
    def writeTuple(self, val, what): ...
    def writeFace(self, val, what="f"): ...
    def writeMesh(self, vertices, faces, normals, values, name="", reshape_faces=True): ...
