src/compas_3gs/operations/volmeshoperations.py
def volmesh_vertex_lift(volmesh, vkey, target_xyz, hfkeys):
    """Duplicates and lifts a vertex, then creates cells using the vertex halffaces and the duplicated vertex.

    Parameters
    ----------
    volmesh : VolMesh
        A volmesh object representing a polyhedral force diagram.
    vkey : int
        The key of the vertex to lift.
    hfkeys : list
        List of halfface keys to create new cells from.
    xyz : tuple
        Target xyz coordinates of the lifted vertex.

    Notes
    -----
    The lifting vertex must be on the boundary of the volmesh.

    See Also
    --------
    * :func:`compas_3gs.operations.face_pinch`

    """

    # check if vertex is interior ----------------------------------------------
    if not volmesh.is_vertex_on_boundary(vkey):
        raise Exception('This vertex is interior.')

    # add new, lifted vertex ---------------------------------------------------
    x, y, z = target_xyz
    w = volmesh.add_vertex(x=x, y=y, z=z)

    # add cells ----------------------------------------------------------------
    for hfkey in hfkeys:
        halffaces = [volmesh.halfface_vertices(hfkey)[::-1]]
        for u, v in volmesh.halfface_halfedges(hfkey):
            halffaces.append([u, v, w])
        volmesh.add_cell(halffaces)

    # --------------------------------------------------------------------------
    return volmesh
Duplicates and lifts a vertex, then creates cells using the vertex halffaces and the duplicated vertex.

    Parameters
    ----------
    volmesh : VolMesh
        A volmesh object representing a polyhedral force diagram.
    vkey : int
        The key of the vertex to lift.
    hfkeys : list
        List of halfface keys to create new cells from.
    xyz : tuple
        Target xyz coordinates of the lifted vertex.

    Notes
    -----
    The lifting vertex must be on the boundary of the volmesh.

    See Also
    --------
    * :func:`compas_3gs.operations.face_pinch`

    
Duplicates and lifts a vertex, then creates cells using the vertex halffaces and the duplicated vertex.
Parameters

volmesh : VolMesh
A volmesh object representing a polyhedral force diagram.
vkey : int
The key of the vertex to lift.
hfkeys : list
List of halfface keys to create new cells from.
xyz : tuple
Target xyz coordinates of the lifted vertex.

Notes

The lifting vertex must be on the boundary of the volmesh.

See Also


Duplicates and lifts a vertex then creates cells using the vertex halffaces and the duplicated vertex . Parameters volmesh : VolMesh A volmesh object representing a polyhedral force diagram . vkey : int The key of the vertex to lift . hfkeys : list List of halfface keys to create new cells from . xyz : tuple Target xyz coordinates of the lifted vertex . Notes The lifting vertex must be on the boundary of the volmesh . See Also
def volmesh_vertex_lift(volmesh, vkey, target_xyz, hfkeys):
    if not volmesh.is_vertex_on_boundary(vkey):
        raise Exception('This vertex is interior.')
    x, y, z = target_xyz
    w = volmesh.add_vertex(x=x, y=y, z=z)
    for hfkey in hfkeys:
        halffaces = [volmesh.halfface_vertices(hfkey)[::-1]]
        for u, v in volmesh.halfface_halfedges(hfkey):
            halffaces.append([u, v, w])
        volmesh.add_cell(halffaces)
    return volmesh
def volmesh_vertex_lift ( volmesh , vkey , target_xyz , hfkeys ) : if not volmesh . is_vertex_on_boundary ( vkey ) : raise Exception ( 'This vertex is interior.' ) x , y , z = target_xyz w = volmesh . add_vertex ( x = x , y = y , z = z ) for hfkey in hfkeys : halffaces = [ volmesh . halfface_vertices ( hfkey ) [ : : - 1 ] ] for u , v in volmesh . halfface_halfedges ( hfkey ) : halffaces . append ( [ u , v , w ] ) volmesh . add_cell ( halffaces ) return volmesh
Duplicates and lifts a vertex, then creates cells using the vertex halffaces and the duplicated vertex.
Duplicates and lifts a vertex then creates cells using the vertex halffaces and the duplicated vertex .
"""Duplicates and lifts a vertex, then creates cells using the vertex halffaces and the duplicated vertex.

    Parameters
    ----------
    volmesh : VolMesh
        A volmesh object representing a polyhedral force diagram.
    vkey : int
        The key of the vertex to lift.
    hfkeys : list
        List of halfface keys to create new cells from.
    xyz : tuple
        Target xyz coordinates of the lifted vertex.

    Notes
    -----
    The lifting vertex must be on the boundary of the volmesh.

    See Also
    --------
    * :func:`compas_3gs.operations.face_pinch`

    """ # check if vertex is interior ---------------------------------------------- # add new, lifted vertex --------------------------------------------------- # add cells ---------------------------------------------------------------- # --------------------------------------------------------------------------
volmesh
vkey
target_xyz
hfkeys