RE: LDCad script integration of LDInspector's collision detection
2022-09-03, 10:01 (This post was last modified: 2022-09-05, 7:31 by Stefan Frenz. Edit Reason: text clarified )
2022-09-03, 10:01 (This post was last modified: 2022-09-05, 7:31 by Stefan Frenz. Edit Reason: text clarified )
Thank you for your examples, now there are at least three bugs less in the Lua-port.
The results seem to be mathematically correct, but I'm not sure if they are what is wanted. Setting tolerance to 0.0001, the 8865 model is marked like this:
Increasing the tolerance to 0.1 much less is marked:
As LDraw is by design somewhat angular (see my yesterday's post #17), setting the tolerance is a trade-off between false-positive and false-negative. I thought about calculating a ratio "overlapping" vs. "non-overlapping" volume, but this would (a) be hard to implement and (b) would not solve the underlying problem.
The results seem to be mathematically correct, but I'm not sure if they are what is wanted. Setting tolerance to 0.0001, the 8865 model is marked like this:
Increasing the tolerance to 0.1 much less is marked:
As LDraw is by design somewhat angular (see my yesterday's post #17), setting the tolerance is a trade-off between false-positive and false-negative. I thought about calculating a ratio "overlapping" vs. "non-overlapping" volume, but this would (a) be hard to implement and (b) would not solve the underlying problem.