Back to Node List

Shape-preserving Path Smooth

path_smooth

Reduce small path wobble while keeping endpoints, sharp corners, topology, and metadata safe

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
パス
path
Path
Required
手描き・輪郭抽出・自動生成した揺れを整えたいパスです

Output Ports

NameTypeDescription
パス
path
Path
元のサブパス構造とメタ情報を保った平滑化後のパスです

Parameters

NameTypeDefaultRangeDescription / Options
対象
scope
Enum
All

輪郭全体を抽出した後は「全サブパス」、ケーブル・穴・枝の1本だけ直す時は「指定サブパス」を使います。

  • 全サブパスAll
    使える全サブパスを、順序と役割を保ったまま平滑化します
  • 指定サブパスSubPath
    選んだ1本のサブパスだけを平滑化します
サブパス
sub_path_index
Int
00–255

平滑化するサブパス番号です(0 = 最初)

平滑化の強さ
strength
Float
0.50–1 / step 0.05

各反復で周囲の平均へ近づける割合です。輪郭抽出後は0.3〜0.5から始め、まだ揺れが残る時だけ上げます。

参照する隣接点数
radius
Int
21–8

前後それぞれ何個のアンカーを見るかです。小さな段差は1、手ぶれは2〜3、広い曲線だけ4以上を試します。

反復回数
iterations
Int
21–8

平滑化を繰り返す回数です。輪郭ノイズは1〜2回が目安で、増やす時は「最大移動量」を小さく保ちます。

最大移動量
max_displacement
Float
20–64 / step 0.25

入力位置から各アンカーを動かしてよい合計距離(px)です。シルエット調整は0.5〜1px、粗い輪郭抽出は2pxが目安です。

保護する角度
corner_angle
Float
1000–180 / step 5

内角がこの値以下のアンカーを固定します。直角を残すなら約100°、鋭い先端だけ残すなら45°付近へ下げます。

開パスの端点を固定
lock_endpoints
Bool
true

開パスの始点と終点を元位置に保ちます。隣の部品へ接するケーブル・線・抽出輪郭ではオンのまま使います。

Overview

Reduces small back-and-forth irregularities in hand-drawn paths, traced image/Region outlines, and generated lines. It preserves subpath count, closure, roles, holes, and A30 curves. If smoothing would cause a dangerous self-intersection or hole escape, only that shape is restored. This is finishing cleanup, not a general reshaping tool.

Usage tips

  • A common chain is trace or multi_path_editor → path_smooth → path_stroke / path_fill. Start with strength 0.3–0.5, 1–2 neighbors, 1–2 iterations, and 0.5–1px maximum movement.
  • For a rough automatic trace, try up to 2px movement, but increase strength, neighbors, iterations, and movement one at a time.
  • Use about 100° corner protection for buildings and machinery, about 45° to preserve only sharp leaf or lightning tips, or 0° when corners should round.
  • Keep Lock Open Endpoints enabled for cables or lines that meet other parts. Disabling it can pull endpoints inward and shorten the whole path.
  • Closed paths are processed cyclically without depending on the starting anchor. Hole containment is checked, and unsafe parent/hole candidates are restored with a warning.
  • Maximum Movement is the total displacement from the input position, not a per-iteration limit.

Common mistakes

  • Almost nothing changes: lower corner protection from 100° to 60° to 0°, then raise Maximum Movement slightly.
  • The result is too round: reduce neighbors or iterations, return movement to 0.5–1px, and raise corner protection toward 100° for right angles.
  • A warning appears and the original shape remains: fix upstream self-intersections, collapsed/reversed area, holes leaving their parent, or discontinuous segments.
  • Point count does not decrease: this node safely smooths shape and metadata; it does not simplify path data.

Related nodes

  • path_connect — join split paths before smoothing
  • path_extend — extend only an endpoint after smoothing
  • path_deform — intentionally add waves, bulges, or squash instead of removing noise
  • path_stroke — inspect the smoothed result as a line
  • path_fill — inspect closed-outline and hole preservation
Back to Node List
Shape-preserving Path Smooth — PixPipeline Node Reference