py4design.gml3dmodel module

py4design.gml3dmodel.citygml2collada(citygml_filepath, collada_filepath)

This function convert a CityGML to Collada. Currently only works with LOD1 buildings, landuses and terrain. LOD0 transportation network.

Parameters:

citygml_filepath : str

The file path of the CityGML file.

collada_filepath : str

The file path of the Collada file.

py4design.gml3dmodel.get_building_footprint(gml_bldg, citygml_reader)

This function gets the footprint of a building.

Parameters:

gml_bldg : lxml.etree Element

The GML building to be analysed.

citygml_reader : Pycitygml.Reader() class instance

The reader is used to extract information from the GML building.

Returns:

footprints : list of OCCfaces

List of OCCfaces identified as footprints.

py4design.gml3dmodel.get_building_occsolid(gml_bldg, citygml_reader)

This function gets the geometry of a building.

Parameters:

gml_bldg : lxml.etree Element

The GML building to be analysed.

citygml_reader : Pycitygml.Reader() class instance

The reader is used to extract information from the GML building.

Returns:

building solid : OCCsolid

The geometry (OCCsolid) of the building.

py4design.gml3dmodel.get_building_height_storey(gml_bldg, citygml_reader, flr2flr_height=3)

This function gets the height, number of storeys and storey height of a building.

Parameters:

gml_bldg : lxml.etree Element

The GML building to be analysed.

citygml_reader : Pycitygml.Reader() class instance

The reader is used to extract information from the GML building.

flr2flr_height : float, optional

The floor to floor height of the building, Default = 3.

Returns:

height : float

The building height.

storey : int

The the number of storeys of the building.

storey height : float

The floor to floor height of the building.

py4design.gml3dmodel.get_bulding_floor_area(gml_bldg, nstorey, storey_height, citygml_reader)

This function gets the floor area of a building.

Parameters:

gml_bldg : lxml.etree Element

The GML building to be analysed.

nstorey : int

The the number of storeys of the building.

storey height : float

The floor to floor height of the building.

citygml_reader : Pycitygml.Reader() class instance

The reader is used to extract information from the GML building.

Returns:

height : float

The floor area of the building.

floor plates : list of OCCfaces

The list of floor plates of the buildings.

py4design.gml3dmodel.rotate_bldg(gml_bldg, rot_angle, citygml_reader)

This function rotates the building.

Parameters:

gml_bldg : lxml.etree Element

The GML building to be analysed.

rot_angle : float

The the angle of rotation.

citygml_reader : Pycitygml.Reader() class instance

The reader is used to extract information from the GML building.

Returns:

rotated building : OCCsolid

The rotated building OCCsolid.

py4design.gml3dmodel.update_gml_building(orgin_gml_building, new_bldg_occsolid, citygml_reader, citygml_writer, new_height=None, new_nstorey=None)

This function updates the information of the GML building.

Parameters:

gml_bldg : lxml.etree Element

The GML building to be updated.

new_bldg_occsolid building : OCCsolid

The new geometry of the building. The update is based on this geometry.

citygml_reader : Pycitygml.Reader() class instance

The reader is used to extract information from the GML building.

citygml_writer : Pycitygml.Writer() class instance

The writer is used to write information to the GML building.

new_height : float, optional

The new building height, Default = None.

new_nstorey : int, optional

The new number of storeys of the building, Default = None.

py4design.gml3dmodel.write_non_eligible_bldgs(gml_bldgs, citygml_writer)

This function updates the information of the GML building.

Parameters:

gml_bldgs : list of lxml.etree Element

The GML building to be updated.

citygml_writer : Pycitygml.Writer() class instance

The writer is used to write information to the GML building.

py4design.gml3dmodel.gml_landuse_2_occface(gml_landuse, citygml_reader)

This function gets the geometry from the landuse and converts it to an OCCface.

Parameters:

gml_landuse : lxml.etree Element

The GML landuse to be analysed.

citygml_reader : Pycitygml.Reader() class instance

The reader is used to extract information from the GML building.

Returns:

landuse geometry : OCCface

The landuse OCCface.

py4design.gml3dmodel.buildings_on_landuse(gml_landuse, gml_bldg_list, citygml_reader)

This function identify the GML buildings that is on this GML landuse plot.

Parameters:

gml_landuse : lxml.etree Element

The GML landuse to be analysed.

gml_bldg_list : list of lxml.etree Element

The GML building to be identified.

citygml_reader : Pycitygml.Reader() class instance

The reader is used to extract information from the GML building.

Returns:

buildings on plot : list of lxml.etree Element

The GML building that are on the plot.

py4design.gml3dmodel.write_citygml(cityobjmembers, citygml_writer)

This function identify the GML buildings that is on this GML landuse plot.

Parameters:

cityobjmembers : list of lxml.etree Element

The GML cityobjectmembers to be written.

citygml_writer : Pycitygml.Writer() class instance

The writer is used to write information to the GML building.

py4design.gml3dmodel.write_a_gml_srf_member(occface)

This function writes a OCCface to GML surface member.

Parameters:

occface : OCCface

OCCface to be written.

Returns:

surface : pycitygml.SurfaceMember class instance

The written surface.

py4design.gml3dmodel.write_gml_srf_member(occface_list)

This function writes a OCCface to GML surface member.

Parameters:

occface_list : list of OCCfaces

List of OCCface to be written.

Returns:

list of surface : list of pycitygml.SurfaceMember class instances

The written list of surfaces.

py4design.gml3dmodel.write_gml_triangle(occface_list)

This function writes a OCCface to GML triangle.

Parameters:

occface_list : list of OCCfaces

List of OCCface to be written.

Returns:

list of surface : list of pycitygml.SurfaceMember class instances

The written list of surfaces.

py4design.gml3dmodel.write_gml_linestring(occedge)

This function writes a OCCedge to GML linestring.

Parameters:

occedge : OCCedge

OCCedge to be written.

Returns:

edge : pycitygml.LineString class instance

The written edge.