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 filter MeshGeometry.YES not working

I want to filter a query param for only mesh vertices. Here's what I have:
annotation { "Name" : "Mesh verticies", "Filter" : EntityType.VERTEX && AllowMeshGeometry.YES && MeshGeometry.YES } definition.points is Query;
But it's highlighting MeshGeometry.YES
with the message "Unhandled enum type MeshGeometry". I get this even if it's the only filter enum I use.
Looking a the documentation for UI queries here it seems like it should work since MeshGeometry is on the list. What am I missing?
Best Answers
-
MichaelPascoe Member Posts: 2,120 PRO
You could try this:
annotation { "Name" : "Bodies", "Filter" : EntityType.VERTEX && AllowMeshGeometry.YES && !BodyType.POINT } definition.entity is Query;
Oh wait, never mind. I was just checking against the origin..
Looks like it isn't supported by annotations yet, or maybe unhandled? All of the other ones specify that they can be used in annotations.
https://cad.onshape.com/documents/12312312345abcabcabcdeff/v/6d1c0e255e851eaf6831cf72/e/9fde5dffaf8d4e4c99aaa22cPerhaps it's only to be used with:
qMeshGeometryFilter(queryToFilter, MeshGeometry.YES)
You could always use some edit logic to get rid of non mesh points as they are clicked.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴0 -
ilya_baran Onshape Employees, Developers, HDM Posts: 1,226
I'll fix the doc — thanks for pointing out.
Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc1
Answers
You could try this:
Oh wait, never mind. I was just checking against the origin..
Looks like it isn't supported by annotations yet, or maybe unhandled? All of the other ones specify that they can be used in annotations.
https://cad.onshape.com/documents/12312312345abcabcabcdeff/v/6d1c0e255e851eaf6831cf72/e/9fde5dffaf8d4e4c99aaa22c
Perhaps it's only to be used with:
You could always use some edit logic to get rid of non mesh points as they are clicked.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Thanks Michael. I'm not sure what "unhandled" actually means. I considered the Editing Logic solution, but I hoped to avoid it. I'll probably just leave it as is for now.
@ilya_baran I hope I'm not bothering you with unimportant things, but the list of possible filters for Query Params in the documentation here does include MeshGeometry so at some point it should be made to work, or removed from the list.
I'll fix the doc — thanks for pointing out.