Skip to content

Mesh

Bases: Geometry, Mesh

Source code in core/geometries.py
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
class Mesh(Geometry, generated.Mesh):

    __slots__ = Geometry.__slots__ + ('points', 'edges', 'faces', 'corners')

    points: Vertex
    edges: Edge
    faces: Face
    corners: Corner

    """ > Mesh Geometry

    The **Mesh** exposes all methods specific to meshes.
    Since there is no ambiguity, the word **mesh** is omitted in the **snake_case** name of
    the methods:

    ``` python
    mesh = Mesh.Line() # Node 'Mesh Line'
    cloud = mesh.to_points() # Node 'Mesh to Points'
    ```

    Nodes requiring a domain parameter, are implemented in one of the four domains of Mesh: [`points`](#points),
    [`faces`](#faces), [`edges`](#edges) or [`corners`](#corners).

    Attributes
    ----------
    points : Vertex
        POINT domain
    faces : Face
        FACE domain
    edges : Edge
        EDGE domain
    corners : Corner
        CORNER domain
    """

    def _reset(self):

        super()._reset()

        self.points  = Vertex(self)
        self.edges   = Edge(self)
        self.faces   = Face(self)
        self.corners = Corner(self)

    # =============================================================================================================================
    # Operations

    def __sub__(self, other):
        if isinstance(other, tuple):
            return Mesh.Difference(*other, mesh_1=self)
        else:
            return Mesh.Difference(other, mesh_1=self)

    def __truediv__(self, other):
        if isinstance(other, tuple):
            return Mesh.Intersect(self, *other)
        else:
            return Mesh.Intersect(self, other)

    def __mul__(self, other):
        if isinstance(other, tuple):
            return Mesh.Union(self, *other)
        else:
            return Mesh.Union(self, other)

_interface_socket property

Return the interface socket if exists

An interface socket exists when the socket a tree input or output socket or when it is the socket of a group

Returns:

Type Description
Interface Socket

_name property

Return the name or the label

Returns:

Type Description
str

default is ""

_panel_name property

Return the name of the panel

Returns:

Type Description
str

default is ""

corners instance-attribute

Mesh Geometry

The Mesh exposes all methods specific to meshes. Since there is no ambiguity, the word mesh is omitted in the snake_case name of the methods:

mesh = Mesh.Line() # Node 'Mesh Line'
cloud = mesh.to_points() # Node 'Mesh to Points'

Nodes requiring a domain parameter, are implemented in one of the four domains of Mesh: points, faces, edges or corners.

Attributes:

Name Type Description
points Vertex

POINT domain

faces Face

FACE domain

edges Edge

EDGE domain

corners Corner

CORNER domain

curve property

Node Separate Components

Fixed values

Kind Name Value
Socket Geometry self

Returns:

Type Description
curve

grease_pencil property

Node Separate Components

Fixed values

Kind Name Value
Socket Geometry self

Returns:

Type Description
grease_pencil

id property writable

Property get node

instances property

Node Separate Components

Fixed values

Kind Name Value
Socket Geometry self

Returns:

Type Description
instances

is_grid property

bool property

Returns True if socket is a grid (inferred_structure_type == 'GRID').

material property writable

Write only property for node

material_index property writable

Property get node

mesh property

Node Separate Components

Fixed values

Kind Name Value
Socket Geometry self

Returns:

Type Description
mesh

name property writable

Write only property for node

node_color property writable

Node color

Returns:

Type Description
SysColor

node_label property writable

Node Label

Returns:

Type Description
str

normal property writable

Write only property for node

offset property writable

Write only property for node

point_cloud property

Node Separate Components

Fixed values

Kind Name Value
Socket Geometry self

Returns:

Type Description
point_cloud

position property writable

Property get node

volume property

Node Separate Components

Fixed values

Kind Name Value
Socket Geometry self

Returns:

Type Description
volume

Boolean(*mesh_2, mesh_1=None, operation='DIFFERENCE', solver='FLOAT') classmethod

Node Mesh Boolean

Parameters:

Name Type Description Default
mesh_1 Mesh

socket 'Mesh 1' (id: Mesh 1)

None
mesh_2 Mesh

socket 'Mesh 2' (id: Mesh 2)

()
operation Literal['Intersect', 'Union', 'Difference']

parameter operation

'DIFFERENCE'
solver Literal['Exact', 'Float', 'Manifold']

parameter solver

'FLOAT'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
@classmethod
def Boolean(cls,
                *mesh_2: Mesh,
                mesh_1: Mesh = None,
                operation: Literal['INTERSECT', 'UNION', 'DIFFERENCE'] = 'DIFFERENCE',
                solver: Literal['EXACT', 'FLOAT', 'MANIFOLD'] = 'FLOAT'):
    """ > Node Mesh Boolean

    Parameters
    ----------
    mesh_1 : Mesh, optional
        socket 'Mesh 1' (id: Mesh 1)

    mesh_2 : Mesh, optional
        socket 'Mesh 2' (id: Mesh 2)

    operation : Literal['Intersect', 'Union', 'Difference']
        parameter `operation`

    solver : Literal['Exact', 'Float', 'Manifold']
        parameter `solver`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Mesh Boolean', 'operation', operation, 'Boolean', ('INTERSECT', 'UNION', 'DIFFERENCE'))
    utils.check_enum_arg('Mesh Boolean', 'solver', solver, 'Boolean', ('EXACT', 'FLOAT', 'MANIFOLD'))
    node = Node('Mesh Boolean', {'Mesh 1': mesh_1, 'Mesh 2': list(mesh_2)}, operation=operation, solver=solver)
    return cls(node._out)

Circle(vertices=None, radius=None, fill_type='NONE') classmethod

Node Mesh Circle

Parameters:

Name Type Description Default
vertices Integer

socket 'Vertices' (id: Vertices)

None
radius Float

socket 'Radius' (id: Radius)

None
fill_type Literal['None', 'N-Gon', 'Triangles']

parameter fill_type

'NONE'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
@classmethod
def Circle(cls,
                vertices: Integer = None,
                radius: Float = None,
                fill_type: Literal['NONE', 'NGON', 'TRIANGLE_FAN'] = 'NONE'):
    """ > Node Mesh Circle

    Parameters
    ----------
    vertices : Integer, optional
        socket 'Vertices' (id: Vertices)

    radius : Float, optional
        socket 'Radius' (id: Radius)

    fill_type : Literal['None', 'N-Gon', 'Triangles']
        parameter `fill_type`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Mesh Circle', 'fill_type', fill_type, 'Circle', ('NONE', 'NGON', 'TRIANGLE_FAN'))
    node = Node('Mesh Circle', {'Vertices': vertices, 'Radius': radius}, fill_type=fill_type)
    return cls(node._out)

Cone(vertices=None, side_segments=None, fill_segments=None, radius_top=None, radius_bottom=None, depth=None, fill_type='NGON') classmethod

Node Cone

Parameters:

Name Type Description Default
vertices Integer

socket 'Vertices' (id: Vertices)

None
side_segments Integer

socket 'Side Segments' (id: Side Segments)

None
fill_segments Integer

socket 'Fill Segments' (id: Fill Segments)

None
radius_top Float

socket 'Radius Top' (id: Radius Top)

None
radius_bottom Float

socket 'Radius Bottom' (id: Radius Bottom)

None
depth Float

socket 'Depth' (id: Depth)

None
fill_type Literal['None', 'N-Gon', 'Triangles']

parameter fill_type

'NGON'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
@classmethod
def Cone(cls,
                vertices: Integer = None,
                side_segments: Integer = None,
                fill_segments: Integer = None,
                radius_top: Float = None,
                radius_bottom: Float = None,
                depth: Float = None,
                fill_type: Literal['NONE', 'NGON', 'TRIANGLE_FAN'] = 'NGON'):
    """ > Node Cone

    Parameters
    ----------
    vertices : Integer, optional
        socket 'Vertices' (id: Vertices)

    side_segments : Integer, optional
        socket 'Side Segments' (id: Side Segments)

    fill_segments : Integer, optional
        socket 'Fill Segments' (id: Fill Segments)

    radius_top : Float, optional
        socket 'Radius Top' (id: Radius Top)

    radius_bottom : Float, optional
        socket 'Radius Bottom' (id: Radius Bottom)

    depth : Float, optional
        socket 'Depth' (id: Depth)

    fill_type : Literal['None', 'N-Gon', 'Triangles']
        parameter `fill_type`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Cone', 'fill_type', fill_type, 'Cone', ('NONE', 'NGON', 'TRIANGLE_FAN'))
    node = Node('Cone', {'Vertices': vertices, 'Side Segments': side_segments, 'Fill Segments': fill_segments, 'Radius Top': radius_top, 'Radius Bottom': radius_bottom, 'Depth': depth}, fill_type=fill_type)
    return cls(node._out)

Constant(value, user_label='') classmethod

Create an input socket from a constant Node.

Parameters:

Name Type Description Default
value Any

constant default value default=None.

required
user_label str

socket name (used to rename nodes if not None) default="".

''
Source code in core/socket_class.py
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
@classmethod
def Constant(cls, value: None, user_label: str = ""):
    """ Create an input socket from a constant Node.

    Parameters
    ----------
    value : Any, optional
        constant default value default=None.

    user_label : str, optional
        socket name (used to rename nodes if not None) default="".

    """

    # ---------------------------------------------------------------------------
    # Ensure array
    # ---------------------------------------------------------------------------

    def get_shaped(v, *shapes):
        r = np.ravel(v)
        shape = np.shape(r)
        if shape in shapes:
            return tuple(r)

        if shape == (1,):
            return tuple(np.resize(r, shapes[0]))

        raise NodeError(
            f"The value <{v}> can't be transformed in a valid initial value for {SocketType(cls.SOCKET_TYPE).class_name}."
        )

    # ---------------------------------------------------------------------------
    # Does the array contain sockets
    # ---------------------------------------------------------------------------

    def has_sockets(a):
        for v in a:
            if SocketType.get_bsocket(v) is not None:
                return True
        return False

    # ---------------------------------------------------------------------------
    # Default value
    # ---------------------------------------------------------------------------

    socket_type = SocketType(cls.SOCKET_TYPE)
    if cls.SOCKET_TYPE not in ['RGBA', 'VECTOR', 'ROTATION', 'MATRIX']:
        def_val = socket_type.get_default_from_value(value)

    # ---------------------------------------------------------------------------
    # Depending on the socket type
    # ---------------------------------------------------------------------------

    if cls.SOCKET_TYPE == 'BOOLEAN':
        return Node('Boolean', boolean=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'BUNDLE':
        return Node("Combine Bundle")._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'CLOSURE':
        socket = ZoneNode.Closure().closure
        socket._use_layout = False
        return socket._ul(user_label)

    elif cls.SOCKET_TYPE == 'COLLECTION':
        return Node('Collection', collection=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'RGBA':

        if value is None:
            a = (0, 0, 0, 1)
        elif isinstance(value, str):
            #a = colors.to_color(value)
            a = SysColor(value).rgba
        else:
            a = get_shaped(value, (4,), (3,))

        if has_sockets(a):
            if Tree.is_geonodes():
                node = Node('Combine Color', {0: a[0], 1: a[1], 2:a[2]})
                if len(a) == 4:
                    node.alpha = a[3]
                return node._out._ul(user_label)
            else:
                return Node('Combine Color', {0: a[0], 1: a[1], 2:a[2]})._out._ul(user_label)

        else:
            def_val = SocketType('COLOR').get_default_from_value(a)
            if Tree.is_geonodes():
                return Node('Color', value=def_val)._out._ul(user_label)

            else:
                socket = Node('Color')._out
                socket._bsocket.default_value = def_val
                return socket._ul(user_label)

    elif cls.SOCKET_TYPE == 'IMAGE':
        return Node('Image', image=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'INT':
        return Node('Integer', integer=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'MATERIAL':
        return Node('Material', material=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'MATRIX':

        if value is None:
            a = (1, 0, 0, 0,   0, 1, 0, 0,   0, 0, 1, 0,   0, 0, 0, 1)
        else:
            a = get_shaped(value, (16,))

        return Node('Combine Matrix', named_sockets = {i: a[i] for i in range(16)})._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'MENU':
        return Node('Menu Switch')._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'OBJECT':
        return Node('Object', object=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'FONT':
        return cls.NewInput("Font", value)

    elif cls.SOCKET_TYPE == 'ROTATION':

        if value is None:
            a = (0, 0, 0)
        else:
            a = get_shaped(value, (3,))

        if has_sockets(a):
            return Node('Combine XYZ', x=a[0], y=a[1], z=a[2])._out.to_rotation()._ul(user_label)
        else:
            return Node('Rotation', rotation_euler=a)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'STRING':
        return Node('String', string=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'VALUE':
        node = Node('Value')
        node._bnode.outputs[0].default_value = def_val
        return node._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'VECTOR':

        if value is None:
            a = (0, 0, 0)
        else:
            a = get_shaped(value, (3,))

        if has_sockets(a):
            return Node('Combine XYZ', x=a[0], y=a[1], z=a[2])._out._ul(user_label)
        else:
            return Node('Vector', vector=a)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'GEOMETRY':
        raise NodeError(f"There is no node to create a Geometry. Use explicit constructors such as 'Mesh.Cube()', 'Curve.Spiral()' or 'Cloud.Points().")

    else:
        assert False, f"Shouldn't happen {socket_type}"

Cube(size=None, vertices_x=None, vertices_y=None, vertices_z=None) classmethod

Node Cube

Parameters:

Name Type Description Default
size Vector

socket 'Size' (id: Size)

None
vertices_x Integer

socket 'Vertices X' (id: Vertices X)

None
vertices_y Integer

socket 'Vertices Y' (id: Vertices Y)

None
vertices_z Integer

socket 'Vertices Z' (id: Vertices Z)

None

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
@classmethod
def Cube(cls,
                size: Vector = None,
                vertices_x: Integer = None,
                vertices_y: Integer = None,
                vertices_z: Integer = None):
    """ > Node Cube

    Parameters
    ----------
    size : Vector, optional
        socket 'Size' (id: Size)

    vertices_x : Integer, optional
        socket 'Vertices X' (id: Vertices X)

    vertices_y : Integer, optional
        socket 'Vertices Y' (id: Vertices Y)

    vertices_z : Integer, optional
        socket 'Vertices Z' (id: Vertices Z)


    Returns
    -------
    Mesh
    """
    node = Node('Cube', {'Size': size, 'Vertices X': vertices_x, 'Vertices Y': vertices_y, 'Vertices Z': vertices_z})
    return cls(node._out)

Cylinder(vertices=None, side_segments=None, fill_segments=None, radius=None, depth=None, fill_type='NGON') classmethod

Node Cylinder

Parameters:

Name Type Description Default
vertices Integer

socket 'Vertices' (id: Vertices)

None
side_segments Integer

socket 'Side Segments' (id: Side Segments)

None
fill_segments Integer

socket 'Fill Segments' (id: Fill Segments)

None
radius Float

socket 'Radius' (id: Radius)

None
depth Float

socket 'Depth' (id: Depth)

None
fill_type Literal['None', 'N-Gon', 'Triangles']

parameter fill_type

'NGON'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
@classmethod
def Cylinder(cls,
                vertices: Integer = None,
                side_segments: Integer = None,
                fill_segments: Integer = None,
                radius: Float = None,
                depth: Float = None,
                fill_type: Literal['NONE', 'NGON', 'TRIANGLE_FAN'] = 'NGON'):
    """ > Node Cylinder

    Parameters
    ----------
    vertices : Integer, optional
        socket 'Vertices' (id: Vertices)

    side_segments : Integer, optional
        socket 'Side Segments' (id: Side Segments)

    fill_segments : Integer, optional
        socket 'Fill Segments' (id: Fill Segments)

    radius : Float, optional
        socket 'Radius' (id: Radius)

    depth : Float, optional
        socket 'Depth' (id: Depth)

    fill_type : Literal['None', 'N-Gon', 'Triangles']
        parameter `fill_type`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Cylinder', 'fill_type', fill_type, 'Cylinder', ('NONE', 'NGON', 'TRIANGLE_FAN'))
    node = Node('Cylinder', {'Vertices': vertices, 'Side Segments': side_segments, 'Fill Segments': fill_segments, 'Radius': radius, 'Depth': depth}, fill_type=fill_type)
    return cls(node._out)

Difference(*mesh_2, mesh_1=None, solver='FLOAT') classmethod

Node Mesh Boolean

Fixed values

Kind Name Value
Parameter operation 'DIFFERENCE'

Parameters:

Name Type Description Default
mesh_1 Mesh

socket 'Mesh 1' (id: Mesh 1)

None
mesh_2 Mesh

socket 'Mesh 2' (id: Mesh 2)

()
solver Literal['Exact', 'Float', 'Manifold']

parameter solver

