Grasshopper surface substraction - 2 questions

yeah, no offense meant or taken but you’re changing the way i model the club face pattern for a simplistic pattern that doesn’t count as helping or my work for my design. At best you just suggest to flatten the b input of the surface subtract which i already tried. The real problem is how the subtract module works…

i did post a file on the second reply to which you replied. Please let’s be honest about effort here. Im not wasting hours trying for nought…

seriously i dont like at all people who tell me im wrong instead of providing solutions… I was a guru in another dev environment and never liked to be bound by a ‘limiter’ kind of opinion…

I resolve this issue by disabling the resolver option. And recomputing each change. Now the CPU goes to work for 5 minutes instead of 150 minutes…

And the model came out right…

Putter crasher 1.1.gh (56.4 KB)

Yes, doing your surface subtraction from a python script is much faster than using the Solid Difference component (12 sec opposed to 1.1 minutes on my old iMac, using your geometry).

solid_diff_test.gh (73.2 KB)

-Kevin

2 Likes

Finally! GH code and geometry the rest of us can see. 704 spheres, not 200+.

1.2 mins. in R6, no toast. What a bonehead.

.5 seconds on my PC now…

3 minutes compute time with 50x40 grid…

The issue is ‘resolver’ on or not on… Resolver on = 30 minutes…
No custom code…

Sorry Kev but it didnt work well your way at step 2 out of 4 to go…

my mistake, wrong inputs… Now works great… results tomorrow…

Thanks Kev R for the great and clear help. Now recompute takes 1.5 seconds…

Makes you wonder why some of these modules are so slow.

1 Like

You could also see a speed increase by tiling the surface you’re subtracting the spheres from. I made a test using the file @Joseph_Oster posted.

  • Subtracting 625 spheres with GH SDiff component took ~ 43.8 sec.
  • Subtracting 625 spheres with python BooleanDifference command took ~ 11.5 sec.
  • Subtracting 169 spheres with with python BooleanDifference command + 2x2 ArrRec took + SUnion took ~ 3.6 sec.
  • Subtracting 49 spheres with with python BooleanDifference command + 2x2 ArrRec took + SUnion took ~ 7.2 sec.

timing_comparison.gh (20.8 KB)

Reducing the number of spheres subtracted gives a speed increase, but if the surface is divided into a larger number of tiles the speed increase is offset by the time if takes to join the tiles back together with SUnion.

I also tested to see if the python BooleanUnion command was any faster than the GH SUnion component, and the speeds are about the same.

-Kevin

Thanks Kevin. The python you provided is really fast even chained 4 one after another.

1 Like