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
J24k76 has joined #openscad
J24k has quit [Ping timeout: 250 seconds]
GNUmoon2 has quit [Remote host closed the connection]
GNUmoon2 has joined #openscad
LordOfBikes has quit [Ping timeout: 268 seconds]
LordOfBikes has joined #openscad
Guest25 has joined #openscad
Guest25 has quit [Client Quit]
mmu_man has quit [Ping timeout: 268 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
snaked has joined #openscad
<J24k76> Is it possible to allow some "stop calculation" dialog if SCAD is unresponsive for over 1min - this happens quite a lot if you accidentally used a variable that is undef (or misspelled it)  - The only way at the moment is wait or kill. After waiting you just get a long warning list but it takes several minutes in more complex modules that have
<J24k76> loops or recursion.
<J24k76> There should be an easier way to detect and end any calculation that is done with something "undef"
<InPhase> J24k76: There really should. But I think the problem arises when the nan values get passed into the geometry engine, rather than inside the openscad code.
<InPhase> J24k76: Perhaps we should be filtering for nan values before we construct inputs to geometry engines.
<InPhase> J24k76: And simply refuse to pass any in, because there is no way this can succeed.
<J24k76> sounds a good idea - on the other hand i start putting asserts in each variable ( as the assert function is only checked after)
<InPhase> Or maybe at the first construction of objects representing a geometry.
<J24k76> also questionable if this is still just a warning and not an error
<InPhase> J24k76: Mostly I just kill openscad, which is minimally disruptive to me because I use vim. But I agree it's somewhat barbaric software behavior when a program freezes up like that from a typo.
<J24k76> 5*undef or  for(i=[0:undef])  seem to deserve more than a warning
<InPhase> For me it's usually just some long calculation, and then I did sin(x) instead of sin(a), when there was no x.
<InPhase> And then the whole thing freezes up because I had a bazillion points all undef.
<J24k76> i would kill it too if i could remember the state of the last safe - (or i am to lazy to load the backup which is still not directly offered like other program do " would you like to recover" )
<InPhase> Yeah. With vim I never hit that issue.
<InPhase> But I understand the frustration, and agree it should not function that way.
<InPhase> It's just it's been a struggle to sort out what to do about it.
<InPhase> We should probably contemplate if a nan filter would solve it.
<InPhase> Maybe there are issues where this isn't sufficient, but I'm not sure what those would be.
<J24k76> amazing now freeze over 10min  and the voronoi calculation is not even that big -  i think the strange thing is why this is so time consuming
<InPhase> J24k76: The x86 architecture has for a long time been REALLY slow when processing nan floats.
<J24k76> maybe because nested intersection and differences blow up that - also have the impression that manifold is here more sensitive
snaked has quit [Ping timeout: 268 seconds]
<InPhase> J24k76: I haven't benchmarked this explicitly in a while, but it has been a known issue with how floats are done on the processor lines since ancient times.
<J24k76> just realized why you don't have this issue with VIM - but it is any external editor as it just don't freeze up .. wouldn't it be possible to separate the scintilla from the engine to stay responsive
snaked has joined #openscad
<J24k76> InPhase - it already starts with "ignoring unknown variable" that really should stop things - Ü
<J24k76> but when "undifined operation" hits this really need to stop things
<InPhase> Making that a checkbox option would be fine by me.
<J24k76> not sure if the "stop at first warning" would help - but due to manifold i have this off
<InPhase> Oh... We do have this on.
<InPhase> s/on/one/
<InPhase> What is the manifold issue you were having with it?
<InPhase> Is it warning about inoccuous things?
<J24k76> so a more distinct selection for for stop would be nice - some people run thousand warnings like this is  normal (and don't have the console open)
<J24k76> manifold throws a warning in nearly all my  designs because some " calculating alternative"
<J24k76> some "stop after 10 warnings" would be nice - as it would catch the repeated warnings but let some margin for bad coding
snaked has quit [Ping timeout: 252 seconds]
<J24k76> InPhase it is WARNING: PolySet -> Manifold conversion failed: NotManifold
<InPhase> I guess I really only want "stop on computational step warning".
<J24k76> Trying to repair and reconstruct mesh..
<InPhase> Yeah, those should probably be type notification.
<InPhase> This is probably just a categorization error.
<InPhase> I don't treat them like warnings, which is why I couldn't immediately remember what you're talking about.
<J24k76> yes ..  funny we have warnings that are just notifications and also some that are really bad
<J24k76> they stop your design when "stop at first warning" is on
<InPhase> Well, that breaks the utility of that for sure.
<InPhase> I hadn't thought of this.
<J24k76> " only stop at severe warnings " Ü
<J24k76> need some defcon warning style  ..  Warning level 1 detected! ...   Warning level 5  - ignore
<J24k76> But i already like when user complain about my designs that they get an error - and they post the error and it literally tells them what to do
<InPhase> error, warning, notice, info. Normal stratification.
<J24k76> so guess i really need to kill this process - over 30min i am getting unpatient
snaked has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
noonien808310429 has quit [Ping timeout: 260 seconds]
noonien808310429 has joined #openscad
hyperair has quit [Ping timeout: 268 seconds]
noonien808310429 has quit [Ping timeout: 268 seconds]
nomike_ has joined #openscad
nomike has quit [Ping timeout: 264 seconds]
<J24k76> Compile and preview finished.
<J24k76> Total rendering time: 4:34:47.196
<J24k76> .. for some warnings!
<J24k76> WARNING: undefined operation (undefined + undefined)
<J24k76> but it clearly is TWO undefined
<J24k76> not to mention that without the warning we are under a second
<J24k76> InPhase it seems rands is not doing as it should ..  if no seed is given and you have multiple operations it looks like the difference was done with a different seed as so weird artefacts occure
<J24k76> thought this was what the stickiness should prevent
mmu_man has joined #openscad
<InPhase> J24k76: I don't know what you mean. Everything I've tested shows the correct operation.
<InPhase> Can you show a testcase with just echo and a series of rands calls and explain what differs from expected behavior?
<J24k76> InPhase here https://imgur.com/a/1tE6qOu  first with seed and second with random seed
<J24k76> the extrusion (roof) is limited by an intersection with an linear extrusion of that children();  and it seems it is done with a different seed
<InPhase> J24k76: That's the expected behavior of the fix you requested, right?
<J24k76> Not really  - i want to be able to use random seeds  - which is working now.  But the stickiness seems to be lost
<J24k76> but maybe it is not possible to keep the same random seed for all children calls from one module
<InPhase> If you want to regenerate the same sequence, you need to reseed with the same seed.
<InPhase> If you want to regenerate the same sequence with the same pseudorandom seed, you need to rands generate your seed, then reseed with that random seed twice.
<J24k76> if module A calls children() 4×   and the children uses a random seed  - it would be nice to have the same .. but if module A is called agein then a nother
<J24k76> I have no real problem with this - just seemed that the "sticky seed" is gone now
<InPhase> seed is called with a random seed at the start of each run, and with a fixed seed each time one is given, and all subsequent calls to rands behave accordingly. So you can generate random values or fixed sequences based on how you do these calls.
<InPhase> What you do with those values and how you control the seeding is up to the logic flow of your execution.
<J24k76> just wonder what the condition is that the seed sticks ..  maybe because i generate the rand seed not at top level
<InPhase> The seed set from one seed call to rands determines the next calls to rands.
<InPhase> Order of operations then matters, but this did not change before or after the recent fix.
<InPhase> I tested with a large number of echo call tests. From your images I can't see what you mean the issue is.
<J24k76> hm if i define a seeded rands all randomness is gone again - is your change in 2024.06.16 ?
<J24k76> The second image has a different seeded pattern within
<J24k76> the structure has 3 layer and with randomness each layer gets a different pattern (what schould not happen)
<J24k76> So if i define the rands  outside the module that uses it - it works but only till i set a different rands with a seed .. then the rands without seed is also locked which is unfortunate - i wanted to have both.
<InPhase> I don't know why you keep referring to modules, but this is probably the source of the confusion. This has nothing to do with modules. There is one openscad rng.
<InPhase> The mixture of true randomness and fixed randomness is determined by the order of calls to rands within a run, with nothing to do with scopes or modules.
<InPhase> To do unusual mixes of true and fixed randomness, generate your true randomness at the top and propagate accordingly for usage or reseeding.
aiyion3 has quit [Ping timeout: 260 seconds]
<InPhase> This is the best that can be done with the provided API. Better would require RNG objects, which again would need to be propagated equivalently.
<InPhase> RNG objects would have to be setup as a new Value type, which is a whole bigger pile of work if someone wanted to do that.
snaked has quit [Quit: Leaving]
<J24k76> InPhase if i have a=rand(0,1,1,5); and b=rands(0,1,1);   both never change .. while without a seeded they change with each update
mmu_man has quit [Ping timeout: 255 seconds]
mmu_man has joined #openscad
mmu_man has quit [Ping timeout: 246 seconds]
<InPhase> J24k76: Run the example in the PR repeatedly, and then you will see that I've been trying to express: https://github.com/openscad/openscad/pull/5165
<J24k76> so magic of random comes first - Ü
<InPhase> Hency sticky, but unseeded initial values.
<J24k76> I still question my decision of using random pattern .. every export looks different Ü
<InPhase> There is no implemented support for "do a true random seed", but someone could add that by putting in support to handle some sort of sentinel input like undef. The function I used to reseed at start could be reused for this, but I'm not particularly interested in diving into the handling of an undef reseed. :)
<InPhase> Calling the function I added should do a formally true random but way below cryptographic quality reseed, even in a tight loop of compute steps.
<J24k76> if you liked a pattern (F5) it will be different for F6 .. so probably better to seed it, what i done in the past to create a random seed that is displayed so you can enter it for reproduction
<J24k76> true random requires lava lamps or radioactive noise
<J24k76> and there is still the question if our nature is not based on a simulation - you know the EGG devices?
<InPhase> Time is formally random, but just comically low entropy with the seconds-only clock we happen to be using to simplify portability.
<InPhase> Although I have a windows/mac/unix high resolution clock seed generator if we needed to go there. It just seems pretty out of scope. :)
<J24k76> some sensor noise can give you good randomness
<InPhase> What we actually do in openscad is mix the time value with the process ID (which is reasonably unpredictable, and varies per run), and then for random reseeding this is mixed with the output of the last random reseed generator, to make sure rapid reseeds don't get repetitive.
<J24k76> can't see any reason why you would need more in SCAD
<InPhase> High resolution clocks though give formal entropy which can build up adequately fast with jitter that it's actually usable as true random. I've written RNGs that behave well for true randomness generation using this.
<InPhase> And I could add them to openscad! It just seemed serious overkill for moving some widgets around in a model. :)
<J24k76> we also could use PI as random sequence and just pick a different digit
<InPhase> It would not be hard to integrate either, but my responsibility side attempts to preserve maintainability. :)
<J24k76> or some more chaotic function for a fractal
<InPhase> J24k76: Pi is formally pseudorandom. There's even a "generate arbitrarily indexed binary digits of pi" formula.
mmu_man has joined #openscad
<InPhase> Although last I checked no such formula created for decimal.
<J24k76> choose 64 random bits
<InPhase> Activate the webcam and hash the result, and flash "hold still for consistent seeding" on the screen.
<InPhase> Thus making it the user's responsibility. ;)
<J24k76> it is funny that you can identify user by mousemovements  so these CAPTCHA are not monitoring what you click but how you move the mouse for "i am not a robot"
nomike_ has quit [Remote host closed the connection]
kow__ has joined #openscad
drkow has quit [Ping timeout: 268 seconds]
cart_ has joined #openscad
<InPhase> J24k76: Which would be super easy to thwart.
<InPhase> Would be and is.
<InPhase> It stops only the most trivial of clicking solutions.
zauberfisch has quit [Ping timeout: 264 seconds]
neothechosen has quit [Ping timeout: 264 seconds]
mohammad1722 has joined #openscad
mmu_man has quit [Ping timeout: 264 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
teepee has quit [Ping timeout: 260 seconds]
teepee has joined #openscad
mmu_man has joined #openscad
teepee has quit [Client Quit]
teepee has joined #openscad
teepee has quit [Client Quit]
teepee has joined #openscad
Junxter has quit [Read error: Connection reset by peer]
Junxter has joined #openscad
mohammad1722 has quit [Ping timeout: 250 seconds]
hyperair has joined #openscad
TheAssassin has quit [Ping timeout: 260 seconds]
TheAssassin has joined #openscad
mmu_man has quit [Ping timeout: 264 seconds]
mmu_man has joined #openscad
nomike has joined #openscad
<nomike> Could someone tell me if I got the gist of the overlap rule right? https://bpa.st/QGAA
<Virindi> okay. I got the openscad lockup again, where after running awhile when I open a complicated file it just locks up using 100% cpu (but killing the process and opening the same file loads in 1-2 seconds)
<Virindi> this time I let it run
<Virindi> after ~10 minutes I got
<Virindi> WARNING: Normalized tree is growing past 2000000 elements. Aborting normalization.
<Virindi> WARNING: CSG normalization resulted in an empty tree
<Virindi> it seems to be that if I load a file with a freaking boatload of errors, it works fine on a fresh process but dies with an old process
<Virindi> seems like it would be fine if it didn't lock up and instead spewed the errors to console
<Virindi> I think that is the core problem
J24k76 has quit [Quit: Client closed]
<Virindi> ah, this time if I load the file with a fresh process it also locks up.
J24k76 has joined #openscad
<Virindi> loading a file should never lock up the GUI.
<Virindi> for minutes
<Virindi> how am I supposed to figure out where the error is if I can't even load the file :)
<Virindi> this time, fresh process = lock for 30 seconds. old process = lock for 10 minutes
<gbruno> [github] gsohler opened pull request #5195 (Don't run parseToplevelDocument twice) https://github.com/openscad/openscad/pull/5195
<gbruno> [github] gsohler pushed 1 modifications (Don't run parseToplevelDocument twice When OpenSCAD is called with an Design File as argument, MainWindow::parseToplevelDocument is called twice Its also called from MainWindow::compile Even customer still works with the code commented. I dont see why this is needed.) https://github.com/openscad/openscad/commit/d1381c538a71072dbb99d3a3d9b2692a701fc769
mmu_man has quit [Ping timeout: 268 seconds]
guso78k has joined #openscad
<guso78k> BTW in my branch I also have an CSG Worker which helps me not to block the GUI from my functions which have a cpu expensive createGeometry member function.
mmu_man has joined #openscad
<Virindi> :)
guso78k has quit [Ping timeout: 250 seconds]
fling has quit [Remote host closed the connection]
fling has joined #openscad
cart_ has quit [Ping timeout: 252 seconds]
peepsalot has quit [Remote host closed the connection]
peepsalot has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee