Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update websocket handling, frontend updates, more bspline support #113

Merged
merged 73 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
6ad9142
fix bugs in sesam reader with including tests
Krande Sep 5, 2024
fc04069
fix config class singleton behaviour working properly in pytesting
Krande Sep 5, 2024
3c59535
successful roundtrip of bsplinesurfacewithknots from IFC and back. Ne…
Krande Sep 5, 2024
b3474c5
fix config not working
Krande Sep 6, 2024
3d807ca
attempt to fix aba inp rel path resolve on linux
Krande Sep 6, 2024
ae94043
minor updates to tests
Krande Sep 6, 2024
9b2f430
minor updates to tests
Krande Sep 6, 2024
6dc7d0c
further work
Krande Sep 7, 2024
600f9a9
add sat file
Krande Sep 7, 2024
42725fc
start to parse sat data
Krande Sep 7, 2024
d15e982
prep for sat conversion
Krande Sep 7, 2024
f187446
minor change
Krande Sep 7, 2024
f478420
more work on sat export of bspline surfaces
Krande Sep 9, 2024
7cab4e8
further work on sat bspline surface
Krande Sep 9, 2024
ad848b3
further work
Krande Sep 9, 2024
b118714
start to work on export to opencascade
Krande Sep 10, 2024
013a780
start investigating issue with bspline curves
Krande Sep 12, 2024
c9089a1
further work
Krande Sep 12, 2024
320dc24
ongoing work to fix closed shell
Krande Sep 12, 2024
e3a1001
fix bounded shell issue
Krande Sep 13, 2024
dcafbc0
Update surfaces.py
Krande Sep 13, 2024
9287271
further work on curved surfaces
Krande Sep 14, 2024
732053c
update test to capture missing bspline curve conversion from sat geom…
Krande Sep 14, 2024
fd6064a
further fixes
Krande Sep 14, 2024
aad00f1
fix support for bspline curve imports from ACIS SAT
Krande Sep 15, 2024
3f18970
further work on acis sat reader
Krande Sep 15, 2024
6a473f9
add a ellipse and lawintcur sat example
Krande Sep 15, 2024
ae7463b
further work
Krande Sep 16, 2024
002ebf3
further work
Krande Sep 16, 2024
ee12b0e
further work
Krande Sep 17, 2024
7b7a232
fix curved acis faces
Krande Sep 17, 2024
3515097
add more fixes to bsplines
Krande Sep 18, 2024
f65b37a
started working on support for acis entity references
Krande Sep 18, 2024
b88e37a
further work
Krande Sep 18, 2024
a847a1e
minor change
Krande Sep 18, 2024
1b98704
start adding updates to web viewer
Krande Sep 18, 2024
d84ce49
add basic serialization of ifc to sqlite based on ifcopenshell sqlite…
Krande Sep 19, 2024
7df1ee0
further work on frontend
Krande Sep 19, 2024
f668370
add websocket server tests
Krande Sep 19, 2024
7846f5b
add pytest-asyncio
Krande Sep 20, 2024
7062464
update async websocket client test
Krande Sep 20, 2024
793b791
update classes, refactor and fix websocket tests
Krande Sep 20, 2024
c2556de
add support for flatbuffers in websocket messaging
Krande Sep 20, 2024
d097362
add more deps
Krande Sep 20, 2024
65cc287
add auto gen of dataclasses and fixups for issues in schema conversion
Krande Sep 20, 2024
9dc2227
fix fb autogenerated py dataclasses
Krande Sep 20, 2024
39b9ca7
some refactoring to improve readability
Krande Sep 20, 2024
ef992d5
update zipped viewer
Krande Sep 20, 2024
c4bf6ba
more code gen for serializing and deserializing flatbuffers
Krande Sep 22, 2024
7e5e641
added code gen for serializing and deserializing flatbuffers
Krande Sep 22, 2024
1b162a8
minor refactor of fb schema dir and start adding ts support for fb data
Krande Sep 22, 2024
4be6d91
add support for sending glb data using fb
Krande Sep 23, 2024
8f931a0
further work
Krande Sep 23, 2024
2b8b1a0
minor changes
Krande Sep 23, 2024
140b4a2
completed a callback scheme for ifc files using sqlite
Krande Sep 23, 2024
2c81e69
update zip with html viewer
Krande Sep 23, 2024
d4012c2
fix tests
Krande Sep 24, 2024
05486fc
start replacing old websocket server wrapper and do some linting
Krande Sep 24, 2024
4b519f0
begin adding support for procedural modelling and a basic node-based …
Krande Sep 24, 2024
240a28e
fixed jupyter renderer and lint
Krande Sep 25, 2024
2db3301
continue work on adding support for procedures
Krande Sep 25, 2024
a756141
add end to end testing of websockets communication between web app an…
Krande Sep 26, 2024
58e7458
run playwright install for tests
Krande Sep 26, 2024
cd462f9
do not use autouse
Krande Sep 26, 2024
ce2b9d0
updated fea result show method to use react viewer also
Krande Sep 26, 2024
42b422d
refactor frontend tests
Krande Sep 26, 2024
c205e36
increase max websocket buffer size
Krande Sep 26, 2024
099be0b
fix unique_viewer_id for notebook cells and minor cosmetic updates fo…
Krande Sep 27, 2024
d712980
minor updates to zip
Krande Sep 27, 2024
d1d7dfa
fix lint and error in fb deserializer_gen.py
Krande Sep 27, 2024
dc5d96a
fix missing dep for code profiling tests and minor update to frontend
Krande Sep 27, 2024
d9bec79
fix fem tests
Krande Sep 27, 2024
7dbd2f3
update cache key
Krande Sep 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci-FEM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ jobs:
- uses: mamba-org/setup-micromamba@v1 # https://github.com/mamba-org/setup-micromamba
with:
cache-environment: true
cache-environment-key: ada-py-fem-test-001
cache-environment-key: ada-py-fem-test-002
condarc: |
channels:
- krande
- https://repo.prefix.dev/code-aster
- conda-forge
environment-file: conda/environment.core.yml
create-args: >-
python=3.11
python=3.12
code-aster=*=*nompi*
paradoc
python-dotenv
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-code-profiling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
pytest
pytest-benchmark
pytest-codspeed
python-flatbuffers

