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.

Selecting origin for In-Context created parts and mating them

nplannplan Member Posts: 2
I often find myself in a situation, where I need to create a new part in-context, but there are no pre-existing features that could be used as origin of the new part studio.

Like in this example: I have a profile:


Inside it I need to put a bracket:

The bracket must fit snuggly into the profile so it's designed in-context. It must be positioned at a certain length from front end of the profile, but this length is expected to change in the future. The bracket is modeled first and then the mounting holes in profile are added last as an in-context edit referencing the bracket.

The question is first how to choose the origin of the in-context created part studio and second how to mate the bracket to the profile?

There are many ways but I feel like none of them is the "correct" one. Let's say modeling both parts in one multi-part part studio is not an option since I need this to scale to complex assemblies with many parts.

I tried this options so far: (documents for options 1 & 2 are linked, mate options A-D are created as branches in each document)

Option 1: Create part studio in-context at assembly origin. (document here)
  • Mate option A: fix the bracket
  • Mate option B: group bracket and profile
  • Mate option C: fasten bracket hole to profile hole
  • Mate option D: create a mate connector on bracket part at its origin (can be far away from actual part) and fasten the bracket using this mate connector to assembly origin
In A, B and D the bracket can be repositioned by changing sketch plane distance from origin in its part studio. Does not work in C because of the circular dependency of holes.

Option 2: Create a new sketch-driven mate connector on profile part and use it as origin for in-context bracket part studio. (document here)
  • Mate option A: fix the bracket
  • Mate option B: group bracket and profile
  • Mate option C: fasten bracket hole to profile hole
  • Mate option D: create a mate connector on bracket part at its origin and fasten the bracket using this mate connector to sketch-driven mate connector on profile
The only way to reposition the bracket is to move the sketch-driven mate connector on the profile. But this works only in D. In A, B and C the bracket doesn't move with the mate connector.

Fixing the parts is not an option because it's limited to current assembly and doesn't propagate to higher level assemblies. 

This leaves us with 3 options, each with it's own problems:
  • 1B - if you suppress the group and accidentally move the bracket there is no other way to reposition it other than deleting it and reinserting it. Unfortunately this breaks the references of profile holes.
  • 1D - origin of part studio can be very far from the actual part. If you have a complex assembly you get a large number of mate connectors positioned at its origin which can become confusing.
  • 2D - the position of bracket is now defined in a sketch inside the profile part studio. This can be very confusing when coming back later or if someone else is editing the design.
I find myself using 1D and 2D the most but I would like to standardise this in our company. What approach do you use? Please let me know your thoughts and ideas. :)