'FLOAT'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
@classmethod
def Difference(cls,
                *mesh_2: Mesh,
                mesh_1: Mesh = None,
                solver: Literal['EXACT', 'FLOAT', 'MANIFOLD'] = 'FLOAT'):
    """ > Node Mesh Boolean

    **Fixed values**

    | Kind      | Name        | Value          |
    | --------- | ----------- | -------------- |
    | Parameter | `operation` | `'DIFFERENCE'` |

    Parameters
    ----------
    mesh_1 : Mesh, optional
        socket 'Mesh 1' (id: Mesh 1)

    mesh_2 : Mesh, optional
        socket 'Mesh 2' (id: Mesh 2)

    solver : Literal['Exact', 'Float', 'Manifold']
        parameter `solver`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Mesh Boolean', 'solver', solver, 'Difference', ('EXACT', 'FLOAT', 'MANIFOLD'))
    node = Node('Mesh Boolean', {'Mesh 1': mesh_1, 'Mesh 2': list(mesh_2)}, operation='DIFFERENCE', solver=solver)
    return cls(node._out)

Empty(value=None) classmethod

Create an empty socket.

An empty socket is used temporarily as an input for nodes with dynamic sockets:

Parameters:

Name Type Description Default
value Any

default value default=None.

None
Source code in core/socket_class.py
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
@classmethod
def Empty(cls, value = None):
    """ Create an empty socket.

    An empty socket is used temporarily as an input for nodes with dynamic sockets:

    Parameters
    ----------
    value : Any, optional
        default value default=None.

    """
    socket = cls(constants.EMPTY_SOCKET)
    socket._bsocket = SocketType(cls.SOCKET_TYPE).get_default_from_value(value)
    return socket

Grid(size_x=None, size_y=None, vertices_x=None, vertices_y=None) classmethod

Node Grid

Parameters:

Name Type Description Default
size_x Float

socket 'Size X' (id: Size X)

None
size_y Float

socket 'Size Y' (id: Size Y)

None
vertices_x Integer

socket 'Vertices X' (id: Vertices X)

None
vertices_y Integer

socket 'Vertices Y' (id: Vertices Y)

None

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
@classmethod
def Grid(cls,
                size_x: Float = None,
                size_y: Float = None,
                vertices_x: Integer = None,
                vertices_y: Integer = None):
    """ > Node Grid

    Parameters
    ----------
    size_x : Float, optional
        socket 'Size X' (id: Size X)

    size_y : Float, optional
        socket 'Size Y' (id: Size Y)

    vertices_x : Integer, optional
        socket 'Vertices X' (id: Vertices X)

    vertices_y : Integer, optional
        socket 'Vertices Y' (id: Vertices Y)


    Returns
    -------
    Mesh
    """
    node = Node('Grid', {'Size X': size_x, 'Size Y': size_y, 'Vertices X': vertices_x, 'Vertices Y': vertices_y})
    return cls(node._out)

IcoSphere(radius=None, subdivisions=None) classmethod

Node Ico Sphere

Parameters:

Name Type Description Default
radius Float

socket 'Radius' (id: Radius)

None
subdivisions Integer

socket 'Subdivisions' (id: Subdivisions)

None

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
@classmethod
def IcoSphere(cls, radius: Float = None, subdivisions: Integer = None):
    """ > Node Ico Sphere

    Parameters
    ----------
    radius : Float, optional
        socket 'Radius' (id: Radius)

    subdivisions : Integer, optional
        socket 'Subdivisions' (id: Subdivisions)


    Returns
    -------
    Mesh
    """
    node = Node('Ico Sphere', {'Radius': radius, 'Subdivisions': subdivisions})
    return cls(node._out)

ImportPLY(path=None) classmethod

Node Import PLY

Parameters:

Name Type Description Default
path String

socket 'Path' (id: Path)

None

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
@classmethod
def ImportPLY(cls, path: String = None):
    """ > Node Import PLY

    Parameters
    ----------
    path : String, optional
        socket 'Path' (id: Path)


    Returns
    -------
    Mesh
    """
    node = Node('Import PLY', {'Path': path})
    return cls(node._out)

ImportSTL(path=None) classmethod

Node Import STL

Parameters:

Name Type Description Default
path String

socket 'Path' (id: Path)

None

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
@classmethod
def ImportSTL(cls, path: String = None):
    """ > Node Import STL

    Parameters
    ----------
    path : String, optional
        socket 'Path' (id: Path)


    Returns
    -------
    Mesh
    """
    node = Node('Import STL', {'Path': path})
    return cls(node._out)

IndexSwitch(*values, index=None, default_index=0) classmethod

Node Index Switch

with GeoNodes("IndexSwitch demo"):

    # Create some geometries
    geo    = Geometry()
    cube   = Mesh.Cube()
    sphere = Mesh.IcoSphere()
    cone   = Mesh.Cone()

    # Pick in this list
    pick_geo = Geometry.IndexSwitch(geo, cube, sphere, cone, index=tree.new_input("Geometry index", default_value=2))

    # Plug the result to the output
    pick_geo.out()

Parameters:

Name Type Description Default
*values Any

List of Sockets to select into

()
index Integer

socket 'Index' (Index) default=None.

None
default_index int

default idex default=0.

0

Returns:

Type Description
Socket
Source code in core/socket_class.py
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
@classmethod
def IndexSwitch(cls, *values, index = None, default_index: int = 0):
    """ > Node Index Switch

    ``` python
    with GeoNodes("IndexSwitch demo"):

        # Create some geometries
        geo    = Geometry()
        cube   = Mesh.Cube()
        sphere = Mesh.IcoSphere()
        cone   = Mesh.Cone()

        # Pick in this list
        pick_geo = Geometry.IndexSwitch(geo, cube, sphere, cone, index=tree.new_input("Geometry index", default_value=2))

        # Plug the result to the output
        pick_geo.out()
    ```

    Parameters
    ----------
    *values : Any
        List of Sockets to select into

    index : Integer, optional
        socket 'Index' (Index) default=None.

    default_index : int, optional
        default idex default=0.


    Returns
    -------
    Socket
    """
    #return IndexSwitchNode(*values, index=index, data_type=cls.input_type())._out
    return MenuNode('Index Switch', 
                    {str(i): value for i, value in enumerate(values)}, 
                    data_type=cls.SOCKET_TYPE, 
                    Index=index,
                    default_menu = default_index)._out

Input(name, panel='', halt=True) classmethod

Get an exist input socket from its name and panel.

Note

The "input" socket here is an "output" socket of the current input node

To create a input socket use NewInput.

If the 'name' argument is None, the first socket of the proper type is returned.

Raises:

Type Description
- NodeError if socket is not found and halt is requested

Parameters:

Name Type Description Default
name str | None

socket name

required
panel str

panel name default="".

''
halt bool

raises an error if not found default=True.

True

Returns:

Type Description
Socket
Source code in core/socket_class.py
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
@classmethod
def Input(cls, name: str, panel: str = "", halt: bool = True):
    """ Get an exist input socket from its name and panel.

    !!! note
        The "input" socket here is an "output" socket of the current input node

    To create a input socket use NewInput.

    If the 'name' argument is None, the first socket of the proper type is returned.

    Raises
    ------
    - NodeError if socket is not found and halt is requested

    Parameters
    ----------
    name : str | None
        socket name

    panel : str, optional
        panel name default="".

    halt : bool, optional
        raises an error if not found default=True.


    Returns
    -------
    Socket
    """
    in_node = Tree.current_tree().get_input_node()

    include = None if name is None else [name]
    bsockets = in_node.get_sockets('OUTPUT', include=include, panel=panel)

    for _, bsock in bsockets:
        if SocketType(bsock).type == cls.SOCKET_TYPE: # and utils.snake_case(sock_name) == utils.snake_case(name):
            return cls(bsock._bsocket)._ul(name)

    if halt:
        sname = "" if name is None else f" named '{name}'"
        raise NodeError(
            f"There is no {SocketType(cls.SOCKET_TYPE).class_name} input socket{sname}.\n"
            f"Available sockets are : {[bsock[0] for bsock in in_node.get_sockets('OUTPUT')]}.")

    return None

Intersect(*mesh, solver='FLOAT') classmethod

Node Mesh Boolean

Fixed values

Kind Name Value
Parameter operation 'INTERSECT'

Parameters:

Name Type Description Default
mesh Mesh

socket 'Mesh' (id: Mesh 2)

()
solver Literal['Exact', 'Float', 'Manifold']

parameter solver

'FLOAT'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
@classmethod
def Intersect(cls, *mesh: Mesh, solver: Literal['EXACT', 'FLOAT', 'MANIFOLD'] = 'FLOAT'):
    """ > Node Mesh Boolean

    **Fixed values**

    | Kind      | Name        | Value         |
    | --------- | ----------- | ------------- |
    | Parameter | `operation` | `'INTERSECT'` |

    Parameters
    ----------
    mesh : Mesh, optional
        socket 'Mesh' (id: Mesh 2)

    solver : Literal['Exact', 'Float', 'Manifold']
        parameter `solver`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Mesh Boolean', 'solver', solver, 'Intersect', ('EXACT', 'FLOAT', 'MANIFOLD'))
    node = Node('Mesh Boolean', {'Mesh 2': list(mesh)}, operation='INTERSECT', solver=solver)
    return cls(node._out)

Join(*geometry) classmethod

Node Join Geometry

Parameters:

Name Type Description Default
geometry Geometry

socket 'Geometry' (id: Geometry)

()

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
@classmethod
def Join(cls, *geometry: Geometry):
    """ > Node Join Geometry

    Parameters
    ----------
    geometry : Geometry, optional
        socket 'Geometry' (id: Geometry)


    Returns
    -------
    Geometry
    """
    node = Node('Join Geometry', {'Geometry': list(geometry)})
    return cls(node._out)

Line(count=None, start_location=None, offset=None, count_mode='TOTAL', mode='OFFSET') classmethod

Node Mesh Line

Parameters:

Name Type Description Default
count Integer

socket 'Count' (id: Count)

None
start_location Vector

socket 'Start Location' (id: Start Location)

None
offset Vector

socket 'Offset' (id: Offset)

None
count_mode Literal['Count', 'Resolution']

parameter count_mode

'TOTAL'
mode Literal['Offset', 'End Points']

parameter mode

'OFFSET'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
@classmethod
def Line(cls,
                count: Integer = None,
                start_location: Vector = None,
                offset: Vector = None,
                count_mode: Literal['TOTAL', 'RESOLUTION'] = 'TOTAL',
                mode: Literal['OFFSET', 'END_POINTS'] = 'OFFSET'):
    """ > Node Mesh Line

    Parameters
    ----------
    count : Integer, optional
        socket 'Count' (id: Count)

    start_location : Vector, optional
        socket 'Start Location' (id: Start Location)

    offset : Vector, optional
        socket 'Offset' (id: Offset)

    count_mode : Literal['Count', 'Resolution']
        parameter `count_mode`

    mode : Literal['Offset', 'End Points']
        parameter `mode`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Mesh Line', 'count_mode', count_mode, 'Line', ('TOTAL', 'RESOLUTION'))
    utils.check_enum_arg('Mesh Line', 'mode', mode, 'Line', ('OFFSET', 'END_POINTS'))
    node = Node('Mesh Line', {'Count': count, 'Start Location': start_location, 'Offset': offset}, count_mode=count_mode, mode=mode)
    return cls(node._out)

LineEndPoints(count=None, start_location=None, end_location=None, count_mode='TOTAL') classmethod

Node Mesh Line

Fixed values

Kind Name Value
Parameter mode 'END_POINTS'

Parameters:

Name Type Description Default
count Integer

socket 'Count' (id: Count)

None
start_location Vector

socket 'Start Location' (id: Start Location)

None
end_location Vector

socket 'End Location' (id: Offset)

None
count_mode Literal['Count', 'Resolution']

parameter count_mode

'TOTAL'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
@classmethod
def LineEndPoints(cls,
                count: Integer = None,
                start_location: Vector = None,
                end_location: Vector = None,
                count_mode: Literal['TOTAL', 'RESOLUTION'] = 'TOTAL'):
    """ > Node Mesh Line

    **Fixed values**

    | Kind      | Name   | Value          |
    | --------- | ------ | -------------- |
    | Parameter | `mode` | `'END_POINTS'` |

    Parameters
    ----------
    count : Integer, optional
        socket 'Count' (id: Count)

    start_location : Vector, optional
        socket 'Start Location' (id: Start Location)

    end_location : Vector, optional
        socket 'End Location' (id: Offset)

    count_mode : Literal['Count', 'Resolution']
        parameter `count_mode`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Mesh Line', 'count_mode', count_mode, 'LineEndPoints', ('TOTAL', 'RESOLUTION'))
    node = Node('Mesh Line', {'Count': count, 'Start Location': start_location, 'Offset': end_location}, count_mode=count_mode, mode='END_POINTS')
    return cls(node._out)

LineOffset(count=None, start_location=None, offset=None, count_mode='TOTAL') classmethod

Node Mesh Line

Fixed values

Kind Name Value
Parameter mode 'OFFSET'

Parameters:

Name Type Description Default
count Integer

socket 'Count' (id: Count)

None
start_location Vector

socket 'Start Location' (id: Start Location)

None
offset Vector

socket 'Offset' (id: Offset)

None
count_mode Literal['Count', 'Resolution']

parameter count_mode

'TOTAL'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
@classmethod
def LineOffset(cls,
                count: Integer = None,
                start_location: Vector = None,
                offset: Vector = None,
                count_mode: Literal['TOTAL', 'RESOLUTION'] = 'TOTAL'):
    """ > Node Mesh Line

    **Fixed values**

    | Kind      | Name   | Value      |
    | --------- | ------ | ---------- |
    | Parameter | `mode` | `'OFFSET'` |

    Parameters
    ----------
    count : Integer, optional
        socket 'Count' (id: Count)

    start_location : Vector, optional
        socket 'Start Location' (id: Start Location)

    offset : Vector, optional
        socket 'Offset' (id: Offset)

    count_mode : Literal['Count', 'Resolution']
        parameter `count_mode`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Mesh Line', 'count_mode', count_mode, 'LineOffset', ('TOTAL', 'RESOLUTION'))
    node = Node('Mesh Line', {'Count': count, 'Start Location': start_location, 'Offset': offset}, count_mode=count_mode, mode='OFFSET')
    return cls(node._out)

MenuSwitch(named_sockets={}, default_menu=None, **sockets) classmethod

Node Menu Switch

The items of the Menu Switch node are provided in the 'items' dict.

Parameters:

Name Type Description Default
named_sockets dict

sockets to create default={}.

{}
default_menu str

default menu value default=None.

None
sockets dict

items

{}

Returns:

Type Description
Socket
Source code in core/socket_class.py
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
@classmethod
def MenuSwitch(cls, 
               named_sockets    : dict = {},
               default_menu     : str = None,
               **sockets):
    """ > Node Menu Switch

    The items of the Menu Switch node are provided in the 'items' dict.

    Parameters
    ----------
    named_sockets : dict, optional
        sockets to create default={}.

    default_menu : str, optional
        default menu value default=None.

    sockets : dict
        items


    Returns
    -------
    Socket
    """
    node = MenuNode('Menu Switch',
            named_sockets = named_sockets,
            data_type = SocketType(cls.SOCKET_TYPE).type,
            default_menu = default_menu,
            **sockets)

    return cls(node._out)

Named(name) classmethod

Node Named Attribute

Information
  • Parameter 'data_type' : 'BOOLEAN'

Parameters:

Name Type Description Default
name String

socket 'Name' (id: Name)

required

Returns:

Type Description
Boolean
Source code in core/socket_class.py
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
@classmethod
def Named(cls, name):
    """ > Node Named Attribute

    Information
    -----------
    - Parameter 'data_type' : 'BOOLEAN'

    Parameters
    ----------
    name : String
        socket 'Name' (id: Name)


    Returns
    -------
    Boolean
    """
    if SocketType(cls.SOCKET_TYPE).class_name not in constants.ATTRIBUTE_CLASSES:
        raise NodeError(
            f"The class {SocketType(cls.SOCKET_TYPE).class_name} is not an attribute.\n"
            f"Attribute classes are: {constants.ATTRIBUTE_CLASSES}")

    node = Node('Named Attribute', name=name)
    data_type = SocketType(cls.SOCKET_TYPE).get_node_data_type(
        tree_type = node._tree._btree.bl_idname,
        bl_idname = node._bnode.bl_idname,
        halt = True)

    node.set_parameter('data_type', data_type)

    return node._out._ul(name)

NewInput(name, value=None, tip='', panel='', **props) classmethod

Create an new input socket

Note

The "input" socket here is an "output" socket of the current input node

To get an existing input socket use Input.

Raises:

Type Description
- NodeError if socket is not found

Parameters:

Name Type Description Default
name str

socket name

required
value Any

default_value default=None.

None
tip str

description default="".

''
panel str: None

panel name

''

Returns:

Type Description
Socket
Source code in core/socket_class.py
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
@classmethod
def NewInput(cls,
        name: str, 
        value       = None, 
        tip: str    = "", 
        panel: str  = "", 
        **props):
    """ Create an new input socket

    !!! note
        The "input" socket here is an "output" socket of the current input node

    To get an existing input socket use Input.

    Raises
    ------
    - NodeError if socket is not found

    Parameters
    ----------
    name : str
        socket name

    value : Any, optional
        default_value default=None.

    tip : str, optional
        description default="".

    panel : str: None
        panel name


    Returns
    -------
    Socket
    """
    if value is None:
        defval = None
    else:
        defval = SocketType(cls.SOCKET_TYPE).get_default_from_value(value)
        new_props = {**props}

        if 'default' in new_props:
            new_props['default'] = defval

        elif 'default_value' in new_props:
            new_props['default_value'] = defval

        else:
            if 'default' not in constants.SOCKETS[cls.SOCKET_TYPE]['props']:
                raise NodeError(f"The {SocketType(cls.SOCKET_TYPE).class_name} socket doesn't accept a default value. Value argument <{value}> is invalid.")

            new_props['default_value'] = defval

        props = new_props

    return cls(Tree.current_tree().create_input_socket(
        SocketType(cls.SOCKET_TYPE).socket_id,
        name         = name,
        tip          = tip,
        panel        = panel,
        **props))

Switch(condition=None, false=None, true=None) classmethod

Node Switch

with GeoNodes("Switch demo"):

    # Two possible geometries
    cube   = Mesh.Cube()
    sphere = Mesh.IcoSphere()

    # Select
    geo = Geometry.Switch(Boolean(True, "Use Sphere"), cube, sphere)

    # To group output
    geo.out()

Parameters:

Name Type Description Default
condition Boolean

socket 'Switch' (Switch)

None
false

socket 'False' (False)

None
true

socket 'True' (True)

None

Returns:

Type Description
Socket
Source code in core/socket_class.py
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
@classmethod
def Switch(cls, condition=None, false=None, true=None):
    """ > Node Switch

    ``` python
    with GeoNodes("Switch demo"):

        # Two possible geometries
        cube   = Mesh.Cube()
        sphere = Mesh.IcoSphere()

        # Select
        geo = Geometry.Switch(Boolean(True, "Use Sphere"), cube, sphere)

        # To group output
        geo.out()
    ```

    Parameters
    ----------
    condition : Boolean
        socket 'Switch' (Switch)

    false
        socket 'False' (False)

    true
        socket 'True' (True)


    Returns
    -------
    Socket
    """
    input_type = SocketType(cls.SOCKET_TYPE).items_type
    return Node('Switch', {'Switch': condition, 'False': false, 'True': true}, input_type=input_type)._out

UVSphere(segments=None, rings=None, radius=None) classmethod

Node UV Sphere

Parameters:

Name Type Description Default
segments Integer

socket 'Segments' (id: Segments)

None
rings Integer

socket 'Rings' (id: Rings)

None
radius Float

socket 'Radius' (id: Radius)

None

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
@classmethod
def UVSphere(cls, segments: Integer = None, rings: Integer = None, radius: Float = None):
    """ > Node UV Sphere

    Parameters
    ----------
    segments : Integer, optional
        socket 'Segments' (id: Segments)

    rings : Integer, optional
        socket 'Rings' (id: Rings)

    radius : Float, optional
        socket 'Radius' (id: Radius)


    Returns
    -------
    Mesh
    """
    node = Node('UV Sphere', {'Segments': segments, 'Rings': rings, 'Radius': radius})
    return cls(node._out)

Union(*mesh, solver='FLOAT') classmethod

Node Mesh Boolean

Fixed values

Kind Name Value
Parameter operation 'UNION'

Parameters:

Name Type Description Default
mesh Mesh

socket 'Mesh' (id: Mesh 2)

()
solver Literal['Exact', 'Float', 'Manifold']

parameter solver

'FLOAT'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
@classmethod
def Union(cls, *mesh: Mesh, solver: Literal['EXACT', 'FLOAT', 'MANIFOLD'] = 'FLOAT'):
    """ > Node Mesh Boolean

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Parameter | `operation` | `'UNION'` |

    Parameters
    ----------
    mesh : Mesh, optional
        socket 'Mesh' (id: Mesh 2)

    solver : Literal['Exact', 'Float', 'Manifold']
        parameter `solver`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Mesh Boolean', 'solver', solver, 'Union', ('EXACT', 'FLOAT', 'MANIFOLD'))
    node = Node('Mesh Boolean', {'Mesh 2': list(mesh)}, operation='UNION', solver=solver)
    return cls(node._out)

