<Church->
may i ask for some help with openscad coding itself (failing to find needed calculations for 3rd rotation to align part to sloped surface), or this channel here is only about openscad itself development?
<teepee>
totally the right place for both :)
<teepee>
I'm just on my way out for a bit, but just hang out for a bit, good chance someone can jump on the topic eventually
<Church->
https://pastebin.com/eNg8MgXk - managed to align testpart to wall of sloped cylinder, and it works fine .. until i offset aside top or bottom of segment. currently i "fix" that with prerotating part prior alignment, but would be nice to find with what formula (depending on top and bottom circle offsets) to have it aligned
<Church->
you can play with eg. adjusting linerotAngle to have part rotate around segment presented by two circles ..
<Church->
but one i change offsets, need manually adjust fixRotAngle
<Church->
created this simplified model to figure out later how to add/rotate/align extra parts to specified position on side of fan duct that is formed by segments of varying by function bottom & top radiuses & offsets
<Church->
unfortunately found by googling examples of aligning or orientating usually were about not specific orientation part, but of eg. cylinder, that obviously doesn't need extra prerotation to face sloped surface with specific side, due being symetrical in cross-section
<Church->
later one is what i used in my code .. but flaw being previously mentioned, that it orients by two axis, which works if part is round symetrical in cross section, but if need (later attachable) part to always connect to sloped line with it's "bottom", i need extra rotation :(
<Church->
it works fine for me if i don't change offsets (you can paste in openscad from pastebin i posted above), but out of whack, if i do change them.
<Church->
made variables easily changeable with sliders in customizer. what i need - to find how fixRotAngle should be calculated depending on X & Y offsets for bottom and top circles ..
<Church->
hmm .. though seems depending from linerotAngle chosen aswell :/
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
<tgunr>
InPhase Thanks, I like the close points. I. see were your going now. Will make adjustments for inner and outer diameters
L29Ah has joined #openscad
qeed_ has quit [Quit: qeed_]
qeed has joined #openscad
<InPhase>
Church-: Can you clarify, is the problem you are struggling with the one of trying to align to low-polygonal representations of those circles?
<InPhase>
Church-: And is a low polygonal representation of those circles a design goal, or just something you ended up with? (i.e., would you rather they be more rounded?)
<Church->
No, "problem" is finding out right calculations to rotate attachable part to sloped wall. ended up with something that "mostly does it", but no clue how to get last rotation auto-calculated, thus for now it's in way of manually adjustable in customizer angle.
<Church->
low poligon count for circles just for sake of rendering speed. and it doesn't affect alignment calculations. circles or red line are there just to help me visualise/see aligning result, if rotations of attachable pseudo-part are wrong.
<InPhase>
Church-: Then I don't understand the issue. If I put 15 in for the angle, and set $fn to 150, it looks aligned. What is wrong about it and what is the desired result?
teepee_ has joined #openscad
<Church->
reset looks to revert customizer to default (with circles center =0,0). then you'll see, that no matter how circle rads / height / linerotAngle are changed, "attachable pseudo part" always is properly aligned with "yellow bottom" to centres of circles.
<Church->
except .. if also any circle offset is changed.
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
<Church->
then depending on linerotAngle (in other words, on which angle of circle) part turns sideways or top facing center, and needs manual "fixing", which i'd like to avoid
<Church->
( i meant changes to any of crcXoff/crcYoff/crctopXoff/crctopYoff, that messes rotations/add need for extra rotation to be done)
<J23k53>
if this is about gimbal lock - you can use quaternions
<Church->
ok, sounds like issue is not as trivial as it seemed initially, when i thought that some simple trig calc for that last rotation angle is enterable. probably i should give up. spent few weeks too many on what was supposed to be optional extra in fanduct's model
Ari has joined #openscad
Ari has quit [Client Quit]
<InPhase>
Church-: It's probably the sort of problem I'm typically good at solving, but I'm unable to understand your description of the issue.
<InPhase>
Church-: Something about the phrasing is unclear to me. Perhaps a slight language barrier issue on such a complicated topic, but there is an option to explain more clearly with code. You could show a version of the source code which is not working, and then show what you want it to look like by a manual hack, and then I could look at those two versions of the code and determine if there's a way to do
<InPhase>
I clicked open that PR with suspicion. :) I knew I didn't write slow binary stl export. But the inefficiencies resolved seemed to be upstream in creating the tesselations. Solid work.
mmu_man has quit [Ping timeout: 265 seconds]
<InPhase>
And for the ascii part in the string generation.
mmu_man has joined #openscad
<Scopeuk>
Ochafik has a fair solid track record arround here.and a different handle I always forget
<Church->
InPhase: sorry, english is not my native language. both working & "manual hack needed" scenarios with same code https://pastebin.com/eNg8MgXk
JakeSays has quit [Ping timeout: 240 seconds]
<Church->
"limited test case that works properly": with default values (crcXoff/crcYoff/crctopXoff/crctopYoff), you can change any but these. Rotate part around with linerotAngle. = part aligned/rotated properly & always faces with yellow underside "bowl wall".
<Church->
"partial aligning with manual rotation needed": change any offset (eg. crcXoff=10). Rotate part around with linerotAngle. By two axis aligned/rotated ok, but not facing with yellow underside "bowl wall", until "manually fixed with eg. for linerotAngle=0 fixRotAngle=180, 45:~ -110, 90:~ -54.
<Church->
(and only for linerotAngle=0 yellow underside of part turned to "bowl wall")
<Church->
erpt. sorry, for =180. (unfortunately cannot "edit" in IRC already entered message)
JakeSays has joined #openscad
Guest95 has joined #openscad
<Guest95>
Hey y’all!
Guest95 has quit [Client Quit]
<peepsalot>
18s attention span :-/
<Church->
that aligning code i wanted to use to attach some parts to side of fanduct i'm working on http://nav.lv/~church/extra-fan-duct-v037tmp.scad as i had hardship aligning to it's walls parts, getting right rotation angles, wanted to first try on simpler model something similar
<Church->
(eg. here for red test anchors on walls at 45deg angles i couldn't line them up properly with nozzle walls)
LordOfBikes has quit [Remote host closed the connection]
erectus has quit [Read error: Connection reset by peer]
erectus has joined #openscad
use-value has quit [Remote host closed the connection]
RichardPotthoff has quit [Ping timeout: 246 seconds]
<InPhase>
Church-: Yeah, that's basically the same text description that I'm not understanding.
<InPhase>
Church-: I can change crcXoff to 10, and I do see yellow flips around, but the rest of what you are saying about it I do not at all understand.