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.

Create group/selection of entities/bodies to be used as input

nicolas_mattianicolas_mattia Member Posts: 2
Hi all,

I'm trying to create a selection or group of entities from FeatureScript, so that other (non-custom) features can use it as input.

For context, I've written a custom feature that generates many surfaces:



And I would then like to be able to use the "Thicken" feature on those surfaces. I can only come up with those two options:

1. Manually select all surfaces
2. Create a custom feature that selects the surfaces and uses opThicken

Option 1 is not ideal because every time I change my custom feature (creating many surfaces) then I need to re-select all the surfaces. Option 2 seems overkill since it's basically just the "Thicken" feature.

I've also tried creating a composite part with all the surfaces but unfortunately the Thicken feature does not allow a composite part as an input.

Any help appreciated! It's my first forum question, hope this is proper etiquette.

Link to document: https://cad.onshape.com/documents/a3b61bae25f3452f1074e9ae/w/b54732bb3b931a0333f679c3/e/700532349601bc351400e6d6

Comments

  • mahirmahir Member, Developers Posts: 1,307 ✭✭✭✭✭
    Unfortunately, a static group or selection in the feature tree isn't really an option. Thicken takes as input discreet faces or surface bodies. These are the 2 options I can think of.
    1. Include the Thicken into your featurescript.
      Since you're generating the surfaces within the featurescript, you could easily reference them when creating the Thicken from within that same featurescript.
    2. Generate the surfaces such that they are connected and continuous.
      This way the output is a single surface body that is easily selected as an input for Thicken. I'm guessing there would need to be a cleanup cut to get rid of the connecting material, but that's still easier than manually selecting a bunch of surfaces every time the feature changes.
  • eric_pestyeric_pesty Member Posts: 1,891 PRO
    I was wondering if you could "cheat" by creating a composite but unfortunately thicken doesn't allow a composite as a selection (even though it does allow selecting surface objects in the instance list). I would have hoped that if you selected a composite it would just find all the included surfaces but apparently not...
  • S1monS1mon Member Posts: 2,989 PRO
    Is there any reason not to do the thicken in the same custom feature that creates the surfaces?

    @Evan_Reese uses for Selection Fillet and Selection Draft, if you want a more generalized way of parametrically selecting surfaces to thicken.
  • eric_pestyeric_pesty Member Posts: 1,891 PRO
    The problem with adding the "thicken" capability in a feature like this is that it adds work for very little value and removes flexibility. It would be better to just be able to use native thicken feature and that's another use case for a "parametric selection" tool as discussed in:

    https://forum.onshape.com/discussion/18616/implement-selection-filters-like-evan-reeses-selection-fillet-or-selection-draft-everywhere
    https://forum.onshape.com/discussion/10299/associative-and-multyconditional-entity-selection-for-create-selection-tool


  • S1monS1mon Member Posts: 2,989 PRO
    @eric_pesty
    No question. I strongly support a native full parametric selection tool.
Sign In or Register to comment.