__init__(value=None, name=None, tip='', panel='', **props)

Socket of type 'GEOMETRY'.

If value is None, a Group Input socket of type Geometry is created. When a Group Input socket is created, default name 'Geometry' is used if name argument is None.

geometry = Geometry() # Default group input geometry
geometry = Geometry(name="Mesh") # Input group geometry

Parameters:

Name Type Description Default
value Socket

initial value default=None.

None
name str

Create an Group Input socket with the provided str default=None.

None
tip str

Property description

''
panel str

Panel name default="".

''
props dict

input properties

{}
Source code in core/geometry_class.py
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
def __init__(self,
    value               : Socket = None, 
    name                : str = None,
    tip                 : str = '',
    panel               : str = "",
    **props,
):
    """ Socket of type 'GEOMETRY'.

    If value is None, a Group Input socket of type Geometry is created.
    When a Group Input socket is created, default name 'Geometry' is used if name argument is None.

    ``` python
    geometry = Geometry() # Default group input geometry
    geometry = Geometry(name="Mesh") # Input group geometry
    ```

    Parameters
    ----------
    value : Socket, optional
        initial value default=None.

    name : str, optional
        Create an Group Input socket with the provided str default=None.

    tip : str, default=''
        Property description

    panel : str, optional
        Panel name default="".

    props : dict
        input properties

    """
    # ---------------------------------------------------------------------------
    # Geom interface
    # ---------------------------------------------------------------------------

    self._geo       = self
    self._selection = None

    super().__init__(value, name=name, tip=tip, panel=panel, **props)

_create_input_socket(name='Geometry', tip='', panel='', optional_label=False, hide_value=False, hide_in_modifier=False) classmethod

Geometry Input

New Geometry input with subtype 'NONE'.

Parameters:

Name Type Description Default
name str

Input socket name

`Geometry`
tip str

Property description

`''`
panel str

Panel name

``
optional_label bool

Property optional_label

`False`
hide_value bool

Property hide_value

`False`
hide_in_modifier bool

Property hide_in_modifier

`False`

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
@classmethod
def _create_input_socket(cls,
    name: str = 'Geometry',
    tip: str = '',
    panel: str = "",
    optional_label: bool = False,
    hide_value: bool = False,
    hide_in_modifier: bool = False,
     ):
    """ > Geometry Input

    New Geometry input with subtype 'NONE'.

    Parameters
    ----------
    name : str, default=`Geometry`
        Input socket name

    tip : str, default=`''`
        Property description

    panel : str, default=``
        Panel name

    optional_label : bool, default=`False`
        Property optional_label

    hide_value : bool, default=`False`
        Property hide_value

    hide_in_modifier : bool, default=`False`
        Property hide_in_modifier


    Returns
    -------
    Geometry
    """
    from ..treeclass import Tree

    return Tree.current_tree().create_input_socket('NodeSocketGeometry', name=name, tip=tip,
        panel=panel, optional_label=optional_label, hide_value=hide_value,
        hide_in_modifier=hide_in_modifier)

_get_bsocket_from_input(name=None)

Get the availble input socket if any.

The socket is get a an OUTPUT socket of the current input.

Parameters:

Name Type Description Default
name str

name filter default=None.

None

Returns:

Type Description
Socket

or None if not found

Source code in core/socket_class.py
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
def _get_bsocket_from_input(self, name: str = None) -> bpy.types.NodeSocket:
    """ Get the availble input socket if any.

    The socket is get a an OUTPUT socket of the current input.

    Parameters
    ----------
    name : str, optional
        name filter default=None.


    Returns
    -------
    Socket
        or None if not found

    """
    in_node = self._tree.get_input_node()

    include = None if name is None else [name]

    bsockets = in_node.get_sockets('OUTPUT', include=include)
    for _, bsock in bsockets:
        if SocketType(bsock).type == self.SOCKET_TYPE:
            return bsock._bsocket
    else:
        return None

_jump(socket, reset=True)

Change the wrapped output socket

When changing the socket, the description is copied to the new socket. The node color, if any, is also propagated.

Parameters:

Name Type Description Default
socket NodeSocket

the new output socket to jump to

required
reset bool

reset the cache default=True.

True

Returns:

Type Description
self
Source code in core/socket_class.py
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
def _jump(self, socket: bpy.types.NodeSocket, reset: bool = True):
    """ Change the wrapped output socket

    When changing the socket, the description is copied to the new socket.
    The node color, if any, is also propagated.

    Parameters
    ----------
    socket : bpy.types.NodeSocket
        the new output socket to jump to

    reset : bool, optional
        reset the cache default=True.


    Returns
    -------
    self
    """

    # Keep user label stored in socket description
    user_label = self.user_label

    bsocket = utils.get_bsocket(socket)
    if bsocket is None:
        raise NodeError(f"Socket error: Impossible to jump to socket {socket}")

    self._bsocket = bsocket
    if reset:
        self._reset()

    # Restore user label
    self.user_label = user_label


    return self

_lc(label=None, color=None)

Set node label and color.

This method returns self to be chained to as socket:

with GeoNodes("Node label and color"):
    Geometry().out()

    a = Float(10)._lc("Var a")
    b = Float(10)._lc("Var b")
    c = (a + b)._lc("a + b", (1, 0, 0))

Parameters:

Name Type Description Default
label str

node label default=None.

None
color SysColor

node color default=None.

None

Returns:

Type Description
self
Source code in core/socket_class.py
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
def _lc(self, label: str = None, color: SysColor = None):
    """ Set node label and color.

    This method returns self to be chained to as socket:

    ``` python
    with GeoNodes("Node label and color"):
        Geometry().out()

        a = Float(10)._lc("Var a")
        b = Float(10)._lc("Var b")
        c = (a + b)._lc("a + b", (1, 0, 0))
    ```

    Parameters
    ----------
    label : str, optional
        node label default=None.

    color : SysColor, optional
        node color default=None.


    Returns
    -------
    self
    """

    if self.node._bnode.bl_idname == 'NodeGroupInput':
        return self

    self.node_label = label
    self.node_color = color
    self.user_label = label

    return self

_ul(label)

Set the user label

Parameters:

Name Type Description Default
label str

the label to append

required

Returns:

Type Description
self
Source code in core/socket_class.py
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
def _ul(self, label : str):
    """ Set the user label

    Parameters
    ----------
    label : str
        the label to append


    Returns
    -------
    self
    """
    self.user_label = label
    return self

add_method(name=None, jump=False, ret_class=None, **fixed)

Add the current tree as a method of the Socket class.

Important

The socket instance must be an input socket of the Tree. This input plays the role of self argument.

with GeoNodes("Translate"):
    geo = Geometry()
    v = Vector(0, "Translation)
    geo.transform(translation=v)

    geo.add_method(jump=True)

Once the modifier completed, it can be called as a method of geometry geo.translate(translation=(1, 2, 3))

Parameters:

Name Type Description Default
name str

replace the default name which is the snake case version of the group name default=None.

None
ret_class type

transtype the default node output default=None.

None
jump bool

the calling socket jumps to the node outpus after the call default=False.

False
ret_class type

transtype the result with this class if not None default=None.

None
Source code in core/socket_class.py
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
def add_method(self, name: str = None, jump: bool = False, ret_class: type = None, **fixed):
    """ Add the current tree as a method of the Socket class.

    !!! important

        The socket instance must be an input socket of the Tree. This input plays the role of
        self argument.

    ``` python
    with GeoNodes("Translate"):
        geo = Geometry()
        v = Vector(0, "Translation)
        geo.transform(translation=v)

        geo.add_method(jump=True)
    ```

    Once the modifier completed, it can be called as a method of geometry ```geo.translate(translation=(1, 2, 3))```

    Parameters
    ----------
    name : str, optional
        replace the default name which is the snake case version of the group name default=None.

    ret_class : type, optional
        transtype the default node output default=None.

    jump : bool, optional
        the calling socket jumps to the node outpus after the call default=False.

    ret_class : type, optional
        transtype the result with this class if not None default=None.

    """

    if self.node._bnode.bl_idname != 'NodeGroupInput':
        raise NodeError(
            f"'add_method' can be called only from a 'Group Input' socket. "
            "This socket is used a 'self' argument when calling the method of {type(self).__name__}.")

    tree = Tree.current_tree()

    # ---------------------------------------------------------------------------
    # Method Body
    # ---------------------------------------------------------------------------

    socket_rank = self.node._outputs.get_socket_rank(self)
    socket_name = utils.snake_case(self._bsocket.name)


    def call(self_, *args, **kwargs):
        node = Group(tree._btree.name)
        if socket_rank >= len(args):
            new_args = args
            new_kwargs = {socket_name: self_, **kwargs}
        else:
            new_args = args[:socket_rank] + (self_,) + args[socket_rank:]
            new_kwargs = kwargs

        res = node.method_call(*new_args, ret_class=ret_class, **new_kwargs, **fixed)

        if jump:
            return self_._jump(res)
        else:
            return res

    # ---------------------------------------------------------------------------
    # Add the method to the class
    # ---------------------------------------------------------------------------

    if name is None:
        name = tree._btree.name[len(tree._prefix):].strip()
        name = utils.snake_case(name)

    class_ = type(self)
    if name in dir(class_):
        print(f"CAUTION: the method '{name}' (implementing group '{tree._btree.name}') already exists in class {class_}.")

    setattr(class_, name, call)

bake(**kwargs)

Node Bake

[&JUMP]

Returns:

Type Description
Geometry

self

Source code in core/geometry_class.py
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
def bake(self, **kwargs):
    """ Node Bake

    [&JUMP]

    Returns
    -------
    Geometry
        self

    """

    node = Node('Bake', {'Geometry': self})

    items = node._bnode.bake_items
    for name, value in kwargs.items():
        items.new(utils.get_value_socket_type(value), name)

    return self._jump(node._out)

boolean(*mesh_2, operation='DIFFERENCE', solver='FLOAT')

Node Mesh Boolean

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh 1 self

Parameters:

Name Type Description Default
mesh_2 Mesh

socket 'Mesh 2' (id: Mesh 2)

()
operation Literal['Intersect', 'Union', 'Difference']

parameter operation

'DIFFERENCE'
solver Literal['Exact', 'Float', 'Manifold']

parameter solver

'FLOAT'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
def boolean(self,
                *mesh_2: Mesh,
                operation: Literal['INTERSECT', 'UNION', 'DIFFERENCE'] = 'DIFFERENCE',
                solver: Literal['EXACT', 'FLOAT', 'MANIFOLD'] = 'FLOAT'):
    """ > Node Mesh Boolean

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name   | Value  |
    | ------ | ------ | ------ |
    | Socket | Mesh 1 | `self` |

    Parameters
    ----------
    mesh_2 : Mesh, optional
        socket 'Mesh 2' (id: Mesh 2)

    operation : Literal['Intersect', 'Union', 'Difference']
        parameter `operation`

    solver : Literal['Exact', 'Float', 'Manifold']
        parameter `solver`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Mesh Boolean', 'operation', operation, 'boolean', ('INTERSECT', 'UNION', 'DIFFERENCE'))
    utils.check_enum_arg('Mesh Boolean', 'solver', solver, 'boolean', ('EXACT', 'FLOAT', 'MANIFOLD'))
    node = Node('Mesh Boolean', {'Mesh 1': self, 'Mesh 2': list(mesh_2)}, operation=operation, solver=solver)
    self._jump(node._out)
    return self._domain_to_geometry

bounding_box(use_radius=None)

Node Bounding Box

Fixed values

Kind Name Value
Socket Geometry self

Parameters:

Name Type Description Default
use_radius Boolean

socket 'Use Radius' (id: Use Radius)

None

Returns:

Type Description
Mesh

peer sockets: min_ (Vector), max_ (Vector)

Source code in core/generated/geometry.py
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
def bounding_box(self, use_radius: Boolean = None):
    """ > Node Bounding Box

    **Fixed values**

    | Kind   | Name     | Value  |
    | ------ | -------- | ------ |
    | Socket | Geometry | `self` |

    Parameters
    ----------
    use_radius : Boolean, optional
        socket 'Use Radius' (id: Use Radius)


    Returns
    -------
    Mesh
        peer sockets: min_ (Vector), max_ (Vector)

    """
    node = Node('Bounding Box', {'Geometry': self, 'Use Radius': use_radius})
    return node._out

convex_hull()

Node Convex Hull

Fixed values

Kind Name Value
Socket Geometry self

Returns:

Type Description
Mesh
Source code in core/generated/geometry.py
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
def convex_hull(self):
    """ > Node Convex Hull

    **Fixed values**

    | Kind   | Name     | Value  |
    | ------ | -------- | ------ |
    | Socket | Geometry | `self` |

    Returns
    -------
    Mesh
    """
    node = Node('Convex Hull', {'Geometry': self})
    return node._out

corners_of_edge(edge_index=None, weights=None, sort_index=None) classmethod

Node Corners of Edge

Parameters:

Name Type Description Default
edge_index Integer

socket 'Edge Index' (id: Edge Index)

None
weights Float

socket 'Weights' (id: Weights)

None
sort_index Integer

socket 'Sort Index' (id: Sort Index)

None

Returns:

Type Description
Integer

peer sockets: total_ (Integer)

Source code in core/generated/mesh.py
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@classmethod
def corners_of_edge(cls,
                edge_index: Integer = None,
                weights: Float = None,
                sort_index: Integer = None):
    """ > Node Corners of Edge

    Parameters
    ----------
    edge_index : Integer, optional
        socket 'Edge Index' (id: Edge Index)

    weights : Float, optional
        socket 'Weights' (id: Weights)

    sort_index : Integer, optional
        socket 'Sort Index' (id: Sort Index)


    Returns
    -------
    Integer
        peer sockets: total_ (Integer)

    """
    node = Node('Corners of Edge', {'Edge Index': edge_index, 'Weights': weights, 'Sort Index': sort_index})
    return node._out

corners_of_face(face_index=None, weights=None, sort_index=None) classmethod

Node Corners of Face

Parameters:

Name Type Description Default
face_index Integer

socket 'Face Index' (id: Face Index)

None
weights Float

socket 'Weights' (id: Weights)

None
sort_index Integer

socket 'Sort Index' (id: Sort Index)

None

Returns:

Type Description
Integer

peer sockets: total_ (Integer)

Source code in core/generated/mesh.py
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@classmethod
def corners_of_face(cls,
                face_index: Integer = None,
                weights: Float = None,
                sort_index: Integer = None):
    """ > Node Corners of Face

    Parameters
    ----------
    face_index : Integer, optional
        socket 'Face Index' (id: Face Index)

    weights : Float, optional
        socket 'Weights' (id: Weights)

    sort_index : Integer, optional
        socket 'Sort Index' (id: Sort Index)


    Returns
    -------
    Integer
        peer sockets: total_ (Integer)

    """
    node = Node('Corners of Face', {'Face Index': face_index, 'Weights': weights, 'Sort Index': sort_index})
    return node._out

corners_of_vertex(vertex_index=None, weights=None, sort_index=None) classmethod

Node Corners of Vertex

Parameters:

Name Type Description Default
vertex_index Integer

socket 'Vertex Index' (id: Vertex Index)

None
weights Float

socket 'Weights' (id: Weights)

None
sort_index Integer

socket 'Sort Index' (id: Sort Index)

None

Returns:

Type Description
Integer

peer sockets: total_ (Integer)

Source code in core/generated/mesh.py
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
@classmethod
def corners_of_vertex(cls,
                vertex_index: Integer = None,
                weights: Float = None,
                sort_index: Integer = None):
    """ > Node Corners of Vertex

    Parameters
    ----------
    vertex_index : Integer, optional
        socket 'Vertex Index' (id: Vertex Index)

    weights : Float, optional
        socket 'Weights' (id: Weights)

    sort_index : Integer, optional
        socket 'Sort Index' (id: Sort Index)


    Returns
    -------
    Integer
        peer sockets: total_ (Integer)

    """
    node = Node('Corners of Vertex', {'Vertex Index': vertex_index, 'Weights': weights, 'Sort Index': sort_index})
    return node._out

corners_to_points(position=None, radius=None)

Node Mesh to Points

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]
Parameter mode 'CORNERS'

Parameters:

Name Type Description Default
position Vector

socket 'Position' (id: Position)

None
radius Float

socket 'Radius' (id: Radius)

None

Returns:

Type Description
Cloud
Source code in core/generated/mesh.py
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
def corners_to_points(self, position: Vector = None, radius: Float = None):
    """ > Node Mesh to Points

    **Fixed values**

    | Kind      | Name      | Value             |
    | --------- | --------- | ----------------- |
    | Socket    | Mesh      | `self`            |
    | Socket    | Selection | `self[selection]` |
    | Parameter | `mode`    | `'CORNERS'`       |

    Parameters
    ----------
    position : Vector, optional
        socket 'Position' (id: Position)

    radius : Float, optional
        socket 'Radius' (id: Radius)


    Returns
    -------
    Cloud
    """
    node = Node('Mesh to Points', {'Mesh': self, 'Selection': self.get_selection(), 'Position': position, 'Radius': radius}, mode='CORNERS')
    return node._out

difference(*mesh_2, solver='FLOAT')

Node Mesh Boolean

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh 1 self
Parameter operation 'DIFFERENCE'

Parameters:

Name Type Description Default
mesh_2 Mesh

socket 'Mesh 2' (id: Mesh 2)

()
solver Literal['Exact', 'Float', 'Manifold']

parameter solver

'FLOAT'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
def difference(self, *mesh_2: Mesh, solver: Literal['EXACT', 'FLOAT', 'MANIFOLD'] = 'FLOAT'):
    """ > Node Mesh Boolean

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind      | Name        | Value          |
    | --------- | ----------- | -------------- |
    | Socket    | Mesh 1      | `self`         |
    | Parameter | `operation` | `'DIFFERENCE'` |

    Parameters
    ----------
    mesh_2 : Mesh, optional
        socket 'Mesh 2' (id: Mesh 2)

    solver : Literal['Exact', 'Float', 'Manifold']
        parameter `solver`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Mesh Boolean', 'solver', solver, 'difference', ('EXACT', 'FLOAT', 'MANIFOLD'))
    node = Node('Mesh Boolean', {'Mesh 1': self, 'Mesh 2': list(mesh_2)}, operation='DIFFERENCE', solver=solver)
    self._jump(node._out)
    return self._domain_to_geometry

distribute_points_on_faces(density=None, seed=None, distribute_method='RANDOM')

Node Distribute Points on Faces

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]

