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.

Programmatically choosing the face which is the last one "enclosing" the selected face

kenn_sebesta167kenn_sebesta167 Member Posts: 85 ✭✭
edited January 17 in FeatureScript

In the above screenshot, given the selection of the cylinder, I would like to choose the magenta face (and not the red, nor green, nor cyan ones) amongst all the faces qAdjacent finds. The reason to choose the magneta one is that it is the only face which "encloses" the cylindrical face.

What kind of featurescript test might help identify this face?

Comments

  • Caden_ArmstrongCaden_Armstrong Member Posts: 225 PRO

    You could certainly make a query that could select that face. But it isn't going to be a generalized solution to your problem. I could find another geometry that would immediately break it.

    For your tapless thread feature I think you'd be better off making the hole with your feature. A "Hole with tapless threads" is going to be easier than adding the material to an existing hole.

    If you make the hole with your feature, you can make a "hole" tool body, remove the flutes from that body before boolean subtracting the hole. That would ensure that the flutes are only in places where there was already material in the part.

    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications
  • EvanReeseEvanReese Member, Mentor Posts: 2,274 ✭✭✭✭✭

    I see Caden's point about adding the hole with the feature as well, however I can also foresee this being an issue for some workflows. I'd end up using this feature to modify my production designs for prototyping, which means I'd want to use the actual hole feature for the holes, since that's what's going to be in production, but I might want to add these after the fact and configure the suppression.

    Another approach is to ditch the idea of doing sketches and extruding and just do things that modify the hole geometry that's there like this.

    Evan Reese
Sign In or Register to comment.