Remix.run Logo
throwup238 9 hours ago

Heh, me too. I'm on my third rewrite after a bunch of promising false starts.

Unfortunately geometric kernels are one of those things where unknown unknowns will bite you in the ass really hard because none of the content is really in the training data for LLMs and pathological/degenerate cases aren't just common but expected. IME it's not something that can be vibe coded with current models, if ever, without intimately understanding the algorithms.

I can't do a thorough review of waffle iron right now but just off the top of my head: it doesn't look like you have a tolerance context? The tolerances look like hard coded constants (TAU_MODEL/TAU_WORK/MATCH_TOLERANCE/etc) but that's fundamentally unworkable. Each operation and vertex/edge/etc needs to track accumulating errors and apply them to downstream point classification. Interfaces like Kernel::boolean_union(a, b) are the wrong abstraction because it's missing tons of information/functionality like accumulating FP errors, evidence/proofs, rollback, etc.

Keep working at it! It's worth the challenge.

SequoiaHope 4 hours ago | parent | next [-]

Thanks! I had a lot of false starts too. I asked fable in my repo about your question and it said there are two schools of thought on tolerance tracking. My kernel uses exact predicates which fable says eliminates the need to track tolerances the way ACIS does. I tried to paste the full reply but my comment seemed to have been auto flagged.

throwup238 an hour ago | parent [-]

I think Fable gave you a load of nonsense. Like I said, this stuff isn’t really in the training data and academic research is disconnected from commercial CG (and I’m pretty sure its wrong about ACIS - iiuc ACIS used global tolerances and its one of the reasons it lost to PS).

Robust/(adaptive) exact predicates and tolerance tracking solve two different things and a geometric kernel needs both, especially if you plan on letting models use meshes, lattice, or freeform surfaces (which is where the industry is headed for simulation driven design). The constructions you feed the exact predicates need to already account for tolerances to be correct (i.e. pcurves, vertices, etc) and the second you do any math on them - before feeding it to the predicate - you need tracking. Predicates don’t eliminate the floating point math.

(Grain of salt and all that, I don’t really know what I’m talking about)

4 hours ago | parent | prev [-]
[deleted]