fix imports

This commit is contained in:
Yeicor
2024-03-06 19:25:49 +01:00
parent 986db75b24
commit 753648e522
8 changed files with 32 additions and 32 deletions

View File

@@ -4,7 +4,7 @@ import time
from aiohttp import web
from server import Server
from yacv_server.server import Server
server = Server()
"""The server instance. This is the main entry point to serve CAD objects and other data to the frontend."""

View File

@@ -7,7 +7,7 @@ from typing import Optional, Union, List, Tuple
from OCP.TopLoc import TopLoc_Location
from OCP.TopoDS import TopoDS_Shape
from gltf import GLTFMgr
from yacv_server.gltf import GLTFMgr
CADLike = Union[TopoDS_Shape, TopLoc_Location] # Faces, Edges, Vertices and Locations for now

View File

@@ -2,7 +2,7 @@ import asyncio
from typing import List, TypeVar, \
Generic, AsyncGenerator
from mylogger import logger
from yacv_server.mylogger import logger
T = TypeVar('T')

View File

@@ -16,10 +16,10 @@ from aiohttp_sse import sse_response
from build123d import Shape, Axis, Location, Vector
from dataclasses_json import dataclass_json
from cad import get_shape, grab_all_cad, image_to_gltf
from mylogger import logger
from pubsub import BufferedPubSub
from tessellate import _hashcode, tessellate
from yacv_server.cad import get_shape, grab_all_cad, image_to_gltf
from yacv_server.mylogger import logger
from yacv_server.pubsub import BufferedPubSub
from yacv_server.tessellate import _hashcode, tessellate
# Find the frontend folder (optional, but recommended)
FILE_DIR = os.path.dirname(__file__)

View File

@@ -13,9 +13,9 @@ from OCP.TopoDS import TopoDS_Face, TopoDS_Edge, TopoDS_Shape, TopoDS_Vertex
from build123d import Shape, Vertex, Face, Location
from pygltflib import GLTF2
import mylogger
from cad import CADLike
from gltf import GLTFMgr
from yacv_server.mylogger import logger
from yacv_server.cad import CADLike
from yacv_server.gltf import GLTFMgr
def tessellate(
@@ -68,7 +68,7 @@ def _tessellate_face(
face.mesh(tolerance, angular_tolerance)
poly = BRep_Tool.Triangulation_s(face.wrapped, TopLoc_Location())
if poly is None:
mylogger.logger.warn("No triangulation found for face")
logger.warn("No triangulation found for face")
return GLTF2()
tri_mesh = face.tessellate(tolerance, angular_tolerance)