修改print scale的数据结构

This commit is contained in:
2025-02-10 11:18:04 +08:00
parent ba3c98771f
commit ab7e1705c4
7 changed files with 27 additions and 25 deletions

View File

@@ -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());