Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.First time visiting? Here are some places to start:
- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
querying faces made by opBoolean
Evan_Reese Member Posts: 1,671 PRO
I don't think that opBoolean doesn't actually "creates" faces, but what's the best way to find the faces that an opBoolean used. In other words, if I cut a cylindrical hole with opBoolean, how can i query all of the faces of the cylinder? Better yet, how might I get a face query to persist after opBoolean? For example, I have an extrude and I only want the cap entities. It doesn't seem that i can query them after the body is used in opBoolean to subtract.
Evan Reese / Principal and Industrial Designer with Ovyl
konstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭Say if you have face created by opExtrude(context, extrudeId, ...) after it is created you can start trackingvar capFacesTracking = startTracking(context, qCapEntity(...));then you performing operations and after each one tracking query should resolve to entities that are derived from entities you started tracking. That means that if you boolean subtract tool body created by extrudeId from target tracking query will resolve to face owned by the target which was imprinted from the tool cap. Sometimes you need to use startTracking() with map argument and set "trackPartialDependency" option to "true" and make sure that from the tracking query you filtered entities of a specific type owned by the specific body because in that case it can generally resolve to entities of multiple types.1
I've seen makeRobustQuery() mentioned but wasn't sure what it was for. Thanks!
I tired it and I'm still not able to get this thing working, and maybe it's time to actually just share my code instead of asking my general questions. I'm working on a feature to convert holes into a droplet shape so they can be 3D printed without supports. I'm using opSplitByIsocline which gives me the right droplet angle for any hole based on its axis relative to the printer's Z direction (holes angled up at 45° don't need support, for example). Because I'm using that though, I'm building my droplet shape with 3 opExtrudes and 2 opFills. I want to track the opFill faces through the boolean which subtracts them from the main body. This is because there's an edge-case when the start or end faces of the hole tilt a certain way that creates a little sliver of material (see the orange highlighted face below). I want to use opDelete to clean these up when they show up. Here's my code. I'm sure there are lots of ways to improve the whole thing, but this is the last thing I want to solve before I release the feature for public use. Any ideas how to query that face after opBoolean(context, id + "cutDropletHoles"? Or maybe there's a better way to avoid them altogether.