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.
Featurescript: How to create a line between two points (vectors)
leon_poot
Member, Developers Posts: 87 ✭✭✭
How do I create a line in FS between two points (vectors), not using sketch points?
since line(point,direction) only offers a direction, would I need to calculate the direction somehow, and how would I do that?
since line(point,direction) only offers a direction, would I need to calculate the direction somehow, and how would I do that?
"A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools." - Douglas Adams, Mostly Harmless
Tagged:
0
Best Answers
-
Lee_Hesketh Member, Developers Posts: 148 ✭✭✭Hi, you could use opFitSpline to create a line. Here's an example.
https://cad.onshape.com/documents/776ddb3ef15260854472eb20/w/fcc30f46f7ec49c9d7678777/e/323029f263e7c1adc3f27039
There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!5 -
mahir Member, Developers Posts: 1,309 ✭✭✭✭✭opFitSpline would work well if your goal is to have a curve entity that is visible after regenerating the FS. If you're trying to create a line that will be used in the FS for other purposes (e.g. pattern axis, plane normal, etc), then you can generate the direction with some simple vector math. The direction for a line going from point A to point B is simply B - A. So a line entity for that line would be generated using line(A, B-A).5
Answers
https://cad.onshape.com/documents/776ddb3ef15260854472eb20/w/fcc30f46f7ec49c9d7678777/e/323029f263e7c1adc3f27039