Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to change printing order #3555

Closed
1 of 2 tasks
HakunMatat4 opened this issue Jan 8, 2024 · 26 comments · Fixed by #3685
Closed
1 of 2 tasks

Unable to change printing order #3555

HakunMatat4 opened this issue Jan 8, 2024 · 26 comments · Fixed by #3685
Labels
bug Something isn't working

Comments

@HakunMatat4
Copy link

OrcaSlicer Version

Any

OS version

Linux Mint Cinnamon

Additional system information

No response

Printer

Voron Trident

How to reproduce

  1. Add multiple objects to the plate
  2. Try to have them printed the order you need

Actual results

As much I love OrcaSlicer, this has to be worst object management ever.
We have talked about this on Discord a bunch of time but nothing was done about it.

As you are looking at it, any 3D printer I am aware of, will move the head from the left to right where is usually the purge line is printed.
With that being said, it should start printing like so, from the left to the right, from the front towards the back.
Basic logic right?!?

Here you have the normal behaviour

1

A slightly change and there goes the toolhead traveling across the bed to start the print.

2

And again.

3

That data isn't helpful enough???
Sure...
What logic is this???

It is so frustrating because this is such a basic must have logic but doesn't seem to be relevant.
Nobody is talking about print by object, save that nonsense.
You have to waste minutes trying to move things around to get a somewhat decent sequence.

The object list and nothing is the same, it does not work, you cannot interact with it, not like PrusaSlicer does.
You don't have to have print by object enabled on PrusaSlicer to allow the order to be changed.

I cannot get the sequence right with a full plate like this no matter what I try.

4

Expected results

Follow the common logic sequence, from the left to the right, from the front towards the back.
You avoid a 260c nozzle traveling all the way to the back to start a print which usually ends up with curling line at the start and messed up first layer.

Users with the "print by object nonsense", please, press "Alt + F4"
Thank you

Project file & Debug log uploads

This can be simulated with anything, it does not require user log.

Checklist of files to include

  • Log file
  • Project file
@HakunMatat4 HakunMatat4 added the bug Something isn't working label Jan 8, 2024
@Noisyfox
Copy link
Collaborator

Noisyfox commented Jan 8, 2024

I know what you are trying to achieve. I just want to point out that
prusa3d/PrusaSlicer#5175
supermerill/SuperSlicer#3033
and things like
https://forum.prusa3d.com/forum/prusaslicer/print-order/

Though I definitely agree be able to have a predicable/adjustable print sequence can be very useful.

@HakunMatat4
Copy link
Author

I know what you are trying to achieve. I just want to point out that prusa3d/PrusaSlicer#5175 supermerill/SuperSlicer#3033 and things like https://forum.prusa3d.com/forum/prusaslicer/print-order/

Though I definitely agree be able to have a predicable/adjustable print sequence can be very useful.

Holy smokes, 2020?? oO

But ironically, I never encountered problem with PrusaSlicer, it allows me to change the sequence.
Sure, it is a manual process but it used to work just fine, OrcaSlicer does not even allow you to do that and you can very barely change the sequence when printing by object which again, you need to move things around and I have had many close calls because the travel was not what I had planned and avoided a toolhead crash.

Just to make sure I am not dreaming, I just tried and like always, printing by layer follows the sequence I need it to follow.
Sometimes it does have a mind of its own so I am guessing it is the bug you mentioned, but works 99% of the time
If OrcaSlicer had similar behavior with the bug included it would be so much better than it is atm, it does't work at all.

Thanks man

Peek 2024-01-08 20-52

@tlhintoq
Copy link

tlhintoq commented Jan 8, 2024

Cura behaves as: First in, last out.
Orca (so far to me) behaves as First in , first out.

So... Seems pretty natural (to me) to import and place parts in the order you want them to print.
If you want left to right, front to back, then import and place them in that order.

@HakunMatat4
Copy link
Author

Cura behaves as: First in, last out.
Orca (so far to me) behaves as First in , first out.

So... Seems pretty natural (to me) to import and place parts in the order you want them to print.
If you want left to right, front to back, then import and place them in that order.

Oh believe me, I've tried that but it somewhat works now and don't work anymore onwards.
It's frustrating fighting the slicer to keep an order that makes sense.

@Noisyfox
Copy link
Collaborator

I am working on improving the print order when it is turn off, and I just need to confirm that does the order of the object list ALWAYS work as expected WHEN "Print py object" is turned ON? Or it is also broken? I need to make things clear so I could know whether I need to fix both.

@Noisyfox
Copy link
Collaborator

Noisyfox commented Jan 14, 2024

BTW, I've checked the code and it uses a nearest neighbor search in print by layer mode. It takes the original order from the object list, then try to reorder it to find a shorter path, that's why the object list order works when there are only two objects on the plate, then it works seemingly randomly when there are more than 2.

Meanwhile according to the code, it uses the same order as the object list in print by object mode, unless there is a bug in that part that makes it not always work. That's the reason of my previous comment: if it works as expected, then I don't need to touch that part of the code.

