Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Runtime Docs Version 2.0.77

# BoundingBox - Runtime Docs

## BoundingBox :: table or {MapPosition, MapPosition}

Two positions, specifying the top-left and bottom-right corner of the box respectively. Like with MapPosition, the names of the members may be omitted. When read from the game, the third member `orientation` is present if it is non-zero.

#### Table fields

left_top | :: MapPosition |
right_bottom | :: MapPosition |
orientation | :: RealOrientation? |

#### Examples

    -- Explicit definition
    {left_top = {x = -2, y = -3}, right_bottom = {x = 5, y = 8}}

    -- Shorthand
    {{-2, -3}, {5, 8}}

Concept used in

- LuaDecorativePrototype::collision_box
- LuaEntity::mining_area
- LuaEntity::bounding_box
- LuaEntity::secondary_bounding_box
- LuaEntity::selection_box
- LuaEntity::secondary_selection_box
- LuaEntityPrototype::collision_box
- LuaEntityPrototype::secondary_collision_box
- LuaEntityPrototype::map_generator_bounding_box
- LuaEntityPrototype::selection_box
- LuaEntityPrototype::sticker_box
- LuaEntityPrototype::created_smoke
- LuaFluidBox::get_fluid_segment_extent_bounding_box()
- LuaForce::chart()
- LuaForce::find_chart_tags()
- LuaItemCommon::create_blueprint()
- LuaItemCommon::deconstruct_area()
- LuaItemCommon::cancel_deconstruct_area()
- LuaItemPrototype::collision_box
- LuaItemPrototype::drawing_box
- LuaRecord::create_blueprint()
- LuaRecord::deconstruct_area()
- LuaRecord::cancel_deconstruct_area()
- LuaSpacePlatform::destroy_asteroid_chunks()
- LuaSpacePlatform::find_asteroid_chunks_filtered()
- LuaSurface::find_entities()
- LuaSurface::find_non_colliding_position_in_box()
- LuaSurface::find_units()
- LuaSurface::create_entity()
- LuaSurface::deconstruct_area()
- LuaSurface::cancel_deconstruct_area()
- LuaSurface::upgrade_area()
- LuaSurface::cancel_upgrade_area()
- LuaSurface::get_connected_tiles()
- LuaSurface::destroy_decoratives()
- LuaSurface::find_decoratives_filtered()
- LuaSurface::clone_area()
- LuaSurface::request_path()
- LuaSurface::build_checkerboard()
- ChunkPositionAndArea
- EntitySearchFilters
- ScriptArea
- TileBuildabilityRule
- TileSearchFilters
- TriggerEffectItem
- on_area_cloned
- on_chunk_charted
- on_chunk_generated
- on_player_alt_reverse_selected_area
- on_player_alt_selected_area
- on_player_deconstructed_area
- on_player_reverse_selected_area
- on_player_selected_area
- on_player_setup_blueprint
- on_sector_scanned