Comments

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,648
    If you know something is going to change, avoid group. You know to avoid fix already.

    Can you create an assembly mate connector on the profile face at the top edge and offset by an amount, then create the part in-context using that? Then if you create a mate connector on the origin of the in-context part (in the Part Studio) then you have two mate connectors to fasten together.
    Senior Director, Technical Services, EMEAI
  • fnxffnxf Member, User Group Leader Posts: 138 PRO
    Let's say modeling both parts in one multi-part part studio is not an option since I need this to scale to complex assemblies with many parts.
    This is one of the great things in Onshape, and saying this is not an option makes me sad 😉.

    Why not sketch both the bracket and the profile inside a "Skeleton Sketches" document, so they fit together. And then reference those?
  • shawn_crockershawn_crocker Member, OS Professional Posts: 860 PRO
    To be honest, this is quite simple to do and as you seem to have a good grasp on how to use onshapes abilities, you need to just keep it simple and pick "a way". I struggle with over complicating things as well and accidentally falling into a loop of trying to account for too many imagined future outcomes that cannot be fully nailed down as concrete possibilities. Then one day I had a vision where "a way" came to visit me and this god of productivity showed me how to always trust in "a way" over "all ways" or "no way". Just pick "a way" and keep moving forward. It's easier to make adjustments that are needed in the future in the future then to try and predict the future now.
  • nick_papageorge073nick_papageorge073 Member, csevp Posts: 804 PRO
    NeilCooke said:
    ...snip....
    You know to avoid fix already.
    ...snip...
    Hi, can you expand on this? The training material teaches to use Fix right away. I've been having trouble the past few months with subassemblies not maintaining their positions. I think it might be related to using Fix.

    Top level assy
    -Sub 1 inside of it
    -Sub 2 inside of it.
    All is good.

    Then I create a new document with a new assembly tab. I put in 3 of the top level assy's to this same document. (Lets say to see qty 3 of the product I'm developing side by side). Now in this new assy document, the sub1 and sub2 don't stay tied in position to the top level assy.

    I think the root issue is the Fix.

    And a followup, if Fix is not good, why is it in all the training?
    And a further followup, is there a training document that shows a way other than Fix? I think I did all of the assembly self paced training courses but I don't recall this.

    Thanks
  • Alex_KempenAlex_Kempen Member Posts: 247 EDU
    Fixing one part per assembly is necessary in order to keep the assembly in the correct position relative to the origin. Otherwise, groups of mated components can be dragged around freely. However, fixing more than one component per assembly is highly inadvisable since an assembly which has multiple fixed components does not behave as expected if the assembly is inserted into another assembly as a sub assembly (additional fixed parts will not move when the subassembly is mated in the top level assembly). Thus, best practice is to always fix one, and only one, part per assembly.

    As an alternative to fixing multiple parts, use Group or regular fastened mates instead. Group also has the additional benefit of maintaining the relative position of parts in the group - if parts are designed together in the same part studio and grouped together in the assembly, moving one part in the part studio will result in a corresponding shift in the assembly, so the parts will always be in a position which matches the part studio.
    CS Student at UT Dallas
    Alex.Kempen@utdallas.edu
    Check out my FeatureScripts here:



  • nplannplan Member Posts: 2
    NeilCooke said:
    Can you create an assembly mate connector on the profile face at the top edge and offset by an amount, then create the part in-context using that? Then if you create a mate connector on the origin of the in-context part (in the Part Studio) then you have two mate connectors to fasten together.
    This is probably the best way in this case since the relative position of the parts would be defined in the assembly, which I find the most logical. But in some cases it's much easier to define a mate connector using a sketch. In the assembly you can only pick a point and then offset it.

    fnxf said:
    Let's say modeling both parts in one multi-part part studio is not an option since I need this to scale to complex assemblies with many parts.
    This is one of the great things in Onshape, and saying this is not an option makes me sad 😉.

    Why not sketch both the bracket and the profile inside a "Skeleton Sketches" document, so they fit together. And then reference those?
    You're absolutely right. Multi-part part studios are great! Though I tend to use them for more closely related parts, 2-3 parts per part studio at max. Otherwise I find the feature tree quickly becomes too complicated and regeneration time too slow. If I have many parts that only have fixing holes in common I think in-context design is a better option. Could you elaborate on your approach a bit more?

    To be honest, this is quite simple to do and as you seem to have a good grasp on how to use onshapes abilities, you need to just keep it simple and pick "a way". I struggle with over complicating things as well and accidentally falling into a loop of trying to account for too many imagined future outcomes that cannot be fully nailed down as concrete possibilities. Then one day I had a vision where "a way" came to visit me and this god of productivity showed me how to always trust in "a way" over "all ways" or "no way". Just pick "a way" and keep moving forward. It's easier to make adjustments that are needed in the future in the future then to try and predict the future now.
    I completely agree, I'm definitely over complicating things. But I like to think about different ways to do things in Onshape. It's great training to become an expert quickly.  :)
  • Alex_KempenAlex_Kempen Member Posts: 247 EDU
    @nplan A skeleton sketch document basically contains a loose collection of sketches and surfaces to define the boundaries of the model. It can be imported into other part studios and used as a reference modeling.

    Here's an example of how my robotics team applied these principles to our 2021 VEXU robot.
    Geometry Sketches:

    Rollers:

    Intake:


    As you can see, we basically created a set of sketches and/or surfaces defining the major features of the robot, in this case the outer boundary, the rollers, rear rails, and so on. Individual designers could then derive these sketches into their sketch and use them to drive their design. We also created a set of surfaces representing the major structural elements of the robot in order to make mounting and/or checking for interferences easier.

    CS Student at UT Dallas
    Alex.Kempen@utdallas.edu
    Check out my FeatureScripts here:



Sign In or Register to comment.