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
teepee_ has joined #openscad
TheAssassin has quit [Remote host closed the connection]
teepee_ has quit [Remote host closed the connection]
fling has quit [Remote host closed the connection]
TheAssassin has joined #openscad
fling has joined #openscad
teepee has quit [Ping timeout: 268 seconds]
teepee has joined #openscad
Guest27 has joined #openscad
<Guest27> dang, my electricity is back now
<Guest27> is the person who asked me how many grams here?
<Guest27> its just 1 gr
fling has quit [Remote host closed the connection]
<gbruno> [github] NigelThorne opened issue #4292 (New model for the gallery ? ) https://github.com/openscad/openscad/issues/4292
fling has joined #openscad
Guest27 is now known as laura
laura is now known as lauraaa
<lauraaa> so, again, does anyone wanna spend unnecessarily their filament on a small thing so i can see how it looks like in real life? its around 1 gr
<Friithian> I can set some prints going tomorrow, I can print on either ultimaker s5 or makerbot repliactor 5
<Friithian> (or repliactor sketch)
<lauraaa> okie
<lauraaa> i dont mind the printer, i know nothing about them
<lauraaa> i am just worried about resistance and size so any printer is fine
<Friithian> heck I control these printers I'll do some on each!
<Friithian> just send me the stl or whatever format, and remind me tomorrow I may forget (~12 hours)
<lauraaa> where can i send them :)
<Friithian> uuuh whatever way works,
<Friithian> I guess the file'd be small enough to email
<Friithian> oh it's help if I gave an address, 3d@friithian.dev will get to me
<lauraaa> okokok
<lauraaa> at what time would you like to be reminded?
<Friithian> 10:00 UTC-4
<Friithian> sometime around then would work, doesn't matter too much
<Friithian> lauraaa: got it!
<lauraaa> tysm again
<Friithian> gives me something mildly interesting to do while at work :P
<lauraaa> hahahah
<lauraaa> J1A84 hey can you help me out (again :( ) with sum?
LordOfBikes has quit [Ping timeout: 268 seconds]
califax has quit [Remote host closed the connection]
califax has joined #openscad
LordOfBikes has joined #openscad
toluene has quit [Ping timeout: 240 seconds]
J1A8472 has joined #openscad
J1A84 has quit [Ping timeout: 252 seconds]
toluene has joined #openscad
CNCFR06_ is now known as ViktorasCAM
J1A847265 has joined #openscad
<lauraaa> does anyone know what did i do wrong that now my braille is upside-down?
<lauraaa> nvm i think i fixed it without even noticing
J1A8472 has quit [Ping timeout: 252 seconds]
J1A84726538 has joined #openscad
J1A847265 has quit [Ping timeout: 252 seconds]
jonasbits has quit [Ping timeout: 244 seconds]
jonasbits has joined #openscad
trashbird has quit [Quit: Ping timeout (120 seconds)]
trashbird has joined #openscad
<joseph_> teepee InPhase: I just uploaded a new report here: https://github.com/jbinvnt/gsoc-2022-dev-log/blob/master/FirstMilestoneReport.md
<joseph_> Also I meant to thank you for the debugging advice last Wed. I'll keep it in mind for the rest of my development
J1A84726538 is now known as J1A84
<J1A84> lauraaa  i guess you fixed it?
<lauraaa> welcome back
<lauraaa> i have been working on this for over 12 hrs
<lauraaa> i dont know what am i doing at this point 😭😭😭
<J1A84> GMT+2 here
<J1A84> sleep is an underestimated important tool  for creativity
<J1A84> .. so what is the problem?
<lauraaa> right now? the special characters
<lauraaa> áéíóúü
<lauraaa> my native language is making my life harder
<J1A84> you can use the /u unicode
<lauraaa> that is what i was thinking about
<lauraaa> but then i remembered that i still need to figure out how to use the numbers
<lauraaa> since they use one more slot
<J1A84> you mean to add "#" in front?
<lauraaa> nono
<lauraaa> from 0 to 9
<J1A84> "#"
<J1A84> just use "#6"
<J1A84> or make an if for numbers to add this only for the first
<J1A84> ord("5") will let you identify the code for a string
<J1A84> there are some lib you can take the code for altering strings - as this is a bit advanced
<lauraaa> i dont wanna leave it like that
<lauraaa> its probably the only thing i have left to finish the 3d part
<lauraaa> i think ill sleep now
<lauraaa> i prob just need to rest
<J1A84> sleep is always a good idea Ü
<lauraaa> this is my discord in case im not around and you have a better idea to add the numbers laura#5939
<lauraaa> have a great day and thanks for the help
<lauraaa> very appreciated
<J1A84> n8
<J1A84> and was a pleasure
lauraaa has quit [Quit: Client closed]
toluene has quit [Ping timeout: 276 seconds]
toluene has joined #openscad
snaked has quit [Read error: Connection reset by peer]
snaked has joined #openscad
lastrodamo has joined #openscad
<J1A84> convexity wording:  The convexity parameter specifies the maximum number a ray enters an object.
<J1A84> does this made it more clear?
<pa> :wave:
<pa> what's wrong with my for loops here? http://paste.debian.net/hidden/3b3d8414/
<pa> i thought i can have those inside intersection()
<J1A84> maybe someone like to change the image on wiki for that https://pasteboard.co/CLNoOklyIVPJ.png
<Scopeuk> pa, that paste doesent include the move module
<pa> oh sorry
<pa> module move(x,y,z) { translate([x,y,z]) children(); }
<pa> actually i think i need the loops outside intersection()..
<J1A84> the loop will be one object that is intersected .. not for every part of the loop
<J1A84> you can use intersection_for()
<pa> J1A84: can i nest intersection_fors?
<J1A84> hmm not sure
<J1A84> it is a loop of intersections  .. so sure you can but might get confusing
<J1A84> maybe it also works with lazy union as then every loop element stays separated
<pa> i tried with intersection_for, still no luck https://godbolt.org/z/TTno7fbq5
<pa> maybe an issue in my code tho
<pa> yes i think that's the problem, sorry 🙈
<pa> hmm but now that i fixed it without fors, intersection_for still doesnt fly
<pa> ah but for does!
<Scopeuk> intersection_for (i = [-1, 1],j = [-1, 1]) will probably help you as a bit of syntax (a for can have more than one looping variable)
<Scopeuk> on the paste you sent over I stuck a # infront of the cylinder and its outside the working shape
<J1A84> better image for convexity https://pasteboard.co/teqmuBFxZC4d.png
<pa> Scopeuk: this now works http://paste.debian.net/hidden/746fb622/
<Scopeuk> so it does
<pa> yes 🙈
<Scopeuk> I wouldn't expect intersection_for to work for that use case, intersection_for is where the 4 defines multiple overlapping shapes where you only want the result of where they all overlap
<pa> ah i see
<pa> btw, how do i get a smoother smooth() ? i tried $fn but it doesn't seem to help
<Scopeuk> smooth isn't a language primitive I'm familiar with
<J1A84> pa you using module from a library that you don't share
<pa> ah sorry, offset, indeed
<pa> i need $fn there
<J1A84> you can use $fs
<J1A84> also fillet may cause the problem of low fragments
<J1A84> but just use  offset(1.5)offset(-1.5)square([w,h]);
ur5us has joined #openscad
J1A84 has quit [Quit: Client closed]
J1A84 has joined #openscad
snaked has quit [Read error: Connection reset by peer]
snaked has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 268 seconds]
teepee_ is now known as teepee
Junxter has joined #openscad
Junxter has quit [Read error: Connection reset by peer]
Junxter has joined #openscad
snaked has quit [Quit: Leaving]
J1A84 has quit [Quit: Client closed]
J1A84 has joined #openscad
J1A84 has quit [Quit: Client closed]
J1A84 has joined #openscad
N4buc0 has joined #openscad
TheAssassin is now known as TheAssass1n
TheAssass1n is now known as TheAssassin
N4buc0 has quit [Ping timeout: 276 seconds]
<Friithian> https://friithian.dev/pictures/other/brail.jpg they're not here right now, but this it the 3d printing result
<Friithian> printing on an ultimaker S5, 0.4mm AA core, tweaking printer setting may make the dots a bit better
<J1A84> looks readable Ü
<Friithian> the left one would need some clean up but it seems readable. Although I don't know how to feel brail so
lauraaa has joined #openscad
<lauraaa> good morning ^^ (afternoon or evening for some)
<J1A84> if you feel brail for some time .. it is amazing you really learn to tell how many dots there are very fast
<lauraaa> nice nice, tysm
<lauraaa> which one is the 2nd one? the thicker?
<Friithian> the cleaner looking one on the right is the thinner one
<lauraaa> woah
<Friithian> markerbot print was unable to slice the dots (software is shit so *shrug*) but ultimaker cura was able to and an ultimaker s5 produced those results. Printer tweaking would prob make the result cleaner, or just post process a bit
<lauraaa> how does the thinner feel like? do you think its gonna be easy to break?
<Friithian> it's mildly flexible (printed with ultimaker PLA), it'd take a bit of force to snap it. It should be fine, even more so if mounted
<lauraaa> J1A84 it just takes practice :)
<lauraaa> i was worried about the thinner one but now i see i underestimasted it
<Friithian> if it'll be in direct sunlight it is worth monitoring it for integrity
<J1A84> it will take the shape of the underground when over 50°C
<J1A84> but you could put glue/resin and aluminum foil onto and press with a toothbrush
<Scopeuk> J1A84 its usually best to solve problems when they are problems, if the humans in teh area are comfortable pla on its own will be fine
<Friithian> yeah I don't think a brail print will ever get hot enough to worry about
<Friithian> and if it does, tha tmost likely means something was on fire
<Scopeuk> it might if stored in a jar on a window sill or thrown in a car dash in texas or something but its pretty good in a human working envelope
<J1A84> if it gets soft - probably a good sign that you shouldn't touch the surface to read it ..  spells "HOT- DONT'T TOUCH"
<Friithian> it did always make me laugh when I saw brail next to an english ``Warning: HOT!''
<lauraaa> J1A84 what were you saying about unicode?
<Friithian> oh no, is there unicode brail? Do blind people have to deal with mutli-byte sequences??
<lauraaa> the reason why i am getting this � is because i make everything on python and then just convert it to .scad
<lauraaa> there is hahah
<J1A84> unicode makes sense for creating text but  for displaying it would be the encoding of the file itself
<lauraaa> but i was refering to special characters in spanish since my project is aimed for spanish braille
<J1A84> utf-8 encoding should have these symbols
<J1A84> regarding the extra sign for numbers - you need to use some recursive approach because  you only want this on the first number and everything after will move  - makes it harder to calculate the length of  a board
<lauraaa> indeed
<lauraaa> im going to fix the special char then im gonna burn my head with the numbers
<J1A84> so best would be a function that is going through the string and add the "#" signs .. so the new string can be processed normaly
<J1A84> or you make the module recursive and creating the board for just the actual letter so you don't care (know) how long the board will be
<J1A84> wonder how well python can create this as you don't need recursion there
<lauraaa> is there a way to add the encoding to the function write?
<J1A84> >>> "El Niño".encode("utf-8")
<J1A84> b'El Ni\xc3\xb1o'
<Friithian> oh god, that… that is ugly to me, dot operating on a string literal
<lauraaa> TypeError: can only concatenate str (not "bytes") to str
<lauraaa> oh, wait
<lauraaa> it should be decode
<Friithian> oh wait this is python that is normal uglyness
<lauraaa> i think i am doing something really wrong with this
<J1A84> why do you use phython for this?
<teepee> javascript is much better: Array(16).join("wat" - 1) + " Batman!"
<teepee> wat?
<teepee> othx: wat is the best short talk about software ever! | https://www.destroyallsoftware.com/talks/wat
<othx> teepee: Okay.
<Friithian> javascript is better? That's a take
<lauraaa> cuz i am continuing a project i had that translates from braille to spanish and viceversa
<lauraaa> and it has its own ui and stuff
<teepee> if you've never seen that talk before, give it a go, it's just 4:17 minutes of awesomeness
<lauraaa> i am just trying to add the 3d part now
<InPhase> lauraaa: Did you see J1A84's recent braille design? I thought it was a pretty nice one.
<lauraaa> ohh, yes i did
<Friithian> why did that webpage need a loading screen?
<lauraaa> pretty nice one ngl
<InPhase> I might have missed a bunch of conversation in the scrollback.
<lauraaa> no worries
<J1A84> teepee: WATMAN!
<teepee> it has a loading screen because we don't have web pages anymore, we have single page applications
<Friithian> oh, yeah. Fuck I hate the web.
<teepee> I'm not sure if that's a good or a bad thing... probably both ;-)
<lauraaa> teepee now that you are back, can you give me a hand with sum?
<lauraaa> spanish has special characters so when i write on the file with python i get a �
<lauraaa> i tried fixing it adding encoding='utf-8' to open the file and it just fixed the dots but not the translation
ur5us has quit [Ping timeout: 240 seconds]
<lauraaa> any idea what am i doing wrong?
<teepee> lauraaa: sum about what? a list of numbers?
<Scopeuk> lauraaa the � is when there is a letter the font can't display
<InPhase> lauraaa: This openscad program displayed the epsilon for summation for me just fine: text("∑");
<teepee> I still have to finish up some work stuff, so answers will be a bit slow :)
<lauraaa> nono, not sum
<lauraaa> sum = something
<lauraaa> that something is me trying to use Ñ
<teepee> haha, ok :)
<InPhase> Okay. :) Well this also worked. text("Ñ");
<InPhase> So OpenSCAD is parsing utf-8 encoded files just fine.
<InPhase> Is it that you're using a Python generator for this and having an error there?
<teepee> I suppose openscad *only* parses utf-8 fine, there's no way to define encodings
<InPhase> teepee: utf8everywhere.org for the win.
<teepee> on Linux we try to make sure the default font is Liberation Sans I think. I'm not 100% sure that works on all platforms
<Scopeuk> lauraaa how are you generating the special/accented characters in python? if they are getting into a text file correctly openscad should be able to chew on it
<lauraaa> let me share the code
<lauraaa> there
<InPhase> What do you have hiding in default.py?
<InPhase> Some sort of dots and spheres data it seems.
<lauraaa> oh hahahahah
<Friithian> oh I forgot how annoying it is to try and read python :|
<lauraaa> yes yes
<InPhase> Can you share that so we can test the run?
<lauraaa> sorry for that
<InPhase> Friithian: I find it pretty smooth reading, but my weak Spanish skills will slow this one a bit. Hence wanting to run it to help out. :)
<Friithian> I'm used to having proper braces denoting scope so
<lauraaa> the first part is default.py
<lauraaa> i just added them on the same file
<InPhase> lauraaa: Okay, now what's a minimal set of inputs on the command line to produce the error you're having?
<J1A84> probably some Ñ character
<lauraaa> yep
<lauraaa> the special characters for spanish
<lauraaa> ñ á é í ó ú ü
<InPhase> I did Ñ okay.
<InPhase> I have no errors on this.
<InPhase> At least I see braille output.
<lauraaa> huh
<lauraaa> there is no braille input for me
<InPhase> 2 dots on the left, 3 dots on the right, with a blank spot to the right of the braille.
<InPhase> Lowercase ñ also worked.
<J1A84> (dots position numbers go  1-6  first row is  1-4
<J1A84> 2-5 and 3-6
<InPhase> Although oddly the block behind the braille is a different size for ñ than for Ñ.
<ali1234> so i can 3d print teletext pages?
<InPhase> lauraaa: I got trad0("Ñ"); at the end.
<lauraaa> huhhh, how
<lauraaa> i dont get it
<teepee> ali1234: yes, without blink and hidden test though :P
<J1A84> miau.scad Ü   ..
<InPhase> lauraaa: Well I'm using Linux which plays better with utf-8, so I suspect some flaw in the Python is tripping up on your operating system's locale settings. Next is to figure out why.
<ali1234> lithophane it, put LEDs behind, light them up to reveal... this gives me an idea
<J1A84> i guess it is the phyton output .. that file is written with wrong encoding
<InPhase> lauraaa: Wait, are you using python2 or python3 here?
<lauraaa> 3.10
<InPhase> Okay.
<InPhase> Then input should return a proper string.
<lauraaa> what version of openscad are you using?
<InPhase> I tried multiple, but your issue is happening in the Python.
<ali1234> actually i wonder how well openscad will handle block glyphs. with ttf there is a problem getting them to exactly line up but i suppose i can just offset() the result
<teepee> ali1234: shaping is done by harfbuzz which is pretty good at even scripted languages, but I don't know how it handles that specifically
<ali1234> the problem is usually caused by antialiasing to be fair
<teepee> in the nightly you can interogate the glyph sizes so it might be possible even manually with some effort
<InPhase> lauraaa: I think I see the issue. You are reopening archive in your loop without the encoding.
<ali1234> all glyphs are monospace in teletext
<lauraaa> SIGH
<lauraaa> yes, that was the error
<lauraaa> thank you so much for that
<lauraaa> i was drowning in a glass of water
<InPhase> It was the sensible place to look after we eliminated all the other explanations. :)
<InPhase> So then I went hunting for open statements.
<lauraaa> i really appreciate the help
<InPhase> Yep. I'm happy to advise on any sort of accessibility projects. That's good public service you're working on. :)
<ali1234> does openscad support multiline string literals?
<lauraaa> thank you heheh, i really like this kind of projects
<J1A84> ali1234 you can use \n in echo but not txt strings
<ali1234> no line breaks for text()?
<J1A84> there is no variable for line distance
califax has quit [Remote host closed the connection]
califax has joined #openscad
<teepee> ali1234: no, that's another layer in the text processing stack that's not supported at this point
<teepee> right now we are at level of text shaping / harfbuzz
<teepee> layouting / glyph substitution would be something like pango on top
<teepee> this would need some investigation how to do that without it trying to directly rendering to a bitmap, as we need the geometry
<ali1234> what have i done wrong here?
<teepee> font that does not support the glyphs
<ali1234> well yes but that's just the editor
<teepee> ah, "script=" should be "font=" maybe?
<ali1234> no there's a syntax error at line 13
<ali1234> i don't know why, it is just a list of strings?
<teepee> which version is that, might be confused with the position
<teepee> trying to point at the trailing ","
<teepee> not sure that was always allowed
<ali1234> i removod that, no change
<ali1234> trying nightly
<teepee> oh, missing ; too
<teepee> after the ]
<ali1234> okay nightly accepts it after adding the ;
<ali1234> so does stable: https://imgur.com/QJ8an2G.png
<teepee> now you just need to automatically print the pages if they change :)
<ali1234> got some small artifacts vertically: https://imgur.com/VID0EMd.png (they move depending on zoom level) - but that's easy to work around since i am controlling the line spacing directly
<ali1234> horizontal seems fine
<J1A84> ali1234 there is no ; ending the page variable
teepee_ has joined #openscad
teepee has quit [Ping timeout: 268 seconds]
teepee_ is now known as teepee
<J1A84> you could use textmetrics to find the exact height
<ali1234> it's just a matter of setting size so that both it and the full height are integers. size=8 and line height of 11 works
<ali1234> i can't remember how many scanlines it is supposed to be
<J1A84> maybe render like a small overlap too
<ali1234> i wonder how i could deal with colour
lauraaa has quit [Quit: Client closed]
lauraaa has joined #openscad
<Friithian> lauraaa: btw if you want better pictures of the print I did I can do that when I get off work in ~4 hours
<InPhase> ali1234: There is a bug on some versions of OpenSCAD (not sure which version that is, and I'm not sure if it was fixed yet) that marks the syntax errors on the wrong line after a long sequence of utf-8 strings.
<InPhase> ali1234: Since that is mostly utf-8 your error ended up about halfway up the document from where it happened.
<ali1234> yeah. seems fixed in nightly but not stable
<InPhase> Good, at least we fixed it. :)
<InPhase> I remember that leading to some very confusing error reports in the past.
<lauraaa> Friithian tysm, there's no need but i would really appreciate
<Friithian> aight, I've wanted to do some macro shots of something anyways so this'll be fun
<lauraaa> i am really new to the 3d world
<lauraaa> is there a way to change the color of the print on cura?
<lauraaa> of the model*
<ali1234> change in what way?
<ali1234> you mean the preview? if so, select a different colour filament in the print settings
<lauraaa> its yellow by default
<lauraaa> can i use a different color?
<ali1234> you can use any colour
<lauraaa> on the visualization
<ali1234> it's defined by the filament parameters so like PLA, temperature etc
<ali1234> in the place where you set those, youc an also set the colour
<Friithian> on visualization click on Color Scheme: Line type
<Friithian> wait no that just turns stuff on and off please hold
<lauraaa> take your time
<ali1234> i dont think you can change the colours on the gcode visualization
<Friithian> change the material to Ultimaker -> PLA -> whatever color PLA
<ali1234> for the basic preview, preferences -> configure cura
<ali1234> then materials, and set the colour over on the right
<Friithian> so in the prepare menu click on the print core, change material
<lauraaa> ohhh
<lauraaa> ty guys
<lauraaa> i just noticed that it also depends on the printer
<J1A84> ali1234 you can select color scheme for the gcode visualization
<Scopeuk> 3d printers are fed filament in a specific colour and the print comes out the same colour (for 99% of how this is done)
<InPhase> lauraaa: For the OpenSCAD display you can pick between various themes to choose your default color, and you can specify color("blue") cube(5); and such to alter colors for preview-only. When render is done it goes to your default color, because we have no ability to process coloring at the present for 3D surface models.
<lauraaa> tysm
<lauraaa> i was just trying that
<lauraaa> i changed the dots to black
<lauraaa> i can even use rgb and hex
<lauraaa> woah, this is amazing
<lauraaa> this is brilliant
<lauraaa> i would like to try it for the next version
<InPhase> joseph_: I read the milestone report. The first thing you should do to resolve it, is convert more of your work time to interactive time, and make sure you are active here for discussions. That will help you work through some of the things that you are stuck on with more guidance and support. teepee and I can provide some good interactive guidance, but also others like peepsalot will have some
<InPhase> detailed technical insights into the area of code that you're struggling with. So just whatever hours of the days that you're working, make sure you're also on IRC and able to catch messages addressed to you, and then explains some more of the issues interactively.
<InPhase> joseph_: I so far don't know exactly what the sticking point is on getting it to activate an arbitrary shader, because that level of detail has been missing in the brief comments and write-up reports. But, with an interactive discussion I would keep asking questions until I knew what the issue was, and at least then I would know what I would do next. :)
<InPhase> joseph_: I also noted the part where you're out for the surgery tomorrow and the 1-2 days recovery (and that's completely understood), but upon returning you should aim for this.
<InPhase> I guess that tomorrow is today.
<lauraaa> is it possible to render the model?
<lauraaa> like, to save it as png
<lauraaa> idk what words should i use but i think you understand
<J1A84> yes
<J1A84> you can save an image of the preview
<J1A84> or of the render
Junxter has quit [Read error: Connection reset by peer]
<J1A84> not sure you could export an image from the render that way  ..
<InPhase> calendar?
<InPhase> lauraaa: ^ Some examples of images saved. :)
<lauraaa> nice ones!
<lauraaa> how does animate work?
<lauraaa> nvm, ill search up on my own
<J1A84> there is $t a variable that goes from 0:1 in "steps"   .. so go to window animate
<J1A84> you can activate png output so each step is saved and you end up with a bunch of numbered images ..  (there is no automatic mp4 apng gif webm converter)
<J1A84> imageMagick does the trick
<lauraaa> welp
<lauraaa> i just converted it to stl and open the file with paint 3d
<lauraaa> i can change the colors there
<lauraaa> i am just trying to get a good pic for the readme
teepee has quit [Remote host closed the connection]
califax has quit [Remote host closed the connection]
califax has joined #openscad
teepee has joined #openscad
<J1A84> if you use $fs=.2;   the spheres will look much better
EkpyroticFrood has quit [Quit: So long, and thanks for all the fish.]
EkpyroticFrood has joined #openscad
<J1A84> you can directly export png from the  openSCAD menue .. with the colors defined in the preview F5
<lauraaa> ohh, i found it, thanks
<J1A84> with the low resolution the small spheres will have also a different geometry and will not have the height as defined due to the fragment count
J1A84 has quit [Quit: Client closed]
J1A84 has joined #openscad
<J1A84> lauraaa you can also make a more filleted  sphere like this https://bpa.st/SVVQ
<lauraaa> let me see
<lauraaa> oh wow
<lauraaa> that looks fantastic
<lauraaa> how did you change the color bg?
<J1A84> oh iam using a different color scheme  (  edit ⇒ preferences
<J1A84> here https://bpa.st/RU4A  adjusted for 0.55 height
<lauraaa> what does this stand for?
<lauraaa> $fs=0.1;
<lauraaa> $fa=1.0;
<lauraaa> add more faces?
<J1A84> yes  it is a different way  while $fn give a fixed number .. the $fs give the max size of a fraqment and $fa is limiting the min angle
<J1A84> by default these values are far to big for small spheres
<J1A84> this makes sense if you have different size objects so  small get enough detail and big will get more but not too much
<lauraaa> i am guessing that it also affects the size of the file and the time to print it
<lauraaa> since its more detailed
<J1A84> print time is not really affected by this  - the file size yes (which is why 3mf is to use)  and rendering time will be higher too
<J1A84> if printing .2 layer  you will only have 2 or 3 layer per dot .. so this will not matter so much  .. the sphere should have at least 8 fragments (not 5)
<J1A84> but you can print this vertical  with the fillet  as no steep overhang is there .. that way you get more detailed dots
<J1A84> $fs=0.5 ; is probably fine for most printer
ur5us has joined #openscad
ur5us has quit [Ping timeout: 264 seconds]
snaked has joined #openscad
snaked has quit [Ping timeout: 240 seconds]
<lauraaa> is there a way to use " as string?
<teepee> echo("A\"B\u0022C");
<teepee> either quote with \ or use the unicode escape \u0022
<teepee> hmm, do we have \x22?
<Scopeuk> https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General strings section covers escape sequences
<teepee> aha, yes echo("A\"B\u0022C\U000022D\x22E");
<teepee> I think that's all inline combinations :)
<lauraaa> tytyty
<teepee> plus chr(34) to get a single "
<teepee> echo(str("A\"B\u0022C\U000022D\x22E", chr(34), "F"));
<teepee> I guess we should add all to that wiki page
<lauraaa> welp
<lauraaa> but i think i have a problem with that
<lauraaa> when i use it in a function  (e.g: like this "hola") it cuts off everything
<Scopeuk> hmm you might have to escape it in python too
<lauraaa> i did it
<lauraaa> but i might have an idea
<lauraaa> nvm
<teepee> ok, wiki is updated
<lauraaa> i escaped it on python, the dots are okay but how do i tell the program to change from " to \"
<Scopeuk> so if you wanted just " you would write text("\""); in openscad
<lauraaa> i dont understand
<teepee> it might be safer to do "text".replace('"', '\\x22') in python
<teepee> hmm, well, the \ still makes it a bit annoying. creating nested quotings is always tricky
<ali1234> maybe repr(string) or something
<ali1234> although in this case that won't escape " because python's rules are a bit different
snaked has joined #openscad
To_Aru_Shiroi_Ne has quit [Ping timeout: 264 seconds]
<ali1234> thinking about how to write a teletext parser in openscad so i can have colours in the result
ToAruShiroiNeko has joined #openscad
<ali1234> the whole thing is very stateful so the functional nature of openscad will probably make it extremely difficult
<J1A84> you could use an array of color for each character
<ali1234> yeah but how do i create it?
<J1A84> use the image and analyse the regions .. with monospace font this should be possible
<ali1234> what image?
<J1A84> image of the teletext page
<J1A84> or if you have access to the data - color information must be in there
<ali1234> the colour information is stateful
<ali1234> like, imagine you have an array that contains ['red', 'cube', 'cube', 'green', 'cube']
<ali1234> and you want to turn that into two red cubes and then a green cube
<ali1234> how do you do that in openscad?
<ali1234> in an imperative language i'd just loop on the array and have a variable that always contains the last colour that was seen
<ali1234> that isn't possible in a functional language
<J1A84> you go through the array and listen for "color" and then repeat the latest color for each following object
<J1A84> recursive function let you transmit the color as "lastColor" variable into the next recursion
<ali1234> hmm, of course
<ali1234> recursion :)
<ali1234> so something like function foo(inst, colour="white") = inst[0] == "cube" ? [(inst[0], colour)] + foo(inst[1:], colour) : foo(inst[1:], inst[0]);
<ali1234> except that's not how you get the list tail
<Friithian> lauraaa: https://friithian.dev/pictures/other/braille.png warning: picture is massive
<lauraaa> WOAH
<lauraaa> the quality
<lauraaa> amazing
KimK has joined #openscad
<lauraaa> Friithian have you ever touched something that has braille on it
lastrodamo has quit [Quit: Leaving]
<ali1234> "functional code is easier to reason about" https://imgur.com/2m9vh0A.png
<Friithian> well, sorta, ive brushed my fingers over stuff
<teepee> reason about does not necessarily mean easily readable ;-)
<ali1234> this code is neither :(
<teepee> although there's probably some need for extensions to make such code better readable
<Friithian> can we get classes in openscad :P
<ali1234> i just think this is a great example of how removing all state makes a very simple task exponentially harder
<ali1234> for absolutely no benefit
<teepee> Friithian: no, but objects maybe :)
<ali1234> it is both harder to write and harder to read
<teepee> there's even a totally new pull request for dict(), which I have not looked at yet in detail
<teepee> also one for multithreading btw
<Friithian> let's just make a c++ API :P
<teepee> cgal is c++
<Friithian> hey if we were doing this right I wouldn't have suggested that :P
<ali1234> while i'm at it, if i have a string that contains the name of a module, how do i call that module?
<teepee> with great difficulties (I think? that's a Doctor Who quote???)
<teepee> at this point only functions are first class values, modules are not
<ali1234> okay. and can i load binary data from a file into an array of ints?
<teepee> binary no, only data format at this point is json
<ali1234> better than nothing
<teepee> as for language, I think the 2 features sitting around right now are array splicing and dictionaries
<ali1234> this is why everyone keeps writing python bindings...
<ali1234> i have so far resisted the temptation of using them
<Friithian> bah, python
<teepee> no, it now started with go bindings
<teepee> and I still fail trying to convince people it might be a good idea to actually improve openscad directly, but that's a pretty lost cause ;-)
<ali1234> is json stuff only for the customizer?
<teepee> hm?
<ali1234> importing data from json
<teepee> in the dev snapshot you can do data = import("file.json"); when you enable that in preferences->features
<teepee> customizer uses json too, but that's automatic
teepee has quit [Ping timeout: 268 seconds]
teepee has joined #openscad
lauraaa has quit [Quit: Client closed]