# NodeBox

Create visual output with Python programming code
Home Download Reference Tutorial Library Gallery About

# bezier.length()

## Syntax

    length(path, segmented=False)

## Description

Returns the length of the given path. To do this, the length of each individual segment (curve or line) in the path is calculated. When segmented is True, the return value is a list containing the individual length of each segment as values between 0.0 and 1.0, defining the percentual length of each segment in relation to the total path length.

## Example

    bezier = ximport("bezier")
    beginpath(100,100)
    curveto(150,200, 200,450, 300,300)
    path = endpath()
    print bezier.length(path)
    >>>370.721998681