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.

Parts studio, moving items, snapping to points

daniel_chowdaniel_chow Member Posts: 108 ✭✭✭
Hello everyone, I have a few more newbie questions, I feel I'm on the verge of breaking out of newbie status!! 

Here is my onShape document shared to public, I'm on the cantilever PRACTICE tab
I've fully completed this onShape Essential tutorial on Multipart and just redoing to practice the newly acquired skills

On the image below, the vertical line snaps to the outer edge of the circle outlines in the red box. The line changes from a solid to a dotted line to indicate this. 


On the image below, the SAME line when dragged over, won't snap to the 1/4"D hole, the line will not change from solid to dotted, why is this? 


q1.png 179.1K
q2.png 174.5K

Best Answers

Answers

  • daniel_chowdaniel_chow Member Posts: 108 ✭✭✭
    Guys, another problem I'm having is I am simply trying to move an object in Parts studio from one place to another. The amber circle and all its parts (4 in total),  I'd like to "snap" these parts to a perpendicular line on part B. How do I move an object(s) in Parts Studio? I see there are 4 objects that I need to select ... I did that. I tried to use the transform tool which I learned by searching out this thread.



    Thank you in advance for any assistance I may receive from this awesome community! 
    q3.png 185.7K
  • daniel_chowdaniel_chow Member Posts: 108 ✭✭✭
    Hello everyone, 

    After much searching and noodling around, I believe that it is not possible to simply select entities within a sketch and move them around and snap them to different places. I used dimensions and guide lines / shapes to move around entities within a sketch. Does anyone know of a way to simply drag around entities within a sketch?

    Here is a screenshot of me moving around the lowermost .875 in entity using dimensions and squareing it up to the large arm. 



    q4.png 163.7K
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    edited November 2015
    @daniel_chow    Taking the first query from the first post:

    <<the vertical line snaps to the outer edge of the circle outlines in the red box. The line changes from a solid to a dotted line to indicate this. >> You go on to ask why your were unable to snap to the 1/4" hole. In spite of your customary very thoroughly set out question, there's not enough info to be sure from this distance. I'll try to cover a few possibilities, and hopefully equip you with some background to help you diagnose such problems.

    Here's some things which can permit or prevent snapping.  
    (There are two sorts of snap behaviour: direct. vs indirect/inferred)

    The line being dragged in this animated clip has (as it happens) already been constrained at both ends. The top end is coincident with the origin, or the centre of one of the circles (Onshape does not yet permit discovering which of a stack of coincident points a constraint refers to)

    Notice when the bottom end of the line is clicked on in preparation for dragging, a horizontal line icon flashes up.
    This indicates the point being selected is constrained to lie on a horizontal line from another entity.
    It's important to remember that such constraints can arise accidentally, and you should check for unexpected constraints whenever drag behaviour is not what you expected.



    When the line starts to be dragged, it snaps to the first point it gets to. That's because it happens to be the point it's constrained horizontal to.This means it passes exactly over that point, allowing direct snapping to create a coincident constraint. 

    Other things it snaps to are entities which support direct snapping, because the endpoint passes over the entity, but the last entity encountered (the vertical line at far left) is not able to be snapped directly to, because the point being dragged does not pass directly over the line. However, by "waking up" an endpoint of that vertical line, the endpoint of the dragged line can be dropped onto a dotted inference line dropped vertically from the endpoint (rather than an extension of the line), which creates a vertical constraint between the two points.


    Sometimes in a situation like this, the endpoint you're dragging will pass close to but not over another point. It can happen that what looks like a direct snap, creating a coincident constraint, is actually an inferred snap. This would have been indicated (during the drag operation, but not subsequently) by a dotted line so short that the user may not have seen it.

    Zooming in close is probably the best way to sort this out. When the points are far enough from each other, you can hover over each point to inspect the constraint icons. Hovering over a particular icon will highlight the other entity being constrained to. While it's highlighted by hovering, you can hit "Delete" on the keyboard. If you can't get it to stay highlighted, hold down "Shift"

    Hope this helps

  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    edited November 2015
    @daniel_chow
    You'll notice that no "tangency" constraint icons flashed up in my animation. Only "coincident" icons.
    That's because the line was being dragged by an endpoint, and tangency constraint are between a line and an arc, or two arcs. (Setting aside splines and ellipses and suchlike for the moment)

    So it's important to click carefully before dragging, or before creating a constraint the rigorous way (picking an icon at top right of the toolbar)
  • daniel_chowdaniel_chow Member Posts: 108 ✭✭✭
    @daniel_chow    Taking the first query from the first post:

    <<the vertical line snaps to the outer edge of the circle outlines in the red box. The line changes from a solid to a dotted line to indicate this. >> You go on to ask why your were unable to snap to the 1/4" hole. In spite of your customary very thoroughly set out question, there's not enough info to be sure from this distance. I'll try to cover a few possibilities, and hopefully equip you with some background to help you diagnose such problems.

    Here's some things which can permit or prevent snapping.  
    (There are two sorts of snap behaviour: direct. vs indirect/inferred)

    The line being dragged in this animated clip has (as it happens) already been constrained at both ends. The top end is coincident with the origin, or the centre of one of the circles (Onshape does not yet permit discovering which of a stack of coincident points a constraint refers to)

    Notice when the bottom end of the line is clicked on in preparation for dragging, a horizontal line icon flashes up.
    This indicates the point being selected is constrained to lie on a horizontal line from another entity.
    It's important to remember that such constraints can arise accidentally, and you should check for unexpected constraints whenever drag behaviour is not what you expected.



    When the line starts to be dragged, it snaps to the first point it gets to. That's because it happens to be the point it's constrained horizontal to.This means it passes exactly over that point, allowing direct snapping to create a coincident constraint. 

    Other things it snaps to are entities which support direct snapping, because the endpoint passes over the entity, but the last entity encountered (the vertical line at far left) is not able to be snapped directly to, because the point being dragged does not pass directly over the line. However, by "waking up" an endpoint of that vertical line, the endpoint of the dragged line can be dropped onto a dotted inference line dropped vertically from the endpoint (rather than an extension of the line), which creates a vertical constraint between the two points.


    Sometimes in a situation like this, the endpoint you're dragging will pass close to but not over another point. It can happen that what looks like a direct snap, creating a coincident constraint, is actually an inferred snap. This would have been indicated (during the drag operation, but not subsequently) by a dotted line so short that the user may not have seen it.

    Zooming in close is probably the best way to sort this out. When the points are far enough from each other, you can hover over each point to inspect the constraint icons. Hovering over a particular icon will highlight the other entity being constrained to. While it's highlighted by hovering, you can hit "Delete" on the keyboard. If you can't get it to stay highlighted, hold down "Shift"

    Hope this helps

    Thanks Andrew, this makes sense. Oddly enough, I am now able to snap that line anywhere as I expected. I don't understand why. I was messing around with several other entities and trying to apply a combination of boolean, extrude and mirror functions. That may have something to do with it but I have no idea what. Regardless, its working now I just don't know why. 
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    @daniel_chow
    Is it not possible that <<
    there were constraints you were not aware of limiting your options>>?
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    edited November 2015
    A further possibility: Once you are familiar with what to expect, the first thing to do when baffled is to reload the browser tab. It may be that Onshape was not performing as designed, and this is usually remedied by this simple step.
    ON EDIT:
    In serious cases it may be necessary to hold down "Shift" while invoking "Reload" (the latter by RMB on the tab)
    This purges the cache entirely.
  • jakeramsleyjakeramsley Member, Moderator, Onshape Employees, Developers, csevp Posts: 661
    The dotted lines that you are seeing isn't showing that the end-point is snapping to the line, but that you are inferring vertical and/or horizontal constraints to a point.  When you are snapping to a point or a line, that line will highlight in orange when the snapping would occur.  Snapping to a point will show an orange box around it to make it more clear.  So for the first example, you are snapping the end point of the line to the circle (as indicated by the circle being orange) as well as forcing the end-point of the line to be vertical to the origin (based on the dashed lines).  As a caveat, forcing the end point to be vertical of the origin isn't the same as forcing the line to be vertical.

    Inferencing works by "waking up" entities in the sketcher.  What that means is, while the tool you are creating/dragging/modifying is active, you have to hover over the entity you want to infer to to allow for inferencing of that entity.  If you are sketch a line and want the end-point to be vertical to another one, make the line tool active, hover over the point you want to be vertical and then move up/down to show the inferred vertical constraint.  These inferences will stay woken up for the entire duration of the tool.  If you toggle the line off and on, the woken up inferences will no longer be there.

    The exceptions to "waking up" are the origin and entities that are connected/chained to tools you are sketching from.  The origin will always allow you to infer to horizontal and vertical.  Starting some geometry at the end point of another, will have that original entity woken up.

    If you don't want any inferencing, hold the SHIFT key and inferences will be suppressed.
    Jake Ramsley

    Director of Quality Engineering & Release Manager              onshape.com
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    ...  So for the first example, you are snapping the end point of the line to the circle (as indicated by the circle being orange) as well as forcing the end-point of the line to be vertical to the origin (based on the dashed lines).  ...
    @jakeramsley
    ( Presuming you're addressing the OP)
    On further reflection, I wonder if he's dragging the entire line at this time, because from the icon at the bottom, it looks as though a tangency relation is being inferred to the circle, and this is not possible (AFAIK) when you're dragging an endpoint.
  • jakeramsleyjakeramsley Member, Moderator, Onshape Employees, Developers, csevp Posts: 661
    edited November 2015
    ...  So for the first example, you are snapping the end point of the line to the circle (as indicated by the circle being orange) as well as forcing the end-point of the line to be vertical to the origin (based on the dashed lines).  ...
    @jakeramsley
    ( Presuming you're addressing the OP)
    On further reflection, I wonder if he's dragging the entire line at this time, because from the icon at the bottom, it looks as though a tangency relation is being inferred to the circle, and this is not possible (AFAIK) when you're dragging an endpoint.
    By the nature of the sketch being solved (ie the sheet is being displayed properly), the action in the first picture isn't a drag but line creation.  Lines can be inferred tangent to arcs during creation.

    edit:
    Can also tell the operation is creation because the line tool is selected.
    Jake Ramsley

    Director of Quality Engineering & Release Manager              onshape.com
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    Thanks, that's helpful, @jakeramsley
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    edited November 2015
    @jakeramsley 

    Having tried creating a line in a sketch used in a feature, then dragging that line once created, I can't see what you mean by "the sheet is being displayed properly"
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    @daniel_chow
    It turns out that it makes a big difference, when dragging an existing line, whether you pick it up by an end (an endpoint will highlight) or by clicking further inboard (the entire line will highlight)
    In the latter case, NO snapping or inferencing is possible - not even tangent snaps.
    Furthermore, the line will only move if both endpoints are free to move (blue dots, not black)
  • jakeramsleyjakeramsley Member, Moderator, Onshape Employees, Developers, csevp Posts: 661
    @jakeramsley 

    Having tried creating a line in a sketch used in a feature, then dragging that line once created, I can't see what you mean by "the sheet is being displayed properly"
    If you look in the first image, there is the greyish area that is filled in the enclosed sketch.  I call this a sheet which is essentially a closed area of the sketch.  This only appears after the sketch has solved, which won't happen mid-drag of an entity.

    Try sketching a rectangle and an arbitrary line.  See that the sheet is there, as the sketch has solved at this point.  Now, select the line and start moving it.  The interior of the rectangle goes from grey to white because the sheet isn't generated until after the sketch entity is put down.
    Jake Ramsley

    Director of Quality Engineering & Release Manager              onshape.com
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    Thanks,  @jakeramsley I'll experiment with that
  • daniel_chowdaniel_chow Member Posts: 108 ✭✭✭
    I'm not sure why you found you were unable to 
    <<simply select entities within a sketch and move them around and snap them to different places.>>
    I can only assume there were constraints you were not aware of limiting your options.

    In this animation, the circle is picked up by its centrepoint, and dragged first as if to be constrained coincident with the endpoint of the line ... but because the mouse button stays down, a constraint is not created.

    It is then dragged up that line, pausing at the midpoint to show the icon indicating that particular constraint. Again the mouse button stays down, and the circle is dragged up to snap initially to a single line, then to two lines simultaneously. Finally it is dragged away and dropped, leaving it with no constraints at all.  Almost all snaps are direct snaps, in this clip.

    (No dotted lines, except briefly, near the end of the clip, suggesting an indirect constraint could be completed by releasing the button. This was actually a vertical constraint to the midpoint mentioned earlier, and that's because that midpoint was most recently "woken up" by pausing over it. There was simultaneously a coincident constraint with the line running left to right)

    So there are a great many opportunities to inadvertently capture constraints. It's not immediately obvious that a deep understanding of how to create them is the main vaccine against this.



    Thanks again Andrew, but I am still not able to capture and move anything. There are no constraints as all the lines are blue. In fact, I started a simple parts studio sketch, added a circle and a line. WhenI click and hold the left mouse button at the center of the circle then drag the mouse to the left, it draws a rectangle with a dotted amber line. If I click and hold the the left mouse button at the center of the circle then drag it to the right it creates a blue box with a solid black line. If I click the center point and let go it seems to select that point, if I click and try to drag it ... same boxes appear, the one with the dotted amber line if I drag to the left. The blue box with the solid black line when I drag to the right. 

    BTW I'm using a Chrome extension called Snagit by Techsmith 


  • daniel_chowdaniel_chow Member Posts: 108 ✭✭✭
    I see, you have to remove the constraints before being able to move the object. 

    For anyone else searching this thread, Narayan clicked on the coincident restraint and DELETED the constraint, then he was able to move the entity. 
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    edited November 2015
    I see, you have to remove the constraints before being able to move the object. ....... 
    Just to be entirely clear: if there been other constraints than the one he did remove (like the centerpoint of the circle horizontal to another point or coincident to a line rather than a point, or the diameter constrained equal to another circle) PROVIDED they did not logically constrain the drag, the circle could still be moved.

    One apparent exception is when you try to drag a line by clicking on the line, rather than on an endpoint. This will drag a line which is free to translate, but it will not (AFAIK) drag a line which is only free to rotate. To do the latter, you have to drag an endpoint, and obviously it cannot be the centre of rotation.
Sign In or Register to comment.