///|
/// 36-chronos-gear-flower
///
/// A high-detail model that demonstrates the power of parametric
/// modeling. It features radial symmetry, complex profiles,
/// and multiple colors.
///
/// Usage (stdout):
///   moon run --target native examples/36-chronos-gear-flower -- > flower.step
///
/// Usage (write file):
///   moon run --target native examples/36-chronos-gear-flower -- -o flower.step
async fn main {
  let base_args_spec = {
    "petals": @cli.opt_int(12, help="Number of petals", min=3, max=36),
  }
  let args_spec = @cli.with_translate(@common.with_output_args(base_args_spec))
  guard @cli.parse(
      args_spec,
      prog="36-chronos-gear-flower",
      description="Generate a Chronos Gear-Flower model.",
    )
    is Some(args) else {
    return
  }
  let num_petals = args.int("petals")
  let output = @common.output_paths(args)
  let (tx, ty, tz) = match args.translate_xyz() {
    Some(v) => v
    None => (0.0, 0.0, 0.0)
  }
  let design = @cad.Design::new(
    name="chronos-gear-flower",
    documentation=args.documentation(),
  )

  // 1. Central Hub - Tiered "Reactor Core"
  // Outer Ring (lowest)
  let hub_outer_h = 8.0
  let hub_outer = @cad.tube(34.0, 28.0, hub_outer_h)
    .with_name("hub-outer")
    .with_color(@cad.Rgb::new(0.0, 0.2, 0.5)) // Deep Space Blue

  // Middle Ring (mid height)
  let hub_mid_h = 12.0
  let hub_mid = @cad.tube(26.0, 20.0, hub_mid_h)
    .with_name("hub-mid")
    .with_color(@cad.Rgb::cyan())

  // Inner Core (tallest) - Enlarged for better text visibility
  let hub_core_h = 16.0
  let hub_core = @cad.tube(18.0, 0.0, hub_core_h)
    .with_name("hub-core")
    .with_color(@cad.Rgb::magenta())
  let mut design = design.add(hub_outer).add(hub_mid).add(hub_core)

  // 2. Petals - Parametric sweeping shapes with "Propeller" rotation
  for i in 0..