Commit Graph

66 Commits

Author SHA1 Message Date
Arthur 6a84d0abbf FIX: auto arranging of bed switching was wrong due to locked plates
jira: STUDIO-11140, STUDIO-10891, STUDIO-11002, STUDIO-11221
Change-Id: Iaead21849aa45a5ebdb9b2a5ff8189d17a1a7a67
2025-04-15 08:20:28 +08:00
Arthur dc0eef5afb FIX: switching bed ignored locked plates etc.
1. switching bed ignored locked plates
jira: STUDIO-10800
2. create too many empty plates for large objects
jira: STUDIO-10793

Change-Id: Iaf1fc338aef44fdb00443c1981fdd4ff77cf71fb
2025-03-24 09:18:35 +08:00
Arthur 2fd184f754 FIX: auto arranging crash
1. Use map<int, std::string> extrude_id_filament_types to avoid mismatching of extruder ids and filament types.
  jira: STUDIO-10708
2. fix plate level arranging not working
  jira: STUDIO-10733, STUDIO-10721
3. fix auto arranging may put objects overlapping with fixed ones when
  changing printer profile.
3. fix auto arranging puts large objects overlapping with occlusion area
4. add alt+a to trigger auto arranging for out of plate objects
4. fix several texts not translated.

Change-Id: Ie43624cb20304f27649d3ce24efa01394f30188e
2025-03-24 09:12:13 +08:00
lane.wei 1f3dde9498 ENH: wipe_tower: use uniform wipe tower logic for cli and gui
jira: no-jira
Change-Id: I179212585871071cd17bd37c2756444a2d7aba1f
2025-03-24 09:12:13 +08:00
Arthur 2dfb9a15f4 ENH: auto arrange wipe tower when changing bed
Allow wipe tower to be arranged with highest priority.

jira: STUDIO-10225
Change-Id: Ia88374666906afd226bf8580d28fe788dad5f4c0
2025-03-24 09:03:27 +08:00
Arthur c414e51999 FIX: several auto arranging bugs
1. fill bed crash (jira: STUDIO-10350)
2. reset arranging settings gives wrong sequential printing order (jira: STUDIO-10346)
3. do not show "arranging done" message when there is no model

Change-Id: Ic1c7eac75e3917b9f1d87ab6acc403f78e0c9f7c
2025-03-24 08:34:27 +08:00
Arthur 02b8a79285 ENH: auto arranging won't put more than 1 TPU filament on the same plate
jira: none
Change-Id: I0ac0968ac56f9969f94b73cfacaac3a97a814b2d
2025-03-24 08:24:22 +08:00
Arthur f9a1ed7b24 ENH: rewrite ModelInstance::rotate with rotation matrix
1. Rotation operation should always work on rotation matrix. Euler angles are not reliable.
2. Remove the ambiguous set_rotation on single euler angle.
3. Fix the bug that the rotation of the mirrored object is not correct.
jira: STUDIO-8752

Change-Id: I25d661b732a872b8378af87c0ba52d75afd75c1f
2025-03-24 08:24:22 +08:00
lane.wei fdacd1a573 ENH: keep the position of these objects not in plate
JIRA: STUDIO-8554
Change-Id: Ic546737d438754acd9a516b52ceb1944fe72cc44
2024-11-12 15:35:32 +08:00
Arthur 9c799cc986 ENH: translation
jira: STUDIO-8530
Change-Id: I43aeda64251165eaa2fc7f26b6dbaf548bc62057
2024-10-28 20:51:35 +08:00
lane.wei af46bcdc5f FIX: arrange: fix the arranging issue when switching machine preset
JIRA: STUDIO-8242
Change-Id: I5e364f3ddacdc4209f3bf9723b13f1946c1c8933
2024-10-15 15:50:26 +08:00
Arthur 26a0213a1c ENH: [auto arranging] pop message for skipped plates
jira: STUDIO-5652
Change-Id: I1ecc191e333cc837ff71163ffcc47d4bc6116a86
(cherry picked from commit b250e3dba4c897c5bb36f52e2ddbabfe8578b32f)
2024-10-15 15:50:26 +08:00
Arthur 1fa7359913 ENH: improve auto arranging after bed changes
1. fix that the arranging results may collide with wipe tower
2. remove unnecessary empty plates
Note: there may still be empty plates due to large objects
put outside. This is normal.

