Commit Graph

50 Commits

Author SHA1 Message Date
Arthur 2fbde46b4d ENH: improve align_to_Y_axis of A1 series printers
only rotate the object if its long axis is significanly larger than its short axis (more than 10%)

jira: none
Change-Id: I63fede8a55f8dc82f4388e630d58b2e62f7922b2
2025-03-23 20:31:26 +08:00
Arthur ac4873d976 ENH: improve auto arranging of multiple single color objects
If two objects have similar area, sort them by extruder id.

jira: STUDIO-9760
github: #5738
Change-Id: I6041fef4d3bfccce767555ac382688eea59e73c7
2025-03-23 20:26:19 +08:00
Arthur 499b39b133 FIX: auto arranging gets collision with occlusion areas
jira: STUDIO-6645
Change-Id: I57e62b824e3faadf9fae1294ef329456055893d0
(cherry picked from commit a678094ffa3d6b8b7900f3e3cac0d3f18fed9f30)
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 afd647d764 ENH: improve auto arranging of multi-color and multi-heights objects
1. Compute score_all_plates correctly. Previously we only compute the
   first j plates which was wrong.
2. Compute height score correctly. Use average height difference instead of sum.
3. Compute color change score in a different way. If adding the current item
   increases extruder number, then adds up the score by 1.

jira: STUDIO-7013
Change-Id: I921c181bd4b32080627514d3834f4b74ccd00adb
(cherry picked from commit 4f6ae81be98109fe61d55203e306686e0d294ec4)
2024-05-13 09:20:46 +08:00
Arthur 96e2147394 FIX: handle exception of dividing by zero in arranging
jira: none
Change-Id: I0d20464dbe81a80293539100f06d72dee456a27b
(cherry picked from commit 94746ae9bf7f467243849570450567b4fdc78e3a)
2024-05-13 09:20:46 +08:00
Arthur d175c3d3c9 ENH: pack objects with similar heights together in auto arranging
1. improve sorting logic by packing higher objects first, so objects with similar heights can be packed together.
2. remove the logic of arranging around wipe tower.
This logic is no longer useful, and it makes auto arranging density low.

jira: none

Change-Id: I3458ad8702cece29c6853f990497dbcc45365537
(cherry picked from commit bbb72c833324a8cddaab1891693c5c9e1cdedc9b)
2024-05-13 09:20:46 +08:00
Arthur a14a8d9c8f FIX: auto-arranging incorrect with rotation enabled
auto-arranging incorrect with rotation enabled and the objects already have been rotated.

jira: STUDIO-6022
Change-Id: I349d663efb1fc71367c8a77aa8ed5047a0bf2017
(cherry picked from commit 75fe40257a274ed83886e1ee20ce8dedd0de48f6)
2024-04-23 20:07:49 +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
Arthur 249ee5b766 ENH: improve auto arranging with multi colors
Improve sortfunc: single color objects first, then objects with more colors

jira: none
Change-Id: I06945d85206331121a26efd3ea8fcc575a183005
2024-03-25 10:42:29 +08:00
Arthur 3ef065a4ed FIX: auto arranging short objects gives overlapping results
jira: STUDIO-5778
Change-Id: I6761875d653fbed1beadd6480d37b97f71dfdf24
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
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
Arthur 82d5935a5e FIX: align to Y not working
This is a bug introduced in 7fbb650 when solving jira STUDIO-4695.
Now we use a more decent way to solve it.

Change-Id: I92deffcb9fe53e8a24c93fe973446ae37df07375
(cherry picked from commit bd98430dbd15eb6c9bb4b447990e0dcf8a50eef0)
2023-11-22 08:23:38 +08:00
Arthur af1af05a98 ENH: auto arranging put rectangle objects better
1. Rectangle objects get higher alignment weights, so they are aligned
better and we can now pack more of them.
Jira: https://jira.bambooolab.com/browse/STUDIO-4790

2. Fix the bug that align to Y axis may cause object flip 180 degrees.
Jira: https://jira.bambooolab.com/browse/STUDIO-4695

Change-Id: I0cccc3291c154848f8e0e8ef1aca7045518aef80
(cherry picked from commit 7fbb650d4d3d187277f849273cf76b4d0989a67f)
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 2bd8a0806b FIX: exclusion region may be too close
Auto arranging may put exclusion region may be too close.
Jira: none

Change-Id: I613a2525620cf58cd9da7d27e8bb6d9d0a52d807
(cherry picked from commit a8ed3929d3596b8ee5400c9376ca040c75025524)
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 14a3b244a0 FIX: cmd line auto arrage for sequential printing not working
min_obj_disance was not set for sequential printing of cmd line.

