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.

Query filter help for vertices?

S1monS1mon Member Posts: 3,044 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.

Comments

  • Caden_ArmstrongCaden_Armstrong Member Posts: 195 PRO
    edited November 22

    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));

    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications
Sign In or Register to comment.