File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -4615,10 +4615,14 @@ def spaceWidth(space = nil)
46154615 polygs = polygs . map { |plg | plg . to_a . reverse }
46164616 union = OpenStudio . joinAll ( polygs , 0.01 ) . first
46174617 polyg = poly ( union , false , true , true )
4618+ return 0 if polyg . empty?
46184619 end
46194620 end
46204621
4621- height ( boundedBox ( polyg ) )
4622+ res = realignedFace ( polyg . to_a . reverse )
4623+ return 0 if res [ :box ] . nil?
4624+
4625+ height ( res [ :box ] )
46224626 end
46234627
46244628 ##
Original file line number Diff line number Diff line change @@ -5785,8 +5785,8 @@ module M
57855785 # corridors with multiple concavities).
57865786 expect ( mod1 . spaceHeight ( fine ) ) . to be_within ( TOL ) . of ( 8.53 )
57875787 expect ( mod1 . spaceWidth ( fine ) ) . to be_within ( TOL ) . of ( 21.33 )
5788- expect ( mod1 . status ) . to eq ( 0 )
57895788
5789+ # --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- #
57905790 file = File . join ( __dir__ , "files/osms/out/seb_sky.osm" )
57915791 path = OpenStudio ::Path . new ( file )
57925792 model = translator . loadModel ( path )
@@ -5804,6 +5804,8 @@ module M
58045804 expect ( mod1 . alignedHeight ( floor ) ) . to be_within ( TOL ) . of ( 6.88 )
58055805 expect ( mod1 . alignedWidth ( floor ) ) . to be_within ( TOL ) . of ( 8.22 )
58065806 expect ( mod1 . spaceHeight ( openarea ) ) . to be_within ( TOL ) . of ( 3.96 )
5807- expect ( mod1 . spaceWidth ( openarea ) ) . to be_within ( TOL ) . of ( 7.90 )
5807+ expect ( mod1 . spaceWidth ( openarea ) ) . to be_within ( TOL ) . of ( 3.77 )
5808+
5809+ expect ( mod1 . status ) . to eq ( 0 )
58085810 end
58095811end
You can’t perform that action at this time.
0 commit comments