Commit Graph

56 Commits

Author SHA1 Message Date
xun.zhang 0b95bdd9d9 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
2025-03-22 20:54:16 +08:00
xun.zhang 994e4f4840 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
2025-03-22 20:53:56 +08:00
xun.zhang f39eabfd9f ENH: add tpu check when printing by object
jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I366aa8387dfc8d1c94fe836ee4898424d04737c3
2025-03-22 20:53:55 +08:00
xun.zhang c53a35856d 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
2025-03-22 20:53:54 +08:00
zhimin.zeng ede9f90a79 ENH: support tpu for multi_extruder
jira: none
Change-Id: I556804aadac00406e7214b86f7925170a90c55ce
2025-03-22 20:53:54 +08:00
xun.zhang 1525c3c3ac ENH: support custom layer sequence
jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I73f030f2009b66aef20e3492f742d85970081e8a
2025-03-22 20:53:17 +08:00
xun.zhang 0716b8518e 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
2025-03-22 20:52:55 +08:00
xun.zhang 0f70c81a7d 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
2025-03-22 20:52:55 +08:00
xun.zhang 2dbc5c9396 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
2025-03-22 20:40:26 +08:00
xun.zhang 0756b51eb2 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
2025-03-22 20:40:26 +08:00
xun.zhang c49c0c8f72 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
2025-03-22 20:40:25 +08:00
xun.zhang ad65cdb909 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
2025-03-22 20:40:25 +08:00
xun.zhang 3167e34e60 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
2025-03-22 20:32:28 +08:00
xun.zhang e95179427f FIX: unable to custom first layer filament order
jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I0107ebf6a85ea0deba93ff558835138981365670
2025-03-22 20:32:28 +08:00
zhimin.zeng da32b878b3 ENH: add extruder_ams_count behavior
1. save to appconfig and project setting
2. use it to group
jira: none

Change-Id: Id4048fc1b47f6904b2e9c0154aaa3a2b03590437
2025-03-22 20:32:27 +08:00
zhimin.zeng 67f67d7688 NEW: Add FilamentMapDialog
support drag drop to modify the filament map
jira: none

Change-Id: I0ed3180a0fa8e95e7c871bb039eb844faccd1344
2025-03-22 20:32:27 +08:00
xun.zhang cffb4a8564 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
2025-03-22 20:32:27 +08:00
xun.zhang cddf8cae27 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
2025-03-22 20:32:26 +08:00
xun.zhang cc81e57ac9 FIX: compatible with one extruder reorder
jira:NEW

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I7e350ba8728ac4b3dd34093ff4e9647d0a2ba671
2025-03-22 20:32:26 +08:00
xun.zhang 7128e2925a FIX: logic error in filament change
jira:NEW

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I7e2b1333d4b82e4495375fcf4daec3aea08be445
2025-03-22 20:32:26 +08:00
zhimin.zeng ad03fae1eb FIX: Clean up the code
1. Refactor recommended code for print by object
2. Calibration adaptation sends print command

jira: none

Change-Id: I24fd92d6aca07a7067e09bb200854e5bec72a324
2025-03-22 20:32:26 +08:00
xun.zhang 1ab2964ee3 ENH: alternate multi-head printing sequence
jira:NEW

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I739438e8c411b638571d5291f3e5ad3d54650a73
2025-03-22 20:32:26 +08:00
xun.zhang 9ec276d3d7 ENH: new filament group algorithm
1.When n<10, calc all case cost
2.When n>10, first k-medoids algorithm first
3.Enable setting group size

jira:NEW

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I625f47e0235c70e440c6d489b052a156fbffca3f
2025-03-22 20:32:25 +08:00
zhimin.zeng 21e6271e59 ENH: calib support multi_extruder
1. backend support multi_extrude data structure
2. Compatible with third-party calibration
3. fix bug when get extruder in gocde export process

