Tutorials #1

Merged
g_gutierrez merged 5 commits from Tutorials into main 2023-06-08 10:30:29 -04:00
6 changed files with 527 additions and 553 deletions
Showing only changes of commit 11f2a70c74 - Show all commits

View File

@ -1,28 +0,0 @@
# cerc-hub export
# building UUID_d281adfc-4901-0f52-540b-4cc1a9325f82
g UUID_d281adfc-4901-0f52-540b-4cc1a9325f82
s off
# surface 9a1623ed-cff3-46e3-b216-6b5bc34caf68
v 0.0 5.0 6.517691453623996
v 0.0 10.0 3.630940107675997
v 0.0 10.0 0.0
v 0.0 0.0 0.0
v 0.0 0.0 3.630940107675997
f 1 2 3 4 5
# surface 6ac94b17-cc97-4b67-b79a-402cd0325917
v 12.0 0.0 3.630940107675997
v 12.0 0.0 0.0
f 6 5 4 7
# surface 429f5b6f-2818-4882-b8f4-f6983e707d86
v 12.0 5.0 6.517691453623996
v 12.0 10.0 0.0
v 12.0 10.0 3.630940107675997
f 8 6 7 9 10
# surface e934907a-d808-45bc-bc8f-5ad17b0834f1
f 1 8 10 2
# surface 0e80bc1f-0b35-4917-ba25-98139457582c
f 2 10 9 3
# surface d8ef7be5-3144-4947-b054-c9e39f548ad1
f 6 8 1 5
# surface f30c3309-acc2-46a8-aa15-e255c345d77c
f 7 4 3 9

View File

@ -1,3 +1,3 @@
# Documentation # Documentation
This repository contains the CERC development documentation and it's intended to be linked from different repositories and sites This repository contains the CERC development documentation, and it's intended to be linked from different repositories and sites

View File

@ -1,13 +1,15 @@
from pathlib import Path
from hub.imports.geometry_factory import GeometryFactory from hub.imports.geometry_factory import GeometryFactory
from hub.exports.exports_factory import ExportsFactory from hub.exports.exports_factory import ExportsFactory
gml_file = './FZK-Haus-LoD2-KIT-IAI-KHH-B36-V1.gml' gml_file = 'FZK-Haus-LoD2-KIT-IAI-KHH-B36-V1.gml'
city = GeometryFactory('citygml', gml_file).city city = GeometryFactory('citygml', gml_file).city
path = Path(__file__).parent
for building in city.buildings: for building in city.buildings:
print(building.name) print(building.name)
print(building.volume) print(building.volume)
print(building.floor_area) print(building.floor_area)
ExportsFactory('obj', city, './').export() ExportsFactory('obj', city, path).export()

View File

@ -4,8 +4,8 @@ from hub.helpers.dictionaries import Dictionaries
from hub.exports.exports_factory import ExportsFactory from hub.exports.exports_factory import ExportsFactory
# Level0: # tutorial_0:
gml_file = './FZK-Haus-LoD2-KIT-IAI-KHH-B36-V1.gml' gml_file = 'FZK-Haus-LoD2-KIT-IAI-KHH-B36-V1.gml'
city = GeometryFactory('citygml', gml_file, function_to_hub=Dictionaries().montreal_function_to_hub_function).city city = GeometryFactory('citygml', gml_file, function_to_hub=Dictionaries().montreal_function_to_hub_function).city
for building in city.buildings: for building in city.buildings: