<kintel>
I ran ctest -R cgalpngtest_for-tests with fast-csg disabled
<kintel>
Most other tests are fine, but for some reason not this
<kintel>
My guess is that we need to regenerate the image, but I wonder why
erectus has quit [Ping timeout: 256 seconds]
erectus has joined #openscad
LordOfBikes has quit [Ping timeout: 252 seconds]
<InPhase>
kintel: Do you mean why did it fail?
<InPhase>
kintel: It's the green bits frmo the difference.
<InPhase>
s/frmo/from/
<kintel>
It looks like all the other tests have green in the expected images too
<InPhase>
Well we had a lot of those that were fixed.
<kintel>
So you think it could be a combination of some old, rendering difference, combined with the color, that triggers it?
<InPhase>
The color shift alone should trigger it I think.
<InPhase>
Provided it has the right sizing.
<kintel>
Not sure, there are way larger color shifts in other tests
<InPhase>
Have an example?
<InPhase>
I was originally planning on setting a threshold for how different 3x3 blocks could be. But then I tested with a threshold of 0, and it gave the desired result, so I left the threshold as any non-zero persistent difference across 3x3 blocks.
<InPhase>
But since I had already gone and calculated the difference, I just reported how different they were then.
<kintel>
humm, then there is something about the test I don't understand :/
<InPhase>
So it runs entirely on that threshold of checking for a 3x3 block having a consistent directional change.
<InPhase>
Now what I forget is what I did with color channels. Let me check.
<kintel>
yeah, there must be something else that deals with the difference colors
<InPhase>
Oh wait. There's one arbitrary threshold: # Truncate pixel-to-pixel differences less than 3 to 0.
<InPhase>
That's before it does any analysis.
<InPhase>
And done correctly on an absolute value check.
LordOfBikes has joined #openscad
<InPhase>
Ah, right. I handle each RGB color channel separately.
<InPhase>
It's hiding in a .ravel(), which I commented so future me could remember.
<InPhase>
So if it is consistently different by more than 2 pixels within any color channel on any 3x3 block it fails the test.
<InPhase>
And consistently meaning in the same direction.
<InPhase>
Let me phrase that again... I flubbed the text.
<InPhase>
So if it is consistently in the same direction different by more than 2 for 0-255 values within any color channel on any 3x3 block it fails the test.
<InPhase>
So if there's anything not hitting that then either there's a weird bug missed, or it didn't actually run the test on them, or we have to question the laws of mathematics. :)
<kintel>
Would it be trivial to output an image highlighting the triggered errors?
<kintel>
Anyway, I'll play around with some tests and see if I discover something
<kintel>
I also don't quite understand the SCADFILES_WITH_GREEN_FACES stuff in CMakeLists.txt
<InPhase>
I see you have much experience breaking tests. ;)
<kintel>
As long as I can point fingers afterwards. Not much fun to break my own ;)
<InPhase>
All you have to do is suggest that you think peepsalot changed that during Covid. He'll never remember that he didn't. That usually works for me.
<kintel>
haha, perhaps me not writing OpenSCAD code during covid was some sort of self-preservation mechanism
<InPhase>
Well that failed quite a few.
<InPhase>
Unless my script has a typo in it...
<InPhase>
Yep, I typoed...
<InPhase>
There, now I finished the first 80% and the second 80%.
<InPhase>
But I guess we want this in the html, right? Where does this magic come from...
marcus has quit [Read error: Connection reset by peer]
marcus has joined #openscad
<kintel>
Yeah, ideally. But that's less magic to pull together. Having the option to manually check what it complained about is probably enough for the mysterious cases
srk_ has joined #openscad
srk| has joined #openscad
srk has quit [Ping timeout: 240 seconds]
srk_ has quit [Ping timeout: 240 seconds]
srk| is now known as srk
<InPhase>
kintel: I have it in the html, but a secondary problem arises.
<InPhase>
We have no masks for these pdf comparisons, which go through the png path of this html generator...
<InPhase>
pdfexporttest_simple-pdf
<InPhase>
Not sure what that actually runs under actually...
<InPhase>
Also, I can't spot what the difference is by eye... lol. This one is harder to see.
<kintel>
what do you mean by "masks" ?
srk has quit [Ping timeout: 252 seconds]
<InPhase>
Oh... My bad. This actually failed because of my script failing...
srk_ has joined #openscad
<InPhase>
I went to insert a red mask...
<InPhase>
And this was the first time my script made a color axis assumption.
<InPhase>
And these tests are greyscale inputs into it I think.
<InPhase>
So there's literally no change, but it can't put color into a greyscale image...
<InPhase>
Always with the little things...
srk_ is now known as srk
<kintel>
Yeah, nothing is ever trivial in the real world : /
<InPhase>
It's wider, but I don't think we want to shrink the images, and I think it's better kept horizontal. But open for feedback.
<kintel>
Looks good!
<InPhase>
I need a ctrl- on my particular browser window for it to fit the images, but that's fine by me.
<kintel>
the edges of differences not showing: is that just the 3x3 block stuff being lenient?
<InPhase>
Like on the lazy union fail?
<InPhase>
That's because there's a thin background strip in between those two blocks.
<kintel>
all of them, e.g. the first image
<InPhase>
So the difference check shows no difference between there.
<InPhase>
The first one omits the corners because they aren't 3x3 consistent differences.
<kintel>
gotcha
<kintel>
One minor potential issue, if the images themselves have red in them that might be less fun to look at
<InPhase>
The 3x3 blocks are actually done in an overlapping manner, so I back extracted 3x3 to "all pixels that contributed to a failing 3x3 block"
<kintel>
One idea could be do gray-scale and slightly dim the original before overlaying the red, but that's a small detail
<InPhase>
Right.
<InPhase>
I tried to pick the most annoyingly bright red I could think of, with that in mind.
<InPhase>
It's (255, 40, 40)
<kintel>
and for future advanced stuff, allow to toggle between different views, but that requires javascript
<kintel>
I've seen systems like this which toggles between the images every second as that makes it easier to spot differences, but that's way out of scope of what you just started :)
<kintel>
Anyway, I'm happy to run with this for a while
<InPhase>
Ok. Let me PR it.
<InPhase>
Hopefully there are no new failures it triggers that I missed...
<InPhase>
Maybe I should rerun without those lines commented out first.