RubendeBruin / pymeshup

Building volume meshes from scratch using coordinates, primitives and boolean operations
Mozilla Public License 2.0
7 stars 1 forks source link

Water depth for Capytaine #4

Open mancellin opened 1 year ago

mancellin commented 1 year ago

I'm not sure 0 is a good default value for the water depth in Capytaine.

I don't mind using the "negative = infinity" convention used in other solver, but given the line

waterdepth = float(self.ui.teWaterdepth.text())

then entering infinity or inf would give float('inf') which is the actual floating point representation of infinity.

RubendeBruin commented 1 year ago

Good point, update to:

image

if the checkbox is checked then "None" is passed as waterdepth

mancellin commented 1 year ago

The UI looks good! Capytaine might interpret water_depth=None as infinite depth, but for robustness and future-proof-ness I would suggest using in your code the explicit standard floating point number representation of infinity water_depth=float('infinity').

RubendeBruin commented 1 year ago

Done,

image

in current master branch. Will be in next compiled version