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.
No functions for line manipulation?
sören_svensson
Member Posts: 21 ✭✭
Hi,
I've haven't found any functions for manipulation of Vector and Line objects.
Something like:
var line1 = line(vector(x1, y1), vector(d1, d2));
var line2 = opRotate(line1, vector(p1, p2), 90 * degree);
var vector3 = opIntersection(lineA, lineB);
Am I missing something or do I really have to write them myself?
I know about opTransform but I don't see how to use it for Line objects for example.
And everything I've found about intersection is related to planes and booleans.
Regards
Soren
I've haven't found any functions for manipulation of Vector and Line objects.
Something like:
var line1 = line(vector(x1, y1), vector(d1, d2));
var line2 = opRotate(line1, vector(p1, p2), 90 * degree);
var vector3 = opIntersection(lineA, lineB);
Am I missing something or do I really have to write them myself?
I know about opTransform but I don't see how to use it for Line objects for example.
And everything I've found about intersection is related to planes and booleans.
Regards
Soren
Tagged:
0
Best Answer
-
ilya_baran Onshape Employees, Developers, HDM Posts: 1,210We do have some line functions, but the lines are in 3D. The code is defined in curveGeometry.fs. You can do things like:
const zAxis = line(vector(0, 0, 0) * inch, vector(0, 0, 1));
var line1 = line(vector(1, 2, 3) * inch, vector(1, 0, 0));
var line2 = rotationAround(zAxis, 90 * degree) * line1;
debug(context, line1);
debug(context, line2);We have plane-plane and plane-line but not line-line intersection functions in the library (surfaceGeometry.fs) at this time.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc5
Answers