diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2021-12-18 08:44:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-18 08:44:37 +0100 |
| commit | 1d3cb680c4ec253165fb5cd183e8b4e920f635be (patch) | |
| tree | f17f5e55d4e510dc04f41d764065519bc69916ff /lib/stitch_plan/stitch_plan.py | |
| parent | ffeb265e5310e3c899c27f5364b070c09e50e5ff (diff) | |
PDF: Estimated thread (#1389)
Diffstat (limited to 'lib/stitch_plan/stitch_plan.py')
| -rw-r--r-- | lib/stitch_plan/stitch_plan.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py index f6895197..a501391d 100644 --- a/lib/stitch_plan/stitch_plan.py +++ b/lib/stitch_plan/stitch_plan.py @@ -113,7 +113,8 @@ class StitchPlan(object): num_stops=self.num_stops, num_trims=self.num_trims, num_stitches=self.num_stitches, - bounding_box=self.bounding_box + bounding_box=self.bounding_box, + estimated_thread=self.estimated_thread ) @property @@ -148,6 +149,11 @@ class StitchPlan(object): return minx, miny, maxx, maxy @property + def estimated_thread(self): + thread_meter = sum(block.estimated_thread for block in self) / PIXELS_PER_MM / 1000 + return round(thread_meter, 2) + + @property def dimensions(self): minx, miny, maxx, maxy = self.bounding_box return (maxx - minx, maxy - miny) |
