Commit graph

97 commits

Author SHA1 Message Date
Arthur
04552e4c9b FIX: cli arrange failed in some cases
1. set different bed_shrink for seq_print and layered print
2. fix the bug that seq_print arranging may get collision with exclusion
   area.
3. remove unused functions.

Jira: STUDIO-4663

Change-Id: I8b726704cca33fe37bb3cb7c4502963a9ad8d16b
(cherry picked from commit f27d00f81315fe4675bbc55ef932403e31a9264f)
2023-10-10 14:19:23 +08:00
lane.wei
e8257103b7 FIX: CLI: fix the wipe tower depth not correct issue
estimate the wipe tower depth using more logic
JIRA: MAK-XXXX

Change-Id: Ieb66ebb7e75b20e61b7c0cb8e60496287434d31b
2023-10-10 14:19:23 +08:00
lane.wei
980b1bf38e ENH: CLI: refine some logs
JIRA: STUDIO-XXXX
Change-Id: Ic61f7fbffabc28a76ac186c33182b9284c1c2da1
2023-10-10 14:19:23 +08:00
lane.wei
59061f912b ENH: CLI: add more logic to improve slicing
1. only report slicing error when no-check not set
2. skip duplicate when under spiral_mode with by-layer print

JIRA: STUDIO-XXX
Change-Id: I03bf7f45b4cc43dcc1fd2ffb6b53321fe3324dad
2023-10-10 14:19:23 +08:00
lane.wei
03f7bcec51 FIX: CLI: refine some logic
1. sometimes the pipe open failed,
add some retry logic;
2. return the reason when no-check=1 while validate fail;
3. return an error when duplicate object under spiral-mode when not using
   by-object print sequence

JIRA: MAK-xxxx
Change-Id: I3792d89dbbe560a8febe0f0154bccb8f573959a5
2023-09-23 00:48:53 +08:00
lane.wei
805248f38a ENH: 3mf: improve some logic
1. skip file including /../
2. use snprintf instead of sprintf

JIRA: jira-xxxx
Change-Id: I6695dc11f9f4af4318038e6db5c219fd14e73aef
2023-09-22 16:21:26 +08:00
manch1n
7beed5d6dd NEW: add align_to_y_axis option for auto-arrange
1. Add align_to_y_axis option for auto-arrange.
   This is useful for auto-arranging of i3 type printers.
2. Change default value of align_to_origin to true when switching
   from non-i3 printers to i3 printers.

JIRA: STUDIO-2583

Change-Id: I7dabab846022a0da030a9fec060a60a4207537a0
2023-09-22 16:21:26 +08:00
shuai.liu
b9cc020fea ENH: auto adapt distance in arrangement
JIRA: STUDIO-4408
1. if min_obj_distance is 0, use auto mode
2. normal support, 5mm gap, tree support, 22mm gap, no support, 0.1mm
   gap

Change-Id: I906ccf267bef1f33a946572614d658fd50cfcda3
(cherry picked from commit 3c65150434c9938442b0c8d7995f21bb5e50db89)
2023-09-22 16:21:26 +08:00
lane.wei
29bdbf891c FIX: CLI: disable wipe tower under sequent-print mode
JIRA: STUDIO-4409
Change-Id: I7a3552180a31613244afeebdfcd9bc6b4d8b13b5
2023-09-22 16:21:26 +08:00
lane.wei
e76be77cfc ENH: 3mf: refine the rels to correct link
JIRA: STUDIO-4231
Change-Id: I02ff6343124ef2ea3642e5799469249538a4b97f
(cherry picked from commit 781793a4c84b3e8a01f38d990d34bee9add8850a)
2023-09-22 16:21:26 +08:00
Arthur
ef2cc4b65c ENH: add load_model_objects_and_custom_gcodes
Add cmd line option to pass layer change gcode.
This is useful for lithophane auto change colors.
Cmd: --custom-gcode custom_gcode_toolchange.json

Examples of the input json file can be found in the jira.

Jira: STUDIO-4070

