Skip to content

Commit 9184e5e

Browse files
committed
gmytool: rationalise the pipeline debugging
1 parent 37678b4 commit 9184e5e

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

geometry-tool/HlbGmyTool/Model/OutputGeneration.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def __init__(self, profile):
262262
GeometryGenerator object.
263263
"""
264264
super().__init__()
265-
265+
self.DebugPipelineDirectory = None
266266
self._profile = profile
267267
self.generator = self.genext.PolyDataGenerator()
268268

@@ -297,15 +297,12 @@ def _Preprocess(self):
297297

298298
shifter.Update()
299299
self.ClippedSurface = shifter.GetOutput()
300-
# Uncomment this an insert the output path to debug pipeline construction
301-
# write = StageWriter('path/to/folder').WriteOutput
302-
# i = 0
303-
# for alg in getpipeline(shifter):
304-
# print(i)
305-
# i += 1
306-
# print(alg)
307-
# write(alg)
308-
300+
# If the attribute has been set, write all the stages of the
301+
# pipeline to the folder.
302+
if self.DebugPipelineDirectory is not None:
303+
sw = StageWriter(self.DebugPipelineDirectory)
304+
for alg in getpipeline(shifter):
305+
sw.WriteOutput(alg)
309306

310307
@abstractmethod
311308
def _RoundUpSites(self, nSites):

0 commit comments

Comments
 (0)