- name: Install latest version
run: |
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ jobs:
create-args: >-
python=3.12
pytest
pytest-asyncio
pytest-benchmark

- name: Install latest adapy
run: |
pip install -e .

- name: Runs Tests
run: pytest ./tests --ignore=./tests/fem/ --ignore=./tests/full/ --ignore=./tests/profiling/
run: pytest ./tests --ignore=./tests/fem/ --ignore=./tests/full/ --ignore=./tests/profiling/ --durations=0

test-full:
name: Test ada-py-full
Expand All @@ -55,16 +57,24 @@ jobs:
create-args: >-
python=3.12
pytest
pytest-asyncio
pytest-benchmark
jupyterlab
pythreejs
pyparsing
websockets
nodejs
pygfx
pyglfw

- name: Install latest adapy
run: |
pip install -e .
pip install pytest-playwright

- name: install playwright
run: |
playwright install

- name: Run Tests
run: pytest ./tests --ignore=./tests/fem/ --ignore=./tests/profiling/ --durations=0
6 changes: 5 additions & 1 deletion conda/environment.core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ dependencies:
- plotly
- kaleido-core 0.1.0
- python-kaleido
- calculix
- calculix
- shapely
- pillow
- flatbuffers
- python-flatbuffers
16 changes: 16 additions & 0 deletions environment.debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: ada-debug
channels:
- https://repo.prefix.dev/adapy-tools
- conda-forge
dependencies:
- ada-py
#- ada-cpp
- paradoc
# - code-aster
- occt=*=*novtk*debug*
- ifcopenshell=*=*debug*
- pythonocc-core=*=*debug*
- gmsh=*=*debug*
- trimesh >=4.1.0
- python-dotenv
- pytest
15 changes: 13 additions & 2 deletions environment.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,21 @@ channels:
- conda-forge
dependencies:
- ada-py
# - ada-cpp
- ada-cpp
- hdf5=1.14.4.3
- paradoc
- code-aster
- occt=*=*novtk*
- trimesh >=4.1.0
- python-dotenv
- pytest
- pytest
- pytest-asyncio
- shapely
- pillow
- flatbuffers
- python-flatbuffers
- notebook
- nodejs
- pip
- pip:
- pytest-playwright
108 changes: 108 additions & 0 deletions examples/experiments/rendering/imgui_wgpu/multi_canvas.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
"""
Example showing how to use multiple imgui contexts to draw to multiple canvases

# run_example = false
"""

import wgpu
from imgui_bundle import imgui
from wgpu.gui.auto import WgpuCanvas, run
from wgpu.utils.imgui import ImguiRenderer

# Create a canvas to render to
canvas1 = WgpuCanvas(title="imgui", size=(512, 256))
canvas2 = WgpuCanvas(title="imgui", size=(512, 256))
canvas3 = WgpuCanvas(title="imgui", size=(512, 256))

canvases = [canvas1, canvas2, canvas3]

# Create a wgpu device
adapter = wgpu.gpu.request_adapter(power_preference="high-performance")
device = adapter.request_device()

# create a imgui renderer for each canvas
imgui_renderer1 = ImguiRenderer(device, canvas1)
imgui_renderer2 = ImguiRenderer(device, canvas2)
imgui_renderer3 = ImguiRenderer(device, canvas3)


# Separate GUIs that are drawn to each canvas
def update_gui1():
imgui.new_frame()

imgui.set_next_window_size((300, 0), imgui.Cond_.appearing)
imgui.set_next_window_pos((0, 20), imgui.Cond_.appearing)

imgui.begin("window1", None)
imgui.button("b1")

imgui.end()

imgui.end_frame()
imgui.render()

return imgui.get_draw_data()


def update_gui2():
imgui.new_frame()

imgui.set_next_window_size((300, 0), imgui.Cond_.appearing)
imgui.set_next_window_pos((0, 20), imgui.Cond_.appearing)

imgui.begin("window2", None)
imgui.button("b2")

imgui.end()

imgui.end_frame()
imgui.render()

return imgui.get_draw_data()


def update_gui3():
imgui.new_frame()

imgui.set_next_window_size((300, 0), imgui.Cond_.appearing)
imgui.set_next_window_pos((0, 20), imgui.Cond_.appearing)

imgui.begin("window3", None)
imgui.button("b3")

imgui.end()

imgui.end_frame()
imgui.render()

return imgui.get_draw_data()


# give the corresponding gui updater functions to the imgui renderers
imgui_renderer1.set_gui(update_gui1)
imgui_renderer2.set_gui(update_gui2)
imgui_renderer3.set_gui(update_gui3)


# draw function for each canvas
def draw1():
imgui_renderer1.render()
canvas1.request_draw()


def draw2():
imgui_renderer2.render()
canvas2.request_draw()


def draw3():
imgui_renderer3.render()
canvas3.request_draw()


if __name__ == "__main__":
canvas1.request_draw(draw1)
canvas2.request_draw(draw2)
canvas3.request_draw(draw3)

run()
Loading
Loading