[RhinoCommon] Projecting a Curve onto three Planes


I am searching for an elegant way of projecting a curve (cyan) onto three intersecting PLANES (gray) in order to achieve a projected curve (red).

At the moment, all that comes to my mind is extruding the curve, splitting it with one plane after the other, and somehow extracting the boundary curve of the remaining object, but this seems to be rather slow, complicated and error-prone.

Is there a simpler way?

Also, as a second step, i need a Brep consisting of three planar surfaces instead of the red curve. How can that be done?

Best regards, Heinz

I also had this issue. But in the end I used brep to project curves onto.

The difficulty with this problem is that you can
a) project blue curve on each plane
b) split that curve by plane

But Problems occur:

  1. You do not know which side you should cut curve
  2. The order of cutting is also not known as now adjacency queries are involved.

Hey @Petras_Vestartas, the problem is that i do not have a Brep to project my curve onto. I just have the three planes. And yes, projecting the blue curve onto each Plane separately and merging the three projections into one curve might really be cumbersone, that’s why i was wondering about a more ‘elegant’ way.

Appeared to be a piece of cake when i started out, but actually i am not so sure anymore… :frowning:

Do you know the order of planes?

Can you give us example of your script to understand the logic behind?
I assume this is not only one case or projection.

There is no script, @Petras, i want to discuss how this can be done hassle-free and code it afterwards. I need this to be done several thousand times, and - yes, i know the order of planes.

Every approach i can imagine involves a lot of steps, which makes the entire thing quite risky for me, since i don’t want to evaluate several thousand resulting geometries.

I could, of course, intersect plane0 with plane1, then intersect plane1 with plane2, normal-project both resulting intersection-lines to the plane my blue rectangle is on, split that rectangle into three parts by these two lines, project those parts parts to the respective planes and merge them afterwards.

However, i suspect this can be done in a more straightforward manner.

Any ideas?

Best regards, Heinz

I think it is probably only one way to do as you describe.
Also plane plane intersection are quick, so maybe writing code mabe be tedious but it should be fast.

Also you can extrude curve, and cut that by planes, but it will only work for convex cases.