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
<linext> can anyone confirm whether google street view is down?
<peepsalot> does anyone know how a "use" file gets its modules/functions added to a context or scope or whatever?
<peepsalot> i see handle_deps function but that seems like it just keeps a list of paths
<peepsalot> i also see SourceFile::registerUse, but that also just seems to add the path to std::vector<std::string> usedlibs;
<linext> i'm going to put some more time into 3dcustomizer.net tomorrow
<linext> i've been visiting garage sales, estate sales, auctions, thrift stores to resell stuff to pay the bills
<linext> friday, saturday, sunday is mostly driving around to sales
<linext> the last two weekends were "town-wide garage sales"
<linext> so about 100-200 sales within a few miles, for about 8 hours
<JordanBrown[m]> linext it's sure not working for me
<linext> oh yea, what are you trying to run?
<linext> do you mean google street view or 3dcustomizer.net ?
<JordanBrown[m]> street view
<linext> yea, it's returning 500 http responses
<linext> i heard emmett the guy who made some openscad examples is working for google
<linext> the gear cube guy
<linext> maybe i'll email him and see if they can get it fixed tomorrow
<linext> i sent emmett a message through thingiverse
<linext> some of this more recent work: https://glitch.com/@elalish
<linext> i kind of want to dig into a GLB file and see how it compares with other formats
<linext> hmmm... it opens in Windows 10 3D viewer
LordOfBikes has quit [Ping timeout: 268 seconds]
<peepsalot> do we ever want to output negative zero in echo,ast dump,csg dump,etc?
<InPhase> I don't think so.
<InPhase> This value has no relevance to 3D modeling.
<peepsalot> ok, with current behavior it sometimes ends up in multmatrix. but it is stripped from eg echos
<peepsalot> so my changes will remove it from .csg values
LordOfBikes has joined #openscad
<InPhase> I don't think it is harmful in multmatrix, as it would impact only certain questions of caching if two "identical" things were calculated in different ways, which would be a weird thing to expect to work in floats anyway. But it would be cleaner without it.
califax has quit [Ping timeout: 258 seconds]
califax has joined #openscad
<peepsalot> InPhase: i'm thinking we might want to change these low, high exponent values https://github.com/google/double-conversion/blob/master/double-conversion/double-to-string.h#L108-L118
<peepsalot> InPhase: currently they are -6 and 21
<peepsalot> not sure where the 21 came from exactly
<peepsalot> i was thinking more like -3 and 6
<peepsalot> oh. well i just glanced at the header comment again and it uses 21 as example there, so that's probably where it came from, lol
<InPhase> Those might be the correct values for double.
<InPhase> I think -3 and 6 are the float values.
<peepsalot> it doesn't actually affect the precision, its should still be round trip capable either way
<peepsalot> its just do you prefer 1000000000000 or 1e+12 etc.
<peepsalot> about to submit pr and i can show some examples of how it changes from our previous printing
<gbruno> [github] thehans opened pull request #4384 (Decimal round trip fixes) https://github.com/openscad/openscad/pull/4384
<InPhase> peepsalot: For values with all 0's to the right, the shortest representation becomes the exponential one.
<InPhase> So you could choose a different representation for those.
<InPhase> What's at issue is 1234567890123 vs 1.234567890123e12
<peepsalot> yeah, but those exponent params sort of override what ToShortest does
<InPhase> I don't know what that means.
<InPhase> Well, before and after are both wrong if the goal is really "to shortest"
<InPhase> ECHO: 160000 This for example is unchanged. 1.6e5 is 1 less character, and an equivalent value.
<InPhase> "0.000016" also could be "1.6e-5" for 2 fewer characters.
<InPhase> Also unchanged there.
<peepsalot> right, so i would have to raise the -6 lower end for that
<InPhase> Nope.
<InPhase> Because then it would fail on the ones that have more digits. These are just inadequate test cases by themselves.
<InPhase> You also need 0.00001234567890123456
<InPhase> Okay, that one I think is still shorter as an exponential.
<peepsalot> that specific test case is actually kind of made obsolete by this change. that was for testing our own functions of trimming trailing zeros which supplemented double-conversion's ToPrecision
<peepsalot> but it still serves as a reassonable example of some of the output differences
<InPhase> You could reason out the full logic of this, but really the simplest solution that guarantees the right answer is to generate both and take the shortest. :)
<InPhase> If shortest is REALLY the goal, then it always depends on the digits produced.
<InPhase> Or at least for positive exponent values.
<peepsalot> i think "user-friendliness" is the reason for these exponents existing
<InPhase> For negative exponents it might be strictly a threshold question.
<InPhase> I endorse user friendliness as a valued goal for number representation over shortest representation. But in this case, rename the function. :)
<peepsalot> so it doesn't have to be 100% optimal shortest in my opinion.
califax has quit [Ping timeout: 258 seconds]
<InPhase> Functions should do what it says on the tin. But this one could just be to our definition of best representation, and that's totally fair.
califax has joined #openscad
<InPhase> DoubleToStr would be a fair enough name.
<peepsalot> echo([for(e=[1:22]) str(10^e)]);
<peepsalot> ECHO: ["10", "100", "1000", "10000", "100000", "1000000", "10000000", "100000000", "1000000000", "10000000000", "100000000000", "1000000000000", "10000000000000", "100000000000000", "1000000000000000", "10000000000000000", "100000000000000000", "1000000000000000000", "10000000000000000000", "100000000000000000000", "1e+21", "1e+22"]
<peepsalot> i think 21 is a bit excessive
<InPhase> For user purposes, yes.
<InPhase> Beyond a million it gets hard to visually parse.
<InPhase> Or well, at 10 million.
<InPhase> I'm pretty good at numbers, but my 0 parsing starts to get wonky and slowed down as soon as there are 8 total digits. So 6 is a fair threshold for user friendliness I think.
<InPhase> i.e., if it's 7 or more, exponent.
<peepsalot> ok, so: ECHO: ["1", "10", "100", "1000", "10000", "100000", "1000000", "1e+7", "1e+8", "1e+9", "1e+10", "1e+11", "1e+12", "1e+13", "1e+14", "1e+15", "1e+16", "1e+17", "1e+18", "1e+19", "1e+20", "1e+21", "1e+22"]
<InPhase> I can handle the same 6 placeholder digits on values under 1, because to me it's a visual parse processing speed thing. But it might be the case that other people are more uncomfortable with the very small numbers.
<peepsalot> here is what -6 does currently: ECHO: ["1", "0.1", "0.01", "0.001", "0.0001", "0.00001", "0.000001", "1e-7", "1e-8"]
<InPhase> So if I were tuning to me, I'd probably use the same threshold for negatives.
<peepsalot> i think it could stand to go to -4 personally
<InPhase> But I accept that others might like that a little tilted more toward negative exponents.
<InPhase> I do like that 0.000001 limit myself. But maybe we need a slightly larger sample size of people.
<InPhase> I can handle either, so I don't have strong feelings on it. :)
<InPhase> I stipulate also that 0.000001 is pretty character inefficient.
<peepsalot> current behavior acts more or less like -5
<peepsalot> at least for this trivial example of 1 sigfig
<InPhase> e-4 is the size turnaround where exponents are shorter.
<InPhase> I believe it is consistent for negative exponents as long as there are at least 2 non-zero digits.
<JordanBrown[m]> We need printf. I got it about 98% working with libfmt, but was defeated by trying to make OpenSCAD’s doubles work as the width and precision values.
<JordanBrown[m]> (Drive-by, going to sleep)
<InPhase> JordanBrown[m]: round?
<gbruno> [github] thehans synchronize pull request #4384 (Decimal round trip fixes) https://github.com/openscad/openscad/pull/4384
<peepsalot> hmm, interesting that current behavior is also +6 for the high end, and not +7
<peepsalot> should I just tweak it to match? i just pushed -5,+7 but maybe -5,+6 would be best?
<peepsalot> the only one other tweak I'm also not sure if we should keep, is omitting positive exponent sign. currently it *is* printed
<InPhase> I find the positive exponent sign superfluous.
<InPhase> And a waste of space.
J1A8414 has joined #openscad
J1A84 has quit [Ping timeout: 244 seconds]
<gbruno> [github] thehans synchronize pull request #4384 (Decimal round trip fixes) https://github.com/openscad/openscad/pull/4384
<peepsalot> InPhase: yeah i agree. i've removed it in the latest push, and set limits to -5,+6 for the minimal amount of change from existing behavior
<peepsalot> with that, I think I'm done fiddling
<peepsalot> or at least until further feedback
<InPhase> A fair enough set of choices. The only feedback I'd give is that ToShortest is still named misleadingly, as it doesn't even try to do that.
<peepsalot> well, tell that to google :P
ur5us has quit [Ping timeout: 250 seconds]
<InPhase> That name is from google code?!
<InPhase> I see it is... I missed that part of the explanation.
<InPhase> That's... unfortunate.
<JordanBrown[m]> InPhase I don’t remember the details, but it wasn’t that kind of problem. It was a problem with getting the data types right.
califax has quit [Remote host closed the connection]
califax has joined #openscad
<JordanBrown[m]> I was trying to feed an array of Value to a generic printf formatted. It was flexible enough to let that work for the data values, but not for the width and precision parameters. Or at least not with my limited knowledge of C++.
<peepsalot> JordanBrown[m]: i just replied to your email from a couple days ago. but in case you haven't been following, the PR i have been working on is related to the cache precision issue mentioned there
<peepsalot> in case you are interested in trying it https://github.com/openscad/openscad/pull/4384
<JordanBrown[m]> s/formatted/formatter/ DYAC
<JordanBrown[m]> I need to buildup a cheat sheet correlating IRC names, GitHub names, email addresses, and real names.
<JordanBrown[m]> My point about printf was that we don’t have any easy way for somebody to control how numbers are presented, and should.
<JordanBrown[m]> If you are curious about my attempt, you can look at the “printf” branch of https://GitHub.com/jordanbrown0/OpenSCAD .
<peepsalot> IIRC there was also some discussion about a builtin for going the other way: string to double
<peepsalot> though, that is maybe less applicable. not sure
fling has quit [Ping timeout: 258 seconds]
<JordanBrown[m]> Parsing string-encoded data, eg SVG path style.
<peepsalot> basically std::atof
<peepsalot> or std::strtod i guess
<peepsalot> had to look them up, can never remember those function names/signatures
<JordanBrown[m]> Yep.
<JordanBrown[m]> But yes less applicable.
<JordanBrown[m]> I need to go back to trying to sleep. I’m out of gas but haven’t been able to get to sleep.
<peepsalot> doh, looks like different platforms differ on last significant digit or so
fling has joined #openscad
<peepsalot> iirc our python test scripts had some number-fudging code during comparison to compensate for issues like that, and I think I disabled it when I switched to double-conversion. might need to add that back in
ur5us has joined #openscad
<InPhase> peepsalot: On platform differences, fesetround maybe?
<InPhase> peepsalot: I'm not sure if they are actually different, but it's conceivable.
<peepsalot> CGAL requires some specific rounding setting itself
<peepsalot> or, i thought it did. we set "-frounding-math" for GNU compiler, but don't see anything for other platforms
<peepsalot> in CMakeLists.txt
<InPhase> Well that sounds erroneous.
<InPhase> The mismatch anyway.
<peepsalot> i don't really get it
<peepsalot> i guess if you don't specify that flag, then maybe fesetround wouldn't work on GCC?
Killy has quit [*.net *.split]
Cadair has quit [*.net *.split]
tcurdt has quit [*.net *.split]
castawayc has quit [*.net *.split]
zauberfisch has quit [*.net *.split]
n1essa has quit [*.net *.split]
rue_mohr has quit [*.net *.split]
ubitux has quit [*.net *.split]
<peepsalot> so maybe just using fesetround is the right answer as you suggested
rue_mohr has joined #openscad
castawayc has joined #openscad
n1essa has joined #openscad
zauberfisch has joined #openscad
<peepsalot> we could add this to LibraryInfo https://en.cppreference.com/w/cpp/types/climits/FLT_ROUNDS
tcurdt has joined #openscad
ubitux has joined #openscad
Cadair has joined #openscad
Killy has joined #openscad
peepsalot has quit [Quit: Connection reset by peep]
peepsalot has joined #openscad
Guest94 has joined #openscad
Guest94 has quit [Quit: Client closed]
Guest94 has joined #openscad
Guest94 has quit [Client Quit]
Guest94 has joined #openscad
aiyion has quit [Write error: Connection reset by peer]
aiyion has joined #openscad
ur5us has quit [Ping timeout: 248 seconds]
Guest94 has quit [Quit: Client closed]
fluffytoebeans has joined #openscad
fluffytoebeans has quit [Remote host closed the connection]
fluffytoebeans has joined #openscad
ur5us has joined #openscad
pah is now known as pa
fluffytoebeans has quit []
epony has quit [Remote host closed the connection]
fling has quit [Remote host closed the connection]
fling has joined #openscad
ur5us has quit [Ping timeout: 250 seconds]
castaway has joined #openscad
epony has joined #openscad
califax has quit [Ping timeout: 258 seconds]
fling has quit [Remote host closed the connection]
fling has joined #openscad
califax has joined #openscad
fling has quit [Remote host closed the connection]
fling has joined #openscad
teepee has quit [Ping timeout: 258 seconds]
teepee has joined #openscad
redlizard has quit [Ping timeout: 246 seconds]
neur0 has joined #openscad
J1A8414 has quit [Quit: Client closed]
J1A8414 has joined #openscad
redlizard has joined #openscad
snaked has quit [Ping timeout: 260 seconds]
redlizard has quit [Ping timeout: 268 seconds]
redlizard has joined #openscad
snaked has joined #openscad
snaked has quit [Ping timeout: 248 seconds]
Guest94 has joined #openscad
<Guest94> :]
Guest94 has quit [Quit: Client closed]
<J1A8414> Ü
la1yv has quit [Read error: Connection reset by peer]
la1yv has joined #openscad
snaked has joined #openscad
snaked has quit [Quit: Leaving]
paddymahoney has quit [Read error: Connection reset by peer]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
qeed has quit [Quit: qeed]
qeed has joined #openscad
J1A841466 has joined #openscad
J1A8414 has quit [Ping timeout: 244 seconds]
J1A841466 has quit [Quit: Client closed]
J1A841466 has joined #openscad
J1A841466 has quit [Quit: Client closed]
J1A841466 has joined #openscad
juri_ has quit [Ping timeout: 260 seconds]
castaway has quit [Ping timeout: 260 seconds]
juri_ has joined #openscad
juri_ has quit [Ping timeout: 252 seconds]
juri_ has joined #openscad
J1A84146663 has joined #openscad
J1A841466 has quit [Ping timeout: 244 seconds]
<gbruno> [github] Paulwhy2 opened pull request #4385 (Resolves Issue #355 - added a hull example to basic examples) https://github.com/openscad/openscad/pull/4385
qeed has quit [Read error: Connection reset by peer]
qeed has joined #openscad
splud has quit [Ping timeout: 252 seconds]
lastrodamo has joined #openscad
splud has joined #openscad
splud has quit [Ping timeout: 250 seconds]
splud has joined #openscad
ur5us has joined #openscad
lastrodamo has quit [Quit: Leaving]
ali1234 has quit [Remote host closed the connection]
ali1234 has joined #openscad
ur5us has quit [Remote host closed the connection]
ur5us has joined #openscad
J1A8414666317 has joined #openscad
J1A84146663 has quit [Ping timeout: 244 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
<linext> anyone have a demo of the monaco editor alone, without the rest of ochafik's demo?
<teepee> no demos / tutorials on their project site?
<teepee> so lots of hot glue saves quite some design time :) - https://imgur.com/a/h4gWWCL
<linext> hmm... i'm not using node js
<linext> i guess it needs to be compiled?
<teepee> possible, well webpacked or something?
<linext> it's actually similar to the web assembly for openscad
<linext> i'll boot up my ubuntu VM and see if it can install
<linext> nodejs was needed to generate the output files, not for being the web server
<linext> hmm... no HTML files get created
<linext> is there a good customizer that demonstrates $fn, $fs, $fa ?
<teepee> I have not seen something for that
J1A8414666317 is now known as J1A84
<J1A84> $fn and $fa is the same   while $fa limits the $fs value
<J1A84> as $fs depends on size/radius
<J1A84> teepee did you glue all the lights or did they came with glue .. looks more white  though
<J1A84> for demo i would use a cylinder because a sphere had wrong longitunal  fragment numbers
<J1A84> hm that slider is hard to adjust on that scale
<linext> i kind-of want to put $fn on every customizer
<linext> lowering it generally improves load speed
<linext> and maybe some warning when a customizer is being submitted if the load time is more than 10 seconds
<J1A84> $fn will have priority over $fs but can have  unexpected results if you have many small and some big  roundings
fling has quit [Ping timeout: 258 seconds]
<J1A84> maybe a drop down with  36 72 144  is  more usefull
fling has joined #openscad
<J1A84> or add a preview mode that renders with lower values
<linext> hmm...
<linext> monaco-editor looks for a /release/ folder
<linext> the release doesn't contain that folder
<teepee> J1A84: the led string is unchanged, that's how those addressable led string lights look like https://smile.amazon.de/gp/product/B094MQZGYS/
<teepee> we discussed some sort of limit on the $fX variables that could be forced from outside
<teepee> in context of cadhub
<teepee> forcing $fn is not a good thing, that could even make things worse
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
<J1A84> oh fully addressable  nice ..  12¢/led  is ok and 12m is a lot
<teepee> yep, it comes with some cheap usb connector + ir remote
<teepee> making it useful is just a matter of swapping 3 solder joints :)
<J1A84> and terrible programs as it looks Ü
<teepee> yes, some would be even acceptable if they would allow more slowdown, but the lower limit is still too fast for any actual use
<J1A84> the poor user that can't program them ..   funny how different views  on  a hardware can be
<teepee> yep, they might be fun for a party, but otherwise only the single color fixed view seems to be reasonable
<J1A84> i always wondered why all rainbow controller are  so boring and not randomizing  .. it is not that difficult
<teepee> there's slightly more expensive ones that come with bluetooth + microphone stuff, but all the blinky modes are still crazy
<teepee> yeah, fun to click through and see effects, but in any real world just useless
<J1A84> and  if you go full white .. this will pull 10W
<J1A84> (over the 2.5W USB)
<teepee> I have not measured, but running via a 2.1A usb socket should be fine :)
<teepee> I'll probably limit them via the esphome firmware
<teepee> worked nicely with the signal tower too, so max user brightness all white was about 500mA there
<J1A84> someone build a nice 64LED lamp .. and printed in PLA -- got a melt down
<teepee> I can believe that easily. even a single 3W led can probably melt through PLA in very short time
<J1A84> that would be 5mA per LED  - maybe these are not the standart WS2815 (11 12)
<J1A84> d
<teepee> yeah, I suppose they limit that somehow to stay at max 2A
<teepee> they are plugging directly into USB after all
<teepee> you don't want customers to explode all the things by plugging that thing in and pressing the white button :)
<J1A84> ah  you meant with the default software  it is 500mA
<teepee> no that was with my esphome setup
<teepee> but I don't think that led string goes to full 20ma per led
<teepee> that would be 6A for white
<teepee> but then, I did not try with a power source that can give 6A @ 5V
<teepee> not sure the connectors would like that
snaked has joined #openscad
<J1A84> it should go well over 500mA ..  maybe there is some PTC   or regulator
<J1A84> however you  want a gamma correction to get nice colors
<teepee> true, but for the normal display modes I like it's not that critical
<teepee> not the final version, but the firmware description is *really* simple https://pastebin.com/hrDUGqVY
<J1A84> but when you cut the 3 wire  i would assume the led driver is also cut away .. never heard that the led itself has an current limiter .. maybe they used higher resistances within the leds
<teepee> sure, they run at 5V with the data line, so the power control is on the chip
<J1A84> the chip has 3× pwm  but no limiter
<teepee> there has to be something, otherwise a single one would burn out on 5V and there's no issues running them like that
<J1A84> btw make sure to have a 470Ω resistor in the dataline .. else a contact issue can fry all chips
<teepee> I mean the PWM is in the chip itself, you can push in set of colors and then just keep them running in that color without more data clocked in
<J1A84> yo  i have a led here that  i hook  on the  rainbow controller  and  remove the data line when it hits the color i want ..  Ü
<J1A84> maybe if using a small coil for the data line -  a wireless color setting kids toy can be build
<teepee> yeah, with all the hot glue I'll probably take the risk
<teepee> I'll probably do a better version with clip-in design if I have more time, maybe even a PCB instead of that perf board thingy
<teepee> the one I'm using as night light still uses the esp8266 controller
<J1A84> i run the all an ATTiny85 .. no need for wireless controller
<teepee> I'll give you 5 attiny13 then :P
fling has quit [Remote host closed the connection]
<teepee> driving a 5 pointed star with 20 leds charlieplexed each, I still love that thing, will be in the window in 2 month again :D
fling has joined #openscad
<J1A84> with 5× μcontroller ?   a shift register would be easier
<teepee> boring :)
<J1A84> oh  5 pins is enough for 20
<teepee> now where is that video?
<teepee> I have no idea which yt channel that is in
aiyion has quit [Ping timeout: 258 seconds]
<J1A84> isn't the attiny13 bit slow
aiyion has joined #openscad
<J1A84> oh also 20Mhz .. just less memory
<teepee> yes, and reliably glitches at 4,5V into software that was uploaded before ;-)
<J1A84> • Operating Voltage:
<J1A84> – 1.8 - 5.5V for ATtiny13V
<J1A84> – 2.7 - 5.5V for ATtiny13
<teepee> oh, it's private, https://www.youtube.com/watch?v=GPqBhR_pCok now I need to check how to make it "unlisted"
<J1A84> maybe for lower speeds
<othx> teepee linked to a YouTube video with an unknown title => 1 IRC mentions
<teepee> yes, it can run down to lower voltages but not at 20mhz
<othx> teepee linked to a YouTube video with an unknown title => 2 IRC mentions
<teepee> hmm, still unknown?
<teepee> oh, "not made for kids", right
<J1A84> just thought maybe NSFW
<J1A84> yupp now working
<J1A84> oh it is 20led per controller  ..  i guess they work independently random
<teepee> yep, 5 separate printed pieces with a center holder
<teepee> each has 20 leds and an attyiny13
<J1A84> that is a lot of soldering work to get the charlyplexing right
<teepee> and *nothing* else :)
<teepee> big clive style
<teepee> the resistor is in the power line of the controller which is probably very much out of spec
<teepee> yeah, quite some soldering but 5mm leds, so all big enough
<J1A84> you can run ATmel  with 12v .. getting bit hot  but still works
<J1A84> (not saying you should)
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
<teepee> ah, I think that's the code - no official random function, that's way too big for the tiny chip :)
la1yv has quit [Read error: Connection reset by peer]
la1yv has joined #openscad
<gbruno> [github] thehans synchronize pull request #4384 (Decimal round trip fixes) https://github.com/openscad/openscad/pull/4384