Smooth Lines
Lines with their corners rounded: a moving average of each vertex and its neighbors (gaussian or boxcar), or a spline through the vertices (Catmull–Rom, cardinal, basis, natural, monotone, or a fixed turn radius). Other features pass through. Runs in the engine.
Syntax
{ "id": "n1", "op": "smooth-lines", "name": "smooth-lines", "x": 0, "y": 0, "params": {} }
An edge into it ends at "targetPort": "in"; one out of it starts at "sourcePort": "out"; a parameter is set in params (leave out the ones at their default), driven by an edge to par:windowSize, or read elsewhere as ch('smooth-lines/windowSize').
Inputs
| Port | Type | Takes |
|---|---|---|
in | table | one edge |
Parameters
| Parameter | Kind | Default | Choices |
|---|---|---|---|
method | menu | "gaussian" | 10 choices |
windowSize | int | 5 | |
samplesPerSegment | int | 12 | |
alpha | float | 0.5 | |
tension | float | 0 | |
turnRadiusMeters | float | 250 |
Outputs
| Port | Type |
|---|---|
out | table |
Details
- Category: Geometry
- Operator:
smooth-lines
Older projects
Projects saved before documents used operator classes. These convert to smooth-lines when they open: LineInterpolationOp, SmoothOp.