@@ -80,31 +80,51 @@ class ViewEventType(IntEnum):
8080class CurveGeometry (TypedDict ):
8181 """Binary geometry channels for a single curve."""
8282
83- curve_vertices : bytes
84- control_vertices : NotRequired [bytes ]
83+ curve_vertices : bytes # Flat float32 byte array of xyz coordinates for the evaluated curve points.
84+ cp_vertices : NotRequired [
85+ bytes
86+ ] # Flat float32 byte array of xyz coordinates for the control points.
8587
8688
8789class CurveDelta (TypedDict ):
8890 """Per-curve render delta sent over the IPC pipe."""
8991
90- type : Literal ["linear" , BEZIER_TYP , NURBS_TYP ]
91- geometry : CurveGeometry
92- vertex_count : int
93- edges : list [tuple [int , int ]] | None
92+ type : Literal ["linear" , BEZIER_TYP , NURBS_TYP ] # Mathematical type of the curve.
93+ geometry : (
94+ CurveGeometry # The binary vertex data for the curve and its control points.
95+ )
96+ vertex_count : int # Number of 3D vertices encoded in `geometry["curve_vertices"]`.
97+ edges : (
98+ list [tuple [int , int ]] | None
99+ ) # Point connectivity indices (idx_a, idx_b) to form line segments.
94100
95- degree : NotRequired [int ]
96- cp_count : NotRequired [int ]
101+ degree : NotRequired [
102+ int
103+ ] # Mathematical degree of the spline (e.g., 3 for cubic Bézier/NURBS).
104+ cp_count : NotRequired [
105+ int
106+ ] # Number of 3D control points encoded in `geometry["cp_vertices"]`.
97107
98108
99109class ScenePayload (TypedDict ):
100110 """Universal exchange format for incremental scene updates."""
101111
102- op : SceneUpdateOp
103- changed_curves : dict [str , CurveDelta ]
104- deleted_curves : NotRequired [list [str ]]
105- bounds : NotRequired [dict [str , Any ]]
106- points : NotRequired [bytes ]
107- edges : NotRequired [list [tuple [int , int , str ]]]
112+ op : SceneUpdateOp # The type of operation (ADD, UPDATE, or DELETE).
113+ changed_curves : dict [
114+ str , CurveDelta
115+ ] # Mapping of namespaced curve tags (e.g., "cad:1") to their update delta.
116+ deleted_curves : NotRequired [
117+ list [str ]
118+ ] # List of namespaced tags for curves that should be removed.
119+ bounds : NotRequired [
120+ dict [str , Any ]
121+ ] # Global scene bounding box dimensions (min, max, center, size).
122+ points : NotRequired [
123+ bytes
124+ ] # Flat float32 byte array of xyz coordinates for all CAD nodes (load-only).
125+ edges : NotRequired [
126+ list [tuple [int , int , str ]]
127+ ] # Flat list of all scene edges (idx_a, idx_b, tag) (load-only).
108128
109129
110130class EventHover (TypedDict ):
0 commit comments