Skip to content

Commit

Permalink
Small improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
gcomoretto committed Nov 25, 2018
1 parent b5a00c2 commit 531f907
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions makeProductTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def doFile(inFile):

n2, nMS = mixTreeDim(ptree)

print('>n2 - tree depth: ', n2, ntree.depth(), nMS)
#print('>n2 - tree depth: ', n2, ntree.depth(), nMS)

paperwidth = 0
height = 0
Expand All @@ -491,11 +491,12 @@ def doFile(inFile):
paperwidth = paperwidth + ( ntree.depth() * 5.2 ) * n2 + 0.7 # cm
streew=paperwidth
height = height + nMS * 1.6 # cm
print('height:', height, 'width:', paperwidth)
else:
paperwidth = paperwidth + ntree.depth() * 6.2 # cm
streew=paperwidth
height = height + len(ntree.leaves()) * leafHeight + 0.5 # cm
height = len(ntree.leaves()) * 1.6 + 0.5 # cm

print('height:', height, '; width:', paperwidth)

with open(nf, 'w') as fout:
header(fout, paperwidth, height)
Expand Down

0 comments on commit 531f907

Please sign in to comment.