Skip to content

Commit 7738009

Browse files
Merge pull request #27 from Samtanner12/main
Added Cubic and PolyBezier Curves
2 parents dc7ebf6 + 89d3114 commit 7738009

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

open_vector_format.proto

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,14 @@ message VectorBlock {
374374
ExposurePause exposure_pause = 10;
375375
LineSequenceParaAdapt line_sequence_para_adapt = 11;
376376
HatchesParaAdapt _hatchParaAdapt = 12;
377+
CubicBezierHatches cubic_bezier_hatches = 13;
378+
QuadraticBezierHatches quadratic_bezier_hatches = 14;
379+
CubicBezierSpline cubic_bezier_spline = 15;
380+
QuadraticBezierSpline quadratic_bezier_spline = 16;
381+
CubicBezierHatches3D cubic_bezier_hatches_3d = 17;
382+
QuadraticBezierHatches3D quadratic_bezier_hatches_3d = 18;
383+
CubicBezierSpline3D cubic_bezier_spline_3d = 19;
384+
QuadraticBezierSpline3D quadratic_bezier_spline_3d = 20;
377385
}
378386

379387
//key used in Job/markingParamsMap
@@ -588,6 +596,69 @@ message VectorBlock {
588596
message HatchesParaAdapt {
589597
repeated LineSequenceParaAdapt hatchAsLinesequence = 1;
590598
}
599+
600+
// Quadratic Bézier segments in 2D.
601+
// Each segment: (x0, y0, cx, cy, x1, y1) => 6 floats/segment.
602+
// Pack N: [x0,y0,cx,cy,x1,y1, x0,y0,cx,cy,x1,y1, ...]
603+
message QuadraticBezierHatches {
604+
repeated float segments = 1;
605+
}
606+
607+
// Cubic Bézier segments in 2D.
608+
// Each segment: (x0, y0, c1x, c1y, c2x, c2y, x1, y1) => 8 floats/segment.
609+
// Pack N: [x0,y0,c1x,c1y,c2x,c2y,x1,y1, ...]
610+
message CubicBezierHatches {
611+
repeated float segments = 1;
612+
}
613+
614+
// Linked Quadratic Bézier spline in 2D (continuous).
615+
// start_control packs tuples (x_i, y_i, cx_i, cy_i) => 4 floats/tuple.
616+
// The end of segment i is the start (x_{i+1},y_{i+1}); the last segment ends at (last_x,last_y).
617+
message QuadraticBezierSpline {
618+
repeated float start_control = 1; // len % 4 == 0, len >= 4
619+
float last_x = 2;
620+
float last_y = 3;
621+
}
622+
623+
// Linked Cubic Bézier spline in 2D (continuous).
624+
// start_control packs tuples (x_i, y_i, c1x_i, c1y_i, c2x_i, c2y_i) => 6 floats/tuple.
625+
message CubicBezierSpline {
626+
repeated float start_control = 1; // len % 6 == 0, len >= 6
627+
float last_x = 2;
628+
float last_y = 3;
629+
}
630+
631+
// Quadratic Bézier segments in 3D.
632+
// Each segment: (x0, y0, z0, cx, cy, cz, x1, y1, z1) => 9 floats/segment.
633+
// Pack N: [x0,y0,z0,cx,cy,cz,x1,y1,z1, x0,y0,z0,cx,cy,cz,x1,y1,z1, ...]
634+
message QuadraticBezierHatches3D {
635+
repeated float segments = 1;
636+
}
637+
638+
// Cubic Bézier segments in 3D.
639+
// Each segment: (x0, y0, z0, c1x, c1y, c1z, c2x, c2y, c2z, x1, y1, z1) => 12 floats/segment.
640+
// Pack N: [x0,y0,z0,c1x,c1y,c1z,c2x,c2y,c2z,x1,y1,z1, ...]
641+
message CubicBezierHatches3D {
642+
repeated float segments = 1;
643+
}
644+
645+
// Linked Quadratic Bézier spline in 3D (continuous).
646+
// start_control packs (x_i, y_i, z_i, cx_i, cy_i, cz_i) => 6 floats/tuple.
647+
message QuadraticBezierSpline3D {
648+
repeated float start_control = 1; // len % 6 == 0, len >= 6
649+
float last_x = 2;
650+
float last_y = 3;
651+
float last_z = 4;
652+
}
653+
654+
// Linked Cubic Bézier spline in 3D (continuous).
655+
// start_control packs (x_i, y_i, z_i, c1x_i, c1y_i, c1z_i, c2x_i, c2y_i, c2z_i) => 9 floats/tuple.
656+
message CubicBezierSpline3D {
657+
repeated float start_control = 1; // len % 9 == 0, len >= 9
658+
float last_x = 2;
659+
float last_y = 3;
660+
float last_z = 4;
661+
}
591662
}
592663

593664
//axis aligned rectangular box in 2D

0 commit comments

Comments
 (0)