Commit graph

98 commits

Author SHA1 Message Date
xun.zhang
cd16bd83a3 FIX: translation problem
1. add regroup link

jira: NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ia90c80f5ff86e785e00fb0c38360eb33424a5ddd
(cherry picked from commit 01be3a51e646a9ca4277c490396417c95d983648)
2025-09-18 16:38:26 +08:00
xun.zhang
f4445d0c04 ENH: optimize group logic for unprintable filaments
1.Also fix a tip mistake

jira: NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ia52f95988d467a7018579a774376578b83e7ca05
(cherry picked from commit 804fe8d124e916f5957244913a50d24aceb621bd)
2025-09-18 16:13:25 +08:00
xun.zhang
7e98754e9b FIX: negtive value in grouping stats
jira:STUDIO-10772

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I90b88c7d96f6aeb31df36233efab5b9059ad2622
(cherry picked from commit f6a46d9b95aca66e49c89485424637b5eeae35ec)
2025-09-18 11:29:42 +08:00
xun.zhang
9cb261cbf2 ENH: add some change for translation
jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I58ded926c8525e261bb1c7518562c9276afc1409
(cherry picked from commit 1a240e5d14e173cce2b9cb99a56e4103729cc9d7)
2025-09-17 17:52:51 +08:00
jiaxi.chen
0d62d88387 FIX: useless change of extruder
jira: none
Change-Id: I4331e129d5a1ed79b539946d84ccd3113df93ef0
(cherry picked from commit fe20ab11b970a066fdeb42486c4bb53a8a5172ba)
2025-09-17 11:07:30 +08:00
xun.zhang
137fffa857 ENH: update translations
jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I0a7f24dd1538f4baf1b2b56f35233de5937a6d30
(cherry picked from commit 4747cbc53a5e5e8457f03914755d192421ea1d57)
2025-09-17 10:21:15 +08:00
xun.zhang
acbea85829 FIX: add some missing translate keys
1. Add missing translation keys
2. Fix filament map dialog can't display in auto mode

JIRA:STUDIO-10216

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I0c3927877dd91befc2463a300324bc6823615673
(cherry picked from commit 3733f33953fa89b490be0d2f36e225fa62dcbc00)
2025-09-17 10:21:15 +08:00
xun.zhang
229ef8884f ENH: enhance filament group alogrithm
1. Try to merge filaments before grouping
2. Set max match num for machine filamnet in match mode

jira:STUDIO-10392

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I2451d838e07ee02f493fda4dc702f3d13b2ad37b
(cherry picked from commit d15fc37ff2fa048e38a0b132bb3ae525ff666fab)
2025-09-17 09:46:04 +08:00
xun.zhang
58c877976d FIX: some filament group issues
1. Add filament_is_support field. Format the filament type
2. Optimize machine filament info logic

jira:STUDIO-10326

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ia8bfc37095339e73c98209b4e3f1e0804e511e88
(cherry picked from commit 001144400b841629439a890d46fa40a7296689ba)
2025-09-16 23:27:32 +08:00
zhimin.zeng
ae9493d885 FIX: only check TPU for multi-extruder printer
jira: none
Change-Id: I1fb882c05d43ffbcd42950ca6618d5789f148cd9
(cherry picked from commit 1b41b9a76369f28b51bc172b5c289968c6e8550c)
2025-09-16 15:01:17 +08:00
qing.zhang
e7e6405ad3 ENH:instead of prime_volume by filament_prime_volume
Jira: none

Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: I96e7d0604da8f90678feed81833e3a634752ffff
(cherry picked from commit be02e769bb49680d6be678fc5fa73a141ca8da1c)
2025-09-16 10:39:19 +08:00
zhimin.zeng
6ab141e0e1 ENH: add PPS-CF/PPA-CF detection for multi-extruder printer
jira: STUDIO-9660

Change-Id: I1df024e178b8561569b493888d6057d8f96aea3c
(cherry picked from commit b68a7b3bd6ad5c980885fbaed3c635ae1a424f73)
2025-09-09 14:41:23 +08:00
zhimin.zeng
793e3812d9 ENH: add timelapse gcode for multi_extruder
and add most used_extruder for print by object
jira:none