Parameters:

Name Type Description Default
density Float

socket 'Density' (id: Density)

None
seed Integer

socket 'Seed' (id: Seed)

None
distribute_method Literal['Random', 'Poisson Disk']

parameter distribute_method

'RANDOM'

Returns:

Type Description
Cloud

peer sockets: normal_ (Vector), rotation_ (Rotation)

Source code in core/generated/mesh.py
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
def distribute_points_on_faces(self,
                density: Float = None,
                seed: Integer = None,
                distribute_method: Literal['RANDOM', 'POISSON'] = 'RANDOM'):
    """ > Node Distribute Points on Faces

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Mesh      | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    density : Float, optional
        socket 'Density' (id: Density)

    seed : Integer, optional
        socket 'Seed' (id: Seed)

    distribute_method : Literal['Random', 'Poisson Disk']
        parameter `distribute_method`


    Returns
    -------
    Cloud
        peer sockets: normal_ (Vector), rotation_ (Rotation)

    """
    utils.check_enum_arg('Distribute Points on Faces', 'distribute_method', distribute_method, 'distribute_points_on_faces', ('RANDOM', 'POISSON'))
    node = Node('Distribute Points on Faces', {'Mesh': self, 'Selection': self.get_selection(), 'Density': density, 'Seed': seed}, distribute_method=distribute_method)
    return node._out

distribute_points_on_faces_poisson(distance_min=None, density_max=None, density_factor=None, seed=None)

Node Distribute Points on Faces

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]
Parameter distribute_method 'POISSON'

Parameters:

Name Type Description Default
distance_min Float

socket 'Distance Min' (id: Distance Min)

None
density_max Float

socket 'Density Max' (id: Density Max)

None
density_factor Float

socket 'Density Factor' (id: Density Factor)

None
seed Integer

socket 'Seed' (id: Seed)

None

Returns:

Type Description
Cloud

peer sockets: normal_ (Vector), rotation_ (Rotation)

Source code in core/generated/mesh.py
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
def distribute_points_on_faces_poisson(self,
                distance_min: Float = None,
                density_max: Float = None,
                density_factor: Float = None,
                seed: Integer = None):
    """ > Node Distribute Points on Faces

    **Fixed values**

    | Kind      | Name                | Value             |
    | --------- | ------------------- | ----------------- |
    | Socket    | Mesh                | `self`            |
    | Socket    | Selection           | `self[selection]` |
    | Parameter | `distribute_method` | `'POISSON'`       |

    Parameters
    ----------
    distance_min : Float, optional
        socket 'Distance Min' (id: Distance Min)

    density_max : Float, optional
        socket 'Density Max' (id: Density Max)

    density_factor : Float, optional
        socket 'Density Factor' (id: Density Factor)

    seed : Integer, optional
        socket 'Seed' (id: Seed)


    Returns
    -------
    Cloud
        peer sockets: normal_ (Vector), rotation_ (Rotation)

    """
    node = Node('Distribute Points on Faces', {'Mesh': self, 'Selection': self.get_selection(), 'Distance Min': distance_min, 'Density Max': density_max, 'Density Factor': density_factor, 'Seed': seed}, distribute_method='POISSON')
    return node._out

distribute_points_on_faces_random(density=None, seed=None)

Node Distribute Points on Faces

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]
Parameter distribute_method 'RANDOM'

Parameters:

Name Type Description Default
density Float

socket 'Density' (id: Density)

None
seed Integer

socket 'Seed' (id: Seed)

None

Returns:

Type Description
Cloud

peer sockets: normal_ (Vector), rotation_ (Rotation)

Source code in core/generated/mesh.py
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
def distribute_points_on_faces_random(self, density: Float = None, seed: Integer = None):
    """ > Node Distribute Points on Faces

    **Fixed values**

    | Kind      | Name                | Value             |
    | --------- | ------------------- | ----------------- |
    | Socket    | Mesh                | `self`            |
    | Socket    | Selection           | `self[selection]` |
    | Parameter | `distribute_method` | `'RANDOM'`        |

    Parameters
    ----------
    density : Float, optional
        socket 'Density' (id: Density)

    seed : Integer, optional
        socket 'Seed' (id: Seed)


    Returns
    -------
    Cloud
        peer sockets: normal_ (Vector), rotation_ (Rotation)

    """
    node = Node('Distribute Points on Faces', {'Mesh': self, 'Selection': self.get_selection(), 'Density': density, 'Seed': seed}, distribute_method='RANDOM')
    return node._out

domain_size()

Node Domain Size

Fixed values

Kind Name Value
Socket Geometry self
Parameter component 'MESH'

Returns:

Type Description
Integer

peer sockets: edge_count_ (Integer), face_count_ (Integer), face_corner_count_ (Integer)

Source code in core/generated/mesh.py
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
def domain_size(self):
    """ > Node Domain Size

    **Fixed values**

    | Kind      | Name        | Value    |
    | --------- | ----------- | -------- |
    | Socket    | Geometry    | `self`   |
    | Parameter | `component` | `'MESH'` |

    Returns
    -------
    Integer
        peer sockets: edge_count_ (Integer), face_count_ (Integer), face_corner_count_ (Integer)

    """
    node = self._cache('Domain Size', {'Geometry': self}, component='MESH')
    return node._out

dual(keep_boundaries=None)

Node Dual Mesh

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self

Parameters:

Name Type Description Default
keep_boundaries Boolean

socket 'Keep Boundaries' (id: Keep Boundaries)

None

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
def dual(self, keep_boundaries: Boolean = None):
    """ > Node Dual Mesh

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Mesh | `self` |

    Parameters
    ----------
    keep_boundaries : Boolean, optional
        socket 'Keep Boundaries' (id: Keep Boundaries)


    Returns
    -------
    Mesh
    """
    node = Node('Dual Mesh', {'Mesh': self, 'Keep Boundaries': keep_boundaries})
    self._jump(node._out)
    return self._domain_to_geometry

edge_angle()

Node Edge Angle

Returns:

Type Description
Float

peer sockets: signed_angle_ (Float)

Source code in core/generated/mesh.py
593
594
595
596
597
598
599
600
601
602
603
604
@utils.classproperty
def edge_angle(cls):
    """ > Node Edge Angle

    Returns
    -------
    Float
        peer sockets: signed_angle_ (Float)

    """
    node = Node('Edge Angle', )
    return node._out

edge_neighbors()

Node Edge Neighbors

Returns:

Type Description
Integer
Source code in core/generated/mesh.py
628
629
630
631
632
633
634
635
636
637
@utils.classproperty
def edge_neighbors(cls):
    """ > Node Edge Neighbors

    Returns
    -------
    Integer
    """
    node = Node('Edge Neighbors', )
    return node._out

edge_paths_to_curves(start_vertices=None, next_vertex_index=None)

Node Edge Paths to Curves

Fixed values

Kind Name Value
Socket Mesh self

Parameters:

Name Type Description Default
start_vertices Boolean

socket 'Start Vertices' (id: Start Vertices)

None
next_vertex_index Integer

socket 'Next Vertex Index' (id: Next Vertex Index)

None

Returns:

Type Description
Curve
Source code in core/generated/mesh.py
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
def edge_paths_to_curves(self, start_vertices: Boolean = None, next_vertex_index: Integer = None):
    """ > Node Edge Paths to Curves

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Mesh | `self` |

    Parameters
    ----------
    start_vertices : Boolean, optional
        socket 'Start Vertices' (id: Start Vertices)

    next_vertex_index : Integer, optional
        socket 'Next Vertex Index' (id: Next Vertex Index)


    Returns
    -------
    Curve
    """
    node = Node('Edge Paths to Curves', {'Mesh': self, 'Start Vertices': start_vertices, 'Next Vertex Index': next_vertex_index})
    return node._out

edge_paths_to_selection(start_vertices=None, next_vertex_index=None) classmethod

Node Edge Paths to Selection

Parameters:

Name Type Description Default
start_vertices Boolean

socket 'Start Vertices' (id: Start Vertices)

None
next_vertex_index Integer

socket 'Next Vertex Index' (id: Next Vertex Index)

None

Returns:

Type Description
Boolean
Source code in core/generated/mesh.py
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
@classmethod
def edge_paths_to_selection(cls, start_vertices: Boolean = None, next_vertex_index: Integer = None):
    """ > Node Edge Paths to Selection

    Parameters
    ----------
    start_vertices : Boolean, optional
        socket 'Start Vertices' (id: Start Vertices)

    next_vertex_index : Integer, optional
        socket 'Next Vertex Index' (id: Next Vertex Index)


    Returns
    -------
    Boolean
    """
    node = Node('Edge Paths to Selection', {'Start Vertices': start_vertices, 'Next Vertex Index': next_vertex_index})
    return node._out

edge_vertices()

Node Edge Vertices

Returns:

Type Description
Integer

peer sockets: vertex_index_2_ (Integer), position_1_ (Vector), position_2_ (Vector)

Source code in core/generated/mesh.py
639
640
641
642
643
644
645
646
647
648
649
650
@utils.classproperty
def edge_vertices(cls):
    """ > Node Edge Vertices

    Returns
    -------
    Integer
        peer sockets: vertex_index_2_ (Integer), position_1_ (Vector), position_2_ (Vector)

    """
    node = Node('Edge Vertices', )
    return node._out

edges_of_corner(corner_index=None) classmethod

Node Edges of Corner

Parameters:

Name Type Description Default
corner_index Integer

socket 'Corner Index' (id: Corner Index)

None

Returns:

Type Description
Integer

peer sockets: previous_edge_index_ (Integer)

Source code in core/generated/mesh.py
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
@classmethod
def edges_of_corner(cls, corner_index: Integer = None):
    """ > Node Edges of Corner

    Parameters
    ----------
    corner_index : Integer, optional
        socket 'Corner Index' (id: Corner Index)


    Returns
    -------
    Integer
        peer sockets: previous_edge_index_ (Integer)

    """
    node = Node('Edges of Corner', {'Corner Index': corner_index})
    return node._out

edges_of_vertex(vertex_index=None, weights=None, sort_index=None) classmethod

Node Edges of Vertex

Parameters:

Name Type Description Default
vertex_index Integer

socket 'Vertex Index' (id: Vertex Index)

None
weights Float

socket 'Weights' (id: Weights)

None
sort_index Integer

socket 'Sort Index' (id: Sort Index)

None

Returns:

Type Description
Integer

peer sockets: total_ (Integer)

Source code in core/generated/mesh.py
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
@classmethod
def edges_of_vertex(cls,
                vertex_index: Integer = None,
                weights: Float = None,
                sort_index: Integer = None):
    """ > Node Edges of Vertex

    Parameters
    ----------
    vertex_index : Integer, optional
        socket 'Vertex Index' (id: Vertex Index)

    weights : Float, optional
        socket 'Weights' (id: Weights)

    sort_index : Integer, optional
        socket 'Sort Index' (id: Sort Index)


    Returns
    -------
    Integer
        peer sockets: total_ (Integer)

    """
    node = Node('Edges of Vertex', {'Vertex Index': vertex_index, 'Weights': weights, 'Sort Index': sort_index})
    return node._out

edges_to_face_groups(boundary_edges=None) classmethod

Node Edges to Face Groups

Parameters:

Name Type Description Default
boundary_edges Boolean

socket 'Boundary Edges' (id: Boundary Edges)

None

Returns:

Type Description
Integer
Source code in core/generated/mesh.py
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
@classmethod
def edges_to_face_groups(cls, boundary_edges: Boolean = None):
    """ > Node Edges to Face Groups

    Parameters
    ----------
    boundary_edges : Boolean, optional
        socket 'Boundary Edges' (id: Boundary Edges)


    Returns
    -------
    Integer
    """
    node = Node('Edges to Face Groups', {'Boundary Edges': boundary_edges})
    return node._out

edges_to_points(position=None, radius=None)

Node Mesh to Points

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]
Parameter mode 'EDGES'

Parameters:

Name Type Description Default
position Vector

socket 'Position' (id: Position)

None
radius Float

socket 'Radius' (id: Radius)

None

Returns:

Type Description
Cloud
Source code in core/generated/mesh.py
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
def edges_to_points(self, position: Vector = None, radius: Float = None):
    """ > Node Mesh to Points

    **Fixed values**

    | Kind      | Name      | Value             |
    | --------- | --------- | ----------------- |
    | Socket    | Mesh      | `self`            |
    | Socket    | Selection | `self[selection]` |
    | Parameter | `mode`    | `'EDGES'`         |

    Parameters
    ----------
    position : Vector, optional
        socket 'Position' (id: Position)

    radius : Float, optional
        socket 'Radius' (id: Radius)


    Returns
    -------
    Cloud
    """
    node = Node('Mesh to Points', {'Mesh': self, 'Selection': self.get_selection(), 'Position': position, 'Radius': radius}, mode='EDGES')
    return node._out

enable_output(enable=None)

Node Enable Output

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Value self
Parameter data_type 'GEOMETRY'

Parameters:

Name Type Description Default
enable Boolean

socket 'Enable' (id: Enable)

None

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
def enable_output(self, enable: Boolean = None):
    """ > Node Enable Output

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind      | Name        | Value        |
    | --------- | ----------- | ------------ |
    | Socket    | Value       | `self`       |
    | Parameter | `data_type` | `'GEOMETRY'` |

    Parameters
    ----------
    enable : Boolean, optional
        socket 'Enable' (id: Enable)


    Returns
    -------
    Geometry
    """
    node = Node('Enable Output', {'Enable': enable, 'Value': self}, data_type='GEOMETRY')
    self._jump(node._out)
    return self._domain_to_geometry

extrude(offset=None, offset_scale=None, individual=None, mode='FACES')

Node Extrude Mesh

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]

Parameters:

Name Type Description Default
offset Vector

socket 'Offset' (id: Offset)

None
offset_scale Float

socket 'Offset Scale' (id: Offset Scale)

None
individual Boolean

socket 'Individual' (id: Individual)

None
mode Literal['Vertices', 'Edges', 'Faces']

parameter mode

'FACES'

Returns:

Type Description
Mesh

peer sockets: top_ (Boolean), side_ (Boolean)

Source code in core/generated/mesh.py
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
def extrude(self,
                offset: Vector = None,
                offset_scale: Float = None,
                individual: Boolean = None,
                mode: Literal['VERTICES', 'EDGES', 'FACES'] = 'FACES'):
    """ > Node Extrude Mesh

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Mesh      | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    offset : Vector, optional
        socket 'Offset' (id: Offset)

    offset_scale : Float, optional
        socket 'Offset Scale' (id: Offset Scale)

    individual : Boolean, optional
        socket 'Individual' (id: Individual)

    mode : Literal['Vertices', 'Edges', 'Faces']
        parameter `mode`


    Returns
    -------
    Mesh
        peer sockets: top_ (Boolean), side_ (Boolean)

    """
    utils.check_enum_arg('Extrude Mesh', 'mode', mode, 'extrude', ('VERTICES', 'EDGES', 'FACES'))
    node = Node('Extrude Mesh', {'Mesh': self, 'Selection': self.get_selection(), 'Offset': offset, 'Offset Scale': offset_scale, 'Individual': individual}, mode=mode)
    self._jump(node._out)
    return self._domain_to_geometry

extrude_edges(offset=None, offset_scale=None)

Node Extrude Mesh

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]
Parameter mode 'EDGES'

Parameters:

Name Type Description Default
offset Vector

socket 'Offset' (id: Offset)

None
offset_scale Float

socket 'Offset Scale' (id: Offset Scale)

