Skip to main content

core.model_obj

MaterialAssignment Objects

class MaterialAssignment(dict)

__init__

def __init__(layer_name: str,
material: MaterialDto,
scattering_coefficient: float = None)

Represents a layer material assignment.

Arguments:

  • layer_name (str): Name of layer to assign material to.
  • material (MaterialDto): Material to assign to layer.

ModelObj Objects

class ModelObj()

download_model

def download_model(destination_directory: str) -> str

Download model to destination file.

Arguments:

  • destination_directory (str): Directory to download to.

Returns:

str: Path to downloaded file.

download_gcs_results_json

def download_gcs_results_json(destination_file: str) -> bool

Download result json from Geometry Checking Service.

Arguments:

  • destination_file (str): Filepath to download to.

Returns:

bool: True if it was able to download the file.

calculate_sabine_estimate

def calculate_sabine_estimate(material_assignments: List[Union[
MaterialAssignment, MaterialAssignmentDto]],
model_volume: float = None) -> List[float]

Calculates the sabine estimate of the reverberation time based on layer material assignment.

Arguments:

  • material_assignment (List[MaterialAssignment|MaterialAssignmentDto]): Layer material assignment for model to calculate the estimate on.
  • model_volume (float): Optional, If no model volume is input the model volume will be computed from the input objects. If a geometry without a closed shell is input the model_volume has to be specified.

Returns:

List[float]: List of the sabine estimated RT for each frequency range valid for materials (63, 125, 250, 500, 1k, 2k, 4k, 8k).

plot

def plot()

Uses the plot module to plot the model.

as_tree

def as_tree()

Uses the display_data module to model object info as tree.

as_live_model_status

def as_live_model_status()

Uses the display_data module to show model status automatically updated until model has been processed