Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8557

Offset a curve with respect to some vector

$
0
0

I’m trying to offset a curve relative to some vector. I am expecting a result curve such that when viewed down on the curve from the vector, each point on the curve is the offset distance away from the input curve. But with both attempts shown in the code below, I get a curve equivalent to offsetting the input curve relative to the world z-axis. Is this a bug?

Vector3d v = new Vector3d(0.5, 0, 0.5);
v.Unitize();

curve.Offset(new Plane(Point3d.Origin, v), 0.25, 0.002, CurveOffsetCornerStyle.Round);

Point3d guidePt = curve.PointAtStart + Vector3d.CrossProduct(curve.TangentAtStart, v);
curve.Offset(guidePt, v, 0.25, 0.002, CurveOffsetCornerStyle.Round);

edit – some curves offset as expected. arcs do not

7 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 8557

Trending Articles