Change-Id: I021069e865992828b098d73c0d704ba7edbd55d8
(cherry picked from commit ae62f7b8e4b4258318c0d941963eddfb70e86c15)
2025-09-07 21:29:19 +08:00
xun.zhang
5b03339b70 FIX: some filament group related bugs
1. Ignore machine filaments without enougn info

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I8973645555ae1d0986f90838797652258c4b57ac
(cherry picked from commit c75285002aa216ac903d5bf11cc2abc82dff1f63)
2025-09-07 18:25:45 +08:00
xun.zhang
f127846914 ENH: enhance extruder unprintable area detection
1. Detect unprintable area for extruder when slicing
2. Always do filament map again if object pos changed

jira:STUDIO-9473

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ic01b8be8e3b08ba6b34efb2d3c451c9e985a03e8
(cherry picked from commit f1445ff0477795e9baf3792348ff27d79ee2308c)
2025-09-07 18:24:59 +08:00
xun.zhang
f9869d4b5b ENH: seperate statitics for auto for flush mode
1.Compare stats of AutoForFlush with other filament map modes
2.Refine the function signature of filament group

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Iec2aff069d8c44343df8b82f045c61354c7d1c2a
(cherry picked from commit 95e49986f32070756182a31843f4f37f863f07ac)
2025-09-06 23:52:55 +08:00
xun.zhang
973c2f9cf3 ENH: refactor filament group
1.Seperate min flush max flow solver
2.Add "best match" mode for filament map
3.Refine code strucuture

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: If4ba09a0320366b862cec59f8ed1f22c392c53b9
(cherry picked from commit 414a2105c9d77bbf7771bdf3fdec40d96dc949c2)
2025-09-06 23:49:26 +08:00
xun.zhang
05bf5c114b ENH: filament map params switch to global param
1.Add more filament map modes
2.Filament map and mode are set as project config
3.Plate filament map is only valid when plate filament mode is
manual

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I33b2f853e0b77b9d605be1f2f1172b44df43da15
(cherry picked from commit e45f8c6dc2146e1e31a1c21e8aaada540af112d0)
2025-09-06 23:49:11 +08:00
qing.zhang
6b093f11b6 ENH: get first filaments & non support filament
Jira: none

Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: I9370e48b634f21a2d3fd11d437f699b5cdb5ce43
(cherry picked from commit 666e49e2990cfb8a8855dd80c81c85688d5a0f02)
2025-08-26 19:53:56 +08:00
qing.zhang
d55aced0b4 ENH: get most used extruder id
Jira: none

Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: I9c498cefb07b3bdf89a17bfd75a3075c2294c934
(cherry picked from commit e0508a9e5136cec6ba69cc8a4d186079802f841a)
2025-08-26 14:25:06 +08:00
xun.zhang
e273cf9cf2 ENH: seperate reorder from toolorder construct
1.Only do reorder if requseted.In by object mode,we only need
to collect the filaments in the object for filament grouping

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Id88f2449c6d3c5d45b9ff87513308d997fa72da1
(cherry picked from commit 7b5818fe6c538123373243ec8dfedc3c2fa68e6d)
2025-08-24 23:18:29 +08:00
xun.zhang
d941f80483 FIX: filament group crash in cli mode
1.Always do filament group to get correct filament map

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ie4e61c310f6c0cfeacb2a49c4f065f9674b6a35f
(cherry picked from commit 242554557b1ecd72355841826af707580fc583b6)
2025-08-24 23:18:28 +08:00
zhimin.zeng
68b925f290 FIX: fix crash of slice
jira: none
Change-Id: I68b1557d5a361d175abdff99a0542ca105b76f7f
(cherry picked from commit 02c2fb6f6c18cba9fd4d74f70559eb9cb665609e)
2025-08-24 23:18:28 +08:00
zhimin.zeng
ba957d1580 FIX: slice crash with incorrect filament_map of single printer
jira: none
Change-Id: I49bdcf03fc8abb24e41e0545e2d9cd3c55941df4
(cherry picked from commit 83681128e0c14c8f50952011122d6eceacce496a)
2025-08-24 23:18:26 +08:00
xun.zhang
a2ae7e1ddd FIX: disable unprintable logic for single ext
1.Disable unprintable logic for single extruder printers

