Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
Query for specefic edges that are looped around faces?
Lee_Hesketh
Member, Developers Posts: 148 ✭✭✭
Hello, still having difficulty with featurescript! I am trying to query these edges from a loop of faces:
I have already got the faces, but when I use qEdgeAdjacent(), it selects the end edges as well. I don't need these as I am hoping to use the edges as arguments for a fillet operation. How could I query this?
I have tried using a for loop to check if the edges are a specific length, but I have no way of storing them in a variable.
All help greatly appreciated.
Thanks
Lee Hesketh
I have already got the faces, but when I use qEdgeAdjacent(), it selects the end edges as well. I don't need these as I am hoping to use the edges as arguments for a fillet operation. How could I query this?
I have tried using a for loop to check if the edges are a specific length, but I have no way of storing them in a variable.
All help greatly appreciated.
Thanks
Lee Hesketh
There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!
Tagged:
0
Best Answer
-
ilya_baran Onshape Employees, Developers, HDM Posts: 1,202One way to do this query is to say "I want all edges such that all of their adjacent faces are in the given faceSet". The way to phrase it for FS is more complicated, unfortunately "Take all edge-adjacent edges for the given faceSet and subtract from them all edges that are edge-adjacent to faces edge-adjacent to the given faceSet but not in faceSet"
As code, it'll look something like (untested):const adjacentFaces = qSubtraction(qEdgeAdjacent(faceSet, EntityType.FACE), faceSet);<br>const adjacentEdges = qEdgeAdjacent(faceSet, EntityType.EDGE);<br>const containedEdges = qSubtraction(adjacentEdges, qEdgeAdjacent(adjacentFaces, EntityType.EDGE));
Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc5
Answers
As code, it'll look something like (untested):