Brandenburg Gate: GeometryAI surface meshing¶
This notebook reconstructs the benchmark's GeometryAI surface mesh from a public snapshot of the scanned Brandenburg Gate geometry. It covers the coordinate transform, the controls used to repair and resolve the scanned surface, and the named viewpoints used for inspection. Volume meshing and the downstream health case are available in the linked Flow360 project, but are intentionally outside this notebook.
Requirements¶
Install and configure the Flow360 Python API using the installation and setup guide. This notebook targets the latest client with the public benchmark-asset helper:
pip install "flow360>=25.10.4"
Run the cells from top to bottom in one kernel.
Imports and public input geometry¶
The public snapshot contains the scanned STL without exposing the benchmark account's private project.
import flow360 as fl
from flow360.examples import download_benchmark_assets
root_asset_files = download_benchmark_assets("BrandenburgGate", "root_assets")
geometry_files = [
file for file in root_asset_files
if "/results/" not in file and "/logs/" not in file
and file.lower().endswith((".csm", ".egads", ".stp", ".step", ".iges", ".igs", ".stl"))
]
project = fl.Project.from_geometry(geometry_files, name="Brandenburg Gate: surface meshing")
Geometry preparation and meshing settings¶
The two coordinate-system rotations align the scan with the benchmark frame. The complete surface-meshing configuration is retained, including the automated farfield, thin-feature refinement, and boundary-layer default. Physics and solver settings are omitted.
solver_version = "release-25.11"
with fl.create_draft(new_run_from=project.geometry) as draft:
with fl.SI_unit_system:
parent = draft.coordinate_systems.add(
coordinate_system=fl.CoordinateSystem(
name="Coordinate system 2",
axis_of_rotation=(0, 1, 0),
angle_of_rotation=-90 * fl.u.deg,
)
)
child = draft.coordinate_systems.add(
coordinate_system=fl.CoordinateSystem(
name="Coordinate system 3",
axis_of_rotation=(0, 0, 1),
angle_of_rotation=90 * fl.u.deg,
),
parent=parent,
)
draft.coordinate_systems.assign(
entities=list(draft.body_groups), coordinate_system=child
)
with fl.SI_unit_system:
farfield = fl.AutomatedFarfield(method="auto")
refinement_box = fl.Box.from_principal_axes(
name="Box",
center=(0.001267, -0.004724500000000002, 0.0259) * fl.u.m,
size=(0.01, 0.01, 0.009) * fl.u.m,
axes=[(1, 0, 0), (0, 1, 0)],
)
params = fl.SimulationParams(
meshing=fl.MeshingParams(
defaults=fl.MeshingDefaults(
surface_max_edge_length=1 * fl.u.mm,
geometry_accuracy=0.0375 * fl.u.mm,
curvature_resolution_angle=12 * fl.u.deg,
surface_edge_growth_rate=1.2,
sealing_size=0 * fl.u.m,
remove_hidden_geometry=True,
baffle_face_treatment="thicken",
target_surface_node_count=2e6,
boundary_layer_first_layer_thickness=0.1 * fl.u.mm,
),
volume_zones=[farfield],
refinements=[
fl.GeometryRefinement(
name="Charriot",
preserve_thin_geometry=True,
geometry_accuracy=0.01 * fl.u.mm,
entities=[refinement_box],
)
],
)
)
params = fl.SimulationParams.model_validate(params.model_dump(mode="python"))
with fl.warning_bypass("potential_length_scale_mismatch"):
surface_mesh = project.generate_surface_mesh(
params=params,
name=f"BrandenburgGate_surface_mesh_{solver_version}",
use_geometry_AI=True,
solver_version=solver_version,
)
Wait for the surface mesh¶
The wait keeps the notebook attached until the generated surface mesh reaches a terminal state.
surface_mesh.wait()
surface_mesh
Named inspection viewpoints¶
These camera settings reproduce the benchmark's views of the columns, chariot, entrances, and complete gate. They help inspect reconstructed details but do not affect mesh generation. matrix is the camera model-view transform used by the benchmark renderer.
viewpoints = {
"Charriot": {"matrix": [[0.4815752466133512, 0.30400128759698547, -0.8219905711069102, -10196.74421564156], [-0.876385770751567, 0.17321405516692925, -0.4493827677123471, -5581.78155210015], [0.005767380121957542, 0.9367924573949149, 0.34983800407406546, 4365.820802252898], [0, 0, 0, 1]], "up": [0.30400128759698564, 0.17321405516693053, 0.9367924573949143], "zoom": 655.1381439196321, "vertScale": 11.374025921218509},
"columns": {"matrix": [[0.3141080887428877, 0.3117210979285366, -0.8967530684043191, -11135.846680982484], [-0.9493312615106393, 0.11338398899630318, -0.29311128766723854, -3644.2719992728476], [0.01030846763347742, 0.943384348049921, 0.3315414112136425, 4124.68497773616], [0, 0, 0, 1]], "up": [0.31172109792852887, 0.1133839889963033, 0.9433843480498912], "zoom": 355.9751768326869, "vertScale": 20.932802947726913},
"side entrance": {"matrix": [[-0.6478300948758897, 0.36327742621151354, -0.6695862004090868, -8326.934502192365], [-0.7617058149625415, -0.2962413494331267, 0.5762337323849873, 7173.622237664757], [0.010973587626084086, 0.8833292559919199, 0.46862458949934527, 5820.851434782141], [0, 0, 0, 1]], "up": [0.36327742621150644, -0.29624134943311803, 0.8833292559918914], "zoom": 447.4681813029082, "vertScale": 16.652710834598167},
"column back": {"matrix": [[0.5445299131938669, -0.41141688801449505, 0.7309058201256783, 9096.065546377133], [0.8381774605533502, 0.23497043556203134, -0.4921863864758608, -6125.529191437851], [0.030752532537242822, 0.8806389945195013, 0.47278879330445567, 5887.778851912335], [0, 0, 0, 1]], "up": [-0.4114168880144825, 0.23497043556202424, 0.8806389945194748], "zoom": 329.8417046771418, "vertScale": 22.591316153348977},
"new iso": {"matrix": [[0.4377617540204092, 0.14231689652295842, -0.8877559054611179, -11015.757189003329], [-0.8990906547841996, 0.06841378282438376, -0.43238356675458783, -5370.69662411015], [-0.000800747610759284, 0.987454026921653, 0.15790472925005092, 1972.3252780315536], [0, 0, 0, 1]], "up": [0.14231689652295415, 0.06841378282438196, 0.9874540269216251], "zoom": 153.87358953284587, "vertScale": 48.426492509491155},
}
list(viewpoints)