Commit Graph

36 Commits

Author SHA1 Message Date
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