Why this difference with Solid Difference?

Why this difference with Solid Difference? The blue gear has a drain in the middle, but the (almost) identical pink gear is missing the drain. Why and how to solve this on a generic way?
See attached the gh file. (sorry, the file is very slow because of the rail revolve command and the solid difference command) HerringBoneGearsV1.3_WIP.gh (111.8 KB)
PS In this case it is a mirror, but in many cases it will not.
Cheers Bas

Thanks to Seghier khaled, here a bit faster version:
HerringBoneGearsV1.4_WIP.gh (109.2 KB)

For more reliable result, I would suggest you to reduce the control point count of your profile curve something like the attached. It will also reduce your calculation time significantly.

HerringBoneGearsV1.3_WIP_re.gh (120.1 KB)

The profile curve of the gears is coming directly from: Involute Spur Gear Builder from Hessmer. I am not sure if I should change these. Will the gear profile be still correct enough?
Cheers, Bas

wierdly, by replacing the pipe with an identycal revolved surface, it works :slight_smile:

HerringBoneGearsV1.4_WIP_Re.gh (110.0 KB)

Yes that is wierdly! Something for McNeel to debug??

Don’t hold your breath. It’s just one more quirk to cope with.

1 Like

Is that R7 only? I don’t see it in R6.
The pipe is missing from SDiff in both ‘Gear 1 Solid’ and ‘Gear 2 Solid’.

I tested it with version 7 only

I replaced the other pipe as well. This is the result: HerringBoneGearsV1.5_WIP.gh (106.8 KB)

with 5 years of boolean with spheres on my shoulders ( the Bubble Cabinet - AleInno Design ) I "kind-of understood" the software does not like when booleans happen to intersect exactly over the seams of a solid :slight_smile:

for instance, I baked the gear and the pipe:

the boolean subtraction fails also in Rhino7, and the top seam of the pipe (thick yellow line) is exactly along the intersection with the gear

by scaling-up the pipe by 1.001, the boolean works perfectly

I know this is not the solution to the problems, but in most of the cases it allows to continue the work without major drawbacks

las definition you posted using revolve instead of both the pipes works perfectly in my pc, hope it works fine also in your?

1 Like

If you are interested , i created this file a while ago.


yes, I’m on R7.3.21026.13001, 01/26/2021

Seghier khaled Are you willing to share this script?

So Solid Difference is not working because the seam of the pipe is automatically set to upward and than coincide with the seam of the gear. So if the seam of the ‘pipe’ is pointing in- or outwards the problem with the solid difference between the pipe and the gears should be solved. So we need a pipe command with a seam position control. @DavidRutten can you put that on the wish list?
And…a warning in case that the seams coincides would be very welcome.

Test and improve it if you want

gear4.gh (19.9 KB)

1 Like

Hi Seghier,
Thank you for sharing. I hope someone takes the effort to improve your script for gears with different number of teeth, and an option for external gear; a rack; and internal gear. My skills in Python are not so good.
See you here again,

Check this , no python

gear5.gh (26.5 KB)

There is a website to create gears with possibility to export code for Blender:


This one may help you