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.

accept any planar profile: faces, sketch regions, sketch objects containing regions

adamohernadamohern Member, OS Professional Posts: 216 PRO
annotation { "Name" : "Profiles", "Filter" : (EntityType.FACE && SketchObject.YES) || SketchObject.YES }
definition.sketches is Query;
My feature extrudes planar stock to a fixed thickness. It can accept any closed planar profile for extrusion. I would like to allow planar faces, sketch regions, and sketch objects (picked from the feature list) so long as they contain closed regions.

How can I do that? The above works for sketches, but allows open sketches (bad), and doesn't allow faces (lame).

Comments

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,211
    edited May 2016
    Simply
    "Filter" : GeometryType.PLANE && ConstructionObject.NO

    Should work.  The second part is to disallow selecting construction planes.

    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • adamohernadamohern Member, OS Professional Posts: 216 PRO
    Beautiful!
  • adamohernadamohern Member, OS Professional Posts: 216 PRO
    Oh, this doesn't accept sketch objects selected from the feature tree. Is there a way to include those as well?
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,211
    Sorry, not if you want to restrict only to sketches with closed regions.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
Sign In or Register to comment.