DesignSPHysics icon indicating copy to clipboard operation
DesignSPHysics copied to clipboard

Enable smaller inter-particle distance values

Open kmarchais opened this issue 5 months ago • 0 comments

Summary

  • Increased decimal precision for inter-particle distance input from default to 6 decimals
  • Updated SizeInput widget to accept configurable decimal places
  • Modified dock_dp_widget to use 6 decimal places for inter-particle distance

Problem Solved

Previously, users could not set inter-particle distance values lower than 0.001. This change allows for much smaller values by increasing the number of decimal places displayed and accepted in the input field.

Changes

  • mod/widgets/custom_widgets/size_input.py: Added decimals parameter to SizeInput constructor
  • mod/widgets/dock/dock_dp_widget.py: Set dp_input to use 6 decimal places

Alternative Solution

Another approach would be to modify the DEFAULT_DECIMALS constant, but this would affect all other numeric inputs throughout the application. The current solution provides targeted precision only where needed.

kmarchais avatar Aug 11 '25 15:08 kmarchais