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
J1A84111129 has joined #openscad
J1A841111 has quit [Ping timeout: 252 seconds]
ur5us_ has quit [Ping timeout: 258 seconds]
pie_ has quit []
pie_ has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
EmetSelch has quit [Read error: Connection reset by peer]
fling has quit [Ping timeout: 240 seconds]
ur5us_ has joined #openscad
LordOfBikes has quit [Ping timeout: 248 seconds]
<sinned6915> i just updated to 2021.1 froim 2019.? .... i know it took me a while.
<sinned6915> but now my InPhase threads are not working.
<sinned6915> i amnot getting any error messages
<sinned6915> when i run the Demo in the library, it works filne.
<sinned6915> but old scad files are not compiliig correctly
LordOfBikes has joined #openscad
<sinned6915> this is what it should look like,
<sinned6915> urgh
<sinned6915> what it should look like and how it renders
<sinned6915> same sourcecode file
<InPhase> Perhaps there's some sort of overlap violation or other clash with other portions of that file?
<InPhase> You could share the source.
<sinned6915> hey, thanks for replying- here is the source
<sinned6915> the lib file is in the folder as the source file, so that is why I have the use <./threads_v2p1.scad> syntax
<sinned6915> the NutShell.stl is the outer part of the knob.
<sinned6915> i cant even get the holes to highlight with # like i used to either
tcurdt has quit [Ping timeout: 272 seconds]
<sinned6915> InPhase: something is up with ScrewHole module.
<sinned6915> would you have time to look at it in the next few days?
<sinned6915> I tried it with both the v2p1 file and what I think is the threads library that installed with openscad
<InPhase> sinned6915: Use the github one, as that's the latest.
<InPhase> I'm currently sorting out a critical computer issue, so I can't actually run OpenSCAD at the moment.
<InPhase> Did you notice however that you aren't using ScrewHole anywhere in that scad file?
<InPhase> It's in the RHole and LHole modules, acting on their children, but you are not using those modules.
tcurdt has joined #openscad
<InPhase> It's perhaps just an editing error you made while testing something and forgot about it?
<InPhase> Also the two places where RHole and LHole are written but commented out, they have no children to put the hole into.
ur5us_ has quit [Ping timeout: 255 seconds]
fling has joined #openscad
fling has quit [Ping timeout: 240 seconds]
buZz has quit [Ping timeout: 246 seconds]
J1A8411112950 has joined #openscad
J1A84111129 has quit [Ping timeout: 252 seconds]
buZz has joined #openscad
buZz is now known as Guest9228
fling has joined #openscad
<sinned6915> InPhase: thanks for your help despite your issues.
<sinned6915> I am trying to work through it.
<sinned6915> I think one thing you commented on is a typo,
<sinned6915> the pastebin is literally the old file that used to work that no longer does.
<sinned6915> it might have worked depsite errors on my part
J1A8411112950 is now known as J1A84
neur0 has quit [Ping timeout: 240 seconds]
neur0 has joined #openscad
fling has quit [Ping timeout: 240 seconds]
lastrodamo has joined #openscad
KimK has quit [Ping timeout: 248 seconds]
othx has quit [Ping timeout: 246 seconds]
othx has joined #openscad
ur5us_ has joined #openscad
ur5us_ has quit [Remote host closed the connection]
Guest9228 is now known as buZz
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
ur5us has joined #openscad
ur5us has quit [Ping timeout: 255 seconds]
KimK has joined #openscad
Junxter has joined #openscad
la1yv_a has quit [Remote host closed the connection]
la1yv_a has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
<sinned6915> InPhase: I can't make heads or tails out of this.
<sinned6915> here is the part, same source file in 2019.05 and 2121.01
<sinned6915> i am trying to RTFM the changes between 2019 and 2021 and not finding anything.
<sinned6915> so i am conluding that I have a mistake in the source that 2019 is tolertaing byt 2121 is not.
<J1A84> Error, this is a private paste or is pending moderation. If this paste belongs to you, please login to Pastebin to view it.
<J1A84> sinned6915  you know about the  # operator, also use color() and difference with a cube to see what happening
<sinned6915> ugh,. sorry about the paste. i will fix it
<sinned6915> do you mean to color highlight individual entities and subtracting a cube?
<sinned6915> yes, i do that
<sinned6915> sec
<sinned6915> pastebin should be fixed
<J1A84> also check with ! to see each part  without the others to find out what part is failing
<J1A84> sinned6915  so i used a cylinder instead of "ScrewHole"  which is working fine https://pasteboard.co/Fc08JpvxvyBm.png
<J1A84> try to call  !ScrewHole();  and see it it looks like a cylinder (with threads)
<sinned6915> yes
<J1A84> because https://github.com/rcolyer/threads-scad  ScrewHole is used with children and cut a hole
<sinned6915> right, but there is only 1 child
<sinned6915> right?
<J1A84> actually you using RHole and LHole without any children
<J1A84> line 70 and 71
<sinned6915> isnt the children() to use all children?
teepee_ has joined #openscad
<J1A84> children() is a placeholder to be replaced by the object     test()cube();   // this uses cube()  as children() in module Test
<J1A84> so i assume you need to use RHole(H)HermiNut();
<sinned6915> so why does it yield output in 2019.05?
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
<J1A84> good question - that is why i pleased you to check calling ScrewHole();  without children and see if that is a positive object
<sinned6915> if i # in front of it, it looks right
<J1A84> or check !RHole(H);  and see if that is an object
<sinned6915> oh wait, RHole() not RHole(H)
<J1A84> because you giving ScrewHole a child(ren) but that is empty
<J1A84> please place a ! in front of the union of both and render (F6)
<sinned6915> where i define RHole, it calls the function ScrewHole from the library with the variable H
<sinned6915> like this?
<sinned6915> i made the assembly a module, i dont think that changes anything
<J1A84> ok now place the ! on the difference and render again
<J1A84> (remove the old ! )  .. that was looking as it should
<sinned6915> yup
<sinned6915> this is in 2019.05, and its working like it should
<J1A84> then repeat the steps in 2021  - as we try to find what is going wrong
<sinned6915> thank you. give me a momnt
<sinned6915> same source file
<sinned6915> no errors, no warnings.
<sinned6915> the threads.scad i am using is a local folder copy off of InPhase's github
<sinned6915> so I am pretty sure its the latest
<J1A84> please try  !RHole(H)HermiNut();
<J1A84> btw you using use <./threads_v2p1.scad>   which is in a different folder and has a different name
<sinned6915> i was flip flopping the two libraries
GNUmoon has quit [Remote host closed the connection]
<sinned6915> the v2p1 is the proir version of threads
GNUmoon has joined #openscad
<sinned6915> J1A84 is this what you meant?
<J1A84> with !  not #
<sinned6915> i am getting something now, but i dont understand why/what
<sinned6915> it seems recursive
<J1A84> not sure what the v2p1 does - i tested this with the current  but also with scad 2022.05.04 (snapshot)  which is looking fine
<sinned6915> don worry about v2p1, its the old name for the library
<J1A84> it is possible that 2021 handles the empty children differently as you using the code not as it was intended
<J1A84> ( latest change of that lib were 6 month ago not sure what changed)
<sinned6915> right, the empty children thing is what i was suspecting
<sinned6915> and i have been trying to figure out if there is something in the changelog
<sinned6915> so i have to apeend HermiNut() to the thread definition that I created?
<J1A84> if you see https://github.com/rcolyer/threads-scad/blob/master/threads.scad#L355   what you really want to use is ScrewThread instead of ScrewHole
<J1A84> if you append HermiNut() you need to change the union() into an intersection too
<sinned6915> the tolerances for the threaded hole are looser than external threads.
<J1A84> but i would recommend  download a snapshot version
<sinned6915> but wont intersection make it just the stuff in common?
<J1A84> yes  but the result you get from  the difference with a union of two objects  is what would be the intersection of two negative objects (holes)
<sinned6915> ok, i will try that
<sinned6915> my lack of programming experience is showing up there
<J1A84> here  ScrewThread(1.01*outer_diam + 1.25*tolerance, height + extra_height,
<J1A84>         pitch, tooth_angle, tolerance, tooth_height=tooth_height);   this is what used in ScrewHole  .. just use the same
<sinned6915> yes, i thought about doing that
<sinned6915> i may have to do it that way, i seem to have lost the ability to translate the L/RHoles
<J1A84> RHole(H)translate([0,0,H/2])HermiNut();
<sinned6915> i was trying to translate the RHole
<sinned6915> ok
<J1A84> but again try http://openscad.org/downloads.html#snapshots   so much better
<J1A84> there are some bugs in 2021 which got fixed
<J1A84> one is the handling of empty children (obviously)
<sinned6915> ok, i did not realize that
<sinned6915> is it documented somewhere?
<sinned6915> i honestly try to RTFM before I ask for help
<J1A84> what the issues?
<sinned6915> the bugs/probelems
<sinned6915> i cant seem to find a changelog to buglist
<sinned6915> i am sure i am not looking in the right plabe
<sinned6915> place
<sinned6915> when i looked at the issues pages for what was open i did not see anything abotu children
<J1A84> All i can tell you that  your code with the current thread lib is working with snapshot version (2022)
<sinned6915> J1A84: Thank You for your help. I am dld'g the latet version
<J1A84> u're welcome
<sinned6915> i should have upgraded long ago
<J1A84> well  we should have a RC long ago too Ü
<sinned6915> that script is to create a nut that goes onto both LT and RH threads
<sinned6915> its kinda fun to play with
<J1A84> i am aware .. looks cooler (and works better) with multi start sthreads
<sinned6915> is that yours?
<J1A84> yes
<sinned6915> did you di it in scad?
<J1A84> yes  you can see the scad file for download
<J1A84> but it is a L/R bolt with  L and R Nut
<sinned6915> a company that was a client made threadmills
<J1A84> and it is not a real thread geometry
<sinned6915> they would make these and a double headed stud and pass out at tradeshows
<sinned6915> real thread geometry
<J1A84> yeah not that difficult
<sinned6915> you'd watch seasoned, experienced machinists swap it end for end and screw it on and you could see thie brains short circuiting like "how can this be?"
<InPhase> sinned6915: I see the difference.
_xxoxx has joined #openscad
<InPhase> sinned6915: The problem is that peeps[zen] correctly fixed how difference() will behave. ScrewHole does a difference() { children(); ...thethread...; } 2019 treated the children() as missing if missing, and flipped the negative screw thread around to positive. This was basically a bug that differs from specified usage.
GNUmoon has quit [Remote host closed the connection]
<sinned6915> whoa, what! gimme a moment
<J1A84> they look cool but are much weaker compared to full threads..  but can be useful if you need to get through a other nut first
GNUmoon has joined #openscad
<InPhase> sinned6915: It just happens your design takes advantage of this 2019 bug in how difference works, because you are using the ScrewHole operator that puts a hole in its children as if it generates the positive for the thread. But what you are supposed to be doing is using ScrewHole on the thing to put the hole in. You set up for this in LHole and RHole, but then you don't use those modules you created
<InPhase> correctly.
<sinned6915> is this not correct?
<sinned6915> " children(); all children"
<J1A84> yes you can index children if needed without all are used
<InPhase> It's correct. That's not the problem.
Junxter has quit [Ping timeout: 246 seconds]
<InPhase> sinned6915: Look at your code lines 70 and 71, where RHole and LHole have NO children.
<sinned6915> Inphase: you said that last night and i did nto understand
<J1A84> InPhase  we already found that .. but the code is working in snapshots version
<sinned6915> should the R/LHole be children to main object?
<InPhase> Your code should look like "RHole(H, [0,0,-H/2]) LHole(H, [0,0,-H/2]) HermiNut();"
<J1A84> sinned6915 no the main object is the children() in R/L Hole
<InPhase> sinned6915: And in fact, that resolves it. I just tried.
<sinned6915> it seems to only do the one thread, not both
<sinned6915> but i think i am understanding it
<InPhase> I see both.
<InPhase> Maybe you accidentally put a semicolon in there.
<InPhase> https://bpa.st/DURQ This is what I'm seeing it correct with, in both 2019.05 and 2021.01.
<InPhase> Plus a recent master branch build.
_xxoxx has quit [Quit: Leaving]
JakeSays has quit [Ping timeout: 248 seconds]
JakeSays_ has joined #openscad
<sinned6915> its taking the thread out, but not the right threads. there should be a crossover
<InPhase> We make an effort to strive to preserve the behavior of correct code, but for the sake of keeping the language sane and low in bugs, we can't and shouldn't preserve bug compatibility. You just happened to, by a mistake, stumble into a bug in your code that worked in 2019.05, which led you astray on the right usage.
<InPhase> Yes, I see crossover.
<sinned6915> oh , i totally get that bug issue.
<sinned6915> i even suspected it last night and said i wondered if there was a mistake that 2019 was tolerating and 2012 was not
<InPhase> It's hard to take an image that adequately shows the cross-over, but I definitely see it. :)
<sinned6915> that paste you put up works right
<sinned6915> my code is not
<sinned6915> so what i a struggling to apply is which is the parent and child
<sinned6915> the child is the application of module ?
<InPhase> A() B(); B is the child.
<InPhase> A "operates on" B.
<InPhase> And thus A receives B as children().
<sinned6915> in the case of the thread library, the module defines the threads
<InPhase> ScrewHole is designed to be used as ScrewHole(...) SomeObject();
<sinned6915> ok, iirc we defined the RH and LH becasue of the mirror
<InPhase> You chained that along with RHole(...) { ScrewHole(...) children(); } which means you created an operator RHole to use as RHole(...) SomeObject();
<InPhase> A problem in your usage that you should be mindful of is that your mirror([1,0,0]) operates on both ScrewHole and its children.
<sinned6915> right
<InPhase> That might be fine in this case, but if you did not want it, you would need: mirror([1,0,0]) ScrewHole(...) mirror([1,0,0]) children();
<sinned6915> back up, the mirror is what is throwing off.
<sinned6915> how to do it w/o the LH module
<InPhase> You could also make a DualHole module like: module DualHole(...) { ScrewHole(...) mirror([1,0,0]) ScrewHole(...) mirror([1,0,0]) children(); }
<sinned6915> why would i mirror the children in that last example
<J1A84> InPhase  that code works fine with 2022 too  (without change)
<InPhase> You flip the children around, put a normal hole in them, then flip the universe around again to get the children back to normal, leaving you with a mirrored hole.
<sinned6915> i am going to have to contemplate that one
<InPhase> Basically, you do your operation in the mirror universe temporarily. :)
<sinned6915> i take it that you got your computer issues sorted if you are running openscad?
<InPhase> Yes. That was an extremely arduous battle though, leaving me quite exhausted.
<sinned6915> yes, i KNOW that pain!
<InPhase> 9 hours of extra work right after a full day of work.
<J1A84> this is unnecessary  complex ..  just use two screws and mirror one..  and substract that union from your nut
<sinned6915> hopefully its over
<InPhase> The computer is 100% as good as it was.
<sinned6915> J1A84: i was halfway tying that when InPhase came back.
JakeSays_ has quit [Ping timeout: 248 seconds]
<sinned6915> I have like 4 things to try now.
<J1A84> good training though
<sinned6915> and whole bunch of stuff to contemplate while cutting grass
<InPhase> J1A84: The benefit of ScrewHole over ScrewThread is that it does bonus work to get the clearances right. But of course one is welcome to rip that clearance bonus logic out of ScrewHole's implementation and make one's own.
<sinned6915> yes
JakeSays has joined #openscad
<sinned6915> I think it is useful to have the 2 operations. you dont have to worry about remembering the clearances
<InPhase> But also, I think it is often helpful to do holes as operators, and get used to that mindset. It lets you work in the positive-space with holes as things added.
<InPhase> I penned a philosophy choice into the API, but I think it's a reasonable one given the language structure.
<InPhase> I would not besmirch anyone choosing a different preferred API and customizing. It is a minor "I think this is better" rather than a "it should definitely be this way" to my assessment.
<sinned6915> ok, that is where i get goofed up as to what is parent and what is child
<sinned6915> "// This creates a threaded hole in its children using metric standards by default."
<sinned6915> how does the hole have children?
<Scopeuk> So you would do hole() objectThatShouldHaveHole();
<sinned6915> right, but that seems backwards to me
<Scopeuk> This is the design concept InPhase was talking about
<sinned6915> threads()objectThatShouldHavethreads();
<Scopeuk> It's object hierarchy rather than conceptual design higherachy
<sinned6915> yes, that is where i am lacking in experience
<Scopeuk> Think of it like hole is working the same way as rotate or transform
<sinned6915> i am not disagreeing, i am trying ti get my head around itin the correct way
<Scopeuk> You can only make modifications to your children
<Scopeuk> It's a bit tricky to wrap your head around in the first instance
<InPhase> sinned6915: So the reason it makes sense is because you pick up a block of wood and go "I will drill a hole in it". This is an operation, and modules that act on their children are operators. They change the children.
<InPhase> PutHoleIn() Wood();
<InPhase> This comes from the notion of operators in math and physics, and fits nicely with the functional language philosophy.
<InPhase> It also scales better. TenHoleCircle() Wood(); If you wanted a lot of ten hole circles for some reason, this would be really handy. Without it you'd need to do some clunky differences with loops and you'd lose the abstraction advantages of the operators.
JakeSays has quit [Ping timeout: 240 seconds]
<InPhase> The price is it helps in some cases then to be able to specify the location and orientation of the holes, which is why my ScrewHole module takes optional position and rotation parameters. You then end up with a chain of operators putting holes at various positions and orientations into an object, but it's nice and orderly.
JakeSays has joined #openscad
<sinned6915> i have like 5 years of bad appliction to unlearn
<sinned6915> i am not trying to argut
<InPhase> Yep. There is a reason I described it as worth "getting used to" rather than "obvious".
<J1A84> sinned6915  all is based on how you write your modules ..  difference(){wood();hole()};  is the syntax  so difference is A- B..
<sinned6915> actually, i blame buZz ;)
<J1A84> now you can make a module where A is the children or B .. or where A is the first children and B the second (which is what difference does)
<InPhase> sinned6915: And if you get used to it on the more straightforward hole case, it helps understanding more generalized operators, like teepee's example here with "outline" and "letter" operators: https://github.com/openscad/openscad-advent-calendar-2019/blob/master/xmas.scad
<J1A84> but you also can revert this and write a module that is substracting the first children from the second ..  so you could use  hole(){holeshape(); wood();}
<J1A84> it would just be confusing when there are more children;
<InPhase> sinned6915: One should think of it as doing pretty general sorts of transformations.
la1yv_a has quit [Read error: Connection reset by peer]
la1yv_a has joined #openscad
<buZz> sinned6915: what codestyle are you blaming me for?
JakeSays has quit [Ping timeout: 240 seconds]
JakeSays has joined #openscad
lastrodamo has quit [Quit: Leaving]
JakeSays has quit [Ping timeout: 240 seconds]
JakeSays has joined #openscad
ur5us has joined #openscad
Guest24 has joined #openscad
<sinned6915> buZz: the ones that are bokeded :P
Guest24 has quit [Quit: Client closed]
ur5us has quit [Ping timeout: 258 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee