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.

Quering relevant sketch vertices

konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
edited July 2017 in FeatureScript
I have an original sketch, with some dimentions refferencing to variable. My feature takes this sketch as FeatureList and i apply identityTransform to this sketch in a loop varying value of the variable, so i'm obtaining a family of sketch bodies, among which I need to select only the sequence of the vertices, which are obtained from the selected vertex of the original sketch. So the question is how to get queries of sketch entities, that are derived from user-defined sketch using FeatureList, without knowing internal sketch id's of the entity in original sketch (or how to get internal sketch id of the entity from user defined sketch)

Comments

  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    Because a feature pattern is genuine code reexecution of the original feature, there are no real correspondences built between one instance of the pattern and the next. As you've said, the sketch ids, in practice, will match between runs, but as you said, that's only useful if you had the original id.

    In your case, I think the workflow of creating a single point body in the sketch (as you've done already) is the best workaround available. To make that interface clear, I imagine your feature could reportFeatureInfo(... "Selected sketch must have a single sketch point defined") if you get zero or 2+ points in the sketch.

  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
    ok, thank you @kevin_o_toole_1. one more question, i'm going to use optionally local coordinate system (defined by MC) and that MC can be related to the mooving parts of my sketch so from the one side a had to treat it as FeatureList, but from another side i need to calculate coordinates relatively to that MC so I need it to be of Query type. can I for example define input field for MC as Query, and then make a copy of that MC query as FeatureList?
  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    Unless I'm misunderstanding, I would say just take the mate connector as a query. If you create the curve in the position of the current sketch, you can transform the final result to the given mate connector as the last step. No need to involve the feature list for that.
Sign In or Register to comment.