Skip to content

Notebook 3 - Combine date

    The following small script is used to combine the previously gathered pass data into one coherent model. Using a few simple definitions to combine two lists our three passes are combined into a final file. After this notebook, we have complete files for the solar access, solar envelope and the voxelated model.


Flowchart

    The flowchart as shown in Figure 34 is in the first (purple) section of the fundamental flowchart as shown in the Planning - products.

Flowchart - Combine data
Figure 36: Flowchart - Combine data

Pseudo code

This is the Pseudo code for Notebook 3.

#Unpickle the solar data
unpickle each solar access pass and add them to seperate lists
unpickle each solar envelope pass and add them to seperate lists

import 'lattice_14_4_base_3_6.csv' a manualy edited 'lattice_14_4.csv' to hold 3.6 in shape
Create a normal reference lattice
Create a resolution enhanced reference lattice

define CombineData(list1, list2) as 
    for each voxel in list2
        if value != 2 (non existant voxels were set to 2)
            establish coordinates as [x, y, z, val]

    for each in coordinates
        list1[x][y][z] = val
    return list1

#Change any voxels left with val == 2 to an accepted 0.0
define TwotoZero(list) as
    for each voxel in list
        if value == 2
            value = 0
    return list

#Use definitions to combine the different passes
establish an envelope_final list as combination of all passes
establish an access_final list as combination of all passes

#Export final lists as lattices
export envelope_final to 'solar_envelope_complete_3_6.csv'
export access_final to 'solar_access_complete_3_6.csv'

#Combine the lattice print passes
define CombineLattice(base, pass) as
    for each voxel
        if pass == True
            base = True
    return base

Establish base list as enhanced reference full of false

#Import and combine each pass and export final
Import each lattice print pass and add to seperate lists
Establish final lattice as combination of each pass
Export final lattice to 'lattice_complete_3_6.csv'

Visualisations of the result

Voxelcloud

Final result - Combine data
Figure 37: Final result - Combine data

Last update: January 27, 2021