Commit Graph

11 Commits

Author SHA1 Message Date
bklronin 6ba742ddf5 - sketch enhacements 2026-07-04 12:10:58 +02:00
bklronin 9938f4ddd4 - Basic operations 2026-06-29 23:30:02 +02:00
bklronin f6422e0847 - Tons of addtions 2026-06-28 22:51:52 +02:00
bklronin f8f16ea800 - Tons of addtions 2026-06-28 21:12:34 +02:00
bklronin 7091f530ee fix: use RenderWidget and add animation callback for camera controls
- Change from RenderCanvas to RenderWidget for embedded Qt widget
- Add _animate() callback for canvas.request_draw()
- Update render() to use request_draw() for continuous rendering
- This enables OrbitController to work properly with mouse events
2026-03-14 09:12:12 +01:00
bklronin 75d4820292 fix: register OrbitController events with renderer
Use controller.register_events(renderer) instead of canvas to properly
enable camera rotation/pan/zoom controls in the 3D viewer.
2026-03-14 09:09:32 +01:00
bklronin d52106a48a fix: update pygfx integration for current API
- Use rendercanvas.qt.RenderCanvas instead of wgpu.gui.qt.WgpuCanvas
- Fix camera position API: use camera.local.position instead of camera.position.set()
- Fix light position API: use light.local.position
- Fix PygfxRenderObject to properly inherit from RenderObject
- Change add_mesh/add_wireframe/add_points/add_grid/add_axes to return string ID
- Update base Renderer class to return str instead of RenderObject
- Add custom compute_normals() function for mesh normals
2026-03-14 09:06:38 +01:00
bklronin daed79dac6 chore: update .gitignore and remove pycache from tracking 2026-03-14 08:59:25 +01:00
bklronin e13769840b fix: ensure renderer is initialized before operations
- Add _ensure_initialized() method to Viewer3DWidget
- Queue pending meshes until widget is shown
- Add remove_mesh() method to PygfxRenderer
- Fix all viewer methods to check initialization
2026-03-14 08:59:12 +01:00
bklronin 5371bf7c38 fix: implement custom compute_normals for pygfx
pygfx doesn't have a compute_normals function, so we implement
our own vertex normal computation from positions and face indices.
2026-03-14 08:57:52 +01:00
bklronin fe23ca610c feat: Replace SDF kernel with OpenCASCADE, VTK with pygfx
Major architecture migration:

- Remove SDF-based geometry kernel (sdf/)
- Remove VTK renderer (drawing_modules/)
- Remove old mesh modules (mesh_modules/)

New components:
- geometry/base.py: Abstract geometry kernel interface
- geometry_occ/kernel.py: OpenCASCADE implementation via CadQuery/OCP
- geometry_occ/sketch.py: 2D sketching with constraint solving
- rendering/base.py: Abstract renderer interface
- rendering/pygfx_renderer.py: WebGPU-based renderer
- models/data_model.py: Project, Component, Sketch, Body classes
- main.py: New Qt-based application

Features:
- STEP/IGES import/export
- Exact BRep geometry (vs approximate SDF mesh)
- Parametric sketching with constraints
- Boolean operations (union, difference, intersection)
- Fillet and chamfer operations
- Modern pygfx renderer (~30MB vs VTK ~200MB)

Dependencies:
- cadquery >= 2.4
- ocp >= 7.9.3
- pygfx >= 0.7.0
- wgpu >= 0.19.0
- PySide6 >= 6.9.0
2026-03-14 08:45:07 +01:00