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
<teepee> kintel: do you mind if I try pointing twitter people to the mastodon account
<teepee> this so called genius running that site is really pissing me off
<kintel> teepee: Sure, just make sure you don't get banned for posting competitor links ;)
castaway has quit [Ping timeout: 260 seconds]
<kintel> (nothing surprises me anymore)
<teepee> well, I have no idea what the crazy person decides tomorrow, changing policies without telling anyone and enforcing those
<teepee> I would not advocate for closing the account and even do retweets if people share interesting stuff
<teepee> but I'm not willing to create new posts there while it's run as it is right now
<kintel> But yeah, letting people know about our social media footprint is totally kosher
<InPhase> If it goes the way of freenode, we will notice. It will be in the news.
<teepee> it basically has
<teepee> just not in regard to the numbers
<teepee> in spirit, it's already there
<InPhase> A little below critical mass yet. Twitter will be decided by a different segment of people than ourselves.
<teepee> on friday they kicked a number of 3rd party apps without warning
<InPhase> Major celebrities and such have to be upset by it.
<teepee> no official info just yet
<teepee> no way for those people to reach anyone
<teepee> also all not surprising, and all in their right to do
<kintel> I wonder what the state is of cross-posting interfaces. Writing one message and have it published in all the usual places would be nice, and then it wouldn't matter which one happens to be alive today
<teepee> the point is: I don't *want* to have my posts there anymore
<InPhase> We should probably strengthen our reddit influence.
<teepee> supporting that kind of garbage behavior by posting new content proves they can do what they want
<InPhase> I made a modest effort on the OpenSCAD subreddit.
<InPhase> The reddit userbase is approximately the same size as the Twitter userbase.
<teepee> totally fine by me, would be nice if someone could at least be co-moderator, not just the elusive one it currently has
<InPhase> Yeah. I have no idea who that particular moderator is.
<teepee> he wrote a famous article 11 years ago or so :)
<InPhase> I suppose we could attempt to reach out. Or if that fails we could make a different subreddit and declare it the official one.
<teepee> he is around somehow after I loudly complained about him not moderating posts that were way out of line
<teepee> well, that may have been a year ago or so
Guest67 has joined #openscad
<peepsalot> kintel: hey so I'm just remembering a topic that came up a few months ago: is there, or was there ever, some sort of OpenSCAD Foundation, as a legal entity (non-profit or something)?
<teepee> there was some talk about a more general open source CAD foundation, brought up by Sean of the BRL-CAD team
<teepee> but to my knowledge no specific actions happened as of yet
Guest67 has quit [Client Quit]
<teepee> as of now?
<teepee> pick if one of those is correct wording :)
<peepsalot> kintel: because I vaguely remember many years ago asking you if this foundations or whatever was hiring. to which you replied something like "its just me and i don't pay myself"
<peepsalot> i swear i had read it somewhere on the website or other docs
<InPhase> peepsalot: https://github.com/ggabbiani/OFL :)
<peepsalot> lol, pretty sure it wasn't that
<teepee> it's a library, so they have books not people :)
<kintel> peepsalot: No, but we do have a fiscal sponsor for managing donated funds
<kintel> ..and it is technically possible to pay people from those funds upon receipt of an invoice. We haven't discussed doing that, apart from potentially offering GSoC students extended stipends; but I haven't followed up on that
<InPhase> Last I checked the flux rate was server cost level, and maybe small summer stipend level, but not salary level.
<kintel> yeah, we don't have funds for any kind of sustained expense at that level
<InPhase> kintel: Although the discussion about a foundation was more about long term project planning and longevity.
<InPhase> kintel: OpenSCAD has "succeeded" in establishing itself as a major project. It might be worth thinking about how it might go about outlasting us all.
<peepsalot> ok, strange i wonder what the heck i am vaguely remembering then. anyways the subject came to mind again when I was looking at some of those weird macos bugs which seem like require proper code signing
<InPhase> But, ideally not in any sort of drown-in-politics way. Because nobody here is interested in that.
gknux has quit [Ping timeout: 260 seconds]
<InPhase> But foundations can be lightweight I think, especially when you can cherrypick your jurisdiction for one.
gknux has joined #openscad
<peepsalot> I think its like $100/yr to pay for Apple Developer Program, but I also read that we might be applicable for waived program fees as a non-profit
<peepsalot> (if there were a non-profit)
<kintel> yeah, a legal entity has value for various reasons, and apple signing certificates is one of them.nsuming to manage.
<kintel> *..but it might be time consuming to set up and manage
<InPhase> Hence the cherrypicking of a jurisdiction. Some are probably low burden.
<teepee> we have a company account we likely need to continue now without gaps
<InPhase> Which account is that?
<teepee> imunixx GmbH
<teepee> I don't think there's apps distributed but we do testflight stuff and such for customers
<InPhase> You have a Vitamin C subscription?
<teepee> nope, only unixxx stuff :P
<InPhase> Okay. Google does not know about this other thing. :)
<teepee> main page is in german, so maybe it thinks it's not relevant for you
<InPhase> That's where the webserver is/
<InPhase> s/\//?/
<teepee> you lost me
<teepee> if you are searching for the website, it's just imunixx.de but .com should work to as redirect
<InPhase> Yeah, I found the site.
<InPhase> I'm asking what service does OpenSCAD obtain from them? Webserver hosting?
linext has quit [Quit: Leaving]
<teepee> ancient website though, who knows the new slightly boring one was supposed to go live last year
<teepee> at this point? nothing
<teepee> it's just the company I own a percentage of
<InPhase> Oh. I was trying to figure out how it connects up such that you said "need to continue now without gaps".
<teepee> we had the subscription on-and-of for a couple of years as we don't distribute apps, that's fine
<teepee> but now we have a couple of projects that likely mean we have to pay extension up as soon as the yearly fee runs out
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
<teepee> ah, yes, Renewal date April 22, 2023
<InPhase> teepee: Oooh, I get you. You were talking about the Apple Developer Program account for imunixx. :) We were talking past each other there in different head spaces. ;)
GNUmoon has quit [Remote host closed the connection]
<teepee> :)
<teepee> I was saying there's the option to run some stuff via this account which is already paid for
<teepee> but no such thing happened so far
GNUmoon has joined #openscad
peepsalot has quit [Quit: Connection reset by peep]
<kintel> Yeah, I think step 1 would be to sign OpenSCAD with _some_ valid cert and step 2 make the signing entity recognizable by our users as associated with OpenSCAD.
<kintel> but step 1 is a lot better than step 0, although I despise the concept of paying $100/year for a certificate : /
peepsalot has joined #openscad
<teepee> I think it's possible to setup org.openscad and considering apps are sold in real world, it also should be possible to transfer, but I've never done that
<teepee> so starting without paying the fee should be doable
<teepee> assuming I can manage to get that registration filled out in app-store-connect
<gbruno> [github] kintel opened issue #4504 (vertex-object-renderers performance regression on macOS/arm64) https://github.com/openscad/openscad/issues/4504
<kintel> teepee If you can get anything off the ground that would be awesome. Happy to help with macOS-practical stuff, but I've never actually signed a macOS binary before ;)
<teepee> in theory it's just codesign bundle
<teepee> the challenge is the correct setup for permissions I assume
<teepee> and how it works on CI side. locally it's just fully automatic via xcode so it's a bit scary
peepsalot has quit [Quit: Connection reset by peep]
<teepee> so legally I could just decide but I'll check with my collegue if there's any veto - I don't expect so and the appstore does allow limiting access to specific apps
<teepee> from technical side, I'm the account holder, so I'm going to be blamed anyway
<JordanBrown[m]> Hey, we have to blame you or Canada.
<othx> JordanBrown[m] linked to YouTube video "Blame Canada! - HD" => 1 IRC mentions
<JordanBrown[m]> I suppose it's OK to blame COVID, Brexit, Trump, or Biden too.
teepee has quit [Ping timeout: 255 seconds]
teepee has joined #openscad
peepsalot has joined #openscad
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kintel has joined #openscad
linext has joined #openscad
<gbruno> [github] kintel edited pull request #4503 (Correctly detect failure to run ImageMagick) https://github.com/openscad/openscad/pull/4503
TheAssassin has quit [Ping timeout: 255 seconds]
TheAssassin has joined #openscad
<gbruno> [github] kintel closed issue #4430 (Compilation from sources failed on linux) https://github.com/openscad/openscad/issues/4430
<gbruno> [github] kintel edited issue #4421 (fast-csg: segfault on render) https://github.com/openscad/openscad/issues/4421
<JordanBrown[m]> I grabbed a copy of the python PR, and it built OK but fails at runtime with
<JordanBrown[m]> C:/msys64/home/Jordan/openscad/python-support/b/openscad.exe: error while loading shared libraries: libzip.dll: cannot open shared object file: No such file or directory
<JordanBrown[m]> I do have /mingw64/bin/libzip.dll, and have it in my $PATH, but I *suspect* that my OpenSCAD is built 32-bit and the libzip.dll is 64-bit. But I don't immediately know how to tell for sure.
<JordanBrown[m]> Or maybe it's just lying. ntldd says it finds libzip.dll, but does not find python310.dll.
<JordanBrown[m]> Next question: why is it looking for python310.dll rather than libpython310.dll?
<kintel> JordanBrown[m] You might be the very first person having built this on Windows :)
<JordanBrown[m]> I thought somebody said that CI built it on Windows.
<kintel> Yeah, CI builds it, but it's pretty much by accident
<JordanBrown[m]> Interestingly, print("hello") yields a cube (but no message).
<kintel> CI cannot run it either, but I didn't inspect the errors
<JordanBrown[m]> but output(sphere()) yields a sphere.
<JordanBrown[m]> Well, the usual 12-gon.
<JordanBrown[m]> I got it to run with
<JordanBrown[m]> $ PATH=/mingw64/bin:/c/Users/Jordan/AppData/Local/Programs/Python/Python310 b/openscad
<JordanBrown[m]> But I must go to dinner now.
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kintel has joined #openscad
J232988 has joined #openscad
<gbruno> [github] kintel pushed 4 modifications (Update expected images) https://github.com/openscad/openscad/commit/7787f05aa4bde6b7d46ccd09b4385b4047a83798
<gbruno> [github] kintel synchronize pull request #4503 (Correctly detect failure to run ImageMagick) https://github.com/openscad/openscad/pull/4503
<gbruno> [github] kintel edited pull request #4503 (Correctly detect failure to run ImageMagick) https://github.com/openscad/openscad/pull/4503
J2329 has quit [Ping timeout: 260 seconds]
<gbruno> [github] kintel pushed 1 modifications (Reverted issue1165-expected.png) https://github.com/openscad/openscad/commit/ae826645ce0f41d14f64567a98767eaa77590922
<gbruno> [github] kintel synchronize pull request #4503 (Correctly detect failure to run ImageMagick) https://github.com/openscad/openscad/pull/4503
<gbruno> [github] kintel edited pull request #4503 (Make ImageMagick comparison slightly more strict) https://github.com/openscad/openscad/pull/4503
<gbruno> [github] kintel ready_for_review pull request #4503 (Make ImageMagick comparison slightly more strict) https://github.com/openscad/openscad/pull/4503
<JordanBrown[m]> Ah, print("hello") went to the process stdout, rather than to the OpenSCAD console.
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kintel has joined #openscad
J232988 has quit [Quit: Client closed]
J232988 has joined #openscad
J232988 has quit [Quit: Client closed]
J232988 has joined #openscad
ur5us has quit [Ping timeout: 252 seconds]
ur5us has joined #openscad
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
ur5us has quit [Ping timeout: 255 seconds]
TheAssass1n has joined #openscad
TheAssassin has quit [Ping timeout: 255 seconds]
TheAssass1n has quit [Ping timeout: 255 seconds]
TheAssassin has joined #openscad
KimK has joined #openscad
guso78 has joined #openscad
guso78 has quit [Client Quit]
ur5us has joined #openscad
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Ping timeout: 256 seconds]
fardog has quit [Quit: ZNC 1.8.2 - https://znc.in]
fardog has joined #openscad
little_blossom has quit [Quit: little_blossom]
little_blossom has joined #openscad
ur5us has joined #openscad
guso78 has joined #openscad
<guso78> Jordan, great to learn that you managed to get it  compiled on windows. i am excited!
<guso78> the python stuff yields a cube when pyhon failed or cannot successfully do the output().
<guso78> i consider replacing the cube by a nice 3D like question mark ....
ur5us has quit [Ping timeout: 252 seconds]
<guso78> i am sure, that python output can be redirected to the openscad console
<teepee> to make that work well, some things probably need to be fixed in the current handling
<teepee> I believe the infrastructure for that now exists
ur5us has joined #openscad
<guso78> i was thinking about the order of the parameters in translate. jordan wanted to have multiple objects  in one translate
<guso78> the amount of paramters in python is not very flexible. but i could implement doing something like this:
<guso78> translate([obj1, obj2, .. obj2],[10,1,1])
<guso78> object can be an array of objects and it would do an additional union ...(or lazy when flags are set)
castaway has joined #openscad
<guso78> what i also like about the python thing is that you can easily store sub-objects in variables and you can decide to use/not use/pass as function parameters/   now.
<guso78> maybe its even possible to do variable.export_csg, or variable.import_csg ...
<guso78> (probably stl too)
<guso78> (at least: i dont know how python can do   extra unnamed args and collect them in an array)
<gbruno> [github] gsohler synchronize pull request #4465 (New function evalstring) https://github.com/openscad/openscad/pull/4465
guerd87 has quit [Read error: Connection reset by peer]
guerd87 has joined #openscad
ur5us has quit [Ping timeout: 260 seconds]
ur5us has joined #openscad
GNUmoon has quit [Remote host closed the connection]
gknux has quit [Ping timeout: 264 seconds]
gknux has joined #openscad
ur5us has quit [Ping timeout: 246 seconds]
GNUmoon has joined #openscad
<teepee> guso78: maybe it's better to go with the simpler version first and get the integration sorted
<teepee> I'm pretty sure there's quite a number of discussions and ideas once more people get their hand on it
teepee has quit [Ping timeout: 255 seconds]
teepee has joined #openscad
teepee_ has joined #openscad
use-value has joined #openscad
teepee has quit [Quit: bye...]
teepee_ is now known as teepee
GNUmoon has quit [Remote host closed the connection]
J232988 has quit [Quit: Client closed]
J232988 has joined #openscad
GNUmoon has joined #openscad
Guest95 has joined #openscad
J232988 has quit [Quit: Client closed]
J232988 has joined #openscad
guso78 has quit [Quit: Client closed]
Guest95 has quit [Quit: Client closed]
guso78 has joined #openscad
<guso78> yes i agree! My interest clearly direct to see it compile on many platforms. But of course i am happy  to implement small fixes/additions on python side
<guso78> also the form object.union() or [obj1, obj2] instead of a single object looks very attractive to me
<guso78> another issue that current python probably some memory leaking, did not get the Py_IncRef and PY_DecRef correcyly because  its new to me. a real pythoner will probably get it correct blindly
hisacro has quit [Ping timeout: 260 seconds]
hisacro has joined #openscad
hrberg has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
<guso78> methods for the 3 csg operators  done
<guso78> next offering the option to alternativy specify [obj1, obj2, obj2] instead of obj in many places where its not ambigous
kintel has joined #openscad
hrberg has joined #openscad
<kintel> Let me know if anyone thinks making ImageMagick comparison slightly more strict is not a good idea. Otherwise I'll merge this soonish: https://github.com/openscad/openscad/pull/4503
<InPhase> kintel: Just as a slight note, it seems to me that ImageMagick maintenance has been drifting downward. Many people (myself included) have been migrating traditional ImageMagick tasks to small Python scripts with PIL and similar libraries.
<InPhase> kintel: Something to keep lodged in the back of the mind in case the failures get out of hand.
guso78 has quit [Ping timeout: 260 seconds]
<InPhase> We already have Python testing dependencies, so that wouldn't be a new dependency or anything if we went that route. It would just mean we'd have to think about how to reformulate the comparisons.
<teepee> and make sure the libraries are installed, but that's probably easier than keeping imagemagick if it starts to barf
<InPhase> Also we can easily do more advanced stats on image comparisons.
<InPhase> It wouldn't need to be percent pixels or anything. We could sort pixel differences and do some sort of distribution test.
<InPhase> Or do a comparison that ignores thin differences.
<InPhase> It would be pretty easy to write a test which yields 0 for all differences smaller than 3x3 pixels.
<InPhase> (For example.)
<kintel> The challenge is to be able to ignore small differences in pixel output between GPUs and OpenGL SW implementations, while catching real issues. ..but yeah, if you have an idea how to make this more robust, it should be very doable.
<kintel> The only caveat as I see it is that we don't have a pipeline for installing python dependencies and managing virtualenvs, so that needs to be written. I believe all our Python scripts are crafted to require zero pip installs.
drohhyn has joined #openscad
drohhyn has quit [Client Quit]
drohhyn has joined #openscad
<InPhase> The Python code would be super easy for me to write if you can figure out the pipeline for pip on all the CI platforms.
<InPhase> We would need PIL and numpy.
drohhyn has quit [Quit: Client closed]
<kintel> Yeah, getting the pipeline set up is, as usual, the trick part : /
<JordanBrown[m]> guso78: I don't know anything about the C++ interface to Python, but inside a Python program argument processing is quite flexible. There must be a straightforward way to do the same thing from C++. Take a look at https://bpa.st/L73HM .
<InPhase> Typically you need to lock down the C++ to Python interface pretty strictly with a fixed type. Although you can have an arbitrary number of functions. Or you could use a struct that supports multiple types inside.
<JordanBrown[m]> That seems pretty hard to believe. This kind of design is quite common for Python programs, I believe.
<JordanBrown[m]> Of course, your C++ program has to be prepared to handle different types, et cetera, and will be more complex than a typical C++ program.
<JordanBrown[m]> In fact, it looks like how you do it is blindingly obvious, so obvious that it's not obvious: it looks like the "args" argument to your C++ function is a Python tuple, and you can do anything you like with it. I assume that the kwargs argument is similarly a dictionary.
<InPhase> JordanBrown[m]: I tell you, I once had a Python interfacing with C++ program completely fail because I took f(double* required, double* optional) and replaced it in the C++ header with f(double* required, double* /*optional*/) :)
<JordanBrown[m]> Python calling an arbitrary C++ function is different from a C++ function that implements a Python function.
<JordanBrown[m]> The functions here have signatures that look like
<JordanBrown[m]> PyObject* python_union(PyObject *self, PyObject *args, PyObject *kwargs)
<JordanBrown[m]> When using only METH_VARARGS, the function should expect the Python-level parameters to be passed in as a tuple acceptable for parsing via PyArg_ParseTuple(); more information on this function is provided below.
<JordanBrown[m]> The METH_KEYWORDS bit may be set in the third field if keyword arguments should be passed to the function. In this case, the C function should accept a third PyObject * parameter which will be a dictionary of keywords. Use PyArg_ParseTupleAndKeywords() to parse the arguments to such a function.
ChanServ has quit [shutting down]
<JordanBrown[m]> It does surprise me that I don't see a way to use the standard argument-parsing functions to retrieve N fixed arguments, and then the rest as a tuple, analogous to "def foo(a,b,*rest):".
ChanServ has joined #openscad
<peepsalot> kintel: I set up a small fmt test program, which shows some of the issues I'm running into https://github.com/openscad/dev-support/tree/main/fmt-experiments
guso78 has joined #openscad
<kintel> peepsalot Cool, I'll have a look later on
<peepsalot> mainly i don't understand how to properly pass format spec down in case of recursive types i.e. our `Value` variant
<peepsalot> the runtime errors provide no information ( https://github.com/fmtlib/fmt/issues/2231 for security reasons I guess? *shrug* )
J232988 has quit [Quit: Client closed]
J232988 has joined #openscad
<peepsalot> that issue mentions using a FMT_THROW macro or something, but seems to be undocumented
snaked has quit [Quit: Leaving]
<Scopeuk> From the code if not defined ahead of time (and exceptions are off) it just defines a function call which does assert false
<Scopeuk> Looks like adding -D FMT_EXCEPTIONS would be a good starting point, their docs are horrible
<gbruno> [github] karnhack opened issue #4505 (App icon is incorrect under KDE Plasma Wayland session) https://github.com/openscad/openscad/issues/4505
<gbruno> [github] karnhack edited issue #4505 (App icon is incorrect under KDE Plasma Wayland session) https://github.com/openscad/openscad/issues/4505
<Scopeuk> Ok. Odes moved on a little but not much, looks like msvc compatibility https://github.com/fmtlib/fmt/blob/39971eb336d60c6dd66f7e10343977359fd4b14d/include/fmt/format.h#L81
<gbruno> [github] karnhack edited issue #4505 (App icon is incorrect under KDE Plasma Wayland session) https://github.com/openscad/openscad/issues/4505
guso7853 has joined #openscad
<guso7853> arghhh, my git repo just got currupted
<gbruno> [github] gsohler synchronize pull request #4498 (OpenSCAD with a Python Engine) https://github.com/openscad/openscad/pull/4498
<teepee> how so?
<guso78> no idea, it happens from time to time. cloned again and copied in my changes
<teepee> strange
ur5us has joined #openscad
guso78 has quit [Ping timeout: 260 seconds]
guso78 has joined #openscad
<InPhase> lol. Okay, so apparently I haven't run the tests since upgrading to 22.04. How are we doing these "compare" tests in 22.04? There doesn't seem to be a working version of compare in Ubuntu 22.04 anymore.
<InPhase> I generated a Python script that appears to do all of the image comparisons flawlessly. So I'm trying to compare it to the existing imagemagick method, and I cannot get the imagemagick thing working with my platform. Irony.
<InPhase> I wanted to see if these regressions my script caught (which I manually verified are real changes) were being caught by the old process.
J232988 has quit [Ping timeout: 260 seconds]
<InPhase> Oh, maybe this disruptive swap-out package actually enables it. Rerunning, and then I will mark this to remove again.
<peepsalot> InPhase: dunno, i haven't had any issues from my Linux Mint which is based on ubuntu 22.04
NogetDigitalt has joined #openscad
<peepsalot> InPhase: looks like i'm using package imagemagick-6.q16
DigitaltNoget has joined #openscad
<InPhase> Yeah. That one did not look right, as it wipes out a primary graphicsmagick package, and has binaries with .q16 in it. But this works.
greenbigfrog has joined #openscad
<InPhase> I think I would rather be using graphicsmagick but it apparently is missing compare, the one thing we're using.
<peepsalot> InPhase: btw, i pinged kintel about it already (since it was his suggestion), but in case you have any input on the fmt stuff, i put some WIP implementation testing here: https://github.com/openscad/dev-support/tree/main/fmt-experiments
<InPhase> Although realizing this is motivating me to do this swap out.
<InPhase> peepsalot: *thumbsup*
<greenbigfrog> Hi, I'm currently starting out with openscad, and I'm struggling how to assert that some variables are depending on others smaller then a other provided variable. There's probably a simple solution for this I'm simply not aware of. Here a example how I naively assumed I could implement it, which doesn't work here due to scoping(?): https://gist.github.com/greenbigfrog/a4f37cc4803b514081c52fcf307dad91
<kintel> The GitHub CI is running 22.04 and finds ImageMagick 6.9.11-60
<InPhase> kintel and/or peepsalot: In your favorite image viewer, can you compare output/cgalpngtest/linear_extrude-parameter-tests-actual.png regression/cgalpngtest/linear_extrude-parameter-tests-expected.png
<InPhase> My image comparator marks these as different. The existing test says they are the same. But they look meaningfully different to me, as the tessellation changed in minor ways.
<InPhase> Do you concur that these should be marked as different?
<InPhase> This was with a ctest run of the current master branch.
<InPhase> I suspect this was a minor change that happened at some point with the linear_extrude updates some time ago, but that was never updated in the tests because the comparison didn't flag them as different.
<peepsalot> InPhase: they look the same to me
<InPhase> top row, 4th one from the left, forward-left side.
<guso78> is it: find the 10 diffs ???
<kintel> They are different. It not clear to me that the cause is tessellation changes, but it's possible
<kintel> ..in which case we should update it
<peepsalot> ah, yeah the i see now they are very slightly different
<kintel> I think I've seen similar difference between OpenGL implementations. Challenge is to tune the diff to ignore GL differences but catch real changes
<kintel> At some point we introduced a 1-pixel erosion on the diff image to work around that
<InPhase> peepsalot: Now, my operative question. Is this the difference level we want flagged?
<teepee> greenbigfrog: yes, the if { } generates a new scope, you could use a simple function to collect the values
<InPhase> kintel, peepsalot: It is useful confirmation that it appears visually different when both of you generate it separately from me. So that's a start at saying it's meaningful.
<teepee> greenbigfrog: something like: function value_if(cond, value) = cond ? value : 0;
<teepee> l = value_if(wedge_right, wedge_length) + value_if(wedge_left, wedge_length) + ...
<peepsalot> part of the problem with that test is that there are too many objects in one scene to reliably detect minor differences in any single one. i remember rearranging them and adjusting camera a bit at some point, to improve that slightly (it was even worse before if you can believe that)
<kintel> This is also a general challenge with such regression test; the tests don't know what they're actually testing for. In this case, it's really a functional test of producing geometry, so the exact rendering is less of an issue.
<kintel> We probably have separate tests for all kinds of twists, which would catch changes in tessellation much better
<InPhase> My test measures any deviation which persists in the same direction across any 9 pixel block (with overlap), and counts those. It then reports how many 9 pixel blocks are deviated, and the median deviation of these.
<InPhase> It reports the image changed if ANY 9 pixel block is deviated, which appears a robust enough test so far. Median deviation is sometimes useful. In two cases it marked a color change.
<InPhase> Oh, and it ignores any image comparison differences 2 or less out of 255 in all 3 of RGB.
<InPhase> 2 or less is truncated to 0.
<kintel> what do you mean by "persists in the same direction"?
teepee has quit [Remote host closed the connection]
<greenbigfrog> teepee: thanks. that works. kind of had a idea like that in the back of my head, but couldn't wrap my head around it, especially since I wasn't sure if it's really due to scoping that it isn't working.
<InPhase> kintel: All 9 pixels in the block must have, for example, more yellow, or less yellow. If some have more yellow and some have less yellow, that 3x3 pixel block is ignored.
<InPhase> kintel: This is thus designed to filter out the tiniest edge shifts or flickers.
<InPhase> By doing so I can count EVERY block that is different. I have no 10% threshold. A single failing block flags it as a difference.
teepee has joined #openscad
<kintel> oh, so a sum of the diff between the 3x3 blocks
<InPhase> And, I checked the cgalpngtest and fastcsg-cgalpng tests, and have complete alignment with the existing passes and fails except for the one I mentioned, and 2 others that are obviously in need of updating (wide across-image color changes) that I didn't bother asking about.
<kintel> you do have a 0.78% threshold :)
<kintel> Smaller thresholds is better if we can get away with it
<InPhase> I think it is a strictly more sensitive test for meaningful changes, but will filter out the meaningless stuff.
<kintel> Cool, so you pretty much have false positives under control. Perhaps run some test trying to trigger false negatives
<kintel> -> things like a character in a font getting the wrong spacing by one pixel
<InPhase> kintel: Current version of the comparison: https://bpa.st/MRTDQ
<InPhase> Oops, spurious save out of "my_temp_comparison.png" left in there. You can delete that line if you're going to try it. :)
<InPhase> That save-out slows it down.
<InPhase> 5 comparisons per second with this script, so adequately fast I think.
<kintel> That's surprisingly slow considering you're using numpy
<kintel> Anyway, not a showstopper, but once it's on the CI we can see if test times increase much
<guso7853> how does a comparison result look like ? is it a picture with the xor differences ?
<kintel> It currently just returns true/false
<InPhase> kintel: That's mostly the time to load numpy. :)
<kintel> It would be nice to present the diff on the test report as well, ideally with some nice switches between side-by-side, diff only, animated flip between images
<InPhase> numpy is close to 200ms to load.
<kintel> InPhase Would help to do a pyinstaller, py2exe or similar to pre-build the comparator?
zauberfisch has quit [Quit: No Ping reply in 180 seconds.]
zauberfisch has joined #openscad
<InPhase> kintel: I have some doubts, but I'm testing that.
<InPhase> kintel: That's actually slower.
<InPhase> I guess that explains all the "pyinstaller startup times slow" posts on google when I looked that up.
NogetDigitalt has quit [Quit: Leaving]
DigitaltNoget has quit [Quit: Leaving]
<InPhase> Now of course we could do a whole list of images in a heartbeat. But I think 200ms per test is okay, because the tests will take longer than that to run.
<kintel> yeah, I'm not too worried, mostly curious
<peepsalot> kintel, InPhase: we also have the diffpng sources as part of our test suite as a fallback. i don't know exactly what sort of threshold it checks for, but it was accurate enough to report the difference from kintel's issue https://github.com/openscad/openscad/issues/4462
<InPhase> Ah yes, that was one of the ones I flagged.
<InPhase> I didn't realize that was a recent issue.
<InPhase> 12.43739587% of 3x3 blocks differ with a median difference of 25.00
<peepsalot> we could potentially consolidate to *only* use diffpng
<InPhase> 25.00 foreshadows that it's a color difference. :)
<guso7853> diffpng:  command not found ...
<InPhase> That median difference is actually a geometric product difference. I multiply the differences in all 9 pixels, and take it to the 1/9th power.
<peepsalot> guso7853: it is built by the tests/CMakeLists.txt , but *only if imagemagick not found*
<InPhase> And "median" because I sort the pixels which differ, and take the middle one to report.
<InPhase> s/pixels/pixel-blocks/
<guso7853> teepee, recently i get a lot of mails like " Built on linux  failed, Built on windows failed". whats my occupation there ?
<kintel> guso7853 Basically, check the CI build if the failure are related to your code. There has been some test framework instabilities lately, but I think those should be pretty rare, and any failure email is worth investigating
<peepsalot> guso7853: you could disable the checks for imagemagick here if you want to test out building and running diffpng: https://github.com/openscad/openscad/blob/master/tests/CMakeLists.txt#L56-L111
<guso7853> tried to find a short solution to getting python output captured and logged to openscad console but i could not find an easy example to reuse. if a python script in openscad really wants to capture std output, there are lots of options in python world ...
<guso7853> peepsalot, thank you , will look into your link.
<peepsalot> guso7853: have you run the test suite locally yet?
<guso7853> peepsalot no!!! I admit, i am an absolute beginner in tests. can you give me a command to try ?
<peepsalot> guso7853: i would recommend reading the testin doc here: https://github.com/openscad/openscad/blob/master/doc/testing.txt
<guso7853> thank you for the link.will follow reading in your link
<JordanBrown[m]> greenbigfrog: In "straight" statements, not including module or function calls, the *only* way to control the value that goes into a variable is with the ?: ternary operator. Anything you do inside an "if" is lost at the end of the "if" block.
J23 has joined #openscad
<JordanBrown[m]> If you have a variable x that you want to set to 1 when cond is true and 2 when cond is false, you must say
<JordanBrown[m]> x = cond ? 1 : 2;
<peepsalot> guso7853: and of course feel free to ask here if anything in the doc is not clear :)
<guso7853> thx peeps!
<JordanBrown[m]> greenbigfrog: Also: you're trying to total values up into your variable; you're saying... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/52797d916015c5da3fe6b46b73348ef748aff790>)
<guso7853> peeps alot: ctest : No test configuration file found!
<guso7853> where is the error ?
<peepsalot> are you running from the build/tests path?
<JordanBrown[m]> The straightforward replacement for what you're trying to do is
<JordanBrown[m]> + (wedge_left ? wedge_length : 0)
<JordanBrown[m]> + (initial_spool ? wedge_length + 2*slider_width : 0);
<JordanBrown[m]> l = (wedge_right ? wedge_length : 0)
<JordanBrown[m]> BTW, I would almost never use the variable l (ell) because typographically it looks too much like either the number 1 or the a capital I (eye).
<guso7853> now i do.  thx bud!
<guso7853> i  was running before build dir
<InPhase> kintel: So, worth trying to PR as a default option called from this test_cmdline_tool.py?
<kintel> InPhase: Sure, but we still need to figure out how to install the dependencies
<JordanBrown[m]> guso7853: here's the script that I use to run tests: https://bpa.st/5VLIG
<kintel> On the CI I guess your could just manually pip install stuff on the system, as the system is an ephemeral container
<JordanBrown[m]> It's intended to be run from the top level of the source hierarchy; its first and only required argument is the name of the build directory.
<kintel> ..but for dev machines, we need to make sure we don't touch the system
<JordanBrown[m]> Its usage message is a bit wrong; it accepts optional second-and-later arguments with additional ctest arguments.
<guso7853> jordan,this is the actually used script ? it appearts to be reworked 3 times (or more)
<guso7853> my ctest is ar 1106 already :)
<JordanBrown[m]> Yes, it's what I currently use, not that I use it all that often... and yes, the comments have some history of previous variations.
<guso7853> ctest environment is new to me.
<JordanBrown[m]> I can't say that I know it all that way myself, which is why I wrap it in a script that does the usual thing.
<JordanBrown[m]> all that well myself
<kintel> guso7853 For Python testing, you can probably do relatively light-weight testing of the actual python functions; just write a Python equivalent of tests exercising all parameter variants, and compare them against a corresponding OpenSCAD script
<guso7853> once again: built for my PR on win succeded but its difficult to extract the exe file, right ?
<guso7853> Marius,this is my very intent actually!  thank you for he link, will follow up!
<kintel> -> basically by using the existing golden files, you take away a lot of risk and tedious validation of output
<guso7853> my ctests failed. candiartes are 1434, 1579
<kintel> For windows, it's probably a lot easier to set up msys2 and build locally instead of trying to extract binaries from the CI
<kintel> btw. test numbers are unique to your test run, it's the test names that count
<guso7853> Marius, ii already use msys 2 successfully
<kintel> ah, ok, so you're on the right track then :)
<kintel> Building for distribution is done on MXE. That's another challenge :)
<guso7853> ok , my failed test names are dzfpnghtest and openscad-viewoptions-wirefreame_view_options-test
<kintel> the test framework should output a nice HTML file which you can use to inspect the failures
<kintel> ..or even share for others to help diagnose
guso7853 has quit [Quit: Client closed]
Guest69 has joined #openscad
Guest69 has quit [Client Quit]
<JordanBrown[m]> InPhase: guso7853 https://bpa.st/ABG3C is a sample python function written in C that takes an arbitrary list of arguments and (for integers, booleans, doubles, and strings) prints them on standard out.
<JordanBrown[m]> building and running it: https://bpa.st/DLNJ4
traverseda has joined #openscad
traverseda has quit [Client Quit]
castaway has quit [Ping timeout: 265 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
snaked has joined #openscad
snaked has quit [Remote host closed the connection]
snaked has joined #openscad
qeed_ has joined #openscad
qeed has quit [Ping timeout: 260 seconds]
<JordanBrown[m]> Deep philosophical question: if the OpenSCAD user interface / IDE is to support multiple languages, then we need a way to talk about the original OpenSCAD language as opposed to the IDE that supports it. Is the language called "OpenSCAD" and the IDE called something else, or is the IDE called OpenSCAD and the language called something else, or do we call both of them OpenSCAD and hope that context disambiguates which we're talking
<JordanBrown[m]> about?
TheCoffeMaker has quit [Ping timeout: 260 seconds]
TheCoffeMaker has joined #openscad
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kintel has joined #openscad
<Lagopus> Is the IDE required to support multiple languages when modeling in OpenSCAD or is the IDE imported from another development platform and left untrimmed of the excess capabilities?
<InPhase> kintel: To avoid touching the system we can do a .venv/ in the tests directory.
<Lagopus> If the latter, then the IDE would be called OpenSCAD-with-¿benefits?.
<InPhase> kintel: It would require python3 in the path to get itself started, but then it should be able to takeover from there and setup the .venv if it's missing.
<kintel> InPhase sg, we already require python >= 3.4. I'm not super familiar with Python venvs, I tend to use pipenv and curse when it fails ;)
L29Ah has quit [Read error: Connection reset by peer]