# Auto-generated by `python -m gen` — do not edit manually.

from typing import TYPE_CHECKING, Generic, Literal

import bpy

from ...builder import BaseNode, SocketAccessor

from ...types import (
    InputBoolean,
    InputFloat,
    InputGeometry,
    InputInteger,
    InputMatrix,
    InputMenu,
    InputString,
    InputVector,
    InputAny,
)

from ...builder.socket import (
    BooleanSocket,
    FloatSocket,
    GeometrySocket,
    IntegerSocket,
    MatrixSocket,
    MenuSocket,
    StringSocket,
    VectorSocket,
    FloatSocketGrid,
    VectorSocketGrid,
    BooleanSocketGrid,
    _T,
    _S,
)


class AdvectGrid(BaseNode, Generic[_T]):
    """
    Move grid values through a velocity field using numerical integration. Supports multiple integration schemes for different accuracy and performance trade-offs

    Parameters
    ----------
    grid : InputFloat
        Grid
    velocity : InputVector
        Velocity
    time_step : InputFloat
        Time Step
    integration_scheme : InputMenu | Literal['Semi-Lagrangian', 'Midpoint', 'Runge-Kutta 3', 'Runge-Kutta 4', 'MacCormack', 'BFECC']
        Integration Scheme
    limiter : InputMenu | Literal['None', 'Clamp', 'Revert']
        Limiter

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.velocity : VectorSocket
        Velocity
    i.time_step : FloatSocket
        Time Step
    i.integration_scheme : MenuSocket
        Integration Scheme
    i.limiter : MenuSocket
        Limiter

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeGridAdvect"
    node: bpy.types.GeometryNodeGridAdvect

    class _Inputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""
        velocity: VectorSocket
        """Velocity"""
        time_step: FloatSocket
        """Time Step"""
        integration_scheme: MenuSocket
        """Integration Scheme"""
        limiter: MenuSocket
        """Limiter"""

    class _Outputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        grid: InputAny = 0.0,
        velocity: InputVector = None,
        time_step: InputFloat = 1.0,
        integration_scheme: InputMenu
        | Literal[
            "Semi-Lagrangian",
            "Midpoint",
            "Runge-Kutta 3",
            "Runge-Kutta 4",
            "MacCormack",
            "BFECC",
        ] = "Runge-Kutta 3",
        limiter: InputMenu | Literal["None", "Clamp", "Revert"] = "Clamp",
        *,
        data_type: Literal["FLOAT", "INT", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {
            "Grid": grid,
            "Velocity": velocity,
            "Time Step": time_step,
            "Integration Scheme": integration_scheme,
            "Limiter": limiter,
        }
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(
        cls,
        grid: InputFloat = 0.0,
        velocity: InputVector = None,
        time_step: InputFloat = 1.0,
        integration_scheme: InputMenu
        | Literal[
            "Semi-Lagrangian",
            "Midpoint",
            "Runge-Kutta 3",
            "Runge-Kutta 4",
            "MacCormack",
            "BFECC",
        ] = "Runge-Kutta 3",
        limiter: InputMenu | Literal["None", "Clamp", "Revert"] = "Clamp",
    ) -> "AdvectGrid[FloatSocket]":
        """Create Advect Grid with operation 'Float'."""
        return AdvectGrid(
            data_type="FLOAT",
            grid=grid,
            velocity=velocity,
            time_step=time_step,
            integration_scheme=integration_scheme,
            limiter=limiter,
        )

    @classmethod
    def integer(
        cls,
        grid: InputInteger = 0,
        velocity: InputVector = None,
        time_step: InputFloat = 1.0,
        integration_scheme: InputMenu
        | Literal[
            "Semi-Lagrangian",
            "Midpoint",
            "Runge-Kutta 3",
            "Runge-Kutta 4",
            "MacCormack",
            "BFECC",
        ] = "Runge-Kutta 3",
        limiter: InputMenu | Literal["None", "Clamp", "Revert"] = "Clamp",
    ) -> "AdvectGrid[IntegerSocket]":
        """Create Advect Grid with operation 'Integer'."""
        return AdvectGrid(
            data_type="INT",
            grid=grid,
            velocity=velocity,
            time_step=time_step,
            integration_scheme=integration_scheme,
            limiter=limiter,
        )

    @classmethod
    def vector(
        cls,
        grid: InputVector = None,
        velocity: InputVector = None,
        time_step: InputFloat = 1.0,
        integration_scheme: InputMenu
        | Literal[
            "Semi-Lagrangian",
            "Midpoint",
            "Runge-Kutta 3",
            "Runge-Kutta 4",
            "MacCormack",
            "BFECC",
        ] = "Runge-Kutta 3",
        limiter: InputMenu | Literal["None", "Clamp", "Revert"] = "Clamp",
    ) -> "AdvectGrid[VectorSocket]":
        """Create Advect Grid with operation 'Vector'."""
        return AdvectGrid(
            data_type="VECTOR",
            grid=grid,
            velocity=velocity,
            time_step=time_step,
            integration_scheme=integration_scheme,
            limiter=limiter,
        )

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "VECTOR"]):
        self.node.data_type = value


class ClipGrid(BaseNode, Generic[_T]):
    """
    Deactivate grid voxels outside minimum and maximum coordinates, setting them to the background value.

    Parameters
    ----------
    grid : InputFloat
        Grid
    min_x : InputInteger
        Min X
    min_y : InputInteger
        Min Y
    min_z : InputInteger
        Min Z
    max_x : InputInteger
        Max X
    max_y : InputInteger
        Max Y
    max_z : InputInteger
        Max Z

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.min_x : IntegerSocket
        Min X
    i.min_y : IntegerSocket
        Min Y
    i.min_z : IntegerSocket
        Min Z
    i.max_x : IntegerSocket
        Max X
    i.max_y : IntegerSocket
        Max Y
    i.max_z : IntegerSocket
        Max Z

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeGridClip"
    node: bpy.types.GeometryNodeGridClip

    class _Inputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""
        min_x: IntegerSocket
        """Min X"""
        min_y: IntegerSocket
        """Min Y"""
        min_z: IntegerSocket
        """Min Z"""
        max_x: IntegerSocket
        """Max X"""
        max_y: IntegerSocket
        """Max Y"""
        max_z: IntegerSocket
        """Max Z"""

    class _Outputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        grid: InputAny = 0.0,
        min_x: InputInteger = 0,
        min_y: InputInteger = 0,
        min_z: InputInteger = 0,
        max_x: InputInteger = 32,
        max_y: InputInteger = 32,
        max_z: InputInteger = 32,
        *,
        data_type: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {
            "Grid": grid,
            "Min X": min_x,
            "Min Y": min_y,
            "Min Z": min_z,
            "Max X": max_x,
            "Max Y": max_y,
            "Max Z": max_z,
        }
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(
        cls,
        grid: InputFloat = 0.0,
        min_x: InputInteger = 0,
        min_y: InputInteger = 0,
        min_z: InputInteger = 0,
        max_x: InputInteger = 32,
        max_y: InputInteger = 32,
        max_z: InputInteger = 32,
    ) -> "ClipGrid[FloatSocket]":
        """Create Clip Grid with operation 'Float'."""
        return ClipGrid(
            data_type="FLOAT",
            grid=grid,
            min_x=min_x,
            min_y=min_y,
            min_z=min_z,
            max_x=max_x,
            max_y=max_y,
            max_z=max_z,
        )

    @classmethod
    def integer(
        cls,
        grid: InputInteger = 0,
        min_x: InputInteger = 0,
        min_y: InputInteger = 0,
        min_z: InputInteger = 0,
        max_x: InputInteger = 32,
        max_y: InputInteger = 32,
        max_z: InputInteger = 32,
    ) -> "ClipGrid[IntegerSocket]":
        """Create Clip Grid with operation 'Integer'."""
        return ClipGrid(
            data_type="INT",
            grid=grid,
            min_x=min_x,
            min_y=min_y,
            min_z=min_z,
            max_x=max_x,
            max_y=max_y,
            max_z=max_z,
        )

    @classmethod
    def boolean(
        cls,
        grid: InputBoolean = False,
        min_x: InputInteger = 0,
        min_y: InputInteger = 0,
        min_z: InputInteger = 0,
        max_x: InputInteger = 32,
        max_y: InputInteger = 32,
        max_z: InputInteger = 32,
    ) -> "ClipGrid[BooleanSocket]":
        """Create Clip Grid with operation 'Boolean'."""
        return ClipGrid(
            data_type="BOOLEAN",
            grid=grid,
            min_x=min_x,
            min_y=min_y,
            min_z=min_z,
            max_x=max_x,
            max_y=max_y,
            max_z=max_z,
        )

    @classmethod
    def vector(
        cls,
        grid: InputVector = None,
        min_x: InputInteger = 0,
        min_y: InputInteger = 0,
        min_z: InputInteger = 0,
        max_x: InputInteger = 32,
        max_y: InputInteger = 32,
        max_z: InputInteger = 32,
    ) -> "ClipGrid[VectorSocket]":
        """Create Clip Grid with operation 'Vector'."""
        return ClipGrid(
            data_type="VECTOR",
            grid=grid,
            min_x=min_x,
            min_y=min_y,
            min_z=min_z,
            max_x=max_x,
            max_y=max_y,
            max_z=max_z,
        )

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]):
        self.node.data_type = value


