How to find points over a single border of a surface
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi guys,
i'm dealing with a 3D surface which has straight and curved borders. I have a matrix which contains all the points laying on the borders, now i want to extract the points on each border. Since i work with different kind of surface, i can't select the points by the way of x y or z values, bcs I can have also an inclined surface, and so no chance to select points which share the same x, y or z coordinates.
Do u have some suggestions?
Hope the question is clear and thanks in advance.
Réponses (1)
Shubham
le 1 Juin 2023
Hi ENRICO,
Since you have a mesh representation of the surface and a matrix of points on the borders, you can use the connectivity information to identify and separate the points that belong to each border. Here's one approach you could try:
- First, you need to find the vertices in the mesh that correspond to the points in your Nx3 matrix. You can do this by computing the Euclidean distance between each point in the matrix and every vertex in the mesh. If the distance between a matrix point and a mesh vertex is below a certain threshold (e.g., 10^-3), you can assume that they represent the same point.
- Once you have identified the mesh vertices that correspond to the points in your matrix, you can use the connectivity information to separate the vertices that belong to each border. You can start by identifying all the vertices that are adjacent to the points in the matrix. Then, you can traverse the mesh along the edges to find all the vertices that are connected to the previously identified vertices. Repeat this process until you have identified all the vertices that form a closed loop around the border.
- After identifying the vertices that belong to each border, you can generate a new mesh for each border by selecting the vertices that belong to the current border and their corresponding triangles. You can then save each mesh as a separate file or use it for further processing.
I hope this approach helps!
0 commentaires
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!