Profile extrusion

I want to extrude a profile along a master curve, so that the profile curve is perpendicular to the master curve. I have tried it with Railrevolve, but it is not really good because the profile curve can point only to the gives axis. Is it possible? I have tried Extrude along but that does not work either.

What about Sweep-ing?

I have tried it but it seems to not working with closed curves.

Do it the analytic way (assuming that the profile is placed the classic way: PlaneXY):

  1. For each Curve crv in your crvList.
  2. For each Curve segment in crv.DuplicateSegments();
    3a. If segment is first/last and crv is open get the tangent at start/end
    3b. Else get the bisector with the previous/next segment tangent.
  3. Compute the trim planes (tangent/bisector, CrossProduct(tangent/bisector, globalZ).
  4. Compute the Plane for classic PlaneToPlane trans (at a start offset found via trigonometry [use a box on profile and get a double d = box.X.Length + some tol] then offset is d/Math.Tan(tangents angle)). Find the end offset as well.
  5. Extend each segment both sides with the start/end offsets as above.
  6. Do the PlaneToPlane trans (5) and do a sweep on that extended rail.
  7. Trim the Brep with the trim Planes (4) - READ SDK about what part remains in relation to the plane normal.
  8. Cap (if you want closed Breps).
  9. Sample the pieces in some Tree.