Coordinate modification z of a complex shape

I resume this old discussion of 2016 and I ask .... in the event that we find a complex form (MSDelementtyPecomplexshape) how the function should be changed to be able to elevate a shape that contains two arches and two lines.

Option Explicit

Sub TestMoveShape()

    Dim elemId As DLong
    elemId = DLongFromLong(1307192)
    
    Dim el As Element
    Set el = ActiveModelReference.GetElementByID(elemId)
    
    If (msdElementTypeShape = el.Type) Then
        processShape el.AsShapeElement
    End If
    
End Sub

Private Sub processShape(shape As ShapeElement)

    Dim numOfVertices As Long
    numOfVertices = shape.VerticesCount
    
    Dim index As Long
    
    For index = 1 To numOfVertices
        shape.vertex(index) = moveVertex(shape.vertex(index))
    Next
    
    shape.Rewrite

End Sub

Private Function moveVertex(vertex As Point3d) As Point3d

    Const zVal = 53.65
    
    moveVertex = vertex
    moveVertex.Z = zVal

End Function