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
qeed has joined #openscad
J24k83 has quit [Quit: Client closed]
J24k83 has joined #openscad
kintel has joined #openscad
qeed has quit [Quit: qeed]
<gbruno> [github] kintel closed pull request #5055 (chore(python): simplify to `yield from`) https://github.com/openscad/openscad/pull/5055
<gbruno> [github] kintel pushed 1 modifications (chore(python): simplify to `yield from` (#5055) Python 3 style is simpler.) https://github.com/openscad/openscad/commit/b6d75ed65bb9f4655eb995a715257fa41e59bc83
<gbruno> [github] kintel closed pull request #5056 (chore(python): migrate string format) https://github.com/openscad/openscad/pull/5056
<gbruno> [github] kintel pushed 1 modifications (chore(python): migrate string format (#5056) Replace format with specifier with f-string) https://github.com/openscad/openscad/commit/edc3728f71dd062b57fc63e8fbe94d4527e3b746
<gbruno> [github] kintel closed pull request #5057 (chore(python): remove redundant open modes) https://github.com/openscad/openscad/pull/5057
snaked has quit [Quit: Leaving]
snaked has joined #openscad
qeed has joined #openscad
snaked has quit [Remote host closed the connection]
snaked has joined #openscad
<gbruno> [github] kintel pushed 1 modifications (Add workaround for broken QScintilla2 for Qt5) https://github.com/openscad/openscad/commit/678caa9ec431870c918ca7ca4636e453cb39a90e
<gbruno> [github] kintel opened pull request #5059 (Add workaround for broken QScintilla2 for Qt5) https://github.com/openscad/openscad/pull/5059
splud has quit [Remote host closed the connection]
splud has joined #openscad
mohammad1722 has quit [Ping timeout: 250 seconds]
LordOfBikes has quit [Ping timeout: 264 seconds]
snaked has quit [Remote host closed the connection]
J24k83 has quit [Quit: Client closed]
J24k83 has joined #openscad
<gbruno> [github] kintel pushed 1 modifications (Add workaround for broken QScintilla2 for Qt5) https://github.com/openscad/openscad/commit/6fb939e2d2bf0f8eef8acacf28a65c71699278be
<gbruno> [github] kintel synchronize pull request #5059 (Add workaround for broken QScintilla2 for Qt5) https://github.com/openscad/openscad/pull/5059
LordOfBikes has joined #openscad
mmu_man has quit [Ping timeout: 264 seconds]
J24k83 has quit [Quit: Client closed]
J24k83 has joined #openscad
snaked has joined #openscad
<gbruno> [github] kintel closed pull request #5059 (Add workaround for broken QScintilla2 for Qt5) https://github.com/openscad/openscad/pull/5059
<gbruno> [github] kintel pushed 1 modifications (Add workaround for broken QScintilla2 for Qt5 (#5059)) https://github.com/openscad/openscad/commit/9688356985da60f6e38f0fce428c63a15be27980
<gbruno> [github] kintel edited pull request #5059 (Add workaround for broken QScintilla2 for Qt5) https://github.com/openscad/openscad/pull/5059
J24k64 has joined #openscad
J24k83 has quit [Ping timeout: 250 seconds]
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TheAssass1n has joined #openscad
TheAssassin has quit [Ping timeout: 260 seconds]
TheAssass1n has quit [Remote host closed the connection]
TheAssassin has joined #openscad
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
guso78k has joined #openscad
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
Guest29 has joined #openscad
Alexer has quit [Ping timeout: 272 seconds]
cart_ has joined #openscad
Guest29 has quit [Quit: Client closed]
guso78k has quit [Quit: Client closed]
hyperair has quit [Ping timeout: 260 seconds]
L29Ah has joined #openscad
guso78k has joined #openscad
mohammad1722 has joined #openscad
<mohammad1722> Hello everyone! It's been a busy week. I finished drafting the proposal and I'm ready to share it with you so we can discuss it further. How would you like I share it with you?
<mohammad1722> teepee kintel
mohammad1722 has quit [Quit: Client closed]
erectus has quit [Ping timeout: 260 seconds]
mmu_man has joined #openscad
teepee_ has joined #openscad
erectus has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
mmu_man has quit [Ping timeout: 264 seconds]
guso78k has quit [Quit: Client closed]
gwillen has quit [Ping timeout: 252 seconds]
gwillen has joined #openscad
snaked has quit [Quit: Leaving]
mmu_man has joined #openscad
<gbruno> [github] Rotzbua synchronize pull request #5054 (chore(python): remove py2 import) https://github.com/openscad/openscad/pull/5054
omegatron has joined #openscad
mmu_man has quit [Quit: reboot]
<gbruno> [github] kintel closed issue #4861 (Weird rendering issue with difference() in "F5 Preview" after using "F6 Render") https://github.com/openscad/openscad/issues/4861
kintel has joined #openscad
<kintel> guso78 I've looked more closely at the Manifold face index tracking stuff; I think we can make it work, but there are many corner cases in OpenSCAD, so I don't think this is easy to just enable. For full color support, I think #ifdef or an experimental feature will be needed until we've tracked down and decided how to handle all the corner cases.
<kintel> To _only_ support positive+negative faces is a lot easier, so that's a good start. I'll continue looking into that
guso78k has joined #openscad
<guso78k> corner cases is, when its not absoletely clear/unique  , what color a face gets ?
<guso78k> i was about to continue on the color stuff, finding out how the runIndex and faceID  is created internally
hyperair has joined #openscad
ecraven- is now known as ecraven
<gbruno> [github] MethylBromide opened issue #5060 (Poor transparency calculation for previewing extruded hollow shapes with holes cut into them) https://github.com/openscad/openscad/issues/5060
Knochi has joined #openscad
<Knochi> Hi, i have a problem with a function returning different results when called from an iterative module/function
<J24k64> Hi Knochi, what function?
<J24k64> an iterative module will have a changing scope
<J24k64> !paste
<J24k64> paste!
<othx> paste is https://www.3dcustomizer.net/paste for .scad files, https://bpa.st for text, https://pasteboard.co/ or https://imgur.com/ for images
<Knochi> I don't see it. I made copies of the functions into modules to dbug them.
<InPhase> Knochi: You have multiple functions and 117 lines. Can you point to the exact issue?
<Knochi> In function "push_arc()"  arcFragments() is called to calculate how many fragments the arc should have. When $fn>3 it's simply $fn/(360/angle) which result in 5 when $fn=20 and angle is 90
<J24k64> $fn is for a full circle
<Knochi> but in my case it's sometimes 6
<Knochi> yes
<Knochi> and a quarter circle should have, well a quarter of it
<Knochi> i guess it's something with the floor() function, because it only happens when $fn is dividable by 4
<Knochi> the funny thing is, it somehow depended on the "r" value, but this is not taken into account for calculation of facets
<InPhase> Knochi: So your concern is that $fn is having different values in one context from another?
<Knochi> somehow yes
<Knochi> Let my try to consolidate
<Knochi> I have a function "push_arc" that draws arcs
<InPhase> I see dbgFacets sets $fn, but you don't set it anywhere else?
<Knochi> right
<Knochi> you can set it globally as well.. no difference
<Knochi> so did you render?
<InPhase> You don't appear to be getting $fn of 6 anywhere.
<InPhase> I'm not understanding the issue.
<Knochi> when you change $fn to let's say 19, both arcs have the same amount of facets
<InPhase> ($fn>minFrag) ? ceil(max(frgFrmFn,minFrag)+1) : ceil(max(min(angle/$fa,r*(2*PI/cirFrac)/$fs),minFrag)) This is giving 6.
<Knochi> but sometimes it's giving five
<Knochi> So launch my code in openSCAD
<InPhase> Well $fn will be greater than 3 when it is 20, but less than 3 when it is 0 because you didn't set it.
<Knochi> when you render you se a red arc with 6 segments and a green one with 5
<InPhase> But at no point do I see you outputting $fn and getting 4 or 6.
<Knochi> when you change $fn to 19 or 21 both segments will have the same count of fragments
<J24k64> isnt that what arcFragments_Dbg(r,angle) calculates
<Knochi> yes but for $fn>3 it should always be the same, regardless of the radius
<Knochi> and the angle is always 90
<Knochi> but in this case i get different results for different radii
omegatron has quit [Quit: Power is a curious thing. It can be contained, hidden, locked away, and yet it always breaks free.]
<Knochi> hmm let me remove the whole "if $fn<4 stuff"
<J24k64> echo(arcFragments(r=17,angle=90,$fn=20));  //giving me constant values for all r
<Knochi> check again pls
<Knochi> yes.. but not when used in push_arc function
<Knochi> and that'S the point "r" shouldn't influence the facets.. but it does when calling push_arc with two different r s
<gbruno> [github] t-paul closed issue #5060 (Poor transparency calculation for previewing extruded hollow shapes with holes cut into them) https://github.com/openscad/openscad/issues/5060
<J24k64> knochi your angle is not 90
<Knochi> It is
<Knochi> isn't it?
<J24k64> echo will round after some decimals so it shows 90 but in reality it has a floating error
<J24k64> if you replace angle calculation with 90 you get the expected result
<J24k64> echo (angle==90?true:false);
<Knochi> ok understand but why it is sometimes the one and sometimes the other?
<Knochi> always false
<Knochi> :-D
<Knochi> so i guess it's 89.99999 or 90.00...001
<J24k64> i get true for 18 (6) and false for 17(5)
<Knochi> updated again.. stripped it down to bare minimum
<Knochi> and i get false for both
<J24k64> ah 20 ok try echo(angle>=90?true:false)
<J24k64> so 20 is not 90 but bigger while 17 is smaller  .. and 18 is 90°
<Knochi> fn=20?
<J24k64> you need to round your calculation to 10⁻⁶ or something
<Knochi> but you must admit it's not a forseable result
<Knochi> unpredictable
<J24k64> it is if you know that float math is not real math
<J24k64> and i agree that echo is shitty to debug those issues .. there are some custome echo modules that give you the exact numbers
<Knochi> but how can i change the code to circumwent this?
<J24k64> you need to round the angle result to 10⁻⁶
<J24k64> or just round(angle);
<Knochi> ok that helps.. thanks!
<J24k64> facets= arcFragments(r,round(angle*1000)/1000);
<Knochi> so the angle is calulated from the coordinates, and because of floating point math it's not exactly 90 when it should be
<J24k64> yes
<J24k64> and as facets are integer a very small change will move to the next
<Knochi> and when I do floor($fn/(360/angle) its sometimes 6 and sometimes five.. because floor of 20/(360/89.999) is floor(4.99999999) and that's 4
<Knochi> and i add 1 because the quarter circle needs an end point
<Knochi> understood... THANKS!
<Knochi> I do floor($fn/360/angle)+1
<Knochi> now i add the round and everything is good
<Knochi> do you want to see where i use that? :-)
<J24k64> sure .. for a round corner it would be way to complex
<J24k64> also using $fs is often much better (except when creating polyhedrons)
<Knochi> an IKEA SAMLA container in openSCAD.. soon be fully customizable :-)
<Knochi> argh.. loft.scad u need
<J24k64> Ü yes
<Knochi> update.. integrated the function
<Knochi> oh and i create polyhedrons.. a lot ;-)
<J24k64> looks nice but you could make this much simpler
<gbruno> [github] dbyy opened issue #5061 (Is this the right place to ask question about OpenSCAD) https://github.com/openscad/openscad/issues/5061
Alexer has joined #openscad
<Knochi> as alwys there are multiple ways to solve a problem
<Knochi> but what do you think of.. i guess I tried that.. it seems simple but isn't
<J24k64> hull(){
<J24k64> linear_extrude(.1,scale=0)offset(5)square([10,20],center=true);
<J24k64> translate([0,0,20])linear_extrude(.1,scale=0)offset(5)square([15,25],true);
<J24k64> }
<Knochi> ok wow
<Knochi> ah i see what you did
<Knochi> that's cheating! :-)
<J24k64> normally i use my lib for that where i can access points for rounded squares directly
<Knochi> but yes it's way easiert.. but with that i wouldn'T have learned about floating point math problems
<J24k64> but they are created with loops   p=[for i=[0:$fn] [cos(i*step),sin(i*step)] * radius ];
<J24k64> sometimes the way is the goal  ( german proverb)
<J24k64> the journey is the reward/destination
<Knochi> ja und manchmal kommt es anders als man denkt ;-)
<J24k64> meistens sogar
<Knochi> :-D
<J24k64> Ü
<Knochi> did't know the trick whis scale=0
<J24k64> kannst dir mal ub.scad anschauen
<Knochi> von dir?
<J24k64> ohne scale geht auch aber macht doppelte kanten .. bei height=0.0001 nicht so relevant
<J24k64> jupp
<J24k64> vielleicht nicht so toll aber deutschiger
<Knochi> ja deshalb hab ich es vermieden
<J24k64> eigentlich dreht man (ich) die obere extrusion noch um 180 damit der Winkel innerhalb der hülle liegt
<Knochi> hä? kapier ich nicht
<J24k64> mit chain hull / hull sequence  lassen sich so einfach tolle ergebnisse erreichen
<J24k64> mach das mal mit linear_extrude (5,scale=0) dann siehst du es
<Knochi> ja damit klappen dann auch organische Formen, hab ich mich aber noch nicht so ran getraut
<J24k64> irgendwann kann man das mit polyhedra aber die flächen (faces) sind halt nix für Anfänger .. ich habe ein modul das diese als loop berechnent
<Knochi> ah jetzt verstehe ich was du meinstist ja quasi eine sehr flache pyramide und due versteckst dann noch die Spitze innen
<J24k64> InPhase hat auch ein tolles (wobei man die coordinaten anders eingibt)
<J24k64> genau
<Knochi> ich denke ich schaue hier in zukunft mal öfter vorbei.. sehr geil
<Knochi> auch wenn mein ego jetzt ein bisschen angekratzt ist.. nutze das tool schon seit über 10 Jahren :-)
<Knochi> aber das hat mich heute in den Wahnsinn getrieben
<Knochi> nice
<Knochi> ich muss jetzt mal mit dem Hund raus.. danke so weit..
<J24k64> Hier sitzen auch die developer und da lernst du das manchmal intern ganz komische dinge ablaufen ( zb wenn man intersection() und difference() mischt )
<J24k64> gerne ..
Knochi has quit [Quit: Client closed]
<gbruno> [github] dbyy closed issue #5061 (Is this the right place to ask question about OpenSCAD) https://github.com/openscad/openscad/issues/5061
<InPhase> J24k64: Ah good, you got it sorted out.
<J24k64> echo should  have a warning symbol if the true value is different from the value displayed
<InPhase> Well... Usually the rounding is the desired behavior.
<J24k64> took me a bit to understand where that happened
<InPhase> Although I personally preference displaying floats with full available precision, and preference that in my own output routines.
<J24k64> maybe a debug_echo() then
<J24k64> it is a bit like messenger or email/ blog/ git whatever  often only display the day (Friday) and i always think .. what year what month .. (it is normally the same) .. or the  " 2h ago"  - can i please have the time!
<InPhase> kintel: How do you tolerate developing in macs... I had to brush the dust off of the work mac dev laptop, and git doesn't work anymore because apparently proprietary tool xcode is not updated... After agreeing to all sorts of egregious terms just to get an open source program to work, it's doing a painfully slow installation reminiscent of 15 year ago Windows installs.
<JordanBrown> InPhase it's a good thing that 2 is a divisor of 10, or full available precision could be infinite.
<JordanBrown> Just need to print the numbers in hex.
<JordanBrown> I have somewhere a 95% working format function based on libfmt that would let you specify the number of decimal places. I got lost in a maze of twisty little C++ templates, all different, and couldn't figure out how to get it to accept an OpenSCAD number as the argument for a variable-width or variable-precision format. (That is, the equivalent of the * in %*d in printf.)
L29Ah has quit [Read error: Connection reset by peer]
<JordanBrown> I like base 210 floating point, but irrationals and things derived from them are still a problem.
<InPhase> You'd probably need to memorize a sequence of many emoji to represent those values.
L29Ah has joined #openscad
mohammad1722 has joined #openscad
guso78k has quit [Ping timeout: 250 seconds]
<InPhase> JordanBrown: I have used variants of this routine for a very long time, and I think it does what I consider the right thing in each case. https://bpa.st/KUUQ
<InPhase> I've previously released that under the Boost license, so it's stealable. :)
<InPhase> I think that WIN32 correction is also not needed anymore on more recent Windows, as they decided to stop being so different 8-9 years ago.
<InPhase> I use the logic of that routine in the float constructor of my std::string alternate, and for a very large amount of numeric computation code, so I have printed an exceptional number of floats with this over 13-some years of using it.
<InPhase> Although I think I had an alternate implementation that produced identical output for the first couple years, so let's say a decade.
<kintel> InPhase You get used to it - xcode updates are pretty rare, and you can just install it on the cmd-line if you don't want the GUI :)
<kintel> I guess any computer you "dust off" is going to yield a suboptimal experience for a while ;)
<InPhase> Well it was a thin layer of dust. Like a year maybe.
<kintel> The magic trick is: xcode-select --install
<kintel> ^ that even works without an Apple account. I managed to set up an entire OpenSCAD build env without logging in anywhere ;)
<InPhase> Yeah, I found that with some googling.
<InPhase> If I needed an Apple account I probably would have started throwing things.
L29Ah has quit [Read error: Connection reset by peer]
mmu_man has joined #openscad
L29Ah has joined #openscad
mmu_man has quit [Ping timeout: 272 seconds]
mohammad1722 has quit [Quit: Client closed]
mmu_man has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
phryk_ is now known as phryk
mmu_man has quit [Ping timeout: 255 seconds]
mmu_man has joined #openscad
SamantazFox has quit [Remote host closed the connection]
SamantazFox has joined #openscad
mmu_man has quit [Ping timeout: 255 seconds]
mmu_man has joined #openscad
bobztoy has joined #openscad
bobztoy has quit [Client Quit]
Non-ICE has quit [Quit: Screw you guys, im going home!]
Non-ICE has joined #openscad
mmu_man has quit [Ping timeout: 264 seconds]
mmu_man has joined #openscad
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]