Change-Id: I5beb5ff7d6d81028e95013e79f955e498cd3ba30
(cherry picked from commit bed6152b95c965ea87958d94ec069d8c883a8037)
2023-09-22 16:21:26 +08:00
lane.wei
f250d6f5c7 FIX: CLI: fix the thumbnail color not correct issue
JIRA: MAK-1812
Change-Id: I61832ffeea75b9423d85ccd81d5602a3e7d288b8
2023-09-22 16:21:26 +08:00
lane.wei
c00caad244 ENH: CLI: add support of rotate
JIRA: STUDIO-4183
Change-Id: I091cc3142ce867d2ac75ba27b3cb2e4e569c9681
(cherry picked from commit 7eab9ba9f22dc8f00e13caf27c7cf72b8675562a)
2023-09-22 16:21:26 +08:00
lane.wei
4eea84f24a FIX: CLI: fix the compiling issue under windows
JIRA: STUDIO-4217
Change-Id: Id937f921aa6d1f5cbc2300ba7395df71c3cd147a
(cherry picked from commit 799faa7bbd270050bc8b04afba27021ebaf88933)
2023-09-22 16:21:26 +08:00
lane.wei
bf8ac4c436 ENH: CLI: optimize the logic for message
1. treat the critical slicing warnings as error
2. save more information into result
including the triangle counts and the non-critical warnings

JIRA: STUDIO-4217

Change-Id: I25b746d06c9a1ef2d642c67852577982a2986322
(cherry picked from commit 1d9707ed04cbb6dc12b440b70f3581c619136ac3)
2023-09-22 16:21:26 +08:00
lane.wei
a1e4975c81 FIX: CLI: fix the wipetower wrongly generated issue
JIRA: MAK-xxx
Change-Id: I6d6af58c7106df4dacb51e98dd607ff77c058c13
(cherry picked from commit 080c6ced15bf9eb6e490fbd3616667d66ecbff86)
2023-09-22 16:21:26 +08:00
lane.wei
d5b9dcfbbe FIX: CLI: fix the brim related issues
1. move the global functions to Model
2. set brim automation paremeters before process
JIRA: STUDIO-4208

Change-Id: I3f75175ec74d214ca2a6d5f3ade56d08e0ecd4f3
(cherry picked from commit bcc88bc01ec396e8fb8af1186b47a75cd5116f3c)
2023-09-22 16:21:26 +08:00
lane.wei
7f642112d2 ENH: CLI: add the re-arrange logic when the printer type change with different extruder_clearances
JIRA: STUDIO-4214

Change-Id: I6a8862b4da9812d38522fba2235d5e02f421878b
(cherry picked from commit 0d00660feb97fa0652c7984d92150aacd2746698)
2023-09-22 16:21:26 +08:00
lane.wei
731035b8b6 FIX: CLI: fix some issues
1. JIRA: MAK-1727, color of thumbnail not correct
2. JIRA: MAK-1723, model upload outside issue

Change-Id: I1754d730021c9df8044248e931023899d410d8de
2023-09-22 16:21:26 +08:00
lane.wei
2f51b0be97 FIX: CLI: fix a wipe tower position issue
when arrange failed and restore to original
we will compute the position of wipe tower again
we should skip this case
JIRA: STUDIO-4048

Change-Id: I19edc36dfa7ec5a9f6b5ba3a1c1e0767361b3e33
2023-09-22 16:21:26 +08:00
lane.wei
e1b3a5b6d5 ENH: CLI: add a flag to allow minimum size save
JIRA: STUDIO-3752
Change-Id: I0277c34d108185d10130630a72811122f8ee9ae2
2023-09-22 16:21:26 +08:00
Arthur
064f3ee0aa FIX: unify cli and GUI auto-arrange
Make sure cli uses same params as GUI's auto-arrange.
Previously cli uses wrong skirt_distance.

Jira: BLPIOT-255
Change-Id: Iaccfb76acf7413ec614fff006feb770dcd6783cf
2023-09-22 16:21:26 +08:00
lane.wei
f6ac8b60b7 FIX: CLI: fix serveral issues of CLI
1. duplicate id issue, MAK-1702
2. shrink issue, STUDIO-4048

