-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Description
概要
エッジルーティングシステムの刷新に向けて、LayoutLink および関連型にルーティングメタデータを追加する。手動配線・自動配線の両方を同一データモデルで表現できるようにする。
背景
現在の LayoutLink.points は Position[] のみで、ルーティングの由来(auto/manual)やセグメント種別(直線/斜め/円弧)の情報を持たない。今後のルーティングシステム分離・手動配線対応の土台として、データモデルの拡張が必要。
設計
1. RouteSegment 型の導入
export type RouteSegmentType = 'line' | 'arc'
export interface RouteSegment {
/** セグメント種別 */
type: RouteSegmentType
/** 終点座標 (始点は前セグメントの終点 or route.start) */
end: Position
/** arc の場合の制御点 */
controlPoint?: Position
}2. Route 型の導入
export type RouteType = 'auto' | 'manual'
export interface Route {
/** ルーティングの由来 */
type: RouteType
/** 経路の始点 */
start: Position
/** セグメント列 */
segments: RouteSegment[]
/** 自動ルーティング時のアルゴリズム名 */
algorithm?: string
}3. LayoutLink の拡張
export interface LayoutLink {
id: string
from: string
to: string
fromEndpoint: LinkEndpoint
toEndpoint: LinkEndpoint
/** @deprecated route に移行。後方互換のため残す */
points: Position[]
/** 新しいルート表現 */
route?: Route
link: Link
}4. YAML での手動ルート定義(将来)
links:
- from: router1:eth0
to: switch1:ge-0/0/0
route:
type: manual
waypoints:
- [100, 200]
- [300, 200]
- [300, 400]タスク
-
RouteSegment,Route型をmodels/types.tsに追加 -
LayoutLinkにroute?: Routeを追加 - 既存の
pointsからRouteへの変換ユーティリティpointsToRoute()を作成 - SVGレンダラーが
routeを優先して使うように変更(pointsフォールバック維持) - テスト追加
関連
- #(次issue) エッジルーティングのELK分離
- #(次issue) Visibility Graph Router
- #(次issue) 手動ルーティング対応
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request