openworld_radio_twin.simulation.scene_builder#

Functions

build_scene_assets(directory, buildings, ...)

geographic_to_local(longitude, latitude, ...)

load_environment_assets(directory)

Reconstruct the solver environment from a persisted scene asset directory.

load_scene_assets(directory)

Restore the scene metadata needed by geographic and derived-asset helpers.

localize_buildings(buildings, ...[, environment])

measurement_surface_path(assets, ...)

Return the stable shared path for one receiver-grid definition.

rasterize_local_footprint(building, ...)

rasterize_receiver_slice(buildings, ...[, ...])

Rasterize the north-up receiver plane used by exports and the web API.

terrain_elevation(assets, east_m, north_m)

Return compiled triangle elevation in the scene's local ENU frame.

transmitter_scene_position(assets, ...)

Convert a geographic TX position with AGL height to Sionna scene coordinates.

triangulate_polygon(points)

Triangulate a simple polygon while retaining the legacy public helper.

write_binary_ply(path, mesh)

write_measurement_surface(path, assets, ...)

write_voxel_assets(assets, receiver_height_m)

Write the sparse solid voxels and north-up receiver-height slice.

Classes

BuildingMeshAssets(index, feature_id, ...)

LocalBuilding(feature_id, exterior, holes, ...)

MeasurementSurfaceAssets(path, cell_shape, ...)

Mesh(vertices, faces)

Triangle mesh as Python lists or as (n, 3) NumPy arrays; both serialize alike.

SceneAssets(directory, scene_xml_path, ...)

VoxelAssets(directory, voxel_path, ...)

class openworld_radio_twin.simulation.scene_builder.Mesh(vertices, faces)[source]#

Bases: object

Triangle mesh as Python lists or as (n, 3) NumPy arrays; both serialize alike.

vertices: list[tuple[float, float, float]] | ndarray#
faces: list[tuple[int, int, int]] | ndarray#
classmethod empty()[source]#
Return type:

Mesh

class openworld_radio_twin.simulation.scene_builder.LocalBuilding(feature_id, exterior, holes, minimum_height_m, vertical_extent_m, terrain_anchor_m=0.0, anchor_surface_class=SurfaceClass.GROUND, native_vertices=(), native_triangles=(), native_surface_types=(), source_lod=None, source_vertical_datum=None, source_ground_elevation_m=None, parent_reference_elevation_m=None, parent_building_id=None, placement_rule='footprint_extrusion')[source]#

Bases: object

feature_id: str#
exterior: tuple[tuple[float, float], ...]#
holes: tuple[tuple[tuple[float, float], ...], ...]#
minimum_height_m: float#
vertical_extent_m: float#
terrain_anchor_m: float = 0.0#
anchor_surface_class: SurfaceClass = 0#
native_vertices: tuple[tuple[float, float, float], ...] = ()#
native_triangles: tuple[tuple[int, int, int], ...] = ()#
native_surface_types: tuple[str, ...] = ()#
source_lod: str | None = None#
source_vertical_datum: str | None = None#
source_ground_elevation_m: float | None = None#
parent_reference_elevation_m: float | None = None#
parent_building_id: str | None = None#
placement_rule: str = 'footprint_extrusion'#
property roof_height_m: float#
property scene_minimum_height_m: float#
property scene_roof_height_m: float#
openworld_radio_twin.simulation.scene_builder.localize_buildings(buildings, origin_longitude, origin_latitude, environment=None)[source]#
Return type:

tuple[LocalBuilding, ...]

class openworld_radio_twin.simulation.scene_builder.BuildingMeshAssets(index, feature_id, rooftop_path, wall_path, rooftop_triangles, wall_triangles)[source]#

Bases: object

index: int#
feature_id: str#
rooftop_path: Path#
wall_path: Path#
rooftop_triangles: int#
wall_triangles: int#
class openworld_radio_twin.simulation.scene_builder.SceneAssets(directory, scene_xml_path, provenance_path, ground_path, terrain_paths, environment_metadata_path, height_map_path, building_assets, local_buildings, origin_longitude, origin_latitude, radius_m, height_map_pixel_size_m, triangle_count, environment, material_profile)[source]#

