Skip to content

Commit

Permalink
Add Z coordinate for GCodePath points
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton committed Aug 23, 2024
1 parent 9d697d6 commit fd1ac55
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 19 deletions.
4 changes: 2 additions & 2 deletions cura/plugins/slots/comb/v0/comb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ syntax = "proto3";

package cura.plugins.slots.comb.v0;

import "cura/plugins/v0/polygons.proto";
import "cura/plugins/v0/toolpaths.proto";
import "cura/plugins/v0/point2d.proto";

service CombModifyService {
rpc Call(CallRequest) returns (CallResponse) {}
Expand All @@ -17,4 +17,4 @@ message CallRequest {

message CallResponse {
cura.plugins.v0.TravelPath travel = 1;
}
}
8 changes: 2 additions & 6 deletions cura/plugins/v0/mesh.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ syntax = "proto3";

package cura.plugins.v0;

message Point3D {
float x = 1;
float y = 2;
float z = 3;
}
import "cura/plugins/v0/point3d.proto";

message Triangle {
Point3D p1 = 1;
Expand All @@ -16,4 +12,4 @@ message Triangle {

message Mesh {
repeated Triangle triangles = 2;
}
}
8 changes: 8 additions & 0 deletions cura/plugins/v0/point2d.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
syntax = "proto3";

package cura.plugins.v0;

message Point2D {
float x = 1;
float y = 2;
}
9 changes: 9 additions & 0 deletions cura/plugins/v0/point3d.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";

package cura.plugins.v0;

message Point3D {
float x = 1;
float y = 2;
float z = 3;
}
13 changes: 5 additions & 8 deletions cura/plugins/v0/polygons.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,22 @@ syntax = "proto3";

package cura.plugins.v0;

message Point2D {
sint64 x = 1;
sint64 y = 2;
}
import "cura/plugins/v0/point3d.proto";

message OpenPath {
repeated Point2D path = 1;
repeated Point3D path = 1;
}

message OpenPaths {
repeated OpenPath paths = 1;
}

message ClosedPath {
repeated Point2D path = 1;
repeated Point3D path = 1;
}

message FilledPath {
repeated Point2D path = 1;
repeated Point3D path = 1;
}

message Polygon {
Expand Down Expand Up @@ -51,4 +48,4 @@ message HolePolyTreeNode {
message ClosedPolyTreeNode {
OpenPath outline = 1;
PolyTreeRoot children = 2;
}
}
6 changes: 3 additions & 3 deletions cura/plugins/v0/toolpaths.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ syntax = "proto3";

package cura.plugins.v0;

import "cura/plugins/v0/polygons.proto";
import "cura/plugins/v0/point3d.proto";

message TravelPath {
repeated Point2D points = 1;
repeated Point3D points = 1;
}

message ExtrusionJunction {
Point2D point = 1;
Point3D point = 1;
uint32 width = 2;
}

Expand Down

0 comments on commit fd1ac55

Please sign in to comment.