None

Returns:

Type Description
Mesh

peer sockets: top_ (Boolean), side_ (Boolean)

Source code in core/generated/mesh.py
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
def extrude_edges(self, offset: Vector = None, offset_scale: Float = None):
    """ > Node Extrude Mesh

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind      | Name      | Value             |
    | --------- | --------- | ----------------- |
    | Socket    | Mesh      | `self`            |
    | Socket    | Selection | `self[selection]` |
    | Parameter | `mode`    | `'EDGES'`         |

    Parameters
    ----------
    offset : Vector, optional
        socket 'Offset' (id: Offset)

    offset_scale : Float, optional
        socket 'Offset Scale' (id: Offset Scale)


    Returns
    -------
    Mesh
        peer sockets: top_ (Boolean), side_ (Boolean)

    """
    node = Node('Extrude Mesh', {'Mesh': self, 'Selection': self.get_selection(), 'Offset': offset, 'Offset Scale': offset_scale}, mode='EDGES')
    self._jump(node._out)
    return self._domain_to_geometry

extrude_faces(offset=None, offset_scale=None, individual=None)

Node Extrude Mesh

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]
Parameter mode 'FACES'

Parameters:

Name Type Description Default
offset Vector

socket 'Offset' (id: Offset)

None
offset_scale Float

socket 'Offset Scale' (id: Offset Scale)

None
individual Boolean

socket 'Individual' (id: Individual)

None

Returns:

Type Description
Mesh

peer sockets: top_ (Boolean), side_ (Boolean)

Source code in core/generated/mesh.py
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
def extrude_faces(self,
                offset: Vector = None,
                offset_scale: Float = None,
                individual: Boolean = None):
    """ > Node Extrude Mesh

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind      | Name      | Value             |
    | --------- | --------- | ----------------- |
    | Socket    | Mesh      | `self`            |
    | Socket    | Selection | `self[selection]` |
    | Parameter | `mode`    | `'FACES'`         |

    Parameters
    ----------
    offset : Vector, optional
        socket 'Offset' (id: Offset)

    offset_scale : Float, optional
        socket 'Offset Scale' (id: Offset Scale)

    individual : Boolean, optional
        socket 'Individual' (id: Individual)


    Returns
    -------
    Mesh
        peer sockets: top_ (Boolean), side_ (Boolean)

    """
    node = Node('Extrude Mesh', {'Mesh': self, 'Selection': self.get_selection(), 'Offset': offset, 'Offset Scale': offset_scale, 'Individual': individual}, mode='FACES')
    self._jump(node._out)
    return self._domain_to_geometry

extrude_vertices(offset=None, offset_scale=None)

Node Extrude Mesh

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]
Parameter mode 'VERTICES'

Parameters:

Name Type Description Default
offset Vector

socket 'Offset' (id: Offset)

None
offset_scale Float

socket 'Offset Scale' (id: Offset Scale)

None

Returns:

Type Description
Mesh

peer sockets: top_ (Boolean), side_ (Boolean)

Source code in core/generated/mesh.py
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
def extrude_vertices(self, offset: Vector = None, offset_scale: Float = None):
    """ > Node Extrude Mesh

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind      | Name      | Value             |
    | --------- | --------- | ----------------- |
    | Socket    | Mesh      | `self`            |
    | Socket    | Selection | `self[selection]` |
    | Parameter | `mode`    | `'VERTICES'`      |

    Parameters
    ----------
    offset : Vector, optional
        socket 'Offset' (id: Offset)

    offset_scale : Float, optional
        socket 'Offset Scale' (id: Offset Scale)


    Returns
    -------
    Mesh
        peer sockets: top_ (Boolean), side_ (Boolean)

    """
    node = Node('Extrude Mesh', {'Mesh': self, 'Selection': self.get_selection(), 'Offset': offset, 'Offset Scale': offset_scale}, mode='VERTICES')
    self._jump(node._out)
    return self._domain_to_geometry

face_area()

Node Face Area

Returns:

Type Description
Float
Source code in core/generated/mesh.py
652
653
654
655
656
657
658
659
660
661
@utils.classproperty
def face_area(cls):
    """ > Node Face Area

    Returns
    -------
    Float
    """
    node = Node('Face Area', )
    return node._out

face_group_boundaries(face_group_id=None) classmethod

Node Face Group Boundaries

Parameters:

Name Type Description Default
face_group_id Integer

socket 'Face Group ID' (id: Face Set)

None

Returns:

Type Description
Boolean
Source code in core/generated/mesh.py
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
@classmethod
def face_group_boundaries(cls, face_group_id: Integer = None):
    """ > Node Face Group Boundaries

    Parameters
    ----------
    face_group_id : Integer, optional
        socket 'Face Group ID' (id: Face Set)


    Returns
    -------
    Boolean
    """
    node = Node('Face Group Boundaries', {'Face Set': face_group_id})
    return node._out

face_neighbors()

Node Face Neighbors

Returns:

Type Description
Integer

peer sockets: face_count_ (Integer)

Source code in core/generated/mesh.py
680
681
682
683
684
685
686
687
688
689
690
691
@utils.classproperty
def face_neighbors(cls):
    """ > Node Face Neighbors

    Returns
    -------
    Integer
        peer sockets: face_count_ (Integer)

    """
    node = Node('Face Neighbors', )
    return node._out

face_of_corner(corner_index=None) classmethod

Node Face of Corner

Parameters:

Name Type Description Default
corner_index Integer

socket 'Corner Index' (id: Corner Index)

None

Returns:

Type Description
Integer

peer sockets: index_in_face_ (Integer)

Source code in core/generated/mesh.py
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
@classmethod
def face_of_corner(cls, corner_index: Integer = None):
    """ > Node Face of Corner

    Parameters
    ----------
    corner_index : Integer, optional
        socket 'Corner Index' (id: Corner Index)


    Returns
    -------
    Integer
        peer sockets: index_in_face_ (Integer)

    """
    node = Node('Face of Corner', {'Corner Index': corner_index})
    return node._out

faces_to_points(position=None, radius=None)

Node Mesh to Points

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]
Parameter mode 'FACES'

Parameters:

Name Type Description Default
position Vector

socket 'Position' (id: Position)

None
radius Float

socket 'Radius' (id: Radius)

None

Returns:

Type Description
Cloud
Source code in core/generated/mesh.py
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
def faces_to_points(self, position: Vector = None, radius: Float = None):
    """ > Node Mesh to Points

    **Fixed values**

    | Kind      | Name      | Value             |
    | --------- | --------- | ----------------- |
    | Socket    | Mesh      | `self`            |
    | Socket    | Selection | `self[selection]` |
    | Parameter | `mode`    | `'FACES'`         |

    Parameters
    ----------
    position : Vector, optional
        socket 'Position' (id: Position)

    radius : Float, optional
        socket 'Radius' (id: Radius)


    Returns
    -------
    Cloud
    """
    node = Node('Mesh to Points', {'Mesh': self, 'Selection': self.get_selection(), 'Position': position, 'Radius': radius}, mode='FACES')
    return node._out

flip_faces()

Node Flip Faces

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
def flip_faces(self):
    """ > Node Flip Faces

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Mesh      | `self`            |
    | Socket | Selection | `self[selection]` |

    Returns
    -------
    Mesh
    """
    node = Node('Flip Faces', {'Mesh': self, 'Selection': self.get_selection()})
    self._jump(node._out)
    return self._domain_to_geometry

index()

Node Index

Returns:

Type Description
Integer
Source code in core/generated/geometry.py
114
115
116
117
118
119
120
121
122
123
@utils.classproperty
def index(cls):
    """ > Node Index

    Returns
    -------
    Integer
    """
    node = Node('Index', )
    return node._out

index_of_nearest(position=None, group_id=None) classmethod

Node Index of Nearest

Parameters:

Name Type Description Default
position Vector

socket 'Position' (id: Position)

None
group_id Integer

socket 'Group ID' (id: Group ID)

None

Returns:

Type Description
Integer

peer sockets: has_neighbor_ (Boolean)

Source code in core/generated/geometry.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@classmethod
def index_of_nearest(cls, position: Vector = None, group_id: Integer = None):
    """ > Node Index of Nearest

    Parameters
    ----------
    position : Vector, optional
        socket 'Position' (id: Position)

    group_id : Integer, optional
        socket 'Group ID' (id: Group ID)


    Returns
    -------
    Integer
        peer sockets: has_neighbor_ (Boolean)

    """
    node = Node('Index of Nearest', {'Position': position, 'Group ID': group_id})
    return node._out

index_switch(*values, index=None, default_index=0)

Node Index Switch

with GeoNodes("index_switch demo") as tree:

    # Create some geometries
    geo    = Geometry()
    cube   = Mesh.Cube()
    sphere = Mesh.IcoSphere()
    cone   = Mesh.Cone()

    # Pick in this list
    pick_geo = geo.index_switch(cube, sphere, cone, index=tree.new_input("Geometry index", default_value=2))

    # Plug the result to the output
    pick_geo.out()

Parameters:

Name Type Description Default
*values Any

List of Sockets to select into

()
index Integer

socket 'Index' (Index)

None
default_index int

default idex

0

Returns:

Type Description
Socket
Source code in core/socket_class.py
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
def index_switch(self, *values, index = None, default_index: int = 0):
    """ > Node Index Switch

    ``` python
    with GeoNodes("index_switch demo") as tree:

        # Create some geometries
        geo    = Geometry()
        cube   = Mesh.Cube()
        sphere = Mesh.IcoSphere()
        cone   = Mesh.Cone()

        # Pick in this list
        pick_geo = geo.index_switch(cube, sphere, cone, index=tree.new_input("Geometry index", default_value=2))

        # Plug the result to the output
        pick_geo.out()
    ```

    Parameters
    ----------
    *values : Any
        List of Sockets to select into

    index : Integer, optional
        socket 'Index' (Index)

    default_index : int, default=0
        default idex

    Returns
    -------
    Socket
    """
    return self.IndexSwitch(self, *values, index=index, default_index=default_index)

instance_on_points(instance=None, pick_instance=None, instance_index=None, rotation=None, scale=None)

Node Instance on Points

Fixed values

Kind Name Value
Socket Points self
Socket Selection self[selection]

Parameters:

Name Type Description Default
instance Instances

socket 'Instance' (id: Instance)

None
pick_instance Boolean

socket 'Pick Instance' (id: Pick Instance)

None
instance_index Integer

socket 'Instance Index' (id: Instance Index)

None
rotation Rotation

socket 'Rotation' (id: Rotation)

None
scale Vector

socket 'Scale' (id: Scale)

None

Returns:

Type Description
Instances
Source code in core/generated/geometry.py
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
def instance_on_points(self,
                instance: Instances = None,
                pick_instance: Boolean = None,
                instance_index: Integer = None,
                rotation: Rotation = None,
                scale: Vector = None):
    """ > Node Instance on Points

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Points    | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    instance : Instances, optional
        socket 'Instance' (id: Instance)

    pick_instance : Boolean, optional
        socket 'Pick Instance' (id: Pick Instance)

    instance_index : Integer, optional
        socket 'Instance Index' (id: Instance Index)

    rotation : Rotation, optional
        socket 'Rotation' (id: Rotation)

    scale : Vector, optional
        socket 'Scale' (id: Scale)


    Returns
    -------
    Instances
    """
    node = Node('Instance on Points', {'Points': self, 'Selection': self.get_selection(), 'Instance': instance, 'Pick Instance': pick_instance, 'Instance Index': instance_index, 'Rotation': rotation, 'Scale': scale})
    return node._out

intersect(*mesh, solver='FLOAT')

Node Mesh Boolean

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Parameter operation 'INTERSECT'

Parameters:

Name Type Description Default
mesh Mesh

socket 'Mesh' (id: Mesh 2)

()
solver Literal['Exact', 'Float', 'Manifold']

parameter solver

