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.

Constraints are a voodoo magic

evgenii_fyodorovevgenii_fyodorov Member Posts: 4

Well, my first 24 hours in Onshape and in CAD in general made me think that I'm just lucky to be able to exist, because I can't understand how constraints work in Onshape. Or constraints as a concept in general. Or CAD. Or life.

Here, one of the examples. I have multiple perpendicular lines that are perpendicular to not non-constrained one. Adding a perpendicular constraint does nothing. Why - I don't know, the logic of this just escapes me. And this is not the only point of my frustration, but there is no need to list everything here, because all of them are related to the "not being able to be constrained" problem

изображение.png

Here is a link to the trash that I made. I remade it 4 times already, and the first couple of times it was definitely on me. But Onshape logging me out in the middle of a minor dimension revision and by that breaking the whole rad hole pattern made me find out why already drawn and extruded geometry can just shift. Now it's 2.30 in the morning, mystery of constraints still avoids me, and my already not-so-bright intellect is even lower. I need to go to sleep.

If some kind soul will take a look at what I made and explain to me in most simplest terms how this SHOULD work - I will be forever grateful.

Thanks in advance.

Tagged:

Comments

  • MDesignMDesign Member Posts: 844 ✭✭✭
    1. https://learn.onshape.com/learn/learning-path/introduction-to-cad
    2. https://learn.onshape.com/learn/learning-path/onshape-fundamentals
    3. once you learn constraints you dependency on grid features will fade.
    4. use feature patterns vs multiple sketches of the same thing (slots & holes in this case)
    5. worrying about fully defined will drive you bat s*** crazy at times. It is good practice to fully define sketches but not required.
    6. looks like you may have figured out your fully defined issue as I don't see any sketches not fully defined in your link.
  • glen_dewsburyglen_dewsbury Member Posts: 1,046 PRO
    edited May 27

    I revue'd your link early today but had to run out for an appointment.

    I noticed something interesting about your use of grid feature. You set set transparency to 0 for hiding. I think you'll find it simpler to set above 0 so as not to be so confusing with other sketch entities then simply hide and unhide from the feature list as needed. Having said that, here is a sample that works quite easily without a grid at all. I think your dragging some thinking from a previous program like ACAD that is hampering progress.

    Read MDesign's notes about learning how to work with the OS tools. I think your putting in too much work to accomplish the task.

    Use of tools like the sketch slot tool are way faster and cleaner for subsequent updates than complete redraw of all entities. Learn to use feature arrays. In your sketches the constraints are likely over lapping with the grid. They may not show as an error but will make future updates more difficult. Under standing of constraints and how they work is paramount. See Learning Center.

    I don't see the grids as value added in this part design.

    https://cad.onshape.com/documents/ffcfeae8529aacee4d03e455/w/65100b62ac433464b06507f1/e/ff4e2b8463a5fbda1fd2be3b

    image.png
  • _anton_anton Member, Onshape Employees Posts: 455
    edited May 27

    It helps to think in terms of degrees of freedom:

    • You draw a circle on the origin. That constrains its x and y translation but leaves the radius. Constrain it tangent to a line somewhere. That constrains the radius.
    • If you draw a circle in free space instead, then constrain it horizontal to the origin, that constrains the x translation only, leaving y and radius. The set of constraints in your sketch should hopefully be exactly enough that nothing can wiggle around. If something can wiggle around, it'll be blue.
    • Line segments are essentially defined by their two endpoints. Draw a line from the origin and drop the other endpoint in free space. One of the endpoints is constrained; you can move the other one around. If you set the line vertical, or one endpoint vertical relative to the other, that leaves just the y degree of freedom for the free point.

    A typical workflow might be something like: sketch on the top plane, center rectangle on the origin, dimension its sides, extrude.

    Prefer to keep sketches as simple as possible; prefer to use face and part patterns instead of sketch patterns; prefer to rely on the constraint solver rather than a grid. Be aware that, if you put a sketch on a face, you can use the "Disable imprinting" option to avoid imprinting that face into the sketch, which tends to make the sketch easier to work with.

  • eric_pestyeric_pesty Member Posts: 2,186 PRO

    As others have said, go through some of the training, use feature patterns instead of sketch patterns and split up the different parts of your design into separate sketches.

    Also, lose the grids, they are a distraction! This is a great of example of why a grid is not helpful for parametric CAD in 99.9% of the cases!

  • evgenii_fyodorovevgenii_fyodorov Member Posts: 4

    Wow. I did not anticipate so much helpful feedback. Thanks to all of you.

    1-2. Yeah, I need to go and watch some videos, take some courses to be more fluent and understand more. Sadly, those things bore me very fast, and the quality of learning drops. That's why I like just to jump into creating something that I need, because that way I solve a real problem, not just some abstract exercise. In this case, I needed a specific part for my PC chassis, so I jumped right in and figured it out along the way.

    3. Well, I'm sure I hope so). The reason why I got this grid thing in the first place is that I wanted to get some reference relative to the real-world size of the part that I had in my head, so I could have alignment and spacing right between mounting holes, for example. Only later did I find out that having a grid makes my life easier in terms of constraining elements.

    5. It seems that some things not being fully defined lead to my later problems with sketches getting messed up, at least I think so.

    6. Well, I did not exactly "figure it out"; I just redid both sketches for the rad mount pattern and the mounting holes, and everything miraculously became good. I did the same things as before that, I'm sure of it, because it was not my first time redoing both of those sketches, I literally can replicate this whole part from memory now.

    About grid feature - for me, when transparency is set to 1, hide/unhide does not really work, just makes it ever so slightly darker. That's why I was setting transparency to 0, because that way it was out of sight when I was just reviewing/measuring the part as a whole.

    Also, I never worked with CAD, ever. This was my first experience in any program of that type.

    The problem with the constraint solver for me is the problem with Onshape being cloud-based. My internet connection is 50 Mbps symmetrical, and it's when I measured relative to the local ISP's server. It will be even smaller when measuring realtibe to Onshape's cloud farm. What it means is that I have a constant "poor connection" tag on my bottom left corner, and every single action/reaction is slightly laggy. At first, I somehow did not realise this until I was making a drawing of my part and found out that a lot of dimensions that were supposed to be equal differed from each other, sometimes the difference was more than a millimeter. That was the point when I found and put the grid feature in, and redid everything for the first time.

    I think the main reason why a lot of things got undefined at once is that Onshape, at some point, just logged me out in the middle of me changing something on a part. When I logged in, I found that some elements of the sketches became misaligned, and those blue checkmarks appeared on both sketches. I fixed misaligned things, but started investigating"not fully defined" warnings some time later. I may be wrong, but I think that the only way at that point was to just redo every sketch all over again was only viable option, because, as I mentioned earlier, I redid everything almost literally the same way, and all of it became constrained and defined by the constraint solver without much fuss. So, lesson learned, now, if I leave Onshape open for some relatively long time, I will just refresh the page, so Onshape will not get a desire for rapid unscheduled logouts).

  • MDesignMDesign Member Posts: 844 ✭✭✭

    @evgenii_fyodorov nothing wrong with jumping right in. Much easier to do so when you have a background. Also its quicker to gain knowledge when starting from zero when jumping right in vs starting with a tutorial. long term you will spend more time wrestling with things that would have come easier if you just did the tutorial for a baseline of knowledge/skill. You may find tutorials slow and boring but if you could quantify your dopamine… I think you'd find a higher ROI on wading in the low water before diving in unknown depth.

    I don't think I'll ever grasp the reliance on grid for spatial awareness. As soon as you put a dimension in a sketch or build from another part or feature you have spatial awareness.

    Regarding undefined sketches, yes you will find they cause issues down the road if your design isn't fairly concrete from the get go and you go back and make lots of changes or changes way up in the feature tree. good practice to define them. dimensions are considered constraints in case you are looking at them differently than coincident, midpoint, symmetry, etc.

    My home connection is the same as yours and don't have any issue. When you put a dimension something and type in the dimension it stays as is. Maybe your workflow could be modified to avoid whatever your having an issue with.

Sign In or Register to comment.