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
<linext> from openscad.fonts.js
<linext> i'm making a customizer creation form and am having a spot for any dependencies
califax has quit [Ping timeout: 258 seconds]
ur5us has quit [Ping timeout: 244 seconds]
teepee has quit [Ping timeout: 258 seconds]
califax has joined #openscad
teepee has joined #openscad
ur5us has joined #openscad
J1A8474 has joined #openscad
J1A84 has quit [Ping timeout: 252 seconds]
ur5us has quit [Ping timeout: 244 seconds]
ur5us has joined #openscad
Guest1133 has joined #openscad
Furor is now known as Haematophage
teepee has quit [Quit: bye...]
teepee has joined #openscad
ur5us has quit [Ping timeout: 244 seconds]
snaked has joined #openscad
Guest1133 has quit [Quit: Client closed]
fling has joined #openscad
fling has quit [Ping timeout: 258 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
ur5us has joined #openscad
hrberg has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
hrberg has joined #openscad
pbsds has quit [Ping timeout: 244 seconds]
<gbruno> [github] MichaelAtOz opened issue #4369 (Please Ignore: Test issue for Bourtysource integration tool) https://github.com/openscad/openscad/issues/4369
ur5us has quit [Ping timeout: 244 seconds]
kwikius has joined #openscad
ur5us has joined #openscad
ccox_ has quit []
ccox has joined #openscad
<gbruno> [github] kwikius edited pull request #4367 (ModuleLiterals: making openSCAD modules first class.) https://github.com/openscad/openscad/pull/4367
<gbruno> [github] kwikius edited pull request #4367 (ModuleLiterals: making openSCAD modules first class.) https://github.com/openscad/openscad/pull/4367
ur5us has quit [Ping timeout: 248 seconds]
<kwikius> teepee: ModuleLiterals PR. Args not looked up https://github.com/kwikius/openscad/issues/4 .
<kwikius> Arguments to modules seem to work ok, so my way forward would be too hack functions to make them look like modules from that viewpoint e.g give  some sort of scope body to the function. However afaik most of functions work is yours so do you want to (informally) assign yourself to this issue to avoid me hacking about with your work?
<kwikius> If not I'll start up the chainsaw :]
<kwikius> ModuleLiterals PR  issue5 https://github.com/kwikius/openscad/issues/5
<kwikius> A syntax that bison accepts without complaining, wrap expr in brackets
<kwikius> ar = [ module cube(10)];
<kwikius> (ar[0])(); // instantiate the module in the expression
<kwikius> and of course
<kwikius> ar = [ module cube];
<kwikius> (ar[0])(10);
kwikius has quit [Quit: Client closed]
pa has quit [Ping timeout: 268 seconds]
pah has joined #openscad
kwikius has joined #openscad
pbsds has joined #openscad
pbsds8 has joined #openscad
pbsds has quit [Ping timeout: 268 seconds]
pbsds8 is now known as pbsds
snaked has quit [Remote host closed the connection]
snaked has joined #openscad
snaked has quit [Ping timeout: 268 seconds]
tachoknight has joined #openscad
<DenKn[m]> how i could produce rounded edges in 3d? in 2d i would use offset. minowski seems not to work with fillet ronding.
<J1A8474> minkowski will reduce a fillet .. so it need to be bigger
<J1A8474> however  if you go from 2D to 3D via extrusion you can take the rounding with you.
<J1A8474> DenKn[m] it depends what part you want to have rounded  there are libraries to create fillets via hull .. but that is not very performant but still better than multiple minkowski differences
kwikius has quit [Quit: Client closed]
<InPhase> DenKn[m]: The simplest way with minkowski is to do a difference from a large cube, minkowski that, then do a difference again to invert it again.
<InPhase> DenKn[m]: But for common shapes there is almost always a much more performant approach.
<InPhase> DenKn[m]: If you show the shape, then we can advise on the specific case.
<J1A8474> btw is  offset extrude going anywhere?
<InPhase> I vaguely remember that one dying in a storm of "wouldn't it be nice if".
<InPhase> Or at least, stalling in said storm.
<InPhase> Namely that its primary utility of really solving problems exactly like this one seems to be taking a function literal for the offset. But concurrent with that there were some edge case issues it hit when the offset goes negative and pieces start disappearing, but then you have to tesselate sensibly.
<InPhase> Thus roof became the temporary bypass of this problem.
<InPhase> The simpler definition of it allows avoiding the hard parts.
<J1A8474> i wonder if the roof issue with $fs size you be circumvented  if i scale everything ×100  and after by ×.01
<InPhase> I hope not. ;)
<InPhase> That would be indicative of a mess somewhere.
<J1A8474> funny  it does
<J1A8474> but  the mesh not closed error comes up when reducing it back to normal size
<J1A8474> so  not a solution
<J1A8474> but  i don't like that  an object is fine and if  scaled down you get "mesh not closed"
<J1A8474> weird ..  scaled .1 works but scaled 1 causes fast-CSG error
<DenKn[m]> i produce uncommon shapes mosty. plot 3d mathematic functions. eg round body positional and size = x^2 laid extruded on a circle. there should be a hole for a screw head. minowski shoucd work in this case, but if i would add a mounting, these tend to break, so a fillet would be usefull. this mountig could have an other angle than 90deg.
<J1A8474> now i gonna  just scale the shit of objects
<DenKn[m]> it seems to be tricky, because for the screw hole, there shouldnt be a fillet.
<J1A8474> i just added a nice screw hole module to my library
<J1A8474> (you can choose a smaller bottom chamfer and bigger top)
<J1A8474> however DenKn[m] you add the hole after the minkowski not before
<J1A8474> DenKn[m] maybe you can add some images to the problem - i am not sure i understand what your issue is here
<DenKn[m]> the hole is countersunk and should be smoothed
<J1A8474> minkowski will do that .. you  may need to use a small sphere and a bigger hole
<J1A8474> DenKn[m]  can you describe what is not working ?
<InPhase> DenKn[m]: Oh, well if you're comfortable with 3D mathematical functions driving shapes already, you can potentially solve these problems with better mathematical functions. This is a method I routinely use for this problem, but that I find it hard to get others to adopt because they freak out at the math.
<InPhase> DenKn[m]: If you can show an image and/or specific code I might be able to offer a suggestion if you don't see how to do it for a particular case.
kwikius has joined #openscad
<DenKn[m]> i ask, because, i was thinking about it, i'm not at home, yet. the hole is not part of the func, it is only subtracted from my shape. raindrop with a hole with rounded edges and a mounting.
kwikius has quit [Quit: Client closed]
<DenKn[m]> i'm ok with a rounded spike at the top of the raindrop. this was my first question i had because of something like minowski
<DenKn[m]> thank you, i will try it later :)
<J1A8474> i feel like https://quickdraw.withgoogle.com/  or craiyon
<InPhase> DenKn[m]: I used minkowski a lot in my early designs, in the first year or so. I almost never use it in designs now, and consistently find another solution that's much faster.
tachoknight has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<DenKn[m]> InPhase: i'm from the opposide direction. I used only simple shapes, tried to use simple 3d-objects, but now, I have a more complex shape. my computer is faster than I could figure out the function to describe my needs.
<InPhase> I've always been somewhat obsessed with smooth curvy 3D models.
teepee_ has joined #openscad
<InPhase> I like good ergonomic features, minimizing rough edges, and making parts that sort of slip together with self-guiding curves and such.
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
J1A847464 has joined #openscad
J1A8474 has quit [Ping timeout: 252 seconds]
<DenKn[m]> I think, I could do it in two steps: I only use minowski for small parts, made by intersection with a cube, than reunion with the hole part, except the minowski-welded part
<DenKn[m]> minowski is really slow.
<DenKn[m]> InPhase: could you show me some things?
Colere has joined #openscad
Haematophage has quit [Ping timeout: 265 seconds]
Furor has joined #openscad
Colere has quit [Ping timeout: 250 seconds]
<InPhase> DenKn[m]: What would you like to see?
kwikius has joined #openscad
<DenKn[m]> something which has a unusual shape for example, which you have tried without minowski to have a smooth curvy 3d model
<DenKn[m]> one of your examples has `roof()` which my openscad does not understand
<InPhase> I've never used roof in a release.
<InPhase> https://www.thingiverse.com/thing:3949417 Here's a nice smooth button with no minkowski.
<othx> InPhase linked to "Customizable Smooth Button by rcolyer" on thingiverse => 1 IRC mentions
<DenKn[m]> nice idea! a button! never thought about to print one (or more)
<InPhase> https://www.thingiverse.com/thing:3024518 This has no minkowski.
<othx> InPhase linked to "Ceiling Light Cover / Ceiling Lamp Globe by rcolyer" on thingiverse => 5 IRC mentions
<InPhase> https://www.thingiverse.com/thing:2392399 No minkowski here either.
<othx> InPhase linked to "Customizable Rippled Chalice / Vase by rcolyer" on thingiverse => 6 IRC mentions
<InPhase> The chalice is perhaps extra interesting because there was a point at the top smoothing out the lip where a minkowski would have been a natural choice. But I resolved it by adding a conditional on the formula defining the surfaces and flipping over to a rounding function.
<InPhase> It required a bit more thinking as it was the first time I had done that particular solution. But then it worked very well once complete.
<InPhase> I never even printed that one, and was just in it for the design. :) But someone else posted a make of it.
<InPhase> The most amusing remix was this one, where someone scaled it down so far that none of the carefully designed features were even visible in the print. :) I had a good chuckle when I first saw that. https://www.thingiverse.com/thing:5396094
<othx> InPhase linked to "White Hat Paladin Oath of Throwing it Back Miniature by micahfk" on thingiverse => 1 IRC mentions
<InPhase> DenKn[m]: If you have any questions about any of them, let me know. I'll see what I can remember. :)
kwikius has quit [Quit: Client closed]
<DenKn[m]> ok, I've commited my files to my git-server https://git.denkn.at/deac/3d/src/branch/master/frontlampe3.scad
<J1A847464> DenKn[m]  i would use rotate_extrude for that
<J1A847464> but  a hole in a slanted surface is tricky
<J1A847464> you also have d=0 in your script
<DenKn[m]> J1A847464: this is not a round shape.
<DenKn[m]> it is possible to generate a png in openscad?
<J1A847464> yes just export image ..  or ctrl+shift+c  to copy
<J1A847464> but wouldn't it be nicer if you fill the hole with a plug and cover the screw?
<DenKn[m]> A plug would be a nice idea. But I didn't thought about, how to design a plug, which holds in it.
<DenKn[m]> https://niob.denkn.at/frontlampe3.png < here, you could see, the shape is a little bit rounded.
<gbruno> [github] jbinvnt synchronize pull request #4330 (GSoC 2022: 3D Viewport Graphical Enhancements ) https://github.com/openscad/openscad/pull/4330
<gbruno> [github] kwikius synchronize pull request #4367 (ModuleLiterals: making openSCAD modules first class.) https://github.com/openscad/openscad/pull/4367
kwikius has joined #openscad
<J1A847464> DenKn[m] https://imgur.com/a/Cp15HnI  here is your hole with minkowski
<J1A847464> you could skew the rotate_extrusion and scale ..  you sounded like this doesn't need to be exact fit
<J1A847464> a plug will hold if you just use a .2mm smaller intersecting cylinder ..   you could make some  latch in it but then you never get it out
kwikius has quit [Quit: Client closed]
<joseph_> teepee: I just saw in my GSoC dashboard that the final submission date is now set to Oct 23rd. It looks like the additional extension was processed after all. From my perspective this is okay. Anyway the changes I made yesterday cleaned up the example shader names and added a popup box if there is a shader compilation error. As for preparing the final report, I looked at the format of the 2020 GSoC submission for OpenSCAD and I
<joseph_> can use that as an example.
<teepee> joseph_: that's strange, I got email from Sean confirming that he did not change it
<teepee> yes, final report would be nice following last years reports in github. the issues have the GSoC Tag
<teepee> or Label
<DenKn[m]> <J1A847464> "a plug will hold if you just use..." <- my experience with such plugs are bad. and latches do not hold long enough. i thought about tpu for that.
<DenKn[m]> 0.2mm are not enought, i couldn't plug in. 0.24mm for leds (they fit perfect, do not slip out anymore), 1.5*0.24mm for 3d printed object in printed objects (with my test-printers).
<J1A847464> the plug will just cover the screw ..  but tpu will work too.  But you can design a plug with spring loaded ratches
<J1A847464> make it a little cone and you get a nice fit
<J1A847464> clearance always depends on the calibration of your printer .. e-steps etc.
<J1A847464> also how you slice ..  but whatever works for you
<teepee> joseph_: yes, I see October 17, 2022 – October 24, 2022 which is 2 weeks more so it's not matching anything discussed, I think that would be the 18 weeks version
<J1A847464> when i make a 8mm hole a 7.8mm plug fit nicely and tight
<J1A847464> or you make it smaller and use some hotglue
kwikius has joined #openscad
<DenKn[m]> <J1A847464> "DenKn https://imgur.com/a/..."; <- you have rendered the hole code? it takes so long, i try to optimize it.
<J1A847464> reduce the resolution axial and radial to speed up .. also use fastCSG with SCAD version 22.
<J1A847464>  e.g.  you can cut out the  hole section and only run minkowski there
Furor is now known as Colere
epony has quit [Quit: QUIT]
<DenKn[m]> i work on a cut out of the hole section. I put the whole object to module and intersect with a cube, where i could run minkowski.
<DenKn[m]> how i could shrink my object by Xmm on every surface? I could generate the object smaller, but I want to have it a little bit handier
<J1A847464> didn't you generate this parametric so just  remove  Xmm .. in the end  you also could just move that part xmm in z  it is not exact but  will  probably work fine for the small area around the hole ..   another approach would be a  rotated /scale/scewed  fillet that round the hole
<J1A847464> like this https://imgur.com/a/XWwZQE9
<kwikius> teepee:ModuleLiterals The r-value reference issue is fixed.  Now you can do:
<kwikius> ar = [module sphere];
<kwikius> (ar[0])(d =20,$fn = 50);
<kwikius> IOW just wrap the r-value module_referencein brackets
<kwikius> the part in brackets can be any arbitrary expr
ur5us has joined #openscad
<teepee> that pretty obscure
<kwikius> teepee: Well, it works , but feel free to do a PR on a nicer syntax that works..  Are you interested in looking into the arguments lookup issue https://github.com/kwikius/openscad/issues/4. Othrwise I will have to hack about in a heavy handed way
<kwikius> How do I get a context . I want to get/ create the defining context for the module_literal, but I can't figure out how that works?
<InPhase> DenKn[m]: Okay, so the core problem is you want to essentially chamfer the screw hold that's going into that teardrop shape?
<InPhase> s/screw hold/screw hole/
<DenKn[m]> InPhase: yes.
<InPhase> I believe this is achievable... Let's see here.
<kwikius> Oh This works , by accident, but I can easily kill that if necessary
<kwikius> ar = ["cube"];
<kwikius> (ar[0])([10,20,30], center = true);
<DenKn[m]> if i would print many spheres, the solution would be bad as minkowski.
epony has joined #openscad
<DenKn[m]> i could use convex-shapes, extrect them by the same function my shape. I can calculate the points on the edge and i can caldulate the middlepoint. but this needs many time.
Non-ICE has joined #openscad
<DenKn[m]> extrude, not extrect. needs many develop time
<DenKn[m]> an other idea: a variant of an union()-module, which detects the intersection and allowes a rounded passage
<InPhase> DenKn[m]: https://bpa.st/ORBQ
<DenKn[m]> this is not rounded, only linear? a cylinder well placed?
<InPhase> I did linear. Rounded is doable too.
<J1A847464> ist wohl irgendwas fürs Fahrad
<DenKn[m]> thanks for your inspiration and advise with a good example! ;) I think, I need to learn ClosePoints for that.
<DenKn[m]> J1A847464: yes a frontlight.
<InPhase> I will try a rounded version for fun.
<J1A847464> you could try to take the hole center and points with antiproportional distance will be moved down (z) .. that will smooth them around that hole
<kwikius> Oh . So this actually does work
<kwikius> f1 = function (size) module (size) {cube(size);};
<kwikius> (f1())([5,10,55]); // outputs the cube
<kwikius> Scope issue I think
<InPhase> DenKn[m]: https://bpa.st/DCTA
<InPhase> DenKn[m]: Now here's the really cool part... After doing "Design, Flush Cache" for a fair comparison, your design previews on my system in 10.9 seconds. My modification, smoothing it out more and adding that well rounded edge, previews in 3.2 seconds. It got faster!
<DenKn[m]> wow, that's impressing. I understand the difference between our implementations. my has to render each slice twice, you only calculate any point and ClosePoints calculates all surfaces between points, which are close enough.
<DenKn[m]> I do not understand, how ClosePoints decide which points are close.
<InPhase> It's not close as in "the ball is getting close to my head". It's as in "close the door!"
<InPhase> The module requires the points be arranged in a particular pattern, clockwise loops around the surface if you are looking in the direction that these loops go.
kwikius has quit [Quit: Client closed]
<InPhase> And each loop around the surface must have the same number of points.
<InPhase> It uses these constraints to have an easy time drawing in all the triangles to close them up as a volume.
<InPhase> But then as long as you follow those simple rules, you can just sort of trace out the outline in a for loop, and you get your surface.
<InPhase> And so if you have for loops that work on points, you can just do math on those points at arbitrary spots, like I did to make them dip down.
<InPhase> If you think of it as a 2D array of points, ClosePoints draws two triangles between the square outlined by the 4 points a[i][j], a[i+1][j], a[i+1][j+1], a[i][j+1].
<DenKn[m]> interesting. I think about the "same number of points" (each loop). If I want to generate a square to a 3-sided pyramid (with a spike on the left), the pyramid has only one point on the left, while the square has initialiy 4. so I have to set the 4 points in the spike?
<InPhase> Well the points may not overlap.
<InPhase> But you can hide them wherever you want along an edge.
<InPhase> Just be mindful that it will determine the resulting shape.
<InPhase> Because of where it will draw the triangles.
<InPhase> To make a square go smoothly into a triangle, you'll want a lot more than 3 or 4 points. :)
<InPhase> If you want to split one side of the triangle to meet up with the 4th point, then you'd put your 4th point in the middle of that edge.
<DenKn[m]> of course, I only tried to think about it, to understand it.
<InPhase> So you have to think about such things, but you also get a lot of control from that recipe.
<InPhase> And, I think it's a pretty easy system to get used to, compared to the general complexity of specifying a polyhedral shape.
<InPhase> Very often I find myself making morphed circles, or hemicircles, and things like that, so your "odd" shape was actually a familiar pattern. I didn't care about the actual teardrop shape, and just stole your parameters verbatim, and it emerged on the first try. (Well, second after a I made a parentheses typo.)
<DenKn[m]> Yes, I thought about a polyhedral shape, if it could be easy enough. many different loops. And the surface of my drop has mostly simple squares.
<DenKn[m]> your code is understandable for me, because you used the same structure. You transformed the modules to functions with the same functionality.
<InPhase> Yep. It fit right in there, as you were already using the same reasoning.
<InPhase> I didn't hammer my code to fit yours. Yours fit how I usually do this. ;)
<DenKn[m]> Thank you, I think, I have understand it mostly. I think, I will try it, too. For another light. https://git.denkn.at/deac/3d/src/branch/master/steffis_frontleuchte2.scad
kwikius has joined #openscad
<InPhase> One weird part if you try to get all the math might be the 0.9 in "0.9*devscrewhead_chamfer". That's an aesthetic hack because going straight vertical on those surface tesselations gives you weird edge effects. It looks nicer to break the smoothness at that spot with a slight angled edge hidden in the hole, rather than to have weird vertical parts without a clean edge ring. You could remove it to see.
kwikius has quit [Client Quit]
<InPhase> That's the price of the whole thing being a grid that goes up and down, rather than actually being laid out in a circular pattern around the hole. There would be other ways to try to get such a circular pattern if it really mattered, but this was a pretty good result I think.
<DenKn[m]> I will try it with and without 0.9. But today, I will not work on it anymore, it's late.
<InPhase> Almost dinner time here! I assume you are in Europe, in which case goodnight. :)
<DenKn[m]> So, you are somewhere in america. Thank you, have a nice dinner.
snaked has joined #openscad
kwikius has joined #openscad
kwikius has quit [Client Quit]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
epony has quit [Ping timeout: 252 seconds]
<InPhase> DenKn[m]: While munching on my dinner, I hit render on the design, and it had a render fail. I checked, and it was because y(i) goes to 0 at i=1, and it's a violation to try to make a diameter 0 hemicircle, as you end up with a bunch of points all at the same point, and 0 width faces between them.
<InPhase> DenKn[m]: Adding 0.001 to the definition of y(i) resolves it.
tachoknight has joined #openscad