Commit Graph

91 Commits

Author SHA1 Message Date
bklronin 742d06d242 - Render improvements, camera plane, update 2026-07-13 23:01:35 +02:00
bklronin c78d0af78c - added renderer
- Added undo
2026-07-13 06:54:21 +02:00
bklronin dda9db822b - added renderer
- Added undo
2026-07-12 23:25:59 +02:00
bklronin 9f1387fe68 - added renderer
- Added undo
2026-07-12 22:21:43 +02:00
bklronin 210e3cfb5d - added renderer 2026-07-12 22:21:20 +02:00
bklronin b8516fff91 - Working assembly multi :) 2026-07-11 21:42:08 +02:00
bklronin d7e5929a13 - Working assembly multi :) 2026-07-11 21:29:58 +02:00
bklronin 2b2afbc479 - Added save file foramt
- Split main.py refactor
2026-07-11 15:39:30 +02:00
bklronin b0aebdc04f - Added save file foramt
- Split main.py refactor
2026-07-11 09:34:38 +02:00
bklronin be22c44a3f - Added save file foramt
- Split main.py refactor
2026-07-07 22:40:40 +02:00
bklronin 80ba3cc70a - Added save file foramt
- Split main.py refactor
2026-07-07 21:51:27 +02:00
bklronin 5269c0897c - Added save file foramt
- Split main.py refactor
2026-07-05 22:16:08 +02:00
bklronin 3a169007f7 - assembly draft 2026-07-05 19:36:27 +02:00
bklronin b595b88e04 - assembly draft 2026-07-05 10:16:49 +02:00
bklronin 9f10a5c5e5 - UI refinement, button position ui file as source no dirty drafting anymore 2026-07-04 16:16:04 +02:00
bklronin 6ba742ddf5 - sketch enhacements 2026-07-04 12:10:58 +02:00
bklronin 01833e4af2 - sketch enhacements 2026-07-03 21:49:05 +02:00
bklronin f860ff3e77 - removed cadquery deoendency 2026-07-01 20:03:00 +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 54ac2c098a - Improved sketching 2026-06-14 10:10:37 +02:00
bklronin ea34e7e29d - Improved sketching 2026-06-14 10:10:33 +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 d7ebbf45d5 feat: add CLI logging for debugging
- Add logging module with DEBUG level
- Log MainWindow initialization
- Log Viewer3DWidget initialization and mesh operations
- Log mouse events in Sketch2DWidget
- Log extrude operations with detailed steps
- Log component and sketch management
2026-03-14 09:01:20 +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 bf00310889 feat: implement full GUI with all features from old codebase
- Main window with left/center/right panel layout
- 2D sketch widget with drawing tools (line, rectangle, circle)
- Constraint tools (coincident, horizontal, vertical, distance, midpoint)
- Snapping system (point, midpoint, horizontal, vertical, angle, grid)
- 3D viewer widget using pygfx
- Component timeline with buttons
- Sketch and body list management
- Operations (extrude, cut, combine, revolve)
- Workplane tools (origin, face, flip, move)
- Export functionality (STEP, IGES, STL)
- Import STEP/IGES files
- Code tab for CadQuery scripting
2026-03-14 08:56:13 +01:00
bklronin 8c6a413137 fix: correct OCP API usage for mesh, bounding box, and volume
- Fix BRep_Tool.Triangulation_s to use TopoDS.Face_s for face casting
- Fix BRepBndLib.AddClose_s import and usage
- Fix BRepGProp.VolumeProperties_s and SurfaceProperties_s imports
- Fix _get_shape to handle Workplane objects stored in shape attribute
- Fix OCCSketchEntity to properly inherit from SketchEntity
- Update pyproject.toml dependency versions
2026-03-14 08:52:45 +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
bklronin d6044e551a - Improved sketching 2025-11-16 17:48:05 +01:00
bklronin 11d053fda4 Fix sketcher mode handling to prevent unintended line creation during drag operations
Major changes:
- Fixed right-click handler to directly set mode to NONE instead of relying on main app signal handling
- Added safety checks in left-click handler to prevent drawing when no draggable point is found in NONE mode
- Enhanced mode compatibility by treating Python None as SketchMode.NONE in set_mode() method
- Added comprehensive debug logging for mode changes and interaction state tracking
- Resolved integration issue where persistent constraint modes were prematurely reset by main app
- Ensured point dragging is only enabled in NONE mode, preventing accidental polyline creation

This fixes the reported issue where deactivating the line tool would still create lines when dragging,
and ensures proper mode transitions between drawing tools and selection/drag mode.
2025-08-16 22:30:18 +02:00
bklronin 54261bb8fd - added sdf folder ( doesnt work via pip or git=) 2025-08-16 20:33:44 +02:00
bklronin d373b50644 - added screenshot 2025-06-01 10:08:35 +02:00
BKLronin 0a9d557ce0 Merge pull request 'structure' (#7) from structure into master
Reviewed-on: BKLronin/fluency#7
2025-06-01 10:05:29 +02:00
bklronin c1911e3fac - added MIT license 2025-06-01 10:00:12 +02:00
bklronin 6cf70b9ae2 - Fixed redraw when component changed 2025-04-13 16:40:54 +02:00
bklronin 4d7b2cdbad - Added enabling of midpsnap and prepared others
- Show dimesnion on hover
2025-03-29 22:36:11 +01:00
bklronin f26a596159 - Added contrain displayed next to line
- Slight change to point check from solver.
2025-03-28 21:17:19 +01:00
bklronin 2a7f718b3e - Added construction lines switching
- Moved callbacks into sketchwidget from main.
- Changed reset on right click
2025-02-16 22:00:59 +01:00
bklronin 878b6093b7 - Added new buttons and settings 2025-01-02 19:28:43 +01:00
BKLronin 15cc30edac Merge pull request 'structure' (#6) from structure into master
Reviewed-on: BKLronin/fluency#6
2025-01-02 19:20:35 +01:00
bklronin 3e88e41e4b - Added new buttons and settings 2025-01-02 14:39:36 +01:00
bklronin e9383f76a2 - delete sketch working
- added mid point snap
- added hovering line with distance
2025-01-01 21:35:43 +01:00
bklronin f5861b8bd1 - Drawing bodys depending on the selected compo
- Cut working
- Edit sketch working
2024-12-31 23:48:20 +01:00
bklronin 601121dc15 - changing compos including sketches and bodies 2024-12-31 17:21:56 +01:00
bklronin 6c8462a7f3 - changing compos for sketches works 2024-12-31 14:34:41 +01:00