py4design.gmlparmpalette module¶
-
class
py4design.gmlparmpalette.
BaseParm
¶ Bases:
object
The base class for developing new parameters for parameterising a semantic model. For more information please refer to Chen, Kian Wee, Patrick Janssen, and Leslie Norford. 2017. Automatic Parameterisation of Semantic 3D City Models for Urban Design Optimisation. In Future Trajectories of Computation in Design, Proceedings of the 17th International Conference on Computer Aided Architectural Design Futures, pp 84 to 100. Istanbul, Turkey.
-
define_int_range
(start, stop, step)¶ The function defines the range of the parameter if the parameter type is integer.
Parameters: start : int
The starting number of the sequence.
stop : int
Generate numbers up to, including this number.
step : int
The difference between each number in the sequence.
Returns: parameter range : list of ints
List of generated parameters.
-
define_float_range
(start, stop, step=None)¶ The function defines the range of the parameter if the parameter type is float.
Parameters: start : float
The starting number of the sequence.
stop : float
Generate numbers up to, including this number.
step : float, optional
The difference between each number in the sequence, default = None. When None the parameter is a continuous parameter, if not None the parameter is a discrete parameter.
Returns: parameter range : list of floats
List of generated float parameters if step = None, if step != None the parameter range is made up of two numbers the start and the end of the continuous parameter.
-
set_parm_range
(parm_range)¶ The function defines the range of the parameter .
Parameters: parm_range : list of ints/floats
The parameter range.
-
define_nparameters
(pycitygml_reader)¶ The function determines the total parameters for parameterising the model.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
-
map_nrmlise_parms_2_parms
(nrmlised_parm_list)¶ The function maps the the normalise parameter list to the real parameter list.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: parameter list : list of int/floats
List of real parameters.
-
execute
(pycitygml_reader, parameters)¶ This funciton defines the parameterisation process and executes the process.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
parameters : list of ints/floats
The normalised parameters to be mapped to the real parameters defined, the parameters will be used to generate a design alternative.
-
-
class
py4design.gmlparmpalette.
BldgFlrAreaHeightParm
¶ Bases:
py4design.gmlparmpalette.BaseParm
An implementation of the BaseParm class for parameterising the massing of buildings (LOD1) in terms of its height while constraint by its floor area.
Attributes
bldg_class (str) The string of the gml code for building class. bldg_function (str) The string of the gml code for building function. bldg_usage (str) The string of the gml code for building usage. parm_range (list of floats/ints) The list of possible parameters. -
apply_2_bldg_class
(bldg_class)¶ This function declares the building class that will have this parameter, buildings which is not this class will not be parameterised.
Parameters: bldg_class : str
The string of the gml code for building class.
-
apply_2_bldg_function
(bldg_function)¶ This function declares the building function that will have this parameter, buildings which is not this function will not be parameterised.
Parameters: bldg_function : str
The string of the gml code for building function.
-
apply_2_bldg_usage
(bldg_usage)¶ This function declares the building usage that will have this parameter, buildings which is not this usage will not be parameterised.
Parameters: bldg_usage : str
The string of the gml code for building usage.
-
eligibility_test
(gml_bldg_list, pycitygml_reader)¶ The function checks which are the buildings that are eligible to be parameterised.
Parameters: gml_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: eligible_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
non_eligible_bldg_list : list of lxml.etree Element
The GML building that will not be parameterised.
-
define_int_range
(start, stop, step)¶ The function defines the range of the parameter if the parameter type is integer.
Parameters: start : int
The starting number of the sequence.
stop : int
Generate numbers up to, including this number.
step : int
The difference between each number in the sequence.
Returns: parameter range : list of ints
List of generated parameters.
-
define_float_range
(start, stop, step=None)¶ The function defines the range of the parameter if the parameter type is float.
Parameters: start : float
The starting number of the sequence.
stop : float
Generate numbers up to, including this number.
step : float, optional
The difference between each number in the sequence, default = None. When None the parameter is a continuous parameter, if not None the parameter is a discrete parameter.
Returns: parameter range : list of floats
List of generated float parameters if step = None, if step != None the parameter range is made up of two numbers the start and the end of the continuous parameter.
-
set_parm_range
(parm_range)¶ The function defines the range of the parameter .
Parameters: parm_range : list of ints/floats
The parameter range.
-
map_nrmlise_parms_2_parms
(nrmlised_parm_list)¶ The function maps the the normalise parameter list to the real parameter list.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: parameter list : list of int/floats
List of real parameters.
-
define_nparameters
(pycitygml_reader)¶ The function determines the total parameters for parameterising the model.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: nparameters : int
The number of parameters for the model.
-
execute
(pycitygml_reader, nrmlised_parm_list)¶ This funciton defines the parameterisation process and executes the process. A design alternative of the parametric model is returned.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
nrmlised_parm_list : list of ints/floats
The normalised parameters to be mapped to the real parameters defined, the parameters will be used to generate a design alternative.
Returns: new pycitygml_reader : pycitygml.Reader class instance
The new design alternative generated and documented as a CityGML model.
-
-
class
py4design.gmlparmpalette.
BldgHeightParm
¶ Bases:
py4design.gmlparmpalette.BaseParm
An implementation of the BaseParm class for parameterising the massing of buildings (LOD1) in terms of its height.
Attributes
bldg_class (str) The string of the gml code for building class. bldg_function (str) The string of the gml code for building function. bldg_usage (str) The string of the gml code for building usage. parm_range (list of floats/ints) The list of possible parameters. -
apply_2_bldg_class
(bldg_class)¶ This function declares the building class that will have this parameter, buildings which is not this class will not be parameterised.
Parameters: bldg_class : str
The string of the gml code for building class.
-
apply_2_bldg_function
(bldg_function)¶ This function declares the building function that will have this parameter, buildings which is not this function will not be parameterised.
Parameters: bldg_function : str
The string of the gml code for building function.
-
apply_2_bldg_usage
(bldg_usage)¶ This function declares the building usage that will have this parameter, buildings which is not this usage will not be parameterised.
Parameters: bldg_usage : str
The string of the gml code for building usage.
-
eligibility_test
(gml_bldg_list, pycitygml_reader)¶ The function checks which are the buildings that are eligible to be parameterised.
Parameters: gml_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: eligible_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
non_eligible_bldg_list : list of lxml.etree Element
The GML building that will not be parameterised.
-
define_int_range
(start, stop, step)¶ The function defines the range of the parameter if the parameter type is integer.
Parameters: start : int
The starting number of the sequence.
stop : int
Generate numbers up to, including this number.
step : int
The difference between each number in the sequence.
Returns: parameter range : list of ints
List of generated parameters.
-
define_float_range
(start, stop, step=None)¶ The function defines the range of the parameter if the parameter type is float.
Parameters: start : float
The starting number of the sequence.
stop : float
Generate numbers up to, including this number.
step : float, optional
The difference between each number in the sequence, default = None. When None the parameter is a continuous parameter, if not None the parameter is a discrete parameter.
Returns: parameter range : list of floats
List of generated float parameters if step = None, if step != None the parameter range is made up of two numbers the start and the end of the continuous parameter.
-
set_parm_range
(parm_range)¶ The function defines the range of the parameter .
Parameters: parm_range : list of ints/floats
The parameter range.
-
map_nrmlise_parms_2_parms
(nrmlised_parm_list)¶ The function maps the the normalise parameter list to the real parameter list.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: parameter list : list of int/floats
List of real parameters.
-
define_nparameters
(pycitygml_reader)¶ The function determines the total parameters for parameterising the model.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: nparameters : int
The number of parameters for the model.
-
execute
(pycitygml_reader, nrmlised_parm_list)¶ This funciton defines the parameterisation process and executes the process. A design alternative of the parametric model is returned.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
nrmlised_parm_list : list of ints/floats
The normalised parameters to be mapped to the real parameters defined, the parameters will be used to generate a design alternative.
Returns: new pycitygml_reader : pycitygml.Reader class instance
The new design alternative generated and documented as a CityGML model.
-
-
class
py4design.gmlparmpalette.
BldgOrientationParm
¶ Bases:
py4design.gmlparmpalette.BaseParm
An implementation of the BaseParm class for parameterising the massing of buildings (LOD1) in terms of its orientation.
Attributes
bldg_class (str) The string of the gml code for building class. bldg_function (str) The string of the gml code for building function. bldg_usage (str) The string of the gml code for building usage. parm_range (list of floats/ints) The list of possible parameters. clash_detection (bool) True or False, if True the design alternative is not allowed to clash with any other buildings, if clashes occur the original building is returned. boundary_detection (bool) True or False, if True the design alternative is not allowed to be outside the plot boundary, if outside the original building is returned. -
apply_2_bldg_class
(bldg_class)¶ This function declares the building class that will have this parameter, buildings which is not this class will not be parameterised.
Parameters: bldg_class : str
The string of the gml code for building class.
-
apply_2_bldg_function
(bldg_function)¶ This function declares the building function that will have this parameter, buildings which is not this function will not be parameterised.
Parameters: bldg_function : str
The string of the gml code for building function.
-
apply_2_bldg_usage
(bldg_usage)¶ This function declares the building usage that will have this parameter, buildings which is not this usage will not be parameterised.
Parameters: bldg_usage : str
The string of the gml code for building usage.
-
eligibility_test
(gml_bldg_list, pycitygml_reader)¶ The function checks which are the buildings that are eligible to be parameterised.
Parameters: gml_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: eligible_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
non_eligible_bldg_list : list of lxml.etree Element
The GML building that will not be parameterised.
-
set_clash_detection
(true_or_false)¶ The function declares the clash detection to be True or False.
Parameters: true_or_false : bool
True or False, if True the design alternative is not allowed to clash with any other buildings, if clashes occur the original building is returned.
-
set_boundary_detection
(true_or_false)¶ The function declares the boundary detection to be True or False.
Parameters: true_or_false : bool
True or False, if True the design alternative is not allowed to be outside the plot boundary, if outside the original building is returned.
-
define_int_range
(start, stop, step)¶ The function defines the range of the parameter if the parameter type is integer.
Parameters: start : int
The starting number of the sequence.
stop : int
Generate numbers up to, including this number.
step : int
The difference between each number in the sequence.
Returns: parameter range : list of ints
List of generated parameters.
-
define_float_range
(start, stop, step=None)¶ The function defines the range of the parameter if the parameter type is float.
Parameters: start : float
The starting number of the sequence.
stop : float
Generate numbers up to, including this number.
step : float, optional
The difference between each number in the sequence, default = None. When None the parameter is a continuous parameter, if not None the parameter is a discrete parameter.
Returns: parameter range : list of floats
List of generated float parameters if step = None, if step != None the parameter range is made up of two numbers the start and the end of the continuous parameter.
-
set_parm_range
(parm_range)¶ The function defines the range of the parameter .
Parameters: parm_range : list of ints/floats
The parameter range.
-
map_nrmlise_parms_2_parms
(nrmlised_parm_list)¶ The function maps the the normalise parameter list to the real parameter list.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: parameter list : list of int/floats
List of real parameters.
-
define_nparameters
(pycitygml_reader)¶ The function determines the total parameters for parameterising the model.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: nparameters : int
The number of parameters for the model.
-
execute
(pycitygml_reader, nrmlised_parm_list)¶ This funciton defines the parameterisation process and executes the process. A design alternative of the parametric model is returned.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
nrmlised_parm_list : list of ints/floats
The normalised parameters to be mapped to the real parameters defined, the parameters will be used to generate a design alternative.
Returns: new pycitygml_reader : pycitygml.Reader class instance
The new design alternative generated and documented as a CityGML model.
-
-
class
py4design.gmlparmpalette.
BldgPositionParm
¶ Bases:
py4design.gmlparmpalette.BaseParm
An implementation of the BaseParm class for parameterising the massing of buildings (LOD1) in terms of its position.
Attributes
bldg_class (str) The string of the gml code for building class. bldg_function (str) The string of the gml code for building function. bldg_usage (str) The string of the gml code for building usage. parm_range (list of floats/ints) The list of possible parameters. clash_detection (bool) True or False, if True the design alternative is not allowed to clash with any other buildings, if clashes occur the original building is returned. boundary_detection (bool) True or False, if True the design alternative is not allowed to be outside the plot boundary, if outside the original building is returned. xdim (int) The x-dimension of the gridded plot. The higher the dimension the more positions there are for the building. ydim (int) The y-dimension of the gridded plot. The higher the dimension the more positions there are for the building. -
apply_2_bldg_class
(bldg_class)¶ This function declares the building class that will have this parameter, buildings which is not this class will not be parameterised.
Parameters: bldg_class : str
The string of the gml code for building class.
-
apply_2_bldg_function
(bldg_function)¶ This function declares the building function that will have this parameter, buildings which is not this function will not be parameterised.
Parameters: bldg_function : str
The string of the gml code for building function.
-
apply_2_bldg_usage
(bldg_usage)¶ This function declares the building usage that will have this parameter, buildings which is not this usage will not be parameterised.
Parameters: bldg_usage : str
The string of the gml code for building usage.
-
eligibility_test
(gml_bldg_list, pycitygml_reader)¶ The function checks which are the buildings that are eligible to be parameterised.
Parameters: gml_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: eligible_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
non_eligible_bldg_list : list of lxml.etree Element
The GML building that will not be parameterised.
-
set_clash_detection
(true_or_false)¶ The function declares the clash detection to be True or False.
Parameters: true_or_false : bool
True or False, if True the design alternative is not allowed to clash with any other buildings, if clashes occur the original building is returned.
-
set_boundary_detection
(true_or_false)¶ The function declares the boundary detection to be True or False.
Parameters: true_or_false : bool
True or False, if True the design alternative is not allowed to be outside the plot boundary, if outside the original building is returned.
-
set_xdim_ydim
(xdim, ydim)¶ The function sets the xdim and ydim of the gridded plot the building is on.
Parameters: xdim : int
The x-dimension of the gridded plot. The higher the dimension the more positions there are for the building.
ydim : int
The y-dimension of the gridded plot. The higher the dimension the more positions there are for the building.
-
define_int_range
(start, stop, step)¶ The function defines the range of the parameter if the parameter type is integer.
Parameters: start : int
The starting number of the sequence.
stop : int
Generate numbers up to, including this number.
step : int
The difference between each number in the sequence.
Returns: parameter range : list of ints
List of generated parameters.
-
define_float_range
(start, stop, step=None)¶ The function defines the range of the parameter if the parameter type is float.
Parameters: start : float
The starting number of the sequence.
stop : float
Generate numbers up to, including this number.
step : float, optional
The difference between each number in the sequence, default = None. When None the parameter is a continuous parameter, if not None the parameter is a discrete parameter.
Returns: parameter range : list of floats
List of generated float parameters if step = None, if step != None the parameter range is made up of two numbers the start and the end of the continuous parameter.
-
set_parm_range
(parm_range)¶ The function defines the range of the parameter .
Parameters: parm_range : list of ints/floats
The parameter range.
-
map_nrmlise_parms_2_parms
(nrmlised_parm_list)¶ The function maps the the normalise parameter list to the real parameter list.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: parameter list : list of int/floats
List of real parameters.
-
define_nparameters
(pycitygml_reader)¶ The function determines the total parameters for parameterising the model.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: nparameters : int
The number of parameters for the model.
-
execute
(pycitygml_reader, nrmlised_parm_list)¶ This funciton defines the parameterisation process and executes the process. A design alternative of the parametric model is returned.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
nrmlised_parm_list : list of ints/floats
The normalised parameters to be mapped to the real parameters defined, the parameters will be used to generate a design alternative.
Returns: new pycitygml_reader : pycitygml.Reader class instance
The new design alternative generated and documented as a CityGML model.
-
-
class
py4design.gmlparmpalette.
BldgTwistParm
¶ Bases:
py4design.gmlparmpalette.BaseParm
An implementation of the BaseParm class for parameterising the massing of buildings (LOD1) in terms of its geometry. This parameter will gradually twist the building solid according to the twist parameter.
Attributes
bldg_class (str) The string of the gml code for building class. bldg_function (str) The string of the gml code for building function. bldg_usage (str) The string of the gml code for building usage. parm_range (list of floats/ints) The list of possible parameters. flr2flr_height (float) The assumed floor to floor height of the building, default = 3m. -
define_flr2flr_height
(flr2flr_height)¶ The function define the floor to floor height of the buildings to be parameterised.
Parameters: flr2flr_height : float
The assumed floor to floor height of the building.
-
apply_2_bldg_class
(bldg_class)¶ This function declares the building class that will have this parameter, buildings which is not this class will not be parameterised.
Parameters: bldg_class : str
The string of the gml code for building class.
-
apply_2_bldg_function
(bldg_function)¶ This function declares the building function that will have this parameter, buildings which is not this function will not be parameterised.
Parameters: bldg_function : str
The string of the gml code for building function.
-
apply_2_bldg_usage
(bldg_usage)¶ This function declares the building usage that will have this parameter, buildings which is not this usage will not be parameterised.
Parameters: bldg_usage : str
The string of the gml code for building usage.
-
eligibility_test
(gml_bldg_list, pycitygml_reader)¶ The function checks which are the buildings that are eligible to be parameterised.
Parameters: gml_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: eligible_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
non_eligible_bldg_list : list of lxml.etree Element
The GML building that will not be parameterised.
-
define_int_range
(start, stop, step)¶ The function defines the range of the parameter if the parameter type is integer.
Parameters: start : int
The starting number of the sequence.
stop : int
Generate numbers up to, including this number.
step : int
The difference between each number in the sequence.
Returns: parameter range : list of ints
List of generated parameters.
-
define_float_range
(start, stop, step=None)¶ The function defines the range of the parameter if the parameter type is float.
Parameters: start : float
The starting number of the sequence.
stop : float
Generate numbers up to, including this number.
step : float, optional
The difference between each number in the sequence, default = None. When None the parameter is a continuous parameter, if not None the parameter is a discrete parameter.
Returns: parameter range : list of floats
List of generated float parameters if step = None, if step != None the parameter range is made up of two numbers the start and the end of the continuous parameter.
-
set_parm_range
(parm_range)¶ The function defines the range of the parameter .
Parameters: parm_range : list of ints/floats
The parameter range.
-
map_nrmlise_parms_2_parms
(nrmlised_parm_list)¶ The function maps the the normalise parameter list to the real parameter list.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: parameter list : list of int/floats
List of real parameters.
-
define_nparameters
(pycitygml_reader)¶ The function determines the total parameters for parameterising the model.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: nparameters : int
The number of parameters for the model.
-
execute
(pycitygml_reader, nrmlised_parm_list)¶ This funciton defines the parameterisation process and executes the process. A design alternative of the parametric model is returned.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
nrmlised_parm_list : list of ints/floats
The normalised parameters to be mapped to the real parameters defined, the parameters will be used to generate a design alternative.
Returns: new pycitygml_reader : pycitygml.Reader class instance
The new design alternative generated and documented as a CityGML model.
-
-
class
py4design.gmlparmpalette.
BldgBendParm
¶ Bases:
py4design.gmlparmpalette.BaseParm
An implementation of the BaseParm class for parameterising the massing of buildings (LOD1) in terms of its geometry. This parameter will gradually bend the building solid according to the parameter.
Attributes
bldg_class (str) The string of the gml code for building class. bldg_function (str) The string of the gml code for building function. bldg_usage (str) The string of the gml code for building usage. parm_range (list of floats/ints) The list of possible parameters. flr2flr_height (float) The assumed floor to floor height of the building, default = 3m. -
define_flr2flr_height
(flr2flr_height)¶ The function define the floor to floor height of the buildings to be parameterised.
Parameters: flr2flr_height : float
The assumed floor to floor height of the building.
-
apply_2_bldg_class
(bldg_class)¶ This function declares the building class that will have this parameter, buildings which is not this class will not be parameterised.
Parameters: bldg_class : str
The string of the gml code for building class.
-
apply_2_bldg_function
(bldg_function)¶ This function declares the building function that will have this parameter, buildings which is not this function will not be parameterised.
Parameters: bldg_function : str
The string of the gml code for building function.
-
apply_2_bldg_usage
(bldg_usage)¶ This function declares the building usage that will have this parameter, buildings which is not this usage will not be parameterised.
Parameters: bldg_usage : str
The string of the gml code for building usage.
-
eligibility_test
(gml_bldg_list, pycitygml_reader)¶ The function checks which are the buildings that are eligible to be parameterised.
Parameters: gml_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: eligible_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
non_eligible_bldg_list : list of lxml.etree Element
The GML building that will not be parameterised.
-
define_int_range
(start, stop, step)¶ The function defines the range of the parameter if the parameter type is integer.
Parameters: start : int
The starting number of the sequence.
stop : int
Generate numbers up to, including this number.
step : int
The difference between each number in the sequence.
Returns: parameter range : list of ints
List of generated parameters.
-
define_float_range
(start, stop, step=None)¶ The function defines the range of the parameter if the parameter type is float.
Parameters: start : float
The starting number of the sequence.
stop : float
Generate numbers up to, including this number.
step : float, optional
The difference between each number in the sequence, default = None. When None the parameter is a continuous parameter, if not None the parameter is a discrete parameter.
Returns: parameter range : list of floats
List of generated float parameters if step = None, if step != None the parameter range is made up of two numbers the start and the end of the continuous parameter.
-
set_parm_range
(parm_range)¶ The function defines the range of the parameter .
Parameters: parm_range : list of ints/floats
The parameter range.
-
map_nrmlise_parms_2_parms
(nrmlised_parm_list)¶ The function maps the the normalise parameter list to the real parameter list.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: parameter list : list of int/floats
List of real parameters.
-
define_nparameters
(pycitygml_reader)¶ The function determines the total parameters for parameterising the model.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: nparameters : int
The number of parameters for the model.
-
execute
(pycitygml_reader, nrmlised_parm_list)¶ This funciton defines the parameterisation process and executes the process. A design alternative of the parametric model is returned.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
nrmlised_parm_list : list of ints/floats
The normalised parameters to be mapped to the real parameters defined, the parameters will be used to generate a design alternative.
Returns: new pycitygml_reader : pycitygml.Reader class instance
The new design alternative generated and documented as a CityGML model.
-
-
class
py4design.gmlparmpalette.
BldgSlantParm
¶ Bases:
py4design.gmlparmpalette.BaseParm
An implementation of the BaseParm class for parameterising the massing of buildings (LOD1) in terms of its geometry. This parameter will gradually slant the building solid according to the parameter.
Attributes
bldg_class (str) The string of the gml code for building class. bldg_function (str) The string of the gml code for building function. bldg_usage (str) The string of the gml code for building usage. parm_range (list of floats/ints) The list of possible parameters. flr2flr_height (float) The assumed floor to floor height of the building, default = 3m. -
define_flr2flr_height
(flr2flr_height)¶ The function define the floor to floor height of the buildings to be parameterised.
Parameters: flr2flr_height : float
The assumed floor to floor height of the building.
-
apply_2_bldg_class
(bldg_class)¶ This function declares the building class that will have this parameter, buildings which is not this class will not be parameterised.
Parameters: bldg_class : str
The string of the gml code for building class.
-
apply_2_bldg_function
(bldg_function)¶ This function declares the building function that will have this parameter, buildings which is not this function will not be parameterised.
Parameters: bldg_function : str
The string of the gml code for building function.
-
apply_2_bldg_usage
(bldg_usage)¶ This function declares the building usage that will have this parameter, buildings which is not this usage will not be parameterised.
Parameters: bldg_usage : str
The string of the gml code for building usage.
-
eligibility_test
(gml_bldg_list, pycitygml_reader)¶ The function checks which are the buildings that are eligible to be parameterised.
Parameters: gml_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: eligible_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
non_eligible_bldg_list : list of lxml.etree Element
The GML building that will not be parameterised.
-
define_int_range
(start, stop, step)¶ The function defines the range of the parameter if the parameter type is integer.
Parameters: start : int
The starting number of the sequence.
stop : int
Generate numbers up to, including this number.
step : int
The difference between each number in the sequence.
Returns: parameter range : list of ints
List of generated parameters.
-
define_float_range
(start, stop, step=None)¶ The function defines the range of the parameter if the parameter type is float.
Parameters: start : float
The starting number of the sequence.
stop : float
Generate numbers up to, including this number.
step : float, optional
The difference between each number in the sequence, default = None. When None the parameter is a continuous parameter, if not None the parameter is a discrete parameter.
Returns: parameter range : list of floats
List of generated float parameters if step = None, if step != None the parameter range is made up of two numbers the start and the end of the continuous parameter.
-
set_parm_range
(parm_range)¶ The function defines the range of the parameter .
Parameters: parm_range : list of ints/floats
The parameter range.
-
map_nrmlise_parms_2_parms
(nrmlised_parm_list)¶ The function maps the the normalise parameter list to the real parameter list.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: parameter list : list of int/floats
List of real parameters.
-
define_nparameters
(pycitygml_reader)¶ The function determines the total parameters for parameterising the model.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: nparameters : int
The number of parameters for the model.
-
execute
(pycitygml_reader, nrmlised_parm_list)¶ This funciton defines the parameterisation process and executes the process. A design alternative of the parametric model is returned.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
nrmlised_parm_list : list of ints/floats
The normalised parameters to be mapped to the real parameters defined, the parameters will be used to generate a design alternative.
Returns: new pycitygml_reader : pycitygml.Reader class instance
The new design alternative generated and documented as a CityGML model.
-
-
class
py4design.gmlparmpalette.
BldgTaperParm
¶ Bases:
py4design.gmlparmpalette.BaseParm
An implementation of the BaseParm class for parameterising the massing of buildings (LOD1) in terms of its geometry. This parameter will gradually taper the building solid according to the parameter.
Attributes
bldg_class (str) The string of the gml code for building class. bldg_function (str) The string of the gml code for building function. bldg_usage (str) The string of the gml code for building usage. parm_range (list of floats/ints) The list of possible parameters. flr2flr_height (float) The assumed floor to floor height of the building, default = 3m. -
define_flr2flr_height
(flr2flr_height)¶ The function define the floor to floor height of the buildings to be parameterised.
Parameters: flr2flr_height : float
The assumed floor to floor height of the building.
-
apply_2_bldg_class
(bldg_class)¶ This function declares the building class that will have this parameter, buildings which is not this class will not be parameterised.
Parameters: bldg_class : str
The string of the gml code for building class.
-
apply_2_bldg_function
(bldg_function)¶ This function declares the building function that will have this parameter, buildings which is not this function will not be parameterised.
Parameters: bldg_function : str
The string of the gml code for building function.
-
apply_2_bldg_usage
(bldg_usage)¶ This function declares the building usage that will have this parameter, buildings which is not this usage will not be parameterised.
Parameters: bldg_usage : str
The string of the gml code for building usage.
-
eligibility_test
(gml_bldg_list, pycitygml_reader)¶ The function checks which are the buildings that are eligible to be parameterised.
Parameters: gml_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: eligible_bldg_list : list of lxml.etree Element
The GML building to be parameterised.
non_eligible_bldg_list : list of lxml.etree Element
The GML building that will not be parameterised.
-
define_int_range
(start, stop, step)¶ The function defines the range of the parameter if the parameter type is integer.
Parameters: start : int
The starting number of the sequence.
stop : int
Generate numbers up to, including this number.
step : int
The difference between each number in the sequence.
Returns: parameter range : list of ints
List of generated parameters.
-
define_float_range
(start, stop, step=None)¶ The function defines the range of the parameter if the parameter type is float.
Parameters: start : float
The starting number of the sequence.
stop : float
Generate numbers up to, including this number.
step : float, optional
The difference between each number in the sequence, default = None. When None the parameter is a continuous parameter, if not None the parameter is a discrete parameter.
Returns: parameter range : list of floats
List of generated float parameters if step = None, if step != None the parameter range is made up of two numbers the start and the end of the continuous parameter.
-
set_parm_range
(parm_range)¶ The function defines the range of the parameter .
Parameters: parm_range : list of ints/floats
The parameter range.
-
map_nrmlise_parms_2_parms
(nrmlised_parm_list)¶ The function maps the the normalise parameter list to the real parameter list.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: parameter list : list of int/floats
List of real parameters.
-
define_nparameters
(pycitygml_reader)¶ The function determines the total parameters for parameterising the model.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
Returns: nparameters : int
The number of parameters for the model.
-
execute
(pycitygml_reader, nrmlised_parm_list)¶ This funciton defines the parameterisation process and executes the process. A design alternative of the parametric model is returned.
Parameters: pycitygml_reader : pycitygml.Reader class instance
The reader to read the CityGML file to be parameterised.
nrmlised_parm_list : list of ints/floats
The normalised parameters to be mapped to the real parameters defined, the parameters will be used to generate a design alternative.
Returns: new pycitygml_reader : pycitygml.Reader class instance
The new design alternative generated and documented as a CityGML model.
-