修改print scale的数据结构
This commit is contained in:
@@ -2767,13 +2767,13 @@ public class PythonService {
|
||||
|
||||
int size = printObject.size();
|
||||
// 占位符填充数组
|
||||
List<List<Double>> locationS = new ArrayList<>(Collections.nCopies(size, null));
|
||||
List<Double> scaleS = new ArrayList<>(Collections.nCopies(size, null));
|
||||
List<List<Float>> locationS = new ArrayList<>(Collections.nCopies(size, null));
|
||||
List<List<Float>> scaleS = new ArrayList<>(Collections.nCopies(size, null));
|
||||
List<Double> angleS = new ArrayList<>(Collections.nCopies(size, null));
|
||||
ArrayList<String> pathsS = new ArrayList<>(Collections.nCopies(size, null));
|
||||
|
||||
List<List<Double>> locationO = new ArrayList<>(Collections.nCopies(size, null));
|
||||
List<Double> scaleO = new ArrayList<>(Collections.nCopies(size, null));
|
||||
List<List<Float>> locationO = new ArrayList<>(Collections.nCopies(size, null));
|
||||
List<List<Float>> scaleO = new ArrayList<>(Collections.nCopies(size, null));
|
||||
List<Double> angleO = new ArrayList<>(Collections.nCopies(size, null));
|
||||
ArrayList<String> pathsO = new ArrayList<>(Collections.nCopies(size, null));
|
||||
|
||||
@@ -2830,8 +2830,8 @@ public class PythonService {
|
||||
|
||||
int size = trims.getPrints().size();
|
||||
// 占位符填充数组
|
||||
List<List<Double>> location = new ArrayList<>(Collections.nCopies(size, null));
|
||||
List<Double> scale = new ArrayList<>(Collections.nCopies(size, null));
|
||||
List<List<Float>> location = new ArrayList<>(Collections.nCopies(size, null));
|
||||
List<List<Float>> scale = new ArrayList<>(Collections.nCopies(size, null));
|
||||
List<Double> angle = new ArrayList<>(Collections.nCopies(size, null));
|
||||
ArrayList<String> paths = new ArrayList<>(Collections.nCopies(size, null));
|
||||
|
||||
@@ -2841,6 +2841,8 @@ public class PythonService {
|
||||
prints.forEach(p -> {
|
||||
p.getLocation().set(0, p.getLocation().get(0));
|
||||
p.getLocation().set(1, p.getLocation().get(1));
|
||||
p.getScale().set(0, p.getScale().get(0));
|
||||
p.getScale().set(1, p.getScale().get(1));
|
||||
Integer priority = p.getPriority();
|
||||
location.set(priority - 1, p.getLocation());
|
||||
scale.set(priority - 1, p.getScale());
|
||||
|
||||
@@ -10,12 +10,12 @@ import java.util.List;
|
||||
public class DesignPythonItemElement {
|
||||
|
||||
@ApiModelProperty("print的位置 传 [[0.2, 0.2]]")
|
||||
private List<List<Double>> location = new ArrayList<>();
|
||||
private List<List<Float>> location = new ArrayList<>();
|
||||
|
||||
private List<String> element_path_list = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty("print的缩放比例 传 [0.2, 0.2]")
|
||||
private List<Double> element_scale_list = new ArrayList<>();
|
||||
private List<List<Float>> element_scale_list = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty("print的旋转角度 传 [0.2, 0.2]")
|
||||
private List<Double> element_angle_list = new ArrayList<>();
|
||||
|
||||
@@ -36,10 +36,10 @@ public class DesignPythonItemPrint {
|
||||
|
||||
|
||||
@ApiModelProperty("print的位置 传 [[0.2, 0.2]]")
|
||||
private List<List<Double>> location = new ArrayList<>();
|
||||
private List<List<Float>> location = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty("print的缩放比例 传 [0.2, 0.2]")
|
||||
private List<Double> print_scale_list = new ArrayList<>();
|
||||
private List<List<Float>> print_scale_list = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty("print的旋转角度 传 [0.2, 0.2]")
|
||||
private List<Double> print_angle_list = new ArrayList<>();
|
||||
@@ -52,8 +52,8 @@ public class DesignPythonItemPrint {
|
||||
public DesignPythonItemPrint(List<String> print_path_list, Boolean ifDesign) {
|
||||
if (ifDesign){
|
||||
this.print_path_list = print_path_list;
|
||||
this.location = Collections.singletonList(Arrays.asList(0.0, 0.0));
|
||||
this.print_scale_list = Arrays.asList(0.0, 0.0);
|
||||
this.location = Collections.singletonList(Arrays.asList(0.0f, 0.0f));
|
||||
this.print_scale_list = Collections.singletonList(Arrays.asList(0.0f, 0.0f));
|
||||
this.print_angle_list = Arrays.asList(0.0, 0.0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user