Navigating adjacent faces

Everything DG Kernel: Technical discussions and issues
Post Reply
Kersten Nielsen
Posts: 1
Joined: Tue Nov 26, 2024 2:27 am

Navigating adjacent faces

Post by Kersten Nielsen »

Hi,

I need to do computations on a shell of a solid by stepping over its faces. Is there a way to get the adjacent face when a point is close to an edge?

Thank you very much for any answer!

Kersten
Mike Zubovic
Posts: 6
Joined: Mon Jul 15, 2024 5:20 am

Re: Navigating adjacent faces

Post by Mike Zubovic »

Hello Kersten.
Sorry for the late answer.

I assume the point is 3D. If not (it is a uv point), it is easy to get from the face's surface.

There are two problems:

1. Find the nearest edge and the nearest point on it.
One way to do it is to search geometrically: Loop through the wires and the edges. For each edge get its 3D curve (IBRepEdge_DG.GetCurve()).
ICurve_DG.GetNearestPoint() returns the nearest point and the distance. Select the edge with the smallest distance. This solves the first problem.

2. For an edge the opposite face can be obtained with IBRepEdge_DG.GetOtherFace(theInitialFace)

Regards
Post Reply