Bases: object

directory: Path#
scene_xml_path: Path#
provenance_path: Path#
ground_path: Path#
terrain_paths: dict[SurfaceClass, Path]#
environment_metadata_path: Path | None#
height_map_path: Path#
building_assets: tuple[BuildingMeshAssets, ...]#
local_buildings: tuple[LocalBuilding, ...]#
origin_longitude: float#
origin_latitude: float#
radius_m: float#
height_map_pixel_size_m: float#
triangle_count: int#
environment: EnvironmentData | None#
material_profile: Literal['itu', 'uniform']#
property building_count: int#
class openworld_radio_twin.simulation.scene_builder.VoxelAssets(directory, voxel_path, slice_path, scene_info_path, depth_array_path, depth_image_path, depth_preview_path, depth_info_path, pitch_m, slice_shape)[source]#

Bases: object

directory: Path#
voxel_path: Path#
slice_path: Path#
scene_info_path: Path#
depth_array_path: Path#
depth_image_path: Path#
depth_preview_path: Path#
depth_info_path: Path#
pitch_m: float#
slice_shape: tuple[int, int]#
class openworld_radio_twin.simulation.scene_builder.MeasurementSurfaceAssets(path, cell_shape, triangle_areas_m2, cell_centers)[source]#

Bases: object

path: Path#
cell_shape: tuple[int, int]#
triangle_areas_m2: ndarray#
cell_centers: ndarray#
openworld_radio_twin.simulation.scene_builder.geographic_to_local(longitude, latitude, origin_longitude, origin_latitude)[source]#
Return type:

tuple[float, float]

openworld_radio_twin.simulation.scene_builder.triangulate_polygon(points)[source]#

Triangulate a simple polygon while retaining the legacy public helper.

Return type:

tuple[list[tuple[float, float]], list[tuple[int, int, int]]]

openworld_radio_twin.simulation.scene_builder.write_binary_ply(path, mesh)[source]#
Return type:

None

openworld_radio_twin.simulation.scene_builder.write_measurement_surface(path, assets, resolution_m, receiver_height_m)[source]#
Return type:

MeasurementSurfaceAssets

openworld_radio_twin.simulation.scene_builder.terrain_elevation(assets, east_m, north_m)[source]#

Return compiled triangle elevation in the scene’s local ENU frame.

Return type:

float

openworld_radio_twin.simulation.scene_builder.transmitter_scene_position(assets, longitude, latitude, height_agl_m)[source]#

Convert a geographic TX position with AGL height to Sionna scene coordinates.

Return type:

tuple[float, float, float]

openworld_radio_twin.simulation.scene_builder.measurement_surface_path(assets, resolution_m, receiver_height_m)[source]#

Return the stable shared path for one receiver-grid definition.

Return type:

Path

openworld_radio_twin.simulation.scene_builder.load_environment_assets(directory)[source]#

Reconstruct the solver environment from a persisted scene asset directory.

Return type:

EnvironmentData

openworld_radio_twin.simulation.scene_builder.rasterize_local_footprint(building, radius_m, width, height)[source]#
Return type:

ndarray

openworld_radio_twin.simulation.scene_builder.rasterize_receiver_slice(buildings, radius_m, receiver_height_m, pitch_m=3.0, environment=None)[source]#

Rasterize the north-up receiver plane used by exports and the web API.

Return type:

tuple[ndarray, ndarray]

openworld_radio_twin.simulation.scene_builder.build_scene_assets(directory, buildings, origin_longitude, origin_latitude, radius_m, environment=None, include_ground=True, material_profile='itu')[source]#
Return type:

SceneAssets

openworld_radio_twin.simulation.scene_builder.load_scene_assets(directory)[source]#

Restore the scene metadata needed by geographic and derived-asset helpers.

Return type:

SceneAssets

openworld_radio_twin.simulation.scene_builder.write_voxel_assets(assets, receiver_height_m, pitch_m=3.0)[source]#

Write the sparse solid voxels and north-up receiver-height slice.

Return type:

VoxelAssets