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.

Somehow filter out default planes when using qEverything()

shawn_crockershawn_crocker Member, OS Professional Posts: 921 PRO

I have a little customized delete feature that lets me delete from the part studio the inverse of what is selected. Sometimes I will import data and there will be alot of stuff in the part studio. So, I derive the studio into other ones and I use this inverses delete feature to select the parts I want to keep and delete everything else. Then I can sort of divide and conquer the large studio into smaller chunks for precise editing. I cannot figure out how to remove the default planes from the selection of qEverything.

Best Answers

  • shawn_crockershawn_crocker Member, OS Professional Posts: 921 PRO
    Answer ✓

    Figured I might as well post my own answer here. Just found that this works

    var allParts = qEverything(EntityType.BODY);
    const sheetParts = qBodyType(allParts, BodyType.SHEET && ConstructionObject.NO);
    

    The "ConstructionObject.NO" was my missing condition.

  • shawn_crockershawn_crocker Member, OS Professional Posts: 921 PRO
    edited December 14 Answer ✓

    Ends up this works(for real)

    var allParts = qEverything(EntityType.BODY);
    const defaultPlanes = qUnion(
      [qCreatedBy(makeId("Right"), EntityType.BODY),
      qCreatedBy(makeId("Front"), EntityType.BODY),
      qCreatedBy(makeId("Top"), EntityType.BODY)]
    );
    allParts = qSubtraction(allParts, defaultPlanes);
    
    

Answers

Sign In or Register to comment.