<floatd>
Any way to fix those graphical glitches when using difference?
<floatd>
And ways to create technical drawings, I'm modelling for a wood work project
guso78k has joined #openscad
<guso78k>
these artefacts are called "z-fighting" you can get rid of them by differencing a tiny little bit more(2nd argument)
<floatd>
The black material is on the same level as the blue, so I can't remove the z-fighting all together
<guso78k>
its like in real life: an object can either be blue of black, but not both together. to resolve the artifact you might either cut the blue or the black object
mmu_man has joined #openscad
<guso78k>
I like the 2D shapes in 3D space even more! I could convert any Solid into a list of faces, select some of them and further process some of them with linear_extrude e.g.
<guso78k>
(or offset, or roof ...)
<floatd>
I used a polygon with 5 points and linear_extrude, seems to be the cleanest for this
<J25k5>
floatd use render() or F6 - but without overlap there is a risk to get thin left over due to floatpoint and no epsilon
<J25k5>
the overlap can be small like 0.01
<J25k5>
or smaller while z-fighting in preview is also dependent on viewing distance
<J25k5>
also keep in mind that while you can place too objects on the same coordinates on a computer - in real life there is always some gap between
guso78k has quit [Quit: Client closed]
guso78k has joined #openscad
<floatd>
Is F6 supposed to be mono color?
<guso78k>
J25k5, his 2 objects are coincident, not butting ;)
nanoflite has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<J25k5>
floatd the 2025 version allow color in render
<floatd>
Oh I got 2021
<J25k5>
it is a dev snapshot version, but it is so much better to use
<floatd>
Latest on nixos is 2024-11-10
<J25k5>
maybe the color in render was in there, but could be it was added later
<J25k5>
i think color in render was in but not for 3mf export
<floatd>
Testing the 2024 version
<floatd>
No colors in f6 out of box atleast
<J25k5>
sorry
<floatd>
Can't even find 2025 release on github
<floatd>
Well I dont really need it tbh, I'm modelling for some woodworking. I guess openscad is more meant for 3d printing
<J25k5>
openscad is a CAD design tool, people use it for AM a lot but also seen a lot woodworker
<feep>
I should add colors to mine, but the smooth_csg makes it awkward
nanoflite has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
J25k5 has quit [Quit: Client closed]
J25k5 has joined #openscad
nanoflite has joined #openscad
guso78k has joined #openscad
Guest90 has joined #openscad
snaked has quit [Quit: Leaving]
<Guest90>
Hallo,
Guest90 is now known as Arctos
<Arctos>
I am a very frequent user of OpenScad. Can anyone help me. I can not quit the app the ordinary way. I have to do "force quit".
<InPhase>
What specifically happens when you try to quit normally?
<InPhase>
And what platform?
<guso78k>
if you are running it in Linux, you can type to the terminal : pkill openscad
<Arctos>
I ute Mac. I get a rotting rainbow.
<Arctos>
Rotating rainbow
<InPhase>
Arctos: Are you doing this while it's rendering, or while it's just sitting there doing nothing?
<InPhase>
Arctos: Phrased another way, is the program interactive and responding before you attempt to quit?
<Arctos>
When I finish and want to end my work I just press quit OpenScad on the menu. macOS Monterey.
<Arctos>
Yes I works very well
<Arctos>
I will be back later.
Arctos has quit [Quit: Client closed]
<J25k5>
ctrl+q
L29Ah has quit [Read error: Connection timed out]
guso78k has quit [Quit: Client closed]
Arctos has joined #openscad
Arctos has quit [Client Quit]
<church_>
Damn. It starts again, non-manifold error hunting. Such a PITA when loads of changes were done throughout day. If only there were some means to show visually where that non-manifold openscad detects, like with polyhedrons with faces of different colors :/
<church_>
I really should make into habit to flush caches & rerender every reasonably not too long period of time, to at least reduce count of changes to dig through/revert
J25k5 has quit [Quit: Client closed]
J25k5 has joined #openscad
J25k5 has quit [Quit: Client closed]
J25k5 has joined #openscad
kintel has joined #openscad
guso78k has joined #openscad
<guso78k>
*if* manifold detect a Non-Manifold error, i think it would be easy to tell , at which loction it happened.
<kintel>
Arctos: We currently have some crash-on-exit issues on macOS, I'm chipping away at it, but you might have more luck going back to a month or so old snapshot as that might behave nicer
<kintel>
guso78k Yeah, that would be a nice manifold feature. pca006132 do you know if that's feasible/planned?
<guso78k>
kintel, i experienced the same here. often i also get some warnings: svga context mismatch. if you like i can eye on it
<guso78k>
*keep an eye on it*
<kintel>
guso78k I think specifically on exit we're mismanaging some Qt signals. For me, closing the last window works, but Ctrl-Q gives me problems
<kintel>
Also, Qt5 vs. Qt6 may play a role..
<guso78k>
ok, glad to know
<guso78k>
i am using qt5 on linux, so i believe its independent from qt version
<kintel>
On Linux specifically, building without GLEW often helps. Make sure you have OpenCSG>=1.6.0 or build using -DUSE_BUILTIN_OPENCSG=1
<guso78k>
thank you for the pro-tip. this might also resolve my negative-axis display issue
misterfish has quit [Ping timeout: 260 seconds]
<InPhase>
kintel: Ah, good, it is a known issue. At least that gives clarity. :)
<kintel>
I feel the issue has been around for while, but perhaps exposed by my VBO refactoring
<InPhase>
kintel: Is it a heisenbug disappearing for you in a debugger?
<InPhase>
Or you didn't get around to checking?
<guso78k>
this is my feeling, too. What are your indications, that the error is in the qt signals and not in the VBO ?
<InPhase>
kintel: Did mac move to Qt6 on the builds?
<InPhase>
Threading crap changed around there.
<guso78k>
haha uncertainity, you just need to expose the bug for long time in the debugger and you can easily locate it.
<InPhase>
I still have contempt for the unwise threading architecturally destructive threading changes they made with Qt6. But we're probably not abandoning Qt for a while in this project, so it'll be a thing to make sure we deal with.
<InPhase>
Pretend I put good grammar in that first sentence.
guso78k has quit [Ping timeout: 240 seconds]
nanoflite has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mmu_man has quit [Ping timeout: 245 seconds]
mmu_man has joined #openscad
L29Ah has joined #openscad
<kintel>
It crashes in a debugger too. The issue is that some destructor wants to use thread local storage which was already killed
<kintel>
Symptom seems to be that we're calling MainWindow::quit recursively
<kintel>
I've tried the usual chaos approach of moving signals around etc., but I'm currently pursuing a more structured approach where I reason about how we actually tear down the app, and we're not exactly doing it in a nice way
<kintel>
..e.g. ctrl-q does one thing, closing the last window does another thing, closing the last MainWindow does a third thing..
<kintel>
but it's the GL thread that crashes, which leads me to believe my work triggered it ..
<kintel>
I'm pretty sure it's a one-liner fix. Just need to find that one line ;)
<InPhase>
kintel: Like maybe: // FIXME: Cancel any CGAL calculations #ifdef Q_OS_MACOS CocoaUtils::endApplication(); #endif
<InPhase>
Given it only appears on MACOS. ;)
<InPhase>
Although that call doesn't do much, but I don't know what it's doing.
<kintel>
Not it : /
<kintel>
My approach has turned a bit dramatic; I've slimmed down MainWindow.cc to 146 lines of code and still crashing. Will dig more this evening
<InPhase>
kintel: "It's good practice to always connect signals to this slot using a QueuedConnection. If a signal connected (non-queued) to this slot is emitted before control enters the main event loop (such as before "int main" calls exec()), the slot has no effect and the application never exits. Using a queued connection ensures that the slot will not be invoked until after control enters the main event
<InPhase>
loop."
<InPhase>
kintel: On QApplication::quit
<InPhase>
kintel: Which is actually being called as: QApplication::instance()->quit()
<kintel>
I rewrote that connection to a QueuedConnection, but no dice
<InPhase>
Did you edit the direct call in MainWindow::quit()?
<kintel>
Yeah, I tried to send an event instead of calling quit(), still nothing
<kintel>
In the end I tried too many of those things and I needed to go back to basics and slim down the app enough that any magic is not there any more..
<kintel>
I even wrote an app from scratch, just to prove that a well-written app doesn't crash
<kintel>
..but I think I'm close
<InPhase>
Are there any extra threads running on mac?
<kintel>
who knows what Qt does under the hood : /
<InPhase>
I just checked another Qt app from work for a memory jog, and a key thing I handle in closeEvent is of course notifying all the threads that they need to stop running.
<InPhase>
Like if I have any ongoing processes. They are all set architecturally to check for this flag to stop running.
<kintel>
My understanding is that macOS is very similar to other UI approaches, just a single-threaded event loop doing all the work
<InPhase>
Well this would be a non-UI thread.
<kintel>
We start a CGAL thread, but I kicked that one out already
<kintel>
We do have some multiple inheritance of QObjects though, so I'm pursuing that as well
<InPhase>
kintel: Does your SparkleAutoUpdater have any threading going on?
lastrodamo has quit [Read error: Connection reset by peer]
zauberfisch has quit [Read error: Connection reset by peer]
zauberfisch has joined #openscad
<kintel>
I think that one is just launched _after_ everything else is shut down
<kintel>
Can't remember if I disabled it already; it's normally not used for snapshots
zauberfisch has quit [Read error: Connection reset by peer]
<kintel>
I wouldn't mind rewrite the UI to use another lib, but there isn't much out there. Main alternative would be Dear ImGui or some other web-based or pure GL-based approach. Platform integration would suffer greatly from that I fear..
zauberfisch has joined #openscad
<InPhase>
Yeah. I've been watching for this, and asking around. There are some innovations actually that people are working on, that I sometimes get links to, but none I'd call ready. There's unfortunately a lot of influence from webdev in gui library design right now, which I think is probably not helpful.
J25k5 has quit [Quit: Client closed]
J25k5 has joined #openscad
<InPhase>
I looked recently into Dioxus with RSX, Rinf, Flutter, and Slint. None are in a state or design I'd really recommend.
<InPhase>
But at least people do seem to be thinking about the problem.
<kintel>
I guess people tend to want a solution for web+mobile+desktop. It's gonna be hard
drfff has joined #openscad
guso78k has joined #openscad
<guso78k>
wow reducing to 146 lines is really desperate ;)
<kintel>
heh, yeah, but for late night coding, sometimes the least brain-intensive solution wins, even if it takes more time :)
misterfish has joined #openscad
<guso78k>
its incredible, but my most econimical debugging(much outcome , less thinking) is still populating the code with printfs and watch, which will show up
nanoflite has joined #openscad
kintel has quit [Ping timeout: 248 seconds]
drkow has joined #openscad
drfff has quit [Ping timeout: 260 seconds]
mmu_man has quit [Ping timeout: 252 seconds]
J25k5 has quit [Quit: Client closed]
J25k5 has joined #openscad
guso78k has quit [Quit: Client closed]
mmu_man has joined #openscad
nanoflite has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
floatd has joined #openscad
floatd has quit [Client Quit]
J25k5 has quit [Quit: Client closed]
J25k5 has joined #openscad
nanoflite has joined #openscad
<church_>
"*if* manifold detect a Non-Manifold error, i think it would be easy to tell , at which location it happened." - and what would be workflow of locating where it is? or this was mentioned in way "easy to extend functionality in manifold render"?
<church_>
so far quickest i could do, commenting out modules one by one, or pasting larger code portions in old saved version of file, until error gone, and then dig in narrowed down code section
guso78k has joined #openscad
<church_>
oh. i wrote reply even without checking if he is still in channel :)
<guso78k>
me ?? :')
kintel_ has joined #openscad
<church_>
aye, your join 20sec after i wrote, was slight smear in face about my inattentiveness :)
<guso78k>
church, anybody can always read the log without beeing online, but I dont mind at all. I like the community
<guso78k>
Creating a watch is not difficult in openscad, but in this example the correct side face of the central cylidner is chosen and linear_extruded to make the arrow:
<guso78k>
So now we can not online turn 2d shapes into 3d shapes but also visa verce
<kintel_>
In terms of non-manifold errors: I could imagine that with some manifold library changes, an error could give us which CSG op failed, and allow us to unwind the stack to show which OpenSCAD code caused the error in the editor
<kintel_>
OpenSCAD doesn't currently have visual error annotation. That would be a great next step
<church_>
as there already is nice useful feature of "right click model part to locate code", that would go really well with some visual cue where non manifold error is
<kintel_>
yeah, that's the existing feature we could utilize
<kintel_>
In most cases, non-manifold errors should be a result of importing bad files, or a user-generated polyhedron gone wrong
<church_>
nah, this time just some z-infighting, rotate extrude, difference, intersection and alikes combo, no external import. unpleasant was only dissatisfaction with self that i hadn't rerender-checked before relatively large changes batch, and that it took a bit more time to find out culprit then i'd wish
<kintel_>
I do think that pure CSG from primitives should, in theory, not trigger non-manifold errors. If they do, I would open a ticket
<kintel_>
then again, even without an error, the results you get are not necessarily pretty. But that's a different discussion..
guso78k has quit [Quit: Client closed]
<church_>
kintel: btw, would "stop on first error" disable manifold's auto repair of "non-manifold"? maybe it's worth to add UI option to disable auto-repair? otherwise for clean repeat i needed to flush caches each time, lengthening each rerender in non-manifold culprit search ..
kintel_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guso78k has joined #openscad
kintel has joined #openscad
<kintel>
church_ it's more nuanced; manifold doesn't auto-repair. OpenSCAD repairs before sending to manifold
nanoflite has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kintel>
Basically, we fix common errors first, then send to manifold. If manifold complains, we issue a warning, then try to repair before trying again.
<kintel>
Our goal is to move most of the repair to _before_ we call manifold the first time, to slowly make that warning be more like an error
<kintel>
the caveat is that the repair is lossy/destructive; you lose things like color information
<church_>
kintel: as in log first was "rendering polygon mesh using manifold...", only then followed with those "WARNING: PolySet -> Manifold conversion failed: NotManifold. Trying to repair and reconstruct mesh..", i somehow thought that it's manifold's doing
<kintel>
yeah, the log just tells you that OpenSCAD is going to use manifold for rendering. Rendering is more involved than calling manifold :)
<church_>
btw, what are "Genus:" in manifold's rendering log .. enclosed volumes or something else?
nanoflite has joined #openscad
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
misterfish has quit [Ping timeout: 248 seconds]
misterfish has joined #openscad
misterfish has quit [Ping timeout: 252 seconds]
nanoflite has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nanoflite has joined #openscad
guso78k has quit [Ping timeout: 240 seconds]
misterfish has joined #openscad
nanoflite has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guso78k has joined #openscad
kintel has joined #openscad
J25k5 has quit [Quit: Client closed]
J25k5 has joined #openscad
<kintel>
church_ I believe genus is basically the Euler characteristic of the number, but I don't really understand the details of how manifold calculates that
<kintel>
*Euler number of the geometry
misterfish has quit [Ping timeout: 244 seconds]
kintel has quit [Read error: Connection reset by peer]