Files
fluencyCAD/src/fluency/main.py
T
bklronin 5269c0897c - Added save file foramt
- Split main.py refactor
2026-07-05 22:16:08 +02:00

62 lines
1.5 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Fluency CAD - Main entry point.
This module is intentionally thin. The actual UI lives in the
``fluency.ui`` package:
ui.dialogs 4 modal dialogs (Extrude, Revolve, Offset, WorkplaneOrientation)
ui.viewer_widget Viewer3DWidget (3D canvas)
ui.sketch_widget Sketch2DWidget (2D sketcher + constraint solver)
ui.main_window MainWindow (application shell)
The public classes are re-exported here so that existing call sites
that do ``from fluency.main import MainWindow`` (notably
``tests/test_geometry.py``) keep working.
"""
from __future__ import annotations
import logging
import sys
from PySide6.QtWidgets import QApplication
from fluency.ui.dialogs import (
ExtrudeDialog,
OffsetDialog,
RevolveDialog,
WorkplaneOrientationDialog,
)
from fluency.ui.main_window import MainWindow
from fluency.ui.sketch_widget import Sketch2DWidget
from fluency.ui.viewer_widget import Viewer3DWidget
__all__ = [
"MainWindow",
"Sketch2DWidget",
"Viewer3DWidget",
"ExtrudeDialog",
"RevolveDialog",
"OffsetDialog",
"WorkplaneOrientationDialog",
"main",
]
def main() -> int:
"""Launch the Fluency CAD application.
Returns the ``QApplication.exec()`` exit code so that the console-script
entry point declared in ``pyproject.toml`` can forward it.
"""
app = QApplication(sys.argv)
app.setStyle("Fusion")
window = MainWindow()
window.show()
return app.exec()
if __name__ == "__main__":
sys.exit(main())