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.

Querying the edges of a given face

tom_augertom_auger Member Posts: 116 ✭✭
Featurescript question: I have a query containing a single face, which I want to use as my axis for a circularPattern. However, the axis parameter (as far as I can tell) requires an edge not a face. How can I "convert" that face to an edge query such that i can use that as the axis?

Best Answer

Answers

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,671
    evAxis will accept a cylindrical face
    Senior Director, Technical Services, EMEAI
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,671
    edited January 2020
    Sorry I see you want to use circularPattern (I recommend using opPattern and calculating your own transforms using rotationAround). The axis parameter will probably take a cylinder, though never tried it. 
    Senior Director, Technical Services, EMEAI
  • tom_augertom_auger Member Posts: 116 ✭✭
    NeilCooke said:
    Sorry I see you want to use circularPattern (I recommend using opPattern and calculating your own transforms using rotationAround). The axis parameter will probably take a cylinder, though never tried it. 
    Thanks Neil for your answer. This leads me to two questions:

    1. I was a bit daunted by trying to calculate my own transforms and circularPattern is working out brilliantly. What is the reason you are suggesting opPattern? More performant? More flexibility / control? 

    2. The item that I wish to use as my axis is the same item that I"m having the user select as the pattern source (i.e.: the original 2D face to be extruded and then patterned). Thus it's starting its life out as a face, hence me wanting to figure out a way to query its edges (did I phrase that right?). I suppose I could use the generated extruded body as the "cylinder" in question, but as a point of learning, I'd like to understand how to get from a query containing a face to a query containing the edge(s) of that face.
  • tom_augertom_auger Member Posts: 116 ✭✭
    NeilCooke said:

    2. Use qAdjacent(face, AdjacencyType.EDGE, EntityType.EDGE); 

    Cool I was wondering about that one. The way I read the description was that it would only select "neighbours" which I took to mean edges belonging to OTHER faces, but of course, they would also be part of the "seed" face too, so that makes sense.

    I"m trying it and while I'm not getting an error exactly, I'm not getting the results I expected. Let me sit with this for a bit and if I continue to have issues I'll post another question.

    @NeilCooke !!


Sign In or Register to comment.