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.

How to select only created sketch objects?

EFishEFish Member Posts: 16 EDU
I've been working on improving the part lightening script that I made, and have run into a issue that I can't think of a way to get past. I have the script create rectangles follow the path of selected lines to make the ribs between parts. But I'm running into the problem where the extrude operation includes automatically generated faces from enclosed regions. 
Like so:

When I want the selection to be like so:

Does anybody know how to do this?

Thanks in advance  :)
FRC Team 2471 Designer - Alumni
Seattle Pacific University - Mechanical Engineering
[email protected]
Tagged:

Best Answer

  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 556
    Answer ✓
    One option is to make multiple sketches and extrude them all.
    var toExtrude is array = [];<br>// sketch1, has one rectangle<br>toExtrude = toExtrude->append(qSketchRegion(id + sketch + 1));
    ...
    opExtrude(... "entities" : qUnion(toExtrude) ...);
    In Onshape, sketches really only have their 1d entities until skSolve is called, at which point all relevant regions are created (imprinted). So, without splitting into multiple sketches, the in-between regions are not easily distinguishable from the ones you want. If you modeled this without code you might rely on manually selecting the right regions instead of making many sketches, but with code we can just automate the sketches so that's easier!

Answers

Sign In or Register to comment.