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.
New Feature: Better Than Boolean

Coming to Onshape from Solidworks and Fusion 360 there was a gap in the feature set that I was missing from both of these tools. In Solidworks the feature was called Intersect and in Fusion the feature is called Boundary Fill. In each of these softwares the feature does basically the same thing, which is enable disgustingly lazy modeling practices where you can kitbash parts together keeping the functional bits of part A and part B and discard the leftovers in one go. I couldn't go on living without this jackhammer of a tool in my belt so I went ahead and developed my own implementation in Featurescript. I present to you: Better Than Boolean.
It works by decomposing input bodies into their overlapping regions and allows you to select which chunks of Venn Diagrammed part you'd like to reconstitute into a single manifold body, throwing away the rest.
Okay that's not that impressive, you could do that by selecting regions of sketch and just not extruding the bits you didn't want. But what if you wanted to make a manifold body?
For example let's say I want to 3d print a garden hose manifold and I wanted not to waste time modeling threads. Of course I'd derive a single part into a studio to simplify the modeling process. But I'd also have to define a cutting tool to remove geometry for the water to pass through, and I'd have to trim parts off of my tool body to make sure the internal bits don't interfere with each other or the manifold body. That's a lot of work, and I'm lazy.
Before:
After:
Now if you're familiar with either of those implementations of tools I mentioned before you'll be aware that they also allow enclosing of regions via planes and surfaces. This is not yet supported by this tool, but is something I might add in the future. Would probably require a complete refactor of the decomposition logic which is currently being done purely by bounding box checks, evCollision, and a whole mess of boolean operations under the hood. I'm putting this out there in the current state because my core use-case is greebling parts together and not surfacing operations. One day when I figure out how to do a plane sweep algorithm I might rework the core logic under the hood to add the surface and plane functionality.
Comments
Nice work! thanks for sharing!
This reminds me of a thread where somebody was looking for similar functionality based on Catia's "union trim" feature. I like your name a lot better…
@Caden_Armstrong then quickly created a "Union Trim" featurescript, that i've tried improving on to allow more than just a front/back selection:
at first i used vertices/mate-connectors on the parts for selection. not great with the mate-connectors only being selectable after a vertice has been chosen.
https://cad.onshape.com/documents/303afc92fcce5c7160b6e423/v/41b39f0f036dcba37ff7fcd9/e/bac457eadd65a703c9adabaa?renderMode=0&uiState=684ff66e310074774316462b
I recently started implementing a similar selection with manipulator points just like yours, but it wasn't finished.
So an edge case that may be a challenge is for a U or C shaped part where the manipulator point will fall outside of the actual solid. is it still clear to the user what they're selecting? (possible solution: overlay colored debug points with matched colored debug solids?)
(I suspect overlaying a debug point is the technique @Caden_Armstrong is using here. it looks great!https://www.linkedin.com/posts/caden-armstrong-39b531123_onshape-featurescript-activity-7333870186602627074-CWdL?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAAQWFABTglks_u9EnovxqJldkXGu9aXcno
Another difference with the union trim implementation worth considering is that there's a definition for a target and tools which may be handy when it comes to preserving identity (of the target you want to unite to) for later in the feature tree, and possibly if you want to keep tools…
Somehow I didn't think to look at Caden's Union Trim feature at all this whole time, even though I started this project as an exercise to try to do UI things like he showed in that LinkedIn post. I should take a peek later and see if maybe he solves some problems that I ran into more elegantly than I did.
I had thought about doing two selection filters for tools and bodies but the way this script works at the moment without opSplit supporting splitting parts with other parts, or an opBoolean that does the cellular decomposition in one step it's sort of always going to be destructive to part IDs.
If the Onshape devs would grant us one of those two improvements to the engine I'm definitely refactoring this whole thing the day that drops. The underlying logic has 3x the number of Boolean operations it needs to because of engine limitations.
In practice I found that the times I fed the script U shaped parts the centroid was almost always somewhere intuitive when the cells decomp so I don't mess with the color or placement of the debug points and manipulators unless two or more centroids overlap each other completely, then I shift the overlapping ones slightly in a random direction to prevent multiple overlapping points from hiding each other, color them blue, and sent a UI notification to the user that there's some nesting going on at the blue points. It feels pretty intuitive to me without burning performance on adding debug colors to the cells and making it hard to see through them.
@Derek_Van_Allen_BD
I like your implementation with point manipulators. In my feature I had to limit the number of bodies, but it was sufficient for the problem at the time.
This is the kind of feature that could be done a dozen different ways, and some number of compromises have to be made with the UI, regen time, part IDs, etc.
Another trick with point manipulators (and to keep them from being confusing) is to label them with sketch text → add debug entities → delete the text. Gives a label that is only visible while editing. You could grab part names in editing logic, store them, and then label each manipulator with the part name.
Custom FeatureScript and Onshape Integrated Applications
@Caden_Armstrong that's a pretty slick implementation. I could use that to draw sketch lines from the offset blue centroids back to their original location to make it clearer that that's where they're supposed to be.
OR I could waste precious rendering cycles drawing sacred geometry around the workspace in my Miter Warlock script to stay on theme.
AddDebugArrow ?
Custom FeatureScript and Onshape Integrated Applications