Compare commits

...

1 Commits

Author SHA1 Message Date
Yeicor
753648e522 fix imports 2024-03-06 19:25:49 +01:00
8 changed files with 32 additions and 32 deletions

View File

@@ -523,8 +523,8 @@ Apache License
The following npm packages may be included in this product:
- b4a@1.6.6
- bare-events@2.2.0
- bare-fs@2.1.5
- bare-events@2.2.1
- bare-fs@2.2.1
- bare-os@2.2.0
- bare-path@2.1.0
@@ -1430,7 +1430,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The following npm package may be included in this product:
- @lit-labs/ssr-dom-shim@1.1.2
- @lit-labs/ssr-dom-shim@1.2.0
This package contains the following license and notice below:
@@ -1556,7 +1556,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The following npm package may be included in this product:
- @babel/parser@7.23.9
- @babel/parser@7.24.0
This package contains the following license and notice below:
@@ -1736,7 +1736,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
The following npm package may be included in this product:
- node-abi@3.54.0
- node-abi@3.56.0
This package contains the following license and notice below:
@@ -1826,7 +1826,7 @@ SOFTWARE.
The following npm package may be included in this product:
- @monogrid/gainmap-js@3.0.1
- @monogrid/gainmap-js@3.0.3
This package contains the following license and notice below:
@@ -2378,7 +2378,7 @@ THE SOFTWARE.
The following npm package may be included in this product:
- prebuild-install@7.1.1
- prebuild-install@7.1.2
This package contains the following license and notice below:
@@ -2408,7 +2408,7 @@ THE SOFTWARE.
The following npm package may be included in this product:
- vuetify@3.5.3
- vuetify@3.5.7
This package contains the following license and notice below:
@@ -2498,16 +2498,16 @@ THE SOFTWARE.
The following npm packages may be included in this product:
- @vue/compiler-core@3.4.16
- @vue/compiler-dom@3.4.16
- @vue/compiler-sfc@3.4.16
- @vue/compiler-ssr@3.4.16
- @vue/reactivity@3.4.16
- @vue/runtime-core@3.4.16
- @vue/runtime-dom@3.4.16
- @vue/server-renderer@3.4.16
- @vue/shared@3.4.16
- vue@3.4.16
- @vue/compiler-core@3.4.21
- @vue/compiler-dom@3.4.21
- @vue/compiler-sfc@3.4.21
- @vue/compiler-ssr@3.4.21
- @vue/reactivity@3.4.21
- @vue/runtime-core@3.4.21
- @vue/runtime-dom@3.4.21
- @vue/server-renderer@3.4.21
- @vue/shared@3.4.21
- vue@3.4.21
These packages each contain the following license and notice below:
@@ -2538,7 +2538,7 @@ THE SOFTWARE.
The following npm packages may be included in this product:
- fast-fifo@1.3.2
- streamx@2.16.0
- streamx@2.16.1
These packages each contain the following license and notice below:

View File

@@ -1,6 +1,6 @@
{
"name": "yet-another-cad-viewer",
"version": "0.2.0",
"version": "0.3.0",
"description": "",
"license": "MIT",
"author": "Yeicor <4929005+Yeicor@users.noreply.github.com>",

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "yacv-server"
version = "0.2.0" # TODO: Update automatically by CI on release (also for package.json!)
version = "0.3.0" # TODO: Update automatically by CI on release (also for package.json!)
description = "Yet Another CAD Viewer (server)"
authors = ["Yeicor <4929005+Yeicor@users.noreply.github.com>"]
license = "MIT"

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)