jira: NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Iecb4cc80455288925d3acb5688b81aa9ef1c3a8a
(cherry picked from commit c6ddd329e3397cc4cafac4665b9fdf2dabb657f6)
2025-08-24 23:18:23 +08:00
xun.zhang
041ca29ab7 ENH: modify filament group strategy
jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Iac837beeb7a5c4684aea38c3e3925a67cd916fe8
(cherry picked from commit e3f4496adf87ce68691c2e511b065925784c54e1)
2025-08-24 23:18:22 +08:00
xun.zhang
c362a99a11 FIX: empty filament map
1.Caused by uninitialized filament map in mapping for AMS

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I71ce6001fc6f2e72eb9303fcaba0bac16ad70dc9
(cherry picked from commit 48023e4c154c118c9396b6065b7e2476970fd441)
2025-08-24 23:18:20 +08:00
xun.zhang
e1ebe832dd ENH: refine filament group algorithm
1.Use max flow network to handle limit
2.Support setting master extruder id
3.Fix the issue in the KMedoids algorithm where data is overwritten
after each retry.

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Idd2bedf39f61e7a65eb4199852f60b8fbebe0a7d
(cherry picked from commit 3cfb49a1b9dc2c76066ec441f1028f99a4bf99c4)
2025-08-24 23:18:19 +08:00
zhimin.zeng
9e05f88a36 FIX: fix the crash bug when slicing
jira: none
Change-Id: Ieaec4fda4c653e6595322356bd16226640d2e932
(cherry picked from commit d715353fa634660cb420920d96466cb23bc6576e)
2025-08-24 23:18:18 +08:00
zhimin.zeng
1658c6c54d FIX: When the printer is inconsistent with the current preset
when the ams is 0/0, should not consider the print connect status
jira:none

Change-Id: I2288ff15894d5c734a98b830df6678cab2bd12fc
(cherry picked from commit 20837717d411016251c4831586b0fa61350a08b2)
2025-08-24 23:18:18 +08:00
xun.zhang
dcfa224cf2 ENH: do another map for ams filaments
1.If the group result differs little in flush,we will choose the one
that best fits the ams filaments

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Icd147b406e3494c841ef13564ad1b1231ad798fd
(cherry picked from commit 0b95bdd9d950918ea6979da6b4d62b2d2cd25b99)
2025-08-24 23:18:18 +08:00
xun.zhang
c0369b2c81 ENH: enhance accuracy of weight calculation
1.Use float to store the weight copmputed in the procedure.Avoid the
issue where filament weight remains at 0 after changing filaments

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Iff0cfc6e22f34affbc232dbfe196f27ee06d2d9e
(cherry picked from commit 994e4f4840a6734ab479e10d39462cc692bc4d77)
2025-08-24 23:18:17 +08:00
xun.zhang
e77d2abf47 ENH: add tpu check when printing by object
jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I366aa8387dfc8d1c94fe836ee4898424d04737c3
(cherry picked from commit f39eabfd9fac3e3abf6c360a74a73abf453778bb)
2025-08-24 23:18:14 +08:00
xun.zhang
7bd16a3ca7 ENH: add filament cluster algorithm
1.Add new KMediods algorithm
2.Consider physical and geometric printables
3.Refine code structure

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I1412835c3c6380f9cedb44ff6914004365bba889
(cherry picked from commit c53a35856d8d1cbd3a632a8510f1ddfdf9117106)
2025-08-24 23:18:13 +08:00
zhimin.zeng
0ff33f8f7e ENH: support tpu for multi_extruder
jira: none
Change-Id: I556804aadac00406e7214b86f7925170a90c55ce
(cherry picked from commit ede9f90a792f3f39e82916543efaf187ce80d66c)
2025-08-24 23:18:13 +08:00
xun.zhang
4c279b6497 ENH: support custom layer sequence
jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I73f030f2009b66aef20e3492f742d85970081e8a
(cherry picked from commit 1525c3c3aca88c729ed1527af9d2afe486a283e1)
2025-08-24 23:18:11 +08:00
xun.zhang
5d4cb375b0 ENH: add tool order function
1.Use min cost max flow to solve the tool order

