Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Is there a systematic way to diagnose "Sketch could not be solved" error?

john_lombardojohn_lombardo Member Posts: 20 EDU
What should be checked and in what order?


  • S1monS1mon Member Posts: 1,080 PRO
    Assuming it was working before your last change, you can always undo that change. 

    If you’re opening something that someone else has done, you can also go back in the history to a point before the constraints got screwed up. 

    If those approaches aren’t helpful, try to figure out why the constraints aren’t solvable. Show the constraints. Look for red ones. Likely there will be a bunch. Try deleting one of them. If that one doesn’t clear all the red, hit undo, and try deleting a different one. 

    Usually you’ve over-constrained something. Sometimes picking a horizontal when you meant vertical or something accidentally got aligned with another reference by mistake. Look for things aligned to external references by mistake. 

    Sometimes it seems like a sketch should be solvable, but the solver just doesn’t like it. Typically tangent constraints or use edge or offsets or some combination of those is too confusing. You may need to simplify the constraints or build them up over a couple of sketches. Often just having too many elements in a single sketch is a problem. Sketch fillets should be used sparingly (try using fillet features instead). 
  • steve_shubinsteve_shubin Member Posts: 895 ✭✭✭✭
    edited August 16

    Along the lines of what @S1mon said 

    My feeling is — don’t work in red AT ALL. As soon as you see the very first thing go red, immediately undo. Then give a second try, only this time, hold down the shift key

    Why things go red — can often be an extraneous auto constraint kicking in, that was not useful / necessary / or wanted for what you were trying to accomplish at the time 

    You can temporarily disable the auto constraint function by holding down the shift key

    But the problem is, you won’t be able to AUTO snap together the ends of lines, for one thing, when you do this.

    But there is a solution, and that is to manually set the constraints, if things are turning red when you work with auto constraints

    So what you would do is, move the two endpoints within close proximity. Then select the two endpoints, and then go up and select the coincident constraint WHILE HOLDING DOWN SHIFT. In other words, make sure you are first holding down shift, before you select the constraint you want to use

    But note that if you see something go red, and you continue to work in red conditions, you’re just making it harder and harder on yourself to correct things later on

  • steve_shubinsteve_shubin Member Posts: 895 ✭✭✭✭
    edited August 17

    Another tip is, keep your sketches simple. Don’t try and do everything in one sketch. Don’t try and put 1 billion different elements in one sketch. Break it up into multiple sketches.

    Try to limit the amount of vertices. Instead of using a bunch of points to make a curve, make sure you know how to use the arcs, spline and Bézier tools to where you don’t have to use so many points along a curve. This could help in keeping an unwanted extraneous auto constraint from kicking in, by limiting the amount of vertices that the auto-constraint function has to act upon

    You can certainly make a complex part, by using a number of simple and sparse sketches.

  • steve_shubinsteve_shubin Member Posts: 895 ✭✭✭✭
    edited August 17

    The term that Onshape uses for what happens when you hold down SHIFT is, that it SUPPRESSES INFERENCES

    Suppressing inferences, is another way of saying that the auto constraint functionality is disabled - IN PART

    IN PART, because when inferences are suppressed, certain constraints will still be created automatically. Such as when you create a rectangle, the segment endpoints that make a corner, will be coincident, and at least one segment of the rectangle will be horizontal. But with inferences suppressed, you won’t be able to automatically snap to the elements of other objects

    When you’re using the Onshape mobile app, the way you suppress inferences is, by accessing the contextual menu by doing a two finger tap on the screen, which will bring up a menu where you can select — suppress inferences. And the inferences will stay suppressed until you either turn inferences back on, or until you exit the sketch your working on

  • john_lombardojohn_lombardo Member Posts: 20 EDU
    @S1mon, @steve_shubin
    Thank you for your suggestions. Here's a link to the drawing. Sketch 21 is the one in question. I might have gone too far with too many edits and at my experience level do not see the issue(s).
    The extrudes work and the part exports to an STL which prints fine, so it appears that the sketch not being  solved has no effect on the printed part. I don't understand why Onshape finds fault, doesn't reveal exactly where the fault is, but yet exports an STL that's fine.
  • steve_shubinsteve_shubin Member Posts: 895 ✭✭✭✭
    edited August 17

    I spent time looking at this sketch
    There are numerous other things I would do to make this more stable
    But this should give you some idea of the process

    FOR STARTERS -----
    Wiggle things
    If things are moving to where lines are no longer horizontal,
    then UNDO
    and apply the horizontal constraint

    After a wiggle
    If you see that the end of 2 lines are no longer making a proper corner
    then UNDO
    and apply a coincident constraint to the 2 endpoints

    So on and so forth

  • john_lombardojohn_lombardo Member Posts: 20 EDU
    Thanks. I will give wiggling a try.
  • matthew_stacymatthew_stacy Member Posts: 414 PRO
    @john_lombardo, replace all of those short, co-linear lines with a single continuous line segment.  I could not discern any specific reason for the multiple short segments, and they only complicate your task of fixing this sketch.

    You might also do well to break this into two separate sketches, one for the left-side, and another for the right-side.
Sign In or Register to comment.