Commit Graph

30 Commits

Author SHA1 Message Date
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
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 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 156f390eea FIX: don't rotate an object if it can't fit
even if "align to Y axis" is on.

github: #5794
Change-Id: I460003588a98aa9ff52fde1dc609d1ed54ea72c8
2025-03-23 20:31:59 +08:00
Arthur b1844cc2a2 FIX: tree support may miss contact points along overhang contours
We use EdgeCache to sample contact points along overhang contours.
However, the EdgeCache misses the last edge if the polygon is not closed.

jira: STUDIO-9179
Change-Id: Id06b565b12f513e753a66135c74eab60979ea612
2025-01-09 19:32:26 +08:00
Arthur f3e5af114b FIX: auto arrange crashes with a single triangle
convexHull of a triangle should be valid.

jira: STUDIO-8297
Change-Id: Icb4b2310c173f88f2b499c8407d79ff00850dc77
2024-10-15 15:50:26 +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 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 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 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 8bb63ebeaf FIX: auto-arranging crash for single plate arranging
Jira: STUDIO-4651

Change-Id: I8e4be997292d7f7dbd741368e20db5a0d2e693cb
(cherry picked from commit 7d75f5903f67fb332eaff4563308d5f196e45d1f)
2023-11-01 09:33:21 +08:00
Arthur 3f1e15995f FIX: auto-arranging made objects overlap with occluded region
finalAlign was not correct because the excluded regions are counted twice.

Jira: STUDIO-4259
Change-Id: Ie4ad167af8487ce7250b83d85f144ef01e60e00f
(cherry picked from commit 154de0d94ff34231a60966fb89cc14655cce8008)
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 4db1a6d46e ENH: allow big obj arrange into bed with calibration region
Change-Id: I4dac878e0c5ec75a4b06dd5803c0a4839f312bfe
(cherry picked from commit b216a5f4ae97b29eb5ba0c2b5de3b12da80f374d)
2023-07-07 17:25:51 +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 229b173894 FIX: arrangement crash due to mutithread call to transformedShape
STUDIO-2653

Change-Id: I82031d3adbd95f8af04cb5f15b39d0621a40c7f3
(cherry picked from commit 065575c4845688ecb6293fa826e5f987f019d9fb)
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
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
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 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 c9e8ef3f93 FIX: fix two tree support bugs
1. hybrid(auto) on_buildplate_only option not working correctly because
parent is not set.
2. tree(auto) on_buildplate_only not working correctly because unsupported
branch isn't deleted completely. I add child to track the dangling nodes
and then delete nodes with no child.

Change-Id: I24c69a7cf400d2961b22a720a6069cf95db6c1a5
(cherry picked from commit bce77c16128d35c668b175e7135b9fe9acd71d13)
2022-10-09 10:37:45 +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 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