Sampling of a surface

Everything DG Kernel: Technical discussions and issues
Post Reply
A_D
Posts: 1
Joined: Tue Nov 19, 2024 2:59 am

Sampling of a surface

Post by A_D »

Hi

I have a face with a hole. I need to sample the surface with points. My problem is that if I use IUVSurface_DG.GetPoint(uv) and uvs are evenly sampled in the IUVSurface_DG.GetRanges().GetRange(0 and 1) the points cover the hole also. I need sampling of the face only.
What is the way?

Thanks
Prashant Kande
Posts: 55
Joined: Tue Jun 18, 2024 6:12 am

Re: Sampling of a surface

Post by Prashant Kande »

Hello

Ranges of a face are basically ranges of the surface which defines geometry of the face. This includes the hole. Holes means there is a curve in uv parameters which excludes the related curved polygon out of the ranges rectangle.

Unfortunately, there is no way currently to check if a uv is inside the trimmed area or not. You could use the method described in the Point to face projection thread. If a uv point has distance greater than a tolerance (e-4 should be enough) it means the uv point is outside of the trimmed area and the 3D point is outside of the face.
Post Reply