Hey Jasdeep,
Yes, you can programmatically find faces, edges, and vertices of an imported geometry in the PDE Toolbox using the findFaces and findEdges functions along with geometric queries.
Finding Faces Based on Location
If your geometry is stored in model.Geometry, you can use findFaces to locate faces that contain a specific point:
importGeometry(model, 'your_geometry.stl');
faceID = findFaces(model.Geometry, 'Point', queryPoint);
disp(['Face ID at location: ', num2str(faceID)]);
Finding Edges Based on Location
To get edges near a specific location, use findEdges:
edgeID = findEdges(model.Geometry, 'NearestPoint', queryPoint);
disp(['Edge ID near location: ', num2str(edgeID)]);
Finding Face IDs Without Visual Inspection
If you need to check all faces and their approximate locations:
numFaces = model.Geometry.NumFaces;
disp(['Face ', num2str(i), ' centroid: ', num2str(centroid(model.Geometry, i))]);
This should let you programmatically identify faces and edges without manually checking the plot.
Follow me so you can message me anytime with future MATLAB questions. If this helps, please accept the answer as well.