def METHOD_NAME(currentposition, command):
    x = (
        command.Parameters["X"]
        if "X" in command.Parameters
        else currentposition.x
    )
    y = (
        command.Parameters["Y"]
        if "Y" in command.Parameters
        else currentposition.y
    )
    z = (
        command.Parameters["Z"]
        if "Z" in command.Parameters
        else currentposition.z
    )
    endpoint = FreeCAD.Vector(x, y, z)
    if Path.Geom.pointsCoincide(currentposition, endpoint):
        return True
    return Path.Geom.isVertical(Part.makeLine(currentposition, endpoint))