class CubeGridTopology(BaseNode):
    """
    Create a boolean grid topology with the given dimensions, for use with the Field to Grid node

    Parameters
    ----------
    bounds_min : InputVector
        Bounds Min
    bounds_max : InputVector
        Bounds Max
    resolution_x : InputInteger
        Resolution X
    resolution_y : InputInteger
        Resolution Y
    resolution_z : InputInteger
        Resolution Z
    min_x : InputInteger
        Min X
    min_y : InputInteger
        Min Y
    min_z : InputInteger
        Min Z

    Inputs
    ------
    i.bounds_min : VectorSocket
        Bounds Min
    i.bounds_max : VectorSocket
        Bounds Max
    i.resolution_x : IntegerSocket
        Resolution X
    i.resolution_y : IntegerSocket
        Resolution Y
    i.resolution_z : IntegerSocket
        Resolution Z
    i.min_x : IntegerSocket
        Min X
    i.min_y : IntegerSocket
        Min Y
    i.min_z : IntegerSocket
        Min Z

    Outputs
    -------
    o.topology : BooleanSocket
        Topology
    """

    _bl_idname = "GeometryNodeCubeGridTopology"
    node: bpy.types.GeometryNodeCubeGridTopology

    class _Inputs(SocketAccessor):
        bounds_min: VectorSocket
        """Bounds Min"""
        bounds_max: VectorSocket
        """Bounds Max"""
        resolution_x: IntegerSocket
        """Resolution X"""
        resolution_y: IntegerSocket
        """Resolution Y"""
        resolution_z: IntegerSocket
        """Resolution Z"""
        min_x: IntegerSocket
        """Min X"""
        min_y: IntegerSocket
        """Min Y"""
        min_z: IntegerSocket
        """Min Z"""

    class _Outputs(SocketAccessor):
        topology: BooleanSocketGrid
        """Topology"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        bounds_min: InputVector = None,
        bounds_max: InputVector = None,
        resolution_x: InputInteger = 32,
        resolution_y: InputInteger = 32,
        resolution_z: InputInteger = 32,
        min_x: InputInteger = 0,
        min_y: InputInteger = 0,
        min_z: InputInteger = 0,
    ):
        super().__init__()
        key_args = {
            "Bounds Min": bounds_min,
            "Bounds Max": bounds_max,
            "Resolution X": resolution_x,
            "Resolution Y": resolution_y,
            "Resolution Z": resolution_z,
            "Min X": min_x,
            "Min Y": min_y,
            "Min Z": min_z,
        }

        self._establish_links(**key_args)


class DistributePointsInGrid(BaseNode):
    """
    Generate points inside a volume grid

    Parameters
    ----------
    grid : InputFloat
        Grid
    density : InputFloat
        Density
    seed : InputInteger
        Seed
    spacing : InputVector
        Spacing
    threshold : InputFloat
        Threshold

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.density : FloatSocket
        Density
    i.seed : IntegerSocket
        Seed
    i.spacing : VectorSocket
        Spacing
    i.threshold : FloatSocket
        Threshold

    Outputs
    -------
    o.points : GeometrySocket
        Points
    """

    _bl_idname = "GeometryNodeDistributePointsInGrid"
    node: bpy.types.GeometryNodeDistributePointsInGrid

    class _Inputs(SocketAccessor):
        grid: FloatSocket
        """Grid"""
        density: FloatSocket
        """Density"""
        seed: IntegerSocket
        """Seed"""
        spacing: VectorSocket
        """Spacing"""
        threshold: FloatSocket
        """Threshold"""

    class _Outputs(SocketAccessor):
        points: GeometrySocket
        """Points"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        grid: InputFloat = 0.0,
        density: InputFloat = 1.0,
        seed: InputInteger = 0,
        spacing: InputVector = None,
        threshold: InputFloat = 0.1,
        *,
        mode: Literal["DENSITY_RANDOM", "DENSITY_GRID"] = "DENSITY_RANDOM",
    ):
        super().__init__()
        key_args = {
            "Grid": grid,
            "Density": density,
            "Seed": seed,
            "Spacing": spacing,
            "Threshold": threshold,
        }
        self.mode = mode
        self._establish_links(**key_args)

    @classmethod
    def random(
        cls, grid: InputFloat = 0.0, density: InputFloat = 1.0, seed: InputInteger = 0
    ) -> "DistributePointsInGrid":
        """Create Distribute Points in Grid with operation 'Random'. Distribute points randomly inside of the volume"""
        return cls(mode="DENSITY_RANDOM", grid=grid, density=density, seed=seed)

    @classmethod
    def grid(
        cls,
        grid: InputFloat = 0.0,
        spacing: InputVector = None,
        threshold: InputFloat = 0.1,
    ) -> "DistributePointsInGrid":
        """Create Distribute Points in Grid with operation 'Grid'. Distribute the points in a grid pattern inside of the volume"""
        return cls(mode="DENSITY_GRID", grid=grid, spacing=spacing, threshold=threshold)

    @property
    def mode(self) -> Literal["DENSITY_RANDOM", "DENSITY_GRID"]:
        return self.node.mode

    @mode.setter
    def mode(self, value: Literal["DENSITY_RANDOM", "DENSITY_GRID"]):
        self.node.mode = value


class DistributePointsInVolume(BaseNode):
    """
    Generate points inside a volume

    Parameters
    ----------
    volume : InputGeometry
        Volume
    mode : InputMenu | Literal['Random', 'Grid']
        Mode
    density : InputFloat
        Density
    seed : InputInteger
        Seed
    spacing : InputVector
        Spacing
    threshold : InputFloat
        Threshold

    Inputs
    ------
    i.volume : GeometrySocket
        Volume
    i.mode : MenuSocket
        Mode
    i.density : FloatSocket
        Density
    i.seed : IntegerSocket
        Seed
    i.spacing : VectorSocket
        Spacing
    i.threshold : FloatSocket
        Threshold

    Outputs
    -------
    o.points : GeometrySocket
        Points
    """

    _bl_idname = "GeometryNodeDistributePointsInVolume"
    node: bpy.types.GeometryNodeDistributePointsInVolume

    class _Inputs(SocketAccessor):
        volume: GeometrySocket
        """Volume"""
        mode: MenuSocket
        """Mode"""
        density: FloatSocket
        """Density"""
        seed: IntegerSocket
        """Seed"""
        spacing: VectorSocket
        """Spacing"""
        threshold: FloatSocket
        """Threshold"""

    class _Outputs(SocketAccessor):
        points: GeometrySocket
        """Points"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        volume: InputGeometry = None,
        mode: InputMenu | Literal["Random", "Grid"] = "Random",
        density: InputFloat = 1.0,
        seed: InputInteger = 0,
        spacing: InputVector = None,
        threshold: InputFloat = 0.1,
    ):
        super().__init__()
        key_args = {
            "Volume": volume,
            "Mode": mode,
            "Density": density,
            "Seed": seed,
            "Spacing": spacing,
            "Threshold": threshold,
        }

        self._establish_links(**key_args)


class GetNamedGrid(BaseNode, Generic[_T]):
    """
    Get volume grid from a volume geometry with the specified name

    Parameters
    ----------
    volume : InputGeometry
        Volume
    name : InputString
        Name
    remove : InputBoolean
        Remove

    Inputs
    ------
    i.volume : GeometrySocket
        Volume
    i.name : StringSocket
        Name
    i.remove : BooleanSocket
        Remove

    Outputs
    -------
    o.volume : GeometrySocket
        Volume
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeGetNamedGrid"
    node: bpy.types.GeometryNodeGetNamedGrid

    class _Inputs(SocketAccessor):
        volume: GeometrySocket
        """Volume"""
        name: StringSocket
        """Name"""
        remove: BooleanSocket
        """Remove"""

    class _Outputs(SocketAccessor, Generic[_S]):
        volume: GeometrySocket
        """Volume"""
        grid: _S
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        volume: InputGeometry = None,
        name: InputString = "",
        remove: InputBoolean = True,
        *,
        data_type: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {"Volume": volume, "Name": name, "Remove": remove}
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(
        cls,
        volume: InputGeometry = None,
        name: InputString = "",
        remove: InputBoolean = True,
    ) -> "GetNamedGrid[FloatSocket]":
        """Create Get Named Grid with operation 'Float'."""
        return GetNamedGrid(data_type="FLOAT", volume=volume, name=name, remove=remove)

    @classmethod
    def integer(
        cls,
        volume: InputGeometry = None,
        name: InputString = "",
        remove: InputBoolean = True,
    ) -> "GetNamedGrid[IntegerSocket]":
        """Create Get Named Grid with operation 'Integer'."""
        return GetNamedGrid(data_type="INT", volume=volume, name=name, remove=remove)

    @classmethod
    def boolean(
        cls,
        volume: InputGeometry = None,
        name: InputString = "",
        remove: InputBoolean = True,
    ) -> "GetNamedGrid[BooleanSocket]":
        """Create Get Named Grid with operation 'Boolean'."""
        return GetNamedGrid(
            data_type="BOOLEAN", volume=volume, name=name, remove=remove
        )

    @classmethod
    def vector(
        cls,
        volume: InputGeometry = None,
        name: InputString = "",
        remove: InputBoolean = True,
    ) -> "GetNamedGrid[VectorSocket]":
        """Create Get Named Grid with operation 'Vector'."""
        return GetNamedGrid(data_type="VECTOR", volume=volume, name=name, remove=remove)

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]):
        self.node.data_type = value


class GridCurl(BaseNode):
    """
    Calculate the magnitude and direction of circulation of a directional vector grid

    Parameters
    ----------
    grid : InputVector
        Grid

    Inputs
    ------
    i.grid : VectorSocket
        Grid

    Outputs
    -------
    o.curl : VectorSocket
        Curl
    """

    _bl_idname = "GeometryNodeGridCurl"
    node: bpy.types.GeometryNodeGridCurl

    class _Inputs(SocketAccessor):
        grid: VectorSocket
        """Grid"""

    class _Outputs(SocketAccessor):
        curl: VectorSocketGrid
        """Curl"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(self, grid: InputVector = None):
        super().__init__()
        key_args = {"Grid": grid}

        self._establish_links(**key_args)


class GridDilateErode(BaseNode, Generic[_T]):
    """
    Dilate or erode the active regions of a grid. This changes which voxels are active but does not change their values.

    Parameters
    ----------
    grid : InputFloat
        Grid
    connectivity : InputMenu | Literal['Face', 'Edge', 'Vertex']
        Connectivity
    tiles : InputMenu | Literal['Ignore', 'Expand', 'Preserve']
        Tiles
    steps : InputInteger
        Steps

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.connectivity : MenuSocket
        Connectivity
    i.tiles : MenuSocket
        Tiles
    i.steps : IntegerSocket
        Steps

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeGridDilateAndErode"
    node: bpy.types.GeometryNodeGridDilateAndErode

    class _Inputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""
        connectivity: MenuSocket
        """Connectivity"""
        tiles: MenuSocket
        """Tiles"""
        steps: IntegerSocket
        """Steps"""

    class _Outputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        grid: InputAny = 0.0,
        connectivity: InputMenu | Literal["Face", "Edge", "Vertex"] = "Face",
        tiles: InputMenu | Literal["Ignore", "Expand", "Preserve"] = "Preserve",
        steps: InputInteger = 1,
        *,
        data_type: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {
            "Grid": grid,
            "Connectivity": connectivity,
            "Tiles": tiles,
            "Steps": steps,
        }
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(
        cls,
        grid: InputFloat = 0.0,
        connectivity: InputMenu | Literal["Face", "Edge", "Vertex"] = "Face",
        tiles: InputMenu | Literal["Ignore", "Expand", "Preserve"] = "Preserve",
        steps: InputInteger = 1,
    ) -> "GridDilateErode[FloatSocket]":
        """Create Grid Dilate & Erode with operation 'Float'."""
        return GridDilateErode(
            data_type="FLOAT",
            grid=grid,
            connectivity=connectivity,
            tiles=tiles,
            steps=steps,
        )

    @classmethod
    def integer(
        cls,
        grid: InputInteger = 0,
        connectivity: InputMenu | Literal["Face", "Edge", "Vertex"] = "Face",
        tiles: InputMenu | Literal["Ignore", "Expand", "Preserve"] = "Preserve",
        steps: InputInteger = 1,
    ) -> "GridDilateErode[IntegerSocket]":
        """Create Grid Dilate & Erode with operation 'Integer'."""
        return GridDilateErode(
            data_type="INT",
            grid=grid,
            connectivity=connectivity,
            tiles=tiles,
            steps=steps,
        )

    @classmethod
    def boolean(
        cls,
        grid: InputBoolean = False,
        connectivity: InputMenu | Literal["Face", "Edge", "Vertex"] = "Face",
        tiles: InputMenu | Literal["Ignore", "Expand", "Preserve"] = "Preserve",
        steps: InputInteger = 1,
    ) -> "GridDilateErode[BooleanSocket]":
        """Create Grid Dilate & Erode with operation 'Boolean'."""
        return GridDilateErode(
            data_type="BOOLEAN",
            grid=grid,
            connectivity=connectivity,
            tiles=tiles,
            steps=steps,
        )

    @classmethod
    def vector(
        cls,
        grid: InputVector = None,
        connectivity: InputMenu | Literal["Face", "Edge", "Vertex"] = "Face",
        tiles: InputMenu | Literal["Ignore", "Expand", "Preserve"] = "Preserve",
        steps: InputInteger = 1,
    ) -> "GridDilateErode[VectorSocket]":
        """Create Grid Dilate & Erode with operation 'Vector'."""
        return GridDilateErode(
            data_type="VECTOR",
            grid=grid,
            connectivity=connectivity,
            tiles=tiles,
            steps=steps,
        )

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]):
        self.node.data_type = value


class GridDivergence(BaseNode):
    """
    Calculate the flow into and out of each point of a directional vector grid

    Parameters
    ----------
    grid : InputVector
        Grid

    Inputs
    ------
    i.grid : VectorSocket
        Grid

    Outputs
    -------
    o.divergence : FloatSocket
        Divergence
    """

    _bl_idname = "GeometryNodeGridDivergence"
    node: bpy.types.GeometryNodeGridDivergence

    class _Inputs(SocketAccessor):
        grid: VectorSocket
        """Grid"""

    class _Outputs(SocketAccessor):
        divergence: FloatSocketGrid
        """Divergence"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(self, grid: InputVector = None):
        super().__init__()
        key_args = {"Grid": grid}

        self._establish_links(**key_args)


class GridGradient(BaseNode):
    """
    Calculate the direction and magnitude of the change in values of a scalar grid

    Parameters
    ----------
    grid : InputFloat
        Grid

    Inputs
    ------
    i.grid : FloatSocket
        Grid

    Outputs
    -------
    o.gradient : VectorSocket
        Gradient
    """

    _bl_idname = "GeometryNodeGridGradient"
    node: bpy.types.GeometryNodeGridGradient

    class _Inputs(SocketAccessor):
        grid: FloatSocket
        """Grid"""

    class _Outputs(SocketAccessor):
        gradient: VectorSocketGrid
        """Gradient"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(self, grid: InputFloat = 0.0):
        super().__init__()
        key_args = {"Grid": grid}

        self._establish_links(**key_args)


class GridInfo(BaseNode, Generic[_T]):
    """
    Retrieve information about a volume grid

    Parameters
    ----------
    grid : InputFloat
        Grid

    Inputs
    ------
    i.grid : FloatSocket
        Grid

    Outputs
    -------
    o.transform : MatrixSocket
        Transform
    o.background_value : FloatSocket
        Background Value
    """

    _bl_idname = "GeometryNodeGridInfo"
    node: bpy.types.GeometryNodeGridInfo

    class _Inputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""

    class _Outputs(SocketAccessor, Generic[_S]):
        transform: MatrixSocket
        """Transform"""
        background_value: _S
        """Background Value"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        grid: InputAny = 0.0,
        *,
        data_type: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {"Grid": grid}
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(cls, grid: InputFloat = 0.0) -> "GridInfo[FloatSocket]":
        """Create Grid Info with operation 'Float'."""
        return GridInfo(data_type="FLOAT", grid=grid)

    @classmethod
    def integer(cls, grid: InputInteger = 0) -> "GridInfo[IntegerSocket]":
        """Create Grid Info with operation 'Integer'."""
        return GridInfo(data_type="INT", grid=grid)

    @classmethod
    def boolean(cls, grid: InputBoolean = False) -> "GridInfo[BooleanSocket]":
        """Create Grid Info with operation 'Boolean'."""
        return GridInfo(data_type="BOOLEAN", grid=grid)

    @classmethod
    def vector(cls, grid: InputVector = None) -> "GridInfo[VectorSocket]":
        """Create Grid Info with operation 'Vector'."""
        return GridInfo(data_type="VECTOR", grid=grid)

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]):
        self.node.data_type = value


class GridLaplacian(BaseNode):
    """
    Compute the divergence of the gradient of the input grid

    Parameters
    ----------
    grid : InputFloat
        Grid

    Inputs
    ------
    i.grid : FloatSocket
        Grid

    Outputs
    -------
    o.laplacian : FloatSocket
        Laplacian
    """

    _bl_idname = "GeometryNodeGridLaplacian"
    node: bpy.types.GeometryNodeGridLaplacian

    class _Inputs(SocketAccessor):
        grid: FloatSocket
        """Grid"""

    class _Outputs(SocketAccessor):
        laplacian: FloatSocketGrid
        """Laplacian"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(self, grid: InputFloat = 0.0):
        super().__init__()
        key_args = {"Grid": grid}

        self._establish_links(**key_args)


