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.

Suppressing automatic filling of disjoint polylines and keeping sketches extrudeable

paul_ardenpaul_arden Member, Developers Posts: 92 ✭✭
I'm working on a little FeatureScript just as a learning exercise which generates a sketch based on the 10 PRINT routine. It's still rough but I am hitting a problem early on. Onshape is creating faces correctly for my closed polyline entities, however it is also creating additional faces if multiple polyline objects vertices join to form a face, despite the fact that these are separate entities. See this image:

The areas inside the diagonal boundaries should not be filled with a face. While when using Onshape outside FeatureScript I usually think of this as a nice feature, in this case I don't want that behaviour. Is there any way to suppress it?

It may or may not be related, however when I go to extrude the sketch that the feature generates it does not work selecting the entire feature at once. I have to select the individual faces one at a time. Doing the extrusion inside the FeatureScript fails as well if I try and query all entities on the sketch with qSketchRegion (commented out in the shared version below).

You can check out the Onshape document here. FeatureScript code is WIP, just looking to resolve these two issues first.

Best Answers


  • paul_ardenpaul_arden Member, Developers Posts: 92 ✭✭
    Using a sketch per item fixed the merging issue thanks. Just looking at the extrusion now, since I now have lots of sketches in the feature I am not sure what the correct query would be to get the regions for all of them rather than just one (I want to do a solid extrusion). I'm looking through the docs now but if I am missing something obvious...
  • paul_ardenpaul_arden Member, Developers Posts: 92 ✭✭
    I have it working by making an array of qSketchRegion's then giving that to qUnion, however not sure if that is the most efficient mechanism. At least it is giving me the desired result.

  • paul_ardenpaul_arden Member, Developers Posts: 92 ✭✭
    Thanks, that's got it. I am not sure if it is related however I am now trying to subtract the solid generated from another solid and I am getting a BOOLEAN_INVALID error thrown. This only seems to happen for certain numbers of elements (the features takes a length and width which is the number of those little elements it will make). It may be it should end up in another thread but this is a version of the document which has the invalid boolean regeneration error:


    It has been shared with support also. I am guessing it might be due to the way the shapes are coplanar along some of their faces but not sure.
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 963
    Making an individual sketch for each hex thing is probably more expensive than necessary. If you want a query for all the faces at once, in your specific case, since the faces are all the same size, using qSmallest should work (it returns all the smallest faces).  There might be some other cleverness, but an alternative is also using an opPattern.
    Ilya Baran \ Director, Architecture and FeatureScript \ Onshape Inc
  • paul_ardenpaul_arden Member, Developers Posts: 92 ✭✭
    Thanks, I added an expansion factor of 10 micrometers (much smaller didn't seem to work) around the edges. I will have a play and see if I can push it lower but that definitely worked. So now I have my 10 PRINT coaster ready for slicing and 3D printing.

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 2,746
    Parasolid has a Boolean tolerance of 10 microns so that's the lowest you can go. You've got better eyesight than me if you can tell the difference!  :p
Sign In or Register to comment.