I need to obtain normals at the intersection vertices between my voxel discretization and surface. What is the easiest way to obtain such normals, and intersection points.

Benjamin Bihler Mon, 06/08/2015 - 11:32

For intersection points between curves and surfaces you might want to check GeomAPI_ExtremaCurveSurface.

A surface normal at a certain point can be obtained like this: project the point onto the surface to get its u and v parameter. For this you could use ShapeAnalysis_Surface::ValueOfUV. Then compute the first derivatives of the surface to have vectors spanning the tangent space. This can be done with Geom_Surface::D1. If you compute the cross product of both vectors, you have the normal vector.

Hi Benjamin,
Thank you for your answer, I understood the second part, but could you elaborate a bit on first part. I have voxelised surface, and then I need to find the intersection points for every voxel.

Mon, 06/08/2015 - 11:32

For intersection points between curves and surfaces you might want to check GeomAPI_ExtremaCurveSurface.

A surface normal at a certain point can be obtained like this: project the point onto the surface to get its u and v parameter. For this you could use ShapeAnalysis_Surface::ValueOfUV. Then compute the first derivatives of the surface to have vectors spanning the tangent space. This can be done with Geom_Surface::D1. If you compute the cross product of both vectors, you have the normal vector.

Benjamin

Mon, 06/08/2015 - 16:10

Hi Benjamin,

Thank you for your answer, I understood the second part, but could you elaborate a bit on first part. I have voxelised surface, and then I need to find the intersection points for every voxel.

Stefan

Mon, 06/08/2015 - 18:18

I am sorry, my proposal only works if you have a Geom_Surface or something similar.

Benjamin

Mon, 06/08/2015 - 18:48

Anyway thanks for the effort