class GridMean(BaseNode, Generic[_T]):
    """
    Apply mean (box) filter smoothing to a voxel. The mean value from surrounding voxels in a box-shape defined by the radius replaces the voxel value.

    Parameters
    ----------
    grid : InputFloat
        Grid
    width : InputInteger
        Width
    iterations : InputInteger
        Iterations

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.width : IntegerSocket
        Width
    i.iterations : IntegerSocket
        Iterations

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeGridMean"
    node: bpy.types.GeometryNodeGridMean

    class _Inputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""
        width: IntegerSocket
        """Width"""
        iterations: IntegerSocket
        """Iterations"""

    class _Outputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        grid: InputAny = 0.0,
        width: InputInteger = 1,
        iterations: InputInteger = 1,
        *,
        data_type: Literal["FLOAT", "INT", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {"Grid": grid, "Width": width, "Iterations": iterations}
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(
        cls,
        grid: InputFloat = 0.0,
        width: InputInteger = 1,
        iterations: InputInteger = 1,
    ) -> "GridMean[FloatSocket]":
        """Create Grid Mean with operation 'Float'."""
        return GridMean(
            data_type="FLOAT", grid=grid, width=width, iterations=iterations
        )

    @classmethod
    def integer(
        cls,
        grid: InputInteger = 0,
        width: InputInteger = 1,
        iterations: InputInteger = 1,
    ) -> "GridMean[IntegerSocket]":
        """Create Grid Mean with operation 'Integer'."""
        return GridMean(data_type="INT", grid=grid, width=width, iterations=iterations)

    @classmethod
    def vector(
        cls,
        grid: InputVector = None,
        width: InputInteger = 1,
        iterations: InputInteger = 1,
    ) -> "GridMean[VectorSocket]":
        """Create Grid Mean with operation 'Vector'."""
        return GridMean(
            data_type="VECTOR", grid=grid, width=width, iterations=iterations
        )

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "VECTOR"]):
        self.node.data_type = value


class GridMedian(BaseNode, Generic[_T]):
    """
    Apply median (box) filter smoothing to a voxel. The median value from surrounding voxels in a box-shape defined by the radius replaces the voxel value.

    Parameters
    ----------
    grid : InputFloat
        Grid
    width : InputInteger
        Width
    iterations : InputInteger
        Iterations

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.width : IntegerSocket
        Width
    i.iterations : IntegerSocket
        Iterations

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeGridMedian"
    node: bpy.types.GeometryNodeGridMedian

    class _Inputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""
        width: IntegerSocket
        """Width"""
        iterations: IntegerSocket
        """Iterations"""

    class _Outputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        grid: InputAny = 0.0,
        width: InputInteger = 1,
        iterations: InputInteger = 1,
        *,
        data_type: Literal["FLOAT", "INT", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {"Grid": grid, "Width": width, "Iterations": iterations}
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(
        cls,
        grid: InputFloat = 0.0,
        width: InputInteger = 1,
        iterations: InputInteger = 1,
    ) -> "GridMedian[FloatSocket]":
        """Create Grid Median with operation 'Float'."""
        return GridMedian(
            data_type="FLOAT", grid=grid, width=width, iterations=iterations
        )

    @classmethod
    def integer(
        cls,
        grid: InputInteger = 0,
        width: InputInteger = 1,
        iterations: InputInteger = 1,
    ) -> "GridMedian[IntegerSocket]":
        """Create Grid Median with operation 'Integer'."""
        return GridMedian(
            data_type="INT", grid=grid, width=width, iterations=iterations
        )

    @classmethod
    def vector(
        cls,
        grid: InputVector = None,
        width: InputInteger = 1,
        iterations: InputInteger = 1,
    ) -> "GridMedian[VectorSocket]":
        """Create Grid Median with operation 'Vector'."""
        return GridMedian(
            data_type="VECTOR", grid=grid, width=width, iterations=iterations
        )

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "VECTOR"]):
        self.node.data_type = value


class GridToMesh(BaseNode):
    """
    Generate a mesh on the "surface" of a volume grid

    Parameters
    ----------
    grid : InputFloat
        Grid
    threshold : InputFloat
        Threshold
    adaptivity : InputFloat
        Adaptivity

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.threshold : FloatSocket
        Threshold
    i.adaptivity : FloatSocket
        Adaptivity

    Outputs
    -------
    o.mesh : GeometrySocket
        Mesh
    """

    _bl_idname = "GeometryNodeGridToMesh"
    node: bpy.types.GeometryNodeGridToMesh

    class _Inputs(SocketAccessor):
        grid: FloatSocket
        """Grid"""
        threshold: FloatSocket
        """Threshold"""
        adaptivity: FloatSocket
        """Adaptivity"""

    class _Outputs(SocketAccessor):
        mesh: GeometrySocket
        """Mesh"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        grid: InputFloat = 0.0,
        threshold: InputFloat = 0.1,
        adaptivity: InputFloat = 0.0,
    ):
        super().__init__()
        key_args = {"Grid": grid, "Threshold": threshold, "Adaptivity": adaptivity}

        self._establish_links(**key_args)


class GridToPoints(BaseNode, Generic[_T]):
    """
    Generate a point cloud from a volume grid's active voxels

    Parameters
    ----------
    grid : InputFloat
        Grid

    Inputs
    ------
    i.grid : FloatSocket
        Grid

    Outputs
    -------
    o.points : GeometrySocket
        Points
    o.value : FloatSocket
        Value
    o.x : IntegerSocket
        X
    o.y : IntegerSocket
        Y
    o.z : IntegerSocket
        Z
    o.is_tile : BooleanSocket
        Is Tile
    o.extent : IntegerSocket
        Extent
    """

    _bl_idname = "GeometryNodeGridToPoints"
    node: bpy.types.GeometryNodeGridToPoints

    class _Inputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""

    class _Outputs(SocketAccessor, Generic[_S]):
        points: GeometrySocket
        """Points"""
        value: _S
        """Value"""
        x: IntegerSocket
        """X"""
        y: IntegerSocket
        """Y"""
        z: IntegerSocket
        """Z"""
        is_tile: BooleanSocket
        """Is Tile"""
        extent: IntegerSocket
        """Extent"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        grid: InputAny = 0.0,
        *,
        data_type: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {"Grid": grid}
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(cls, grid: InputFloat = 0.0) -> "GridToPoints[FloatSocket]":
        """Create Grid to Points with operation 'Float'."""
        return GridToPoints(data_type="FLOAT", grid=grid)

    @classmethod
    def integer(cls, grid: InputInteger = 0) -> "GridToPoints[IntegerSocket]":
        """Create Grid to Points with operation 'Integer'."""
        return GridToPoints(data_type="INT", grid=grid)

    @classmethod
    def boolean(cls, grid: InputBoolean = False) -> "GridToPoints[BooleanSocket]":
        """Create Grid to Points with operation 'Boolean'."""
        return GridToPoints(data_type="BOOLEAN", grid=grid)

    @classmethod
    def vector(cls, grid: InputVector = None) -> "GridToPoints[VectorSocket]":
        """Create Grid to Points with operation 'Vector'."""
        return GridToPoints(data_type="VECTOR", grid=grid)

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]):
        self.node.data_type = value


