Box recursion issue

Hello everyone,

I am newbie to C# and I am trying to make a Box Octree by doing a recursive subdivision. I works fine with 1 depth, but then it stops working.

Here’s the component I’ve built so far, in case anyone has any spare time to take a look. Thanks in advance for any help! :slight_smile:


BoxRecursion.gh (87.3 KB)

Attempting to download your def yields this:

Other than that I have tons of Recursion things. I assume that you want to “voxelize” a given collection of objects (Pts, Curves, Breps, Meshes, Cats or Dogs). If so the fastest way is get a mini Box (that’s real-time since we are talking Interval ops) out of a Valid object Box in one go: i.e. 3 nested Loops … and then call an “inclusion” check Method of some sort (see 3 used ) for evaluating the mini Box.

Like:


But obviously you can do the job via Recursion as well (seriously slower since the inclusion is testest again and again (per Loop): so for this particular case Recursion is the art of pointless):





Moral: test/check your file (unless my Firewall thinks bananas).

NOTE:I get the same whenever I try to download anything, idk if it is Avast Antivirus. Let me upload the file from another computer.

In regards to the three different methods, I have tried both the slower and faster options, but in the future, I would like to keep the box corners anchored to the mesh or a similar object.

Creating boxes quickly is not the main issue in this case. The problem lies in the recursion process, where the large boxes need to be kept inside and only the ones whose corners do not fall inside the mesh should be subdivided.

BoxRecursion.gh (87.3 KB)

btw, what do you think about triumph?

Same here for about a week, and I don’t get this on another computer that doesn’t have Avast, so all the evidence seems to point at the same culprit.

It’s a matter of Karma and/or Avast (life sucks).

BTW: Speed matters: imagine getting the same result in 100 ms (OK) or in 5647 ms (why bother? better buy a HarleyDavidson - maybe the crap thing is a bit faster).

BTW: For the inclusion: (a) test the min box center, (b) test all the mini box corners, (c) test ccx Events using a given mini Box (as Mesh) VS object (as Mesh) .

BTW: Mesh contains Pt (is point inside, that is) … works when it works (life sucks).

Moral: life sucks.

Sure, I have installed AVG and I don’t get any warning. Perhaps someone from McNeel could provide us with some insight into the issue.

Rar the %%%#$ thing (that &^#% Avast did it again).

Moral: I hate computers (like my sins).

BTW: file arrived AT LAST. I’ll check it ASAP.

BTW: 146 lines in main? No - no (a RS rider MUST do C# things properly). And where is the Recursion in that C#??? (or you mean that you want to use Recursion?).

PS: If we forget these pointless reactive Ohlins … this is proper (sell RS > get RR).