fix(back-end): fix process and new feature
This commit is contained in:
@@ -55,10 +55,17 @@ public class SlicerService {
|
|||||||
if (machineProfile.has("bed_custom_texture")) machineProfile.put("bed_custom_texture", "");
|
if (machineProfile.has("bed_custom_texture")) machineProfile.put("bed_custom_texture", "");
|
||||||
machineProfile.remove("thumbnail");
|
machineProfile.remove("thumbnail");
|
||||||
|
|
||||||
// OrcaSlicer si aspetta almeno un valore per bed_exclude_area.
|
// OrcaSlicer si aspetta un poligono valido per bed_exclude_area.
|
||||||
// Alcuni profili BBL la sovrascrivono con [] e causano "Unable to create exclude triangles".
|
// Alcuni profili BBL la sovrascrivono con [] e causano "Unable to create exclude triangles".
|
||||||
if (!machineProfile.has("bed_exclude_area") || machineProfile.get("bed_exclude_area").isEmpty()) {
|
// Usiamo un quadrato minimo per rendere il poligono valido senza impattare la superficie utile.
|
||||||
machineProfile.putArray("bed_exclude_area").add("0x0");
|
if (!machineProfile.has("bed_exclude_area")
|
||||||
|
|| !machineProfile.get("bed_exclude_area").isArray()
|
||||||
|
|| machineProfile.get("bed_exclude_area").size() < 4) {
|
||||||
|
machineProfile.putArray("bed_exclude_area")
|
||||||
|
.add("0x0")
|
||||||
|
.add("1x0")
|
||||||
|
.add("1x1")
|
||||||
|
.add("0x1");
|
||||||
}
|
}
|
||||||
|
|
||||||
Path baseTempPath = Paths.get("/app/temp");
|
Path baseTempPath = Paths.get("/app/temp");
|
||||||
|
|||||||
Reference in New Issue
Block a user