Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions open_vector_format.proto
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,14 @@ message VectorBlock {
ExposurePause exposure_pause = 10;
LineSequenceParaAdapt line_sequence_para_adapt = 11;
HatchesParaAdapt _hatchParaAdapt = 12;
CubicBezierHatches cubic_bezier_hatches = 13;
QuadraticBezierHatches quadratic_bezier_hatches = 14;
CubicBezierSpline cubic_bezier_spline = 15;
QuadraticBezierSpline quadratic_bezier_spline = 16;
CubicBezierHatches3D cubic_bezier_hatches_3d = 17;
QuadraticBezierHatches3D quadratic_bezier_hatches_3d = 18;
CubicBezierSpline3D cubic_bezier_spline_3d = 19;
QuadraticBezierSpline3D quadratic_bezier_spline_3d = 20;
}

//key used in Job/markingParamsMap
Expand Down Expand Up @@ -588,6 +596,69 @@ message VectorBlock {
message HatchesParaAdapt {
repeated LineSequenceParaAdapt hatchAsLinesequence = 1;
}

// Quadratic Bézier segments in 2D.
// Each segment: (x0, y0, cx, cy, x1, y1) => 6 floats/segment.
// Pack N: [x0,y0,cx,cy,x1,y1, x0,y0,cx,cy,x1,y1, ...]
message QuadraticBezierHatches {
repeated float segments = 1;
}

// Cubic Bézier segments in 2D.
// Each segment: (x0, y0, c1x, c1y, c2x, c2y, x1, y1) => 8 floats/segment.
// Pack N: [x0,y0,c1x,c1y,c2x,c2y,x1,y1, ...]
message CubicBezierHatches {
repeated float segments = 1;
}

// Linked Quadratic Bézier spline in 2D (continuous).
// start_control packs tuples (x_i, y_i, cx_i, cy_i) => 4 floats/tuple.
// The end of segment i is the start (x_{i+1},y_{i+1}); the last segment ends at (last_x,last_y).
message QuadraticBezierSpline {
repeated float start_control = 1; // len % 4 == 0, len >= 4
float last_x = 2;
float last_y = 3;
}

// Linked Cubic Bézier spline in 2D (continuous).
// start_control packs tuples (x_i, y_i, c1x_i, c1y_i, c2x_i, c2y_i) => 6 floats/tuple.
message CubicBezierSpline {
repeated float start_control = 1; // len % 6 == 0, len >= 6
float last_x = 2;
float last_y = 3;
}

// Quadratic Bézier segments in 3D.
// Each segment: (x0, y0, z0, cx, cy, cz, x1, y1, z1) => 9 floats/segment.
// Pack N: [x0,y0,z0,cx,cy,cz,x1,y1,z1, x0,y0,z0,cx,cy,cz,x1,y1,z1, ...]
message QuadraticBezierHatches3D {
repeated float segments = 1;
}

// Cubic Bézier segments in 3D.
// Each segment: (x0, y0, z0, c1x, c1y, c1z, c2x, c2y, c2z, x1, y1, z1) => 12 floats/segment.
// Pack N: [x0,y0,z0,c1x,c1y,c1z,c2x,c2y,c2z,x1,y1,z1, ...]
message CubicBezierHatches3D {
repeated float segments = 1;
}

// Linked Quadratic Bézier spline in 3D (continuous).
// start_control packs (x_i, y_i, z_i, cx_i, cy_i, cz_i) => 6 floats/tuple.
message QuadraticBezierSpline3D {
repeated float start_control = 1; // len % 6 == 0, len >= 6
float last_x = 2;
float last_y = 3;
float last_z = 4;
}

// Linked Cubic Bézier spline in 3D (continuous).
// start_control packs (x_i, y_i, z_i, c1x_i, c1y_i, c1z_i, c2x_i, c2y_i, c2z_i) => 9 floats/tuple.
message CubicBezierSpline3D {
repeated float start_control = 1; // len % 9 == 0, len >= 9
float last_x = 2;
float last_y = 3;
float last_z = 4;
}
}

//axis aligned rectangular box in 2D
Expand Down