Jira: None

Change-Id: Idce14aedf8448a0917533efb93f7c78fff34587d
2023-11-01 09:33:21 +08:00
Arthur 2bd6b11505 ENH: improve auto-arranging objects with tree support
We decide to set brim width of all objects to MAX_BRANCH_RADIUS_FIRST_LAYER if there is an object with tree support after discussion.

Jira: MAK-2009
Change-Id: I4c4940800632c433235966b01c44ac910e33a51c
2023-11-01 09:33:21 +08:00
shuai.liu a939c6e434 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 771efc935da625d8faa4cc5b77fedc5055f93c6c)
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
Arthur 3c691ac086 ENH: improve auto-arranging's aligning to Y axis
Dominant direction is more accurate (solve the problem that cubes are
not arranged neatly).

Jira: STUDIO-4356

Change-Id: I8931f51a97bee96d5d9e75306481eae2e0cdc059
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 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
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
Arthur 9ad9ba213a FIX: fill in bed may shift objects outside bed
Do not do final align for filling in bed.

Jira: STUDIO-3265
Change-Id: I2ce2ebed575ba05b1d78ec89923f8e91c4de6648
(cherry picked from commit 581aa4fd0ff1c6f64026d7b934d4bd8a79b803ae)
2023-07-07 17:29:08 +08:00
Arthur 826f27089e ENH: improve multi-material arranging
Multi-material arranging is more compact by redefining same_color_with_previous_items:
if the colors of previous items are a subset of current object's colors, or vice versa.
Either of the two cases will not increase the total number of colors of the plate.

Jira: STUDIO-2871
Change-Id: I7cbe0835408d306084490b4849d03bb9fb617d2b
(cherry picked from commit d58702e9c0db54bcd123739298ce6dc03f5ca1a5)
2023-07-07 17:25:51 +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
manch1n 62a2fadeb8 ENH: make arrangement align better
Jira: STUDIO-2584, STUDIO-2507

Change-Id: I1987103e46f5ecb84395b5885954679ffe105c60
(cherry picked from commit 90df278408b79ad5b8d4ceaf90fe483cd8f5a48c)
2023-04-17 15:39:02 +08:00
manch1n 797c211203 ENH:allow more same color objects arrange together
Change-Id: I87a9de3c5ed540c87fdebfe4e69ffa539d78ce40

STUDIO-2462

STUDIO-2463
2023-04-17 15:39:02 +08:00
Arthur 59f7c4595c FIX: arranging multi-color objects not correct
Arranging multi-color objects with disabled
multi_materials_on_same_plate option was not currect.

Previously we only consider the first extruder id for multi-color
objects. Now we consider all extruders.

Jira: STUDIO-2164
Change-Id: If64ff4f88f0fe4f6c31ebf657b3449b19bf063f0
(cherry picked from commit f4f6bdd00a0c3d3e13406b69be9b5b0468b27d44)
2023-02-22 20:09:17 +08:00
Arthur 7596b3fed9 ENH: improve auto arranging and by-object printing
1. In auto arranging bed temp can be higher than vitrify temp by no more than 15 degrees.
2. In by-object printing we use max radius for clearance
3. Add P1P max radius

Change-Id: If595f3e19fd74f6f36d2f394edbb835c413cc800
(cherry picked from commit 2af42420ad3770f0728adb583082600544519a58)
2022-12-26 05:31:54 -05:00
miaoxin f84402bc0e FIX: dont arrange when bed temp is greater than object's vitrify temp
Add large cost when bed temp is greater than object's vitrify temp
STUDIO-1623
Change-Id: Ib73d312fce7b80999f11d1f6c172a9c1575937b4
(cherry picked from commit aed896d44776c9cd2fd55202420a3811bc117896)
2022-12-15 04:38:15 -05:00
miaoxin 9857f7384b ENH: auto-arrange uses inner NFP to simplify fixed_overfit
1. Add inner nfp algo.The final nfp result is inner nfp subtract outer nfp.
2. Leave 5(scaled) room in inflation to allow numeric float eps.

Change-Id: I6be0b205c9811af24a238352b256bf1399ee3716
(cherry picked from commit dbab96efc7bfa16afd9db9607b862886606b0aa0)
2022-12-15 04:38:15 -05:00
Arthur 4eba8a2a2d FIX: auto-arrange may crash due to clipper
1. Use nlopt and clipper offset togather seems not stable, very easy to
crash. We do the offset outside nlopt now.
2. Fix a bug with finalAlign where objects may be translated to overlap
   with excluded region.
3. change the words of support_expansion

Change-Id: I22e37b20e4ae16f47bde206de90845616e4cefad
(cherry picked from commit 1c26e5d2862fd3f3292971b5c749420bfb2cdf0e)
2022-12-15 04:38:15 -05:00
Arthur f6fed97b9d FIX: auto-arrange unable to arrage a large number of small items
1. Should start from bottom left if there is excluded regions
2. avoid exclusion regions in fixed_overfit_topright_sliding

Jira: STUDIO-1422

Change-Id: If88ecf86a0485bd478a77df8cfd4942df8ca27ac
(cherry picked from commit a8393de51bd178b731ef4c7201a5fe3247d97a1f)
2022-12-15 04:38:15 -05:00
Arthur 869b93e270 ENH: improve auto-arrange compactness around wipe tower
1. improve auto-arrange compactness around wipe tower
2. do not show "Avoid extrusion calibration region" for P1P
3. encourage objects with similar height to be arranged together

Jira: STUDIO-1364

Change-Id: I5efa61a676c453618cdb3915fb98928d07138deb
(cherry picked from commit 571ee0c6d91d8a5f6a60838052f09d49d85f12ed)
2022-12-15 04:38:15 -05:00
Arthur 9f96c8adec FIX: auto-arrange ignores wipe tower due to supports
Wipe tower is needed if support base and interface use different materials.
Jira: STUDIO-1336

Change-Id: I006ece952aac1a0f0a57721c2cd1b52b2ceee28a
(cherry picked from commit 1a387e4b1607dee36f5abe499892f027e244fbeb)
2022-12-15 04:38:15 -05:00
miaoxin 12206e59b4 ENH: auto-arrange handles 4*4 alignment better
I improve the cost function to align big item better.

JIRA: https://jira.bambooolab.com/browse/STUDIO-1221

Change-Id: Id5a16c127ec51bf7463e331058cb1a8f78b764ca
(cherry picked from commit 39773a901df82081c7d9d089807a52aa09e6a498)
2022-12-15 04:33:48 -05:00
Arthur 5fa771c6cb ENH: improve auto-arrange in several ways
1. reduce expansion of exclusion regions
2. expand extrusion calib regions to let them touch bed boundary, to
   greately simplify auto-arranging with avoidance option on
3. improve dist_for_BOTTOM_LEFT to allow objects be put left to
    exclusion regions temporarily
4. improve on_preload for better handling objects around exclusion regions.
5. improve debug tools
6. fix a bug with wipe tower estimation (don't estimate if wipe tower is
    explicitly disabled)
7. use larger y-overlap threshold to estimate rod height confliction
   better in per-object print ordering (now we use half the clearance
   radius)

Change-Id: Iab29d47a072d8515f28a09855432f92fcffa8c5f
(cherry picked from commit 3a4f242a3a6fd2f82dcc8306cde4d1cb107a5099)
2022-12-15 04:33:48 -05:00
Arthur 8dd401d35f FIX: auto-arrange reads wrongs first_bed_temp
Also change words for extruder clearance parameters.

Change-Id: I736fd9049d184c140b33078d78f764b4fe172765
(cherry picked from commit e70c0c0ea133cffa5788efbfc9633332b196e8df)
2022-11-01 20:52:23 +08:00
arthur 35d6e048ff FIX: auto-arrange fails in several cases
Jira: STUDIO-644, STUDIO-661

Change-Id: I3cd1fcd4e1fabf9a401c9fd536e8f55592775fbd
2022-09-02 12:52:18 +08:00
Arthur d95e85851c FIX: auto-arrange fails for multi-color objects
The cost for switching extruders was too big.

Change-Id: Ic9de6b6aabb7e69db79a0201f0dbb9d039097df9
2022-08-26 09:25:59 +08:00
Arthur 06f878f13b FIX: auto-arrange may fail for sequentially printing tall objects
1. fix sequential printing tall objects. Now the print order is not determined by auto-arrange,
so wee need to add a new rule: lower objects should not exceed height_to_rod.
2. sequential printing is better centered.

Change-Id: Ic320722654f0335d2589060fa14c71a5aaa3f571
2022-08-26 09:25:59 +08:00
Arthur 07ae246e5f ENH: disable arranging selected items
0. disable arranging selected
1. fix bug where brim is not correct.
2. fix bug where big circle objects are not arranged properly
3. disable default enable_rotation

Change-Id: Ifc69f35d900ff63ec1e9ec8bf8638afc6ea7d54b
(cherry picked from commit 2ed1b0dd8573a1e10aaf77f0d9f8896cef304427)
2022-08-05 16:11:42 +08:00
lane.wei 1555904bef Add the full source of BambuStudio
using version 1.0.10
2022-07-15 23:42:08 +08:00