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 or report bugs: https://goo.gl/lj0JRI | Tutorial: https://bit.ly/37P6z0B | Books: https://bit.ly/3xlLcQq | FOSDEM 2020: https://bit.ly/35xZGy6 | Logs: https://libera.irclog.whitequark.org/openscad | don't ask to ask
Jack21 has quit [Quit: Client closed]
<ali1234> what would be great in blender is... an object type that is backed y an openscad script instead of a mesh data block
<ali1234> just type what you want, heh
<ali1234> this would also mean that blender functions as an openscad ide since it has a built in script editor
<ali1234> so you could write some scad code and then apply a blender modifier to it, use it with instancing, apply shaders...
<ali1234> blender's new geometry nodes are pretty cool and can do a lot of things openscad does, but it seems not yet possible to do things like extrude and minkowski
<ali1234> the only problem with this idea is adding a new object type to blender is extremely difficult for no particularly good reason. you have to touch like 100 source code files to do it
<dalias> :-p
<ali1234> then there's the details like how to specify blender material slots in openscad. that could be done with attributes i guess :)
The_Jag has quit [Quit: The_Jag]
default_ has joined #openscad
sublim8 has quit [Ping timeout: 268 seconds]
default__ has joined #openscad
default_ has quit [Ping timeout: 260 seconds]
<JakeSays> i've never used blender
ochafik has quit [Remote host closed the connection]
ochafik has joined #openscad
ochafik has quit [Ping timeout: 268 seconds]
<InPhase> JakeSays: They're great when you want a smoothie.
juri_ has joined #openscad
ochafik has joined #openscad
<InPhase> peepsalot: So nobody broke the rands. The detailed_tree still works fine, just in my rush to test this morning before leaving for work, I forgot teepee edited in an anim bool at the top, turning off the animation. :) It turned out my design did not depend on the rands refreshing themselves each run, because I seeded the sparkles on $t.
ochafik has quit [Ping timeout: 260 seconds]
<InPhase> peepsalot: Which does in fact mean that a design which seeds part of the way through cannot achieve unseeded rands on repeated runs. This is an edge case, but it seems one worth addressing somehow. Ideas that pop into mind: The quick hack would be a magic seed value, like nan, undef, or a string, which tells it to re-seed with the clock at any point the user wants. Or, always seeding with the clock
<InPhase> before each new run. Or, a new random number generator value type for max flexibility, acting like a built-in function literal type (the hardest solution, but more empowering).
<InPhase> Repeatedly reseeding with the clock is one of those things that's hammered into your head that you're not supposed to do because it's very predictable and non-random. But maybe OpenSCAD is an exception case to this rule?
<peepsalot> i mean, that's important if you're doing crypto, but I don't think relevant for openscad users
<peepsalot> InPhase: the thing i don't get, which I was just testing, is if you have one file open with non-seeded, and another file in the same process using seeded, the seeded one doesn't interfere with the non-seeded in that case
<peepsalot> i figured the issue would be that the generator was some kind of global, but apparently not? what is the lifetime/context of a random generator in openscad?
<InPhase> It's global.
<InPhase> deterministic_rng in func.cc
<InPhase> So it does interfere if you are consistent in running the seeded one, the unseeded one, the seeded one, the unseeded one.
<InPhase> If you run seeded one, unseeded one, unseeded one, seeded one, unseeded one, unseeded one, then the first unseeded runs in each set will match, as will the second unseeded runs in each set.
<InPhase> Which is of course what seeding is supposed to do per program. Just in this case, "program" should be the scad files, and not OpenSCAD.
<InPhase> It's easy enough to add a reset_seed function into func.cc, but I guess I'm not sure exactly where to call it.
<peepsalot> ah, i see the pattern now. so it just keeps generating from the seed, with like subsequent seeded values for each unseeded run
<InPhase> Right.
<peepsalot> i think just set if from clock at the start of CSG compile?
<peepsalot> *set it
<InPhase> I was thinking we had to do it for command line also, but of course we do not.
<peepsalot> maybe depends if animation is done from command line, i haven't tested since that was added
<InPhase> Oh, right... Yeah.
<InPhase> Hmm. Also, func.cc is weird. There's no header, because nothing includes this stuff.
<InPhase> The rng went there because that's where it's used. But these functions are weird self-registering functions with BuiltinFunction.
<InPhase> I guess I can repeat the absurdity in builtin.cc and do an extern void reset_seed(); directly in MainWindow?
ur5us has quit [Ping timeout: 268 seconds]
GNUmoon has quit [Ping timeout: 276 seconds]
ccox_ has quit [Ping timeout: 260 seconds]
ccox has joined #openscad
JoyaDK has joined #openscad
<JoyaDK> Another day, another question XD
GNUmoon has joined #openscad
<JoyaDK> My rendering stops (stands still) at 937/1000. Anybody knows why and what to do? (Win64)
<JoyaDK> Do I just have to wait longer (be more patient)? XD
<JoyaDK> Problem solved *duh* I need more patience... Sry for the stupid question
JoyaDK has quit [Quit: Client closed]
pah_ is now known as pa
pa has joined #openscad
pa has quit [Changing host]
lastrodamo has joined #openscad
Scopeuk has quit [Quit: Scopeuk]
Scopeuk has joined #openscad
<gbruno> [github] thohh opened issue #3967 (STL export: Command line produces different output than GUI). https://github.com/openscad/openscad/issues/3967
<gbruno> [github] t-paul closed issue #3967 (STL export: Command line produces different output than GUI). https://github.com/openscad/openscad/issues/3967
mhroncok has joined #openscad
The_Jag has joined #openscad
arebil_ has joined #openscad
arebil has quit [Ping timeout: 268 seconds]
qeed_ has quit [Quit: qeed_]
qeed has joined #openscad
Xeha has quit [Ping timeout: 260 seconds]
<InPhase> peepsalot: Well, the first round reseed attempt had undesireable results. The reseed algorithm in use was using time(), which only changes once per second. So short designs yield the same result multiple times in a row. That was fixed previously because the process ID was being mixed in, but when you reseed within process, it means the process ID doesn't change so both time and process ID are the
<InPhase> same.
<InPhase> peepsalot: This might require tapping into one of the higher resolution clocks, or an alternate approach such as seeding from a second RNG which is itself clock + process based.
snaked has quit [Quit: Leaving]
ochafik has joined #openscad
ochafik has quit [Remote host closed the connection]
ochafik has joined #openscad
ochafik has quit [Ping timeout: 256 seconds]
<teepee> ah, oh
<teepee> so... std::chrono::high_resolution_clock ?
<InPhase> Yeah, that should do it for the first of those two options.
<InPhase> I guess I could even do both.
<InPhase> Make a seed_rng seeded by high_resolution_clock, then at the start of every computeCSG, reseed deterministic_rng with the output of seed_rng.
<teepee> there's not much guaranties regarding resolution but I would expect it's more then seconds at least :)
<InPhase> That approach would guard against resolution issues.
<InPhase> Since I can still mix in the process ID as well.
<teepee> yeah, and not much more code
<InPhase> It would then be basically impossible to ever not be seeded randomly.
<teepee> right, room for later extension by a --initial-seed option :)
<InPhase> It looks like mt19937 has the sequence-seed initialized as well, so I can set that to more than 2^32 sized seeding with that much data.
<InPhase> s/initialized/implemented/
<InPhase> Officially that's the mt19937ar seed variant, which allows up to 624 32-bit values as a seed, corresponding to the size of the internal state vector.
<teepee> hmm, looks like high resolution aliases to system clock, not steady clock even with same tick period :(
<InPhase> And if we're being pedantic about edge cases, steadiness will only matter if we're repeatedly resampling from it, so if we use that seed_rng approach, high_resolution_clock is a fine bet.
<teepee> true
<gbruno> [github] t-paul pushed 1 additions 6 modifications 4 removals (Merge pull request #3966 from openscad/qt5-upgrade-macos
<InPhase> If nothing else jumps out at me I should be able to get that out tonight. It sounds like only a few lines on top of the few lines I already tried, plus testing.
<gbruno> [github] t-paul closed issue #3267 (2019.05 crashes on OS X 10.9.5). https://github.com/openscad/openscad/issues/3267
<gbruno> [github] t-paul closed issue #3775 (Consider dropping macOS 10.9-10.11 support to update Qt and enhance experience on current macOS versions). https://github.com/openscad/openscad/issues/3775
<gbruno> [github] t-paul closed issue #3639 (2021.01-RC6 - Hangs when quitting on macOS Catalina 10.15.7). https://github.com/openscad/openscad/issues/3639
<teepee> \o/
<InPhase> Yay.
<teepee> heh, I meant the code change :)
<teepee> the macos stuff is more meh than yay ;-)
<teepee> I guess I have to try upgrading the ancient macbook, which already feels like raspi 1 trying to do 4k video rendering
<teepee> it claims "no backup for 1810 days" so not much to lose
<InPhase> Well closing three mac issues is good, because the mac issues are troublingly difficult to get closed. :)
<teepee> yeah, there's still a number of build issues, but master snapshot seems fine for now
<teepee> kintel did finish up the upgrade, so that's great
<teepee> aaand no upgrade for this old macbook, one year too old
<InPhase> Install an emulator and emulate a newer machine? ;)
<teepee> I suppose I'll try first to resurrect the partially broken and disassembled other macbook
<teepee> if I can get the battery out, get it assembled and it still works, it should support newer os version, I think it's a year 2013 device
bomb has joined #openscad
mhroncok has quit [Quit: Leaving.]
<bomb> InPhase I finished the first chapter of the tutorial already! :)
<bomb> it looks beautiful, isn't it? https://i.imgur.com/c7k8k2A.png
<teepee> neat, tutorial car, make it into a race car through the next chapters :)
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
<gbruno> [github] t-paul pushed 1 modifications (Remove Debian 9, add Ubuntu 21.10.). https://github.com/openscad/openscad.github.com/commit/b7a3738e4fe03f2c7787a61cb9e1cc5808bfb500
Alexer- has quit [Ping timeout: 260 seconds]
ur5us has joined #openscad
Alexer has joined #openscad
<bomb> that hotrod, exactly :)
<InPhase> bomb: Looks good. :) And welcome to here.
<bomb> thanks!
<bomb> a revolver cylinder! https://i.imgur.com/4STMwS4.png
<bomb> is it okay if I keep sharing my OpenSCAD "creations" in this channel?
<Joel> I personally hope you do :0
<Joel> :)
<bomb> hehe
<InPhase> bomb: Yeah, we do this sort of thing. :)
<InPhase> bomb: The channel is about both development of OpenSCAD and usage.
GNUmoon has quit [Ping timeout: 276 seconds]
<bomb> InPhase cool!
<bomb> and this is my idea of DNA double-helix: https://i.imgur.com/SxTZHci.png
<bomb> could go a long way with a nice Blender render :)
default_ has joined #openscad
default__ has quit [Ping timeout: 260 seconds]
GNUmoon has joined #openscad
TheAssass1n has joined #openscad
TheAssassin has quit [Ping timeout: 276 seconds]
<InPhase> bomb: peepsalot was working on some significant shader quality improvements recently. The preliminary results are very nice.
<InPhase> bomb: e.g.: https://imgur.com/a/UvdyLHz
<InPhase> bomb: Also, I should add that double helix is a pretty solid result for a first-day model. :)
<InPhase> And a very good demo of what I was saying in the other room about patterned systems being much easier to model programmatically.
<JakeSays> bomb: hey man. who let you in here
<bomb> InPhase thanks you! exactly, many "algorithmic modeling" possibilities with OpenSCAD, like these stuff: https://www.grasshopper3d.com/photo?sort=mostPopular
<bomb> JakeSays hey hey! didn't know you're into CAD stuff :) did you make the house numbers parts in OpenSCAD?
lastrodamo has quit [Quit: Leaving]
russnelson has quit [Remote host closed the connection]
russnelson has joined #openscad
The_Jag has quit [Quit: The_Jag]
<InPhase> bomb: And when you run out of stuff to make with deformations and combinations of the built-in primitives, there's a world of arbitrarily curvy stuff out there too. e.g.: https://github.com/rcolyer/closepoints https://github.com/rcolyer/plot-function
ferdna has joined #openscad
<InPhase> bomb: And much hackery went into this one... But here's lf94's hand, in case you need to biometrically identify as lf94 some day: https://imgur.com/a/AzSq2c6