BatchPlan


NameBatchPlan JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryBatchPlan: A large scale solution for floor plan extraction
upload_time2024-04-22 15:24:06
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT License Copyright (c) 2024 Burak Yildiz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords batchplan floorplan ifc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # BatchPlan

## About

BatchPlan as a robust large-scale floor plan extraction tool designed to be highly customizable, extensible, and pluggable in various capacities. The design decisions are meticulously crafted, particularly for the processing of extensive BIM data stored in IFC files.

## Installation

BatchPlan is dependent to [pythonocc-core](https://github.com/tpaviot/pythonocc-core) which is curretly only available as conda package. Thus we need to create a conda environment as follows:

First we need to copy [environment.yml](./environment.yml) to your machine and run the following command to create the environment with needed dependencies:

```
conda env create -f environment.yml
```

Now we need to install BatchPlan. There is two ways:

1. Building from source (recommended):

```
git clone https://github.com/byildiz/BatchPlan.git
cd BatchPlan
pip install .
```

2. Installing with pip:

```
pip install BatchPlan
```

## Usage

### Extract Floor Plan

`extract_floor_plans` module is used to extract floor plans.

```
% python -m batchplan.extract_floor_plans --help
usage: extract_floor_plans.py [-h] [--output OUTPUT] [--use-storey] [--load-plugin] [--formatter FORMATTER] [--filter-fn FILTER_FN] [--filter FILTER] [--color-fn COLOR_FN] [--skip-colorless]
                              [--width WIDTH] [--height HEIGHT]
                              ifc_paths

positional arguments:
  ifc_paths

options:
  -h, --help            show this help message and exit
  --output OUTPUT       output directory
  --use-storey          use IfcBuildingStorey elements to infer floors
  --load-plugin         load plugin module (plugin.py)
  --formatter FORMATTER
                        selected formatters
  --filter-fn FILTER_FN
                        filter function for filter out elements
  --filter FILTER       filter string to filter aout elements using IfcOpenShell's builtin filtering feature
  --color-fn COLOR_FN   color function to determine elements' colors in floor plan
  --skip-colorless      skip elements if the color function doesn't return a color for an element
  --width WIDTH         floor plan width
  --height HEIGHT       floor plan height
```

#### Extract floor plans in PNG format

```
python -m batchplan.extract_floor_plans examples/data/Shependomlaan/IFC\ Schependomlaan.ifc --output output
```

After the above command successfully runs, an output directory will be created with the following structure and content:

```
output
└── IFC Schependomlaan
    ├── -1 fundering_3D.png
    ├── -1 fundering_floor_plan.png
    ├── 00 begane grond_3D.png
    ├── 00 begane grond_floor_plan.png
    ├── 01 eerste verdieping_3D.png
    ├── 01 eerste verdieping_floor_plan.png
    ├── 02 tweede verdieping_3D.png
    ├── 02 tweede verdieping_floor_plan.png
    ├── 03 derde verdieping_3D.png
    ├── 03 derde verdieping_floor_plan.png
    └── 3D.png
```

#### Extract floor plans in WTK format

```
python -m batchplan.extract_floor_plans examples/data/Shependomlaan/IFC\ Schependomlaan.ifc --formatter FloorWKTFormatter --output output
```

After the above command successfully runs, an output directory will be created with the following structure and content:

```
output
└── IFC Schependomlaan
    ├── -1 fundering.csv
    ├── 00 begane grond.csv
    ├── 01 eerste verdieping.csv
    ├── 02 tweede verdieping.csv
    ├── 03 derde verdieping.csv
    └── 3D.png
```

### Mark Floors

`mark_loors` module is used to mark floors and save them in csv file.

```
% python -m batchplan.mark_floors --help
usage: mark_floors.py [-h] [--use-storeys] root

positional arguments:
  root

options:
  -h, --help     show this help message and exit
  --use-storeys  pre-fill floors using IfcBuildingStorey elements
```

Example usage:

```
python -m batchplan.mark_floors --use-storeys examples/data/Shependomlaan
```

If you run the above command, you will see a GUI like the one below:

![mark_floors](examples/screenshots/mark_floors.png)

## Known Issues and Limitations

- There is memory leakage which makes processing huge projects hard.
- BatchPlan currently can't run on a machine without a GUI environment.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "BatchPlan",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "batchplan, floorplan, ifc",
    "author": null,
    "author_email": "Burak Yildiz <0byldz@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e9/a6/f2340ba0899b6ec2adf0ccbd444570dd890929c980c8d0b52f283d8a0310/batchplan-0.1.2.tar.gz",
    "platform": null,
    "description": "# BatchPlan\n\n## About\n\nBatchPlan as a robust large-scale floor plan extraction tool designed to be highly customizable, extensible, and pluggable in various capacities. The design decisions are meticulously crafted, particularly for the processing of extensive BIM data stored in IFC files.\n\n## Installation\n\nBatchPlan is dependent to [pythonocc-core](https://github.com/tpaviot/pythonocc-core) which is curretly only available as conda package. Thus we need to create a conda environment as follows:\n\nFirst we need to copy [environment.yml](./environment.yml) to your machine and run the following command to create the environment with needed dependencies:\n\n```\nconda env create -f environment.yml\n```\n\nNow we need to install BatchPlan. There is two ways:\n\n1. Building from source (recommended):\n\n```\ngit clone https://github.com/byildiz/BatchPlan.git\ncd BatchPlan\npip install .\n```\n\n2. Installing with pip:\n\n```\npip install BatchPlan\n```\n\n## Usage\n\n### Extract Floor Plan\n\n`extract_floor_plans` module is used to extract floor plans.\n\n```\n% python -m batchplan.extract_floor_plans --help\nusage: extract_floor_plans.py [-h] [--output OUTPUT] [--use-storey] [--load-plugin] [--formatter FORMATTER] [--filter-fn FILTER_FN] [--filter FILTER] [--color-fn COLOR_FN] [--skip-colorless]\n                              [--width WIDTH] [--height HEIGHT]\n                              ifc_paths\n\npositional arguments:\n  ifc_paths\n\noptions:\n  -h, --help            show this help message and exit\n  --output OUTPUT       output directory\n  --use-storey          use IfcBuildingStorey elements to infer floors\n  --load-plugin         load plugin module (plugin.py)\n  --formatter FORMATTER\n                        selected formatters\n  --filter-fn FILTER_FN\n                        filter function for filter out elements\n  --filter FILTER       filter string to filter aout elements using IfcOpenShell's builtin filtering feature\n  --color-fn COLOR_FN   color function to determine elements' colors in floor plan\n  --skip-colorless      skip elements if the color function doesn't return a color for an element\n  --width WIDTH         floor plan width\n  --height HEIGHT       floor plan height\n```\n\n#### Extract floor plans in PNG format\n\n```\npython -m batchplan.extract_floor_plans examples/data/Shependomlaan/IFC\\ Schependomlaan.ifc --output output\n```\n\nAfter the above command successfully runs, an output directory will be created with the following structure and content:\n\n```\noutput\n\u2514\u2500\u2500 IFC Schependomlaan\n    \u251c\u2500\u2500 -1 fundering_3D.png\n    \u251c\u2500\u2500 -1 fundering_floor_plan.png\n    \u251c\u2500\u2500 00 begane grond_3D.png\n    \u251c\u2500\u2500 00 begane grond_floor_plan.png\n    \u251c\u2500\u2500 01 eerste verdieping_3D.png\n    \u251c\u2500\u2500 01 eerste verdieping_floor_plan.png\n    \u251c\u2500\u2500 02 tweede verdieping_3D.png\n    \u251c\u2500\u2500 02 tweede verdieping_floor_plan.png\n    \u251c\u2500\u2500 03 derde verdieping_3D.png\n    \u251c\u2500\u2500 03 derde verdieping_floor_plan.png\n    \u2514\u2500\u2500 3D.png\n```\n\n#### Extract floor plans in WTK format\n\n```\npython -m batchplan.extract_floor_plans examples/data/Shependomlaan/IFC\\ Schependomlaan.ifc --formatter FloorWKTFormatter --output output\n```\n\nAfter the above command successfully runs, an output directory will be created with the following structure and content:\n\n```\noutput\n\u2514\u2500\u2500 IFC Schependomlaan\n    \u251c\u2500\u2500 -1 fundering.csv\n    \u251c\u2500\u2500 00 begane grond.csv\n    \u251c\u2500\u2500 01 eerste verdieping.csv\n    \u251c\u2500\u2500 02 tweede verdieping.csv\n    \u251c\u2500\u2500 03 derde verdieping.csv\n    \u2514\u2500\u2500 3D.png\n```\n\n### Mark Floors\n\n`mark_loors` module is used to mark floors and save them in csv file.\n\n```\n% python -m batchplan.mark_floors --help\nusage: mark_floors.py [-h] [--use-storeys] root\n\npositional arguments:\n  root\n\noptions:\n  -h, --help     show this help message and exit\n  --use-storeys  pre-fill floors using IfcBuildingStorey elements\n```\n\nExample usage:\n\n```\npython -m batchplan.mark_floors --use-storeys examples/data/Shependomlaan\n```\n\nIf you run the above command, you will see a GUI like the one below:\n\n![mark_floors](examples/screenshots/mark_floors.png)\n\n## Known Issues and Limitations\n\n- There is memory leakage which makes processing huge projects hard.\n- BatchPlan currently can't run on a machine without a GUI environment.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Burak Yildiz  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "BatchPlan: A large scale solution for floor plan extraction",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/byildiz/BatchPlan",
        "Issues": "https://github.com/byildiz/BatchPlan/issues"
    },
    "split_keywords": [
        "batchplan",
        " floorplan",
        " ifc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f57c17a3622f746236d51db1a82ca3ab0b46e86ba02334caa996580640e63adc",
                "md5": "643387fef5669bcfa7ce13a81c13806d",
                "sha256": "d91204d86beb6396ac0075e5b16bd9ad0d100810e3f95aedd439900dbdea2a3d"
            },
            "downloads": -1,
            "filename": "BatchPlan-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "643387fef5669bcfa7ce13a81c13806d",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 16361593,
            "upload_time": "2024-04-22T15:23:52",
            "upload_time_iso_8601": "2024-04-22T15:23:52.214427Z",
            "url": "https://files.pythonhosted.org/packages/f5/7c/17a3622f746236d51db1a82ca3ab0b46e86ba02334caa996580640e63adc/BatchPlan-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5bdfe1ff7128071dd4aa750df0ad5b0d28d6a27e6db0c1b8aa27eee6d719ccf",
                "md5": "3b1c705fa12018717f64ce548987cb5f",
                "sha256": "bcae0d685f6da14c42c71a4de37523a90dc219f108823512596cbfe4901e8d77"
            },
            "downloads": -1,
            "filename": "BatchPlan-0.1.2-cp310-cp310-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "3b1c705fa12018717f64ce548987cb5f",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 14953604,
            "upload_time": "2024-04-22T15:24:00",
            "upload_time_iso_8601": "2024-04-22T15:24:00.607915Z",
            "url": "https://files.pythonhosted.org/packages/a5/bd/fe1ff7128071dd4aa750df0ad5b0d28d6a27e6db0c1b8aa27eee6d719ccf/BatchPlan-0.1.2-cp310-cp310-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a3be06458d6a1a535c6ae3a972e8e02556077ab6fbc1fc1436eff4f17ff35e3d",
                "md5": "09ede5d24d6bf708b5213d2aa1c9ec24",
                "sha256": "f6bd1ccd88021b0d2241daf80119686f2972cc254cc34235880f9037235c6073"
            },
            "downloads": -1,
            "filename": "BatchPlan-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "09ede5d24d6bf708b5213d2aa1c9ec24",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 17241002,
            "upload_time": "2024-04-22T15:24:03",
            "upload_time_iso_8601": "2024-04-22T15:24:03.729924Z",
            "url": "https://files.pythonhosted.org/packages/a3/be/06458d6a1a535c6ae3a972e8e02556077ab6fbc1fc1436eff4f17ff35e3d/BatchPlan-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e9a6f2340ba0899b6ec2adf0ccbd444570dd890929c980c8d0b52f283d8a0310",
                "md5": "674824a2c3a7717e5ae2c4211f876fc5",
                "sha256": "2052ea4e7c0a8106ab4954e7b890dda1025c246298075d2e36cdd7c2b21e0c88"
            },
            "downloads": -1,
            "filename": "batchplan-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "674824a2c3a7717e5ae2c4211f876fc5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 9373072,
            "upload_time": "2024-04-22T15:24:06",
            "upload_time_iso_8601": "2024-04-22T15:24:06.386061Z",
            "url": "https://files.pythonhosted.org/packages/e9/a6/f2340ba0899b6ec2adf0ccbd444570dd890929c980c8d0b52f283d8a0310/batchplan-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-22 15:24:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "byildiz",
    "github_project": "BatchPlan",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "batchplan"
}
        
Elapsed time: 2.80687s