Change-Id: Ie952f1ecc5267a60f0ce3220c4a5ea31cf7199ff
2023-09-22 16:21:26 +08:00
lane.wei
990b0947e7 FIX: CLI: add logic to allow use cached_data while printer size change
when print profile created on small printers
the cached data should also be used
JIRA: MAK-1658

Change-Id: I31e801bd3116838baaeaef44f4aa6d53d65aa058
2023-09-22 16:21:26 +08:00
lane.wei
fca0d5b239 FIX: CLI: fix serveral bugs
1. bed index not correct issue
2. pick thumbnail not correct when repetitions

Change-Id: Ie846432e29c596f95da30c7df199c252873504f3
2023-09-22 16:21:26 +08:00
lane.wei
34061f1fb7 ENH: CLI: add time record for prepare/slice/export
Change-Id: I4004a9af3823223c885f428f5a2f180f9d9074e5
2023-09-22 16:21:26 +08:00
lane.wei
db5ed65577 ENH: CLI: add more logic to support repetitions
1. add identify_id for those clone objects
2. ensure succuss when copy multiple objects

Change-Id: I8a92f485442577ce70b1f5c46449dae1ae07b713
2023-09-22 16:21:26 +08:00
lane.wei
468fc828d0 ENH: CLI: support system preset passed to CLI
Change-Id: I933d49e677c8610c3fe90bbe7d455f94d950ae96
2023-09-22 16:21:26 +08:00
lane.wei
85e2868110 FIX: CLI: fix a compatible check issue for old printer and process
Change-Id: I74c75984d1abd0d1c52d8d4a19b6410c0041f280
2023-07-31 14:29:15 +08:00
Vojtech Bubnik
153c9517ce FIX: fix the crash issue #1944 caused by wronog thread name in some
corner cases

this patch is cherry-picked from PrusaSlicer's 84722876012ca310e29b291e10fef9d18ae26cea
thanks to 'Vojtech Bubnik' for the fix

Implementing a test whether the current thread is the main (UI) thread
and using it on AppConfig::save() to assert if save is called
from a worker thread.
The old assert was using thread names, which did not always work
on Windows.
Fixes #7839 #9178 #9370 #9420
2023-07-31 14:29:15 +08:00
lane.wei
0c45cac1a8 ENH: CLI: refine some logic of repetions and load configs
1. when object skipped, it should not be duplicated
it is set to unprintable before arrange
and the plate needs to be considered a skipped plate also
2. skip the wipe tower if not multi-color after skip
3. load default configs if there are no configs loaded
4. refine the result.json to include key_values

Change-Id: I8c132cabcdd78756673fe900267a226a41ae1b4d
2023-07-31 14:29:15 +08:00
lane.wei
8c29a57be4 ENH: CLI: add logic of uptodate_settings
1. load the updated machine/process config from uptodate_settings
2. if don't have uptodate_settings, keep the logic as before, use from local

Change-Id: I3520469ab6094f03895b8e0e4e84c7549190f244
2023-07-31 14:29:15 +08:00
lane.wei
99bbce0f0f ENH: CLI: add the repetitions logic
support to duplicate object in a plate

Change-Id: I6bc964a2b9660adf3be7919f230524c979da9d50
2023-07-31 14:29:15 +08:00
lane.wei
387f8838f2 ENH: CLI: add logic to translate objects between different bed size
1. from small bed to larger one, auto translate the models based on center;
2. from large bed to smaller one, report an error

Change-Id: I7b7fac1e370ff4daca82c4f36977a86fca268625
2023-07-31 14:29:15 +08:00
lane.wei
bb4f425027 ENH: add the error codes return logic
1. write a json to the outputdir
2. including message/error code/plate id

Change-Id: If2a13a89d34982a86102162c9c968cdf60702f19
2023-07-31 14:29:15 +08:00
lane.wei
7c76cf99b9 ENH: CLI: add option repetitions for future use
Change-Id: I97bdc04b542f9725a047348450c2c677d8807427
(cherry picked from commit d5a20f689cade6cc5b28bbec70931c6d122ef6f4)
2023-07-07 17:52:43 +08:00
lane.wei
c93f3f0a6b FIX: fix a config loading issue under CLI
wrongly use machine config as process config

Change-Id: I63a7757ca3b8f178ca424624d874f3472b694a0e
(cherry picked from commit 5fe90491d182fe92c48bd35b5c527d0be98120d8)
2023-07-07 17:52:43 +08:00
lane.wei
d385384907 ENH: skip_objects: optimize the label_id logic in ModelInstance
Change-Id: Id20fe9b084426036d6cf4f54859655579bec7197
(cherry picked from commit ebb5343eef6aea9e54d11f3d6b98cf11ff941aa5)
2023-07-07 17:52:43 +08:00
lane.wei
ef06dfc931 ENH: object_skip: use identify_id for cli when skipping object
Change-Id: Ibbe3262b4817f82b7ac824ba6d4b3efd7f0ed886
2023-07-07 17:52:43 +08:00
Arthur
0cad88309c FIX: fitst layer bbox was wrong for multiple plates
brim bounding box is now shifted w.r.t. plate origin, need to modify the
no-brim shift the same way.

Change-Id: Iefa7287e2848aadbfc4a468bca394ecec48a1e7c
2023-07-07 17:52:43 +08:00
lane.wei
b9afbd92c3 ENH: CLI: add logic to recompute flush volume matrix for mmu
Change-Id: Id9ce0cc054492762da31d2bd9dea53c73421d972
2023-07-07 17:29:08 +08:00
lane.wei
c7775ace16 ENH: skip_objects: add the skipped_objects into sliced_info
Change-Id: I2a04aa00503a04cfe3e9d680ceabdb4947142d34
(cherry picked from commit ca548d69daa0bc2970efc080fcf1537e6babb278)
2023-07-07 17:29:08 +08:00
lane.wei
5ddb47a8cd ENH: CLI: output stl files into a subdirectory
Change-Id: I3d1a3685713a498d7d66e9d5cbabf90aaa3ffe43
(cherry picked from commit bcb352f48995f7c3488bdf8d5636499fcd2b714c)
2023-07-07 17:29:08 +08:00
lane.wei
535db60e70 ENH: CLI: check the compatability when not change the settings
Change-Id: I977e98fcdd8c6a84ad68d0a1cc6f8eef5075b537
(cherry picked from commit ce17360aba5a463cdec788e7cb0897e33dfa1042)
2023-07-07 17:29:08 +08:00
lane.wei
6968eb5d82 ENH: support export multiple model objects as stl under CLI
Change-Id: Ib6cb68624d111971dc763901f3a8414673d9a546
2023-07-07 17:29:08 +08:00
maosheng.wei
f1a99020f6 FIX: Direct crash when bad_alloc
Change-Id: If8e26218efa1750a7cbdced4f4b7db19d3a14db0
2023-07-07 17:25:51 +08:00
lane.wei
84b89094b2 ENH: cli: refine the progress logic
update 1% at the very beginning

Change-Id: I85e19ad5c8ed4b8465510ffb3db4fac12c0f20b9
(cherry picked from commit 5d4ca3be8e6af2c66ecd5d51fead3e7ca5ffa7f5)
2023-07-07 17:25:51 +08:00
lane.wei
2c620aa855 ENH: debug: set the crash dump to SetUnhandledExceptionFilter
AddVectoredExceptionHandler is too heavy now

Change-Id: I354a023723d16cfa5d20c282bb6d98773dcde74f
(cherry picked from commit c213904026960ebbc6621aa5413ad944af13cb97)
2023-07-07 17:25:51 +08:00
lane.wei
33ae019a95 ENH: CLI: don't popup dialog when loading shader failed
STUDIO-2855(github issue-1703)

Change-Id: I46476e94951aa2337fee3439159e777773366c59
2023-07-07 17:25:51 +08:00
lane.wei
53dc1694a3 FIX: fix the cached id related issue after 3mf format adjust
Change-Id: Ie3da4a672d166f0cf23efc29faf02de633b3484e
(cherry picked from commit 842fe9310c0cdb18e7a491dae2c8ebc7a5753136)
2023-07-07 17:25:51 +08:00