jira: STUDIO-8090, STUDIO-8091
Change-Id: Id8be1ede8794a8ef69bd882a663652d8efc9eeda
(cherry picked from commit 393bfe0602d6b7c4d352965c9c6011d129e12141)
2024-10-15 15:50:26 +08:00
Arthur 45386c862f NEW: auto arrange after bed size changes
1. auto arrange after bed size changes
When the bed size changes from big to small, auto arrange items outside
beds, while keeping the inside ones still.
This action can be undoed with ctrl+z.
2. Fix the issue that double clicking the orient button of plate causes
a never disappearing busy cursor.
jira: STUDIO-7978

Change-Id: I5ee1f73b80735777c21438a01cbc4649d8cce3fa
(cherry picked from commit f67fd877ea7b07148dc9539938ba319a4f960d0e)
2024-10-15 15:50:26 +08:00
Arthur 98e9be4eb8 ENH: better way to rotate items in auto arranging
This helps stabilize "auto rotate" and "align to Y axis" functions.

jira: STUDIO-7775, STUDIO-7036
Change-Id: I3c35fa1d6c5e033915584213cdf79f3aac4dc099
2024-10-15 15:50:26 +08:00
Arthur 4542c8eaff FIX: skirt distance was incorrect in auto arranging
Can't use plater->config(),have to use full_config instead.

jira: STUDIO-7588
Change-Id: I1677ff615a7ed99ad439c6bfe3fac9bdf1e3434b
2024-10-15 15:50:26 +08:00
Arthur eb50f3ee58 FIX: auto arranging gets wrong object height
obj->bounding_box().size() is not the real object size if the object has been rotated.

jira: STUDIO-5999
Change-Id: I6553d4c990696efd674e3e57063802127d5d5282
(cherry picked from commit 479ea9fb02f55d24f27c94633f3d852bd5c62c83)
2024-04-08 19:50:03 +08:00
Arthur ceaf008dd4 FIX: auto-aranging can't restart with context button if canceled
jira: STUDIO-6027
Change-Id: Ie87caa205f98a40099c615d89a22000a378bef5c
(cherry picked from commit 03e48ec5d9ac4e93c533390247a6a4a6f4ae31e8)
2024-03-25 15:29:19 +08:00
Arthur bba3d979f1 FIX: auto-arranging unprintable items may crash
github: #3676
Change-Id: I68eb87c73ad2c0c269f60e661136fd1a72ee5e2f
(cherry picked from commit 7e3c57eaa811424935fe8db6a4e77dd142ee2b58)
2024-03-25 15:29:19 +08:00
Arthur 5145f39f57 FIX: low-level NFP bug with auto-arranging
1. FIX low-level NFP bug with auto-arranging due to correctNfpPosition's
  bug.
    jira: STUDIO-5756, STUDIO-4874
2. FIX large items may not be able to be packed due to a too large inflation
    jira: STUDIO-5566, STUDIO-5716
    github: #3194

Change-Id: Id63fb3a5f5fe7ce3a5675c86a3d1440f46866ca3
(cherry picked from commit 9a789262cee4e14f10b673a4f00126d27bcf071b)
2024-03-25 10:42:29 +08:00
Arthur fde4d41821 ENH: improve auto-arranging
1. add a translation
   jira: STUDIO-5758
2. fix by-object arranging failing issue due to wrong exclusion_gap
  jira: STUDIO-5941

Change-Id: Icbdbdf7d8ba91be7f355d31a5f81a9f79356dc7e
(cherry picked from commit eed212e3550cb2256625a6fd09fc3d69d66659c4)
2024-03-25 10:42:29 +08:00
Kunlong Ma 8cba6a3566 FIX: Copywriting updates
JIRA: NONE

Change-Id: I6df034f95b4e6d517c57286dd6f564510b9fa4ab
2024-03-25 10:42:29 +08:00
Arthur 472640c1f1 NEW: add nozzle_height to machine profile and do not detect conflict
Jira: request from 1.9

1. add nozzle_height to machine profile
2. auto arranging and sequential_print_clearance_valid don't consider objects conflicting if they are all shorter than nozzle_height and close.
3. do not detect conflict when all models are short.

Change-Id: I8d1eebb15d5bfa8c40d7491e033149e360531b89
(cherry picked from commit 6b4b52653db5f08d724a556c5c766c0bfa00f34d)
2024-03-25 10:42:29 +08:00
Arthur 6c6934bf81 FIX: crash of "filling bed"
"get_arrange_settings() const" gets trapped in infinite recursive calling.
Now we delete this function.

jira: STUDIO-5688
Change-Id: Ia39974734bb37b2a2f06b5bf78185f01be726872
(cherry picked from commit 631365822319139ae84e8cd8cbad5f10d9a10c4a)
2024-03-25 10:42:29 +08:00
Arthur e98caffab1 FIX: auto arranging skip unprintable high items
Jira: STUDIO-5646
Change-Id: I72dc3d8c71a075bab8204f4418e869a7a34c0c8e
(cherry picked from commit 0afdf8361493485da2254c426719594fd9a982ed)
2024-03-25 10:42:29 +08:00
Arthur f6ea300aa0 FIX: global arrange setting is wrong
global arrange setting is wrong if a plate's setting is changed from object list

jira: STUDIO-5438
Change-Id: Iaa7f35837edbacff9b97ca17a8ab34c8e6bb023d
(cherry picked from commit fa2f56575b2e4305e35dd59ff55e0881720de025)
2024-03-25 10:42:29 +08:00
Arthur da1b9bd747 FIX: do not touch the plate with different printing sequence
jira: STUDIO-5424
Change-Id: I8ad00fa991b753de126a5bef0d320c452033e2e7
(cherry picked from commit c4adfe16e285f238f2c5cd8938b2167fdfb6b1b0)
2024-03-25 10:42:29 +08:00
Arthur e083a155b1 FIX: auto arranging issues with locked plates
1. global auto arranging may put items overlap with wipe tower if some plates are locked
jira: STUDIO-5329
2. items outside bed may overlap with plate boundary if it's rotated
jira: STUDIO-5329
3. plate-wise auto arranging uses wrong min_obj_distance if the
plate is by-layer printing but global setting is by-object printing
jira: STUDIO-5330

Change-Id: I5dba2f1317e183c9aeec1cb2bd227fbddf4316e6
(cherry picked from commit db1eac41efff5f1e8d5ac0af74c6fc7ab59fc253)
2023-11-30 09:51:52 +08:00
Arthur 8d74732348 FIX: auto arrange estimates wrong wipe tower
Jira: STUDIO-4678
Change-Id: Iff2273b464db939a2b5e19f8791bd2a4d67ce8c1
(cherry picked from commit fe4b1f79faeade42300622367fb23d7bd1079785)
2023-11-09 10:09:10 +08:00
Arthur 3d5aa9479c ENH: auto-arranging allows more filaments together
Auto-arranging allows more filaments to be printed on the same plate

Only HighTemp and LowTemp filaments are not allowed on the same plate.

Jira: https://jira.bambooolab.com/browse/STUDIO-4682
Change-Id: I1bd4966e6aaa55a6dd9dff05f0bd94f2795a62b0
(cherry picked from commit 965040912af0555ca190702e7c7ac92e177a2922)
2023-11-01 09:33:21 +08:00
Arthur 590444d92f 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
2023-11-01 09:33:21 +08:00
Arthur 0533537079 ENH: do not include brim_max in bed shrink
Including brim_max in bed shrink will make available area of bed be
small when an object has tree support, because this object will have
a brim_width as large as 24mm now.

Jira: MAK-2048
Change-Id: I309c0ec14e4acd75dcfc2fff0e7ea3558b43cc4c
2023-11-01 09:33:21 +08:00
Arthur 76d073a9ea ENH: improve auto arranging's wipe tower logic
1. If there is already a wipe tower on current plate, leave it there regardless need_wipe_tower flag.
This is useful when we have toolchange custom gcodes.
2. Correct wipe tower pos to prevent it outside bed.

Jira: STUDIO-4426
Change-Id: Iedecc7c5fe7ced01533d0a302253841046a7fb42
(cherry picked from commit e8d728e46b12baaf9fb0e87e3d14197ae3616826)
2023-11-01 09:33:21 +08:00
chunmao.guo 142499871e NEW: add best_object_pos for auto-arranging
For i3 printers, best object position may not be the bed center,
we need to align objects to the specified best_object_pos.

Jira: STUDIO-4133

Change-Id: I06e31e597d2dd8288eb24a52d836cc8a134a4111
2023-11-01 09:11:19 +08:00
manch1n 76dda23702 FIX: add wipe tower for arrangement when timelapse_type is smooth
JIRA: STUDIO-4179

