<OlivierChafik[m]>
(i eventually wrote code that outputs the before / after remeshing patches as... openscad source code like this https://pastebin.com/ysX6XM6D )
<OlivierChafik[m]>
(allowing me to see what set of faces get globbed together in patches, and what they get rewritten to... reading lists of indices was driving me mad)
<teepee>
much more advanced with actual editor and able to set some of the experimental flags
<teepee>
but we have to find out why it's failing on pretty much any computation
<J22>
i have seen an resin printer that is using a nozzle instead of a bath .. hence it is much less mess
<myosotis>
oh shoot, that one renders some of my simple objects perfectly
<myosotis>
complete with the misalignment I made
<J22>
haha everytime i try a sphere bigger d=5 i get CGAL error exception
<J22>
(difference cube and sphere)
<teepee>
yeah, that really does not work, even trivial union fails
<J22>
strange that it works with 5 and smaller independent of the $fn i gave
<J22>
but still so much cooler (potential) then all the other i have seen
<teepee>
other?
<J22>
the cadhub or thigi customizer
<teepee>
yeah, I think there's a huge potential for lots of cases, local customizer, run scripts directly in the documentation, ...
<teepee>
I still want to have a normal app though :)
<J22>
or all the non scad stuff (while some have nice features)
<J22>
i want to be able to make my designs without internet and cloud ( ok i could run wasm locally )
<Scopeuk>
teepee also openscad on mobile device
<Scopeuk>
that page works perfectly on my android tablet
<J22>
wait you can make differences with big spheres there?
<teepee>
ah, yes. that too. with the license conditions there's never going to be an iOS version unless Apple decides to change their viewpoint (not happening before hell freezes over)
<Scopeuk>
I can't muster a sarcastic stare over IRC, it is able to render some stuff and it functionally works
<Scopeuk>
looking at some of the docs it looks like the random error is a pointer to a c++ std::exception object and with the right added function in the c++ the javascript can dump the content to the debug terminal for us
<Scopeuk>
I havent got arroudn to setting up a dev environment to try it
<Scopeuk>
there is a distinct possibility that it could help cadhub make a big jump forwards in usability
<Scopeuk>
and reduce their server load
<Scopeuk>
which has to help
<J22>
and it doesn't break due to comments with utf characters
<J22>
(like cadhub)
<Scopeuk>
not a use case I personally hit but I'm aware people make use of what utf offers beyond ascii
<myosotis>
I wonder what sort of UI layers people will end up slapping on top of this...
<teepee>
oh, ffs, "Ethentic is the platform for 3D printable NFTs"
<teepee>
this disease is still spreading :(
<teepee>
lol, putting code into the blockchain. because we all know, code is stable and needs no changing ever once released
<myosotis>
as a bonus, we have to keep all the crappy unused old code around for at least one eternity.
<Scopeuk>
teepee just like version control (before git) that errant version exists forever now
<Scopeuk>
NFT does appear to be a current buzz word for taking money of people who don't really understand what it actually is
<myosotis>
but version control was designed to efficiently do that. You can delete old branches, or even prune history if it makes sense to do so
arebil has quit [Quit: My keyboard has gone to sleep. ZZZzzz…]
<buZz>
Scopeuk: there's no name needed for that
<buZz>
Scopeuk: also buzzword is 1 word
Guest76 has joined #openscad
Guest76 has quit [Client Quit]
<Scopeuk>
apologies for the ping, I spotted I'd done it as soon as the message hit due to highlighting
<J22>
i put a notification on "J" which wasn't as clever as it turned out soon Ü
<buZz>
i have literal exempts to -prevent- highlights from normal words
<buZz>
but doesnt really work when ppl fail at spelling
<J22>
and if case sensitive it would also fail cuz ppl - Ü
<J22>
maybe a gradiential highlight depending on the % of matching
ToAruShiroiNeko has quit [Ping timeout: 272 seconds]
othx has joined #openscad
ToAruShiroiNeko has joined #openscad
<teepee>
so WASM debug builds are strange
califax has quit [Remote host closed the connection]
califax has joined #openscad
<Junxter>
is there a STEP format translator, or is there one in the plan?
<buZz>
pretty much impossible to do
<buZz>
unless you want to go -to- STEP ? in which case you could do so through freecad
<Junxter>
buZz: yeah I mean translate into STEP . I am aware of the FreeCAD route, not very convenient though
<buZz>
i think its the only one you have right now, assuming you want FOSS
<buZz>
nonFOSS there's more such routes, solidworks, autocad, etc
<Junxter>
yeah FOSS ... I have a bunch of postprocessor tooling for openscad. If there's nothing being planned in OpenSCAD, I might look into looking into FreeCAD
<teepee>
well, there's no such thing as planning
<teepee>
it's a big item on the wishlist and there was some hope to get some parts into the gsoc idea list
<Junxter>
teepee: okay ..
<Junxter>
maybe go into freecad source code, and "repackage" the scad->stp functionality into a command line tool.
<Junxter>
that maybe a start ... just thinking ...
<teepee>
indeed, that might be a useful reference for someone interested in creating a step export
<Junxter>
then openscad files could be broken down and individual modules exported into stp in an automated fashion
<teepee>
that already happens
<teepee>
which is why freecad is probably the only route that will retain part of the geometry
<Junxter>
oh? there's a command line interface for translating scad into step ?
<teepee>
hm?
<teepee>
I suppose you can run freecad on command line maybe
<Junxter>
i see what you mean.
<OlivierChafik[m]>
teepee: what's so strange about those builds? (besides the entire wasm concept haha)
<Junxter>
if not directly out of box, maybe via the freecad's python programming interface
<teepee>
I would have expected the openscad.wasm to be maybe just a bit bigger than the release version and the dwarf file openscad.debug.wasm the 300mb
<teepee>
oh, I also preloaded MCAD :)
<teepee>
not sure if that works
<OlivierChafik[m]>
what do you mean preloaded?
<teepee>
the files are in the default filesystem
<teepee>
so there's a /libaries/MCAD folder
<OlivierChafik[m]>
maybe the two files contain all the symbols as keys, and the dwarf file just contains extra metadata about those symbols?
<OlivierChafik[m]>
oooh wow what a great idea!
<OlivierChafik[m]>
(in a final version we could have options to include dotSCAD, NopSCADlib, etc, although can be easily done in the web app itself rather than at compile time)
<teepee>
supposedly it would be possible to load the dwarf file from local file system, currently I gave it SEPARATE_DWARF_URL=https://files.openscad.org/wasm/openscad.debug.wasm
<teepee>
yeah, there seems to be some way to load extra file systems, that might be a better option for more stuff. but MCAD is currently bundled in the other builds, so it might be useful
<OlivierChafik[m]>
the next feature I'd like is multiple file editor + support dropping a zip (say, coming from thingiverse) and have them expanded in the list of files
<teepee>
thingiverse does not support multi files :)
<OlivierChafik[m]>
(That's assuming we can handle even moderately complex single files wihtout exploding haha)
<teepee>
they only have a smal number of ancient libraries - which are probably still useful for some cases
<OlivierChafik[m]>
oh! but I've seen zips with stls and two versions of .scad files, that can be useful to play around (e.g. you import either of these, transform them, etc)
<teepee>
well, right now we can't handle spheres with radius >5 according to J22 :)
<J22>
diameter!
<OlivierChafik[m]>
oh wow even difference() { cube(); sphere(2); } breaks
<J22>
btw - do i need to check all fast-CSG boxes .. or just some - i use all except debug .. seemed to be fastest right?
<OlivierChafik[m]>
J22: the exact options will slow most models down *a tiny bit* and will help some rare pathological "lazy" cases get out of their performance abyss
<OlivierChafik[m]>
J22: the trust option just says to not proactively / paranoidly fallback to nef operations, "try corefinement anyway"
<J22>
myosotis .. nice . is it intention that the circle cut on top is not half ?
<OlivierChafik[m]>
yes, sometimes (and I need to report specific cases to sloriot@) corefinement breaks the inputs and there's no retrying successfully, so trust can be tricky, but it's definitely much faster when it works
<myosotis>
you talking about that misalignment? where the U cutout isn't exactly straight?
<myosotis>
no that's because I'm bad at math
<OlivierChafik[m]>
myosotis: cool model indeed, one of the lucky ones that work on web :-)
<OlivierChafik[m]>
I'm still not getting over having deep links into live models, which brings me to... should we register an openscad protocol handler on platforms that support it?
<J22>
myosotis Ü i feel you .. i would make the top as a full and then difference a hull of the circle and a square with circles diameter
<OlivierChafik[m]>
And have a "share" button in the app that copies the url to the clipboard, maybe inlining imports (or zipping them if they're scad) or exporting to csg to make it a self contained file?
<myosotis>
I've just tried 3 simple models in a row and they've all rendered.
<teepee>
OlivierChafik[m]: yes, but it should be a bit more general. the same logic could also work as "upload to cadhub" for example
<OlivierChafik[m]>
maybe use your luck to explore the entire space of possible models to make them all work for us haha
<myosotis>
I think it's more that I tend to create my simple models in the same way each time
<myosotis>
I discovered that it's MUCH faster to work with 2d shapes as hard as possible and reify them at the very end
<teepee>
OlivierChafik[m]: it's even possible to extend the possible url encoding via compression
<myosotis>
https://tinyurl.com/34fkr36b custom tripod mount for my wife's phone + a weird moon shaped bolt I had. It has a cylinder/cube difference and renders
<OlivierChafik[m]>
teepee: I like that! Brotli compression please :-)
<teepee>
crazy example using custom dictionary in that robot game converted to web by scanlime
<OlivierChafik[m]>
The primitives we use are expressed in triangles, or quads?
<teepee>
quads I think
<OlivierChafik[m]>
(I mean we still triangulate them after, and they must be absolutely shut anyway so red herring)
<OlivierChafik[m]>
teepee: ah year the left turn
Junxter has quit [Ping timeout: 256 seconds]
<OlivierChafik[m]>
We should collect these in some master bug haha
jonasbits has quit [Ping timeout: 252 seconds]
<OlivierChafik[m]>
(But also, the left turn assert sounds like it's happening in triangulation code, which would be an issue if the quads aren't planar? I know there's advanced coplanar logic to import polysets to nefs)
<myosotis>
sounds like it's about time for some automated testing
<teepee>
but why is it breaking so badly, doubles are not exactly perfect math either
<OlivierChafik[m]>
Maybe could try generating primitives with exact numbers directly in a Surface_mesh, or have them issue triangles to avoid non planar quads
<OlivierChafik[m]>
there's the rounding compiler flag you mentioned the other day
<OlivierChafik[m]>
can't wait to see CGAL's reaction when we start complaining their code doesn't work on the web
<teepee>
there was a version running on web ages ago, I assume that was still with asm.js
<teepee>
and that worked pretty well as far as I remember
<teepee>
hmm, "There is no way to tell Javascript how to round floating point ops, so currently non-simple CGAL kernels will likely produce assertion errors (hence the need to patch FPU.h)"
* teepee
goes looking if that still exists
<OlivierChafik[m]>
haha
<J22>
teepee what a nice game .. could be higher res Ü
<OlivierChafik[m]>
maybe it's time to drop the assert in release mode
<teepee>
J22: ugh, impossible, it's the *actual* dos game :)
<teepee>
heavily binary patched to make it compatible with an eventloop based web environment
<OlivierChafik[m]>
I just love love these days... old is new, new is old, so exciting!!
<J22>
throw antialiasing and NVIDA on it
<teepee>
maybe we just need to do that FPU.h patch
<OlivierChafik[m]>
WASM is (about to be) delivering so much better than the old Java "compile once, run anywhere" promise
<teepee>
... *in webbrowser*
<OlivierChafik[m]>
teepee: ooof, that is one unfriendly macro file, but the patch is small
<OlivierChafik[m]>
not sure wasm doubles are like JS numbers though
<teepee>
to catch up with desktop use, it has a couple of rounds around earth to do :)
<OlivierChafik[m]>
it sure does, but looks speedy enough to compete (I found it like 50% slower than my desktop so far)
<OlivierChafik[m]>
(and then if I manage to cache numbers - not solids - with my crazy singleton thing maybe it will be asymptotically as fast haha)
GNUmoon has quit [Ping timeout: 240 seconds]
<teepee>
ok, "building" a patched cgal...
<teepee>
release mode, but with -gsource-map, not sure what that will output :)
<OlivierChafik[m]>
teepee: note that the left turn assert is a triangulation assert which class that can selectively turned off with -DCGAL_TRIANGULATION_NO_ASSERTIONS
<OlivierChafik[m]>
🤞
<OlivierChafik[m]>
I can only upload wasm files <25mb (or <100mb through git push) to github pages
<teepee>
13mb
<teepee>
+400k map file
<OlivierChafik[m]>
gimme gimme
<teepee>
if that external download works, it should download that separate dwarf from files.openscad.org
<teepee>
but I'm not convinced that's even the correct files
<teepee>
it's very strange it's always splitting in half
Junxter has joined #openscad
<teepee>
files updated now
<OlivierChafik[m]>
what is the openscad.debug.wasm vs. openscad.wasm ?
<teepee>
the openscad.wasm is the normal output
<teepee>
the openscad.debug.wasm is the output from the -gseparate-dwarf
<teepee>
so in theory that should contain the debug stuff
<OlivierChafik[m]>
uploaded! it's better now as in it fails in different places
<OlivierChafik[m]>
> what the plan with the repos is, don't want to trample other peoples toes :)
<OlivierChafik[m]>
As far as my little toes are concerned happy to bring the little JS demo in the main repo, just not super proud of its insides as it is yet :-D
<OlivierChafik[m]>
I'll typescriptify it when I have the time
<myosotis>
It'd be nice to have **somewhere** for people that want to play around with it
<myosotis>
no sense in reinventing the wheel and all that...
<OlivierChafik[m]>
it's easy to run locally using the link at the top-right corner, just make a build folder and copy the wasm release to it, then run `make example` and open http://localhost:8080
<myosotis>
yeah I'm still waiting for it to finish building things, haven't gotten quite that far yet
<OlivierChafik[m]>
(Essentially just serve the wasm build release + the content of the example/www folder with any server, local or not, and you're good to go)
<OlivierChafik[m]>
(might need to clear your cache)
<OlivierChafik[m]>
I had to inline a modified version of the openscad.js generated file in the worker (replacing import.meta.url with the actual url it loads the module from, mostly)
<OlivierChafik[m]>
I'll need to script this but in the meantime firefox is going to make updates a pain in the butt
<Junxter>
this is really impressive
<OlivierChafik[m]>
or maybe there's a --please-firefox flag in emscripten?
<OlivierChafik[m]>
Junxter: just imagine when/if the actual OpenGL UI runs :-D
<Junxter>
yeah
<OlivierChafik[m]>
teepee: I tried to point the script to the binaries hosted on openscad.org using some service worker trickery but there's no bypassing the cors headers it seems (they'd need to allow serving from ochafik.com or anywhere, might not be a good thing to do)