'FLOAT'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
def intersect(self, *mesh: Mesh, solver: Literal['EXACT', 'FLOAT', 'MANIFOLD'] = 'FLOAT'):
    """ > Node Mesh Boolean

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind      | Name        | Value         |
    | --------- | ----------- | ------------- |
    | Parameter | `operation` | `'INTERSECT'` |

    Parameters
    ----------
    mesh : Mesh, optional
        socket 'Mesh' (id: Mesh 2)

    solver : Literal['Exact', 'Float', 'Manifold']
        parameter `solver`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Mesh Boolean', 'solver', solver, 'intersect', ('EXACT', 'FLOAT', 'MANIFOLD'))
    node = Node('Mesh Boolean', {'Mesh 2': [self] + list(mesh)}, operation='INTERSECT', solver=solver)
    self._jump(node._out)
    return self._domain_to_geometry

is_face_planar(threshold=None) classmethod

Node Is Face Planar

Parameters:

Name Type Description Default
threshold Float

socket 'Threshold' (id: Threshold)

None

Returns:

Type Description
Boolean
Source code in core/generated/mesh.py
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
@classmethod
def is_face_planar(cls, threshold: Float = None):
    """ > Node Is Face Planar

    Parameters
    ----------
    threshold : Float, optional
        socket 'Threshold' (id: Threshold)


    Returns
    -------
    Boolean
    """
    node = Node('Is Face Planar', {'Threshold': threshold})
    return node._out

island_count()

Node Mesh Island

Returns:

Type Description
island_count
Source code in core/generated/mesh.py
717
718
719
720
721
722
723
724
725
726
@utils.classproperty
def island_count(cls):
    """ > Node Mesh Island

    Returns
    -------
    island_count
    """
    node = Node('Mesh Island', )
    return node.island_count

island_index()

Node Mesh Island

Returns:

Type Description
island_index
Source code in core/generated/mesh.py
706
707
708
709
710
711
712
713
714
715
@utils.classproperty
def island_index(cls):
    """ > Node Mesh Island

    Returns
    -------
    island_index
    """
    node = Node('Mesh Island', )
    return node.island_index

join(*geometry)

Node Join Geometry

Jump : Socket refers to node output socket after the call

Parameters:

Name Type Description Default
geometry Geometry

socket 'Geometry' (id: Geometry)

()

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
def join(self, *geometry: Geometry):
    """ > Node Join Geometry

    > ***Jump*** : Socket refers to node output socket after the call

    Parameters
    ----------
    geometry : Geometry, optional
        socket 'Geometry' (id: Geometry)


    Returns
    -------
    Geometry
    """
    node = Node('Join Geometry', {'Geometry': [self] + list(geometry)})
    self._jump(node._out)
    return self._domain_to_geometry

Link input sockets of the node

Allow to chain input sockets linking.

Source code in core/socket_class.py
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
def link_inputs(self,
    from_node   : Node = None,
    from_panel  : str = "",
    *,
    include     : list =  None,
    exclude     : list  = [],
    panel       : str = "",
    ):
    """ Link input sockets of the node

    Allow to chain input sockets linking.
    """
    self.node.link_inputs(from_node, from_panel=from_panel, include=include, exclude=exclude, panel=panel)
    return self

Link panel input sockets of the node

Allow to chain input sockets linking.

Source code in core/socket_class.py
1021
1022
1023
1024
1025
1026
1027
def link_panel(self, panel: str, from_node : Node = None):
    """ Link panel input sockets of the node

    Allow to chain input sockets linking.
    """
    self.node.link_panel(panel, from_node=from_node)
    return self

material_selection(material=None) classmethod

Node Material Selection

Parameters:

Name Type Description Default
material Material

socket 'Material' (id: Material)

None

Returns:

Type Description
Boolean
Source code in core/generated/mesh.py
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
@classmethod
def material_selection(cls, material: Material = None):
    """ > Node Material Selection

    Parameters
    ----------
    material : Material, optional
        socket 'Material' (id: Material)


    Returns
    -------
    Boolean
    """
    node = Node('Material Selection', {'Material': material})
    return node._out

menu_switch(self_name='Self', named_sockets={}, default_menu=None, **sockets)

Node Menu Switch

[&NO_JUMP]

Self is connected to the first menu item with the name provided as argument.

The items of the Menu Switch node are provided in the 'items' dict. An group input socket named after the 'name' argument is linked to menu selector.

Parameters:

Name Type Description Default
named_sockets dict

sockets to create default={}.

{}
default_menu str

default menu value default=None.

None
sockets dict

items

{}

Returns:

Type Description
Socket
Source code in core/socket_class.py
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
def menu_switch(self,
            self_name       : str = 'Self', 
            named_sockets   : dict = {},
            default_menu    : str = None,
            **sockets):
    """ > Node Menu Switch

    [&NO_JUMP]

    Self is connected to the first menu item with the name provided as argument.

    The items of the Menu Switch node are provided in the 'items' dict.
    An group input socket named after the 'name' argument is linked to menu selector.

    Parameters
    ----------
    named_sockets : dict, optional
        sockets to create default={}.

    default_menu : str, optional
        default menu value default=None.

    sockets : dict
        items


    Returns
    -------
    Socket
    """        
    return self.MenuSwitch(named_sockets = {self_name: self, **named_sockets}, default_menu=default_menu, **sockets)

merge(mode=None, distance=None)

Node Merge by Distance

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Geometry self
Socket Selection self[selection]

Parameters:

Name Type Description Default
mode menu='All'

('All', 'Connected')

None
distance Float

socket 'Distance' (id: Distance)

None

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
def merge(self, mode: Literal['All', 'Connected'] = None, distance: Float = None):
    """ > Node Merge by Distance

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Geometry  | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    mode : menu='All', optional
        ('All', 'Connected')

    distance : Float, optional
        socket 'Distance' (id: Distance)


    Returns
    -------
    Geometry
    """
    node = Node('Merge by Distance', {'Geometry': self, 'Selection': self.get_selection(), 'Mode': mode, 'Distance': distance})
    self._jump(node._out)
    return self._domain_to_geometry

merge_by_distance(mode=None, distance=None)

Node Merge by Distance

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Geometry self
Socket Selection self[selection]

Parameters:

Name Type Description Default
mode menu='All'

('All', 'Connected')

None
distance Float

socket 'Distance' (id: Distance)

None

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
def merge_by_distance(self, mode: Literal['All', 'Connected'] = None, distance: Float = None):
    """ > Node Merge by Distance

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Geometry  | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    mode : menu='All', optional
        ('All', 'Connected')

    distance : Float, optional
        socket 'Distance' (id: Distance)


    Returns
    -------
    Geometry
    """
    node = Node('Merge by Distance', {'Geometry': self, 'Selection': self.get_selection(), 'Mode': mode, 'Distance': distance})
    self._jump(node._out)
    return self._domain_to_geometry

mesh_island()

Node Mesh Island

Returns:

Type Description
Integer

peer sockets: island_count_ (Integer)

Source code in core/generated/mesh.py
693
694
695
696
697
698
699
700
701
702
703
704
@utils.classproperty
def mesh_island(cls):
    """ > Node Mesh Island

    Returns
    -------
    Integer
        peer sockets: island_count_ (Integer)

    """
    node = Node('Mesh Island', )
    return node._out

offset_corner_in_face(corner_index=None, offset=None) classmethod

Node Offset Corner in Face

Parameters:

Name Type Description Default
corner_index Integer

socket 'Corner Index' (id: Corner Index)

None
offset Integer

socket 'Offset' (id: Offset)

None

Returns:

Type Description
Integer
Source code in core/generated/mesh.py
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
@classmethod
def offset_corner_in_face(cls, corner_index: Integer = None, offset: Integer = None):
    """ > Node Offset Corner in Face

    Parameters
    ----------
    corner_index : Integer, optional
        socket 'Corner Index' (id: Corner Index)

    offset : Integer, optional
        socket 'Offset' (id: Offset)


    Returns
    -------
    Integer
    """
    node = Node('Offset Corner in Face', {'Corner Index': corner_index, 'Offset': offset})
    return node._out

out(name=None, panel='', **props)

Plug the value to the Group Output Node.

with GeoNodes("Plug to group output"):
    # Create a cube
    geo = Mesh.Cube()
    # To Group Output geometry as socket named "Cube"
    geo.out("Cube")

The "Do nothing" modifier is simply Geometry().out()

Parameters:

Name Type Description Default
name str

socket name default=None.

None

Returns:

Type Description
None
Source code in core/socket_class.py
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
def out(self, name: str = None, panel: str = "", **props):
    """ Plug the value to the Group Output Node.

    ``` python
    with GeoNodes("Plug to group output"):
        # Create a cube
        geo = Mesh.Cube()
        # To Group Output geometry as socket named "Cube"
        geo.out("Cube")
    ```

    The "Do nothing" modifier is simply ``` Geometry().out() ```

    Parameters
    ----------
    name : str, optional
        socket name default=None.


    Returns
    -------
    None
    """
    self._is_empty(f"Impossible to link an empty socket (name: '{name}').")

    out_node = self._tree.get_output_node()
    out_node.set_input_socket(name=name, value=self, create=True, panel=panel, **props)

proximity(group_id=None, sample_position=None, sample_group_id=None, target_element='FACES')

Node Geometry Proximity

Fixed values

Kind Name Value
Socket Geometry self

Parameters:

Name Type Description Default
group_id Integer

socket 'Group ID' (id: Group ID)

None
sample_position Vector

socket 'Sample Position' (id: Source Position)

None
sample_group_id Integer

socket 'Sample Group ID' (id: Sample Group ID)

None
target_element Literal['Points', 'Edges', 'Faces']

parameter target_element

'FACES'

Returns:

Type Description
Vector

peer sockets: distance_ (Float), is_valid_ (Boolean)

Source code in core/generated/geometry.py
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
def proximity(self,
                group_id: Integer = None,
                sample_position: Vector = None,
                sample_group_id: Integer = None,
                target_element: Literal['POINTS', 'EDGES', 'FACES'] = 'FACES'):
    """ > Node Geometry Proximity

    **Fixed values**

    | Kind   | Name     | Value  |
    | ------ | -------- | ------ |
    | Socket | Geometry | `self` |

    Parameters
    ----------
    group_id : Integer, optional
        socket 'Group ID' (id: Group ID)

    sample_position : Vector, optional
        socket 'Sample Position' (id: Source Position)

    sample_group_id : Integer, optional
        socket 'Sample Group ID' (id: Sample Group ID)

    target_element : Literal['Points', 'Edges', 'Faces']
        parameter `target_element`


    Returns
    -------
    Vector
        peer sockets: distance_ (Float), is_valid_ (Boolean)

    """
    utils.check_enum_arg('Geometry Proximity', 'target_element', target_element, 'proximity', ('POINTS', 'EDGES', 'FACES'))
    node = Node('Geometry Proximity', {'Target': self, 'Group ID': group_id, 'Source Position': sample_position, 'Sample Group ID': sample_group_id}, target_element=target_element)
    return node._out

proximity_edges(group_id=None, sample_position=None, sample_group_id=None)

Node Geometry Proximity

Fixed values

Kind Name Value
Socket Geometry self
Parameter target_element 'EDGES'

Parameters:

Name Type Description Default
group_id Integer

socket 'Group ID' (id: Group ID)

None
sample_position Vector

socket 'Sample Position' (id: Source Position)

None
sample_group_id Integer

socket 'Sample Group ID' (id: Sample Group ID)

None

Returns:

Type Description
Vector

peer sockets: distance_ (Float), is_valid_ (Boolean)

Source code in core/generated/geometry.py
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
def proximity_edges(self,
                group_id: Integer = None,
                sample_position: Vector = None,
                sample_group_id: Integer = None):
    """ > Node Geometry Proximity

    **Fixed values**

    | Kind      | Name             | Value     |
    | --------- | ---------------- | --------- |
    | Socket    | Geometry         | `self`    |
    | Parameter | `target_element` | `'EDGES'` |

    Parameters
    ----------
    group_id : Integer, optional
        socket 'Group ID' (id: Group ID)

    sample_position : Vector, optional
        socket 'Sample Position' (id: Source Position)

    sample_group_id : Integer, optional
        socket 'Sample Group ID' (id: Sample Group ID)


    Returns
    -------
    Vector
        peer sockets: distance_ (Float), is_valid_ (Boolean)

    """
    node = Node('Geometry Proximity', {'Target': self, 'Group ID': group_id, 'Source Position': sample_position, 'Sample Group ID': sample_group_id}, target_element='EDGES')
    return node._out

proximity_faces(group_id=None, sample_position=None, sample_group_id=None)

Node Geometry Proximity

Fixed values

Kind Name Value
Socket Geometry self
Parameter target_element 'FACES'

Parameters:

Name Type Description Default
group_id Integer

socket 'Group ID' (id: Group ID)

None
sample_position Vector

socket 'Sample Position' (id: Source Position)

None
sample_group_id Integer

socket 'Sample Group ID' (id: Sample Group ID)

None

Returns:

Type Description
Vector

peer sockets: distance_ (Float), is_valid_ (Boolean)

Source code in core/generated/geometry.py
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
def proximity_faces(self,
                group_id: Integer = None,
                sample_position: Vector = None,
                sample_group_id: Integer = None):
    """ > Node Geometry Proximity

    **Fixed values**

    | Kind      | Name             | Value     |
    | --------- | ---------------- | --------- |
    | Socket    | Geometry         | `self`    |
    | Parameter | `target_element` | `'FACES'` |

    Parameters
    ----------
    group_id : Integer, optional
        socket 'Group ID' (id: Group ID)

    sample_position : Vector, optional
        socket 'Sample Position' (id: Source Position)

    sample_group_id : Integer, optional
        socket 'Sample Group ID' (id: Sample Group ID)


    Returns
    -------
    Vector
        peer sockets: distance_ (Float), is_valid_ (Boolean)

    """
    node = Node('Geometry Proximity', {'Target': self, 'Group ID': group_id, 'Source Position': sample_position, 'Sample Group ID': sample_group_id}, target_element='FACES')
    return node._out

proximity_points(group_id=None, sample_position=None, sample_group_id=None)

Node Geometry Proximity

Fixed values

Kind Name Value
Socket Geometry self
Parameter target_element 'POINTS'

Parameters:

Name Type Description Default
group_id Integer

socket 'Group ID' (id: Group ID)

None
sample_position Vector

socket 'Sample Position' (id: Source Position)

None
sample_group_id Integer

socket 'Sample Group ID' (id: Sample Group ID)

None

Returns:

Type Description
Vector

peer sockets: distance_ (Float), is_valid_ (Boolean)

Source code in core/generated/geometry.py
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
def proximity_points(self,
                group_id: Integer = None,
                sample_position: Vector = None,
                sample_group_id: Integer = None):
    """ > Node Geometry Proximity

    **Fixed values**

    | Kind      | Name             | Value      |
    | --------- | ---------------- | ---------- |
    | Socket    | Geometry         | `self`     |
    | Parameter | `target_element` | `'POINTS'` |

    Parameters
    ----------
    group_id : Integer, optional
        socket 'Group ID' (id: Group ID)

    sample_position : Vector, optional
        socket 'Sample Position' (id: Source Position)

    sample_group_id : Integer, optional
        socket 'Sample Group ID' (id: Sample Group ID)


    Returns
    -------
    Vector
        peer sockets: distance_ (Float), is_valid_ (Boolean)

    """
    node = Node('Geometry Proximity', {'Target': self, 'Group ID': group_id, 'Source Position': sample_position, 'Sample Group ID': sample_group_id}, target_element='POINTS')
    return node._out

raycast(attribute=None, interpolation=None, source_position=None, ray_direction=None, ray_length=None)

Node Raycast

Fixed values

Kind Name Value
Socket Target Geometry self
Parameter data_type from attribute type

Parameters:

Name Type Description Default
attribute Float | Integer | Boolean | Vector | Color | Rotation | Matrix

socket 'Attribute' (id: Attribute)

None
interpolation menu='Interpolated'

('Interpolated', 'Nearest')

None
source_position Vector

socket 'Source Position' (id: Source Position)

None
ray_direction Vector

socket 'Ray Direction' (id: Ray Direction)

None
ray_length Float

socket 'Ray Length' (id: Ray Length)

None

Returns:

Type Description
Boolean

peer sockets: hit_position_ (Vector), hit_normal_ (Vector), hit_distance_ (Float), attribute_ (Float)

Source code in core/generated/geometry.py
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
def raycast(self,
                attribute: Float | Integer | Boolean | Vector | Color | Rotation | Matrix = None,
                interpolation: Literal['Interpolated', 'Nearest'] = None,
                source_position: Vector = None,
                ray_direction: Vector = None,
                ray_length: Float = None):
    """ > Node Raycast

    **Fixed values**

    | Kind      | Name            | Value                 |
    | --------- | --------------- | --------------------- |
    | Socket    | Target Geometry | `self`                |
    | Parameter | `data_type`     | from `attribute` type |

    Parameters
    ----------
    attribute : Float | Integer | Boolean | Vector | Color | Rotation | Matrix, optional
        socket 'Attribute' (id: Attribute)

    interpolation : menu='Interpolated', optional
        ('Interpolated', 'Nearest')

    source_position : Vector, optional
        socket 'Source Position' (id: Source Position)

    ray_direction : Vector, optional
        socket 'Ray Direction' (id: Ray Direction)

    ray_length : Float, optional
        socket 'Ray Length' (id: Ray Length)


    Returns
    -------
    Boolean
        peer sockets: hit_position_ (Vector), hit_normal_ (Vector), hit_distance_ (Float), attribute_ (Float)

    """
    data_type = SocketType.get_data_type_for_node(attribute, 'GeometryNodeRaycast')
    node = Node('Raycast', {'Target Geometry': self, 'Attribute': attribute, 'Interpolation': interpolation, 'Source Position': source_position, 'Ray Direction': ray_direction, 'Ray Length': ray_length}, data_type=data_type)
    return node._out

realize(realize_all=None, depth=None, realize_to_point_domain=False)

Node Realize Instances

Fixed values

Kind Name Value
Socket Geometry self
Socket Selection self[selection]

Parameters:

Name Type Description Default
realize_all Boolean

socket 'Realize All' (id: Realize All)

None
depth Integer

socket 'Depth' (id: Depth)

None
realize_to_point_domain bool

parameter realize_to_point_domain

False

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
def realize(self,
                realize_all: Boolean = None,
                depth: Integer = None,
                realize_to_point_domain = False):
    """ > Node Realize Instances

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Geometry  | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    realize_all : Boolean, optional
        socket 'Realize All' (id: Realize All)

    depth : Integer, optional
        socket 'Depth' (id: Depth)

    realize_to_point_domain : bool
        parameter `realize_to_point_domain`


    Returns
    -------
    Geometry
    """
    node = Node('Realize Instances', {'Geometry': self, 'Selection': self.get_selection(), 'Realize All': realize_all, 'Depth': depth}, realize_to_point_domain=realize_to_point_domain)
    return node._out

remove_named_attribute(pattern_mode=None, name=None)

Node Remove Named Attribute

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Geometry self

Parameters:

Name Type Description Default
pattern_mode menu='Exact'

('Exact', 'Wildcard')

None
name String

socket 'Name' (id: Name)

None

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
def remove_named_attribute(self, pattern_mode: Literal['Exact', 'Wildcard'] = None, name: String = None):
    """ > Node Remove Named Attribute

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name     | Value  |
    | ------ | -------- | ------ |
    | Socket | Geometry | `self` |

    Parameters
    ----------
    pattern_mode : menu='Exact', optional
        ('Exact', 'Wildcard')

    name : String, optional
        socket 'Name' (id: Name)


    Returns
    -------
    Geometry
    """
    node = Node('Remove Named Attribute', {'Geometry': self, 'Pattern Mode': pattern_mode, 'Name': name})
    self._jump(node._out)
    return self._domain_to_geometry

repeat(iterations=1, named_sockets={}, **sockets)

Repeat zone

Parameters:

Name Type Description Default
iterations Integer

iteration socket

1
named_sockets dict

named sockets

{}
sockets dict

other sockets

{}

Returns:

Type Description
ZoneIterator
Source code in core/socket_class.py
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
def repeat(self, iterations=1, named_sockets: dict={}, **sockets):
    """ Repeat zone

    Parameters
    ----------
    iterations : Integer, default=1
        iteration socket

    named_sockets : dict, default={}
        named sockets

    sockets : dict, optional
        other sockets


    Returns
    -------
    ZoneIterator
    """
    class_name = type(self).__name__
    node = ZoneNode("Repeat", named_sockets={class_name: self, **named_sockets}, Iterations=iterations, **sockets)
    return ZoneIterator(self, node)

replace_material(old=None, new=None)

Node Replace Material

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Geometry self

Parameters:

Name Type Description Default
old Material

socket 'Old' (id: Old)

None
new Material

socket 'New' (id: New)

None

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
def replace_material(self, old: Material = None, new: Material = None):
    """ > Node Replace Material

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name     | Value  |
    | ------ | -------- | ------ |
    | Socket | Geometry | `self` |

    Parameters
    ----------
    old : Material, optional
        socket 'Old' (id: Old)

    new : Material, optional
        socket 'New' (id: New)


    Returns
    -------
    Geometry
    """
    node = Node('Replace Material', {'Geometry': self, 'Old': old, 'New': new})
    self._jump(node._out)
    return self._domain_to_geometry

sample_nearest_surface(value=None, group_id=None, sample_position=None, sample_group_id=None)

Node Sample Nearest Surface

Fixed values

Kind Name Value
Socket Mesh self
Parameter data_type from value type

Parameters:

Name Type Description Default
value Float | Integer | Boolean | Vector | Color | Rotation | Matrix

socket 'Value' (id: Value)

None
group_id Integer

socket 'Group ID' (id: Group ID)

None
sample_position Vector

socket 'Sample Position' (id: Sample Position)

None
sample_group_id Integer

socket 'Sample Group ID' (id: Sample Group ID)

None

Returns:

Type Description
Float

peer sockets: is_valid_ (Boolean)

Source code in core/generated/mesh.py
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
def sample_nearest_surface(self,
                value: Float | Integer | Boolean | Vector | Color | Rotation | Matrix = None,
                group_id: Integer = None,
                sample_position: Vector = None,
                sample_group_id: Integer = None):
    """ > Node Sample Nearest Surface

    **Fixed values**

    | Kind      | Name        | Value             |
    | --------- | ----------- | ----------------- |
    | Socket    | Mesh        | `self`            |
    | Parameter | `data_type` | from `value` type |

    Parameters
    ----------
    value : Float | Integer | Boolean | Vector | Color | Rotation | Matrix, optional
        socket 'Value' (id: Value)

    group_id : Integer, optional
        socket 'Group ID' (id: Group ID)

    sample_position : Vector, optional
        socket 'Sample Position' (id: Sample Position)

    sample_group_id : Integer, optional
        socket 'Sample Group ID' (id: Sample Group ID)


    Returns
    -------
    Float
        peer sockets: is_valid_ (Boolean)

    """
    data_type = SocketType.get_data_type_for_node(value, 'GeometryNodeSampleNearestSurface')
    node = Node('Sample Nearest Surface', {'Mesh': self, 'Value': value, 'Group ID': group_id, 'Sample Position': sample_position, 'Sample Group ID': sample_group_id}, data_type=data_type)
    return node._out

sample_uv_surface(value=None, uv_map=None, sample_uv=None)

Node Sample UV Surface

Fixed values

Kind Name Value
Socket Mesh self
Parameter data_type from value type

Parameters:

Name Type Description Default
value Float | Integer | Boolean | Vector | Color | Rotation | Matrix

socket 'Value' (id: Value)

None
uv_map Vector

socket 'UV Map' (id: Source UV Map)

None
sample_uv Vector

socket 'Sample UV' (id: Sample UV)

None

Returns:

Type Description
Float

peer sockets: is_valid_ (Boolean)

Source code in core/generated/mesh.py
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
def sample_uv_surface(self,
                value: Float | Integer | Boolean | Vector | Color | Rotation | Matrix = None,
                uv_map: Vector = None,
                sample_uv: Vector = None):
    """ > Node Sample UV Surface

    **Fixed values**

    | Kind      | Name        | Value             |
    | --------- | ----------- | ----------------- |
    | Socket    | Mesh        | `self`            |
    | Parameter | `data_type` | from `value` type |

    Parameters
    ----------
    value : Float | Integer | Boolean | Vector | Color | Rotation | Matrix, optional
        socket 'Value' (id: Value)

    uv_map : Vector, optional
        socket 'UV Map' (id: Source UV Map)

    sample_uv : Vector, optional
        socket 'Sample UV' (id: Sample UV)


    Returns
    -------
    Float
        peer sockets: is_valid_ (Boolean)

    """
    data_type = SocketType.get_data_type_for_node(value, 'GeometryNodeSampleUVSurface')
    node = Node('Sample UV Surface', {'Mesh': self, 'Value': value, 'Source UV Map': uv_map, 'Sample UV': sample_uv}, data_type=data_type)
    return node._out

separate_components()

Node Separate Components

Fixed values

Kind Name Value
Socket Geometry self

Returns:

Type Description
node[mesh(Mesh), curve(Curve), grease_pencil(GreasePencil), point_cloud(Cloud), volume(Volume), instances(Instances)]
Source code in core/generated/geometry.py
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
def separate_components(self):
    """ > Node Separate Components

    **Fixed values**

    | Kind   | Name     | Value  |
    | ------ | -------- | ------ |
    | Socket | Geometry | `self` |

    Returns
    -------
    node [mesh (Mesh), curve (Curve), grease_pencil (GreasePencil), point_cloud (Cloud), volume (Volume), instances (Instances)]
    """
    node = self._cache('Separate Components', {'Geometry': self})
    return node

set_face_set(face_set=None)

Node Set Face Set

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]

Parameters:

Name Type Description Default
face_set Integer

socket 'Face Set' (id: Face Set)

None

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
def set_face_set(self, face_set: Integer = None):
    """ > Node Set Face Set

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Mesh      | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    face_set : Integer, optional
        socket 'Face Set' (id: Face Set)


    Returns
    -------
    Mesh
    """
    node = Node('Set Face Set', {'Mesh': self, 'Selection': self.get_selection(), 'Face Set': face_set})
    self._jump(node._out)
    return self._domain_to_geometry

set_id(id=None)

Node Set ID

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Geometry self
Socket Selection self[selection]

Parameters:

Name Type Description Default
id Integer

socket 'ID' (id: ID)

None

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
def set_id(self, id: Integer = None):
    """ > Node Set ID

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Geometry  | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    id : Integer, optional
        socket 'ID' (id: ID)


    Returns
    -------
    Geometry
    """
    node = Node('Set ID', {'Geometry': self, 'Selection': self.get_selection(), 'ID': id})
    self._jump(node._out)
    return self._domain_to_geometry

set_material(material=None)

Node Set Material

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Geometry self
Socket Selection self[selection]

Parameters:

Name Type Description Default
material Material

socket 'Material' (id: Material)

None

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
def set_material(self, material: Material = None):
    """ > Node Set Material

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Geometry  | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    material : Material, optional
        socket 'Material' (id: Material)


    Returns
    -------
    Geometry
    """
    node = Node('Set Material', {'Geometry': self, 'Selection': self.get_selection(), 'Material': material})
    self._jump(node._out)
    return self._domain_to_geometry

set_material_index(material_index=None)

Node Set Material Index

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Geometry self
Socket Selection self[selection]

Parameters:

Name Type Description Default
material_index Integer

socket 'Material Index' (id: Material Index)

None

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
def set_material_index(self, material_index: Integer = None):
    """ > Node Set Material Index

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Geometry  | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    material_index : Integer, optional
        socket 'Material Index' (id: Material Index)


    Returns
    -------
    Geometry
    """
    node = Node('Set Material Index', {'Geometry': self, 'Selection': self.get_selection(), 'Material Index': material_index})
    self._jump(node._out)
    return self._domain_to_geometry

set_name(name=None)

Node Set Geometry Name

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Geometry self

Parameters:

Name Type Description Default
name String

socket 'Name' (id: Name)

None

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
def set_name(self, name: String = None):
    """ > Node Set Geometry Name

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name     | Value  |
    | ------ | -------- | ------ |
    | Socket | Geometry | `self` |

    Parameters
    ----------
    name : String, optional
        socket 'Name' (id: Name)


    Returns
    -------
    Geometry
    """
    node = Node('Set Geometry Name', {'Geometry': self, 'Name': name})
    self._jump(node._out)
    return self._domain_to_geometry

set_normal(remove_custom=None, edge_sharpness=None, face_sharpness=None, domain='POINT', mode='SHARPNESS')

Node Set Mesh Normal

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self

Parameters:

Name Type Description Default
remove_custom Boolean

socket 'Remove Custom' (id: Remove Custom)

None
edge_sharpness Boolean

socket 'Edge Sharpness' (id: Edge Sharpness)

None
face_sharpness Boolean

socket 'Face Sharpness' (id: Face Sharpness)

None
domain Literal['Point', 'Face', 'Face Corner']

parameter domain

'POINT'
mode Literal['Sharpness', 'Free', 'Tangent Space']

parameter mode

'SHARPNESS'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
def set_normal(self,
                remove_custom: Boolean = None,
                edge_sharpness: Boolean = None,
                face_sharpness: Boolean = None,
                domain: Literal['POINT', 'FACE', 'CORNER'] = 'POINT',
                mode: Literal['SHARPNESS', 'FREE', 'TANGENT_SPACE'] = 'SHARPNESS'):
    """ > Node Set Mesh Normal

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Mesh | `self` |

    Parameters
    ----------
    remove_custom : Boolean, optional
        socket 'Remove Custom' (id: Remove Custom)

    edge_sharpness : Boolean, optional
        socket 'Edge Sharpness' (id: Edge Sharpness)

    face_sharpness : Boolean, optional
        socket 'Face Sharpness' (id: Face Sharpness)

    domain : Literal['Point', 'Face', 'Face Corner']
        parameter `domain`

    mode : Literal['Sharpness', 'Free', 'Tangent Space']
        parameter `mode`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Set Mesh Normal', 'domain', domain, 'set_normal', ('POINT', 'FACE', 'CORNER'))
    utils.check_enum_arg('Set Mesh Normal', 'mode', mode, 'set_normal', ('SHARPNESS', 'FREE', 'TANGENT_SPACE'))
    node = Node('Set Mesh Normal', {'Mesh': self, 'Remove Custom': remove_custom, 'Edge Sharpness': edge_sharpness, 'Face Sharpness': face_sharpness}, domain=domain, mode=mode)
    self._jump(node._out)
    return self._domain_to_geometry

