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.

How to make mate connectors on specific entities in a context?

gregory_tugregory_tu Member Posts: 6 EDU
edited April 18 in FeatureScript
Hello, I am making my first featurescript and I've been trying to figure out how to make a sketch on one of a line's mate connectors, and I'm wondering if there's an easier method. I need a sketch's plane to be perpendicular to the plane of another sketch so that I can revolve a ridge around a cylindrical pin, basically I need the sketch's plane to always cut the pin head in half, how could I go about doing this?

I want to make a feature like what happens in the first part studio to the cylinder pin, "Tab Connection Testing." The sketch I am referring to is "sketchR," the feature-script needs to take the top face of a pin head, make a ridge around it, cut an X slot into the pin from top-down so each tab can flex in, and also cut a ridge around the inside of the yellow part's slot so the tabs can snap into it.

Doc link
https://cad.onshape.com/documents/e746e5a1af6ab69016ffd94f/w/081cbbc49abd4344596a9144/e/edbbbf86217989998f8bc7e1?renderMode=0&uiState=66203890fa032e546f6ee329

Best Answer

  • chadstoltzfuschadstoltzfus Member, Developers, csevp Posts: 142 PRO
    Answer ✓
    It looks like you have all of the vectors needed to construct a plane that divides the pin head in half. It is possible to just create a manual plane sending the following arguments plane(origin, normal, x);

    Personally, I avoid using sketches in FeatureScript (too much math :smile:). If you know you'll always be working with a cylinder when using the feature, you can make some assumptions and instead of building a sketch, just model a configurable part in another Part Studio and use it as a boolean tool (see this example, still needs a bit of tweaking but should show what I'm getting at). You could then do the same for the X-slot as well, maybe do the X-slot as a pure boolean subtract and the ridge as a subtract-complement.  
    Applications Developer at Premier Custom Built
    chadstoltzfus@premiercb.com

Answers

  • chadstoltzfuschadstoltzfus Member, Developers, csevp Posts: 142 PRO
    Answer ✓
    It looks like you have all of the vectors needed to construct a plane that divides the pin head in half. It is possible to just create a manual plane sending the following arguments plane(origin, normal, x);

    Personally, I avoid using sketches in FeatureScript (too much math :smile:). If you know you'll always be working with a cylinder when using the feature, you can make some assumptions and instead of building a sketch, just model a configurable part in another Part Studio and use it as a boolean tool (see this example, still needs a bit of tweaking but should show what I'm getting at). You could then do the same for the X-slot as well, maybe do the X-slot as a pure boolean subtract and the ridge as a subtract-complement.  
    Applications Developer at Premier Custom Built
    chadstoltzfus@premiercb.com
  • gregory_tugregory_tu Member Posts: 6 EDU
    Yep ok, seems I just had to use the sketch coordinate system's origin(credit to the port feature where I found some of the cSys usage), but thanks for the idea about simply inserting a configurable part instead of sketching every part in feature studio, especially for much more complex parts.
Sign In or Register to comment.