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
J1A8430 has joined #openscad
J1A84 has quit [Ping timeout: 244 seconds]
<peepsalot> teepee: ok, cool
<peepsalot> I had to step out for a bit, but yeah I was working on migrating over to clipper2. That had me looking where libsvg applies offset to paths for stroke width, then got thinking about refactoring libsvg to track and apply transforms to $fs.
<peepsalot> Basically keeping a stack of transformation matrices, a bit like old OpenGL does
LordOfBikes has quit [Ping timeout: 250 seconds]
LordOfBikes has joined #openscad
<teepee> peepsalot: I'm thinking ideally all the mesh conversion would go into the openscad side of things with the library only reporting the logical structure
<teepee> right now it's a bit mixed up
<teepee> that could then allow more interesting things like "embed svg" which inlines the svg stuff converted to scad code
J1A8430 has quit [Quit: Client closed]
J1A8430 has joined #openscad
LordOfBikes has quit [Ping timeout: 250 seconds]
teepee_ has joined #openscad
<peepsalot> yeah, agreed. not sure I'm ready to completely refactor it though, but was thinking of it as a sort of step halfway towards ideal
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
<teepee> that's fine, just in case there's some opportunity to move a bit into that direction :)
noonien has quit [Ping timeout: 246 seconds]
LordOfBikes has joined #openscad
ur5us has quit [Ping timeout: 250 seconds]
neur0 has quit [Remote host closed the connection]
neur0 has joined #openscad
<JordanBrown[m]> In C++, "auto" is very convenient, and I understand why it can be pretty much necessary in templates, but so far in ordinary usage I dislike it because it makes it harder to figure out what type a variable is.
teepee has quit [Quit: bye...]
ur5us has joined #openscad
teepee has joined #openscad
ur5us has quit [Ping timeout: 250 seconds]
fling_ has joined #openscad
fling has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
fling_ is now known as fling
fling has quit [Remote host closed the connection]
fling has joined #openscad
fling has quit [Ping timeout: 258 seconds]
fling has joined #openscad
stevieh has joined #openscad
stevieh has quit [Quit: Leaving.]
stevieh has joined #openscad
epony has joined #openscad
ur5us has joined #openscad
<Scopeuk> It leaves you depending on the ice, personally I only like to see it where it's possible to infer type comfortably from the assign, iterators in range based for as a prime example
<Scopeuk> S/ice/ide
ur5us has quit [Quit: Leaving]
<JordanBrown[m]> makes sense
stevieh has quit [Quit: Leaving.]
<WenxuanZhao[m]> I couldn't download openscad in debian
<teepee> WenxuanZhao[m]: what did you try exactly? install the included version via apt?
ccox_ has joined #openscad
ccox has quit [Ping timeout: 250 seconds]
epony has quit [Ping timeout: 252 seconds]
epony has joined #openscad
epony has quit [Remote host closed the connection]
epony has joined #openscad
castaway has joined #openscad
linext_ has joined #openscad
linext has quit [Ping timeout: 272 seconds]
<Bram[m]> <J1A84> "RoyK the simplest clip is a C..." <- Is that just an extruded text("C") ?
epony has quit [Ping timeout: 252 seconds]
epony has joined #openscad
<J1A8430> no,  C from text are often not circular
<J1A8430> Bram[m] it is rotate_extruded
<J1A8430> they are  just called  c clip because they look like a c
califax has quit [Remote host closed the connection]
fling has quit [Remote host closed the connection]
neur0 has quit [Remote host closed the connection]
neur0 has joined #openscad
califax has joined #openscad
fling has joined #openscad
<Bram[m]> <J1A8430> "no,  C from text are often not..." <- Could you share the openscad code of your clip in that imgur picture?
<J1A8430> sure it is part of the ub.scad lib
<J1A8430> library!
<J1A8430> libraries!
<J1A8430> it is  Cring(help=1);
<RoyK> rotate_extrude($fn=100, convexity = 10, angle=210) translate([12, 0, 0]) square([3,3]);
<RoyK> that looks like a c clip
<J1A8430> yea the lib allows to  give  the inner diameter and rounded ends etc..
<Bram[m]> Thanks!
<RoyK> rotate_extrude($fn=100, convexity = 10, angle=210) translate([12, 0, 0]) circle(3);or perhaps rotate_extrude($fn=100, convexity = 2, angle=210) translate([12, 0, 0]) circle(3);
<RoyK> rotate_extrude($fn=100, convexity = 2, angle=210) translate([12, 0, 0]) circle(3);
<J1A8430> you also can have Schlaufe(r=3,r2=10,l=13,grad2=45,end=true)Quad(5); for https://imgur.com/JxpL5dc
<J1A8430> RoyK iirc convexity=2 is default for rotate_extrude
<RoyK> ah
<RoyK> erm - I used rotate_extrude
<RoyK> and yes - well - I've never understood what convexity is anyway
<J1A8430> RoyK  convexity is just for preview to get a correct image you tell how many times  the light ray enters a surface of a volume ..  and  for rotate_extrude rings there is 2
<J1A8430> higher number need more calculations .. lower number can give wrong images
epony has quit [Ping timeout: 252 seconds]
epony has joined #openscad
<RoyK> J1A8430: thanks
stevieh has joined #openscad
J1A8430 has quit [Quit: Ping timeout (120 seconds)]
J1A8430 has joined #openscad
teepee_ has joined #openscad
fling has quit [Remote host closed the connection]
fling has joined #openscad
<JordanBrown[m]> But except for extremely complex models, convexity=10 has basically no performance effect and is enough for most models.
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
<J1A8430> i assume the reason for that is that you don't reach the limit..  if you have  twisted extruded triangles you will notice a diff
<JordanBrown[m]> Did you mean that you will see a performance impact, or that you will see a need for higher convexity?
stevieh has quit [Quit: Leaving.]
<J1A8430> there are about 20-30% performance impact for convexity >1
<JordanBrown[m]> Could you supply an example? I tried some pretty complex models, and didn't see much. (I don't remember the details, but I was working primarily with the Menger Sponge example.) How did you measure the performance impact?
<J1A8430> here https://bpa.st/U5JQ
<J1A8430> just flush cache after each change
<J1A8430> sometimes i get over  double the time
<JordanBrown[m]> What are you measuring? The reported "Total rendering time", or something else?
epony has quit [Remote host closed the connection]
epony has joined #openscad
<J1A8430> yes rendering time .. but seems the more complex it gets the bigger the spread  in render time  differences also without change
<JordanBrown[m]> I'm not seeing any different in reported rendering time, even as I set convexity to 100.
<JordanBrown[m]> I think I *do* see some additional time at one of the steps, but it doesn't seem to be included in the reported time.
<JordanBrown[m]> And a convexity=100 rotating is really sluggish, but I don't know how to measure that. (Perhaps we could add a frames-per-second meter.)
<JordanBrown[m]> CSG Products Generation seems to slow down, but again it's not included in the reported time.
<J1A8430> not so sure this test measurement is resilient ..   on a simple object i got the 20% more when using >1  but   with more complex the fluctuations are bigger than the difference between 1 and 10
<JordanBrown[m]> ... which suggests to me that, independent of all else, we need to report a more complete time.
<JordanBrown[m]> I shouldn't be trying to do performance measurements since I'm doing a build in another window, but that object was coming in between 45 and 70ms, regardless of the setting of convexity.
<J1A8430> maybe it uses more memory .. so we should performe such test on a low end computer  Ü
<JordanBrown[m]> My desktop is pretty low-end for everything *but* memory. It's from 2013 and was cheap then. However, I have upgraded it to 28G, so not low-end there.
<JordanBrown[m]> My laptop only has 8G, IIRC, but is in the bedroom with the sleeping wife :-)
<JordanBrown[m]> And you're talking about F5 speed, not F6 speed, right? My understanding is that it doesn't affect F6 speed at all.
<J1A8430> yes convexity should not have any influence for render
<J1A8430> on render
epony has quit [Ping timeout: 252 seconds]
epony has joined #openscad
JordanBrown has quit [Quit: Few women admit their age. Few men act theirs.]
califax has quit [Remote host closed the connection]
califax has joined #openscad
JordanBrown has joined #openscad
<InPhase> J1A8430: I do notice a slight performance difference in display navigation with convexity of 10, but both are very responsive for me.
<InPhase> There is zero measureable difference in preview time.
<InPhase> Although convexity of 1 basically just displays giant holes in the model making chunks of it transparent, so this is a useless setting.
<JordanBrown[m]> InPhase try setting convexity to 100 or so, and then *watch* the progress. See if you see a delay at CSG Products generation.
<JordanBrown[m]> I seemed to be seeing a delay there that was not reflected in the render time reported.
<InPhase> Same preview time down to the millisecond. We're ranging between 0.020 and 0.023 with flushing cache.
<InPhase> (Not sure if cache matters here or not, but I flushed anyway as instructed.)
<JordanBrown[m]> No, don't look at the reported time. Watch the progress as it runs and see if you *see* a delay.
<InPhase> Rotating the display is discernibly sluggish, at about 7 FPS with convexity=100
<JordanBrown[m]> How are you measuring the FPS?
<InPhase> Oh, wall-clock time. Let's see.
<InPhase> FPS I'm measuring by counting jumps while looking at my watch. I can do it for 7, but not for high speeds. :)
<JordanBrown[m]> You can count seven ticks per second? Better than me :-)
<InPhase> Physicist superpowers I guess. ;)
<JordanBrown[m]> Might be worthwhile to add some instrumentation.
<JordanBrown[m]> I guess so.
<InPhase> Yeah, View, Enable FPS would be a good feature.
<InPhase> That could be an issue. Medium hanging fruit.
<JordanBrown[m]> Though putting it on a menu might be too prominent - noise for everybody, benefit for few. Preferences somewhere maybe.
<InPhase> Oh, there is an extra wall clock delay for preview with convexity 100.
<JordanBrown[m]> Or one menu item for all diagnostic / development / debugging stuff.
<InPhase> It discernibly pauses after "Compiling design (CSG Products generation)..."
<JordanBrown[m]> Yep.
<InPhase> A little too fast for me to reliably measure, but clear.
<JordanBrown[m]> You need to get a slower computer.
<InPhase> lol
<InPhase> I'm going to try timing a terminal run to image save.
<peepsalot> convexity affects frame rendering time, which I'm not even sure is included in the F5 preview compile time. also you have to perform at least a difference or intersection for it to apply iirc
<JordanBrown[m]> When you say "frame rendering time", you mean the time it takes to respond to, say, rotating the view, right?
<JordanBrown[m]> We're seeing that it also affects the time to complete the F5, though it's apparently not included in the "total rendering time".
<peepsalot> yes, rotating the view, updating the image on screen
<JordanBrown[m]> Right, definitely affects that. Also affects F5 time.
<InPhase> Running script to measure the time difference with some stats.
<InPhase> s/script/a script/
<peepsalot> ah, yeah external measurment sure. it has to display at least single frame in that case. 'not included in the "total rendering time".' is what I was trying to say
<peepsalot> ie you don't get any of that info from OpenSCAD's Console
<JordanBrown[m]> So you are thinking that what we are seeing is the cost to render the first frame?
<InPhase> convexity 1: 0.4141 +/- 0.0034, convexity 100: 0.6090 +/- 0.0029
<peepsalot> yes, convexity is a variable that is purely for OpenCSG library, which only has some effect to OpenGL code
<InPhase> Those +/- are uncertainty of the mean over 100 measurements.
<InPhase> So a clear difference.
<JordanBrown[m]> Those are the total execution times, including starting the program?
<InPhase> Correct, console run.
<InPhase> So only the difference between the two is informative for what convexity 100 has added.
<InPhase> It is also including an output of a png file, but I'm assuming this is roughly identical time.
<InPhase> This difference has the right scale though, because about 0.2s feels right for the scale of that pause I'm seeing on my system when running in the gui.
<JordanBrown[m]> Right. Those measurements seemed small, compared to what I was seeing (with my eyes), but (a) you have a faster computer than I do, and (b) I was watching it interactively, so was *not* seeing application startup costs, so the cost of the convexity is relatively higher.
<JordanBrown[m]> I believe it.
<InPhase> The delay is fast enough for me to perceive, but not fast enough for me to have a conscious "it paused here" thought.
<InPhase> Conscious response is 0.3s. :)
<InPhase> Trained reflexes and such are about 0.1s, so right in that window.
<InPhase> s/fast enough/slow enough/g
<JordanBrown[m]> I want a tool that deeply analyzes C/C++ dependencies and tells you "you're unnecessarily including this header file". I'm tired of the world rebuilding every time I touch some of the header files.
<JordanBrown[m]> Mind you, I don't know that such a tool is *possible*. But I still want it.
<InPhase> JordanBrown[m]: And ideally one that tells you, "Looks like you need this because you did something stupid that you could fix."
<JordanBrown[m]> yes
fling has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
fling has joined #openscad
TIBL has joined #openscad
<TIBL> it is crazy hard to make an interesting video about openscad ( https://www.youtube.com/watch?v=JEZEtzm3Y3o ) yeah I am trying
<othx> TIBL linked to YouTube video "Improving the Rigidity of the Motor Mount - TEmPO Printer Build [Ep. 3]" => 1 IRC mentions
<TIBL> everyone out there just thinks openscad is boring and tedious
<TIBL> also I am probably doing everything wrong, heh
stevieh has joined #openscad
stevieh has quit [Quit: Leaving.]
epony has quit [Ping timeout: 252 seconds]
<Scopeuk> I think there is an element that's with cad openscad is such a different approach that there is a different set of people it really clicks with compared to regular cad
epony has joined #openscad
<Scopeuk> that and people are conditioned that typing == old, point and click == modern
<TIBL> well it is actually much more tedious, unless I am just a moron
<TIBL> the changes I made in that video took hours (I left the clock on) and it would take probably 10 minutes in fusion
<peepsalot> JordanBrown[m]: there is a project: Include What You Use, AKA IWYU, which I have actually tried, but ran into a dumb include cycle issue that I couldn't work around
<Scopeuk> it can be slower, certainly for some operations, in particular fileting etc is trivial in point and click cad. if your trying to punch 5000 odd shaped holes through a shape openscad will probably get you there in 1 or 2 for loops where point and click will be tedious
<TIBL> point and click cad has "for loops", as far as I know, sorta. they have modifiers which allow you to repeat something
<JordanBrown[m]> Especially when you then want to change the size of all of those 5000 holes.
<JordanBrown[m]> Or have some holes be 2x as big as others, and when you change the reference they all change.
<Scopeuk> TIBL yes I'm aware that fusion has some pragmatic control, and back tracking, people seam to rave about the timeline stuff
<JordanBrown[m]> InPhase thanks
<peepsalot> JordanBrown[m]: I should say, I tried it specifically on openscad
<JordanBrown[m]> Oh, sorry, thanks peepsalot.
<JordanBrown[m]> For that particular loop case I would think that pragma once would be the key thing, but maybe there are other header files that use the old-style guards.
<peepsalot> idk, good luck, maybe CGAL header weirdness has improved since I last tried
JordanBrown_ has joined #openscad
JordanBrown has quit [Ping timeout: 271 seconds]
stevieh1 has joined #openscad
stevieh1 has quit [Client Quit]
<peepsalot> JordanBrown[m]: I also just learned that apparently clangd language server can detect unused includes: https://clangd.llvm.org/guides/include-cleaner
<peepsalot> JordanBrown[m]: I use VS Code IDE, and just installed the clangd extension for it. It does seem to work, but I don't know if there's a way to check a full project. so far it looks like it only reports about includes for the currently active file in the editor
<JordanBrown[m]> Still better than nothing.
<JordanBrown[m]> For good reasons and bad, I use "vi" and "make" as my IDE...
<TIBL> better than letting microsoft log your every move to the forever cloud database :)
<peepsalot> yeah i've used vi in the past but never got that comfortable with it. it also has support for language servers though doesn't it?
<JordanBrown[m]> As long as they don't tell my boss how much time I spend on OpenSCAD-related stuff :-)
<JordanBrown[m]> When I said "vi", mostly I meant "vi", not "vim". I learned it 38 years ago, and have never really learned the newfangled stuff.
<peepsalot> D:
<JordanBrown[m]> The cost to learn it has always exceed the value *today*. Which of course ignores the value *tomorrow*.
<JordanBrown[m]> Did anybody ever write down the rules for how function literals and function references interact with traditional and built-in functions?
<JordanBrown[m]> That is, if you have both a traditional function and a variable that's set to a function reference in scope, which one wins?
<TIBL> I'm surprised you're allowed to overload a builtin openscad function?
<peepsalot> well builtin functions are all meant to be overridable. so I think/assume that a function reference variable would take precedence over tradtiional function.
<JordanBrown[m]> At the same scope level, no, the traditional function seems to win.
<JordanBrown[m]> The rule seems to be to find the closest, and if there's both a variable and a traditional function, the traditional function wins.
drkow has joined #openscad
<J1A8430> TIBL it is all about how you set up your design ..  so like if every part is its own module and then there are libraries to make your life easy (reason why i made my lib)
drfff has quit [Ping timeout: 272 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
drfff has joined #openscad
drkow has quit [Ping timeout: 255 seconds]
<TIBL> yes of course I have exactly that. I have a large library of parts and part parameters that I wrote, and every component is a tree of modules
<TIBL> interestingly some of the most tedious stuff is modifying my old code where I used cube()
<TIBL> I hate cube()
<JordanBrown[m]> :-)
<TIBL> I created my own module, cube_extent(), where you specify minX, maxX, minY, maxY, minZ, maxZ, and it is WAY more readable, like not even in the same galaxy
<JordanBrown[m]> I would be a lot happier with cube() if we added the ability to align it left, right, or center, in each axis.
<TIBL> whenever you go back to code later, you always care about one of the edge or face locations
<TIBL> what matters when you are creating something is always, where does this end in X?
<JordanBrown[m]> Huh, to each his own. I find specifying the size, and translating if necessary, to be very natural in most contexts.
<TIBL> doing it that way leads to very complex translations
<JordanBrown[m]> Sometimes I need to know where it ends. Rarely do I want to control where it ends.
<JordanBrown[m]> Not never, but it doesn't seem common.
<TIBL> for example, if minX is defined by some bound formula, and maxX is some other formula, you get a complete mess of a translation with cube(), and you end up having to make way more variables which in itself makes the code less readable
<TIBL> usually when I am making a cube, every bound is a different calculation based on multiple factors
<TIBL> I want this side to be the edge of the motor, the other side to be min(the edge of the motor, the edge of the frame), etc
<JordanBrown[m]> I certainly agree that if your problem ends up having maxX be something that you know, then a cube defined by a bounding box is more normal. It doesn't seem like I have that case often.
<TIBL> is the stuff in the video similar to your usecase?
<JordanBrown[m]> No.
<JordanBrown[m]> Mostly I'm making scale models.
<TIBL> btw, is it really pronounced "open-s-cad"??? that just seems so wrong
<JordanBrown[m]> My biggest complaint with cube is that it comes only in +XYZ and centered, and usually I want it centered in X but in +YZ, or in -X but +YZ or ...
<JordanBrown[m]> That's the way that I pronounce it. But then again I don't know whether I've actually *talked* to another OpenSCAD user.
<TIBL> I got corrected so I tried to start saying it like that, but to me it just reads as "scad"
<TIBL> I've used it for over 10 years and the first time I talked to a user was this month ;)
<TIBL> when you say "scale models", I am guessing you are talking about a design pattern where you just assign values without it having to work with different parameters?
<TIBL> so if something needs to line up, you can zoom in and just tweak the number until it does
<TIBL> I do that when I am in "lazy mode" and I just need to get something real quick, and it is much faster
<JordanBrown[m]> Eh. mixed.
<JordanBrown[m]> Sometimes it's just measured dimensions, but mostly I prefer to make the values make sense with respect to one another, so it's more parameterized.
<JordanBrown[m]> This is my big project: https://www.thingiverse.com/thing:4264614
<othx> JordanBrown[m] linked to "My House, with furniture by jordanbrown" on thingiverse => 1 IRC mentions
<JordanBrown[m]> And there are plenty of components in there that are standardized - for instance, window trim (which isn't there in that version).
<JordanBrown[m]> So I tell the wall module to put an opening at such-and-such a place, such-and-such a size, and put this kind of trim on the inside and this kind on the outside.
<TIBL> ah, nothing is calculated
<TIBL> it is all measured
<TIBL> the little furniture looks great though :)
<JordanBrown[m]> Kind of.
<JordanBrown[m]> There's plenty of calculation. But the base dimensions do tend to be measured.
<TIBL> I mean it is unlikely to change unless you find out you made an error in measurement
<TIBL> change is the killer
<JordanBrown[m]> For instance, walls are all defined in terms of origin points, compass directions, and distances, and the origin points are based on previous walls, et cetera.
<JordanBrown[m]> sure.
<JordanBrown[m]> But I recently added the window trim stuff, which is change, just not a dimensional change.
<JordanBrown[m]> But even looking at other things, a recent project is tool holders for a tool drawer, and there the basic dimensions are to fit around the tool, rather than to fit into the drawer.
<JordanBrown[m]> So the length of a screwdriver holder is the margin, plus the length of a screwdriver, plus the margin.
<TIBL> ya when I have made tool holders, I do "lazy mode" mostly, I am just tweaking and reprinting until the fit is good
<TIBL> but the base model is "good mode" so I can reuse it
<TIBL> I mean, usually things are a weird shape and it is easier to fit it empirically than theoretically
<JordanBrown[m]> That does happen some.
<JordanBrown[m]> But the fireplace, for instance, is made of individual bricks with mortar gap between them.
<JordanBrown[m]> It's been a couple of years, but I think it has the right number of bricks in each dimension.
<JordanBrown[m]> And after I'd built N cabinets I built a cabinet-zilla module that can do anything.
<JordanBrown[m]> And I think after that I built maybe one more cabinet :-)
<TIBL> typical :D
epony has quit [Ping timeout: 252 seconds]
epony has joined #openscad
<JordanBrown[m]> But we have a new vanity that I haven't modeled yet, so maybe the cabinet module will get some more use.
<J1A8430> TIBL oh i remember you ..  this is exactly why i told you that a cube with minX maxX leads to problems
<TIBL> I'm the one doing cubes wrong? :)
<J1A8430> If you don't have a proper origin you get confused easyly
<J1A8430> It is like writing code in a style to understand it easy but if you start to move things around  it is hard to find the origin
<TIBL> the 'origin' of a cube is irrelevant, the only 'origin' that matters is the origin of the module
<TIBL> I agree that each module must have a defined, easy to use origin
<J1A8430> if you use a translate([]) cube();  .. you can go  and add your new object  parallel to the cube after the translate and now they share the same origin
<TIBL> indeed I no longer write modules like I wrote that one
<TIBL> the origin of that module is slightly offset from the extrusion it mounts to, which is very stupid. the origin should be exactly on the extrusion, which is what I do now
<J1A8430> it is all about how to build the structure for the design
<TIBL> then everything I do is relative to the module origin, which is selected as the most intuitive starting point if you wanted to place that module somewhere
<J1A8430> in theory you could add children to your cube_extent module  so  it would be easy to place other objects on the same origin as the cube
<TIBL> what you are saying makes zero sense to me. A cube has no "origin". It has 8 corners.
<TIBL> 8 "origins"
<J1A8430> guess we just have a different way of thinking and perceiving
<TIBL> I never need to place something relative to an "origin" of a cube. I need to place something so it hits a face.
<TIBL> which is easy to see by looking at minX or whatever
<J1A8430> if you are happy that everything is fine .. i thought you complained that openSCAD is so  "boring and tedious"
<TIBL> no.
<TIBL> in reference to trying to make a video about openscad, I said "everyone out there thinks" it is boring and tedious
<TIBL> obviously if I didn't like openscad as a way of defining a model, I wouldn't have built my entire printer on it
<J1A8430> sorry missunderstood you .. just zapped a bit in the video and got headache  .. just not my style of doing things
<TIBL> how so?
<TIBL> I genuinely want feedback
<J1A8430> i work differently and you are not able to work as i do .. you have your style and i would never be able to use that either
<J1A8430> but it looked as it took you half of the video to get a triangle to the right position ..  but probably i saw that wrong
<TIBL> nah I did struggle with the side part's height a bit because my old code had a super confusing submodule origin, which is what I was saying before I would never do today
<TIBL> the part with the mounting screws
<TIBL> maybe the triangle jumping around made it look like I was struggling when I wasn't?
<TIBL> because of how I intentionally fill an object with incorrect values, then figure out each value one by one
<J1A8430> well like languages libraries are in constant development until workflow and function merge together
<TIBL> I find it much more confusing to try to fill out every value at the start when I write a call, because then if I make a mistake it is hard to see which thing is wrong
<J1A8430> try n error is an approach that is often fast .. depends on the steps
<TIBL> especially if the error makes it way off, the object will appear off camera and you struggle to even find it to see which axis is incorrect
<TIBL> so when I choose placeholder values, I choose arbitrary ones which make it visible to the camera
<J1A8430> when doing something like that i start with isolation the part .. so nothing else is on the view
<TIBL> oh, that is a huge mistake! heh. everytime I do that, I end up with it colliding with another part of the assembly later on when fixing it is a pita
<TIBL> I only do that for modules which are intended to be a "utility" that is of general purpose use
<TIBL> for example, I have a mounting plate module
<TIBL> I did that there
<J1A8430> guess i have a better spatial  perception then .. but this is why i said - everybody need to find a style that works for him
<TIBL> yeah I am too stupid to do more than one axis at a time heh ;)
<TIBL> but it works in the end
<TIBL> mostly
<J1A8430> seems you build a great printer .. so guess it works fine
<TIBL> I take a long time to do anything and fail way more than I think other people usually do, in general, so I am used to just banging my head against the wall for a long time
<J1A8430> if you find where you struggle you could focus on that and improve
<TIBL> nah, everytime I design or build anything I make 20 stupid mistakes which I know better, even if I spend literal days reviewing my design for said mistakes
<TIBL> just have to keep trying
fling has quit [Ping timeout: 258 seconds]
<J1A8430> like  i  like to confuse  the sides for Tangents  so i end with the angle from the other side ..  and  try and error fixes that .. but better is to learn that it is o/a
fling has joined #openscad
<InPhase> TIBL: I also had a "not the way I'd do it" reaction to looking through your video. But most people don't like to do OpenSCAD the way I do it, so that didn't surprise me. :) I did appreciate the way you made heavy use of # for finding your way. I also don't do that, but I see it provides a meticulous and careful approach to make use of it heavily.
<TIBL> interesting
<InPhase> TIBL: And, seems to be a nice printer construction. The result at the end of the video was also solid, in both senses of the word.
<TIBL> aww, thanks :)
<TIBL> so, how do you do it differently then?
<InPhase> I do a lot of calculating from the math first, and lay it out in my head.
rue_mohr has left #openscad [Leaving]
<J1A8430> there are only little people that can do that math like InPhase
<TIBL> ack. yeah. I am not sure if I am smart enough for that. I do that sometimes for intermediate variables only, where for example, several subparts will depend on the same position and that position is complex to calculate
<J1A8430> TIBL  just look into libraries from others and see how they solve things
<TIBL> a lot of how I do things, I learned from mendel90......in like 2015
<InPhase> TIBL: Well, this is what I appreciate about the # approach. I think that probably has pedagogical value as a thing to emphasize more for beginners who are getting lost in their code to help them find the way.
<InPhase> It's valuable to have a method that will recenter you on what is doing what.
<J1A8430> eg.  i use a center variable that is a vector  so you have 9 options for the origine
<J1A8430> äh 27
<TIBL> I guess the difference is that I use openscad because it can generate results which are much more flexible in parameters than normal cad, and others use openscad because they are math people who enjoy math
<TIBL> I bet the latter is more common.
<J1A8430> there are a lot people that are not good at math
<TIBL> I also cannot stand functional programming and am a classically trained oldschool C programmer
<TIBL> so, completely different brain
<J1A8430> the brain gets used to everything you use it for
<TIBL> anytime I see recursion I just think of wasted stack frames :D
<J1A8430> so if you are not good with something - it is just because you don't do it often
<TIBL> and in oldschool C programs, recursion is generally much more brittle than a for loop
<TIBL> so in that world, it is a bad idea in most situations
<TIBL> especially in embedded where your stack grows into normal memory, where I have been for the last years
<TIBL> (yes I am aware that fancy functional languages employ recursion optimization even for things more complicated than tail elimination)
<TIBL> it just breaks my mental model of, I write x, the computer executes x
<InPhase> TIBL: Recursion is fun though! Look how much fun these guys are having: https://bpa.st/GP4Q
<InPhase> TIBL: View, Animate, FPS: 30, Steps: 1500
<J1A8430> i am sure you posted happy gras
<InPhase> :)
<InPhase> J1A8430: I have not yet stopped smiling when I see it.
<TIBL> I noticed there are some new animation things when I updated my nightly
<J1A8430> not new just layout
<TIBL> it is too bad that it can't do an animation step without completely rebuilding the scene (at least the top level even if render()'d modules are cached)
<J1A8430> inPhase  when you stare onto the happy gras - the happy gras also stares onto you
<InPhase> TIBL: Well, caching and efficient code can keep it pretty fast. That paste I just shared with you goes at video rate on my system.
<TIBL> openscad animation reminds me of how I used to make motion video with povray when I was a kid, I wrote a program that appended a frame=x counter to the file and generated a file for every frame, then rendered them with a script
<TIBL> the whole reason I got into openscad was because I used povray as a kid
<TIBL> and it seemed almost identical
<InPhase> Some other animations I've made are a slow slog from one frame to the next, but this would be the case in any program, because certain things just take a long time to render.
<TIBL> sure, but even stepping through a translation of a top level rendered object is not exactly realtime
<InPhase> That can be fast.
<J1A8430> when you watch yourself in the mirror - is not realtime, you always see a past version of yourself
<TIBL> honestly povray saying box() seemed more correct than openscad's cube(), it's not a cube! it's not a cube!!!! :P
<InPhase> TIBL: I have a fighter jet OpenSCAD animation that flies in circles in real time.
<TIBL> wow
<InPhase> I will find that...
<J1A8430> cuboid
<J1A8430> and square should be rect
<TIBL> yeah
<InPhase> TIBL: This: https://bpa.st/Y74Q
<InPhase> TIBL: View, Animate, FPS: 30, Steps: 150
<TIBL> I even converted some trivial openscad models directly to povray with only minor work, to render them, but that wouldn't work with any real model now
<InPhase> TIBL: If that's flying too fast to see it, just increase the steps.
* J1A8430 never gets more than 5fps
<TIBL> what, you didn't even render() it
<TIBL> and you used hull()
<InPhase> Well I used it carefully.
<TIBL> it works smoothly on my machine (amd 5800x)
<TIBL> the plane takes 5 seconds to do a circle
<InPhase> 5 seconds is 150/30
<TIBL> with the viewport at 1000x780
<InPhase> So that means you're getting 30FPS. Increase FPS to push the limit.
<InPhase> 150/seconds is the real FPS.
<InPhase> If you increase 150 to a bigger number, fast FPS's get easier to measure.
<TIBL> 1.3 seconds is the fastest
<InPhase> I seem to be getting 60 FPS.
<InPhase> Even if I put a larger FPS value.
<TIBL> when I set fps to 10000000000
<InPhase> I am using integrated graphics though on a laptop, so I'm not expecting it to go much beyond 60. :)
<TIBL> I have an old gpu but I figure this has to be cpu-bound
<TIBL> it is a real gpu, not integrated
<InPhase> There's a bit of a graphics card impact on the animations, but only a bit.
<InPhase> How much of each depends on the model.
<TIBL> if I include a bunch of files, even if they never change, I assume that for each frame it must still parse every file again
<InPhase> But yeah, the take home message is that on modern machines, it can be real time with simple enough models.
<TIBL> so it would never work with something complicated like a printer
<TIBL> my printer is like 50k lines or something like that
<J1A8430> you can use render()
<TIBL> yes, but
<InPhase> render to force caching points can sometimes improve animation speed.
<TIBL> my understanding was that with render(), it parses the files and assembles the object hierarchy, then tries to match that to a cache key for something that has already been rendered, is that correct?
<TIBL> if so it still has to assemble everything first
<TIBL> just not do the actual mesh gen
<InPhase> Yes.
<InPhase> But on many models, the mesh generation is the slow part.
<InPhase> This is usually true unless you're doing heavy recursion.
epony has quit [Ping timeout: 252 seconds]
<InPhase> TIBL: The 24.scad here on this page, that was sloooow to animate: https://openscad.org/advent-calendar-2019/ It uses heavy recursion to make all the needles, and the colored balls are attached to the branches, so there's really no opportunity to do render optimization without wiping out the color of everything.
<TIBL> heh in the past, gltriangles or whatever was the slow part
<TIBL> I bet this is like 1fps without vertex buffers
epony has joined #openscad
<InPhase> And also the branches and needles have to come out from each other and are different colors.
<TIBL> whoa, it didn't slow it down much at all, but it went from 68% cpu to 92% cpu
<TIBL> that is surprising
<TIBL> so the cpu still has more powah left, something else is the limiting factor
<InPhase> Probably dumping to the video card.
<InPhase> We haven't exactly hired on a team of game programmers. :)
<TIBL> given that until recently it rendered one triangle at a time, that much was obvious :P
<TIBL> of course that's fine, realtime animation is a toy
<InPhase> A toy that is getting more fun as the program and computers are concurrently speeding up.
<InPhase> When I started in 2016, I basically ignored animation.
<TIBL> I have never used it.
<InPhase> And now that it's working well, maybe somebody will be incentivized to further speed up some of these things.
<TIBL> openscad was much more painful to use in 2016 though, everything was orders of magnitude slower
<InPhase> I'm hopeful those advent calendars with the animations motivate some qualified person to take an interest in the animation performance.
<TIBL> it being faster now really improves the general experience
<TIBL> I haven't even tried the whole lazy union mess yet
<InPhase> teepee: Which reminds me. It'll be November on Tuesday. It's about time to open up the Advent Calendar 2022.
<TIBL> I didn't see the need when I wasn't using render(), but now render() creates rendering pauses when I am editing so I have to turn it off with a variable
<InPhase> TIBL: Do you have fast-csg enabled?
<TIBL> nope. so far I only enabled the VBO options.
<InPhase> TIBL: With the latest nightly? Because fast-csg is a game changer on render.
<TIBL> I read some bug reports which scared me
<InPhase> TIBL: Like, 20x speed-ups and such.
<InPhase> Nah, it's stable now.
<TIBL> ya I am on 2022.10.22 currently
<InPhase> The only thing I see fast-csg "failing" on is invalid code with non-manifold models and failures to respect the overlap rule. But the existing release fails on just as many of them, it's just that they sometimes fail on different subsets of these.
<TIBL> yeah I am in the habit of offsetting everything to avoid z-fighting appearing in the preview
<InPhase> I basically just leave it on all the time when I'm using the master branch code.
<TIBL> I offset walls by 0.001mm
<TIBL> 0.001mm seems to be the magic number that doesn't get lost by floating point, but still makes no difference in 3d printer motion
<InPhase> The performance benefit is spectacular though. To the point where I've been considering the possibility that we could someday remove preview mode.
<TIBL> should I enable everything fast-csg except fast-csg-debug?
<InPhase> In a few cases, render is faster. In many cases it's at least within a factor of 2 of preview with fast-csg. If we could bump it just a little more, and figure out color in render, then preview would be useless.
<TIBL> wait, it improves speed for non-rendered things? not rendered things
<TIBL> I thought it sped up render
<InPhase> I do "fast-csg" and "fast-csg-trust-corefinement"
<InPhase> Yes, it speeds up render.
<InPhase> I mean simply that render is close to fast enough with it that the utility of preview is almost not there.
<InPhase> Although there are some models where the difference is still important. But it's close.
<InPhase> TIBL: I think those fast-csg "remesh" features are more specialty features that are not good to leave on by default.
<TIBL> erm
<TIBL> restarting the program and loading my printer with render() calls enabled takes 2 minutes, 38 seconds to generate the preview, with those two features enabled. That seems like longer but it may be my imagination so I will test with them off
<TIBL> WITH fast-csg, 2:38. WITHOUT fast-csg, 1:46
<TIBL> enabling fast-csg tanked performance by 49%
<TIBL> maybe I am "doing something wrong" but that is pretty devastating
<J1A8430> hmm i have seen fast-csg taking longer when there are coplanar faces that increase calculations
<J1A8430> but it would be annoying to find the culprit object ..  also when having an "mesh not closed" error .. and you have like 30 objects
<InPhase> Right, coplanar faces are also the only thing I remember seeing fast-csg get really slow on.
castaway has quit [Ping timeout: 276 seconds]
<TIBL> there has seemed to always be something extra slow about my Y carriages but after days and days of messing around I was not about to figure out what
<TIBL> if something subtle can create a huge problem for the user, which then the user cannot locate, there should be some way the program helps you with that
<InPhase> Do you have them posted? I'm heading out for a little bit, but I could glance at it maybe in a couple hours.
<TIBL> yeah it is in the repo here, the file you open in openscad is "config.scad" https://github.com/Tinkerer-in-a-Bureaucratic-Land/TEmPO
<TIBL> looks like in the repo it is currently configured to display the quad printer, which is the one I was testing, and the more complicated model (currently)
<TIBL> it seems quite plausible that I overlapped some cube faces somewhere
<TIBL> or have a subtraction which leaves a plane which is not fully defined
<TIBL> but if some minor problem like that halves performance there needs to be some sort of warning
<TIBL> I never have a problem with exports being non-manifold
<TIBL> well, since 2015 or something, it used to be horrible of course
<TIBL> just in general, openscad could be a lot better about telling you where problems are. it is almost daily that I get some warning but it is meaningless because it does not include a stack trace and just complains about some library function that is literally called thousands of times
<TIBL> I tried to find a way to write something that would show a stack trace if a parameter was detected to be incorrect but I couldn't make it work (at the time)
<TIBL> the "NaN propagation" problem, something becomes undefined due to a mistake and then all the errors generated are way, way down the line where it propagated
<teepee> InPhase: oof that gsoc site seems broken, but I think I successfully submitted the final eval
<linext_> i decided to pitch 3dcustomizers.net to NYC Angel VC
<linext_> see if anyone wants to offer some funding
<TIBL> what is the revenue model?
<linext_> affiliate links to shapeways, i materialise, makexyz to get 3d model printed
<linext_> regular ads for 3d printing tools and supplies
<TIBL> wouldn't the vast, vast majority of users print on a hobby printer?
<linext_> i hope so
<linext_> i've got a few hobbyist prints myself and could print for whoever
<linext_> i've got the pricing system set up at 3dpartprice.com
<linext_> probably not going to get funding, but useful to check it out and give it a try
<linext_> it only requires a 4 minute presentation and 4 minute of question/answers
<TIBL> probably a good life experience either way :)
<linext_> yea, it cost me about $50
<linext_> next week i'm going to add some more features to fill the gaps
<linext_> try to get it at least as usable as the main competitors like thingiverse and printables
teepee_ has joined #openscad
<TIBL> it's a cool site but it seems a lot more specialized than those.
teepee has quit [Ping timeout: 258 seconds]
teepee_ is now known as teepee
<linext_> some features i want to get this week is allowing any filetype to be imported into the web browser client
<linext_> such STL, SVG, fonts, etc.
<TIBL> does printables even make money? I seriously doubt it, I don't see how a site like that makes money by itself, it makes money by driving people to buy a prusa
<linext_> i have it working in a test demo, but it needs to be merged into the full app
<TIBL> the site is an ad (in a good way)
<linext_> printables is owned by prusa, so it's their community
<TIBL> that's what I'm saying, it's not a moneymaker
<linext_> not directly
<TIBL> it only makes money by building goodwill in the community
<linext_> however, if you are thinking of getting a printer, and you like printables.com
<linext_> maybe that would lead you towards prusa printer instead of a makerbot
<TIBL> yes, my point is it is monetized in a way you can't
<linext_> well, when google started, there were many other search engines
<linext_> they estimated that their search engine was 20% better than others
<TIBL> search is also an enormous market
<TIBL> literally every adult alive in the world uses it now
<linext_> if i can produce a better product that thingiverse and printables, maybe there is money to be made
<linext_> building the STL inside the web browser using WASM instead of a server is a big dael
<TIBL> the vast majority of people want to use a cad like fusion.