Length
The length of a line, or of a shape's outline.
Node id path/length
The Length node outputs how long object is: the length of a line, or the
perimeter of a shape.
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| object | Renderable | — |
Outputs
| Name | Type | Notes |
|---|---|---|
| length | number |
Behaviour
- Scale included. The length is as drawn: a circle of radius 100 with scale 2 has a length of about 1257, not 628.
- Precision. Lengths are exact, except for ellipses (within about 0.04%), Bezier curves (measured along 1024 small straight pieces) and splines (256 pieces per curve between two points).
- Closed shapes include the side back to the start: a 100 × 50 rectangle has a length of 300.
Errors
objectmust be a shape or a line. A group has no length.
Example
A half-circle arc of radius 200, and a bar as long as the arc: its width is the arc's length, about 628.