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.

qCreatedBy(sketch_id, EntityType.EDGE) returns more edges than I drew

jiahao_lee103jiahao_lee103 Member Posts: 14 EDU
edited December 2024 in Community Support

I drew a sketch with 11 edges, but qCreatedBy(sketch_id, EntityType.EDGE) returned 24 edges, and I parsed these edges and found that some of them were overlapping (all parameters were the same, except for deterministicId). Why is this happening? What are these "copied edges" used for?

Best Answer

  • lanalana Onshape Employees Posts: 718
    Answer ✓

    Since you are talking about edges I'll assume you've used qCreatedBy(sketch_id, EntityType.EDGE). Sketch creates wire bodies corresponding to sketch curves, but also sheet bodies imprinted on plane (only if there are closed regions). You can use qCreatedBy(sketch_id, EntityType.EDGE)→qBodyType(BodyType.WIRE) to get only wire edges.

Answers

  • lanalana Onshape Employees Posts: 718
    Answer ✓

    Since you are talking about edges I'll assume you've used qCreatedBy(sketch_id, EntityType.EDGE). Sketch creates wire bodies corresponding to sketch curves, but also sheet bodies imprinted on plane (only if there are closed regions). You can use qCreatedBy(sketch_id, EntityType.EDGE)→qBodyType(BodyType.WIRE) to get only wire edges.

  • joshtargojoshtargo Member Posts: 299 EDU

    does the arrow behave the same as a UNIX "|" pipe command? Essentially it says take the output of the previous thing and use it as the input of the next thing?

  • lanalana Onshape Employees Posts: 718

    "use it as the first argument of the next function" Look for here

Sign In or Register to comment.