Adding same parts fails due to thickness unequality
Closed this issue · 3 comments
arkhnchul commented
some parts fails to be added as "same parts" with message "partname does not have the same thickness", even when thicknesses are equal in cad. This happens due to strong equality check between floats in append_link method of PartsList (partmat.py). Comparing absolute difference with some reasonable delta value, 0.001 or so, is more reliable here.
for example two parts in attached file, with thicknesses differ by 8.881784197e-16
execuc commented
Ok, I fix it using a function defined in other file. Default tolerance is 10e-6 in this function but if issue is still present I will set to 0.001.
arkhnchul commented
as far as i see, issue isn't showing anymore.
execuc commented
Ok, thank you for the fix and the test.