The Mesh Rename from Polyline tool allows users to automatically rename selected meshes based on matching polylines. It also provides an option to create labeled points above each mesh, displaying its name.
Requirements:
Select one or more meshes before running the script.
Select one or more polylines with meaningful names to be used for matching.
Steps:
Run the Script
A dialog will appear with two options:
Rename Mesh according to the polyline – Matches meshes to polylines based on area and bounding box similarity.
Add Point with Mesh name – Creates a labeled point above each mesh showing its name.
Rename Meshes
If this option is selected:
The script compares each mesh with all selected polylines.
Matching is based on:
Surface area (with tolerance)
Bounding box dimensions and center alignment
If a match is found, the mesh is renamed to the polyline’s name.
Create Name Points
If this option is selected:
A point is created above each mesh.
The point is labeled with the mesh name and placed slightly above the mesh surface.
Points are styled for visibility (white color, size 15, name shown).
Notes:
The renaming process uses a scoring system based on area and bounding box similarity. A minimum score is required to confirm a match.
Meshes with holes may have smaller surface areas than their corresponding polylines. The script accounts for this with partial match scoring.
Bounding box comparison includes size and center position in all three dimensions (X, Y, Z).
If no suitable match is found, the mesh name remains unchanged.