pyroll-project / pyroll-core

PyRoll rolling simulation framework - core library.
https://pyroll.readthedocs.io
BSD 3-Clause "New" or "Revised" License
12 stars 7 forks source link

Box groove solve_box_like function return depth = None #118

Closed QiangF closed 9 months ago

QiangF commented 9 months ago

which fails the value check:

pyroll/core/grooves/generic_elongation.py(71)__init__()
     69         mandatory_positive_or_zero = [r1, r2, r3, r4, alpha3, alpha4, indent, even_ground_width, flank_angle,
     70                                       usable_width, ground_width, depth]
---> 71         if any(value < 0 for value in mandatory_positive_or_zero):
     72             raise ValueError("Groove arguments have to be non-negative.")

Among usable_width, ground_width, flank_angle, depth, there will be one that is none, based on the following requirement:

pyroll/core/grooves/generic_elongation.py:93, in GenericElongationGroove.__init__(self, r1, r2, flank_angle, usable_width, ground_width, depth, r3, alpha3, r4, alpha4, indent, even_ground_width, pad, rel_pad, pad_angle, classifiers)
     90         raise TypeError("Too many arguments given.")
     92 except TypeError:
---> 93     raise TypeError("Exactly three of usable_width, ground_width, flank_angle and depth must be given.")
     95 self.r1 = r1
     96 self.r2 = r2
axtimhaus commented 9 months ago

Thanks for your report. This bug was already fixed with #114