Change-Id: I5dac9abdd9907a521a1ba9b480f9e05640591bc1
2025-03-22 20:32:25 +08:00
zhimin.zeng b42d94e1d0 ENH: support recommended filament map when print by object
1. support recommended filament map when print by object
2. placeholder_parser support function filament_change
3. extruder_id of filament_map is start from 1

Change-Id: Ide8019cd4a165a25972f22706ff685c3005aa031
2025-03-22 20:31:44 +08:00
zhimin.zeng dcd9fd5013 FIX: backend get the extruder id based on filament_map
Change-Id: Ib7679c0fc67336e462467dab9f5b4d4684d6eb19
2025-03-22 20:31:44 +08:00
zhimin.zeng 8c8c9a967b ENH: Add recommend filament maps method
Change-Id: I3945a8b9f0a57e10a1d230003f21c9877cc5f342
2025-03-22 20:31:43 +08:00
zhimin.zeng 6fbad9ed33 ENH: flush_volume support multi_extruder and fix bug
Change-Id: Id6b041f71ee6e55e68a6937f24ce791caac8e708
2025-03-22 20:31:42 +08:00
qing.zhang cd3f05b3fe FIX: crash while the first layer is empty
Github: 5376

Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: I64a0612ec4bf1ead099029db5f8e9f59e0b704af
2025-03-22 20:18:26 +08:00
xun.zhang 2308e2038e FIX: wrong use of reverse iter
jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I914f082f378b3cd195b1e69e166409d7302791d2
2024-11-15 19:17:32 +08:00
xun.zhang 95f24a906e FIX: pause layer not working
1.The stored layer height differs too much from the generated layer
height.Use a more direct way to locate the layer

github:5253,5275

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ie2428e700c72386349a4f2d64076c940ac4eea71
2024-11-15 19:17:32 +08:00
xun.zhang e3c8496a62 FIX: add to incorrect layer when adding pause
1. Caused by floating-point precision.

github:#1937,#4250

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: If7a5dc71a898c1208289b6b89eafef9d4126f17c
2024-10-15 15:50:26 +08:00
xun.zhang 4cf4e640ce FIX: unassigned initial extruder ignored
jira:NEW

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I97dbfac705c890d1c2b16c2b685f31d05e82a292
(cherry picked from commit a5a2909c795c6c99ff7d6c6bbe5741491a2b63e0)
2024-06-11 18:17:08 +08:00
zhimin.zeng 8a965afb1a ENH: add customize other layers print sequence
Jira: 6338
Change-Id: Ic14b2671ade37ab37583b81c5b509447b6c0d8f8
2024-03-25 15:29:19 +08:00
xun.zhang bc36255090 ENH: optimize the get_tool_order func
Use Dp to refine performance

jira:[NEW]

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I38b0c875e4deee9d9fbe926087fb5b2e274f8f90
(cherry picked from commit 9b7b66dc7a1f5e3efa318227ae7694bec5ec1216)
2024-03-25 15:29:19 +08:00
Bastien Nocera f54fb4a1cf libslic3r: Fix missing includes
Fix a lot of "undeclared" errors during compilation on top of the
current GNOME 45 Flatpak SDK.
2024-01-02 17:42:37 +08:00
zhimin.zeng e8573d723a FIX: slice error: WipeTowerIntegration::append_tcr
when print by object with multi-color
Jira: XXXX

Change-Id: Ic9ee2f6de45abb4a118fdb4cf89dea9ca7335094
2023-12-14 22:08:53 +08:00
xun.zhang 9719fa81ef ENH:support interface filament not for body option
1. Add a option to prevent support interface filament being used in
support body

jira:STUDIO-4847

Change-Id: Ic6e9f663b71a7e4d9cd1bca399c0da2ce22bb5b5
Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
2023-11-09 10:09:10 +08:00
qing.zhang c5f1c22c51 ENH: put wall order to object level
Jira: [new]

Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: Idda8b1351ac880602f5da518d1146042dcd77795
(cherry picked from commit c6a5c8233bb013f6e272fef4f6e77748549d81e4)
2023-11-09 10:09:10 +08:00
wintergua 5160c8c4f6 FIX: brim generation with extruder overridding in by layer slicing
in brim generation, object's first layer extruders are obtained from regions.
If the extruders are changed at certain layers in by layer slicing mode,
the extruders from layer regions are not right.

