Hello,
I had found a bug regarding the MinDist, if we use MakeVertexOnSurface to create a sampling of the surface, this can create points outside the bounds of the surface, so I wanted to remove the ‘extra’ points using MinDist, and it looks like MinDist it is actually calculating the distance to the primitive of the face or something in that direction as it gives 0 for evey point.
eg.:
script to repeat this:
face = salome.IDToObject(salome.sg.getSelected(0))
nX=10
for i in range(nX+1):
for j in range(nX+1):
point=geompy.MakeVertexOnSurface(face,i/nX,j/nX)
dist=geompy.MinDistance(point, face)
if round(dist,8)==0:
geompy.addToStudy(point,'point ,dist'+str(dist))
surface to test on:
face.brep (14,6 KB)
regards,
franco