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.
How to check if edges from different bodies or sketches are geometrically identical?

Hi everyone,
I'm trying to figure out if there's a reliable way to determine whether two edges from different entities (such as a sketch and a solid body) are geometrically identical using featurescript— meaning same shape, size, and position.
Let's say I have a square sketch and I extrude it to create a cube. Now, I want to check — for each of the four edges in the sketch, which edge(s) in the resulting solid body are geometrically matching (i.e., coincident and identical in size and shape).
I understand that qMatching()
can find identical geometry within the same owner body, but as far as I know, it doesn’t work across different parts or between sketches and solids.
Is there any built-in method or workaround (like using evaluators or geometric comparisons) that could help detect this kind of edge matching across different entities?
If anyone has tackled this kind of problem — or has suggestions for comparing edge geometry (type, endpoints, radius, etc.) — I’d greatly appreciate your input!
Thanks in advance!
Answers
Interesting challenge. For your extruded square example, you could not bother comparing the edges and use this instead to query them:
const startEdges = qCapEntity(IdOfExtrudeFeature, CapType.START, EntityType.EDGE);
If you need something more generalized, you could explore using evCurveDefinition(), which will return what kind of curve it is and how it's defined. From there you could use tolerantEquals() to compare things like location and radius.
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
So to find geometrically matching eges is very dependent on how they should match. in what aspects should they be equal? can you explain a little more about the end goal you're trying to achieve?