pyenergyplus / witheppy

Python packages built using eppy
MIT License
8 stars 2 forks source link

nested lists in extensiblefields2list() & list2extensiblefields() #13

Closed santoshphilip closed 5 years ago

santoshphilip commented 5 years ago

Problem: Both the functions work with flat lists. For the coordinates of a building surface it will return [2,3,4,22,33,44] instead of [(2,3,4),(22,33,44)]

Solution: Let extensiblefields2list() return a nested list and list2extensiblefields() use a nested list. sample code would look like:

points = extensiblefields2list(surface, nested=True)
print(points)
>> [(2,3,4),(22,33,44),(12,23,34)]

newpoints = points + [(44,55,66)]
print(newpoints)
>> [(2, 3, 4), (22, 33, 44), (12, 23, 34), (44, 55, 66)]

list2extensiblefields(surface, newpoints, nested=True)
santoshphilip commented 5 years ago

fixed issue #13