For Python – PyPRT

Python

PyPRT

PyPRT provides a Python binding for PRT (Procedural RunTime) of CityEngine. This enables the execution of CityEngine CGA rules within Python. Using PyPRT, the generation of 3D content in Python is greatly simplified.

了解更多More →

 

About PyPRT

pyprt_ex_5_1

pyprt_gallery_2

pyprt-teaser-image

Python 开发人员、数据科学家或 GIS 分析师等用户可以有效地利用 CityEngine 规则包 (RPK) 来创建存储为 Python 数据结构的 3D 几何图形,或以其他格式(如 OBJ、Scene层包,…)。给定要应用 CGA 规则的初始几何图形,3D 生成在 Python(Python 脚本、Jupyter Notebook 等)中按程序完成。这允许高效和可定制的几何生成。例如,在对建筑物建模时,PyPRT 用户可以通过更改 CGA 规则输入属性的值来轻松更改生成建筑物的参数(如高度或形状)。

PyPRT 3D 内容生成基于在 CityEngine 中编写的 CGA 规则包 (RPK)。RPK 包含定义形状转换的 CGA 规则文件以及补充资产。RPK 示例可以在下面找到并直接在 PyPRT 中使用。

PyPRT 允许在多个初始几何图形上生成 3D 模型。不同的输入属性可以应用于这些初始形状中的每一个。此外,输出 3D 几何图形既可以在 Python 中使用,也可以通过使用其中一个内置 PRT 编码器导出为另一种格式。

PyPRT 可免费用于个人、教育和非商业用途。商业用途需要至少一个安装在组织中的最新 CityEngine 版本的商业许可证。除非明确允许,否则不允许再分发或提供网络服务。有关更详细的许可信息,请参阅下面的许可部分。

pyprt-teaser-image

 

PyPRT Licensing Information

  • PyPRT is free for personal, educational, and non-commercial use. Commercial use requires at least one commercial license of the latest CityEngine version installed in the organization. Redistribution or web service offerings are not allowed unless expressly permitted.
  • PyPRT is under the same license as the included CityEngine SDK.
  • All content in the “Examples” directory/section is licensed under the APACHE 2.0 license. You may obtain a copy of this license at https://www.apache.org/licenses/LICENSE-2.0.
  • For questions or enquiries, please contact cityengine-info@esri.com

For questions or enquiries regarding licensing, please contact cityengine-info@esri.com

ESRI  : ArcGIS CityEngine  

Downloads and Resources

 

Installation

Simply run pip install pyprt in your desired Python environment or conda install -c esri pyprt in a Conda environment. Then use import pyprt in your scripts.

安装说明

→ 安装文档

 

Documentation

A full documentation of PyPRT is available on our github repository.

在github 存储库中提供了 PyPRT 的完整文档。

→ Read documentation

 

Github

For more information, assets and resources check our Github repository.

有关更多信息、资产和资源,请查看我们的 Github 存储库。

→ Go to Github

Examples

pyprt_ex_1_1

3D Model Optimization

 

This example tries to answer the following question: given the architectural design of a building (defined by a CGA rule) and a parcel, which values for the building parameters should we choose in order to maximize the green potential of the building?

→ Link to the example notebook→ ArcGIS Notebooks and PyPRT (Instruction)

 

pyprt_ex_2_1

3D GIS Content Creation

 

This example presents a possible workflow consisting of collecting and selecting city parcels, and populating them with procedurally generated trees. To do so, PyPRT is used in combination with other Python libraries, e.g. the ArcGIS API for Python.

→ Link to the example notebook→ ArcGIS Notebooks and PyPRT (Instruction)

 

pyprt_ex_4_1

Other Examples and blog entries

 

Other examples of PyPRT usage are located in the pyprt-examples Github repo. Ready-to-use rule packages and initial shapes are available there.

→ More Examples→ Generating 3D content in Python: PyPRT, a new Python library→ Converting 3D geometry formats made simple using PyPRT

Sidebar