pyenergyplus / witheppy

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

fixed issue #13 #14

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 list2extensiblefields() will work with nested or flat list tranparently. 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)