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.

Options

given face query, find corresponding face on duplicate body after opPattern

adamohernadamohern Member, OS Professional Posts: 216 PRO
I'm using opPattern to create an exact duplicate of a couple of bodies. The user has selected a face on those bodies as well. How do I find the corresponding face between the original (the one the user selected) and the duplicate body created by the opPattern?

Comments

  • Options
    lanalana Onshape Employees Posts: 693
    You can use tracking query:
    var trackFaceQuery = startTracking(context, selectedFaceQuery);
    opPattern(...)
    var patternedFaces = evaluateQuery(context, trackFaceQuery);

    It is a little tricky to recognize the pattern instance to which the resulting faces belong.
    In case of body pattern, you get nInstances - 1 face in order corresponding to the order of the instances.
    I have a task of making it easier to recognize pattern instance
Sign In or Register to comment.