<JordanBrown>
I've put animation in various places in it, and you can drop it into any of the parameters, but it's really best if it isn't in the reference copy.
<InPhase>
linext_: You can add this to the top, and then post it anywhere you like per the rights granted. :) https://bpa.st/FR7A
<InPhase>
And rip out parts for other variants as desired.
TheAssassin has quit [Quit: No Ping reply in 180 seconds.]
TheAssassin has joined #openscad
<InPhase>
JordanBrown: Found the invite 32 emails down. :)
qeed_ has joined #openscad
qeed has quit [Ping timeout: 268 seconds]
<J1A8495>
is there a reason why the animate tab is not already filled with like 15 FPS and 30 steps.. would be convenient
<InPhase>
Because then it would immediately animate everything?
<J1A8495>
but you have to start it?
aiyion1 has quit [Ping timeout: 258 seconds]
teepee has quit [Ping timeout: 258 seconds]
aiyion1 has joined #openscad
<InPhase>
Well it defaults to on for parity with the behavior in the last release.
teepee has joined #openscad
<InPhase>
I suppose the new structure does give an opportunity to rethink that.
<InPhase>
But if we're going to raise the importance of the play button, then we should really redesign that button. It shows up way too tiny and unreadable for a key button on my screen.
<J1A8495>
and we have two play buttons
<J1A8495>
or one play one pause and one play&pause button
ur5us has quit [Quit: Leaving]
ur5us has joined #openscad
ur5us has quit [Ping timeout: 244 seconds]
ur5us has joined #openscad
J1A8495 has quit [Ping timeout: 252 seconds]
J1A8495 has joined #openscad
snakedGT has quit [Ping timeout: 255 seconds]
pah is now known as pa
ur5us has quit [Ping timeout: 244 seconds]
lastrodamo has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
pie_ has quit []
pie_ has joined #openscad
qeed has joined #openscad
qeed_ has quit [Ping timeout: 244 seconds]
ur5us has joined #openscad
Nohus has joined #openscad
<Nohus>
Is there a way to use OpenSCAD as a library (as opposed to as an end-user application)? I want to write a desktop application that can generate an STL based on user's input, that would use OpenSCAD in the background (without requiring the user to have OpenSCAD installed).
<teepee>
Nohus: library not easily, it could run via pipe
<dTal>
Nohus: it has a headless command line interface, that is probably what you want
<dTal>
you can bundle your own openscad with your application
<Nohus>
Thanks, that's probably what I need to do. It will probably be a pain to bundle it for Windows, Mac and Linux versions of my app... but we will see.
<Scopeuk>
for linux/mac you can probably hand off to the system package managers. particularly if you application is delivered via packagemanagement
<Nohus>
That would be easiest, but could get problematic with different versions of OpenSCAD in different repos.
<Nohus>
Would be safest to bundle a known version, unless I want to specifically test on 10 distros...
<Nohus>
Still, probably 90% of users would be on Windows.
ur5us has quit [Ping timeout: 244 seconds]
<Scopeuk>
potentially although openscad has long release cycles and a very stable user facing interface
<Scopeuk>
as a curiosity what does your app do?
buZz has quit [Ping timeout: 268 seconds]
<teepee>
Nohus: if you just need a compile mode and a very limited interface, essentially just text-in, data-out we can work out something
buZz has joined #openscad
buZz is now known as Guest1269
Guest1269 is now known as buZz
<Nohus>
teepee: that's pretty much what I was looking for. A way to compile OpenSCAD to a library I can link to in my own application would be perfect, with no user interface parts.
snakedGT has joined #openscad
<Nohus>
But even a stripped down binary would be helpful.
<Nohus>
To call with the existing CLI interface, but without having the entire GUI included.
<InPhase>
Nohus: It wouldn't strip down too much anyway, as the command line runs still require openGL for internal processing without gui mode.
aiyion1 has quit [Remote host closed the connection]
aiyion1 has joined #openscad
qeed has quit [Quit: qeed]
teepee has quit [Remote host closed the connection]
qeed has joined #openscad
teepee has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
<teepee>
Nohus: just as side note, bundling would be fine at any rate, compilation will make your application GPL3+ (OpenSCAD itself is GPL2+ but libCGAL overwrites that to GPL3+)
<teepee>
so the code would need to be any compatible license
castawayc has quit [Remote host closed the connection]
castaway has quit [Remote host closed the connection]
castaway has joined #openscad
kyki has joined #openscad
<Nohus>
Yeah I have no problems making my app GPL
castaway has quit [Quit: leaving]
kyki has quit [Quit: Leaving]
castaway has joined #openscad
castaway has quit [Ping timeout: 268 seconds]
TheAssassin has quit [Remote host closed the connection]
teepee has quit [Remote host closed the connection]
TheAssassin has joined #openscad
snakedGT has quit [Ping timeout: 252 seconds]
teepee has joined #openscad
castaway has joined #openscad
castaway has quit [Client Quit]
castaway has joined #openscad
castawayc has joined #openscad
linext_ has quit [Quit: Leaving]
Guest155 has joined #openscad
Guest155 has quit [Client Quit]
knielsen has quit [*.net *.split]
voxpelli has quit [*.net *.split]
voxpelli has joined #openscad
knielsen has joined #openscad
RoyK has left #openscad [#openscad]
<JordanBrown>
InPhase: if you want your head to hurt, consider: we have list comprehensions, that allow you to have program segments that generate a list. Should we have object comprehensions that in some way work similarly?
<JordanBrown>
My take is "no", mostly because I can't immediately see how they could work, and because list comprehensions plus Revar's object() function can do the same thing.
Nohus has quit [Quit: Client closed]
<InPhase>
JordanBrown: Under the syntactical proposal from last night (and others, but just to clarify), all object definitions are object comprehensions. *mind-blown*
<InPhase>
JordanBrown: Now the question you should have asked maybe, is how do you recursively define an object literal's contents?
<InPhase>
object merge function?
<InPhase>
dict to object support with dict implementation?
J1A8495 has quit [Quit: Client closed]
J1A8495 has joined #openscad
<peepsalot>
like concat but for objects? "extend" maybe
<peepsalot>
i don't like the object function, without a way to define object literal.
<InPhase>
Yeah, I don't think an object function is the right approach. I'd rather see natural syntax for it like we've been discussing here.
<peepsalot>
there's been a sort of unspoken rule that all values can be echoed in such a way that the ouyput could be reinterpreted as a literal. so object function would break that
<InPhase>
If you want a function to make an object, you should be able to just write one. Which will work as long as we have object literals, and maybe some way to combine objects into another object.
<InPhase>
And in fact I can imagine myself making many object constructor functions.
snakedGT has joined #openscad
<peepsalot>
the whole kwikius proposal is ill formed and wrong on so many levels it makes my head spin. i don't even know where to start in replying to that
<peepsalot>
too many competing proposals and discussions at this point for me to keep track
<JordanBrown>
The object-literal syntax doesn't have a way to supply a calculated key, and doesn't (directly) have a way to add on to an object. The object() function is sort of analogous to concat(), in that it merges objects. It has an additional capability of converting a list representation into an object.
<JordanBrown>
I completely agree that it should not be the *only* way to construct an object.
<JordanBrown>
But I think that it's a valuable concept as a way to build an object more dynamically.
<teepee>
the question also is if there's a need for a distinct dictionary data type, or if object can cover all use cases
<JordanBrown>
One could imagine defining the "+" operator on objects to union them, and that would address some of the need. (But note that obj+obj would then behave very differently from vector+vector.)
<JordanBrown>
I don't see any reason for a distinct dictionary type.
<teepee>
actually + is one of those cases where it might not make sense for object, but could be well defined for dictionary
<JordanBrown>
I don't have a problem coming up with a definition of + for object that makes sense. It would be a union, with the last value winning if the same name is mentioned more than once.
<JordanBrown>
But I'm not reall comfortable with extending arithmetic operators much beyond arithmetic, and if obj+obj merges the objects, you might expect vector+vector to concatenate, and it doesn't.
<teepee>
union for geometry but replace for values? I'm not sure I like that
<JordanBrown>
sorry, no, union in more of the set sense.
<JordanBrown>
Not the geometric sense.
<teepee>
replacing geometry would be a strange result
<JordanBrown>
I'm not terribly happy with it either, but if the geometry is a reserved-name component of the object it would make sense.
<teepee>
and reserved names are horrible too ;-)
<JordanBrown>
yes
<JordanBrown>
But sometimes horrible ideas are all you have :-)
<JordanBrown>
You'll notice that in what I've written I've waffled around exactly how you refer to the geometry independent of the object.
<JordanBrown>
x = { a=1; cube(10); };
<JordanBrown>
x.a is 1.
<JordanBrown>
What would you say that would in some sense mean cube(10)?
<JordanBrown>
x.geometry?
<JordanBrown>
x._geometry?
<JordanBrown>
geometry(x)?
<InPhase>
render(x); :)
<teepee>
x()
<InPhase>
teepee: Nooo.
<InPhase>
Execution confusion.
<JordanBrown>
I don't like x() at all, because x is not in any sense executable.
<teepee>
that's nothing about execution
<JordanBrown>
x() implies calling and executing x.
<InPhase>
x = { a=1; sphere(10); };
<InPhase>
teepee: Now $fn matters.
<InPhase>
And so on.
<InPhase>
teepee: We need to be clear about where and when such things are picked up, which for a literal is at definition time.
<teepee>
yes, and unfortunately that's how openscad works, even though it's a bit annoying
<JordanBrown>
No, I don't think it does.
<JordanBrown>
Let's ask a simpler (and useless) question:
<JordanBrown>
x = { a = echo("a") 1; echo("b"); };
<JordanBrown>
When are the two echoes executed? When does the output appear in the log?
<InPhase>
teepee: This is one of the things we differentiated last night between object literals and module literals. Module literals potentially take parameters, and the calculations run at invocation like m() or m(5), picking up $fn there. But object literals evaluate the calculation steps at definition and then are fixed.
<JordanBrown>
yes.
<JordanBrown>
So in my echo example, by the time that that assignment is complete, both the "a" and the "b" have been echoed.
<JordanBrown>
(Give or take OpenSCAD's ... interesting ... evaluation semantics, where { echo("b"); a=echo("a") 1; } would still echo a and then b. Just as it does for any other { ... } block.)
TheAssassin has quit [Quit: No Ping reply in 180 seconds.]
<InPhase>
JordanBrown: I'll try to find some evening time this weekend to type out a few more things on that document. I fixed one semicolon before getting exhausted last night. ;)
<InPhase>
Then if we get that to a good state, teepee can read that to actually know what we're talking about.