set_normal_free(custom_normal=None, domain='POINT')

Node Set Mesh Normal

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self
Parameter mode 'FREE'

Parameters:

Name Type Description Default
custom_normal Vector

socket 'Custom Normal' (id: Custom Normal)

None
domain Literal['Point', 'Face', 'Face Corner']

parameter domain

'POINT'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
def set_normal_free(self,
                custom_normal: Vector = None,
                domain: Literal['POINT', 'FACE', 'CORNER'] = 'POINT'):
    """ > Node Set Mesh Normal

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind      | Name   | Value    |
    | --------- | ------ | -------- |
    | Socket    | Mesh   | `self`   |
    | Parameter | `mode` | `'FREE'` |

    Parameters
    ----------
    custom_normal : Vector, optional
        socket 'Custom Normal' (id: Custom Normal)

    domain : Literal['Point', 'Face', 'Face Corner']
        parameter `domain`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Set Mesh Normal', 'domain', domain, 'set_normal_free', ('POINT', 'FACE', 'CORNER'))
    node = Node('Set Mesh Normal', {'Mesh': self, 'Custom Normal': custom_normal}, domain=domain, mode='FREE')
    self._jump(node._out)
    return self._domain_to_geometry

set_normal_sharpness(remove_custom=None, edge_sharpness=None, face_sharpness=None, domain='POINT')

Node Set Mesh Normal

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self
Parameter mode 'SHARPNESS'

Parameters:

Name Type Description Default
remove_custom Boolean

socket 'Remove Custom' (id: Remove Custom)

None
edge_sharpness Boolean

socket 'Edge Sharpness' (id: Edge Sharpness)

None
face_sharpness Boolean

socket 'Face Sharpness' (id: Face Sharpness)

None
domain Literal['Point', 'Face', 'Face Corner']

parameter domain

'POINT'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
def set_normal_sharpness(self,
                remove_custom: Boolean = None,
                edge_sharpness: Boolean = None,
                face_sharpness: Boolean = None,
                domain: Literal['POINT', 'FACE', 'CORNER'] = 'POINT'):
    """ > Node Set Mesh Normal

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind      | Name   | Value         |
    | --------- | ------ | ------------- |
    | Socket    | Mesh   | `self`        |
    | Parameter | `mode` | `'SHARPNESS'` |

    Parameters
    ----------
    remove_custom : Boolean, optional
        socket 'Remove Custom' (id: Remove Custom)

    edge_sharpness : Boolean, optional
        socket 'Edge Sharpness' (id: Edge Sharpness)

    face_sharpness : Boolean, optional
        socket 'Face Sharpness' (id: Face Sharpness)

    domain : Literal['Point', 'Face', 'Face Corner']
        parameter `domain`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Set Mesh Normal', 'domain', domain, 'set_normal_sharpness', ('POINT', 'FACE', 'CORNER'))
    node = Node('Set Mesh Normal', {'Mesh': self, 'Remove Custom': remove_custom, 'Edge Sharpness': edge_sharpness, 'Face Sharpness': face_sharpness}, domain=domain, mode='SHARPNESS')
    self._jump(node._out)
    return self._domain_to_geometry

set_normal_tangent_space(custom_normal=None, domain='POINT')

Node Set Mesh Normal

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self
Parameter mode 'TANGENT_SPACE'

Parameters:

Name Type Description Default
custom_normal Vector

socket 'Custom Normal' (id: Custom Normal)

None
domain Literal['Point', 'Face', 'Face Corner']

parameter domain

