Hello all
I need to calculate projection of a point to a plane.
I hope someone can point me in the right direction
Thank you
Point to plane projection
-
- Posts: 65
- Joined: Tue Jun 18, 2024 6:12 am
Re: Point to plane projection
Hello Gin
The easiest way is to find the appropriate interface in the list.
Then search for IPlane_DG in the installed samples. You would find for an example in Face sample:
You can use IPlane_DG.GetPointProjection() or IPlane_DG.GetDistance() straight away.
You can also attach the returned IUVSurface_DG to a face and add it to a model for later. IUVSurface_DG has GetNearestPoints() for the same purpose.
Regards
The easiest way is to find the appropriate interface in the list.
Then search for IPlane_DG in the installed samples. You would find for an example in Face sample:
Code: Select all
private IUVSurface_DG CreatePlane()
{
IPlane_DG iPlane = m_gen.Create<IPlane_DG>();
// define the plane
//....
IUVSurface_DG iSurface = iPlane.As<IUVSurface_DG>();
return iSurface;
}
You can also attach the returned IUVSurface_DG to a face and add it to a model for later. IUVSurface_DG has GetNearestPoints() for the same purpose.
Regards