teepee changed the topic of #openscad to: OpenSCAD - The Programmers Solid 3D CAD Modeller | This channel is logged! | Website: http://www.openscad.org/ | FAQ: https://goo.gl/pcT7y3 | Request features / report bugs: https://goo.gl/lj0JRI | Tutorial: https://bit.ly/37P6z0B | Books: https://bit.ly/3xlLcQq | FOSDEM 2020: https://bit.ly/35xZGy6 | Logs: https://bit.ly/32MfbH5
califax has quit [Remote host closed the connection]
califax has joined #openscad
guso78_ has quit [Ping timeout: 248 seconds]
lf94 has quit [Ping timeout: 272 seconds]
J23k92 has joined #openscad
J23k38 has quit [Ping timeout: 248 seconds]
ali1234 has quit [Remote host closed the connection]
ali1234 has joined #openscad
kintel has joined #openscad
_whitelogger_ has joined #openscad
peepsalot has quit [Remote host closed the connection]
peepsalot has joined #openscad
mmu_man has quit [Ping timeout: 255 seconds]
guso78 has joined #openscad
lf94 has joined #openscad
<kintel> InPhase Do you know how this test issue slipped through? https://run.plnkr.co/preview/clo7xdocn00063b6w0s38o4up/
<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.
<InPhase> diff_cnt = np.sum(pixel_diffs!=0); perc_diff = 100.0*diff_cnt / pixel_cnt; if perc_diff == 0: print('3x3 image block comparison successfully passed.')
<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
<kintel> ok, this is interesting:
<kintel> Most expected cgalpngtest images do have the green difference color: https://github.com/openscad/openscad/tree/master/tests/regression/cgalpngtest
<kintel> One exception is the failing test
<kintel> ..and that particular test image was updated by https://github.com/openscad/openscad/pull/4506
<kintel> Perhaps it was done in error? But that doesn't sound like you ;)
<InPhase> Hmm. Is this a mac difference thing?
<InPhase> I did notice green changes, but I put the ones my system made.
<InPhase> Are these inconsistent between platform?
<InPhase> I never understood which change we did made the differences change color.
<InPhase> Or, actually I think someone explained it to me when I made that PR... But I don't remember the answer.
<InPhase> As for a mask image, yeah, that's probably doable... Probably not too hard either. Let's see if this is a 20 minute task...
<kintel> The color comes from CGAL. fastcsg and manifold don't do colors as the information about "negative surfaces" aren't retained
<kintel> ..so if you regenerated the test with experimental features enabled, that would probably yield no color by default
<kintel> oh, I see what's going on now
<kintel> For tests where there is a color difference between geometry backend, we maintain separate expected files per backend
<kintel> ..and we use the SCADFILES_WITH_GREEN_FACES list in CMakeLists.txt to tell the test framework which tests this affects
<kintel> It's a bit messy tbh
<kintel> ..so if I revert your change to the expected file, and regenerate new files for manifold/fastcsg, it should work.
<kintel> ^ yup - worked
<kintel> All this because I wanted to quickly check if tests pass for a release build: https://github.com/openscad/openscad/issues/4795
<InPhase> I have the script outputting a mask. Allegedly.
<InPhase> So 20 minutes was a good estimate. I just need to break one of the tests now...
<InPhase> If result was myresult.png it should now output myresult_mask.png at the same location with a bright red overlay on the failing bits.
<kintel> cool
<kintel> ..and run ctest -R for-tests
<kintel> *4 lines
<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 : /
<gbruno> [github] kintel pushed 9 additions 6 modifications (Fixed some tests which were failing in non-experimental mode) https://github.com/openscad/openscad/commit/71473c0bc57ac84c4cf0240fe15fa9bab40fee78
<InPhase> Well, I estimated 20 minutes, so I wouldn't have attempted it if I didn't have 90 minutes to spare. ;)
<gbruno> [github] kintel opened pull request #4796 (Fixed some tests which were failing in non-experimental mode) https://github.com/openscad/openscad/pull/4796
<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.
<gbruno> [github] kintel pushed 1 modifications (Added EXPERIMENTAL flags to add_cmdline_test(), don't add any experimental flags to non-experimental flags This makes it possible to run the test framework for a regular build.) https://github.com/openscad/openscad/commit/634feb50cf6d1ac707fdf5a08568bb50203645b0
<gbruno> [github] kintel synchronize pull request #4796 (Fixed some tests which were failing in non-experimental mode) https://github.com/openscad/openscad/pull/4796
qeed has quit [Quit: qeed]
qeed has joined #openscad
<gbruno> [github] rcolyer pushed 2 modifications (Add image difference mask to tests) https://github.com/openscad/openscad/commit/d896b1cb66e5da8c84ba99642160a81c243bc9ef
<gbruno> [github] rcolyer opened pull request #4797 (Add image difference mask to tests) https://github.com/openscad/openscad/pull/4797
<gbruno> [github] rcolyer review_requested pull request #4797 (Add image difference mask to tests) https://github.com/openscad/openscad/pull/4797
<InPhase> kintel: It's a good change. It also really helps clarify what things the test picks up and doesn't pick up.
<InPhase> That should minimize confusion I think.
<InPhase> And increase general confidence in the testing process.
<kintel> yeah, LGTM!
<InPhase> And I suppose potentially point out more strongly any flaws in the testing itself that might be unearthed.
<kintel> Thanks for playing ball, gotta call it the night now!
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<InPhase> Yep, I should get to bed too. Night.
<gbruno> [github] rcolyer edited pull request #4797 (Add image difference mask to tests) https://github.com/openscad/openscad/pull/4797
<gbruno> [github] rcolyer pushed 1 modifications (Comment and add test printout of mask location) https://github.com/openscad/openscad/commit/949d031490cf4cbf189ca69b2735e66a5a01e029
<gbruno> [github] rcolyer synchronize pull request #4797 (Add image difference mask to tests) https://github.com/openscad/openscad/pull/4797
guso78k has quit [Quit: Client closed]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 256 seconds]
teepee_ is now known as teepee
kuro has joined #openscad
lostapathy has quit [Ping timeout: 272 seconds]
drkow has joined #openscad
drfff has quit [Ping timeout: 240 seconds]
mmu_man has joined #openscad
cart_ has joined #openscad
lostapathy has joined #openscad
snaked has quit [Ping timeout: 255 seconds]
snaked has joined #openscad
kuro has quit [Quit: Client closed]
mmu_man has quit [Ping timeout: 255 seconds]
mmu_man has joined #openscad
mmu_man has quit [Ping timeout: 240 seconds]
J23k92 has quit [Quit: Client closed]
J23k92 has joined #openscad
snaked has quit [Quit: Leaving]
<gbruno> [github] kintel pushed 1 additions (Forgot one missing expected file) https://github.com/openscad/openscad/commit/7cb1321746afa77c8b668cb14764d9e0ee7b3de4
<gbruno> [github] kintel synchronize pull request #4796 (Fixed some tests which were failing in non-experimental mode) https://github.com/openscad/openscad/pull/4796
<gbruno> [github] kintel closed pull request #4797 (Add image difference mask to tests) https://github.com/openscad/openscad/pull/4797
<gbruno> [github] kintel pushed 2 modifications (Add image difference mask to tests (#4797)) https://github.com/openscad/openscad/commit/ab5dd9338c96d3b079be47f70dcf38f6baac1adb
<gbruno> [github] kintel pushed 1 additions (Forgot one missing expected file) https://github.com/openscad/openscad/commit/2409ff3007d1a108372c866eaef5a39beea50cc4
<gbruno> [github] kintel synchronize pull request #4796 (Fixed some tests which were failing in non-experimental mode) https://github.com/openscad/openscad/pull/4796
<gbruno> [github] kintel edited pull request #4796 (Make tests work in non-experimental mode) https://github.com/openscad/openscad/pull/4796
J23k92 has quit [Quit: Client closed]
J23k92 has joined #openscad
kintel has joined #openscad
<gbruno> [github] kintel edited pull request #4796 (Make tests work in non-experimental mode) https://github.com/openscad/openscad/pull/4796
<gbruno> [github] kintel ready_for_review pull request #4796 (Make tests work in non-experimental mode) https://github.com/openscad/openscad/pull/4796
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mmu_man has joined #openscad
marcus has quit [Remote host closed the connection]
marcus has joined #openscad
ferdna_ has joined #openscad
ToAruShiroiNeko has quit [Ping timeout: 245 seconds]
ToAruShiroiNeko has joined #openscad
mmu_man has quit [Ping timeout: 255 seconds]
mmu_man has joined #openscad
SamantazFox has quit [Killed (NickServ (GHOST command used by SamantazFox_))]
SamantazFox_ has joined #openscad
SamantazFox has joined #openscad
SamantazFox has quit [Quit: Bye]
SamantazFox_ is now known as SamantazFox
SamantazFox has quit [Remote host closed the connection]
SamantazFox has joined #openscad
mmu_man has quit [Ping timeout: 255 seconds]
mmu_man has joined #openscad
juri_ has quit [Ping timeout: 258 seconds]
<gbruno> [github] jordanbrown0 synchronize pull request #4478 (Objects, geometry as data, module references) https://github.com/openscad/openscad/pull/4478
juri_ has joined #openscad
guso78k has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 256 seconds]
teepee_ is now known as teepee
guso78k20 has joined #openscad
guso78k20 has quit [Client Quit]
guso78k12 has joined #openscad
<gbruno> [github] jordanbrown0 synchronize pull request #4478 (Objects, geometry as data, module references) https://github.com/openscad/openscad/pull/4478
cart_ has quit [Ping timeout: 255 seconds]
<teepee> what's going on. second request like "I have questions about your application"
<teepee> is there some new US law requiring some kind of software inventory for big corporations or something?
<teepee> hmm, https://www.oraces.com/ does not sound like big corp, more small business and private, strange
qeed_ has joined #openscad
qeed has quit [Ping timeout: 255 seconds]
snaked has joined #openscad
TheCoffeMaker has quit [Ping timeout: 260 seconds]
<gbruno> [github] amatulic opened issue #4798 (Preserve original colors of minuend objects that are cut with `difference()`) https://github.com/openscad/openscad/issues/4798