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
califax has quit [Remote host closed the connection]
califax has joined #openscad
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
califax has quit [Remote host closed the connection]
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
teepee has quit [Ping timeout: 268 seconds]
teepee has joined #openscad
cheater has quit [Quit: Killed (KrON (Requested by panasync))]
J1A8422 has joined #openscad
J1A84 has quit [Ping timeout: 252 seconds]
snaked has quit [Ping timeout: 246 seconds]
snaked has joined #openscad
Junxter has joined #openscad
lastrodamo has joined #openscad
GNUmoon has quit [Ping timeout: 268 seconds]
GNUmoon has joined #openscad
TheCoffeMaker has quit [Ping timeout: 260 seconds]
TheCoffeMaker has joined #openscad
KimK has quit [Ping timeout: 246 seconds]
snaked has quit [Read error: Connection reset by peer]
snaked has joined #openscad
KimK has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 268 seconds]
teepee_ is now known as teepee
PProj has joined #openscad
PProj has quit [Client Quit]
rtypo_bot has joined #openscad
rtypo_bot has left #openscad [#openscad]
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
rue_mohr has joined #openscad
<rue_mohr> anyone know why the precision of openscad is only about 0.005?
<ali1234> float rounding errors?
<rue_mohr> at only 0.005!?
<ali1234> floats can round much sooner than that if you write numbers in decimal
<rue_mohr> maybe its only 16 bit floats?
<ali1234> not sure if openscad is double or float, it won't be 16 bit
<ali1234> but floats are binary - base 2. they can't represent every decimal number
<rue_mohr> 0.005 should not be an issue tho
<rue_mohr> yea I know
<rue_mohr> 0.005 should not be an issue...
<ali1234> show code?
<ali1234> 0.005 can't be represented by float
<ali1234> 0.004999999888241291046142578125 is the actual value
<rue_mohr> just take two cylinders that are the same, move one till the polygons dont mess with each other
<ali1234> oh, depth buffer precision?
<rue_mohr> you have to move it about 0.002 to get a clean surface
<ali1234> that's a whole different problem
<ali1234> depth buffers are not linear for one thing
<rue_mohr> 0.00001 should be more than enough to make a polygon mathematically lie clearly on the side of antoher
<rue_mohr> hmm
<ali1234> no, because depth buffers are not in world space coordinates
<ali1234> an they are biased towards things near the camera
<rue_mohr> huh
<rue_mohr> I suppose I'm used to povrays descriminance
<ali1234> well yes povray is not real-time rendering
<rue_mohr> no
<ali1234> opengl rasterization is a totally different thing to raytracing etc
<ali1234> i compare it to taking a photograph vs painting a picture
<ali1234> they are that different
<rue_mohr> hmm, fixed point on the gpu?, hmmm
<ali1234> not sure about that
<rue_mohr> it might make sense
<ali1234> it is possible though
<rue_mohr> I'm on linux, I dont know who is operating the gpu and how
<ali1234> ultimately you have the same number of distinct values whatever representation it uses
<ali1234> and they have to be spread over the whole range from near to far clipping plane
<rue_mohr> it just surprises me how far I have to bump a surface to get a clean cut
<rue_mohr> say, csg
<ali1234> try rendering. that often cleans it up
<rue_mohr> sure, its slow on most of my machines tho
<rue_mohr> openscad is not a csg racecar
<ali1234> yes, it's unfortunate but that is the trade-off you have to make to get fast previews
<rue_mohr> as such most of my objects are based on extrusions from dxfs
<rue_mohr> anyone set up to profile the csg and see whats taking all the time?
<ali1234> the dxfs being arbitrary polygons
<rue_mohr> yup, dxfs speed it up a LOT
<ali1234> well they shouldn't
<rue_mohr> 200%->1000%
<ali1234> unles the shape is super complicated
<rue_mohr> they do!
<ali1234> i can't profile it directly but i can look at your code and look for why it is slow
<rue_mohr> the rendering time will usually pretty much double going from 0 to 1 csg operation
<rue_mohr> I wonder what I have on hand at the moment
<rue_mohr> this one isn't using csg yet...
<rue_mohr> I'll try to remember to give you a shout next time I have a good example
<rue_mohr> I dont think this design I'm doing now needs any csg at all...
<ali1234> i have only one design that is really slow... it takes like 10 minutes to render... but it uses minkowski, which is basically performance death
<rue_mohr> heh and hull
<ali1234> even the preview is like 10fps
<ali1234> final render is high enough resolution that you can't see the triangles
<rue_mohr> I can see your polygons!
<rue_mohr> I use an fn of atleast 180
<ali1234> ah
<ali1234> use fs and fa instead of fn... it is much more efficient
<ali1234> like MUCH more
<ali1234> also, i have a script to do the final render, that adjusts those parameters. otherwise the preview is just too slow
<ali1234> so fn is like number of segments... fa takes into account how curved the surface is and adjusts the number of segments dynamically
<ali1234> and fs is based on size
<Scopeuk> fs is maximum segment length, fa is maximum angle at corners between segments
<Scopeuk> they tend to scale nicer than number of segments
<rue_mohr> :)
<rue_mohr> :) no csg yet...
teepee has quit [Remote host closed the connection]
snaked has quit [Read error: Connection reset by peer]
teepee has joined #openscad
snaked has joined #openscad
teepee has quit [Remote host closed the connection]
<rue_mohr> I also don't get why negative length extrusions are not supported, maybe I want it backwards?
teepee has joined #openscad
<ali1234> mirror it
<ali1234> but yeah there's loads of stuff that would be nice to have
<rue_mohr> is openscad friendly to git pulls?
<ali1234> don't know
<ali1234> there's a fairly long review process
<rue_mohr> I added features to a version, but didn't go to the work to diff it
<ali1234> there's one feature that i've been waiting on for like three years lol
<teepee> what feature is that?
<rue_mohr> I'm sad their gone after I upgraded, not sure I want to try to follow keeping them in
<rue_mohr> I added a convienience menu for inserting templates
<ali1234> teepee: that new extrude thing
<rue_mohr> translate([0,0,0])
<rue_mohr> that would be nice too
<ali1234> what would that do?
<rue_mohr> less work as there is no gui to attach to
<rue_mohr> just extrude in the other direction
<rue_mohr> <- - + ->
<ali1234> no the zero translate?
<rue_mohr> oh it inserts it for you so yo can edit the position
<ali1234> like code completion?
<rue_mohr> I did it for cylinder, rotate, translate and colour
<rue_mohr> no
<rue_mohr> I hot-key'd it, dont remember to what tho
<rue_mohr> but it was in the menu
<rue_mohr> insert->translate
<teepee> there's already a hotkey, but that might not work on all platforms (alt+ins IIRC)
<teepee> plus context menu
<rue_mohr> oh I think I did union and difference too, you could select a block and have it auto-wrap it
<teepee> but a "normal" menu entry seems fine too
<rue_mohr> so, what do I hit to insert translate([0,0,0])
<teepee> right click in editor -> insert template
<rue_mohr> oh
<rue_mohr> damn
<teepee> I don't think it has the selection feature though
<rue_mohr> I'm less sad now
<rue_mohr> now if we could only have a non-gimbal locked 3d view!
<rue_mohr> (thats not something I got into solving)
<rue_mohr> I briefly understood quaternions
Junxter has quit [Ping timeout: 246 seconds]
<teepee> so as for pull request. a separate feature would not be acceptable, but extending/merging those 2 ways for templates would certainly be good to go
<rue_mohr> I'm satisfied knowing its there, I just didn't know
<rue_mohr> I'd like to add a tempate for colour
<teepee> there's a folder to place more templates
<rue_mohr> ooo where!
<teepee> on Linux: .config/OpenSCAD/templates/
<rue_mohr> \usr/share/openscad/templates/function.json
<teepee> yep that's the ones shipped via https://github.com/openscad/openscad/tree/master/templates
<rue_mohr> do I have to add the new file to a list somewhere or is it auto-searched?
<teepee> just put file in, menu entry is the "key"
<teepee> and if it's included the cursor is placed at ^-^
<rue_mohr> :))
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
<rue_mohr> 22.846 sec render with CSG, 14.855 sec without CSG
<rue_mohr> I could do a cleaner test tho
<rue_mohr> I have to go print tho!
<J1A8422> try the "experimental" fast CSG
lastrodamo has quit [Quit: Leaving]
Non-ICE has joined #openscad