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
<TylerTork> Yes, one which I wish someone else to solve for me by having already written a routine that does it.
<InPhase> A little messy to implement if you wanted to write it all out, but certainly solvable.
<dTal> In that case, I would probably just open up a CAD program
<InPhase> Well, sdf logic does handle this sort of thing for you somewhat automatically, as long as there's an easy solution to the question of which side of the polygon to consider.
<TylerTork> Let me state the problem in a less general way. I want to take the output of regular_polygon_info and randomly perturb the resulting shape to have a wobblyhedron
<InPhase> Wobbly cube was one of the prior advent calendars. ;)
<TylerTork> I still want the faces to be planar so I don't want to just start randomly shifting vertices. What I want is to tilt the faces slightly and compute new vertices
snakedGT has joined #openscad
<InPhase> TylerTork: There we go, door 24 on the right: https://openscad.org/advent-calendar-2021/
<TylerTork> the wobbly cube is fun but not the same problem.
mtm has quit [Ping timeout: 260 seconds]
<InPhase> That really should have had two authors listed. Ulrich wrote the wobbly sheet bit. I guess we didn't have the habit or custom of marking down multiple authors yet in 2021.
mtm has joined #openscad
snaked has quit [Ping timeout: 276 seconds]
<InPhase> At least he's marked in the code.
<TylerTork> I see there are functions to convert sets of points to planes. Are there functions to compute the area enclosed by planes?
<InPhase> Planes don't enclose areas.
<InPhase> At least not in any manner that's appropriate to state that way. :)
<TylerTork> If you understand the problem in any way I've stated it, I'd appreciate a suggestion for how to proceed.
<InPhase> TylerTork: I think this is a "look up the math and plow ahead slowly" problem. I don't know a quick shortcut the way you've defined it.
<InPhase> I concur with dTal that it's "straightforward", but I think it's probably long-slog math the way it sounded like you are defining it.
<TylerTork> If you can think of a simpler way to treat the problem of making a randomly wonky regular polyhedron that avoids the slog, I'm all for it.
<InPhase> TylerTork: Well... intersection with a bunch of really big cubes?
<dTal> I don't see the issue with perturbing the vertices
<dTal> the effect will be quite the same as perturbing the orientation of the faces and computing new vertices the long way around
<dTal> ahh no I see now, because there are more than 3 vertices defining a side
<TylerTork> right
kintel has joined #openscad
<InPhase> TylerTork: See this RotateFromTo routine. https://bpa.st/TLQA I think if you use that just right, you should be able to orient a cube face along a plane of your choice given 3 points defining it.
<TylerTork> thanks will look at it.
<InPhase> TylerTork: At which point you could just intersect them, down to the problem of pointing the inside of the cube on the correct side of the 3 points.
<dTal> what's "regular_polygon_info"?
<TylerTork> I meant regular_polyhedron_info
<InPhase> TylerTork: And yeah, I think a definition of a set of planes is actually not guaranteed to uniquely specify a singular resulting polyhedron, even if you specify that a face is on each plane, unless you can provide information about which side of the plane is inside. Much of the time this is unique, but not always.
<InPhase> TylerTork: So the problem of plane side might require improving your input info. :)
<InPhase> I have a failing case in my head, but it would be a bit of a pain to try to render it I think.
<dTal> regular_polyhedron_info gives you both the center and normal vector of each point
<dTal> this is very easy
<dTal> 1) define a big-ass cube with a side passing through the origin
<dTal> 2) rotate it to match the normal vector
<dTal> (mod your own perturbation)
<dTal> 3) translate it to the given point
<dTal> 4) repeat for every side
<dTal> 5) intersection()
<dTal> done
<dTal> s/each point / each side
mmu_man has quit [Ping timeout: 264 seconds]
<InPhase> There we go. Every face of the size 20 cube is both inside and outside of the intersecting transparent cube. So this makes 2 (i.e. non-unique) polyhedrons at the intersection of all 7 planes. cube(20); #rotate([20, -15, 47]) translate([-40,1,-40]) cube(80);
TheAssass1n has quit [Ping timeout: 260 seconds]
mmu_man has joined #openscad
TheAssassin has joined #openscad
TheAssassin has quit [Ping timeout: 260 seconds]
TheAssassin has joined #openscad
<dTal> TylerTork: https://termbin.com/txlt
<dTal> this what you wanted?
<TylerTork> I'll try it -- thanks!
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dTal> Well?
<dTal> InPhase: there's a rotate from/to routine in the same library that gives regular_polyhedron_info lol
<TylerTork> I'll try it -- after I finish helping my vrother-in-law select a Medicare plan
<TylerTork> I can see it makes a nice polyhedron -- I will have to try to mess with the normal vectors to produce the irregular one I want.
<dTal> no it's already irregular
<dTal> change the "10" in rands to make it more irregular
<dTal> make it too big though and you won't get the right number of sides
<TylerTork> I also will need to do it in-memory so I will have to figure out how to adapt to that.
<dTal> what do you mean in-memory
<TylerTork> I mean I need the VNF not the resulting shape. I'm doing more operations on it.
<TylerTork> but this looks like a good start. Thank you.
<InPhase> dTal: I have no idea what this "regular_polyhedron_info" thing is. It doesn't show on google.
J24k34 has quit [Quit: Client closed]
J24k34 has joined #openscad
<InPhase> dTal: Oh, I see in your example it's a BOSL2 thing.
TheAssassin has quit [Ping timeout: 260 seconds]
TheAssassin has joined #openscad
TylerTork has quit [Quit: Client closed]
<gbruno> [github] kintel pushed 1 additions 1 modifications (Added stdout tests for STL export) https://github.com/openscad/openscad/commit/ee084959681b9d61b94a484e187c93efca78c463
<gbruno> [github] kintel synchronize pull request #5470 (Resolved Issues With Corrupted STL Files When Exporting to stdout) https://github.com/openscad/openscad/pull/5470
mmu_man has quit [Ping timeout: 252 seconds]
palmiePaul has joined #openscad
palmiePaul has quit [Client Quit]
palmiePaul has joined #openscad
<palmiePaul> Hey there. Here's the problem: I create a couple of files in the openscad IDE, save file 1, then file 2 and lo and behold, the IDE tab that showed file 1 now shows the contents of file 2. Undo does not change it back to file 1`. Any ideas as to why this is happening - and how to prevent it?
palmiePaul has quit [Quit: Client closed]
palmiePaul has joined #openscad
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
<InPhase> palmiePaul: Did... you name the files the same?
<InPhase> palmiePaul: I'm not seeing this behavior under normal use. (Nor have I seen nor heard of it.)
<InPhase> palmiePaul: If you have the ability, could you make a video of this? If that's cumbersome or hard, could you maybe take a series of screenshots showing this process and post them to imgur?
<InPhase> palmiePaul: There might be something discernible about what's actually happening if we can see it a bit better.
snakedGT has quit [Quit: Leaving]
kintel has joined #openscad
snaked has joined #openscad
J24k34 has quit [Quit: Client closed]
J24k34 has joined #openscad
palmiepaul96 has joined #openscad
<palmiepaul96> Damn! Now I can't reproduce the problem. It originally occurred on a couple of largish files, and before posting here, I  successfully reproduced it on a couple of tiny ones. But now that I try to generate the images that have been requested, everything's working fine. I'll pull my head in till I can reproduce it reliably. Sorry to have weasted
<palmiepaul96> people's time.  :(
J24k23 has joined #openscad
J24k34 has quit [Ping timeout: 256 seconds]
L29Ah has left #openscad [#openscad]
<gbruno> [github] kintel closed pull request #5470 (Resolved Issues With Corrupted STL Files When Exporting to stdout) https://github.com/openscad/openscad/pull/5470
<gbruno> [github] kintel pushed 3 additions 30 modifications 1 removals (Merge branch 'master' into italian-localization) https://github.com/openscad/openscad/commit/8d7dc8680b419d47965d803dd110f46e137cd80d
<gbruno> [github] kintel pushed 1 additions 2 modifications (Resolved Issues With Corrupted STL Files When Exporting to stdout (#5470) --------- Co-authored-by: Marius Kintel <marius@kintel.net>) https://github.com/openscad/openscad/commit/c190dacd12ec62fe36186c5665d771dd9cc2fac2
<gbruno> [github] kintel synchronize pull request #5423 (Italian localization, contributed via email.) https://github.com/openscad/openscad/pull/5423
CameronBrooks11 has quit [Quit: Client closed]
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<InPhase> palmiepaul96: The classic Heisenbug. :) It happens.
J24k23 has quit [Quit: Client closed]
J24k23 has joined #openscad
JakeSays_ has joined #openscad
JakeSays has quit [Ping timeout: 252 seconds]
palmiepaul16 has joined #openscad
palmiepaul16 has quit [Client Quit]
J24k23 has quit [Quit: Client closed]
J24k23 has joined #openscad
rawgreaze has quit [Ping timeout: 264 seconds]
rawgreaze_ has joined #openscad
rawgreaze_ is now known as rawgreaze
JakeSays has joined #openscad
JakeSays_ has quit [Ping timeout: 246 seconds]
<gbruno> [github] hzeller opened pull request #5473 (Allow to do --animate work in shards.) https://github.com/openscad/openscad/pull/5473
<gbruno> [github] hzeller closed pull request #5472 (Allow to do --animate work in shards.) https://github.com/openscad/openscad/pull/5472
<J24k23> So how do we get 3 more SCADvents contributions?
mmu_man has joined #openscad
dicot has joined #openscad
<teepee> J24k23: one baby step after the other I suppose
<teepee> first target, something for door 7
<J24k23> something - Ü
mmu_man has quit [Ping timeout: 252 seconds]
<teepee> or as someone asked on mastodon, something winter fractal :-)
JakeSays_ has joined #openscad
JakeSays has quit [Ping timeout: 260 seconds]
palmiePaul has quit [Quit: Client closed]
J24k23 has quit [Quit: Client closed]
J24k23 has joined #openscad
JakeSays_ is now known as JakeSays
L29Ah has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
mmu_man has joined #openscad
J24k23 has quit [*.net *.split]
palmiepaul96 has quit [*.net *.split]
teepee has quit [*.net *.split]
TheAssassin has quit [*.net *.split]
GNUmoon has quit [*.net *.split]
califax has quit [*.net *.split]
aiyion has quit [*.net *.split]
fling has quit [*.net *.split]
mmu_man has quit [Ping timeout: 255 seconds]
mmu_man has joined #openscad
mmu_man has quit [Ping timeout: 252 seconds]
mtm has quit [Ping timeout: 252 seconds]
mtm has joined #openscad
hyperair has quit [Ping timeout: 244 seconds]
snaked has quit [Quit: Leaving]
SamantazFox has quit [Quit: Bye]
mmu_man has joined #openscad
Smeef has quit [Read error: Connection reset by peer]
Smeef has joined #openscad
mmu_man has quit [Ping timeout: 255 seconds]
califax has joined #openscad
fling has joined #openscad
TheAssassin has joined #openscad
teepee has joined #openscad
aiyion has joined #openscad
TylerTork has joined #openscad
<pca006132> btw, is there some preview benchmark or something? I wonder if changing the PBO code to get rid of shared pointers and use small vector to avoid allocation will cause regression (actual or performance)
TylerTork has quit [Ping timeout: 240 seconds]
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
SamantazFox has joined #openscad
mmu_man has joined #openscad
guso78k has joined #openscad
<guso78k> JordanBrown , will your PR4478  be able to bring OpenSCAD++ object oriented programming ? https://imgur.com/a/Qxa0FRI
<guso78k> (yes, this mixes openscad functions and modules in a VERY BAD way  :b )
guso78k has quit [Quit: Client closed]
guso78k has joined #openscad
<JordanBrown> guso78k: not directly, though I have thought about it. You can put function references and module references into objects, of course, because they are just values and you can put any sort of a value into an object.
<JordanBrown> However, those function and module references do not have any way to know how they were called, what object the reference was found in.
<JordanBrown> I have thought about having a magic variable $this or $self that gets set to the object that the reference comes from, but haven't done it yet.
mmu_man has quit [Ping timeout: 252 seconds]
<guso78k> yes, having $shis would be a key component to solution . My my case python did all the work, i just had to patch the yacc to understand variable . method ;)
<JordanBrown> But you can do things like
<JordanBrown> o = { mod: module (sz) { cube(sz); } }
<JordanBrown> and then
<JordanBrown> o.mod(25);
<guso78k> so o is a openscad dictionary ?
<JordanBrown> Yes, in Python terminology it's a dictionary.
<JordanBrown> I use JavaScript as the model, where it's an object.
<JordanBrown> (Nit: I missed the terminating semicolon on the assignment line.)
<guso78k> when adding Data types to Value.cc i realized, that there *is*  an Object type. is it actually used in the current master ?
<JordanBrown> Limited.
<JordanBrown> I added it in support of the textmetrics() and fontmetrics() functions, and somebody else used it for the import(json) function.
<JordanBrown> But there is currently no way to create one from an OpenSCAD program.
mmu_man has joined #openscad
J24k has joined #openscad
mmu_man has quit [Ping timeout: 252 seconds]
guso78k has quit [Ping timeout: 240 seconds]
TylerTork has joined #openscad
CameronBrooks11 has joined #openscad
CameronBrooks11 has quit [Quit: Client closed]
J24k has quit [Quit: Client closed]
J24k has joined #openscad
J24k has quit [Quit: Client closed]
J24k has joined #openscad
TylerTork has quit [Quit: Client closed]
hyperair has joined #openscad
Guest1010 has quit [Quit: Konversation terminated!]
guso78k has joined #openscad
guso78k has quit [Client Quit]
CameronBrooks11 has joined #openscad
<CameronBrooks11> Hello Torsten P. had said to reach out here about possibly testing and helping out with olman>
<teepee> CameronBrooks11: hi, that's me
<CameronBrooks11> Hi there, as I said in the issue I made I've known this project was going on for a bit but never got involved, I've used openscad a good amount for work and fun but havent done any work on the development of the openscad core itself before but I'd be happy to help in anyway I can
<teepee> that would be great, while the prototype is working, there's still some work to do to really have people working with it
LordOfBikes has quit [Read error: Connection reset by peer]
<teepee> I guess one part is getting things tested a bit more, maybe with one or two (small/simple) real world libraries
<teepee> at some point we need to tell people: "that's how you can add your library to the list"
<teepee> so we need to make sure the process works reasonably stable
<CameronBrooks11> That's something I can def do, more of my experience with openscad is doing parametric models / libs so I can definately put together a set of real libraries to test
<CameronBrooks11> Is there any docs in terms of what the overall workflow / structure that olman? I can also help with docs for it or some code review (I see its python which I have an intermediate knowledge of; I recently made a batch exporter for openscad for work)
<teepee> 3 test libraries and one repo from me which is not really a published library but more some scripts I'm using for testing
<teepee> the workflow is not really documented, but largely follows the arduino process where you add the meta info to your repo and then create a pull request adding a new line to the library list
LordOfBikes has joined #openscad
<teepee> that kicks of a github action processing this checking things and if all looks good the library is added to the list
<teepee> from time to time it then uses that list of libraries and queries the repositories for available versions generating the json file listing all repos and version, similar to that used in the arduino ide
<teepee> the olman client then downloads that and uses it for fetching libraries in specific versions
<teepee> right now the easiest way of getting the client is via Ubuntu Snap package
mmu_man has joined #openscad
CameronBrooks11 has quit [Ping timeout: 240 seconds]
CameronBrooks11 has joined #openscad
<CameronBrooks11> okay sounds good, Ill take a look tonight once Im home (my laptop is only windows)
<CameronBrooks11> Ive got my final exams the next couple weeks but after that I should have a good amount of time over the holidays to do some thorough testing
<teepee> I'm busy with the advent calendar, so that matches nicely :-)
<teepee> it's likely a going to be a slow process anyway, working though examples, testing and bugfixes
mmu_man has quit [Ping timeout: 252 seconds]
mmu_man has joined #openscad
<CameronBrooks11> Great, Ill make a fork for now and do some playing around and then update here with any progress :)
<teepee> CameronBrooks11 cool there's always time for a bit of chat even if otherwise things are slow :)
<J24k> teepee did you omit "*" intentionally ?
<teepee> hmm, not really
<teepee> I guess we should have it included too
<J24k> rest looked good
<teepee> ahh, juggling the different stages is confusing, we go live with part 4 shortly
<teepee> I still need to post about 3 and working on 5
<teepee> that will go wrong at some point ;-)
<teepee> and it does not help that I can not make mastodon use the animated gifs directly
<J24k> In the end i think the tutorial should be part of the examples
snaked has joined #openscad
CameronBrooks11 has quit [Ping timeout: 240 seconds]
CameronBrooks11 has joined #openscad
aiyion has quit [Ping timeout: 264 seconds]
aiyion has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 264 seconds]
teepee_ is now known as teepee
dicot has left #openscad [#openscad]
CameronBrooks11 has quit [Ping timeout: 240 seconds]