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> What if you load the example, flush cache, render, flush cache, render?
x__ has quit [Remote host closed the connection]
x__ has joined #openscad
<zingos> InPhase: Hi, how are you? I wanted to ask for your opinion on something, I am calculating the resolution of an image in order to print it which should have the A4 proportions, so I am doing (width/25.4)*dpi and (height/25.4)*dpi, what I am wondering is how to round it so that if my printer prints at 300dpi then I don't give it more or less pixels.
<zingos> Should I go with floor, ceil or round to the int nearest?
snaked has quit [Read error: Connection reset by peer]
<zingos> InPhase: Sorry if this is slightly off-topic, I am just sure you know
<InPhase> Well if width and height are the maximum printable area, then you'd floor.
<zingos> Yeah thought of that too
<InPhase> Under the premise that you can't print out of the maximum printable area. :)
<zingos> True, wouldn't want to print different sized pixels than min size supported either
<InPhase> Don't forget to include margins.
<zingos> Yep, many thanks
<InPhase> If you accidentally go under by one pixel, your margin will be larger on one side by the width of a small to medium sized human hair.
<InPhase> It's unlikely to be a huge issue. :)
<zingos> Haha yeah
linext has quit [Quit: Leaving]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
<L29Ah> do i get it right this fantastic coupler.scad is lost forever? https://www.thingiverse.com/thing:1329750/files
<othx> L29Ah linked to "Parametric Z-axis coupler (stepper and threaded rod coupling) by aspesilorenzo" on thingiverse => 1 IRC mentions
<teepee> lost? how?
<L29Ah> if it's not lost, how do i get it?
<othx> teepee linked to "Z axis coupler [Remix, parametric, openscad] by darealmoo" on thingiverse => 1 IRC mentions
<L29Ah> btw is there any documentation of the roof() thing? can't find anything but the implementation itself, and the name says nothing
<L29Ah> teepee: i wanted the one with four holes :<
<L29Ah> even the commit messages on roof() say nothing about what is it
<teepee> maybe archive.org
<L29Ah> nope :<
<L29Ah> thank you
<teepee> that site sounds a bit fishy though, looks like it's one of those scrape the whole internet and present as own stuff
<teepee> that said, as long as they scrape the stuff with the appropriate licenses, that's also useful
LordOfBikes has quit [Ping timeout: 252 seconds]
ur5us_ has joined #openscad
LordOfBikes has joined #openscad
x__ has quit [Ping timeout: 260 seconds]
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
J2262 has joined #openscad
J22 has quit [Ping timeout: 260 seconds]
snaked has joined #openscad
ur5us_ has quit [Quit: Leaving]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
califax has quit [Ping timeout: 255 seconds]
califax has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee has joined #openscad
Junxter has joined #openscad
<J2262> L29Ah the thingiverse link to that coupler works for me -  but don't use these to connect stepper with spindles - you need a dampener
<J2262> hm ok only the stl seem to work not the scad - how strange
<L29Ah> spindles?
<L29Ah> i have a few of those aluminum springy couplers but they don't handle axial load, and i'd prefer to use my stepper's bearing for that
<L29Ah> so aim to print something rigid-ish
x__ has joined #openscad
<J2262> L29Ah sorry  "Leadscrew" ( it is https://de.wikipedia.org/wiki/Gewindespindel )
<J2262> leadscrews should never have any axial load
<J2262> the point of this "springy" couplers is peak torque dampening as the screw has a big mass and your stepper will loose steps when accelerating or stopping - at least for higher speeds (usefull for Z-hops)
<J2262> hold on axial loads are what leadscrews are for - radial loads should not ..  how did you use them so they don't handle axial loads?
<J2262> L29Ah you need the stepper shaft to contact the leadscrew within the coupler  so put a steel ball in to have only a center point of contact
aiyion has quit [Remote host closed the connection]
aiyion has joined #openscad
Guest57 has joined #openscad
Guest57 has quit [Client Quit]
castaway has joined #openscad
califax has quit [Ping timeout: 255 seconds]
califax has joined #openscad
aiyion has quit [Ping timeout: 255 seconds]
teepee has quit [Ping timeout: 255 seconds]
teepee has joined #openscad
aiyion has joined #openscad
x__ has quit [Ping timeout: 246 seconds]
teepee has quit [Ping timeout: 255 seconds]
teepee has joined #openscad
linext has joined #openscad
<linext> is there a way in the command-line interface to get a list of file dependencies?
<linext> for example, import() or include() or use or the font for text()
<linext> if i could get the files needed from a command line argument, files like fonts could be dynamically loaded
<teepee> hmm, fonts no, I think
<teepee> source code yes, via the make support
<teepee> but we have the source code, we can change it :)
<linext> something like what getting input parameters does, but for any files that need to be loaded
<teepee> like the parameter export that I've added originally for cadhub.xyz
<InPhase> teepee: What's the "via the make support"?
<InPhase> I see imports in "--debug all" via command line, but nothing on fonts.
<teepee> -d
<teepee> "generate dependency file for make"
<InPhase> Oh! Nevermind, debug all DOES have font information in it. I typoed and loaded the wrong file.
<InPhase> It doesn't give the filename of the font, but it says what fonts it is using.
<InPhase> Presumably in a pinch one could translate that into a filename with other tools.
<linext> that leads me to another question about font file names and their access name
<linext> is it always, Font-Regular.ttf for calling Font from text()
<InPhase> linext: I will note though that outputs of --debug all are not what I would call a defined API. So parsing that as part of infrastructure is sort of at your own risk. These are not things we would strive to keep constant under development.
<InPhase> Adding an output for font information would be more stable.
<teepee> no, there's no relation between name in the script and the font file name
<linext> ok, so to get the name, i can open the TTF in Windows and read the Font name:
<linext> for example, Gloria Hallelujah doesn't end with -Regular
<teepee> yes, that should work I think, in that direction
<teepee> in the other direction it's possible to map whatever the fontconfig file defines
<InPhase> linext: fc-match -v 'Liberation Sans:style=Regular' | grep file:
<InPhase> linext: That's the text I got from openscad's debug all FontCache lookup entry, and it mapped to a filename with fc-match.
<teepee> yep, that's the same lookup
<linext> i see
<linext> does -o file.ast -debug=all print the fonts to be used?
<linext> i'm using that to check if the code compiles, so if it shows the debug info about the font, that would work great
<InPhase> Seems not. At file.ast it doesn't do the FontCache lookup.
<InPhase> I found it when I output png.
teepee_ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
x__ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
<JordanBrown[m]> Cool!
<JordanBrown[m]> teepee WRT Life, I would think of something like https://imgur.com/a/J1KBsHz
teepee has joined #openscad
<teepee> JordanBrown: that looks great! and if you are concerned some people don't know what it is, we can add a note linking to wikipedia for example
<teepee> if that's good to go, we have 2 empty doors remaining, if InPhase gets the sad one ready, just 1
<JordanBrown[m]> Do you happen to know how big the door views are?
<JordanBrown[m]> I'm a little concerned that on the R pentomino and glider gun views the cells will be too small to see.
<teepee> it's not fixed, we mostly use 900x900 pixels
<JordanBrown[m]> I mean as presented on the screen.
<teepee> if people view it in a tiny window, that's not something we can control :)
<teepee> IIRC the popup is 90% of the browser window size
<teepee> width: 80%
<JordanBrown[m]> They appear to be 100x100 pixels, though I'm not clear on what's controlling that.
<JordanBrown[m]> Maybe the "grid" stuff is controlling it.
<teepee> oh, in the grid, yes, that's also relative to browser size mostly
<teepee> if it's too tiny there, that's not a big problem, I'd say. that's why we have the modal dialog with the big image now
<JordanBrown[m]> Doesn't seem to shrink when I change the window size, just truncates and horizontally scrolls.
<JordanBrown[m]> Yes, the big version is plenty big, but it would be bad if the grid version went black for several seconds in the high-res parts.
<teepee> ah, the grid has: width: 1000px;
<JordanBrown[m]> ISTM that I should either make the R pentomino cells a bit larger, or make it run for a few more generations, and the glider gun should run until the first glider hits the edge.
J2262 has quit [Quit: Client closed]
J2262 has joined #openscad
<JordanBrown[m]> So I want to tweak the video a little, and do some code review and cleanup.
<teepee> \o/
<othx> buZz linked to YouTube video "ChatGPT & 3D Printing: Self-Replicating AI Machines!" => 1 IRC mentions
TheCoffeMaker_ has quit [Quit: So long and thanks for all the fish]
x__ has quit [Ping timeout: 255 seconds]
x__ has joined #openscad
<teepee> linext: what happened to roof(), I thought that was enabled?
<linext> huh? it seemed to not do anything in the built-in examples
<linext> roof was turned off under CLI Args
<linext> i'm trying it with roof arg enabled
<linext> maybe you can write a test to verify that roof works when enabled under CLI Args
<linext> it seemed to just take forever to load for me
<linext> version Error: ECHO: [2022, 11, 24]
<J2262> buZz seems it uses syntax from the future when object literals are possible
<teepee> linext: yes, it works on command line
<teepee> openscad-nightly --enable roof cookie-cutter4.scad -o x.png
<linext> not sure it works with web assembly
<teepee> that's this 127 design
<linext> yes
<linext> so far when roof() is enabled in CLI on web assembly, it never finishes loading
<linext> i don't know if the function is missing or what
<linext> i can ask the guy who ported it
<teepee> voronoi works, straight skeleton seems to trigger an issue
aiyion has quit [Remote host closed the connection]
aiyion has joined #openscad
<teepee> with voronoi it renders in 13 seconds on the ochafik site
<linext> voroni works on 127 design
<teepee> straight skeleton may indeed need a fix for WASM
<teepee> it should be no problem enabling that, it will obviously only trigger code if roof() is actually used
<teepee> not like some of the other features that are general processing stuff like fast-csg
<linext> ok, i'll turn it on
<linext> added
<teepee> good thing if it's going crazy processing wise, it's not happening on your server :)
<linext> yea, i have kill scripts for that type of thing
<linext> psinfo to find the CPU time and pskill to close
<teepee> hmm, seems the ochafik version has some additional magic, it's rendering much faster there
<linext> hmm... both take 5.9 seconds for me
<linext> if you leave the developer tools F12 open, it's slower
<teepee> let me try on chrome
<teepee> ah, yes, 21 seconds (notebook speed is throttled a bit)
<linext> on firefox ochafik is 5.5 seconds, and 3dcustomizer.net is 11.3 seconds
J2262 has quit [Quit: Client closed]
J2262 has joined #openscad
<linext> it could possibly be that firefox isn't honoring the automated terminate requests
<linext> as the page loads, it will try to render. if new data loads and it changes the model, it will terminate and re-render
<linext> firefox task manager shows 400% CPU usage
<linext> ofachik is only 100%
<linext> so i'll have to fix that eventually
<J2262> i wish i could have 400% cpu load
<linext> the browser counts 1 core as fully used to be 100%
<linext> core or thread, i'm not sure
<J2262> until now scad only used one core
<linext> if you run several web assembly workers at the same time, it can exceed 100% cpu
<J2262> but that is probably using the other cores not for the same render
<linext> teepee, if you create thumbnail, your model will show on the homepage
<teepee> ah, ok, let me try :)
<linext> it will download an image as a file, so you can preview
<linext> i've been writing drag-and-drop file code this morning, for example: https://www.3dcustomizer.net/tests/drag-and-drop-file-upload.php
<linext> loads in console
Junxter has quit [Ping timeout: 268 seconds]
J2262 has quit [Quit: Client closed]
J2262 has joined #openscad
<teepee> yep, seems to work from both Nautilus and drag&drop from the image viewer
<teepee> at least the size matches :)
GNUmoon has quit [Ping timeout: 255 seconds]
GNUmoon has joined #openscad
milza has joined #openscad
milza has quit [Quit: milza]
ToAruShiroiNeko has quit [Ping timeout: 252 seconds]
ToAruShiroiNeko has joined #openscad
milza has joined #openscad
Lagopus` has quit [Read error: Connection reset by peer]
<linext> can i make an array of size i that are initialized all to the same value?
Lagopus` has joined #openscad
<teepee> a = [for ([0:9]) 42];
<teepee> but there's no state, to remember or a way to change that array
milza has quit [Quit: milza]
<linext> are there any work arounds that work like a 2d array that saves state?
<teepee> no, other than starting from 0 and using the $t animation variable
<linext> is it possible to read whether an object exists at a point?
<linext> x,y,z
ToAruShiroiNeko has quit [Ping timeout: 260 seconds]
ToAruShiroiNeko has joined #openscad
<linext> hmmm...
<linext> almost seems like i should use another program and use that to output into openscad maybe as a surface
<linext> i saw conway's game of life earlier and wondered if this 2d automata would work
<linext> i think i see a workaround
<linext> it's a warning to modify a variable, but not an error
<buZz> J2262: maybe that future was documented? :)
<J2262> must be before 2021 as later data is not included in the training sets
<buZz> :) well, its nice imho, cant wait to see more/better stuff
<buZz> maybe someday it'll be a default action in all QT editors, hehe
teepee has quit [Remote host closed the connection]