Surface normals at wire intersections

Everything DG Kernel: Technical discussions and issues
Post Reply
Mick Saleh
Posts: 1
Joined: Thu Nov 14, 2024 10:54 pm

Surface normals at wire intersections

Post by Mick Saleh »

I need to obtain normals at the intersection vertices between a wireframe box and surface. What is the easiest way to obtain such normals, and intersection points.
Carlos Dsouza
Posts: 1
Joined: Mon Nov 18, 2024 3:29 am

Re: Surface normals at wire intersections

Post by Carlos Dsouza »

I think you need to do it for each of the twelve edges of the box. The main tool is IUVSurface_DG.GetCurveIntersection(ICurve_DG curve, ...) see it in the documentation.

When you get coordinates of an edge, create a ILine_DG out of it: IObjectGenerator_DG.Create<ILine_DG>(), cast to ILine_DG. Set the location and direction accordingly.

Query ICurve_DG out of the ILine_DG and use the IUVSurface_DG.GetCurveIntersection(). It will return you parameters for both u,v of the surface and the line/curve. IUVSurface_DG.GetPoint(uv) and IUVSurface_DG.GetNormal(uv) will return what you need.

Cheers
Post Reply