From 64a95737b12db505496a13294e94243dd898d830 Mon Sep 17 00:00:00 2001 From: Vitaly Bogomolov Date: Thu, 27 Aug 2026 11:24:13 +0400 Subject: [PATCH] Fix error on depth percent calculation for dent with Depth.PercentWallThickness. --- history.txt | 2 ++ pipeline_csv/csvfile/defect.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/history.txt b/history.txt index fa1d628..8d7379a 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,5 @@ +- Fix error on depth percent calculation for dent with Depth.PercentWallThickness. + 19.06.2026 ver.1.26 ------------------- diff --git a/pipeline_csv/csvfile/defect.py b/pipeline_csv/csvfile/defect.py index cb7124b..6a06d5b 100644 --- a/pipeline_csv/csvfile/defect.py +++ b/pipeline_csv/csvfile/defect.py @@ -85,7 +85,7 @@ def depth_percent(self): # Depth.HundredthsOfMillimeter if self.is_dent: - return float(self.row.depth_max) / self.pipe.diameter + return float(self.row.depth_max) / float(self.pipe.diameter) return float(self.row.depth_max) / (self.pipe.thick / 10.0)