Change-Id: I45056a1b3d7316816b4919cd8185f914d6ad16f4
(cherry picked from commit bad658a228b3697ff1cbdbc45e038641cc5e3e24)
2023-11-01 09:11:19 +08:00
manch1n 2a79af5729 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
(cherry picked from commit 9c549c18ecc1f513644e1bc4a60d6936721a13ac)
2023-11-01 09:11:19 +08:00
lane.wei 9755a65289 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
2023-11-01 09:11:19 +08:00
Arthur e88550b206 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-11-01 09:11:19 +08:00
Kunlong Ma 83e76b6b58 FIX:Fix display issues
Change-Id: I40ec4ac6feb4bfb00d54047466f0a3df568ed88b
2023-07-31 14:29:15 +08:00
Arthur 4e5f4ee366 FIX: FillBed crashes when accessing unset print config option
1. When the option is not set, print.full_print_config() is empty, so we
can't access opt_bool("scan_first_layer") or opt_bool("enable_support").
Should use wxGetApp().preset_bundle->full_config() instead.
Jira: STUDIO-3264
2. Allow different object having different brim_width to encode support's brim width.
In this way the arranging logic is simpler and more objects can be arranged in a plate.

Change-Id: Ic7178652147b0519d50b2eb9ceb214b4ef4c0251
(cherry picked from commit 0f163d59b40009cd29b8b1e32f730258ad0786dc)
2023-07-07 17:29:08 +08:00
manch1n d303e41acc FIX: correct the obj distance of by-object partplate arrangement
STUDIO-3103

Change-Id: I44dd3e8677713bf5427f266ff3c88870fbb4b2f9
(cherry picked from commit aebcba75ba760d31245f9cf336cba72da3521b1a)
2023-07-07 17:29:08 +08:00
manch1n 8714b3e5e5 ENH: arrange partplate objects intersect with plate are also arranged
Jira: STUDIO-2961

Change-Id: I744e99f8bdd95289efa37d1e022b109518befa51
(cherry picked from commit 15bc33d58de118deea93c568ef4e5ffb0370be75)
2023-07-07 17:25:51 +08:00
manch1n 33c69cdb4f FIX: make fill in bed arrange parameters same as normal arrange
Change-Id: Iec9d4e9c145ea75fc06d096e9c6905b3e412940c
2023-07-07 17:25:51 +08:00
manch1n f19c83ce38 ENH: add fill in bed arrangement
Also add an option to add_object_to_list to speedup.

Change-Id: I9860a950fb98b144d831ded11d5911d3aba77ba5
(cherry picked from commit aa9dd9a02ef4ac4cd6987b02b0c9be6d9ce9097f)
2023-07-07 17:25:51 +08:00
Arthur 1a7b12fa38 FIX: auto-arranging result may fail clearance check
We add 0.001mm tolerance.

Change-Id: I630cc680db0a3a65a6a44e177de686fbac1e1f15
(cherry picked from commit 170f9c2a89d03060f9a9aa43952c0759ffbe7c1f)
2023-04-17 15:39:02 +08:00
manch1n f49c151611 FIX: avoid arrange to nonprefered region
Previously we assume the NFP of exclude regions are rectangle, which was
not always right. Now we calculate the NFP and find a best new position
to shift.

Change-Id: I02c075603cf71dd3c9146d7ac7a6706c0f850669
(cherry picked from commit 713ebd666c90d5dcfaf89914c37d211e9a470e99)
2023-04-17 15:39:02 +08:00
manch1n 29459fe4cb FIX: avoid wipe tower conflict with objects
Change-Id: I09f6937a4bb698e4981c094c5694b3ce50efd2b4
(cherry picked from commit 2fc3f05732b8e5c7132b6c8a5f4403d30c516bff)
2023-04-17 15:39:02 +08:00
manch1n dd473bdc3f FIX: avoid wipe tower conflict with objects
Use a more accurate way to estimate wipe tower:
1. read wipe configure from front-end (the positions may be different at
different plates).
2. when depth is unavailable, use all materials to estimate depth (the
estimated wipe tower may be larger than the actual generated one).

Change-Id: I42ffd03d9817b57f5023a6820cda0032509c6fe5
(cherry picked from commit 77ba9757023afb9160c996eeea6ead8a27b50ce4)
2023-04-17 15:39:02 +08:00
miaoxin 3448b7a053 FIX: avoid arrange to outer when quick click autoarrangement in plate.
Change-Id: Ic8fa2f605094c7a3b7fa5a6fe36c5159678c50fd

STUDIO-2202
(cherry picked from commit 641c18c25f5f297234059d463ac12220c4b6fa9f)

Change-Id: Ic452f2fa4357fcacf71f6a70df2c514d2628b217
2023-04-17 15:39:02 +08:00
tao.jin 688084c475 NEW: add print sequence setting to plate
Change-Id: Ic4acb68743442a49dee04702e7a8073b6641bc39
2023-02-22 20:09:17 +08:00