this patch fix that issue by updating the extruder overridding in
a new member "object_first_layer_wall_extruders" in "print_object" class during
constructing "Tool_ordering" class. then using the new member directly when generating brim.

besides, support contour, which should be no_brim_area, is obtained from "support_infills" instead of "lslices" of "support_layers"

JIRA-ID: https://jira.bambooolab.com/browse/STUDIO-4332

Change-Id: I271d0ea0d8c01c412d4fb9ade5296c6a6471aed6
(cherry picked from commit 9919ce9d1b9105b859273eee4fe9481c4dff6189)
2023-11-01 09:33:21 +08:00
zhimin.zeng 476ca19689 ENH: support custom the first layer print sequence
Change-Id: I0516948292933fe47d39fb3ae2f7e91473b45b3a
(cherry picked from commit 5bbdb28c86509d5f94b5b9c33a0f2e1b2749e94b)
2023-11-01 09:11:19 +08:00
zhimin.zeng 81daebb5a5 FIX: the first layer is not printed in the correct order
Change-Id: Ia8ad49417e6b59fa10b763cb0e207f5f79b9a4d2
2023-04-17 15:39:02 +08:00
liz.li e7ea07944f ENH: custom gcode info should be owned by every plate
Change-Id: I5e5b000b7d04354d3c3cc311d089cb591a37501e
2023-02-22 20:09:17 +08:00
zhimin.zeng 217234c8d3 FIX: Support Filament is being "Flush into objects' infill"
When using "Flush into objects' infill" with support filament, it also get's flushed into the object's infill which shouldn't be happening.

Change-Id: I0f1cb3d5ee3cf5489ccab957989c6c24336f8845
(cherry picked from commit f83e63feb3ad5a14b0f4304e2e6fb1c5828270ec)
2023-02-02 12:14:41 +08:00
Arthur 646b259972 ENH: merge tree support layers to support layers
Will greately reduce repeated codes.

Change-Id: I506a97a907b5b393fe41e13ae53e2f7c9247c4c5
2023-01-10 19:08:26 +08:00
zhimin.zeng 96707fc4b4 FIX: tool change time is too long
Change-Id: Iaecc3dc832c6a20a2acc180a79923e45b97f18f3
(cherry picked from commit a3528545af4176bdba3240120ebde32abf8a9d8d)
(cherry picked from commit cbdab12b2e218427e51f39d6860b00a844caef7a)
2022-11-07 19:59:23 +08:00
yifan.wu 76b40c9636 FIX: fix an flush_into_object bug for copied objects
Copied objects share extrusion paths but they should be treated
seperately.
Thanks hisptoot for the fix.

Signed-off-by: yifan.wu <yifan.wu@bambulab.com>
Change-Id: I24d3050df7d284e92fc50a0213023a43ee8c529c
2022-10-20 19:34:37 +08:00
yifan.wu 65f57882b9 FIX: fix an exception happened in flush option in debug mode
Signed-off-by: yifan.wu <yifan.wu@bambulab.com>
Change-Id: I02847ac516f560863c126ee8bf7bfc9018c2d69e
2022-10-20 19:34:37 +08:00
zhimin.zeng a2d65c0c6a FIX: do not use interface support filament for default support
Change-Id: Ieb9da1df74b17e81a0fdb4d0b7e9bead54d8bb96
(cherry picked from commit b54caf82b1bc6d2097188c75c57e2f4e6b7792fc)
2022-10-20 19:34:37 +08:00
zhimin.zeng d7a8219a8f FIX: modify reorder extruders time
Change-Id: Ib72faf039dee6a08770617c4c2f341079d7e02e9
(cherry picked from commit 5e9d479bd7d7ef54bcafe7181dcdd8c03adaae51)
2022-10-09 10:37:45 +08:00