Ejemplo n.º 1
0
def create_window(i1,
                  i2,
                  dist=None,
                  width=1.,
                  height=1.2,
                  bottom_height=1.,
                  close=True):
    create = False
    pts = data['points']
    for w in data['walls']:
        if (i1 in w) and (i2 in w):
            create = True
            break
    if create:
        if not dist:
            dist = 0.5 * distance(pts[i1], pts[i2])
        window = rectangle(width, height)
        op = Opening(pts[i1],
                     pts[i2],
                     thick,
                     dist,
                     bottom_height + 0.5 * height,
                     vertical,
                     window,
                     close=close)
        all_openings.append(op.ex)
        if op.close: all_closings.append(op.close)
Ejemplo n.º 2
0
def create_heat(i1,
                i2,
                dist=None,
                width=0.8,
                height=0.6,
                offset=0.05,
                box_thickness=0.05,
                bottom_height=0.2):
    create = False
    pts = data['points']
    for w in data['walls']:
        if (i1 in w) and (i2 in w):
            create = True
            break
    if create:
        if not dist:
            dist = 0.5 * distance(pts[i1], pts[i2])
        heat = rectangle(width, height)
        op = BoxOnWall(pts[i1], pts[i2], thick, box_thickness, offset, dist,
                       0.2 + 0.5 * height, vertical, heat)
        all_heats.append(op.ex)
Ejemplo n.º 3
0
for w in data['walls']:
    plt.plot([data['points'][w[i]][0] for i in range(2)],
             [data['points'][w[i]][1] for i in range(2)], 'r')

for pol in polylines:
    plt.plot([p[0] for p in pol], [p[1] for p in pol], 'k')
plt.axis('equal')
plt.show()

pts = data['points']
walls = data['walls']

height = 3.
vertical = Vector([0., 0., 1.])

window = rectangle(1.9, 5.8)

windows = []

all_openings = []
all_closings = []
all_heats = []


def create_window(i1,
                  i2,
                  dist=None,
                  width=1.,
                  height=1.2,
                  bottom_height=1.,
                  close=True):