jianbaoxia
CAD master
Hello, I‘m JianBaoxia.
I'm trying to find the lowest point (the point with the minimum z-coordinate) on a surface. It seems that directly traversing all (u, v) coordinates uniformly may not guarantee accuracy and efficiency. So, I'm attempting to use the gradient descent algorithm to find the lowest point.
The idea behind this algorithm is to move along the negative direction of the u and v derivatives on the surface to determine the next (u, v) values. However, the derivative type returned by Geom_Surface->D1() is gp_Vec, which represents (x, y, z) coordinates. This is where I'm stuck. I can't simply calculate the next point on the surface based on the (x, y, z) values. Although I can easily update the (x, y, z) coordinates of a point and use GeomAPI_ProjectPointOnSurf to obtain the point on the surface closest to it, this approach doesn't perform well in terms of accuracy and efficiency.
Can you please provide some suggestions? I would greatly appreciate it.
I'm trying to find the lowest point (the point with the minimum z-coordinate) on a surface. It seems that directly traversing all (u, v) coordinates uniformly may not guarantee accuracy and efficiency. So, I'm attempting to use the gradient descent algorithm to find the lowest point.
The idea behind this algorithm is to move along the negative direction of the u and v derivatives on the surface to determine the next (u, v) values. However, the derivative type returned by Geom_Surface->D1() is gp_Vec, which represents (x, y, z) coordinates. This is where I'm stuck. I can't simply calculate the next point on the surface based on the (x, y, z) values. Although I can easily update the (x, y, z) coordinates of a point and use GeomAPI_ProjectPointOnSurf to obtain the point on the surface closest to it, this approach doesn't perform well in terms of accuracy and efficiency.
Can you please provide some suggestions? I would greatly appreciate it.