class MeshToDensityGrid(BaseNode):
    """
    Create a filled volume grid from a mesh

    Parameters
    ----------
    mesh : InputGeometry
        Mesh
    density : InputFloat
        Density
    voxel_size : InputFloat
        Voxel Size
    gradient_width : InputFloat
        Gradient Width

    Inputs
    ------
    i.mesh : GeometrySocket
        Mesh
    i.density : FloatSocket
        Density
    i.voxel_size : FloatSocket
        Voxel Size
    i.gradient_width : FloatSocket
        Gradient Width

    Outputs
    -------
    o.density_grid : FloatSocket
        Density Grid
    """

    _bl_idname = "GeometryNodeMeshToDensityGrid"
    node: bpy.types.GeometryNodeMeshToDensityGrid

    class _Inputs(SocketAccessor):
        mesh: GeometrySocket
        """Mesh"""
        density: FloatSocket
        """Density"""
        voxel_size: FloatSocket
        """Voxel Size"""
        gradient_width: FloatSocket
        """Gradient Width"""

    class _Outputs(SocketAccessor):
        density_grid: FloatSocketGrid
        """Density Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        mesh: InputGeometry = None,
        density: InputFloat = 1.0,
        voxel_size: InputFloat = 0.3,
        gradient_width: InputFloat = 0.2,
    ):
        super().__init__()
        key_args = {
            "Mesh": mesh,
            "Density": density,
            "Voxel Size": voxel_size,
            "Gradient Width": gradient_width,
        }

        self._establish_links(**key_args)


class MeshToSDFGrid(BaseNode):
    """
    Create a signed distance volume grid from a mesh

    Parameters
    ----------
    mesh : InputGeometry
        Mesh
    voxel_size : InputFloat
        Voxel Size
    band_width : InputInteger
        Band Width

    Inputs
    ------
    i.mesh : GeometrySocket
        Mesh
    i.voxel_size : FloatSocket
        Voxel Size
    i.band_width : IntegerSocket
        Band Width

    Outputs
    -------
    o.sdf_grid : FloatSocket
        SDF Grid
    """

    _bl_idname = "GeometryNodeMeshToSDFGrid"
    node: bpy.types.GeometryNodeMeshToSDFGrid

    class _Inputs(SocketAccessor):
        mesh: GeometrySocket
        """Mesh"""
        voxel_size: FloatSocket
        """Voxel Size"""
        band_width: IntegerSocket
        """Band Width"""

    class _Outputs(SocketAccessor):
        sdf_grid: FloatSocketGrid
        """SDF Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        mesh: InputGeometry = None,
        voxel_size: InputFloat = 0.3,
        band_width: InputInteger = 3,
    ):
        super().__init__()
        key_args = {"Mesh": mesh, "Voxel Size": voxel_size, "Band Width": band_width}

        self._establish_links(**key_args)


class MeshToVolume(BaseNode):
    """
    Create a fog volume with the shape of the input mesh's surface

    Parameters
    ----------
    mesh : InputGeometry
        Mesh
    density : InputFloat
        Density
    resolution_mode : InputMenu | Literal['Amount', 'Size']
        Resolution Mode
    voxel_size : InputFloat
        Voxel Size
    voxel_amount : InputFloat
        Voxel Amount
    interior_band_width : InputFloat
        Interior Band Width

    Inputs
    ------
    i.mesh : GeometrySocket
        Mesh
    i.density : FloatSocket
        Density
    i.resolution_mode : MenuSocket
        Resolution Mode
    i.voxel_size : FloatSocket
        Voxel Size
    i.voxel_amount : FloatSocket
        Voxel Amount
    i.interior_band_width : FloatSocket
        Interior Band Width

    Outputs
    -------
    o.volume : GeometrySocket
        Volume
    """

    _bl_idname = "GeometryNodeMeshToVolume"
    node: bpy.types.GeometryNodeMeshToVolume

    class _Inputs(SocketAccessor):
        mesh: GeometrySocket
        """Mesh"""
        density: FloatSocket
        """Density"""
        resolution_mode: MenuSocket
        """Resolution Mode"""
        voxel_size: FloatSocket
        """Voxel Size"""
        voxel_amount: FloatSocket
        """Voxel Amount"""
        interior_band_width: FloatSocket
        """Interior Band Width"""

    class _Outputs(SocketAccessor):
        volume: GeometrySocket
        """Volume"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        mesh: InputGeometry = None,
        density: InputFloat = 1.0,
        resolution_mode: InputMenu | Literal["Amount", "Size"] = "Amount",
        voxel_size: InputFloat = 0.3,
        voxel_amount: InputFloat = 64.0,
        interior_band_width: InputFloat = 0.2,
    ):
        super().__init__()
        key_args = {
            "Mesh": mesh,
            "Density": density,
            "Resolution Mode": resolution_mode,
            "Voxel Size": voxel_size,
            "Voxel Amount": voxel_amount,
            "Interior Band Width": interior_band_width,
        }

        self._establish_links(**key_args)


class PointsToSDFGrid(BaseNode):
    """
    Create a signed distance volume grid from points

    Parameters
    ----------
    points : InputGeometry
        Points
    radius : InputFloat
        Radius
    voxel_size : InputFloat
        Voxel Size

    Inputs
    ------
    i.points : GeometrySocket
        Points
    i.radius : FloatSocket
        Radius
    i.voxel_size : FloatSocket
        Voxel Size

    Outputs
    -------
    o.sdf_grid : FloatSocket
        SDF Grid
    """

    _bl_idname = "GeometryNodePointsToSDFGrid"
    node: bpy.types.GeometryNodePointsToSDFGrid

    class _Inputs(SocketAccessor):
        points: GeometrySocket
        """Points"""
        radius: FloatSocket
        """Radius"""
        voxel_size: FloatSocket
        """Voxel Size"""

    class _Outputs(SocketAccessor):
        sdf_grid: FloatSocketGrid
        """SDF Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        points: InputGeometry = None,
        radius: InputFloat = 0.5,
        voxel_size: InputFloat = 0.3,
    ):
        super().__init__()
        key_args = {"Points": points, "Radius": radius, "Voxel Size": voxel_size}

        self._establish_links(**key_args)


class PointsToVolume(BaseNode):
    """
    Generate a fog volume sphere around every point

    Parameters
    ----------
    points : InputGeometry
        Points
    density : InputFloat
        Density
    resolution_mode : InputMenu | Literal['Amount', 'Size']
        Resolution Mode
    voxel_size : InputFloat
        Voxel Size
    voxel_amount : InputFloat
        Voxel Amount
    radius : InputFloat
        Radius

    Inputs
    ------
    i.points : GeometrySocket
        Points
    i.density : FloatSocket
        Density
    i.resolution_mode : MenuSocket
        Resolution Mode
    i.voxel_size : FloatSocket
        Voxel Size
    i.voxel_amount : FloatSocket
        Voxel Amount
    i.radius : FloatSocket
        Radius

    Outputs
    -------
    o.volume : GeometrySocket
        Volume
    """

    _bl_idname = "GeometryNodePointsToVolume"
    node: bpy.types.GeometryNodePointsToVolume

    class _Inputs(SocketAccessor):
        points: GeometrySocket
        """Points"""
        density: FloatSocket
        """Density"""
        resolution_mode: MenuSocket
        """Resolution Mode"""
        voxel_size: FloatSocket
        """Voxel Size"""
        voxel_amount: FloatSocket
        """Voxel Amount"""
        radius: FloatSocket
        """Radius"""

    class _Outputs(SocketAccessor):
        volume: GeometrySocket
        """Volume"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        points: InputGeometry = None,
        density: InputFloat = 1.0,
        resolution_mode: InputMenu | Literal["Amount", "Size"] = "Amount",
        voxel_size: InputFloat = 0.3,
        voxel_amount: InputFloat = 64.0,
        radius: InputFloat = 0.5,
    ):
        super().__init__()
        key_args = {
            "Points": points,
            "Density": density,
            "Resolution Mode": resolution_mode,
            "Voxel Size": voxel_size,
            "Voxel Amount": voxel_amount,
            "Radius": radius,
        }

        self._establish_links(**key_args)


class PruneGrid(BaseNode, Generic[_T]):
    """
    Make the storage of a volume grid more efficient by collapsing data into tiles or inner nodes

    Parameters
    ----------
    grid : InputFloat
        Grid
    mode : InputMenu | Literal['Inactive', 'Threshold', 'SDF']
        Mode
    threshold : InputFloat
        Threshold

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.mode : MenuSocket
        Mode
    i.threshold : FloatSocket
        Threshold

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeGridPrune"
    node: bpy.types.GeometryNodeGridPrune

    class _Inputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""
        mode: MenuSocket
        """Mode"""
        threshold: _S
        """Threshold"""

    class _Outputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        grid: InputAny = 0.0,
        mode: InputMenu | Literal["Inactive", "Threshold", "SDF"] = "Threshold",
        threshold: InputAny = 0.01,
        *,
        data_type: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {"Grid": grid, "Mode": mode, "Threshold": threshold}
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(
        cls,
        grid: InputFloat = 0.0,
        mode: InputMenu | Literal["Inactive", "Threshold", "SDF"] = "Threshold",
        threshold: InputFloat = 0.01,
    ) -> "PruneGrid[FloatSocket]":
        """Create Prune Grid with operation 'Float'."""
        return PruneGrid(data_type="FLOAT", grid=grid, mode=mode, threshold=threshold)

    @classmethod
    def integer(
        cls,
        grid: InputInteger = 0,
        mode: InputMenu | Literal["Inactive", "Threshold", "SDF"] = "Threshold",
        threshold: InputInteger = 0,
    ) -> "PruneGrid[IntegerSocket]":
        """Create Prune Grid with operation 'Integer'."""
        return PruneGrid(data_type="INT", grid=grid, mode=mode, threshold=threshold)

    @classmethod
    def boolean(
        cls,
        grid: InputBoolean = False,
        mode: InputMenu | Literal["Inactive", "Threshold", "SDF"] = "Threshold",
    ) -> "PruneGrid[BooleanSocket]":
        """Create Prune Grid with operation 'Boolean'."""
        return PruneGrid(data_type="BOOLEAN", grid=grid, mode=mode)

    @classmethod
    def vector(
        cls,
        grid: InputVector = None,
        mode: InputMenu | Literal["Inactive", "Threshold", "SDF"] = "Threshold",
        threshold: InputVector = None,
    ) -> "PruneGrid[VectorSocket]":
        """Create Prune Grid with operation 'Vector'."""
        return PruneGrid(data_type="VECTOR", grid=grid, mode=mode, threshold=threshold)

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]):
        self.node.data_type = value


