<bitbasher>
i have implemented slicing and join based on some routines that i found in the text handling part of the relativity library .. they are on my fork of relativity and i would need to run the test quite before showing them in public .. but if you can used them i have em
<pca006132>
wondering if anyone encountered qt6 applications that are using opengl (e.g. openscad) not working under wayland with nvidia drivers, unless you set QT_QPT_PLATFORM=xcb which forces xwayland...
<teepee>
xcb forces wayland? that sounds wrong
<teepee>
oh, *x* wayland, right
<teepee>
I only have tried qt5 so far
<teepee>
hmm, let me check the flatpak
<pca006132>
it outright crashed openscad with "Framebuffer not supported"... feels like some ancient opengl version is selected
<teepee>
that has Qt version: 6.8.3, works fine, but I don't have nvidia
<teepee>
oh, ouch OpenGL Version: OpenGL ES 3.2 NVIDIA 570.153.02
<teepee>
*ES*
<pca006132>
seems like a wayland thing
<pca006132>
annoying
<pca006132>
don't know enough about opengl/wayland/nvidia to fix this
bitbasher has joined #openscad
guso78k has quit [Quit: Client closed]
<bitbasher>
hey experts (he asked hopefully) when the docs say that a program can import a font into a running script using the "use" statement .. but knowing that "use" is deprecated, does that mean that "import" will do the same?
<teepee>
no, import can't do that
<teepee>
why is use<> deprecated?
<bitbasher>
it was noted as deprecated in the docs
<bitbasher>
beyond that i dunno
<bitbasher>
well as the functionality is diff i will take the deprecated off of the "use" docs
<teepee>
I'm not aware of any deprecation there, do you have a link to that part?
bitbasher has quit [Read error: Connection reset by peer]
bitbasher has joined #openscad
bitbasher_ has joined #openscad
bitbasher has quit [Read error: Connection reset by peer]
guso78k has joined #openscad
<InPhase>
Uhm, I don't think use<> is deprecated.
<guso78k>
it appears that std::shared_ptr<Type>. reset(newptr) just changes one pointer reference from oldptr to newptr . Is it possible to change all ptr references from oldptr to newtr which are member of the shared group ?
<bitbasher_>
i will update the docs about use
<hyperair>
guso78k: no, unless you use a shared_ptr<shared_ptr<Type>>
<ali1234>
bosl has a completely different solution
teepee_ has joined #openscad
teepee has quit [Ping timeout: 244 seconds]
teepee_ is now known as teepee
<bitbasher_>
folks .. the use statement does indeed add a font to the running script and it shows up in the Help>Font List panel but...
<JordanBrown>
teepee join() would join the elements of an array, which str() can't do.
<bitbasher_>
the docs say that drag and drop of a font file should add it .. not clear if it is added to the script, or to the app, or if it is perm imported or just temp .. any one know something about what happens when dropping a non-.scad file into the editor window ?
<teepee>
hmm, but only arrays of strings? or also automatic recursive to-string?
<teepee>
bitbasher_: it adds a use</path/to/font> I think
<teepee>
if you drag an svg, you get an import("/path/to/svg");
<ali1234>
join([1,2,3]) would be whatever openscad's equivalent of TypeError is
<JordanBrown>
Two different approaches: for JS it's an operation on an array that takes a delimiter as an arg; for Python it's an operation on the string delimiter that takes the array as an argument.
<JordanBrown>
join([1,2,3]) I'd be fine with an error. I'd also be fine with automatically converting to string and then joining.
<teepee>
I guess a separator would be pretty useful as it's very annoying to manually handle that
<ali1234>
L = [1,2,3]; join([for i = [0:len(L)] str(L[i])]);
<ali1234>
= "123"?
JakeSays has quit [Remote host closed the connection]
<ali1234>
i guess i'd be fine if it implicitly did that too
<bitbasher_>
the JS version is a lot nicer to use .. and pls allow the delimiter to be any string, not just a single delim char
JakeSays has joined #openscad
<ali1234>
yes, absolutely a string
<JordanBrown>
Yes, though the simpler case is join([ for (v = L) str(v) ])
<JordanBrown>
Of course a string. It would be more work to only allow a single character.
<bitbasher_>
so new = join( <many things>, " in-between " )
J25k85 has quit [Quit: Client closed]
J25k85 has joined #openscad
<bitbasher_>
would it make sense that join() is an operator ? as opposed to a function .. then join( <join params> ) vector;
<bitbasher_>
or is the syntax of join( vector, params ); easier
<bitbasher_>
err .. no .. the operator cannot return a result so that idea fails
<bitbasher_>
it has to be new = join( vector, "delim" );
<bitbasher_>
would it be too funky to do ...
<bitbasher_>
new=join( vector, for(d=delims) d ); where vector is like [ 1,2,3] and delims =[ " ",":"] is one element shorter so each "d" goes between two "v" items .. or is that just nuts?
<JordanBrown>
The expression operators (let, assert, echo) are IMHO just too darned magic and should not be emulated.
<bitbasher_>
LOL .. not my fault they are already in the language
<JordanBrown>
Yep.
<bitbasher_>
Hi Jordan :)
<JordanBrown>
Hello.
<JordanBrown>
No strong opinion on having a vector for the second arg. If your args are known-length and relatively small - both implied by your example - then you can just use str().
Guest66 has joined #openscad
<Guest66>
/ Parameter
<Guest66>
plate_length = 210; // Gesamtlänge der Platte (mm)
<Guest66>
plate_width = 30; // Breite der Platte (mm)
<Guest66>
plate_thickness = 5; // Dicke der Grundplatte (mm)
<Guest66>
text_height = 2; // Erhebung der Buchstaben über der Platte (mm)
<Guest66>
font_size = 20; // Schriftgröße
<Guest66>
font = "DejaVu:style=Bold"; // Schriftart
<JordanBrown>
OK, time to pretend to do real work.
<InPhase>
JordanBrown: lol. "is there a question there?" "ja" *quits*
J25k85 has quit [Quit: Client closed]
J25k85 has joined #openscad
bitbasher_ has quit [Ping timeout: 244 seconds]
TheAssassin has quit [Ping timeout: 244 seconds]
TheAssassin has joined #openscad
<JordanBrown>
InPhase I have enter/leave notifications turned off so didn't notice.
<InPhase>
JordanBrown: It happened about 1 minute after "ja". :)
<JordanBrown>
From what you said, I figured as much.
<JordanBrown>
There have been several instances over the last few days of GuestXX driving by, dropping off a half-screen of program, and leaving without any prose.
<InPhase>
Yes. I still really want to hear why those people are doing that. But they just don't answer such questions.
bozo16 has quit [Quit: Leaving]
peepsalot has quit [Quit: Connection reset by peep]