Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions AM_INSTALLATION_DIGEST.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The following files were created outside this installation path during the installation of this Addon on 2025-03-08 15:32:05.048100+00:00:
/home/ubuntu/.var/app/org.freecad.FreeCAD/data/FreeCAD/Macro/DesignSPHysics.FCMacro
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ To execute DesignSPHysics just open the same Macro dialog and double click DualS
### Installing a development build
Clone the branch that you like from this repository and rename the folder to 'DesignSPHysics'. Then copy the folder to the Mod folder of the FreeCAD installation directory.

> Note: in FreeCAD 1.0 - flatpak - the repo should be cloned here:
`/home/ubuntu/.var/app/org.freecad.FreeCAD/data/FreeCAD/Mod/`

By default, for example, in Windows, it is located in `%appdata%/FreeCAD/Mod` or in Linux in `~/.FreeCAD/Mod`

Then copy the file `DesignSPHysics.FCMacro` of this repository into the FreeCAD macro directory (`%appdata%/FreeCAD/Macro` on Windows; `~/.FreeCAD/Macro` on GNU/Linux)
Expand Down
2 changes: 1 addition & 1 deletion mod/dialog_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Contains general use standard dialogs. """

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.translation_tools import __

Expand Down
2 changes: 1 addition & 1 deletion mod/executable_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import json

# from PySide import QtCore
from PySide2 import QtCore
from PySide6 import QtCore

import FreeCADGui

Expand Down
2 changes: 1 addition & 1 deletion mod/freecad_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import Draft

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.translation_tools import __
from mod.stdout_tools import log, error, debug
Expand Down
9 changes: 7 additions & 2 deletions mod/gui_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import os

# from PySide import QtGui
from PySide2 import QtWidgets, QtGui
from PySide6 import QtWidgets, QtGui


def h_line_generator() -> QtWidgets.QFrame:
Expand All @@ -33,5 +33,10 @@ def get_icon(file_name, return_only_path=False) -> QtGui.QIcon:
""" Returns a QIcon to use with DesignSPHysics. Retrieves a file with filename (like image.png) from the images folder. """
file_to_load = os.path.dirname(os.path.abspath(__file__)) + "/../images/{}".format(file_name)
if os.path.isfile(file_to_load):
return file_to_load if return_only_path else QtGui.QIcon(file_to_load)
if return_only_path:
# Return only the path
return QtGui.QPixmap(file_to_load)
else:
# Return the icon
return QtGui.QIcon(file_to_load)
raise IOError("File {} not found in images folder".format(file_name))
2 changes: 1 addition & 1 deletion mod/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import FreeCADGui

# from PySide import QtGui, QtCore
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets

from mod.translation_tools import __
from mod.freecad_tools import check_compatibility, document_count, prompt_close_all_documents, get_fc_main_window, get_fc_object
Expand Down
2 changes: 1 addition & 1 deletion mod/post_processing_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import subprocess

# from PySide import QtCore
from PySide2 import QtCore
from PySide6 import QtCore

from mod.translation_tools import __
from mod.dialog_tools import error_dialog, info_dialog
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/acceleration_input_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics Acceleration Input Dialog."""

# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets

from mod.translation_tools import __

Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/add_geo_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from tempfile import gettempdir

# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets

from mod.stdout_tools import debug
from mod.file_tools import import_geo
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/bound_initials_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import FreeCADGui

# from PySide import QtGui, QtCore
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets

from mod.translation_tools import __
from mod.dialog_tools import info_dialog
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/case_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
""" DesignsSPHysics Case Summary Dialog """

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.translation_tools import __
from mod.template_tools import get_template_text, obj_to_dict
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/chrono/chrono_config_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics Chrono configuration dialog."""

# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets


from mod.translation_tools import __
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/chrono/chrono_object_check_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
"""DesignSPHysics Chrono Object Check Options widget."""

from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.translation_tools import __

Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/chrono/link_coulombdamping_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics CoulombDamping Edit Dialog """

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets


from mod.translation_tools import __
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/chrono/link_hinge_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics Link Hinge Edit Dialog """

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.translation_tools import __
from mod.dialog_tools import error_dialog
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/chrono/link_linear_spring_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics LinkLinearSprint Edit Dialog """

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.translation_tools import __
from mod.dialog_tools import error_dialog
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/chrono/link_point_line_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics LinkPointLine Edit Dialog """

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets
from mod.translation_tools import __
from mod.dialog_tools import error_dialog

Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/chrono/link_pulley_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics Link Pulley Edit Dialog """

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.translation_tools import __
from mod.dialog_tools import error_dialog
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/chrono/link_spheric_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics LinkSphere Edit Widget """

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.translation_tools import __
from mod.dialog_tools import error_dialog
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/constants_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets, QtGui
from PySide6 import QtCore, QtWidgets, QtGui

from mod.translation_tools import __
from mod.stdout_tools import log
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/damping_config_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import FreeCAD
# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets

from mod.translation_tools import __
from mod.dialog_tools import error_dialog
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/dock/designsphysics_dock.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""Main DesignSPHysics Dock Widget """

# from PySide import QtGui, QtCore
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets

from mod.gui_tools import h_line_generator
from mod.freecad_tools import get_fc_main_window
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/dock/dock_configuration_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics Dock Configuration Widget. """

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.translation_tools import __
from mod.freecad_tools import get_fc_main_window
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/dock/dock_dp_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics Dock DP Intro Widget """

# from PySide import QtGui
from PySide2 import QtWidgets, QtGui
from PySide6 import QtWidgets, QtGui

from mod.translation_tools import __

Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/dock/dock_logo_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import webbrowser

# from PySide import QtGui
from PySide2 import QtWidgets, QtGui
from PySide6 import QtWidgets, QtGui

from mod.gui_tools import get_icon
from mod.translation_tools import __
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/dock/dock_object_list_table_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics Object List Table Widget."""

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.freecad_tools import get_fc_object
from mod.translation_tools import __
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/dock/dock_post_processing_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics Dock Post Processing Widget """

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.translation_tools import __
from mod.freecad_tools import get_fc_main_window
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/dock/dock_pre_processing_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from traceback import print_exc

# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets, QtGui
from PySide6 import QtCore, QtWidgets, QtGui

from mod.translation_tools import __
from mod.gui_tools import get_icon
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/dock/dock_simulation_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from sys import platform

# from PySide import QtGui, QtCore
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets

from mod.translation_tools import __
from mod.gui_tools import get_icon
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/error_report_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import FreeCAD
# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.gui_tools import h_line_generator

Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/execution_parameters_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics Execution Parameters Configuration Dialog."""

# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtGui, QtWidgets
from PySide6 import QtCore, QtGui, QtWidgets

from mod.translation_tools import __
from mod.stdout_tools import log
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/faces_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics Faces Configuration Dialog"""

# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets

from mod.translation_tools import __

Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/feature_support_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics Setup Plugin Dialog """

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.stdout_tools import debug
from mod.translation_tools import __
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/float_state_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import FreeCADGui

# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets

from mod.translation_tools import __
from mod.dialog_tools import info_dialog
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/focusable_combo_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
""" DesignSPHysics Focusable ComboBox implementation. """

# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets


class FocusableComboBox(QtWidgets.QComboBox):
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/focusable_line_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics Focusable LineEdit implementation."""

# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets


class FocusableLineEdit(QtWidgets.QLineEdit):
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/gencase_completed_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import subprocess

# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets

from mod.translation_tools import __
from mod.dialog_tools import error_dialog
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/hoverable_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics Hoverable Label implementation."""

# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets, QtGui
from PySide6 import QtCore, QtWidgets, QtGui


class HoverableLabel(QtWidgets.QLabel):
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/information_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""DesignSPHysics General Information Dialog"""

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.gui_tools import h_line_generator
from mod.translation_tools import __
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/initials_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import FreeCADGui

# from PySide import QtGui
from PySide2 import QtWidgets
from PySide6 import QtWidgets

from mod.translation_tools import __
from mod.dialog_tools import info_dialog
Expand Down
2 changes: 1 addition & 1 deletion mod/widgets/inlet_config_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from uuid import UUID
# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets

from mod.translation_tools import __
from mod.freecad_tools import get_fc_main_window
Expand Down
4 changes: 2 additions & 2 deletions mod/widgets/inlet_zone_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"""DesignSPHysics Inlet Zone Configuration Dialog."""

from mod.freecad_tools import get_fc_main_window
from PySide2.QtWidgets import QVBoxLayout
from PySide6.QtWidgets import QVBoxLayout
from mod.dataobjects.awas_correction import AWASCorrection
# from PySide import QtCore, QtGui
from PySide2 import QtCore, QtWidgets
from PySide6 import QtCore, QtWidgets

from mod.translation_tools import __
from mod.stdout_tools import debug
Expand Down
Loading