<peepsalot>
pop quiz! what does this evaluate to: [for(j=[0:9]) 1, j]
<peepsalot>
InPhase: feel like reviewing that cache / decimal precision PR?
little_blossom has quit [Ping timeout: 252 seconds]
little_blossom has joined #openscad
<teepee>
if that j is bleeding trough, I'd rate that as bug
<teepee>
but I'm off to bed before trying :)
teepee_ has joined #openscad
teepee has quit [Remote host closed the connection]
teepee_ is now known as teepee
J1A84853297 has joined #openscad
J1A848532 has quit [Ping timeout: 244 seconds]
epony has quit [Ping timeout: 272 seconds]
<peepsalot>
teepee: it doesn't, I kind of thought it would/should though. but I can still do [for(j=[0:9]) each[1, j] ] to get the effect I wanted
ur5us has quit [Ping timeout: 255 seconds]
kow__ has joined #openscad
drkow has quit [Ping timeout: 252 seconds]
ur5us has joined #openscad
LordOfBikes has quit [Ping timeout: 248 seconds]
snaked has quit [Ping timeout: 255 seconds]
LordOfBikes has joined #openscad
snaked has joined #openscad
<JordanBrown[m]>
peepsalot: are you at all confused about why it behaves the way it does?
<peepsalot>
yeah, i just thought there was a way to output multiple items per iteration (without `each`)
<JordanBrown[m]>
Does that really mean “no”? :-)
<peepsalot>
er I mean, i get how it behaves now
<peepsalot>
just feels like a bit of a waste to have to make a new vector with 2 elements just to put them into another vector
<peepsalot>
i thought maybe it could work with some appropriate "grouping" like: [(for(j=[0:9]) 1, j)] or maybe: [for(j=[0:9]) (1, j)] but those are just syntax errors
<peepsalot>
anyways, my attention has now wandered over to some of the discussion about a print/format function for openscad, and checking out the API for fmt library
<JordanBrown[m]>
I worked on that a couple of years ago.
<JordanBrown[m]>
I got it sort of working, but failed when I got to the mechanisms for width and precision controlled by arguments.
<peepsalot>
a way for user to format numbers would be nice to counteract some user-facing output issues that go along with my cache precision PR
<JordanBrown[m]>
I don’t know whether it was possible to do, but it was too deep in template hell for me.
<JordanBrown[m]>
Yes
<JordanBrown[m]>
My stuff is at GitHub.com/jordanbrown0/OpenSCAD in the printf branch.
<JordanBrown[m]>
But it is 1255 commits behind.
<peepsalot>
also apparently latest fmt does floating point output ~1.7x faster than double-conversion, which I just finished getting all our number to string code to use
<JordanBrown[m]>
I am sure that it would not be a problem to use it internally. I was trying to offer it as a function, taking Values as arguments.
<peepsalot>
ah, just looked at your branch, that was of course still using qmake. besides qmake files there's just func.cc that was edited, so probably would be simple to rebase
ur5us has quit [Ping timeout: 255 seconds]
epony has joined #openscad
aiyion has quit [Ping timeout: 258 seconds]
ur5us has joined #openscad
aiyion has joined #openscad
ccox_ has quit [Read error: Software caused connection abort]
ccox has joined #openscad
Virindi has quit [Read error: Software caused connection abort]
Virindi has joined #openscad
ur5us has quit [Ping timeout: 255 seconds]
<WenxuanZhao[m]>
<InPhase> "Wenxuan Zhao: Whoops, forgot the..." <- It's too hard, it's better for me to imitate from the basics
stevieh has joined #openscad
<WenxuanZhao[m]>
Much admiration for the authors of these documents
JordanBrown_ has quit [Read error: Software caused connection abort]
ur5us has joined #openscad
JordanBrown has joined #openscad
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
fling has quit [Remote host closed the connection]
fling has joined #openscad
vsellier_ is now known as vsellier
teepee has quit [Ping timeout: 258 seconds]
teepee has joined #openscad
GNUmoon has quit [Ping timeout: 258 seconds]
GNUmoon has joined #openscad
J1A84853297 has quit [Quit: Client closed]
J1A84853297 has joined #openscad
JordanBrown_ has joined #openscad
JordanBrown has quit [Ping timeout: 252 seconds]
ur5us has quit [Ping timeout: 255 seconds]
GNUmoon has quit [Ping timeout: 258 seconds]
GNUmoon has joined #openscad
castaway has joined #openscad
lastrodamo has joined #openscad
la1yv has quit [Read error: Software caused connection abort]
la1yv has joined #openscad
califax has quit [Ping timeout: 258 seconds]
J1A84853297 has quit [*.net *.split]
GNUmoon has quit [*.net *.split]
fling has quit [*.net *.split]
teepee has quit [*.net *.split]
TheAssassin has quit [*.net *.split]
aiyion has quit [*.net *.split]
neur0 has quit [*.net *.split]
hrberg has quit [Ping timeout: 276 seconds]
Ekho has quit [Read error: Software caused connection abort]
Ekho has joined #openscad
JordanBrown has joined #openscad
JordanBrown_ has quit [Ping timeout: 252 seconds]
la1yv_a has joined #openscad
la1yv has quit [Ping timeout: 252 seconds]
la1yv_a is now known as la1yv
<stevieh>
hmm... for a word clock I designed a stencil that will sit in front of the leds. Now I would need exactly the same positioning and size of the letters in white on black most perfectly in a pdf. Any ideas how to do that without manual rework?
<stevieh>
right now my approach is to do this with a python script which has the same matrix
<Scopeuk>
stevieh, export the stensil to pdf or svg?
<Scopeuk>
assuming the stencil is a 2d openscad model
<stevieh>
basically it is, but what I get on the pdf is the outline...
<Scopeuk>
and you want the letters filled?
<stevieh>
no the letters white the rest black
<Scopeuk>
I guess you would try doing difference(){square([huge,alsoHuge]) myLetters()}
<Scopeuk>
but not missing the important semi colons
<Scopeuk>
not sure that would make it black though, I'm not fully familiar with the pdf export rules
<stevieh>
the pdf export seems only to generate the outline of the font, so, this does not help...
<stevieh>
bummer... fpdf for python does not support usual fonts...
<stevieh>
so, I have to work with the pdf output from openscad
mohnish has quit [Ping timeout: 255 seconds]
mohnish has joined #openscad
snaked has quit [Quit: Leaving]
Ekho has quit [Ping timeout: 252 seconds]
<stevieh>
ah, when I export it as svg, it seems, I can just change the background to black. Now have to find out how to do that with code
<stevieh>
got it :-)
Ekho has joined #openscad
<Scopeuk>
glad you got it sorted
teepee has joined #openscad
teepee has quit [*.net *.split]
neur0 has joined #openscad
TheAssassin has joined #openscad
califax has joined #openscad
aiyion has joined #openscad
teepee has joined #openscad
J1A84 has joined #openscad
la1yv_a has joined #openscad
la1yv has quit [Ping timeout: 252 seconds]
la1yv_a is now known as la1yv
neur0 has quit [Remote host closed the connection]
sauce has quit [Read error: Software caused connection abort]
sauce has joined #openscad
fling has joined #openscad
lastrodamo has quit [Quit: Leaving]
J1A8438 has joined #openscad
J1A843812 has joined #openscad
J1A84 has quit [Ping timeout: 260 seconds]
J1A8438 has quit [Ping timeout: 260 seconds]
J1A84381237 has joined #openscad
aiyion has quit [Remote host closed the connection]
aiyion has joined #openscad
J1A843812 has quit [Ping timeout: 260 seconds]
J1A84381237 is now known as J1A84
extor has quit [Read error: Software caused connection abort]
stefanct has quit [Read error: Software caused connection abort]
extor has joined #openscad
J1A8445 has joined #openscad
J1A84 has quit [Ping timeout: 260 seconds]
stefanct has joined #openscad
Sauvin has quit [Ping timeout: 240 seconds]
fling has quit [Remote host closed the connection]
<Scopeuk>
is there anyway we can github to pop up a dialog with a webirc client when someone who has never been involved with the project before tries to raise an issue to suggest they try a quick chat before raising
<Scopeuk>
I can see how the cone one came up but the docs for that are pretty clear (the undefined -> 0 is not ideal I guess)
<teepee>
no, but there's issue templates that might be able to help with the problem
<Scopeuk>
it does feel odd that a lot of people end up at git hub issues before here
stevieh has quit [Remote host closed the connection]
<peepsalot>
in github actions, is there any way to see scrollback for the current step? ie if its at "Building OpenSCAD", it only shows lines that were output since you opened the page. no way to scrollback, until build is complete it seems.
<teepee>
I can't see any way to do that either
<peepsalot>
hmm, maybe it wouldn't hurt to split out things a bit more. separate step for cmake config, then build, then test. some already have separate build/test, but others are grouped
<Scopeuk>
thats weird, the "load raw logs" just doesn't work either
<teepee>
$ gh run view 3379504041 --log
<teepee>
run 3379504041 is still in progress; logs will be available when it is complete
l0r3m has joined #openscad
<peepsalot>
i was wanting to verify the gcc version on ubuntu 18.04. as I understand, it has at least gcc 7.4 available in default repos, which should support most of c++17
l0r3m has quit [Remote host closed the connection]
<peepsalot>
teepee: have we tried just setting builds to c++17 and seeing if it works? or is there any specific feature that you know 18.04 is missing?
<peepsalot>
oh, for some reason I thought libfmt needed c++17, but I just double checked and its only relying on c++11.
<peepsalot>
still would be nice to switch up to 17 before 18.04 EOL in 4/23
<peepsalot>
ok, so github actions 18.04 says: "The CXX compiler identification is GNU 7.5.0"
<peepsalot>
so unless I'm misunderstanding gcc version capabilities, or some OBS builds still have gcc < 7 , then I think it should be OK?
<peepsalot>
I just checked circle-ci appimage is also on gcc 7.5.0
<J1A8445>
wow .. just had a variable that was set to false .. but echo() was true .. cache flush doesn't help only restart
<peepsalot>
customizer override issue?
<J1A8445>
ah good point .. that is very possible thanks ..
<JordanBrown[m]>
WRT cylinder and cones, to be fair the documentation is not terribly clear and the behavior is pretty much designed to lead you astray.
<JordanBrown[m]>
It seems pretty wrong that cylinder(h,r) yields a cone.
teepee has quit [Quit: bye...]
teepee has joined #openscad
<Bram[m]>
But cylinder(h,r) is not one of the available overloads
<JordanBrown[m]>
Agreed that it doesn't do what you expect. It *works*, in the sense that it doesn't produce a syntax error and I can figure out what's actually happening.
<JordanBrown[m]>
The cheat sheet says "cylinder(h, r|d, center)", which sort of implies that you could say cylinder(20,5,false), but you can't.
<JordanBrown[m]>
And cylinder(h,r) is the most obvious way to describe a cylinder (give or take the order); it seems wrong that it doesn't work.
<JordanBrown[m]>
It is what it is and it probably can't be fixed at this point, but it seems like a design error.
<teepee>
peepsalot: yes, that gcc has partial support, I'm not sure if there's anything specifc missing
<JordanBrown[m]>
Well, maybe we could decide that it's vanishingly unlikely that anybody wants to take advantage of the implied r2=1, and we could special case the two-argument variation. But special cases like that are ugly too.
<teepee>
but I guess we can try, at this point it probably works as the code base is c++14, but would fail at some point when we hit a feature that's not in that gcc version
<JordanBrown[m]>
teepee do you think it might be worthwhile to add a pointer to IRC or the mailing list to one of AcinonXDev's github issues, so that maybe they'll ask first next time?
<JordanBrown[m]>
Not that they aren't both good questions. They just don't need to be recorded in the issue history forever.
<teepee>
add that where?
<JordanBrown[m]>
to #4404 or #4405
<JordanBrown[m]>
Better would be a private message, but alas github doesn't seem to have private messages.
<teepee>
more work, but maybe: extend/reshuffle FAQ to have "what goes where" first
<teepee>
posting a link to the FAQ seems ok in public
<teepee>
at some point I'll try to figure out the issue templates which might also help (and have a pointer to FAQ)
<JordanBrown[m]>
It's not the public/private-ness that leads to my wanting a private message, but rather the "on the record"-ness. Issues don't seem like a good place for conversations, advice sessions, et cetera.
<JordanBrown[m]>
I made a small change to the docs that might help, moving the source sample up to immediately under the "if given in the order shown here" mention.
JordanBrown15 has joined #openscad
JordanBrown15 has quit [Client Quit]
<JordanBrown[m]>
I put a pointer to the chat in one of the issues.
<Bram[m]>
<JordanBrown[m]> "The cheat sheet says "cylinder(h..." <- I was thinking about this:
<JordanBrown[m]>
That looks to be the best of the three, but it would be good if all three were clear...
use-value has joined #openscad
xtor has quit [Ping timeout: 252 seconds]
extor has joined #openscad
<InPhase>
Yeah, the cheatsheet needs updated there. Someone just needs to sort out updated to exactly what.
<peepsalot>
hmm, i was wanting to use std::hypot in some places for better precision (like our `norm` function), but it changes a couple edge case test results in an odd way
<InPhase>
Infinities as inputs to norm should produce infinities as outputs. This is correct.
<InPhase>
peepsalot: Wait, what? I didn't see that in the behavior description. That's worse than I thought.
<InPhase>
How did this pass a review committee?
<peepsalot>
that's what I'm saying. the behavior description is only for the 2 arg version. there is no specification for 3 arg version handling of infinities
<peepsalot>
or, at least based on cppreference. i don't know where to look for official spec
<InPhase>
peepsalot: lol, the msvc error: "error C2661: 'hypot': no overloaded function takes 3 arguments"
<InPhase>
Oh, maybe I need to change the command line parameters for that one.
<peepsalot>
3 args is C++17
<InPhase>
Yeah, I was using gcc/clang parameters for C++17 and forgot to msvc--ify them.
<InPhase>
It refuses to compile 1.0/0.0 though anyway.
<peepsalot>
i guess I can just special case all around the std functions, but it is annoying
<InPhase>
I would say just don't use them.
<peepsalot>
i just want that sweet 1 ULP precision
<InPhase>
Stick to implementing math until they learn how to do floating point math I guess.
<peepsalot>
how do I submit a bug to "C++"
<InPhase>
You become the author of a proposed change to the standard...
<peepsalot>
sounds difficult
<InPhase>
Oh, this is not a defect in the standard.
<InPhase>
The standard says, "Returns sqrt(x^2 + y^2 + z^2)" and nothing else at all.
<InPhase>
It makes no comments about nan and inf.
<InPhase>
cppreference appears to be describing implementation defects.
<peepsalot>
what does it say about the 2 arg version?
<InPhase>
It says it follows the C standard.
<InPhase>
Which in turn says "A range error may occur" and "The hypot function returns sqrt(x^2 + y^2)"
<InPhase>
And that it calculates it "without undue overflow or underflow"
<InPhase>
So I would say these are all just implementation artifacts of the particular algorithms being used to calculate them to 1 ulp.
<InPhase>
Which it also appears are far less efficient than just calculating it the standard way.
<peepsalot>
any loss of efficiency is a drop in the bucket compared to our symbol lookups
<InPhase>
Fair point. :)
<InPhase>
You have one more problem with std::hypot
<InPhase>
We can do norm of any size vector.
<peepsalot>
yeah i was gonna fall back to basic loop implementation for size != 2 or 3
<peepsalot>
now I'm trying to understand why windows CI server suddenly has no GL
<peepsalot>
i can't imagine my one-line "#include <CGAL/exceptions.h>" would be the cause
lastrodamo has joined #openscad
ur5us has joined #openscad
J1A8445 has quit [Quit: Client closed]
J1A8445 has joined #openscad
<JordanBrown[m]>
InPhase the question for the cheat sheet is how to concisely present the various argument options. E.g. for cube you can just say cube(size), but for linear_extrude you cannot say linear_extrude(height).
<J1A8445>
because of the missing object?
<J1A8445>
i mean that is implied by "extrude" like extrude what?
<JordanBrown[m]>
"You must use parameter names due to a backward compatibility issue. "
<JordanBrown[m]>
But I think that might be lying, since it seems to work.
<JordanBrown[m]>
Historically I think there was a conflict with a previous generation of linear_extrude, where it took a file name as an argument.
ali1234 has joined #openscad
<JordanBrown[m]>
Fixed May 2021, though maybe it was fixed, then broken before that.
J1A8445 has quit [Quit: Client closed]
J1A8445 has joined #openscad
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
<JordanBrown[m]>
Looks like it was fixed in 2012. I believe that's earlier than the first version I used, which may mean that I've been believing incorrect documentation forever.
lastrodamo has quit [Quit: Leaving]
<JordanBrown[m]>
But that was simply the worst answer. It says cube(size, center). Are you allowed to omit "center"? (Yes, of course, but it's not clearly shown.) But how about where it says cylinder(h, r|d, center)? That doesn't work for positional args at all. It also says cylinder(h,r1|d1,r2|d2,center), which works for positional args for r1/r2, but not for d1/d2.
_whitelogger has joined #openscad
<Bram[m]>
Hi, am I correct that you can only rotate around axis' that pass through [0,0,0] ?
<teepee>
Bram[m]: yes
<Bram[m]>
So I need to always center objects on 0,0,0 and rotate first and only then do translations
<dalias>
you can write a module to rotate around another point
<JordanBrown[m]>
Well, you need to arrange that the point that you want to rotate around is at [0,0,0], yes. That might or might not be the center, depending on what you're trying to do.
<JordanBrown[m]>
to rotate a a rectangle around a point in its middle.
teepee_ has joined #openscad
<JordanBrown[m]>
J1A8445: I'm not sure quite what you're saying. polygon() with no args and polygon([]) with an empty array are both legal.
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
<J1A8445>
an empty array works but no points results in an error (for me)
<JordanBrown[m]>
When you say "no points", exactly what invocation do you mean?
<JordanBrown[m]>
polygon([[]]) fails, but that's because the one point specified is malformed.
<J1A8445>
polygon();
<JordanBrown[m]>
hmm. Works for me in 2021.01.
<J1A8445>
not with 2022
hrberg has joined #openscad
<JordanBrown[m]>
Indeed.
<J1A8445>
i also would like that linear_extrude would accept h alternative to height .. like the cylinder
<JordanBrown[m]>
As seems more correct; I can't come up with any use case for polygon() with no arguments.
<JordanBrown[m]>
Yes. That h/height inconsistency is probably my largest "stupid little thing" complaint about the program.
<JordanBrown[m]>
But it's so small that I haven't gotten around to doing anything about it...
hrberg has quit [Client Quit]
<J1A8445>
also in the cheatsheet is an inconsistency between polygon and polyhedron
hrberg has joined #openscad
hrberg has quit [Client Quit]
<J1A8445>
the 2022 has these nice popups that tell you how to use the modules makes the sheet less importand
hrberg has joined #openscad
<JordanBrown[m]>
yeah, I hate them.
<JordanBrown[m]>
I don't like stuff popping up over what I'm typing.
hrberg has quit [Client Quit]
<J1A8445>
it is annoying in multi line breaks as then it is over
hrberg has joined #openscad
<J1A8445>
else it is under so it doesn't block
<JordanBrown[m]>
if I'm inserting stuff then it is over the stuff below the cursor.
hrberg has quit [Client Quit]
hrberg has joined #openscad
hrberg has quit [Client Quit]
hrberg has joined #openscad
<J1A8445>
you can disable it .. i have set it to 3 letter so it show less frequent
<teepee>
there's awesome stuff for polygon()
<JordanBrown[m]>
I know. It's currently enabled on this system, because something about my preferences was breaking 2021.01 and so I wiped them all out, but it's one of the things that I disable.
<teepee>
well, that *could* be done
<J1A8445>
? what should/could polygon do without input?
<teepee>
1d -> 2d a bit like linear_extrude() does 2d -> 3d
<JordanBrown[m]>
I could imagine some sort of tie-in to a 1D (1.5D?) subsystem, but I don't know exactly what.
<teepee>
e.g. think primitives from SVG, line / spline / ...
<teepee>
or text()
<teepee>
both have pretty much the same primitives
<teepee>
so instead of doing import("file.svg"); you could do something like "right-click-embed-svg" and it would generate a polygon() { ... svg primitives ... }
phryk has joined #openscad
<JordanBrown[m]>
A perhaps silly idea just occurred to me: allow the "height" argument to linear extrude to be a vec3; you would extrude along that vector.
<teepee>
or embed-glyph giving the input from the font
<JordanBrown[m]>
Sounds plausible but I don't have the brain power right now to think it through. And I ought to be doing that four-letter-word thing...
<teepee>
or height might be a func(x, y)
<teepee>
there's precedent for that already :)
<JordanBrown[m]>
indeed, linear extrude is really a subset of sweep.
<teepee>
there's a PR proposing a 2.5D "subsystem"
<teepee>
like extrude() { 2d shapes in 3d-space ... }
<JordanBrown[m]>
Somebody ( J1A8445 ?) had some thoughts on 1D, 1.5D, et cetera behavior.
ali1234 has quit [Ping timeout: 246 seconds]
<J1A8445>
i have a working 1D module .. can be used in hull()
<J1A8445>
but we all want POINT();
<teepee>
and spline :)
<J1A8445>
concave hull Ü
<teepee>
someone posted something like that on the mailing list
<InPhase>
JordanBrown[m]: Potentially the right approach to the cheatsheet is to list the most common valid pairings of options, some with = and some without, just making sure not to misrepresent any as positional that must be assigned in that combination.
<InPhase>
It doesn't really need to have everything that can be done, as it links to the full documentation, it just needs to be commonly useful and not accidentally mislead.