class SDFGridFillet(BaseNode):
    """
    Round off concave internal corners in a signed distance field. Only affects areas with negative principal curvature, creating smoother transitions between surfaces

    Parameters
    ----------
    grid : InputFloat
        Grid
    iterations : InputInteger
        Iterations

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.iterations : IntegerSocket
        Iterations

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeSDFGridFillet"
    node: bpy.types.GeometryNodeSDFGridFillet

    class _Inputs(SocketAccessor):
        grid: FloatSocket
        """Grid"""
        iterations: IntegerSocket
        """Iterations"""

    class _Outputs(SocketAccessor):
        grid: FloatSocketGrid
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        grid: InputFloat = 0.0,
        iterations: InputInteger = 1,
    ):
        super().__init__()
        key_args = {"Grid": grid, "Iterations": iterations}

        self._establish_links(**key_args)


class SDFGridLaplacian(BaseNode):
    """
    Apply Laplacian flow smoothing to a signed distance field. Computationally efficient alternative to mean curvature flow, ideal when combined with SDF normalization

    Parameters
    ----------
    grid : InputFloat
        Grid
    iterations : InputInteger
        Iterations

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.iterations : IntegerSocket
        Iterations

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeSDFGridLaplacian"
    node: bpy.types.GeometryNodeSDFGridLaplacian

    class _Inputs(SocketAccessor):
        grid: FloatSocket
        """Grid"""
        iterations: IntegerSocket
        """Iterations"""

    class _Outputs(SocketAccessor):
        grid: FloatSocketGrid
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        grid: InputFloat = 0.0,
        iterations: InputInteger = 1,
    ):
        super().__init__()
        key_args = {"Grid": grid, "Iterations": iterations}

        self._establish_links(**key_args)


class SDFGridMean(BaseNode):
    """
    Apply mean (box) filter smoothing to a signed distance field. Fast separable averaging filter for general smoothing of the distance field

    Parameters
    ----------
    grid : InputFloat
        Grid
    width : InputInteger
        Width
    iterations : InputInteger
        Iterations

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.width : IntegerSocket
        Width
    i.iterations : IntegerSocket
        Iterations

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeSDFGridMean"
    node: bpy.types.GeometryNodeSDFGridMean

    class _Inputs(SocketAccessor):
        grid: FloatSocket
        """Grid"""
        width: IntegerSocket
        """Width"""
        iterations: IntegerSocket
        """Iterations"""

    class _Outputs(SocketAccessor):
        grid: FloatSocketGrid
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        grid: InputFloat = 0.0,
        width: InputInteger = 1,
        iterations: InputInteger = 1,
    ):
        super().__init__()
        key_args = {"Grid": grid, "Width": width, "Iterations": iterations}

        self._establish_links(**key_args)


class SDFGridMeanCurvature(BaseNode):
    """
    Apply mean curvature flow smoothing to a signed distance field. Evolves the surface based on its mean curvature, naturally smoothing high-curvature regions more than flat areas

    Parameters
    ----------
    grid : InputFloat
        Grid
    iterations : InputInteger
        Iterations

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.iterations : IntegerSocket
        Iterations

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeSDFGridMeanCurvature"
    node: bpy.types.GeometryNodeSDFGridMeanCurvature

    class _Inputs(SocketAccessor):
        grid: FloatSocket
        """Grid"""
        iterations: IntegerSocket
        """Iterations"""

    class _Outputs(SocketAccessor):
        grid: FloatSocketGrid
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        grid: InputFloat = 0.0,
        iterations: InputInteger = 1,
    ):
        super().__init__()
        key_args = {"Grid": grid, "Iterations": iterations}

        self._establish_links(**key_args)


class SDFGridMedian(BaseNode):
    """
    Apply median filter to a signed distance field. Reduces noise while preserving sharp features and edges in the distance field

    Parameters
    ----------
    grid : InputFloat
        Grid
    width : InputInteger
        Width
    iterations : InputInteger
        Iterations

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.width : IntegerSocket
        Width
    i.iterations : IntegerSocket
        Iterations

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeSDFGridMedian"
    node: bpy.types.GeometryNodeSDFGridMedian

    class _Inputs(SocketAccessor):
        grid: FloatSocket
        """Grid"""
        width: IntegerSocket
        """Width"""
        iterations: IntegerSocket
        """Iterations"""

    class _Outputs(SocketAccessor):
        grid: FloatSocketGrid
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        grid: InputFloat = 0.0,
        width: InputInteger = 1,
        iterations: InputInteger = 1,
    ):
        super().__init__()
        key_args = {"Grid": grid, "Width": width, "Iterations": iterations}

        self._establish_links(**key_args)


class SDFGridOffset(BaseNode):
    """
    Offset a signed distance field surface by a world-space distance. Dilates (positive) or erodes (negative) while maintaining the signed distance property

    Parameters
    ----------
    grid : InputFloat
        Grid
    distance : InputFloat
        Distance

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.distance : FloatSocket
        Distance

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeSDFGridOffset"
    node: bpy.types.GeometryNodeSDFGridOffset

    class _Inputs(SocketAccessor):
        grid: FloatSocket
        """Grid"""
        distance: FloatSocket
        """Distance"""

    class _Outputs(SocketAccessor):
        grid: FloatSocketGrid
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        grid: InputFloat = 0.0,
        distance: InputFloat = 0.1,
    ):
        super().__init__()
        key_args = {"Grid": grid, "Distance": distance}

        self._establish_links(**key_args)


class SampleGrid(BaseNode, Generic[_T]):
    """
    Retrieve values from the specified volume grid

    Parameters
    ----------
    grid : InputFloat
        Grid
    position : InputVector
        Position
    interpolation : InputMenu | Literal['Nearest Neighbor', 'Trilinear', 'Triquadratic']
        Interpolation

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.position : VectorSocket
        Position
    i.interpolation : MenuSocket
        Interpolation

    Outputs
    -------
    o.value : FloatSocket
        Value
    """

    _bl_idname = "GeometryNodeSampleGrid"
    node: bpy.types.GeometryNodeSampleGrid

    class _Inputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""
        position: VectorSocket
        """Position"""
        interpolation: MenuSocket
        """Interpolation"""

    class _Outputs(SocketAccessor, Generic[_S]):
        value: _S
        """Value"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        grid: InputAny = 0.0,
        position: InputVector = None,
        interpolation: InputMenu
        | Literal["Nearest Neighbor", "Trilinear", "Triquadratic"] = "Trilinear",
        *,
        data_type: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {"Grid": grid, "Position": position, "Interpolation": interpolation}
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(
        cls,
        grid: InputFloat = 0.0,
        position: InputVector = None,
        interpolation: InputMenu
        | Literal["Nearest Neighbor", "Trilinear", "Triquadratic"] = "Trilinear",
    ) -> "SampleGrid[FloatSocket]":
        """Create Sample Grid with operation 'Float'."""
        return SampleGrid(
            data_type="FLOAT", grid=grid, position=position, interpolation=interpolation
        )

    @classmethod
    def integer(
        cls,
        grid: InputInteger = 0,
        position: InputVector = None,
        interpolation: InputMenu
        | Literal["Nearest Neighbor", "Trilinear", "Triquadratic"] = "Trilinear",
    ) -> "SampleGrid[IntegerSocket]":
        """Create Sample Grid with operation 'Integer'."""
        return SampleGrid(
            data_type="INT", grid=grid, position=position, interpolation=interpolation
        )

    @classmethod
    def boolean(
        cls,
        grid: InputBoolean = False,
        position: InputVector = None,
        interpolation: InputMenu
        | Literal["Nearest Neighbor", "Trilinear", "Triquadratic"] = "Trilinear",
    ) -> "SampleGrid[BooleanSocket]":
        """Create Sample Grid with operation 'Boolean'."""
        return SampleGrid(
            data_type="BOOLEAN",
            grid=grid,
            position=position,
            interpolation=interpolation,
        )

    @classmethod
    def vector(
        cls,
        grid: InputVector = None,
        position: InputVector = None,
        interpolation: InputMenu
        | Literal["Nearest Neighbor", "Trilinear", "Triquadratic"] = "Trilinear",
    ) -> "SampleGrid[VectorSocket]":
        """Create Sample Grid with operation 'Vector'."""
        return SampleGrid(
            data_type="VECTOR",
            grid=grid,
            position=position,
            interpolation=interpolation,
        )

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]):
        self.node.data_type = value


class SampleGridIndex(BaseNode, Generic[_T]):
    """
    Retrieve volume grid values at specific voxels

    Parameters
    ----------
    grid : InputFloat
        Grid
    x : InputInteger
        X
    y : InputInteger
        Y
    z : InputInteger
        Z

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.x : IntegerSocket
        X
    i.y : IntegerSocket
        Y
    i.z : IntegerSocket
        Z

    Outputs
    -------
    o.value : FloatSocket
        Value
    """

    _bl_idname = "GeometryNodeSampleGridIndex"
    node: bpy.types.GeometryNodeSampleGridIndex

    class _Inputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""
        x: IntegerSocket
        """X"""
        y: IntegerSocket
        """Y"""
        z: IntegerSocket
        """Z"""

    class _Outputs(SocketAccessor, Generic[_S]):
        value: _S
        """Value"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        grid: InputAny = 0.0,
        x: InputInteger = 0,
        y: InputInteger = 0,
        z: InputInteger = 0,
        *,
        data_type: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {"Grid": grid, "X": x, "Y": y, "Z": z}
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(
        cls,
        grid: InputFloat = 0.0,
        x: InputInteger = 0,
        y: InputInteger = 0,
        z: InputInteger = 0,
    ) -> "SampleGridIndex[FloatSocket]":
        """Create Sample Grid Index with operation 'Float'."""
        return SampleGridIndex(data_type="FLOAT", grid=grid, x=x, y=y, z=z)

    @classmethod
    def integer(
        cls,
        grid: InputInteger = 0,
        x: InputInteger = 0,
        y: InputInteger = 0,
        z: InputInteger = 0,
    ) -> "SampleGridIndex[IntegerSocket]":
        """Create Sample Grid Index with operation 'Integer'."""
        return SampleGridIndex(data_type="INT", grid=grid, x=x, y=y, z=z)

    @classmethod
    def boolean(
        cls,
        grid: InputBoolean = False,
        x: InputInteger = 0,
        y: InputInteger = 0,
        z: InputInteger = 0,
    ) -> "SampleGridIndex[BooleanSocket]":
        """Create Sample Grid Index with operation 'Boolean'."""
        return SampleGridIndex(data_type="BOOLEAN", grid=grid, x=x, y=y, z=z)

    @classmethod
    def vector(
        cls,
        grid: InputVector = None,
        x: InputInteger = 0,
        y: InputInteger = 0,
        z: InputInteger = 0,
    ) -> "SampleGridIndex[VectorSocket]":
        """Create Sample Grid Index with operation 'Vector'."""
        return SampleGridIndex(data_type="VECTOR", grid=grid, x=x, y=y, z=z)

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]):
        self.node.data_type = value


class SetGridBackground(BaseNode, Generic[_T]):
    """
    Set the background value used for inactive voxels and tiles

    Parameters
    ----------
    grid : InputFloat
        Grid
    background : InputFloat
        Background
    update_inactive : InputBoolean
        Update Inactive

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.background : FloatSocket
        Background
    i.update_inactive : BooleanSocket
        Update Inactive

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeSetGridBackground"
    node: bpy.types.GeometryNodeSetGridBackground

    class _Inputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""
        background: _S
        """Background"""
        update_inactive: BooleanSocket
        """Update Inactive"""

    class _Outputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        grid: InputAny = 0.0,
        background: InputAny = 0.0,
        update_inactive: InputBoolean = False,
        *,
        data_type: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {
            "Grid": grid,
            "Background": background,
            "Update Inactive": update_inactive,
        }
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(
        cls,
        grid: InputFloat = 0.0,
        background: InputFloat = 0.0,
        update_inactive: InputBoolean = False,
    ) -> "SetGridBackground[FloatSocket]":
        """Create Set Grid Background with operation 'Float'."""
        return SetGridBackground(
            data_type="FLOAT",
            grid=grid,
            background=background,
            update_inactive=update_inactive,
        )

    @classmethod
    def integer(
        cls,
        grid: InputInteger = 0,
        background: InputInteger = 0,
        update_inactive: InputBoolean = False,
    ) -> "SetGridBackground[IntegerSocket]":
        """Create Set Grid Background with operation 'Integer'."""
        return SetGridBackground(
            data_type="INT",
            grid=grid,
            background=background,
            update_inactive=update_inactive,
        )

    @classmethod
    def boolean(
        cls,
        grid: InputBoolean = False,
        background: InputBoolean = False,
        update_inactive: InputBoolean = False,
    ) -> "SetGridBackground[BooleanSocket]":
        """Create Set Grid Background with operation 'Boolean'."""
        return SetGridBackground(
            data_type="BOOLEAN",
            grid=grid,
            background=background,
            update_inactive=update_inactive,
        )

    @classmethod
    def vector(
        cls,
        grid: InputVector = None,
        background: InputVector = None,
        update_inactive: InputBoolean = False,
    ) -> "SetGridBackground[VectorSocket]":
        """Create Set Grid Background with operation 'Vector'."""
        return SetGridBackground(
            data_type="VECTOR",
            grid=grid,
            background=background,
            update_inactive=update_inactive,
        )

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]):
        self.node.data_type = value


class SetGridTransform(BaseNode, Generic[_T]):
    """
    Set the transform for the grid from index space into object space.

    Parameters
    ----------
    grid : InputFloat
        Grid
    transform : InputMatrix
        Transform

    Inputs
    ------
    i.grid : FloatSocket
        Grid
    i.transform : MatrixSocket
        Transform

    Outputs
    -------
    o.is_valid : BooleanSocket
        Is Valid
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeSetGridTransform"
    node: bpy.types.GeometryNodeSetGridTransform

    class _Inputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""
        transform: MatrixSocket
        """Transform"""

    class _Outputs(SocketAccessor, Generic[_S]):
        is_valid: BooleanSocket
        """Is Valid"""
        grid: _S
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        grid: InputAny = 0.0,
        transform: InputMatrix = None,
        *,
        data_type: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {"Grid": grid, "Transform": transform}
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(
        cls, grid: InputFloat = 0.0, transform: InputMatrix = None
    ) -> "SetGridTransform[FloatSocket]":
        """Create Set Grid Transform with operation 'Float'."""
        return SetGridTransform(data_type="FLOAT", grid=grid, transform=transform)

    @classmethod
    def integer(
        cls, grid: InputInteger = 0, transform: InputMatrix = None
    ) -> "SetGridTransform[IntegerSocket]":
        """Create Set Grid Transform with operation 'Integer'."""
        return SetGridTransform(data_type="INT", grid=grid, transform=transform)

    @classmethod
    def boolean(
        cls, grid: InputBoolean = False, transform: InputMatrix = None
    ) -> "SetGridTransform[BooleanSocket]":
        """Create Set Grid Transform with operation 'Boolean'."""
        return SetGridTransform(data_type="BOOLEAN", grid=grid, transform=transform)

    @classmethod
    def vector(
        cls, grid: InputVector = None, transform: InputMatrix = None
    ) -> "SetGridTransform[VectorSocket]":
        """Create Set Grid Transform with operation 'Vector'."""
        return SetGridTransform(data_type="VECTOR", grid=grid, transform=transform)

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]):
        self.node.data_type = value


