@@ -778,20 +778,20 @@ def genMass(sps=None, ratio=2.0) -> bool:
778778 return True
779779
780780
781- def holdsConstruction (set = None , bse = None , gr = False , ex = False , tp = "" ):
781+ def holdsConstruction (set = None , base = None , gr = False , ex = False , type = "" ):
782782 """Validates whether a default construction set holds an opaque base
783783 construction.
784784
785785 Args:
786786 set (openstudio.model.DefaultConstructionSet):
787787 A default construction set.
788- bse (openstudio.model.ConstructionBase):
788+ base (openstudio.model.ConstructionBase):
789789 A construction base.
790790 gr (bool):
791791 Whether ground-facing surface.
792792 ex (bool):
793793 Whether exterior-facing surface.
794- tp :
794+ type :
795795 A surface type ("Wall", "Floor", "RoofCeiling").
796796
797797 Returns:
@@ -805,21 +805,21 @@ def holdsConstruction(set=None, bse=None, gr=False, ex=False, tp=""):
805805
806806 if not isinstance (set , cl1 ):
807807 return oslg .invalid ("set" , mth , 1 , CN .DBG , False )
808- if not isinstance (bse , cl2 ):
808+ if not isinstance (base , cl2 ):
809809 return oslg .invalid ("base" , mth , 2 , CN .DBG , False )
810810 if gr not in [True , False ]:
811811 return oslg .invalid ("ground" , mth , 3 , CN .DBG , False )
812812 if ex not in [True , False ]:
813813 return oslg .invalid ("exterior" , mth , 4 , CN .DBG , False )
814814
815815 try :
816- tp = str (tp )
816+ type = str (type )
817817 except ValueError as e :
818- return oslg .mismatch ("surface type" , tp , str , mth , CN .DBG , False )
818+ return oslg .mismatch ("surface type" , type , str , mth , CN .DBG , False )
819819
820- type = tp .lower ()
820+ type = type .lower ()
821821
822- if tp not in ["floor" , "wall" , "roofceiling" ]:
822+ if type not in ["floor" , "wall" , "roofceiling" ]:
823823 return oslg .invalid ("surface type" , mth , 5 , CN .DBG , False )
824824
825825 constructions = None
@@ -839,15 +839,15 @@ def holdsConstruction(set=None, bse=None, gr=False, ex=False, tp=""):
839839 if type == "roofceiling" :
840840 if constructions .roofCeilingConstruction ():
841841 construction = constructions .roofCeilingConstruction ().get ()
842- if construction == bse : return True
842+ if construction == base : return True
843843 elif type == "floor" :
844844 if constructions .floorConstruction ():
845845 construction = constructions .floorConstruction ().get ()
846- if construction == bse : return True
846+ if construction == base : return True
847847 else :
848848 if constructions .wallConstruction ():
849849 construction = constructions .wallConstruction ().get ()
850- if construction == bse : return True
850+ if construction == base : return True
851851
852852 return False
853853
@@ -872,7 +872,7 @@ def defaultConstructionSet(s=None):
872872 if not s .isConstructionDefaulted ():
873873 oslg .log (CN .WRN , "construction not defaulted (%s)" % mth )
874874 return None
875- if s .construction ():
875+ if not s .construction ():
876876 return oslg .empty ("construction" , mth , CN .WRN )
877877 if not s .space ():
878878 return oslg .empty ("space" , mth , CN .WRN )
@@ -881,7 +881,7 @@ def defaultConstructionSet(s=None):
881881 base = s .construction ().get ()
882882 space = s .space ().get ()
883883 type = s .surfaceType ()
884- bnd = s .outsideBoundaryCondition ().downcase ()
884+ bnd = s .outsideBoundaryCondition ().lower ()
885885
886886 ground = True if s .isGroundSurface () else False
887887 exterior = True if bnd == "outdoors" else False
0 commit comments