slic3r / Slic3r

Open Source toolpath generator for 3D printers
https://slic3r.org/
GNU Affero General Public License v3.0
3.33k stars 1.3k forks source link

Cut feature ignores no auto align preferences. #4894

Open DocTrucker opened 4 years ago

DocTrucker commented 4 years ago

Describe the bug Parts are moved after cutting despite all auto align preferences being disabled.

To Reproduce "File" menu > "Preferences" > Deselect "Auto-centre parts (x,y):" & "Auto-align parts (z=0):"

191125_Preferences

Click ok to clear popup. Load benchy Left click to select, right click to raise menu. > "Cut" Keep upper and lower part, cut level at 24mm.

191125_CutWindow

Click perform cut

191125_Result

Parts have been moved, rather than maintained original position.

Expected behavior Cut parts retain original locations until explicitly moved or re-centred.

Screenshots See screeenshots.

Desktop (please complete the following information): Slic3r Version: 1.3.1-dev Slic3r Build Commit: 4f5b935 Ubuntu 18.04.

Additional context N/A

191125_Slic3r_Bug3.zip

supermerill commented 4 years ago

That's not as easy as it is. Cut is made to print a difficult piece that will be glue afterward. Cutting is a bit like creating a new 3D model, and its center should be on the same spot. How this new models (in fact, there are 2 model in 2 different parts) should be created is decorrelated from the "auto align" preference.

DocTrucker commented 4 years ago

I don't follow your post there.

I'm looking to perform a cut and leave the parts in the original orientation. I have de-selected all auto align features, so don't expect anything to move after the cut. Moving the parts after the cut is afterall an additional operation?

supermerill commented 4 years ago

a cut is an operation that destroy the mesh and create two new meshes. Theirs center isn't the center of the old one. It's impossible to "not move" because it's not a move but a destroy & create.

DocTrucker commented 4 years ago

Are you sure?

Mesh data is usually relative to a specific point. Ok, you need to subdivide all triangles that intersect the defined plane and create new ones to fill the missing face, but in carrying out that operation the two halves would remain in the same place?

This doesn't appear to match what is happening in the screenshots either.

If there was some sort of movement of all the vertex data to be relative to the same space the two meshes would lie in the same space, not have the top half neatly shifted down (-y axis move) a little bit and the neatly re-aligned to z=0?

supermerill commented 4 years ago

can you do just a little test to prove me i'm wrong?

add 2 object in the platter move the first object to the right side move the second object to the left side cut the second object Does it re-arrange everything?

DocTrucker commented 4 years ago

I will do exactly what you were asking but was halfway through doing something else first. I'm fairly sure it is doing a (normally helpful) move to avoid the two parts existing in the same place so...

Load box: 191125_c2_box_crtl0

Cut Settings: 191125_c2_box_cutwindow

Cut Result 191125_c2_box_cutresult

It may just be that it is doing an align on the two new parts rather than the whole bed. Ok, working on what you request...

DocTrucker commented 4 years ago

Definately appears to be an uninvited "Align" operation creeping in. My second part was another box but measuring 50x50mm. Cut plane was z=10.

Pre-cut layout: 191125_c3_00_box_positions

Cut window: 191125_c3_01_CutWindow

Result (top view): 191125_c3_02_Result

Result (Diagonal view): 191125_c3_03_Result_ctrl0

DocTrucker commented 4 years ago

Following on from a reply in a related bug report ( https://github.com/slic3r/Slic3r/issues/4895 ) I can see that the object model is intended to allow parts to be aligned relative to each other and be moved about the build platform in one lump. Nice. However it doesn't solve what I perceive as a bug that prevents me using the cut feature in Slic3r.

In this next work I have created a FreeCAD file with two objects that together form the 10x10x10mm cube. Meshed and exported them in FreeCAD, then load them and I get the following as intended (highlight on the lower part for clarity):

191125_c4_00_LoadedPreSplitCAD

Following on the comments about the object model in Slic3r I can load the lower part, then go through the settings pop up and load the second. Now the two parts can be moved as one. Nice:

191125_c4_01_LoadedIntoObject

But now I try to cut the block as before export each half as STL, delete all, load one, then open the settings menu and try to load the second. The Cut operation has clearly destroyed the information relating to the alignment of the two blocks.

191125_c4_02_SplitInSlic3rLoadedIntoObject

It is appears to me that there is a 'convenience' align operation occurring here that according to my preference settings should not be occurring.

I suggest the following should be considered for fixing this issue:

191125_c4_Slic3rBug3.zip