# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

CREATE_ICOSAHEDRON_METADATA = Metadata(
    id="0c5ed33e6d9371f02ee960933e1903bb9350e470.boutiques",
    name="CreateIcosahedron",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class CreateIcosahedronOutputs(typing.NamedTuple):
    """
    Output object returned when calling `create_icosahedron(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def create_icosahedron(
    rad: float | None = None,
    rec_depth: float | None = None,
    lin_depth: float | None = None,
    min_nodes: float | None = None,
    nums: bool = False,
    nums_quiet: bool = False,
    center_coordinates: list[float] | None = None,
    to_sphere: bool = False,
    output_prefix: str | None = None,
    help_: bool = False,
    runner: Runner | None = None,
) -> CreateIcosahedronOutputs:
    """
    Tool to create an icosahedron with optional tessellation.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        rad: Size of icosahedron.
        rec_depth: Recursive tessellation depth for icosahedron.
        lin_depth: Number of edge divides for linear icosahedron tessellation.
        min_nodes: Automatically select the -ld value which produces an\
            icosahedron of at least MIN_NODES nodes.
        nums: Output the number of nodes (vertices), triangles, edges, total\
            volume, and total area then quit.
        nums_quiet: Output numbers in a less verbose manner.
        center_coordinates: Coordinates of the center of the icosahedron.
        to_sphere: Project nodes to sphere.
        output_prefix: Prefix for output files.
        help_: Display help message.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `CreateIcosahedronOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(CREATE_ICOSAHEDRON_METADATA)
    cargs = []
    cargs.append("CreateIcosahedron")
    if rad is not None:
        cargs.extend([
            "-rad",
            str(rad)
        ])
    if rec_depth is not None:
        cargs.extend([
            "-rd",
            str(rec_depth)
        ])
    if lin_depth is not None:
        cargs.extend([
            "-ld",
            str(lin_depth)
        ])
    if min_nodes is not None:
        cargs.extend([
            "-min_nodes",
            str(min_nodes)
        ])
    if nums:
        cargs.append("-nums")
    if nums_quiet:
        cargs.append("-nums_quiet")
    if center_coordinates is not None:
        cargs.extend([
            "-ctr",
            *map(str, center_coordinates)
        ])
    if to_sphere:
        cargs.append("-tosphere")
    if output_prefix is not None:
        cargs.extend([
            "-prefix",
            output_prefix
        ])
    if help_:
        cargs.append("-help")
    ret = CreateIcosahedronOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "CREATE_ICOSAHEDRON_METADATA",
    "CreateIcosahedronOutputs",
    "create_icosahedron",
]
