TheCoffeMaker has quit [Quit: So long and thanks for all the fish]
TheCoffeMaker has joined #openscad
LordOfBikes has joined #openscad
tcurdt has joined #openscad
<linext>
hey teepee, i turned you into an admin for 3dcustomizers.net in case you want to fix other users' designs
<linext>
it'll kick in after a few days when i update the code
<teepee>
oh, scary :)
<InPhase>
Opening a betting pool for the first date on which teepee breaks everything. ;)
J226297 has joined #openscad
tcurdt has quit [Quit: bye]
<ali1234>
day 8 and day 15 show the image from the day before when you open the "big" view
<ali1234>
oh, this is because the gif takes ages to load :)
J2262 has quit [Ping timeout: 260 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
Junxter has joined #openscad
tcurdt has joined #openscad
<InPhase>
ali1234: Someone needs fiber. :)
<InPhase>
teepee: Nice. I just noticed your Fortress of Solitude for day 16.
<InPhase>
teepee: Also, nice flame animation.
x__ has quit [Ping timeout: 255 seconds]
Guest57 has joined #openscad
Guest57 has quit [Client Quit]
_xxoxx has joined #openscad
Junxter has quit [Ping timeout: 260 seconds]
x__ has joined #openscad
<gbruno>
[github] jordanbrown0 opened issue #4450 (s = join([s1, s2, ...], sep) - concatenate an array of strings, optionally with a separator) https://github.com/openscad/openscad/issues/4450
<JordanBrown[m]>
teepee InPhase: I just pushed a draft of Life to SCADvent. I need to pick the exact settings for the video and create it, but some code/prose review would be nice.
califax has quit [Remote host closed the connection]
califax has joined #openscad
Lagopus` has quit [Changing host]
Lagopus` has joined #openscad
tcurdt has quit [Quit: bye]
<JordanBrown[m]>
Hey, teepee, you guys awake yet?
x__ has quit [Ping timeout: 260 seconds]
x__ has joined #openscad
<J226297>
time is right ..
<J226297>
(noonish)
<JordanBrown[m]>
J226297: That's UB, right?
<J226297>
Yes Ü
J226297 is now known as J22
<JordanBrown[m]>
Why does your username change all the time? Means I can't set up a sticky PM session.
<J22>
It is that funny Webclient that adds numbers almost every reconnect
tcurdt has joined #openscad
_xxoxx has quit [Read error: Connection reset by peer]
<JordanBrown[m]>
Did you get the PM I sent?
<JordanBrown[m]>
J22^
<J22>
no
<JordanBrown[m]>
fudge
<J22>
hmm "You must log into your NickServ account to message this user" when try to msg you
<JordanBrown[m]>
Whether or not you build it, you might be interested in looking at that program. It uses a couple of potentially cool experimental features.
<JordanBrown[m]>
{ a: 1, b: 2 } is a JavaScript-style object literal.
<JordanBrown[m]>
{{ ... }} is what I call a geometry literal... puts some OpenSCAD geometry into a value that you can then put in a variable, return from a function, put in an array, et cetera.
<JordanBrown[m]>
Thus, for instance, boxcar.length is the length of a boxcar, and boxcar.model is the boxcar model.
<JordanBrown[m]>
and caboose(color) returns a similar object for a caboose of the specified color.
<JordanBrown[m]>
The implementation has some kind of interesting uses of objects and geometry literals.
<teepee>
also currently running your life script trying to see how webp will cope with the data
<JordanBrown[m]>
I don't know webp.
<JordanBrown[m]>
As an example, here's the definition of the track:
<JordanBrown[m]>
track = [
<JordanBrown[m]>
straight(30),
<JordanBrown[m]>
straight(120),
<JordanBrown[m]>
curve(30,90),
<JordanBrown[m]>
...
<teepee>
I just used the cmdline InPhase posted, not sure what I used last year, but something similar
<teepee>
ah, yes, turtle style track
<JordanBrown[m]>
straight() and curve() are functions that return objects that describe the track segment, giving a model for the track, translate/rotate to the endpoint, and length along the segment.
<teepee>
doing something like that without recursion is certainly going to help lots of people who don't want to deal with recursion
<JordanBrown[m]>
Well, there's recursion to lay the track, and more recursion to create the train. (And in fact laying the train requires both recursing through the train and recursing through the track.)
<JordanBrown[m]>
It might be possible to do something with C-style for in a list comprehension to avoid the recursion, but both of them need to add up entries in the array to get cumulative sums.
<JordanBrown[m]>
I don't immediately see how you could do something like this conveniently without either geometry values or module references.
<JordanBrown[m]>
You could do without objects, by using lists with well-known indexes to simulate them.
<JordanBrown[m]>
but to make the definition of the train be simple like that, you need a way to package up both the model for the car and the dimensions of the car.
<JordanBrown[m]>
Extra credit if you find the geometry error that makes it significantly simpler.
<JordanBrown[m]>
The .gif that I sent earlier was ~470K.
<JordanBrown[m]>
(The Life one, that is. The train one is 6M.)
milza has quit [Quit: milza]
<teepee>
300k
<teepee>
pushed to the webserver so you can see it in real life :)
pie_ has joined #openscad
<teepee>
and I'd say it looks very cool even in the tiny door
<JordanBrown[m]>
Wow, sure does.
<JordanBrown[m]>
Though I would have the blinker and glider run a lot slower.
<teepee>
should be relatively easy to do duplicating the images in the conversion list
<JordanBrown[m]>
My idea was to have the first couple of figures run slowly enough that you could sort of see what was happening, and then speed up for the R pentomino and glider gun where you more want to see how the overall shape evolves.
<JordanBrown[m]>
When I built my video with ImageMagick, I had it run each of them at a different frame rate.
<teepee>
let me try to emulate that
<JordanBrown[m]>
The webp version of the train video is 3.5M (vs 6M for .gif).
<JordanBrown[m]>
You can look at mkvids.sh for the speeds I was using, though there's nothing magic about them.
<JordanBrown[m]>
I need to make the train understand how to go around the loop.
<JordanBrown[m]>
And I'd like to figure out how to have switches, but then there'd be the question of how to control them. (Customizer!)
<JordanBrown[m]>
But because of the nature of OpenSCAD animation, where it has to start from zero each time, if you were running an animation and then threw a switch, the train would jump to the point where it would have been if that switch had *always* been thrown that way.
<teepee>
as we have data structures now, we maybe can have a = animation_status() returning more stuff like also a monotone increasing value
<teepee>
basically what shadertoy has :)
<teepee>
not sure about some sort of state though
<teepee>
the script does "set delay 1x10"? what does that mean? not seeing this in the documentation
<JordanBrown[m]>
10 FPS.
califax has quit [Remote host closed the connection]
califax has joined #openscad
<teepee>
so with -d 100 I should get 10FPS with img2webp too
<JordanBrown[m]>
Yeah, no joke. Sigh. I expected better.
<teepee>
that really is bullshit to the extreme
<teepee>
so I guess I'll take it out of the bio if the account is still open
<JordanBrown[m]>
I mean, it makes sense sort of from a competitive standpoint… unless you stop being the major player, in which case it hurts you.
<teepee>
with the introduction "Twitter is where the public conversation is happening" that's really just billionaire ego
<Scopeuk>
got to love the exception for "except advertising/spam/scams" they pay us and get a free pass thats in there
<teepee>
I really wonder if he got andrew lee as PR / strategy lead now
jwash has joined #openscad
linext has quit [Quit: Leaving]
<jwash>
Hi everyone, I'm making a box for an arcade joystick. See how there are groups of buttons for the button layout, start buttons, and joystick mount. How do I make the joystick mount group, button group, and start button group act as groups so that i can move them at the same time with one translate command? https://hastebin.com/olagozinex.yaml
<jwash>
my goal is to make each hole relate to eachother, then to allow the whole group of holes to be translated around the object
<teepee>
jwash: the minimal version is just union()
<teepee>
but in this case a slightly more complex way could be useful, specifically doing the positioning and the actual object sparately
<jwash>
so i see the pilar module, how does the children() in the pilar_pos module interact here
<jwash>
that's what i'm not understanding
<jwash>
how does pilar_pos know to work on the pilar module
<teepee>
it's a slightly strange way of passing a value into the module
<ali1234>
i like to use this method too
<teepee>
it's like translate(..) cube()
<teepee>
cube() is passed as parameter to translate()
<jwash>
how is the pilar module linked to pilar_pos
<teepee>
if you write pilar_pos() pilar();
<teepee>
basically everywhere where pilar_pos() says "children()" it will replace with the pilar() parameter
<jwash>
is that because it removes the "_pos" from pilar_pos?
<jwash>
when I use children()
<ali1234>
no
<teepee>
no, it's really just the children() doing it
<teepee>
maybe have a look at the example shipped with openscad, it might be a bit simpler as there's not so much other code
<ali1234>
you know how for example difference works?
<jwash>
ok
<ali1234>
i mean, syntactically
linext has joined #openscad
<teepee>
Examples->Advanced->children
<ali1234>
you say difference() { <then a list of things> }
<jwash>
yes
<ali1234>
those things are "children" of the difference() operation
<jwash>
ahh
<ali1234>
when you write your own module like pilar_pos() you can give it children, and then do whatever you want with those children
<ali1234>
so there is no link between pilar_pos() and pilar() other than one being a child due to the way the code is written. they could be named anything and it would work the same
<ali1234>
so you could give it pilar() to make the pilars, or you could instead give it pilar_cutout() and then difference with the result to make holes
<ali1234>
but whatever you give it, those things always end up in the same place
<ali1234>
so if you have 6 identical buttons (and 6 identical holes) it is a real time save
<JordanBrown[m]>
the module takes its first child, colors it red, its second child, colors it white and moves it over a bit, then takes its third child and colors it blue and moves it over a bit more.
<ali1234>
^ this example is a bit more advanced. for something like a button panel with repeated identical elements you don't need to treat the children separately like this
<ali1234>
i don't think i have ever done it and i've made a whole handheld game console case
x__ has joined #openscad
<JordanBrown[m]>
there are innumerable uses for children... i was trying to demo how the feature works in a simple way.
<teepee>
yep, good goal to get those things in for 2023 :)
<teepee>
ok, Life updated
<JordanBrown[m]>
cool, thanks
<JordanBrown[m]>
teepee did you get my typo note desaster -> disaster?
<teepee>
yep, gbruno ^
<JordanBrown[m]>
ah, indeed. automatically ignored it :-)
<JordanBrown[m]>
module stop() {}
<JordanBrown[m]>
makes the customizer stop looking at variables
<JordanBrown[m]>
but module stop();
<JordanBrown[m]>
does not.
<JordanBrown[m]>
now the train needs climbs and descents so that it can have bridges...
<JordanBrown[m]>
and multiple trains running at once.
<teepee>
full simulation mode :)
<JordanBrown[m]>
but mostly it needs better car models and a Christmas tree.
<JordanBrown[m]>
I'm not sure whether to leave the cars kind of cartoon-y, or go for more complete modeling.
<teepee>
cartoon style might also mean easier printable?
<JordanBrown[m]>
I wasn't really thinking in terms of printability, but yeah, find detail is hard.
<JordanBrown[m]>
s/find/fine/
<teepee>
I always thought it would be awesome to have a clalendar with lots of printed parts that give some final object like a toy train with tracks or so
<JordanBrown[m]>
Yes, though I am not sure that this is that. That needs real-world mechanical stuff like jigsaw connections between the pieces and between the cars. This doesn't; those things would only make things harder and wouldn't work well anyway.
<JordanBrown[m]>
But maybe the same basic cars could have "printable mode" and "runnable mode".
<JordanBrown[m]>
And this animated train could maybe consume those printable car designs...
<JordanBrown[m]>
Also right now my train is either scaled in 1m/unit or in 1:1000 scale, depending on how you want to look at it. Neither is particularly good for printing.
<JordanBrown[m]>
OTOH, for printable stuff it would be cool if the model was more or less scale-insensitive, so that you could print a car at Z, N, HO, O, G, or full scale.
<JordanBrown[m]>
Time for me to go. Later. teepee, thanks for the work on Life.
<jwash>
have you guys printed a Game Boy Advance case? I was looking at the Slab on thingiverse but it requires a custom pcb for the buttons. what handheld stuff have you made?
<teepee>
nothing handheld as such so far
<jwash>
you said you did some video game stuff right? what did you print?
<teepee>
video game stuff?
<jwash>
i'm wrong
<jwash>
i'm making an arcade stick enclosure today, i thought you did something similar before
<teepee>
I do like retro games and old computers so there might be comments in that regard, but nothing printed as handheld
<teepee>
yes, enclosures :)
<jwash>
what have you made?
<jwash>
i've done a bunch of controller panels, this is the first time 3d printing one