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
<InPhase> teepee: Apparently not a good one, if the person above in the scrollback couldn't open files with it. :)
<InPhase> teepee: But I didn't realize it was brand new. Maybe that was just some first-attempt bug.
<teepee> where, who?
<teepee> it's packaged, nobody said functional (yet) ;-)
<InPhase> teepee: Conversation with stealth, 2024-08-12 04:39 UTC
<teepee> that was the openscad-nightly, that should be fine, it's released for years
<InPhase> (I forgot it was stealth that I was talking to about that. I do know stealth from python-land.)
<teepee> but as Scopeuk mentioned, it's containerized, so you can't just use any path
<InPhase> Well, using paths to open files is like, one of the important features. :)
<teepee> I tried packaging the library manager python stuff in snap
<teepee> packaging works, I patched some test code but it's not yet working due to some function renames it seems
aiyion1 has quit [Ping timeout: 260 seconds]
<InPhase> Although in addition to the failure to operate, OpenSCAD itself might have given an incorrect error message if that was a permissions error.
<teepee> also there's no actual cli yet, so it really just starts python in a venv with the API
<teepee> so in theory what should work is something like
<teepee> olman
<teepee> (gives a standard python prompt)
<teepee> import olman_client.api as o
<teepee> o.update()
aiyion1 has joined #openscad
<teepee> no idea, that imgur image was gone when I read the scrollback
<stealth_> hey
<stealth_> you guys talking about that snap bug?
<teepee> not really, but it came up :)
<stealth_> i removed the image after talking, here uploaded again https://imgur.com/a/Waca8qC
<teepee> well, yes, it's not a bug or permission issue, it's just a fact of snaps being containers and isolated from the host system
<teepee> openscad has the home-plugin enables, so the snap sees the home directory but not the whole file system
<stealth_> it seems to have worked fine for files under "/" directory but not for "/data" (mount)
<teepee> if you have /data it should be possible to enable that for the snap
<stealth_> well its just a partition
<stealth_> hmm i see, first time using snap
<teepee> not sure if it can do just any mount, there is something for removable devices but that looks like targeting actual usb-sticks and such
<teepee> anyway, past time to get some sleep, maybe I'll find a minute to look through the docs tomorrow
<stealth_> i just uninstalled the snap package and start using AppImage, works fine, less headache
<teepee> that can have other issues, but it's not a container, so no file system access dances ;-)
<stealth_> no worries.
<stealth_> questio: say i have a cylinder and i move it `x=1`, the position is set not on 1 but offset by something? if the `cylinter(center=true)` then it seems to center. is there position you can use to set left/right/top-right, ...?
<stealth_> in graphic software you can set "Alignment" of the object, anythig like that in OpenSCAD? https://inkscape-manuals.readthedocs.io/en/latest/align-and-distribute.html
LordOfBikes has quit [Ping timeout: 260 seconds]
LordOfBikes has joined #openscad
<stealth_> nm i suppose you just use translate() to offset as you need it.
hisacro has quit [Ping timeout: 264 seconds]
hisacro has joined #openscad
snaked has quit [Ping timeout: 260 seconds]
J24k10 has joined #openscad
J24k15 has quit [Ping timeout: 256 seconds]
mmu_man has quit [Ping timeout: 252 seconds]
snaked has joined #openscad
ferdna has joined #openscad
jaredo has quit [*.net *.split]
jaredo has joined #openscad
marcus has quit [Ping timeout: 248 seconds]
marcus has joined #openscad
misterfish has joined #openscad
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
<J24k10> so the 2D systems causes SCAD to close unexpected if offsets are applied that have exactly  size/2 of the object (so the object or gap would vanish)
<J24k10> (happens also without manifold)
JakeSays has joined #openscad
JakeSays_ has quit [Ping timeout: 252 seconds]
<stealth_> J24k10, if its a simple script i can run it on my system see if it happens as well.
<J24k10> it is voronoi shape that is in my librarie
<J24k10> Rund(.5)Voronoi(30,dicke=1);
<J24k10> https://imgur.com/a/hFimkvm  this is the shape and substract and apply an offset of .5  (the gaps are 1)  scad closes without warning
<stealth_> J24k10, you will have to wait for one of the devs to help you with this topic.
<stealth_> btw, the link has an extra space so it gives 404 page.
<J24k10>  https://imgur.com/a/hFimkvm is this better (links work fine for me there is something changed on irc clients)
<stealth_> ya
hisacro has quit [Ping timeout: 252 seconds]
<J24k10> here how both links looks for me https://imgur.com/a/5UXSEnR
<stealth_> i am using HexChat maybe its dumb
<J24k10> iirc peeps[zen] complained about my link formatting causing some issue with matrix  ( i am just using web.libera.chat )
<J24k10> ok this only happens with specific $fs settings
stealth_ has quit [Quit: Leaving]
hisacro has joined #openscad
<J24k10> happens only when using offset(delta=-.5) not with offset(r=-.5);    (there are 4 offsets for rounding involved)
J24k10 has quit [Quit: Client closed]
J24k10 has joined #openscad
ferdna has quit [Quit: Leaving]
snaked has quit [Ping timeout: 248 seconds]
drfff has quit [Read error: Connection reset by peer]
pie_ has quit [Remote host closed the connection]
pie_ has joined #openscad
axelrod has joined #openscad
Ekho- has quit [Quit: CORE ERROR, SYSTEM HALTED.]
Wolf481pl has joined #openscad
Wolf480pl has quit [Quit: ZNC disconnected]
yogadude has quit [Ping timeout: 248 seconds]
teepee has quit [Quit: bye...]
teepee has joined #openscad
Ekho has joined #openscad
noonien808310429 has quit [Ping timeout: 244 seconds]
lostapathy has quit [Ping timeout: 276 seconds]
yogadude has joined #openscad
misterfish has quit [*.net *.split]
LordOfBikes has quit [*.net *.split]
guerd871 has quit [*.net *.split]
greenbigfrog has quit [*.net *.split]
yogadude has quit [Ping timeout: 252 seconds]
califax_ has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
califax has quit [Ping timeout: 260 seconds]
califax_ is now known as califax
<pca006132> J24k10: what is your library?
yogadude has joined #openscad
<pca006132> have to say that the name... triggers my C++ programmer instinct a bit
<J24k10> it can be quite unexpected
<pca006132> nice, immediately crashed when I preview the file
teepee has quit [Quit: bye...]
<pca006132> it died in 'polygon2dToPolySet'
greenbigfrog has joined #openscad
misterfish has joined #openscad
LordOfBikes has joined #openscad
guerd871 has joined #openscad
<pca006132> I remember a similar issue
<J24k10> it is an edge case as i couldn't get this with normal gaps only with the angles of the voronoi and only when using the -delta offset and only if the gap is the rounding size (which shouldn't be used at all) but something seems to align points in a way that causing a crash
teepee has joined #openscad
<J24k10> I think i had something similar with the SVGs (of a dragonfly wing https://makerworld.com/en/models/563928) but thought this may be related to some bad points on the svg
<pca006132> it seems that createTriangulatedPolySetFromPolygon2d is somehow giving a corrupted triangulation
<J24k10> haha just though why is my design now taking so long to render .. still had manifold deactivated - Ü
<J24k10> pca006132 i have seen that offset can cause gaps and points be positioned wrong probably because of float precision calculations - so multiple offset can amplify this.
<J24k10> if you set fn=36 (Rund(.5,fn=36) ) the crash did not happen.
lostapathy has joined #openscad
<pca006132> still cannot fix the bug, but I think I found another issue
<pca006132> at least in createTriangulatedPolySetFromPolygon2d, prev->info() should be polyset->vertices.size() + last_idx;
<pca006132> otherwise the index will be wrong
<pca006132> but I have no idea why cdt is giving invalid result at the end when all inputs are seemingly correct
<pca006132> I added a check to discard the invalid face, and it somehow works? manifold is not reporting manifoldness error when I extrude that thing
<pca006132> weird
mmu_man has joined #openscad
<J24k10> sounds good - i wouldn't care about an error - but a crash is annoying ( and then i wish the backup file was top of the recent files)
mmu_man has quit [Ping timeout: 258 seconds]
<gbruno> [github] pca006132 pushed 1 modifications (attempt to fix #5253) https://github.com/openscad/openscad/commit/f9054ba7e9855b0cdd2cd666a32350d1bc0e7f65
<gbruno> [github] pca006132 opened pull request #5260 (attempt to fix #5253) https://github.com/openscad/openscad/pull/5260
<pca006132> J24k10: you can try this
mmu_man has joined #openscad
<J24k10> pca006132 sorry i have no environment to build/compile
<teepee> no need, just download from the link
<pca006132> you can probably try to wait for the CI
<J24k10> teepee link? where? what?
<J24k10> the nightly or something else?
<teepee> J24k10: klick the pull-request link above
<teepee> click the "checks" tab
<teepee> make sure it has "CircleCI branch build" selected on the left side
<teepee> click the link "openscad-mxe-64bit - Success"
<teepee> click "Artifacts" tab
<J24k10> teepee awesome thanks!
<J24k10> pca006132 sorry still crashes without warning
hyperair has quit [Ping timeout: 260 seconds]
hyperair has joined #openscad
<pca006132> is your code the same as the old one?
<pca006132> at least your code works now on my machine
<guso78> Suggest to Install msys2 and Debug with gdb. IT can exactly Spot the call Stack where Crash happened
<guso78> .
<pca006132> iirc the CI build does not have debug info
kintel has joined #openscad
<kintel> Hi all - I'm back online! Will catch up over the next few days. Let me know if anything warrants my attention
<J24k10> pca006132 ok this is weird  - the code runs at the first preview but crashes on the second .. i used the module and then wrote the same offsets into code so it works without the module (tried to make a test case  without the lib)  and on works the other don't
kintel has quit [Client Quit]
<pca006132> Hi kintel, the crash J24k10 found is probably due to some issue with the constrained delaunay triangulation thing
kintel has joined #openscad
<kintel> Using CGAL's triangulator, or Manifold's?
<kintel> i.e. with or without -DUSE_MANIFOLD_TRIANGULATOR=1 ?
<J24k10> this is now gambling -  i got 4× F5 until the crash
<pca006132> without
<pca006132> just CGAL's triangulator
<pca006132> you can check my PR that kind of tries to fix it but doesn't fix it completely
<kintel> Is there a way of reproducing the crash? The issue doesn't specify a test case
<pca006132> hmm it is not exactly 5253, but I think they are related since they crash in the same part of the code, will add reproducer
<pca006132> done
<pca006132> J24k10 may have other cases, because the current code runs fine on my machine with the PR
<J24k10> pca006132 have you tried preview F5 several times (without changing the code)  - as 2024.08.14  works only sometimes
<pca006132> ah, it takes quite a few times to crash it
<pca006132> but yeah after spamming F5 it eventually crashed
<pca006132> weird but also not very surprising because I am pretty sure my "fix" is not a proper fix
<pca006132> I feel like this is some sort of memory corruption...
<kintel> can reproduce with the UB test case
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guso78k has joined #openscad
guso78k has quit [Client Quit]
lastrodamo has joined #openscad
kintel_ has joined #openscad
L29Ah has quit [Read error: Connection timed out]
kintel_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kintel has joined #openscad
<kintel> If I build with asan enabled, it triggers an undefined memory read also for non-crashing models
guerd871 has quit [Read error: Connection reset by peer]
<pca006132> ahh
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pca006132> anyway, I think I got some idea about why the vertex info can be some non-sense
<pca006132> it seems that CGAL constrained Delaunay triangulator inserts some vertex to represent special constraints when your edges overlap or something
<pca006132> and that vertex is contained in the output triangles
kintel has joined #openscad
<pca006132> and its info() is uninitialized... so it is garbage
<kintel> Yeah, even for non-crashing variants of the UB model, I can see odd triangulations
<kintel> ..and it eventually crashes after a handful of re-renders
L29Ah has joined #openscad
<kintel> I wonder if this is also related to https://github.com/openscad/openscad/pull/5202
<kintel> Gotta re-read the CGAL docs (again)
<kintel> Anyway, we have a Manifold implementation for this too, not sure if it's ready for prime time yet
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pca006132> there are quite a lot of changes in manifold recently, and we are about to move to double precision
<pca006132> I think one way to fix the issue would be to change the Info struct into something with default constructor? so vertices not added by us will get a -1 index for example, and we can just ignore faces with those vertices for now (until we figure out why they are there...)
kintel has joined #openscad
<kintel> pca006132 yeah, at least move it from an uninitialized memory read into something that fails more consistently :)
<kintel> Anyway, I'll try to look into it this week
<pca006132> ok it seems to work on my machine again now, no matter how many F5 I did
<pca006132> J24k10: your turn to break it now
<kintel> btw: cmake -DSANITIZE_ADDRESS=1
<gbruno> [github] pca006132 pushed 1 modifications (attempt 2) https://github.com/openscad/openscad/commit/7cc964dc8a4b70dd56609f60180cfdfd39b37b37
<gbruno> [github] pca006132 synchronize pull request #5260 (attempt to fix #5253) https://github.com/openscad/openscad/pull/5260
<pca006132> I tried, for some weird reason it directly segfaults on my machine with this flag
<pca006132> and if I do CMAKE_CXX_FLAGS manually, it doesn't work for some other reasons
<pca006132> I can run asan for manifold but somehow cannot run it with openscad... perhaps because my weird linux distro
<kintel> ouch, perhaps not the right time to debug that issue : /
<pca006132> it is really weird because typically asan failure is due to wrong linker path
<pca006132> or link order related issues
<pca006132> but it typically prints something to the console to tell you that, not directly segfault
<InPhase> pca006132: You did a thorough clean?
<pca006132> no, I thought it typically works fine
<InPhase> You can't trust it on setting changes like that.
<pca006132> I just tried gdb, and it seems that mimalloc is giving some issue
<InPhase> Things can link up wildly.
<pca006132> I see
<pca006132> waiting for build
<pca006132> ah, disabling mimalloc works
<gbruno> [github] pca006132 pushed 1 modifications (typo) https://github.com/openscad/openscad/commit/252b767c33b56f6e4b87009d4cd6a3e8bcac58bb
<gbruno> [github] pca006132 synchronize pull request #5260 (attempt to fix #5253) https://github.com/openscad/openscad/pull/5260
axelrod has quit [Quit: Leaving]
califax has quit [Ping timeout: 260 seconds]
califax has joined #openscad
<pca006132> and we probably want a simpler testcase to add to the test suite
Alexer has joined #openscad
<kintel> pca006132 Yes, definitely. I slimmed down the UB test case quite a bit
<J24k10> pca006132  better but crashed after 3× F5  ( running 3 different tests at the same time)
<kintel> paste?
<othx> paste is https://bpa.st for .scad files and other text like long error reports, https://pasteboard.co/ or https://imgur.com/ for images
<pca006132> J24k10: are you using the latest one? I got a typo in the "attempt 2" commit
<kintel> pca006132 178 lines: https://bpa.st/NFBQ
<kintel> Can probably be slimmed down more
<J24k10> says git 7cc964dc8
<pca006132> you need 252b767c3
drfff has joined #openscad
<pca006132> 7cc964dc8 had a really stupid typo... I forgot to check for the last vertex
<J24k10> ok still building ci
<pca006132> circleci is much faster
<J24k10> kintel this looks different to mine (not that it matter just wondered )
<J24k10> pca006132 yes this looks promising  -  still there
<kintel> I converted the UB test case to csg and slimmed it down aggressively
<J24k10> I tried to test with simple geometry but that didn't caused the crash -  also not every voronoi pattern caused it ( or every $fs/ $fn ) - seems i hit the UB sweet spot
<pca006132> hmm, the triangulation is still weird though
<pca006132> with kintel's repro
<gbruno> [github] pca006132 pushed 1 modifications (id fixup) https://github.com/openscad/openscad/commit/381d63e043810342f8c9d41ebbf82fd8c7dd5fa4
<gbruno> [github] pca006132 synchronize pull request #5260 (attempt to fix #5253) https://github.com/openscad/openscad/pull/5260
J24k10 has quit [Quit: Client closed]
<pca006132> updated, seems to fix the weird triangulation. those vertices coming from nowhere seems to be clones of the last vertex, so probably something related to line segments touching, similar to 3d 2-manifold issue?
J24k10 has joined #openscad
<pca006132> so I just copy the last id to the vertex coming from nowhere, and the triangulation looks fine now with no error
<pca006132> with that vertex ID patch, I don't think the -1 check is still needed
<J24k10> ThX for fixing! very appreciated.
kintel has quit [Ping timeout: 258 seconds]
califax has quit [Remote host closed the connection]
califax has joined #openscad
snaked has joined #openscad
ferdna has joined #openscad
JoelJoel has joined #openscad
Joel has quit [Ping timeout: 252 seconds]
JoelJoel is now known as Joel
teepee_ has joined #openscad
Joel has quit [Max SendQ exceeded]
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
Joel has joined #openscad
fancsali has joined #openscad
Virindi has quit [Read error: Connection reset by peer]
Virindi has joined #openscad
stealth_ has joined #openscad
lastrodamo has quit [Quit: Leaving]
misterfish has quit [Ping timeout: 248 seconds]
J24k10 has quit [Quit: Client closed]
J24k10 has joined #openscad
fancsali has quit [Quit: Client closed]
TheCoffeMaker has quit [Ping timeout: 252 seconds]
ferdna has quit [Quit: Leaving]
TheCoffeMaker has joined #openscad
TheCoffeMaker has quit [Read error: Connection reset by peer]
TheCoffeMaker has joined #openscad
J24k10 has quit [Quit: Client closed]
J24k10 has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee