Effacer les filtres
Effacer les filtres

Obtain 3D shape cross section

7 vues (au cours des 30 derniers jours)
Ahmed
Ahmed le 8 Août 2023
i have designed a part in CAD based software as shown in the image, this shape is extruded on the Z axis. I am looking for a way to import this geometry into MATLAB and select a specific Z offset from which i can obtain the points that make up the cross section at the Z offset. Additionally I would like to seperate the points into an outer and inner groups and order the points in a way that if plotted they connect to draw the accurate cross section with no intersections.
I have tried importing the shape as an stl file and then i obtain the points at the desired Z offset by getting the intersetcions of the triangles generated from the mesh at the Z offset, however the points obtained are not in order and adapting the nearest point algorithm isnt sufficient to correct the order for any random geometry.
  1 commentaire
Daniel Bengtson
Daniel Bengtson le 8 Août 2023
If this example is representative of the shapes that you are working with, could you convert the points that you have into polar coordinates then just sort by theta? Thresholding between the outer and inner boundary could probably be done by clustering rho.

Connectez-vous pour commenter.

Réponses (1)

Shubham
Shubham le 6 Sep 2023
Hey @Ahmed,
Building on the idea suggested by @Daniel Bengtson in the comments, You can separate the inner and outer points by various ways:
  1. Clustering the points
  2. Using any known feature or shape that your CAD model provides to get the threshold value to categorize between inner and outer points.
  3. You can visually inspect the cross-section and adjust the threshold until it separates the points correctly.
  4. Calculate the distance between each point and the centroid of the cross-section. Set the threshold based on the mean distance from the centroid of cross section (average of points) to all other intersection points.
After separating the points into inner points and outer points, You can order them based on their angle. Take one point and centroid as a reference and calculate angles of other points and sort them.
Hope this helps!!

Catégories

En savoir plus sur Model Import dans Help Center et File Exchange

Tags

Produits


Version

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by