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 help for vertices?
S1mon
Member Posts: 2,980 PRO
I'm trying to construct a query filter which will take individual vertices, edge points, mate connectors, and/or whole sketches. When I select a whole sketch I want it to use any sketch points, or vertices of sketched lines/arc/etc, but not from construction sketch entities. I don't really understand "ConstructionObject.NO" since that doesn't seem to remove construction entities from sketch selections.
Tagged:
0
Comments
Vertices themselves aren't marked as construction, but edges are.
You could take all of the vertices, find all vertex adjacent edges.
And then find all that are construction edges.
And then take all of the vertices adjacent to construction edges,
and subtract from your original query.
Where seed is a query of vertices
and then take this query and subtract it from your original query to remove all the construction vertices.
var constructionRemoved = qSubtraction(seed, qAdjacent(qConstructionFilter(qAdjacent(seed, AdjacencyType.VERTEX, EntityType.EDGE), ConstructionObject.YES), AdjacencyType.VERTEX, EntityType.VERTEX));
Custom FeatureScript and Onshape Integrated Applications