HELP PLS! Rotation/position issues in dynamic component

Hello all, I’ve been working on a dynamic component that will give me the ability to quickly model where overhead speakers should go based on the room dimensions. The user enters the floor to speaker height and the speaker placement lines adjust accordingly. The user also has the ability to enter the angle of the speakers. Here is a note on that:

“The optimal angle for the overhead speakers is 45°. However, they have a leeway of ±15°. This means the speakers can be placed anywhere within 30° to 60°. If an angle is entered outside of that range, the speaker placement lines will snap to the nearest allowed angle. That angle is shown in “Constrained Angle”.”

This all works great. However, when I moved on to implementing speakers to be placed on the ends of those lines, I ran into some issues. The speakers are able to be adjusted when the height is entered, but they remain in the same location when the user inputs an angle other than 45 degrees. I don’t know how to approach this so that the speakers are able to stick to the line when a different angle is entered. This would require the rotational angle of the speaker to be adjusted so that it remains pointing to the center as well. If anybody has any ideas of how to approach this or steps to take to achieve this, please let me know. Any help is greatly appreciated!! Thanks in advance.
Overhead Speaker Position Dynamic Component (45degworks).skp (407.6 KB)

Can you just put the speaker component inside the line component?

Just did a single speaker, something like this maybe?

Overhead Speaker edit.skp (399.2 KB)

1 Like

Ya man that is a great idea. Didn’t even think of that. I’m gonna incorporate that to the other speaker planes and see how it works. Thanks!

1 Like

Could you tell me how you were able to get the speaker to keep it’s size? When I attempted this, the speaker looked warped and changed sizes when I adjusted the height. I troubleshot this issue and couldn’t find the cause. Thanks!

Overhead Speaker Position Dynamic Component (45degworks) - Copy.skp (2.1 MB)

Yes restrain the LenX,Y & Z with an = sign. That way if it deforms it snaps back to size on redraw. I did this in my example:

Thanks for the advice. I tried this out but I couldn’t get it to work after lots of troubleshooting and trial and error. When I input the speaker size on my model, the speaker became warped and went off the line.

I think my main issue is this:
I need the “floor to tweeter height” to reflect the distance from the floor to the front face of the speaker where the line hits (the tweeter). Right now, it is reflecting the height from the floor to the highest point on the speaker. For example, when I type in 10ft, the distance from the floor to front face of speaker where the line hits should be 10ft. When I switch it to “None” the distance from the tip of the line and floor should be 10ft. I can not find a way to do this… If you have any ideas or advice that’d be great, thanks again for all the help.

IMPORTANT NOTE: When I am referring to “distance from the floor to front face of speaker”, I mean that for on the Z axis (vertical). Not from the starting point of the line to the end. I am referring to from the tip of the line to straight down to the floor.

Hey sorry, been busy with other work. Will have a look next I get some free time.