Skip to main content
Question

Angle polygon to a plane

  • June 21, 2023
  • 2 replies
  • 27 views

jdh
Contributor
Forum|alt.badge.img+40

Hi,

I have a scenario where I have a 2D polygon and 3 3D points. I need to force the polygon to 3D in such a way that it lies on the plane defined by the three points.

 

Thoughts?

2 replies

daveatsafe
Safer
Forum|alt.badge.img+20
  • Safer
  • June 22, 2023

Hi @jdh​,

You could try aggregating the three points, then scaling by center point to force the XY values outside of the XY of the 2d polygon. Deaggregate, then use SurfaceDraper in Vertex mode to drape the polygon on the scaled points to set the elevations.

Another method would be to calculate the equation of the plane in Python, then apply it to the polygon vertices. This page will be a start: https://www.geeksforgeeks.org/program-to-find-equation-of-a-plane-passing-through-3-points/


ctredinnick
Supporter
Forum|alt.badge.img+19
  • Supporter
  • June 23, 2023

If your polygon is regularly shaped, three points like a triangle like you say. Aggregate the three 3D points into a multipoint, and use a HullReplacer (convex mode). it works in 3D!