Table Of Contents

Previous topic

4.2. bdsite Package

Next topic

4.4. bdmark Package

This Page

4.3. bdlevel Package

4.3.1. bdlevel Package

__init__.py Initialization file for the BDLevel package.

BDLevel Resources for managing Buildes levels.

moduleauthor:Kene Meniru <Kene.Meniru@illom.org>

This is a description of what the following modules do. This information is important to understand the structure and relationship between the various parts of buildes.

  • levelmanager
  • leveldata

The levelmanager module provides objects used in the buildes module and the buildesapp object to create the leveldata object.

4.3.2. leveldata Module

leveldata

Provides objects that create and manage building level data in buildes.

moduleauthor:Kene Meniru <Kene.Meniru@illom.org>
class bdlevel.leveldata.LevelData

Bases: buildesdata.BuildesData

Creates and manages building level data.

../_images/leveldata.png
add_group(name)

Add a group name to the list of groups for level.

This is acceptable only if name is not already a saved group id.

Parameter:name (String) – Name of a group
Returns:Whether adding the named group was successful
Return type:Boolean
get_groups()

Retrieves group names owned by this level object.

Returns:Names of group objects.
Return type:List

4.3.3. levelmanager Module

Level Control

Provides the objects that control the process of creating levels in Buildes.

moduleauthor:Kene Meniru <Kene.Meniru@illom.org>
class bdlevel.levelmanager.Level(app)

Bases: buildesmanager.BuildesManager

Control class for leveldata objects.

../_images/level.png
current
Get active_level object
find_newest_level()

Finds the newest level created.

Returns:Newest level object.
Return type:SiteData
get_active_level()
Get active_level object
get_parent_group(name, level)

Get named object parent from list of groups in provided level obj

Parameters:
  • name
  • level
Returns:

Name of parent for named mark

Return type:

String

level_base_elev()

Finds the base elevation for the current level.

Returns:Current level base elevation
Return type:Float
level_top_elev()

Finds the top elevation for the current level.

Returns:Current level top elevation
Return type:Float
make_common_data(data)

Perform common functions for all data objects

Parameter:data
make_data(name=None, height=0)

Creates a new LevelData object.

Parameters:
  • name (String) – Name of level data object.
  • height (Float) – Height of level data object
Returns:

A new level data object

Return type:

LevelData

make_message(data=None)

Compile basic information about data.

Parameter:data
make_shape(data)

Make shape for pyOCC

If there is at least one space in the level, then attempt to make the shape otherwise just compile information about the site.

Parameter:data (BuildsData) – Data object for making shape
marks_group_name(num)

Formulates name for grouping object for marks

Parameter:num (Integer) – Level number
Returns:Name of grouping object for Marks in the level
Return type:String
select_level(name=None)

Select named level as current.

Parameter:name (String) – Level name
set_active_level(value)
Set active_level object
summary_parts(obj)

Summarized parts message.

Parameter:obj (BuildesData) – Object for which to create summary message.
Returns:Formatted text for predetermined cells in the spreadsheet
Return type:SpreadSheet
summary_relations(obj)

Summarized relations message.

For example, level object should have number of contained spaces. Use this to implement parametrics in Buildes.

Parameter:obj (BuildesData) – Object for which to create summary message.
Returns:Formatted text for predetermined cells in the spreadsheet
Return type:SpreadSheet