Jump to content
Ultimaker Community of 3D Printing Experts

Sharpest Corner Z-Seam Setting (Problem and Suggestion)

Recommended Posts

If you print a square with identical corners, Cura struggles to find the sharpest one, and will normally retract and move between corners adding a lot of time and a lot of silliness to the pathways.

Sharpest pathway should be a bit less "ONLY THE SHARPEST ONE WILL WORK" and perhaps instead look for the closest sharpest corner within limits. If there is only a 0.01mm difference or less between different corners, just choose the closest.



If I were going to write pseudocde, I would analyze all the sharpest corners and put them in an array/list/dictionary along with their distance from the current point. Then we need to set/analyze the optimum ratio between sharpest corner and distance we'll have to travel to get there. 

If you have three corners, one is 90d and 50mm away, second is 100d, 10mm away, third is 80d, 100mm away, which do you choose as sharpest? Sharpest is 80d, but at 75mm away, is also farthest. 

At this point, I would start looking at benefits of the sharpest corner, and you'd have to weigh each of the decisions based upon your preference for distance or sharpness. Myself, I'd prefer short and sharp in a supply/demand style of curve intersection. 

60% preference on shortness (Less distance travelled, less time, better/no retraction). 
40% preference on sharpness.(hidden z-seams... other benefits?)

Normalize data to percentages of max values. 
100d/x for degree normalization. Inverted because lower degrees are better. 
100m/y for distance normalization. Inverted because lower distances are better.

Corner 90d, 50mm, (1.11, 0.5)
## 0.4*1.11 = 0.444
## 0.6*0.5 = 0.3
Total = 0.744 weight

Corner 100d, 10mm (1 , 10)
## 0.4*1 = 0.4
## 0.6*10 = 6
Total = 6.4 weight

Corner 80d, 100mm (1.25, 1)
## 0.4*1.25 = 0.5
## 0.6*1 = 0.6
Total = 1.1 weight

You can see that the best corner to start the layer from would be the 100d, 10mm one in this algorithm. I would set the preference weights to be user-adjustable in the Cura interface under the Sharpest Corner preference.

Share this post

Link to post
Share on other sites

As the person who coded the sharpest corner feature, here's my thoughts...


Don't use it for any model that has corners of similar "sharpness". Personally, I always use the user-defined z-seam hint with, maybe a seam corner preference but I never use sharpest corner z seam alignment. Personally, I would not choose sharpest corner as the default value for that setting as it nearly always gives a crap result.


  • Like 1

Share this post

Link to post
Share on other sites

Thanks for the reply, Smartavionics.  I find user-defined z-seams to also be difficult and sometimes unreliable unless you're dealing with a vertical-faced object and you place the seam on a consistent corner in the model. I welcome any advice you may have about using it.  For that feature, sometimes I have to guess or count little squares to figure out where Cura believes (155,105) is on the build plate.  


The sharpest corner is a really awesome idea, and I think we could iterate it a bit further to make it even better at making decisions. 


Thank you again.  

Share this post

Link to post
Share on other sites

When using the user-defined z-seam position, turn on the relative position option so that the x/y position of the z-seam hint location are relative to the centre of the part's bounding box. That also gives the obvious benefit that you can move the model around the build plate and the z-seam hint location moves with the model.

Share this post

Link to post
Share on other sites
2 minutes ago, yellowshark said:

Confused, if you have drawn a square then surely by definition each corner will be as sharp as the other 3 and they will all be 90d. Or am I missing something obvious that is going to embarrass me😵


Nope, what you say is true and that's really why the sharpest corner z-seam strategy doesn't make sense for models that have corners that cannot be distinguished by their sharpness. Where it is useful is for an object that has mostly smooth curves and also an edge that runs vertically up the model and that's where you want the z-seam to be because it will be best hidden.

  • Like 2

Share this post

Link to post
Share on other sites

Hi YellowShark,


Yeah, the whole initial problem occurred with a square because the existing algorithm for finding the sharpest corner doesnt' account for distance. So it will chase down that 0.01mm difference between the corners' sharpness angles. 


Which is why I suggested an improved algorithm with a weighted decision making that also accounts for the distance required for getting to that sharpest corner.  Without it, it combs or retracts like crazy to find that 90d corner on the other side of the model rather than the 85d corner that is 3mm away. 


The point of confusion was probably the hypothetical which I used to illustrate how an improved weighted decision algorithm would function.  Didn't use a square in that hypothetical.  I probably should've added a TLDR. 

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Our picks

    • Ultimaker Cura | a new interface
      We're not only trying to always make Ultimaker Cura better with the usual new features and improvements we build, but we're also trying to make it more pleasant to operate. The interface was the focus for the upcoming release, from which we would already like to present you the first glance. 
        • Like
      • 114 replies
    • "Back To The Future" using Generative Design & Investment Casting
      Designing for light-weight parts is becoming more important, and I’m a firm believer in the need to produce lighter weight, less over-engineered parts for the future. This is for sustainability reasons because we need to be using less raw materials and, in things like transportation, it impacts the energy usage of the product during it’s service life.
        • Like
      • 12 replies

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!