'POINT'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
def set_normal_tangent_space(self,
                custom_normal: Vector = None,
                domain: Literal['POINT', 'FACE', 'CORNER'] = 'POINT'):
    """ > Node Set Mesh Normal

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind      | Name   | Value             |
    | --------- | ------ | ----------------- |
    | Socket    | Mesh   | `self`            |
    | Parameter | `mode` | `'TANGENT_SPACE'` |

    Parameters
    ----------
    custom_normal : Vector, optional
        socket 'Custom Normal' (id: Custom Normal)

    domain : Literal['Point', 'Face', 'Face Corner']
        parameter `domain`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Set Mesh Normal', 'domain', domain, 'set_normal_tangent_space', ('POINT', 'FACE', 'CORNER'))
    node = Node('Set Mesh Normal', {'Mesh': self, 'Custom Normal': custom_normal}, domain=domain, mode='TANGENT_SPACE')
    self._jump(node._out)
    return self._domain_to_geometry

set_position(position=None, offset=None)

Node Set Position

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Geometry self
Socket Selection self[selection]

Parameters:

Name Type Description Default
position Vector

socket 'Position' (id: Position)

None
offset Vector

socket 'Offset' (id: Offset)

None

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
def set_position(self, position: Vector = None, offset: Vector = None):
    """ > Node Set Position

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Geometry  | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    position : Vector, optional
        socket 'Position' (id: Position)

    offset : Vector, optional
        socket 'Offset' (id: Offset)


    Returns
    -------
    Geometry
    """
    node = Node('Set Position', {'Geometry': self, 'Selection': self.get_selection(), 'Position': position, 'Offset': offset})
    self._jump(node._out)
    return self._domain_to_geometry

shortest_edge_paths(end_vertex=None, edge_cost=None) classmethod

Node Shortest Edge Paths

Parameters:

Name Type Description Default
end_vertex Boolean

socket 'End Vertex' (id: End Vertex)

None
edge_cost Float

socket 'Edge Cost' (id: Edge Cost)

None

Returns:

Type Description
Integer

peer sockets: total_cost_ (Float)

Source code in core/generated/mesh.py
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
@classmethod
def shortest_edge_paths(cls, end_vertex: Boolean = None, edge_cost: Float = None):
    """ > Node Shortest Edge Paths

    Parameters
    ----------
    end_vertex : Boolean, optional
        socket 'End Vertex' (id: End Vertex)

    edge_cost : Float, optional
        socket 'Edge Cost' (id: Edge Cost)


    Returns
    -------
    Integer
        peer sockets: total_cost_ (Float)

    """
    node = Node('Shortest Edge Paths', {'End Vertex': end_vertex, 'Edge Cost': edge_cost})
    return node._out

signed_edge_angle()

Node Edge Angle

Returns:

Type Description
signed_angle
Source code in core/generated/mesh.py
617
618
619
620
621
622
623
624
625
626
@utils.classproperty
def signed_edge_angle(cls):
    """ > Node Edge Angle

    Returns
    -------
    signed_angle
    """
    node = Node('Edge Angle', )
    return node.signed_angle

simulation(named_sockets={}, **sockets)

Simulation zone

Parameters:

Name Type Description Default
named_sockets dict

named sockets

{}
sockets dict

other sockets

{}

Returns:

Type Description
ZoneIterator
Source code in core/socket_class.py
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
def simulation(self, named_sockets: dict={}, **sockets):
    """ Simulation zone

    Parameters
    ----------
    named_sockets : dict, default={}
        named sockets

    sockets : dict, optional
        other sockets

    Returns
    -------
    ZoneIterator
    """
    class_name = type(self).__name__
    node = ZoneNode("Simulation", named_sockets={class_name: self, **named_sockets}, **sockets)
    return ZoneIterator(self, node)

split_edges()

Node Split Edges

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
def split_edges(self):
    """ > Node Split Edges

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Mesh      | `self`            |
    | Socket | Selection | `self[selection]` |

    Returns
    -------
    Mesh
    """
    node = Node('Split Edges', {'Mesh': self, 'Selection': self.get_selection()})
    self._jump(node._out)
    return self._domain_to_geometry

subdivide(level=None)

Node Subdivide Mesh

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self

Parameters:

Name Type Description Default
level Integer

socket 'Level' (id: Level)

None

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
def subdivide(self, level: Integer = None):
    """ > Node Subdivide Mesh

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Mesh | `self` |

    Parameters
    ----------
    level : Integer, optional
        socket 'Level' (id: Level)


    Returns
    -------
    Mesh
    """
    node = Node('Subdivide Mesh', {'Mesh': self, 'Level': level})
    self._jump(node._out)
    return self._domain_to_geometry

subdivision_surface(level=None, edge_crease=None, vertex_crease=None, limit_surface=None, uv_smooth=None, boundary_smooth=None)

Node Subdivision Surface

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self

Parameters:

Name Type Description Default
level Integer

socket 'Level' (id: Level)

None
edge_crease Float

socket 'Edge Crease' (id: Edge Crease)

None
vertex_crease Float

socket 'Vertex Crease' (id: Vertex Crease)

None
limit_surface Boolean

socket 'Limit Surface' (id: Limit Surface)

None
uv_smooth menu='Keep Boundaries'

('None', 'Keep Corners', 'Keep Corners, Junctions', 'Keep Corners, Junctions, Concave', 'Keep Boundaries', 'All')

None
boundary_smooth menu='All'

('Keep Corners', 'All')

None

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
def subdivision_surface(self,
                level: Integer = None,
                edge_crease: Float = None,
                vertex_crease: Float = None,
                limit_surface: Boolean = None,
                uv_smooth: Literal['None', 'Keep Corners', 'Keep Corners, Junctions', 'Keep Corners, Junctions, Concave', 'Keep Boundaries', 'All'] = None,
                boundary_smooth: Literal['Keep Corners', 'All'] = None):
    """ > Node Subdivision Surface

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Mesh | `self` |

    Parameters
    ----------
    level : Integer, optional
        socket 'Level' (id: Level)

    edge_crease : Float, optional
        socket 'Edge Crease' (id: Edge Crease)

    vertex_crease : Float, optional
        socket 'Vertex Crease' (id: Vertex Crease)

    limit_surface : Boolean, optional
        socket 'Limit Surface' (id: Limit Surface)

    uv_smooth : menu='Keep Boundaries', optional
        ('None', 'Keep Corners', 'Keep Corners, Junctions', 'Keep Corners, Junctions, Concave', 'Keep Boundaries', 'All')

    boundary_smooth : menu='All', optional
        ('Keep Corners', 'All')


    Returns
    -------
    Mesh
    """
    node = Node('Subdivision Surface', {'Mesh': self, 'Level': level, 'Edge Crease': edge_crease, 'Vertex Crease': vertex_crease, 'Limit Surface': limit_surface, 'UV Smooth': uv_smooth, 'Boundary Smooth': boundary_smooth})
    self._jump(node._out)
    return self._domain_to_geometry

switch(condition=None, true=None)

Node Switch

Self is connected to 'false' socket.

Note

switch returns self if global constant SWITCH_JUMP = True (default) set SWITCH_JUMP = False for legacy behavior

with GeoNodes("Switch demo"):

    from geonodes.core import constants
    # Legacy behavior (default is True)
    constants.SWITCH_JUMP = False

    choice = Boolean(True, "Use Sphere")

    # Two possible geometries
    cube   = Mesh.Cube()
    sphere = Mesh.IcoSphere()

    # Select
    # Legacy behavior: cube is unchanged otherwise cube
    geo = cube.switch(choice, sphere)

    # To group output
    geo.out()
Information
  • Socket 'False' : self

Parameters:

Name Type Description Default
condition Boolean

socket 'Switch' (Switch)

None
true

socket 'True' (True)

None

Returns:

Type Description
Socket(self)
Source code in core/socket_class.py
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
def switch(self, condition=None, true=None):
    """ > Node Switch

    Self is connected to 'false' socket.

    !!! note
        switch returns self if global constant SWITCH_JUMP = True (default)
        set SWITCH_JUMP = False for legacy behavior

    ``` python
    with GeoNodes("Switch demo"):

        from geonodes.core import constants
        # Legacy behavior (default is True)
        constants.SWITCH_JUMP = False

        choice = Boolean(True, "Use Sphere")

        # Two possible geometries
        cube   = Mesh.Cube()
        sphere = Mesh.IcoSphere()

        # Select
        # Legacy behavior: cube is unchanged otherwise cube
        geo = cube.switch(choice, sphere)

        # To group output
        geo.out()
    ```

    Information
    -----------
    - Socket 'False' : self

    Parameters
    ----------
    condition : Boolean
        socket 'Switch' (Switch)

    true
        socket 'True' (True)


    Returns
    -------
    Socket (self)
    """
    res = self.Switch(condition=condition, false=self, true=true)
    if constants.SWITCH_JUMP:
        return self._jump(res)
    else:
        return res

switch_false(condition=None, false=None)

Node Switch

[&JUMP]

Self is connected to 'true' socket.

Important

This methods behaves the inverse of switch : self is connected to "True" socket and the argument to "False", socket

Note

This method is mainly provided to cover the case when 'False' socket is None

with GeoNodes("Switch demo"):

    geo = Geometry()

    show_geometry = Boolean(False, "Merge with Cube")

    cube = Mesh.Cube()

    geo += cube.switch_false(show_geometry)

    # Is equivalent to
    geo += Geometry.Switch(show_geometry, None, cube)

    # To group output
    geo.out()

Note

This method let self socket unchanged. To set self socket to the result

Information
  • Socket 'True' : self

Parameters:

Name Type Description Default
condition Boolean

socket 'Switch' (Switch)

None
false

socket 'False' (False)

None

Returns:

Type Description
Socket
Source code in core/socket_class.py
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
def switch_false(self, condition=None, false=None):
    """ > Node Switch

    [&JUMP]

    Self is connected to 'true' socket.

    !!! important
        This methods behaves the inverse of switch : self is connected to "True" socket and  the argument to "False", socket

    !!! note
        This method is mainly provided to cover the case when 'False' socket is None

    ``` python
    with GeoNodes("Switch demo"):

        geo = Geometry()

        show_geometry = Boolean(False, "Merge with Cube")

        cube = Mesh.Cube()

        geo += cube.switch_false(show_geometry)

        # Is equivalent to
        geo += Geometry.Switch(show_geometry, None, cube)

        # To group output
        geo.out()
    ```

    !!! note
        This method let self socket unchanged. To set self socket to the result

    Information
    -----------
    - Socket 'True' : self

    Parameters
    ----------
    condition : Boolean
        socket 'Switch' (Switch)

    false
        socket 'False' (False)


    Returns
    -------
    Socket
    """
    res = self.Switch(condition=condition, false=false, true=self)
    if constants.SWITCH_JUMP:
        return self._jump(res)
    else:
        return res

to_curve(mode='EDGES')

Node Mesh to Curve

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]

Parameters:

Name Type Description Default
mode Literal['Edges', 'Faces']

parameter mode

'EDGES'

Returns:

Type Description
Curve
Source code in core/generated/mesh.py
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
def to_curve(self, mode: Literal['EDGES', 'FACES'] = 'EDGES'):
    """ > Node Mesh to Curve

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Mesh      | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    mode : Literal['Edges', 'Faces']
        parameter `mode`


    Returns
    -------
    Curve
    """
    utils.check_enum_arg('Mesh to Curve', 'mode', mode, 'to_curve', ('EDGES', 'FACES'))
    node = Node('Mesh to Curve', {'Mesh': self, 'Selection': self.get_selection()}, mode=mode)
    return node._out

to_curve_edges()

Node Mesh to Curve

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]
Parameter mode 'EDGES'

Returns:

Type Description
Curve
Source code in core/generated/mesh.py
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
def to_curve_edges(self):
    """ > Node Mesh to Curve

    **Fixed values**

    | Kind      | Name      | Value             |
    | --------- | --------- | ----------------- |
    | Socket    | Mesh      | `self`            |
    | Socket    | Selection | `self[selection]` |
    | Parameter | `mode`    | `'EDGES'`         |

    Returns
    -------
    Curve
    """
    node = Node('Mesh to Curve', {'Mesh': self, 'Selection': self.get_selection()}, mode='EDGES')
    return node._out

to_curve_faces()

Node Mesh to Curve

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]
Parameter mode 'FACES'

Returns:

Type Description
Curve
Source code in core/generated/mesh.py
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
def to_curve_faces(self):
    """ > Node Mesh to Curve

    **Fixed values**

    | Kind      | Name      | Value             |
    | --------- | --------- | ----------------- |
    | Socket    | Mesh      | `self`            |
    | Socket    | Selection | `self[selection]` |
    | Parameter | `mode`    | `'FACES'`         |

    Returns
    -------
    Curve
    """
    node = Node('Mesh to Curve', {'Mesh': self, 'Selection': self.get_selection()}, mode='FACES')
    return node._out

to_density_grid(density=None, voxel_size=None, gradient_width=None)

Node Mesh to Density Grid

Fixed values

Kind Name Value
Socket Mesh self

Parameters:

Name Type Description Default
density Float

socket 'Density' (id: Density)

None
voxel_size Float

socket 'Voxel Size' (id: Voxel Size)

None
gradient_width Float

socket 'Gradient Width' (id: Gradient Width)

None

Returns:

Type Description
Float
Source code in core/generated/mesh.py
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
def to_density_grid(self,
                density: Float = None,
                voxel_size: Float = None,
                gradient_width: Float = None):
    """ > Node Mesh to Density Grid

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Mesh | `self` |

    Parameters
    ----------
    density : Float, optional
        socket 'Density' (id: Density)

    voxel_size : Float, optional
        socket 'Voxel Size' (id: Voxel Size)

    gradient_width : Float, optional
        socket 'Gradient Width' (id: Gradient Width)


    Returns
    -------
    Float
    """
    node = Node('Mesh to Density Grid', {'Mesh': self, 'Density': density, 'Voxel Size': voxel_size, 'Gradient Width': gradient_width})
    return node._out

to_instance(*geometry)

Node Geometry to Instance

Parameters:

Name Type Description Default
geometry Geometry

socket 'Geometry' (id: Geometry)

()

Returns:

Type Description
Instances
Source code in core/generated/geometry.py
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
def to_instance(self, *geometry: Geometry):
    """ > Node Geometry to Instance

    Parameters
    ----------
    geometry : Geometry, optional
        socket 'Geometry' (id: Geometry)


    Returns
    -------
    Instances
    """
    node = Node('Geometry to Instance', {'Geometry': [self] + list(geometry)})
    return node._out

to_points(position=None, radius=None, mode='VERTICES')

Node Mesh to Points

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]

Parameters:

Name Type Description Default
position Vector

socket 'Position' (id: Position)

None
radius Float

socket 'Radius' (id: Radius)

None
mode Literal['Vertices', 'Edges', 'Faces', 'Corners']

parameter mode

'VERTICES'

Returns:

Type Description
Cloud
Source code in core/generated/mesh.py
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
def to_points(self,
                position: Vector = None,
                radius: Float = None,
                mode: Literal['VERTICES', 'EDGES', 'FACES', 'CORNERS'] = 'VERTICES'):
    """ > Node Mesh to Points

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Mesh      | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    position : Vector, optional
        socket 'Position' (id: Position)

    radius : Float, optional
        socket 'Radius' (id: Radius)

    mode : Literal['Vertices', 'Edges', 'Faces', 'Corners']
        parameter `mode`


    Returns
    -------
    Cloud
    """
    utils.check_enum_arg('Mesh to Points', 'mode', mode, 'to_points', ('VERTICES', 'EDGES', 'FACES', 'CORNERS'))
    node = Node('Mesh to Points', {'Mesh': self, 'Selection': self.get_selection(), 'Position': position, 'Radius': radius}, mode=mode)
    return node._out

to_sdf_grid(voxel_size=None, band_width=None)

Node Mesh to SDF Grid

Fixed values

Kind Name Value
Socket Mesh self

Parameters:

Name Type Description Default
voxel_size Float

socket 'Voxel Size' (id: Voxel Size)

None
band_width Integer

socket 'Band Width' (id: Band Width)

None

Returns:

Type Description
Float
Source code in core/generated/mesh.py
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
def to_sdf_grid(self, voxel_size: Float = None, band_width: Integer = None):
    """ > Node Mesh to SDF Grid

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Mesh | `self` |

    Parameters
    ----------
    voxel_size : Float, optional
        socket 'Voxel Size' (id: Voxel Size)

    band_width : Integer, optional
        socket 'Band Width' (id: Band Width)


    Returns
    -------
    Float
    """
    node = Node('Mesh to SDF Grid', {'Mesh': self, 'Voxel Size': voxel_size, 'Band Width': band_width})
    return node._out

to_volume(density=None, resolution_mode=None, voxel_size=None, voxel_amount=None, interior_band_width=None)

Node Mesh to Volume

Fixed values

Kind Name Value
Socket Mesh self

Parameters:

Name Type Description Default
density Float

socket 'Density' (id: Density)

None
resolution_mode menu='Amount'

('Amount', 'Size')

None
voxel_size Float

socket 'Voxel Size' (id: Voxel Size)

None
voxel_amount Float

socket 'Voxel Amount' (id: Voxel Amount)

None
interior_band_width Float

socket 'Interior Band Width' (id: Interior Band Width)

None

Returns:

Type Description
Volume
Source code in core/generated/mesh.py
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
def to_volume(self,
                density: Float = None,
                resolution_mode: Literal['Amount', 'Size'] = None,
                voxel_size: Float = None,
                voxel_amount: Float = None,
                interior_band_width: Float = None):
    """ > Node Mesh to Volume

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Mesh | `self` |

    Parameters
    ----------
    density : Float, optional
        socket 'Density' (id: Density)

    resolution_mode : menu='Amount', optional
        ('Amount', 'Size')

    voxel_size : Float, optional
        socket 'Voxel Size' (id: Voxel Size)

    voxel_amount : Float, optional
        socket 'Voxel Amount' (id: Voxel Amount)

    interior_band_width : Float, optional
        socket 'Interior Band Width' (id: Interior Band Width)


    Returns
    -------
    Volume
    """
    node = Node('Mesh to Volume', {'Mesh': self, 'Density': density, 'Resolution Mode': resolution_mode, 'Voxel Size': voxel_size, 'Voxel Amount': voxel_amount, 'Interior Band Width': interior_band_width})
    return node._out

transform(mode=None, translation=None, rotation=None, scale=None, transform=None)

Node Transform Geometry

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Geometry self

Parameters:

Name Type Description Default
mode menu='Components'

('Components', 'Matrix')

None
translation Vector

socket 'Translation' (id: Translation)

None
rotation Rotation

socket 'Rotation' (id: Rotation)

None
scale Vector

socket 'Scale' (id: Scale)

None
transform Matrix

socket 'Transform' (id: Transform)

None

Returns:

Type Description
Geometry
Source code in core/generated/geometry.py
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
def transform(self,
                mode: Literal['Components', 'Matrix'] = None,
                translation: Vector = None,
                rotation: Rotation = None,
                scale: Vector = None,
                transform: Matrix = None):
    """ > Node Transform Geometry

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name     | Value  |
    | ------ | -------- | ------ |
    | Socket | Geometry | `self` |

    Parameters
    ----------
    mode : menu='Components', optional
        ('Components', 'Matrix')

    translation : Vector, optional
        socket 'Translation' (id: Translation)

    rotation : Rotation, optional
        socket 'Rotation' (id: Rotation)

    scale : Vector, optional
        socket 'Scale' (id: Scale)

    transform : Matrix, optional
        socket 'Transform' (id: Transform)


    Returns
    -------
    Geometry
    """
    node = Node('Transform Geometry', {'Geometry': self, 'Mode': mode, 'Translation': translation, 'Rotation': rotation, 'Scale': scale, 'Transform': transform})
    self._jump(node._out)
    return self._domain_to_geometry

triangulate(quad_method=None, n_gon_method=None)

Node Triangulate

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]

Parameters:

Name Type Description Default
quad_method menu='Shortest Diagonal'

('Beauty', 'Fixed', 'Fixed Alternate', 'Shortest Diagonal', 'Longest Diagonal')

None
n_gon_method menu='Beauty'

('Beauty', 'Clip')

None

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
def triangulate(self,
                quad_method: Literal['Beauty', 'Fixed', 'Fixed Alternate', 'Shortest Diagonal', 'Longest Diagonal'] = None,
                n_gon_method: Literal['Beauty', 'Clip'] = None):
    """ > Node Triangulate

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind   | Name      | Value             |
    | ------ | --------- | ----------------- |
    | Socket | Mesh      | `self`            |
    | Socket | Selection | `self[selection]` |

    Parameters
    ----------
    quad_method : menu='Shortest Diagonal', optional
        ('Beauty', 'Fixed', 'Fixed Alternate', 'Shortest Diagonal', 'Longest Diagonal')

    n_gon_method : menu='Beauty', optional
        ('Beauty', 'Clip')


    Returns
    -------
    Mesh
    """
    node = Node('Triangulate', {'Mesh': self, 'Selection': self.get_selection(), 'Quad Method': quad_method, 'N-gon Method': n_gon_method})
    self._jump(node._out)
    return self._domain_to_geometry

union(*mesh, solver='FLOAT')

Node Mesh Boolean

Jump : Socket refers to node output socket after the call

Fixed values

Kind Name Value
Parameter operation 'UNION'

Parameters:

Name Type Description Default
mesh Mesh

socket 'Mesh' (id: Mesh 2)

()
solver Literal['Exact', 'Float', 'Manifold']

parameter solver

'FLOAT'

Returns:

Type Description
Mesh
Source code in core/generated/mesh.py
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
def union(self, *mesh: Mesh, solver: Literal['EXACT', 'FLOAT', 'MANIFOLD'] = 'FLOAT'):
    """ > Node Mesh Boolean

    > ***Jump*** : Socket refers to node output socket after the call

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Parameter | `operation` | `'UNION'` |

    Parameters
    ----------
    mesh : Mesh, optional
        socket 'Mesh' (id: Mesh 2)

    solver : Literal['Exact', 'Float', 'Manifold']
        parameter `solver`


    Returns
    -------
    Mesh
    """
    utils.check_enum_arg('Mesh Boolean', 'solver', solver, 'union', ('EXACT', 'FLOAT', 'MANIFOLD'))
    node = Node('Mesh Boolean', {'Mesh 2': [self] + list(mesh)}, operation='UNION', solver=solver)
    self._jump(node._out)
    return self._domain_to_geometry

unsigned_edge_angle()

Node Edge Angle

Returns:

Type Description
unsigned_angle
Source code in core/generated/mesh.py
606
607
608
609
610
611
612
613
614
615
@utils.classproperty
def unsigned_edge_angle(cls):
    """ > Node Edge Angle

    Returns
    -------
    unsigned_angle
    """
    node = Node('Edge Angle', )
    return node.unsigned_angle

vertex_neighbors()

Node Vertex Neighbors

Returns:

Type Description
Integer

peer sockets: face_count_ (Integer)

Source code in core/generated/mesh.py
728
729
730
731
732
733
734
735
736
737
738
739
@utils.classproperty
def vertex_neighbors(cls):
    """ > Node Vertex Neighbors

    Returns
    -------
    Integer
        peer sockets: face_count_ (Integer)

    """
    node = Node('Vertex Neighbors', )
    return node._out

vertex_of_corner(corner_index=None) classmethod

Node Vertex of Corner

Parameters:

Name Type Description Default
corner_index Integer

socket 'Corner Index' (id: Corner Index)

None

Returns:

Type Description
Integer
Source code in core/generated/mesh.py
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
@classmethod
def vertex_of_corner(cls, corner_index: Integer = None):
    """ > Node Vertex of Corner

    Parameters
    ----------
    corner_index : Integer, optional
        socket 'Corner Index' (id: Corner Index)


    Returns
    -------
    Integer
    """
    node = Node('Vertex of Corner', {'Corner Index': corner_index})
    return node._out

vertices_to_points(position=None, radius=None)

Node Mesh to Points

Fixed values

Kind Name Value
Socket Mesh self
Socket Selection self[selection]
Parameter mode 'VERTICES'

Parameters:

Name Type Description Default
position Vector

socket 'Position' (id: Position)

None
radius Float

socket 'Radius' (id: Radius)

None

Returns:

Type Description
Cloud
Source code in core/generated/mesh.py
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
def vertices_to_points(self, position: Vector = None, radius: Float = None):
    """ > Node Mesh to Points

    **Fixed values**

    | Kind      | Name      | Value             |
    | --------- | --------- | ----------------- |
    | Socket    | Mesh      | `self`            |
    | Socket    | Selection | `self[selection]` |
    | Parameter | `mode`    | `'VERTICES'`      |

    Parameters
    ----------
    position : Vector, optional
        socket 'Position' (id: Position)

    radius : Float, optional
        socket 'Radius' (id: Radius)


    Returns
    -------
    Cloud
    """
    node = Node('Mesh to Points', {'Mesh': self, 'Selection': self.get_selection(), 'Position': position, 'Radius': radius}, mode='VERTICES')
    return node._out

viewer(named_sockets={}, ui_shortcut=0, **sockets) classmethod

Node Viewer

Fixed values

Kind Name Value
Parameter domain 'AUTO'

Parameters:

Name Type Description Default
named_sockets dict

Sockets created with string names

{}
ui_shortcut int

parameter ui_shortcut

0
sockets dict

Socket created with python name attributes

{}
Source code in core/generated/geometry.py
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
@classmethod
def viewer(cls, named_sockets: dict = {}, ui_shortcut = 0, **sockets):
    """ > Node Viewer

    **Fixed values**

    | Kind      | Name     | Value    |
    | --------- | -------- | -------- |
    | Parameter | `domain` | `'AUTO'` |

    Parameters
    ----------
    named_sockets : dict, default={}
        Sockets created with string names

    ui_shortcut : int
        parameter `ui_shortcut`

    sockets : dict, default={}
        Socket created with python name attributes

    """
    node = Node('Viewer', named_sockets, domain='AUTO', ui_shortcut=ui_shortcut, **sockets)
    return