views:

31

answers:

0

I have a terrain and a surface, the terrain is represented by a list of elements and coordinates, where as the surface is defined a list of 3D Lines. The surface can be located above, or below or half-above-half-below the terrain.

The issue now is that from the edge of the surface, I would have to generate slope planes that connect to the terrain according to certain rules. An example of such rules can be like this:

  1. Starting from an edge of the platform, construct a plane that is 45 degrees to the XY plane, extend the plane until you hit the terrain or reach 1000 mm, whichever comes first.

  2. If reach the terrain, then stop, the plane is considered complete. Or else, Create another plane at 1000mm length from the original platform edge, this time the plane's degree is 30 degrees to XY plane, again extend the plane until you hit the terrain or reach 1000mm, whichever comes first.

  3. Repeat 1 and 2 until terrain is reached.

Now, the only way I can think of, is to do it by brute force, i.e., selecting points on the platform edge, create a line 34 degrees to the XY plane, test whether it reaches 1000mm or hit the terrain, and construct planes out from it.

This is really messy, and it gets harder when the rules are getting complicated.

Is there a better approach?