procedural_city_generation.additional_stuff package

Submodules

procedural_city_generation.additional_stuff.IOHelper module

class procedural_city_generation.additional_stuff.IOHelper.StdoutRedirector(label_obj, pyQt_app=None)

Bases: object

Redirects all “print” outputs from Terminal into the Qt window that is given in constructor.

flush()
write(out)

Method to be called by sys.stdout when text is written by print.

out : String
Text to be printed

procedural_city_generation.additional_stuff.LinalgTools module

class procedural_city_generation.additional_stuff.LinalgTools.LinalgTools(floor, polygons)

Bases: object

shrinkwrap()
triangulate()

procedural_city_generation.additional_stuff.Param module

class procedural_city_generation.additional_stuff.Param.Param(name, default, value, description, value_type, value_lower_bound=None, value_upper_bound=None)

Bases: object

Parameter Object used for storing input variables for each of the submodules

setValue(val)

Validates User Parameters and prints errors or warnings when not correct

val: eval()’d value of parameter as input

procedural_city_generation.additional_stuff.Param.jsonFromParams(path, params_list)

Writes parameters to JSON format

path String path to where the JSON should be saved params_list List of procedural_city_generation.additional_stuff.Param objects

procedural_city_generation.additional_stuff.Param.paramsFromJson(path)

Reads JSON file and produces list of Param objects

path : String path to JSON file

parameters : List<procedural_city_generation.additional_stuff.Param>

procedural_city_generation.additional_stuff.Singleton module

class procedural_city_generation.additional_stuff.Singleton.Singleton(modulename=None)

Singleton Object which can only have one instance. Is instanciated with a modulename, e.g. “roadmap”, and reads the corresponding “roadmap.conf” in procedural_city_generation/inputs. All attributes are mutable, however this class should mainly be used for immutable numeric values to avoid confusion/difficult-to-trace-bugs.

instance = None
kill()

Deletes the Singleton’s instance

procedural_city_generation.additional_stuff.Wavefront module

class procedural_city_generation.additional_stuff.Wavefront.Wavefront(textures, polygon3ds, outpath='/outputs/')

Bases: object

writeMtllib()
writeObj()

procedural_city_generation.additional_stuff.clean_tools module

procedural_city_generation.additional_stuff.clean_tools.add_license_text(files)
procedural_city_generation.additional_stuff.clean_tools.clean_pyc_files(path)
procedural_city_generation.additional_stuff.clean_tools.find_imports(path)
procedural_city_generation.additional_stuff.clean_tools.find_in_text(path, tofind='TODO')

Searches the entire source code in the path for tofind. Useful for finding TODOS or missing translations. Like grep, nobody knows why this function was built. Prints filename, line number and line for each occurence.

path : String
path in which all files are searched for tofind
tofind : String
String which is supposed to be found in source.
procedural_city_generation.additional_stuff.clean_tools.find_readable_files(path, suffixes=['.py', '.conf'])
procedural_city_generation.additional_stuff.clean_tools.listfiles(path)

procedural_city_generation.additional_stuff.pickletools module

procedural_city_generation.additional_stuff.pickletools.reconstruct(path)
procedural_city_generation.additional_stuff.pickletools.save_vertexlist(vertex_list, name='output', savefig=0)

procedural_city_generation.additional_stuff.randommap module

procedural_city_generation.additional_stuff.randommap.findarea(arr, start, lower, upper, done)
procedural_city_generation.additional_stuff.randommap.getwatermap(arr, waterheight)
procedural_city_generation.additional_stuff.randommap.main(border, path)
procedural_city_generation.additional_stuff.randommap.randommap(rows, cols)

terribly coded random-height-map generator, takes # of rows and cols as input as well as the minimum and maximum height for starting the randomization

procedural_city_generation.additional_stuff.readimages module

procedural_city_generation.additional_stuff.readimages.main()

Deprecated. Was used at lange nacht der Wissenschaften to read images and highlight the way they impact the creation of the Strassennetz

procedural_city_generation.additional_stuff.rotate module

procedural_city_generation.additional_stuff.rotate.rotate(angle, vector)

Rotates a 2D Vector.

angle : float
Angle in which the Vector is rotated in mathematically-positive direction
vector : np.array(2, )
Vector to be rotated

Module contents