c.lamboo
237d1a899b
Revert "Use absolute transformation to set location for arrange"
...
This reverts commit 920809f064d39f2426312428a02c7db0b3c4410d.
2023-12-06 12:10:34 +01:00
c.lamboo
920809f064
Use absolute transformation to set location for arrange
...
Using relative positioning proved to create issues; when spamming of arrange instructions it was possible to end up in the following time line
1: arrange action a is started
2: arrange action b is started
3: arrange action a finished computation, and applies transformations on the models
4: arrange action b finishes computation and applies relative transformations on top of the previous transformations
By using absolute positioning this issue is resolved
CURA-11279
2023-12-06 11:40:34 +01:00
c.lamboo
0353037b31
Use getWorldPosition
for TranslateOperation
...
CURA-11279
2023-12-06 11:36:54 +01:00
Erwan MATHIEU
9a108dc720
Set explicit parameter name
...
Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
2023-12-05 14:41:15 +01:00
Erwan MATHIEU
68818a525d
Use absolute transform coordinates instead of relative
...
CURA-11279
2023-12-05 13:53:30 +01:00
c.lamboo
053aaad16f
Don't place objects near the boarder in grid arrange
...
CURA-11189
2023-10-20 17:11:40 +02:00
Erwan MATHIEU
1b9ad84115
Improve code readability
...
CURA-10403
2023-10-20 12:05:19 +02:00
Erwan MATHIEU
0d0375d5e0
Retry auto-arrange with a few different strategies
...
CURA-10403
2023-10-19 16:36:19 +02:00
Erwan MATHIEU
1509e27983
Removed unused variable
...
CURA-10403
2023-10-19 16:03:14 +02:00
Erwan MATHIEU
1949d315e3
Minor auto-arrange improvements
...
CURA-10403
2023-10-19 16:02:08 +02:00
c.lamboo
4eb0ba9861
re-add functions for arrange
...
To avoid api break
new functions are added with the depricated decorator
2023-10-10 11:39:06 +02:00
Remco Burema
c20b227e5f
Prevent 'major' API/SDK version break.
2023-10-10 11:15:57 +02:00
c.lamboo
71dc8e22a6
Allow objects to be placed near border
...
Issue before was the following: when placing objects within a grid cell there is a margin around the object. This margin comes from both the integer rounding of the cell and the defined min distance between objects. When trying to place object near the buildplate border we marked any cell that is not fully within the buildplate area as an invalid cell to place objects in. This was however too strict; there is the aforementioned margin around the object, and if only this margin would be outside the buildplate it is perfectly fine to place object in that cell.
CURA-7951
2023-09-06 16:53:02 +02:00
c.lamboo
586739c547
Avoid bool-trap
...
CURA-7951
2023-08-30 13:06:19 +02:00
c.lamboo
afc1ba78f5
Remove debugging utility function
...
CURA-7951
2023-08-30 12:52:27 +02:00
c.lamboo
3e39bbdabd
Typo
...
CURA-7951
2023-08-30 12:51:03 +02:00
c.lamboo
38a5754c6f
Mark method functions as private
...
CURA-7951
2023-08-30 12:47:56 +02:00
c.lamboo
b3b5ffbf55
Put try catch around actual arranging
...
`arrange` is the function that _could_ fail
CURA-7951
2023-08-30 12:45:34 +02:00
c.lamboo
cfc4db00a5
Use descriptive variable name
...
instead of magic number
CURA-7951
2023-08-30 12:41:53 +02:00
saumya.jain
e8c06ec783
grid arrange adjusted for disallowed area
...
CURA-7951
2023-08-24 16:34:34 +02:00
c.lamboo
ac78de1227
Updated comments
...
CURA-7951
2023-08-24 11:55:25 +02:00
Saumya Jain
1e7c975929
Merge branch 'CURA-7951_lock_rotation' into optimal_offset
2023-08-24 11:54:19 +02:00
saumya.jain
1591a2a0c3
ctrl+z for grid
...
CURA-7951
2023-08-24 11:48:43 +02:00
c.lamboo
719b11655c
Fix ctrl+z issues
...
CURA-7951`
2023-08-24 11:24:21 +02:00
c.lamboo
f67a6970dd
Find optimal offset for grid arrange
...
CURA-7951
2023-08-24 08:33:59 +02:00
c.lamboo
668038c59f
Implement factory for Arrange
...
CURA-7951
2023-08-23 17:58:00 +02:00
saumya.jain
118f49a052
review comments fixed
...
Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
CURA-7951
2023-08-23 15:39:23 +02:00
saumya.jain
4096fc864b
grid placement available for elliptical buildplates
...
Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
CURA-7951
2023-08-22 15:06:17 +02:00
saumya.jain
b662da732e
review comments fixed
...
Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
CURA-7951
2023-08-22 11:51:30 +02:00
saumya.jain
7449e2137c
objects placed with an offset to the grid
...
Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
CURA-7951
2023-08-22 11:26:43 +02:00
saumya.jain
2089462cd8
place objects outside grid
...
Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
CURA-7951
2023-08-22 11:16:02 +02:00
saumya.jain
b62725b4f0
copy_paste in a grid
...
arrange all objects in grid
place in grid
Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
CURA-7951
2023-08-22 10:30:51 +02:00
saumya.jain
b91ebcbb36
multiplying objects place them in a grid
...
Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
CURA-7951
2023-08-21 18:51:08 +02:00
saumya.jain
df69ccadb5
Revert "multiplying objects place them in a grid"
...
This reverts commit 209162fbce5dc0e5b2ff934900623691c46df233.
2023-08-21 18:45:40 +02:00
saumya.jain
209162fbce
multiplying objects place them in a grid
...
CURA-7951
2023-08-21 17:31:29 +02:00
c.lamboo
4f9d041ae8
Add rotation lock in arrange and multiply objects
...
Add rotation lock in
- context menu item arrange and
- checkbox in multiply objects dialog
CURA-7951
2023-05-11 16:14:38 +02:00
Remco Burema
6a5a9e70af
Fix whole output of nest2d was translated.
...
By default, the alignment would cause the entire mass of objects to have its center of gravity to be at the origin, including any fixed object. So there was an unwanted 'whole space' translation that we didn't take into account could occur beforehand. Fortunately, there's an option to just set it not to re-translate the whole space. It's unlcear to me how this would've worked in 5.2.2 and prior (and it did ... somehow), since we didn't change anything, including that default, as far as I can see. Anyway, the arrange function can handle 'fixed' objects again (as in loading them in one by one, or loading in a whole bunch of files instead of just 'arrange all').
CURA-10476 -- should fix #14838
2023-05-09 15:44:59 +02:00
digitalfrost
afb90b4b2e
Move initialization of found_solution_for_all
...
Initialize the variable found_solution_for_all with False and
don't set it a the exception block.
2022-08-24 19:52:26 +02:00
digitalfrost
c3833c2ff8
ArrangeObjectsJob.py: Refactor run method
...
arrange from Nest2DArrange will return a boolean so we can simplify
2022-08-18 12:22:07 +02:00
digitalfrost
54b9ed97ae
Use is not operator rather than not ... is
...
This is advocated by both PEP8 and the Google Python Style Guide
2022-08-08 10:04:46 +02:00
digitalfrost
ff07129f2c
Use is not operator rather than not ... is
...
This is advocated by both PEP8 and the Google Python Style Guide
2022-08-08 10:04:46 +02:00
digitalfrost
06e61a3129
Use is not operator rather than not ... is
...
This is advocated by both PEP8 and the Google Python Style Guide
2022-08-08 10:04:46 +02:00
Jaime van Kessel
e925f07aad
Remove old arranger code
...
Major vesion upgrade, time to clean some stuff up!
CURA-7810
2022-03-24 13:37:29 +01:00
Ghostkeeper
652043e1d8
Cast bounding box to ints
...
The version of Sip we're using now cares about this more than the previous one, apparently.
Contributes to issue CURA-8592.
2022-01-03 17:32:33 +01:00
Ghostkeeper
d6f8984cf0
Use integer positions for fixed items too
...
Pynest2d requires it. It seems the SIP version we're using is lenient for this, but newer SIP versions are not.
Fixes #10801 .
2021-11-18 11:44:09 +01:00
Jaime van Kessel
61c43fb765
Only show "can't find location message" when it couldn't find location
...
Bit of a silly mistake, but easy enough to fix!
CURA-8649
2021-10-28 13:53:52 +02:00
Konstantinos Karmas
e793eac425
Push the grouped operation instead of redoing it
...
CURA-7851
2021-10-06 16:46:20 +02:00
Jaime van Kessel
96d381a895
Apply suggestions from code review
...
CURA-7851
Co-authored-by: Konstantinos Karmas <konskarm@gmail.com>
2021-10-06 15:45:07 +02:00
Jaime van Kessel
44eb3201a9
Fix duplicating / multiplicating support blockers
...
CURA-7851
2021-10-04 15:52:08 +02:00
jelle Spijker
b6665f1142
Applied review comments
...
Contributes to CURA-8418
2021-07-28 11:32:29 +02:00