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
califax has quit [Remote host closed the connection]
califax has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 268 seconds]
teepee_ is now known as teepee
GNUmoon2 has quit [Remote host closed the connection]
GNUmoon2 has joined #openscad
teepee has quit [Quit: bye...]
teepee has joined #openscad
J1A8484 has quit [Ping timeout: 252 seconds]
LordOfBikes has quit [Ping timeout: 245 seconds]
LordOfBikes has joined #openscad
GNUmoon2 has quit [Remote host closed the connection]
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
J1A84 has joined #openscad
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
CuffLimbs has joined #openscad
lastrodamo has joined #openscad
<teepee> joseph_: any success on the WASM build issue? did you see my earlier message regarding this?
noonien645 has joined #openscad
noonien6454 has joined #openscad
noonien645 has quit [Ping timeout: 268 seconds]
lastrodamo has quit [Quit: Leaving]
lastrodamo has joined #openscad
To_Aru_Shiroi_Ne has joined #openscad
ToAruShiroiNeko has quit [Ping timeout: 268 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 268 seconds]
teepee_ is now known as teepee
ccox_ has joined #openscad
ccox has quit [Ping timeout: 244 seconds]
To_Aru_Shiroi_Ne has quit [Ping timeout: 240 seconds]
ToAruShiroiNeko has joined #openscad
emanuele6 has quit [Ping timeout: 240 seconds]
<Friithian> ow, well, it doesn't matter how rounded of edges you make if you just slam your entire arm into something
snaked has quit [Ping timeout: 245 seconds]
* J1A84 sends a TPU object damper
<Friithian> I've always wanted to try TPU
emanuele6 has joined #openscad
<J1A84> maybe require direct extruder (or try vase mode) .. TPU is nice .. stringing could be a problem so use a small nozzle also supports are not easy to remove
<J1A84> a nice feature is that thick walled object can be flame smoothed like  acetone and ABS
<J1A84> maybe start with a harder TPU  like 75D
<J1A84> TPU is nearly indestructible even in thin layers
<Friithian> I've heard good things about TPC-91A
<Friithian> I have access to a printer with 2 extruders with 1 having PVA On it so uspports aren't an issue
<J1A84> also a solder iron is your friend with tpu
<Friithian> urgh, one problem with this PVA is it sucks water out of the air like no other
lastrodamo has quit [Quit: Leaving]
Alexer has quit [Ping timeout: 240 seconds]
<J1A84> i keep all my filaments in sealed bags with desiccant
<Friithian> sadly these prints don't really support that sorta thing
J1A84 has quit [Quit: Client closed]
J1A84 has joined #openscad
<pa> Hi folks, question: does openscad have some function to return min/max?
<pa> out of a shape/module/mesh, more or less what cura does when it snaps to the printbed
<JordanBrown> Oh, wait, now I managed to parse what you asked.
<JordanBrown> You want the bounding box of an object.
<JordanBrown> No.
<pa> i guess i could reduce it to that if i could transform each individual points of an array and then search them in a for loop
<pa> as i have the geometry in an array
<JordanBrown> Oh, if you have the geometry in an array then some combination of min(), max(), and list comprehension should work.
<JordanBrown> For getting information about an object, somebody is working on it: https://github.com/openscad/openscad/pull/3956
<pa> yep, but i would want the min/max after the transformations i would apply to the module
<pa> so i guess i have to apply the transformations to each point individually
<JordanBrown> Yes. Not trivial, but not awful either.
J1A84 has quit [Quit: Client closed]
J1A84 has joined #openscad
<peepsalot> pa: you can try my library for transformation functions and bounds if working with point data: https://github.com/thehans/FunctionalOpenSCAD
<pa> thanks, checking!
<pa> question: how do i transform a point? do i have to write the function myself? it seems rotate/translate/scale do not work on arrays
<joseph_> teepee: Yes, I saw your message. Unexpectedly my planned work time was derailed by an urgent issue I needed to address. I will be coding over the weekend to make up for it. Do you know what dummy class I should be adding, or is this something I should scan the codebase for? I haven't compiled object-oriented code for WASM before so I'm new to this process
<J1A84> pa use multmatrix operations
<pa> thanks, checking!
<InPhase> pa: I have that written already in closepoints.
<InPhase> pa: See the accompanying function set: https://github.com/rcolyer/closepoints
<pa> ha, i must have missed that!
<InPhase> And the usage examples for using those Affine functions that make it convenient.
<pa> you have it indeed!
<J1A84> last example is with a vector .. same works with points
<InPhase> multmatrix if you want to do the same on geometries. The two can be combined. My functions could also be fed into multmatrix instead of operating on arrays with Affine.
<pa> InPhase: it would have been perfect if ClosePoints could also return the bounding box :-)
<J1A84> why do you need a bounding box?
<InPhase> Note that my functions do the 4x3 form, and handle that correctly in Affine and AffineMerge. multmatrix will also accept the 4x3 format. I edited the docs J1A84 linked to use the 4x4 form so that the multiplications work out directly, for educational purposes.
<pa> should be easy to add though
<pa> in case it doesn't start at the origin
<pa> to position the object
<pa> or maybe an option in closepoints to align to origin
<pa> or center
<J1A84> don't you know where your points start?
<pa> well, maybe i know where they start, but not where they end :-)
<InPhase> pa: I figured bounding boxes were known, but it would be straightforward to make a function that runs through a nested list of points and extracts a bounding box.
<InPhase> So far I've never needed a bounding box calculated when using that library, since everything is locked down to my math and thus I know where the critical points are from the starting definition. But this might be different with certain calculations.
<pa> well i have a curve that i use to position cross sections. I placed the beginning of the curve at the origin when i modeled it, but the rest of the curve is then somewhere else. Then the resulting geometry needs to be translated/rotated/scaled, so the bbox changes
<J1A84> you can use recursion .. or just  create a vector with all  x values .. then use max or min to find the max X and min X
<pa> yea i meant, would be cool if closepoints could even do this shift-to origin itself, but i guess it would also do the transformations internally, which begins to become messy
<J1A84> it is more difficult .. for a cube this would be easy, but for an irregular the question is which point you want at origin .. if the lowest (Z) is set to XYZ 0  .. the others are still in -X  or you want to move everything so all points are in + ..  like on a print bed   - but then there are print beds that have 0 in their center ..
<pa> i meant the bbox aligned to origin
<J1A84> so only positive  vectors
<J1A84> the bbox has 8 points .. i assume you want lower left front  to be at origin
<J1A84> or should it center .. how ever i can't see how this will help you .. but as said it is pretty easy to get this when you have the points of your object
<J1A84> just need the min of  all XYZ
<peepsalot> pa: did you look at my library? the whole point is that it defines rotate/translate/scale etc to work on arrays of points
<pa> i think bbox needs to go into a funciton
<pa> hmm, somehow bbox as function returns undefs https://pastebin.com/XSX5RHVB
<pa> hmm, somehow bbox as function returns undefs https://pastebin.com/XSX5RHVB
<pa> nvm
<pa> not that
<pa> yep works
<J1A84> could make a PR for closepoints
<pa> InPhase wdyt
<linext> i was thinking for the web STL customizer idea... why not use web assembly to let any of the web clients run the job and send the STL back to the server
<linext> anyone who keeps the tab open can help render the STL
<linext> AJAX can be used to sync between the server and clietns
<linext> that way, anyone who wants to be a server can pin the tab to be open
<linext> what dose BOINC mean
<JordanBrown> looks like it's Berkeley Open Infrastructure for Network Computing
<linext> i learned from a browser fingerprint tool that it's possible to tell how fast a computer is likely to perform
<linext> it can detect number of cores/threads
noonien6454 has quit [Quit: The Lounge - https://thelounge.chat]
noonien has joined #openscad
snaked has joined #openscad
<Scopeuk> boinc is the general perpose evolution of the old setia at home project
<Scopeuk> it does batch based distributed computing during machine idle time
<Scopeuk> seti at home **
<Scopeuk> does burp still run on it (the big ugly rendering project) ?
<Scopeuk> http://burp.renderfarming.net/ app[arently not
fling has quit [Remote host closed the connection]
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
fling has joined #openscad
califax has quit [Remote host closed the connection]
CuffLimbs has quit [Quit: see]
califax has joined #openscad
ali1234 has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
<pa> ok, next weird question: i now can calculate the bbox. Is there any way i could also extract the point(s) at a given minima/maxima on each axis?
<pa> i
<pa> 'd be fine with just one point that matches
<linext> netfabb free version can do all that
<pa> yea cool, but i have my project in openscad
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
<linext> the program admesh will do it too
<J1A84> you can search for a value or lookup for interpolation
<pa> J1A84: umh.. how? even more since i have nested arrays
<pa> i was wondering if it's possible to at least linearize them
<pa> hmm.. but i don't want to interpolate :-)
<InPhase> pa: Yeah, it's almost identical to how you would implement min and max themselves.
<J1A84> you sure need to put  the  points in a new array  ( these nested arrays are bit painfull which is why i use a loop number instead )
<pa> but i guess it shouldnt be needed
<InPhase> pa: Just you track two values, the min value and the coordinate of the min value.
<InPhase> pa: The implementation of this would require a tail recursive function.
<pa> InPhase: well, for min it's easy, i extract the coordinate, then call min(min(..))
<pa> but for tracking the specific vertex i'm not sure how to do it
<J1A84> you could use a function that loop through the points and result is the fit ><
Alexer has joined #openscad
<InPhase> pa: You rewrite min as a tail recursion. :)
teepee_ has joined #openscad
teepee has quit [Ping timeout: 268 seconds]
teepee_ is now known as teepee
<J1A84> https://bpa.st/ZTHA  pa
<pa> thanks, i tried something like this but it's not working.. i must be doing something wrong
<pa> although i'm passing the predicate as an argument
<J1A84> each i   will give you just the point
<pa> like: function zmin(v) = (v[2] == BBT[0][2]) ? true : false; echo("MIN", Find(shape, zmin));
<pa> and function flatten(l) = [ for (a = l) for (b = a) b ] ; function Find(pointarrays, expr) = [ for(v=flatten(pointarrays)) if(expr(v)) v ];
<J1A84> you calling zmin  not zmin()
<InPhase> pa: Protip: mymin(v, i) where i can be 0, 1, 2.
* J1A84 sings   ••• i can be everything i want ..
<InPhase> Also, write it properly. But that will take some practice. :)
<pa> hmm Find(hookG, zmin()) also doesnt work
<pa> err, shape i mean
<J1A84> the function works if i call it with a vector .. not sure what your "Find" does
<J1A84>  echo(zmin([0,0,0]));
<pa> function Find(pointarrays, expr) = [ for(v=flatten(pointarrays)) if(expr(v)) v ];
<J1A84> expr is  variable not a function
<pa> ah.. umh.. so i guess i can't pass functions to functions?
<J1A84> you can use literals  but still expr need to be defined  as such
<pa> J1A84: thanks! yep like that works now
<J1A84> Ü
<InPhase> pa: Here's a reference point. I reimplemented your BBox function recursively for only one pass through the data instead of 6. https://bpa.st/ARVA
<pa> Thanks, checking!
<InPhase> Oh, I guess 3 passes. But half as many at least.
<InPhase> I suppose I could do that all at once.
<InPhase> pa: There, 1 pass, down from original 6: https://bpa.st/TJRA
<pa> nice :) i don't understand that syntax very much yet, but happy it's possible to make it faster!
<InPhase> pa: However, the first version illustrates better what you'd need to do to track the coordinates of a point at each boundary. You would track an additional bit of data with that logic like: res[0][0] < pointarrays[a][b][0] ? boundarypoint[0][0] : pointarrays[a][b]
<InPhase> And thus make a boundarypoint array to pass along and return.
<pa> ah i think i get it now
<InPhase> pa: Note that the final value return happens: a >= len(pointarrays) ? res <-- Here
<InPhase> This is referred to as the base case.
<InPhase> This concludes our seminar on recursion 101. ;)
<pa> 😅
<pa> so then these points would have to be exported into the result array.. it gets a bit awkward
<pa> not sure you'd want to add it to your library?
<InPhase> I might add the BBox to the library. I probably wouldn't add the finding of points on the bbox.
<InPhase> I think that probably has low utility for most designs, and is more of an edge case thing.
<InPhase> I can imagine the BBox helping out people who used a lot of those affine transforms though, and then want to conveniently make a corresponding regular scad geometry to align with it.
<InPhase> It could be easy to lose mathematical track of what your bbox is if you did a lot of 3D transforms. We might as well just be able to extract the exact values, and not estimate it algebraically, since the points are all sitting there. So this was a pretty solid suggestion.
<InPhase> I've not needed it, but, I could imagine it being handy.
<linext> pymesh is an alternative to openscad that might be more suitable for whatever you're trying to do
<InPhase> Hmm. PyMesh looked like it might turn into a useful competitor. It has a lot of features, although might not yet be as convenient to work with for geometry creation. However it seems development stalled out 2 years ago.
<InPhase> The core developer got promoted at Adobe, and stoppped working on it, it seems.
<InPhase> I suppose Sr. Research Engineer is taking more time than Research Engineer. :)
<InPhase> pa: BBox is now part of closepoints on github.
fling has quit [Remote host closed the connection]
teepee has quit [Read error: Connection reset by peer]
aiyion has quit [Read error: Connection reset by peer]
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
fling has joined #openscad
aiyion has joined #openscad
teepee has joined #openscad
aiyion has quit [Remote host closed the connection]
GNUmoon2 has joined #openscad
aiyion has joined #openscad
<pa> InPhase: Thanks!! \o/