Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Obtaining the perpendicular of a vector in the direction of a reference point
neobobkrause
Member Posts: 105 EDU
I have a vector at a point. I need the vector perpendicular to my vector that points most closely to a reference point. perpendicularVector will give me an arbitrary vector, but not necessarily the one pointing most closely to the reference point. It seems to me that another way of looking at this problem would be to consider a circle with a center perpendicular to my vector, and I to find a point on that circle which is closest to the given reference point, then create a vector pointing from my point to this closest point on the circle.
Thanks for any help.
- Bob
Thanks for any help.
- Bob
0
Comments
The document I'm working with is here. I'm trying to use the 3D Helix custom feature, but I need a few more bells and whistles than it currently has. For example, I need to control the direction of the helix along the spline. So I added a "Reverse direction" option. I also need to control the initial orientation of the helix. So I'm trying to add an "Initial reference point" option. This is where I'm getting stuck. What I want in this simple project is the ability to control whether all side helixes all start oriented toward the reference point. The UI framework is in. I've also taken a shot at some of the heavy-lifting for the implementation to control the orientation, but can't get it to work.
Once again, any input is much appreciated.
- Bob
If you want a helix along a straight line, you can use the
<a rel="nofollow" href="https://cad.onshape.com/FsDoc/library.html#opHelix-Context-Id-map">opHelix</a>
function.IR for AS/NZS 1100
Thank you. Though the sample document depicts a helix around lines, The 3D Helix feature must support all types of curves.
Turns out, I just needed to walk away and come back with a fresh outlook. I've updated my code, which now generates a helix that starts at the point furthest from an optional initial reference point. I've updated the FS code in the MetaHelix document accordingly.
- Bob