jira:NEW

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I909845039b67c7fe3ddd42580ad3f1d71d52262d
(cherry picked from commit 0716b8518ef62e0eac7c45de8bafb1458d8f9a8e)
2025-08-24 23:18:10 +08:00
xun.zhang
ec98375192 ENH: optmize code structure of tool order
1.Put reorder functions in ToolOrderUtils

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I49c7b447ba1f41f3747ba3127d842c4e3957b5ff
(cherry picked from commit 0f70c81a7d5686d8e80396f8f865f25b72618907)
2025-08-24 23:18:10 +08:00
xun.zhang
8331f8eba8 ENH: add manual grouping mode stats
1.In auto mode,display the statistics of auto mode and single
extruder
2.In manual mode,display the statistics of manual mode and auto mode
3.Support by object mode

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: If54c4db79f33d5278c0f18d01ab0518e8660f9c7
(cherry picked from commit 2dbc5c939666e294c805ee4bf33ec09976688be3)
2025-08-24 23:18:08 +08:00
xun.zhang
0fec5317d6 FIX: wrong filament map in layer filament
1.Should calculate cost if filament used in that layer is 1,because
we should consider the last filament used in previous layer

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I5838af77f1d73bfa07c65bd6ee12ae352dc3b571
(cherry picked from commit 0756b51eb2b457a1ddfddc0ab8e445c779737597)
2025-08-24 23:18:08 +08:00
xun.zhang
ef7d233d93 ENH: modify forcast limit number
1.Use forcast when filament num in current layer and next layer both
smaller than limit number

jira:NEW

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ia21bb22ce353f0c74eeaf748c6d9f9c4b315ec18
(cherry picked from commit c49c0c8f723e82e4e87cd931b7d5070142fb0781)
2025-08-24 23:18:08 +08:00
xun.zhang
067d1484ab ENH: add filament saved by multi extruder
1.Add filament flush,filament change count reduced by multi
extruder

NTOE: cases when printing by object haven't been handled

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Iaaea5f8ffae2345df5a6f1dc605342d835974d48
(cherry picked from commit ad65cdb909b29210117f690a119ef76b70373da4)
2025-08-24 23:18:08 +08:00
xun.zhang
8b866d0ce6 ENH: add greedy algorithm for filament reorder
1.When n becomes large,the original algorithm to get best filament
sequence will cost too much time and memory.Use a greedy algorithm
instead.Always select the next filament with fewest flush

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Iabc924e1bdb0a07af0a6ef0bbdd62e54ce54f052
(cherry picked from commit 3167e34e609d0eecb481fd550e6550024b72bb67)
2025-08-24 23:18:08 +08:00
xun.zhang
74bf8ad58e FIX: unable to custom first layer filament order
jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I0107ebf6a85ea0deba93ff558835138981365670
(cherry picked from commit e95179427fe31cf3365afdccbaadce84c31407f8)
2025-08-24 23:18:07 +08:00
zhimin.zeng
a9bec75ea2 ENH: add extruder_ams_count behavior
1. save to appconfig and project setting
2. use it to group
jira: none

Change-Id: Id4048fc1b47f6904b2e9c0154aaa3a2b03590437
(cherry picked from commit da32b878b3d7ca95ae5c4786102848c1e8a5ab2d)
2025-08-24 23:18:07 +08:00
zhimin.zeng
c34eb170f1 NEW: Add FilamentMapDialog
support drag drop to modify the filament map
jira: none

Change-Id: I0ed3180a0fa8e95e7c871bb039eb844faccd1344
(cherry picked from commit 67f67d76889668fdd80ae5e496b6cbca5f771a43)
2025-08-24 23:18:07 +08:00
xun.zhang
d415073b14 ENH: optimize filament group algorithm
1.When filament <10, do the reorder with next layer.This can reduce
10% flush in some cases
2.Support custom filament seq
3.Use caches to speed the algorithm

jira:NEW

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ie1af9841f7165802d350eae962efe8febafbb357
(cherry picked from commit cffb4a8564844b1892eb42cfe8e883a52e70fb6a)
2025-08-24 23:18:07 +08:00
xun.zhang
5a6b215ef0 ENH: add filament group strategy
1.When capacity is greater than the num of filaments, always choose the
map result that can be accommodated
2.In BestFit strategy,always try to fill up the existing capacity
3.In BestCost strategy, just try the group with fewest flush

jira:NEW

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ifd6d64b77774039e57ffff26cf2243a4d3f89054
(cherry picked from commit cddf8cae27f4320f830b463e92703d3a6cf344e7)
2025-08-24 23:18:06 +08:00
xun.zhang
df1e125e1d FIX: compatible with one extruder reorder
jira:NEW

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I7e350ba8728ac4b3dd34093ff4e9647d0a2ba671
(cherry picked from commit cc81e57ac947375a525281e7cbf52437c740a746)
2025-08-24 23:18:06 +08:00
xun.zhang
400ff4d007 FIX: logic error in filament change
jira:NEW

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I7e2b1333d4b82e4495375fcf4daec3aea08be445
(cherry picked from commit 7128e2925a7b75c6e1bee76b739cef8c4fd46c89)
2025-08-24 23:18:06 +08:00