Skip to content

Commit

Permalink
feat(rooms): add inset option for room height calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
marcantondahmen committed Nov 29, 2022
1 parent 9844b83 commit 67bd796
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
tabs = ['Settings', 'Raw', 'Finished']

window = TabWindow(
'Export Settings', tabs, okButtonText='Calculate', width=560, height=600
'Calculate Room Heights', tabs, okButtonText='Calculate', width=560, height=600
)

TextBox.create(
Expand All @@ -31,6 +31,7 @@
CheckBox.create(window, tabs[0], 'roomFltrInvert', config, title='Invert Room Filter')

TextBox.create(window, tabs[0], 'gridSize', config, title='Grid Size', default='5')
TextBox.create(window, tabs[0], 'inset', config, title='Inset', default='0.05')

TextBox.create(
window, tabs[1], 'rawEleFltrParam', config, title='Raw Element Filter Parameter Name'
Expand Down Expand Up @@ -201,7 +202,12 @@
with ProgressBar(title='Processing Rooms ... ({value} of {max_value})') as pb:
pb.update_progress(counter, max_value)
for room in rooms:
heights = _(room).traceHeight(view3D, rawElements, float(values.gridSize))
heights = _(room).traceHeight(
view3D,
rawElements,
gridSize=float(values.gridSize),
inset=float(values.inset)
)
try:
_(room).set(values.rawBottomMinParam, heights.bottom.min, 'Length')
_(room).set(values.rawBottomMaxParam, heights.bottom.max, 'Length')
Expand All @@ -212,7 +218,12 @@
_(room).set(values.rawTopMaxParam, heights.top.max, 'Length')
except:
pass
heights = _(room).traceHeight(view3D, finElements, float(values.gridSize))
heights = _(room).traceHeight(
view3D,
finElements,
gridSize=float(values.gridSize),
inset=float(values.inset)
)
try:
_(room).set(values.finBottomMinParam, heights.bottom.min, 'Length')
_(room).set(values.finBottomMaxParam, heights.bottom.max, 'Length')
Expand Down

0 comments on commit 67bd796

Please sign in to comment.