Parrot drone: GeometryAI surface meshing¶
This notebook reconstructs the benchmark's GeometryAI surface mesh for a detailed quadcopter assembly. It preserves the geometry transform and surface controls used to resolve the rotors, camera, frame openings, and underside netting. 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 source geometry 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("parrot_drone", "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="Parrot drone: surface meshing")
Geometry preparation and meshing settings¶
The assembly is rotated and translated before meshing. The complete benchmark meshing configuration is retained, including the automated farfield, targeted blade and casing refinements, underside-net refinement, and blade boundary layers. Physics and solver settings are omitted.
solver_version = "release-25.11"
blade_names = [
"body00012",
"body00013",
"body00471",
"body00475",
"body00004",
"body00005",
"body00674",
"body00670",
]
airframe_patches = [
"body00579",
"body00620",
"body00629",
"body00003",
"body00481",
"body00486",
]
with fl.create_draft(new_run_from=project.geometry, face_grouping="groupByBodyId") as draft:
rotation = draft.coordinate_systems.add(
fl.CoordinateSystem(
name="Rotation",
axis_of_rotation=(0, 0, 1),
angle_of_rotation=180 * fl.u.deg,
)
)
translation_to_origin = draft.coordinate_systems.add(
fl.CoordinateSystem(
name="Translation to Origin",
translation=(-120, -116, -80) * fl.u.mm,
),
parent=rotation,
)
draft.coordinate_systems.assign(
entities=list(draft.body_groups),
coordinate_system=translation_to_origin,
)
blades = [draft.surfaces[name] for name in blade_names]
casing = [draft.surfaces[name] for name in airframe_patches]
farfield = fl.AutomatedFarfield()
with fl.SI_unit_system:
params = fl.SimulationParams(
meshing=fl.MeshingParams(
volume_zones=[farfield],
refinements=[
fl.GeometryRefinement(
name="Blades",
faces=blades,
geometry_accuracy=0.03 * fl.u.mm,
sealing_size=0 * fl.u.m,
),
fl.BoundaryLayer(
name="Blades",
first_layer_thickness=1e-6 * fl.u.m,
faces=blades,
),
fl.GeometryRefinement(
name="Casing Openings",
geometry_accuracy=0.1 * fl.u.mm,
entities=casing,
),
fl.GeometryRefinement(
name="Underside Net",
entities=draft.surfaces["body00482"],
geometry_accuracy=0.03 * fl.u.mm,
),
],
defaults=fl.MeshingDefaults(
surface_max_edge_length=2 * fl.u.mm,
curvature_resolution_angle=2 * fl.u.deg,
target_surface_node_count=1.5e6,
geometry_accuracy=0.3 * fl.u.mm,
boundary_layer_first_layer_thickness=0.1 * fl.u.mm,
remove_hidden_geometry=True,
),
)
)
params = fl.SimulationParams.model_validate(params.model_dump(mode="python"))
surface_mesh = project.generate_surface_mesh(
params=params,
name=f"parrot_drone_surface_mesh_{solver_version}",
solver_version=solver_version,
use_geometry_AI=True,
)
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 inspection angles. They help review the full assembly, underside details, rotor, and camera but do not affect mesh generation. matrix is the camera model-view transform used by the benchmark renderer.
viewpoints = {
"ISO-ZOOM": {"near": 0.1, "far": 1000, "up": [0.40824829046386274, 0.40824829046386274, 0.8164965809277264], "zoom": 1.9423326673015997, "matrix": [[0.7071067811865469, 0.4082482904638634, -0.5773502691896267, -504.37700463895123], [-0.707106781186547, 0.4082482904638632, -0.5773502691896266, -513.4990028139623], [-1.1102230246251557e-16, 0.8164965809277268, 0.5773502691896266, 531.0050841123051], [0, 0, 0, 1]], "orbitCenter": [25.223979206804344, 16.101981031793215, 1.404100266549495], "radiusFactor": 0.67, "vertScale": 268.9205242143451, "horizScale": 510.7230123734621, "projectionMode": "orthographic"},
"UNDERSIDE-ZOOM": {"near": 0.1, "far": 1000, "up": [0, -1, 0], "zoom": 7.100094557587731, "matrix": [[0.9999999999999992, 0, 0, 41.49404061748447], [0, -1.0000000000000009, 0, -1.3616110761551354], [0, 0, -1.0000000000000016, -893.4882013684232], [0, 0, 0, 1]], "orbitCenter": [41.49404061748447, -1.3616110761551354, 23.807610390889693], "radiusFactor": 0.67, "vertScale": 73.56706517819347, "horizScale": 139.71560277539263, "projectionMode": "orthographic"},
"PROP-ZOOM": {"near": 0.1, "far": 1000, "up": [0.40824829046386274, 0.40824829046386274, 0.8164965809277264], "zoom": 5.648351148246583, "matrix": [[0.7071067811865468, 0.4082482904638634, -0.5773502691896265, -513.6739976544222], [-0.7071067811865469, 0.4082482904638632, -0.5773502691896264, -575.0025774217002], [-1.1102230246251554e-16, 0.8164965809277268, 0.5773502691896264, 466.9239588471224], [0, 0, 0, 1]], "orbitCenter": [15.92698619133342, -45.401593575944545, -62.67702499863324], "radiusFactor": 0.67, "vertScale": 92.4753269370551, "horizScale": 175.62541082163403, "projectionMode": "orthographic"},
"CAMERA-ZOOM": {"near": 0.1, "far": 1000, "up": [0.40824829046386274, 0.40824829046386274, 0.8164965809277264], "zoom": 7.662637501040181, "matrix": [[0.7071067811865468, 0.4082482904638634, -0.5773502691896265, -559.5766723949658], [-0.7071067811865469, 0.4082482904638632, -0.5773502691896264, -491.4861524022616], [-1.1102230246251554e-16, 0.8164965809277268, 0.5773502691896264, 504.53770912601715], [0, 0, 0, 1]], "orbitCenter": [-29.975688549210183, 38.114831443494, -25.063274719738473], "radiusFactor": 0.67, "vertScale": 68.16623114671523, "horizScale": 129.4585566315768, "projectionMode": "orthographic"},
"FRONT": {"near": 0.1, "far": 1000, "up": [0, 0, 1], "zoom": 2.6349974966731495, "matrix": [[0, 0, -1.0000000000000013, -901.7222226091661], [-0.9999999999999989, 0, 0, 20.137440618009673], [0, 1.000000000000001, 0, 21.169989491267568], [0, 0, 0, 1]], "orbitCenter": [15.573589150146791, 20.137440618009673, 21.169989491267568], "radiusFactor": 0.67, "vertScale": 198.22907602336315, "horizScale": 376.4686653889081, "projectionMode": "orthographic"},
}
list(viewpoints)