@Noisyfox
Copy link
Collaborator

And a bit more explaination of current code:

std::vector<const PrintInstance*> chain_print_object_instances(const std::vector<const PrintObject*>& print_objects, const Point* start_near)
{
// Order objects using a nearest neighbor search.
Points object_reference_points;
std::vector<std::pair<size_t, size_t>> instances;
for (size_t i = 0; i < print_objects.size(); ++i) {
const PrintObject& object = *print_objects[i];
for (size_t j = 0; j < object.instances().size(); ++j) {
// Sliced PrintObjects are centered, object.instances()[j].shift is the center of the PrintObject in G-code coordinates.
object_reference_points.emplace_back(object.instances()[j].shift);
instances.emplace_back(i, j);
}
}
auto segment_end_point = [&object_reference_points](size_t idx, bool /* first_point */) -> const Point& { return object_reference_points[idx]; };
std::vector<std::pair<size_t, bool>> ordered = chain_segments_greedy<Point, decltype(segment_end_point)>(segment_end_point, instances.size(), start_near);
std::vector<const PrintInstance*> out;
out.reserve(instances.size());
for (auto& segment_and_reversal : ordered) {
const std::pair<size_t, size_t>& inst = instances[segment_and_reversal.first];
out.emplace_back(&print_objects[inst.first]->instances()[inst.second]);
}
return out;
}

It uses the center of each object to calculate the shortest path.

@Noisyfox
Copy link
Collaborator

Noisyfox commented Jan 14, 2024

My current plan is to adding a "print order" (or whatever sounds better) option, that has the following options:

  • Default, which keeps the current shortest path sort
  • As object list, which uses the exact order as the object list
  • (tbd) Top-bottom,left-right (ie, by column)
  • (tbd) Left-right, top-bottom (ie, by row)
  • (tbd) maybe diagonally?

I'll first implement the first two options, then consider adding pre-defined orders. The way each object fits into rows/columns will be tricky though.

@HakunMatat4
Copy link
Author

My current plan is to adding a "print order" (or whatever sounds better) option, that has the following options:

  • Default, which keeps the current shortest path sort
  • As object list, which uses the exact order as the object list
  • (tbd) Top-bottom,left-right (ie, by column)
  • (tbd) Left-right, top-bottom (ie, by row)
  • (tbd) maybe diagonally?

I'll first implement the first two options, then consider adding pre-defined orders. The way each object fits into rows/columns will be tricky though.

Thank you so much for looking into this, it has been so frustrating.
I am printing ASA like non-stop, by the time the 260c nozzle reach those places using the first layer speeds, you have curled oozing which often ends up as terrible first layer.

The first two options should solve all the problems, shortest path after the purge line which is usually at the very front, front corner or those using adaptive mesh can have the purge to be right next to the model.

The second option, it would be awesome to rather than just follow the object list, to allow the users to interact with it like what somewhat happens with "print by object". You might wanna start from a less risk bigger model over a small one which might not be in order so you need to move it up/down.
I understand that the logic might not be as straightforward but if Orca follows the list order, in the worst case scenario you need to conscientiously add the models following the printing sequence you wanna and we are good.

image

@Noisyfox
Copy link
Collaborator

in the worst case scenario you need to conscientiously add the models following the printing sequence you wanna and we are good.