class StoreNamedGrid(BaseNode, Generic[_T]):
    """
    Store grid data in a volume geometry with the specified name

    Parameters
    ----------
    volume : InputGeometry
        Volume
    name : InputString
        Name
    grid : InputFloat
        Grid

    Inputs
    ------
    i.volume : GeometrySocket
        Volume
    i.name : StringSocket
        Name
    i.grid : FloatSocket
        Grid

    Outputs
    -------
    o.volume : GeometrySocket
        Volume
    """

    _bl_idname = "GeometryNodeStoreNamedGrid"
    node: bpy.types.GeometryNodeStoreNamedGrid

    class _Inputs(SocketAccessor, Generic[_S]):
        volume: GeometrySocket
        """Volume"""
        name: StringSocket
        """Name"""
        grid: _S
        """Grid"""

    class _Outputs(SocketAccessor):
        volume: GeometrySocket
        """Volume"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        volume: InputGeometry = None,
        name: InputString = "",
        grid: InputAny = 0.0,
        *,
        data_type: Literal["BOOLEAN", "FLOAT", "INT", "VECTOR_FLOAT"] = "FLOAT",
    ):
        super().__init__()
        key_args = {"Volume": volume, "Name": name, "Grid": grid}
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def boolean(
        cls,
        volume: InputGeometry = None,
        name: InputString = "",
        grid: InputBoolean = False,
    ) -> "StoreNamedGrid[BooleanSocket]":
        """Create Store Named Grid with operation 'Boolean'. Boolean"""
        return StoreNamedGrid(data_type="BOOLEAN", volume=volume, name=name, grid=grid)

    @classmethod
    def float(
        cls,
        volume: InputGeometry = None,
        name: InputString = "",
        grid: InputFloat = 0.0,
    ) -> "StoreNamedGrid[FloatSocket]":
        """Create Store Named Grid with operation 'Float'. Single precision float"""
        return StoreNamedGrid(data_type="FLOAT", volume=volume, name=name, grid=grid)

    @classmethod
    def integer(
        cls,
        volume: InputGeometry = None,
        name: InputString = "",
        grid: InputInteger = 0,
    ) -> "StoreNamedGrid[IntegerSocket]":
        """Create Store Named Grid with operation 'Integer'. 32-bit integer"""
        return StoreNamedGrid(data_type="INT", volume=volume, name=name, grid=grid)

    @classmethod
    def vector(
        cls,
        volume: InputGeometry = None,
        name: InputString = "",
        grid: InputVector = None,
    ) -> "StoreNamedGrid[VectorSocket]":
        """Create Store Named Grid with operation 'Vector'. 3D float vector"""
        return StoreNamedGrid(
            data_type="VECTOR_FLOAT", volume=volume, name=name, grid=grid
        )

    @property
    def data_type(self) -> Literal["BOOLEAN", "FLOAT", "INT", "VECTOR_FLOAT"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["BOOLEAN", "FLOAT", "INT", "VECTOR_FLOAT"]):
        self.node.data_type = value


class VolumeCube(BaseNode):
    """
    Generate a dense volume with a field that controls the density at each grid voxel based on its position

    Parameters
    ----------
    density : InputFloat
        Density
    background : InputFloat
        Background
    min : InputVector
        Min
    max : InputVector
        Max
    resolution_x : InputInteger
        Resolution X
    resolution_y : InputInteger
        Resolution Y
    resolution_z : InputInteger
        Resolution Z

    Inputs
    ------
    i.density : FloatSocket
        Density
    i.background : FloatSocket
        Background
    i.min : VectorSocket
        Min
    i.max : VectorSocket
        Max
    i.resolution_x : IntegerSocket
        Resolution X
    i.resolution_y : IntegerSocket
        Resolution Y
    i.resolution_z : IntegerSocket
        Resolution Z

    Outputs
    -------
    o.volume : GeometrySocket
        Volume
    """

    _bl_idname = "GeometryNodeVolumeCube"
    node: bpy.types.GeometryNodeVolumeCube

    class _Inputs(SocketAccessor):
        density: FloatSocket
        """Density"""
        background: FloatSocket
        """Background"""
        min: VectorSocket
        """Min"""
        max: VectorSocket
        """Max"""
        resolution_x: IntegerSocket
        """Resolution X"""
        resolution_y: IntegerSocket
        """Resolution Y"""
        resolution_z: IntegerSocket
        """Resolution Z"""

    class _Outputs(SocketAccessor):
        volume: GeometrySocket
        """Volume"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        density: InputFloat = 1.0,
        background: InputFloat = 0.0,
        min: InputVector = None,
        max: InputVector = None,
        resolution_x: InputInteger = 32,
        resolution_y: InputInteger = 32,
        resolution_z: InputInteger = 32,
    ):
        super().__init__()
        key_args = {
            "Density": density,
            "Background": background,
            "Min": min,
            "Max": max,
            "Resolution X": resolution_x,
            "Resolution Y": resolution_y,
            "Resolution Z": resolution_z,
        }

        self._establish_links(**key_args)


class VolumeToMesh(BaseNode):
    """
    Generate a mesh on the "surface" of a volume

    Parameters
    ----------
    volume : InputGeometry
        Volume
    resolution_mode : InputMenu | Literal['Grid', 'Amount', 'Size']
        Resolution Mode
    voxel_size : InputFloat
        Voxel Size
    voxel_amount : InputFloat
        Voxel Amount
    threshold : InputFloat
        Threshold
    adaptivity : InputFloat
        Adaptivity

    Inputs
    ------
    i.volume : GeometrySocket
        Volume
    i.resolution_mode : MenuSocket
        Resolution Mode
    i.voxel_size : FloatSocket
        Voxel Size
    i.voxel_amount : FloatSocket
        Voxel Amount
    i.threshold : FloatSocket
        Threshold
    i.adaptivity : FloatSocket
        Adaptivity

    Outputs
    -------
    o.mesh : GeometrySocket
        Mesh
    """

    _bl_idname = "GeometryNodeVolumeToMesh"
    node: bpy.types.GeometryNodeVolumeToMesh

    class _Inputs(SocketAccessor):
        volume: GeometrySocket
        """Volume"""
        resolution_mode: MenuSocket
        """Resolution Mode"""
        voxel_size: FloatSocket
        """Voxel Size"""
        voxel_amount: FloatSocket
        """Voxel Amount"""
        threshold: FloatSocket
        """Threshold"""
        adaptivity: FloatSocket
        """Adaptivity"""

    class _Outputs(SocketAccessor):
        mesh: GeometrySocket
        """Mesh"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        volume: InputGeometry = None,
        resolution_mode: InputMenu | Literal["Grid", "Amount", "Size"] = "Grid",
        voxel_size: InputFloat = 0.3,
        voxel_amount: InputFloat = 64.0,
        threshold: InputFloat = 0.1,
        adaptivity: InputFloat = 0.0,
    ):
        super().__init__()
        key_args = {
            "Volume": volume,
            "Resolution Mode": resolution_mode,
            "Voxel Size": voxel_size,
            "Voxel Amount": voxel_amount,
            "Threshold": threshold,
            "Adaptivity": adaptivity,
        }

        self._establish_links(**key_args)


class VoxelizeGrid(BaseNode, Generic[_T]):
    """
    Remove sparseness from a volume grid by making the active tiles into voxels

    Parameters
    ----------
    grid : InputFloat
        Grid

    Inputs
    ------
    i.grid : FloatSocket
        Grid

    Outputs
    -------
    o.grid : FloatSocket
        Grid
    """

    _bl_idname = "GeometryNodeGridVoxelize"
    node: bpy.types.GeometryNodeGridVoxelize

    class _Inputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""

    class _Outputs(SocketAccessor, Generic[_S]):
        grid: _S
        """Grid"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs[_T]: ...
        @property
        def o(self) -> _Outputs[_T]: ...

    def __init__(
        self,
        grid: InputAny = 0.0,
        *,
        data_type: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"] = "FLOAT",
    ):
        super().__init__()
        key_args = {"Grid": grid}
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(cls, grid: InputFloat = 0.0) -> "VoxelizeGrid[FloatSocket]":
        """Create Voxelize Grid with operation 'Float'."""
        return VoxelizeGrid(data_type="FLOAT", grid=grid)

    @classmethod
    def integer(cls, grid: InputInteger = 0) -> "VoxelizeGrid[IntegerSocket]":
        """Create Voxelize Grid with operation 'Integer'."""
        return VoxelizeGrid(data_type="INT", grid=grid)

    @classmethod
    def boolean(cls, grid: InputBoolean = False) -> "VoxelizeGrid[BooleanSocket]":
        """Create Voxelize Grid with operation 'Boolean'."""
        return VoxelizeGrid(data_type="BOOLEAN", grid=grid)

    @classmethod
    def vector(cls, grid: InputVector = None) -> "VoxelizeGrid[VectorSocket]":
        """Create Voxelize Grid with operation 'Vector'."""
        return VoxelizeGrid(data_type="VECTOR", grid=grid)

    @property
    def data_type(self) -> Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "INT", "BOOLEAN", "VECTOR"]):
        self.node.data_type = value
