No functions for line manipulation?
sören_svensson
Member Posts: 24 ✭✭
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
-
We 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
-
We 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 -
Thanks for the info0