I'll allow reordering the object list in print by layer mode so that's not a problem at all (in fact that's the first thing I did so far).

shortest path after the purge line

Ah that's a good point... Currently the purge line is not treated as an object so its location won't be considered at all when calculating the print order. Will see if I could solve this. Worst case scenario we could use the order of the object list though.

@HakunMatat4
Copy link
Author

in the worst case scenario you need to conscientiously add the models following the printing sequence you wanna and we are good.

I'll allow reordering the object list in print by layer mode so that's not a problem at all (in fact that's the first thing I did so far).

shortest path after the purge line

Ah that's a good point... Currently the purge line is not treated as an object so its location won't be considered at all when calculating the print order. Will see if I could solve this. Worst case scenario we could use the order of the object list though.

100%, whatever you think is easier to implement will be already better than currently, it is painful.
Thanks again for looking into this.

@Noisyfox
Copy link
Collaborator

Please give #3685 a try and see if it works for you.

@HakunMatat4
Copy link
Author

Please give #3685 a try and see if it works for you.

1AM now, can try tomorrow after COB 🥲
Hopefully somebody can try before that
Thanks man 🙏

@tlhintoq
Copy link

Please give #3685 a try and see if it works for you.

1AM now, can try tomorrow after COB 🥲 Hopefully somebody can try before that Thanks man 🙏

0015hrs - Waiting for the actions to complete - Still has 4 spinny wheels

@HakunMatat4
Copy link
Author

Please give #3685 a try and see if it works for you.

Unless I am doing something wrong, it is not following the object list, in fact, it is doing the opposite order, bottom/center/top
I even moved the far right one a little towards the back in case the logic is using front/back but nope.

Peek 2024-01-17 18-09

@Noisyfox
Copy link
Collaborator

Please give #3685 a try and see if it works for you.

Unless I am doing something wrong, it is not following the object list, in fact, it is doing the opposite order, bottom/center/top I even moved the far right one a little towards the back in case the logic is using front/back but nope.

Peek 2024-01-17 18-09 Peek 2024-01-17 18-09

Could you post the project file?

@HakunMatat4
Copy link
Author

@Noisyfox , please let me know if you can open it.
Thank you

project_3555.zip

@Noisyfox
Copy link
Collaborator

@Noisyfox , please let me know if you can open it. Thank you

project_3555.zip

image
It seems that you did not set this option to "As object list"

@HakunMatat4
Copy link
Author

@Noisyfox , please let me know if you can open it. Thank you

project_3555.zip

image
It seems that you did not set this option to "As object list"

I think there's a misunderstanding lol
Isn't this PR changes aimed to fix the chaotic order when printing by layer??

By object isn't perfect but works, the problem is by layer, if follows no sequence at all.

@Noisyfox
Copy link
Collaborator

Noisyfox commented Jan 17, 2024

@Noisyfox , please let me know if you can open it. Thank you
project_3555.zip

image
It seems that you did not set this option to "As object list"

I think there's a misunderstanding lol Isn't this PR changes aimed to fix the chaotic order when printing by layer??

By object isn't perfect but works, the problem is by layer, if follows no sequence at all.

No no no, this is a separate option called "Layer order", which is "the print order within each layer". Though I do think I need a better naming for this option... Any suggestion?

@HakunMatat4
Copy link
Author

@Noisyfox , please let me know if you can open it. Thank you
project_3555.zip

image
It seems that you did not set this option to "As object list"

I think there's a misunderstanding lol Isn't this PR changes aimed to fix the chaotic order when printing by layer??
By object isn't perfect but works, the problem is by layer, if follows no sequence at all.

No no no, this is a separate option called "Layer order", which is "the print order within each layer". Though I do think I need a better naming for this option... Any suggestion?

Of course, it has to be user doing user stuff lol
Just sent a print and it works lovely, it was a 2 print object and it does follow the list order.
Legend <3

@HakunMatat4
Copy link
Author

EDIT: "Layer order" sounds about it, perhaps add more context to its description when hovering the mouse.
Any slicer already have by layer/by object, layer order sounds just about right to me of course.

@HakunMatat4
Copy link
Author

@Noisyfox I would hug you if I could ❤️

Hopefully @SoftFever can merge your changes then we have everything we need, a gold printing order and igianna changes ( already merged) to reduce extra non-necessary solid infill.
I am closing this ticket.

Thank you so much again for this beautiful work, and I should had built a bigger printer, 300mm is no longer enough haha

No more fights with Orca 🙏

Peek 2024-01-19 17-16

@dcchillin46
Copy link

@Noisyfox , please let me know if you can open it. Thank you
project_3555.zip

image
It seems that you did not set this option to "As object list"

I think there's a misunderstanding lol Isn't this PR changes aimed to fix the chaotic order when printing by layer??
By object isn't perfect but works, the problem is by layer, if follows no sequence at all.

No no no, this is a separate option called "Layer order", which is "the print order within each layer". Though I do think I need a better naming for this option... Any suggestion?

i just happened to have a need for this and found it merged into the nightly orca build. i have about 50 objects on my plate and it seemed to get the order correct.

if youre still searching for name suggestions i would say "Intra-Layer Order" is pretty descriptive, "Layer Order" is a bit ambiguous. just my 2cents

great work, thanks again!

@Noisyfox
Copy link
Collaborator

@Noisyfox , please let me know if you can open it. Thank you
project_3555.zip

image
It seems that you did not set this option to "As object list"

I think there's a misunderstanding lol Isn't this PR changes aimed to fix the chaotic order when printing by layer??
By object isn't perfect but works, the problem is by layer, if follows no sequence at all.

No no no, this is a separate option called "Layer order", which is "the print order within each layer". Though I do think I need a better naming for this option... Any suggestion?

i just happened to have a need for this and found it merged into the nightly orca build. i have about 50 objects on my plate and it seemed to get the order correct.

if youre still searching for name suggestions i would say "Intra-Layer Order" is pretty descriptive, "Layer Order" is a bit ambiguous. just my 2cents

great work, thanks again!

I'm not a native English speaker but "Intra-Layer Order" sounds just about right to me. Thanks!

@NevesLF
Copy link

NevesLF commented Sep 12, 2024

Hey, could we have a quick way to number each individual object on the plate when we clone them? It's great that we can set the print order by the object list, but when you have 100+ cloned objects with the same name, it's a pain to manually order them.

Maybe change it to a "1- Object"; "2- Object" etc. naming scheme in the object list when we clone it would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants