Path Bounds
Path generation/manipulation node. Path Bounds creates or processes vector path data.
intermediate
Since P00
Input Ports
Path
境界を調べるBezier path
Output Ports
Min
境界の最小座標 `[min_x, min_y]`
Max
境界の最大座標 `[max_x, max_y]`
Size
境界サイズ `[width, height]`
Center
境界の中心座標 `[center_x, center_y]`
Min X
最小 X 座標
Min Y
最小 Y 座標
Max X
最大 X 座標
Max Y
最大 Y 座標
Width
境界のWidth
Height
境界のHeight
Center X
中心 X 座標
Center Y
中心 Y 座標
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| Scope | Enum | `All` | Path全体を測るか、1 本のサブPathだけを測るか |
| Sub-path | Int | 0 | `scope = SubPath` のときだけ表示。測定するサブPath番号 |
動作
scope = All
- すべてのサブPathをまとめた境界を返します
scope = SubPath
- 指定した 1 本のサブPathだけの境界を返します
- 境界はコントロールハンドルの位置ではなく、実際の曲線形状から計算します
- 空Path、または存在しないサブPath番号を指定した場合は、すべて
0を返します
Usage Examples
パスの幅と高さを取得する
[BezierPath] → [PathBounds] → width, height指定サブパスだけを測る
[MultiPathEditor] → [PathBounds(scope: SubPath, sub_path_index: 1)]境界の中心を別ノードに渡す
[BezierPath] → [PathBounds] → center_x, center_y → [Transform]Notes
min / max / size / centerは Vec2 出力です- 同じ値を
min_xなどの Float 出力でも出しているので、数値ノードへ直接つなげます sub_path_indexのスライダー上限は、入力されたPathのサブPath数に応じてautomatically updatedされます
💡 Tips
- •`min / max / size / center` は Vec2 出力です
- •同じ値を `min_x` などの Float 出力でも出しているので、数値ノードへ直接つなげます
- •`sub_path_index` のスライダー上限は、入力されたPathのサブPath数に応じてautomatically updatedされます
Related Nodes
bezierpath
pathbounds
multipatheditor
transform