STL Read

Read STL files

This script imports 3D geometry from a STL file into PRIMER, creating a new part composed of shell elements.
Key Features:
Supports Both ASCII and Binary STL: The script automatically detects whether the selected STL file is in ASCII or binary format and parses it accordingly.
Flexible Model Destination: If no model is open, a new one is created. If a model is already open, the user is prompted to either import the geometry into an existing model or create a new, separate model for the import.
Automatic Part Creation: A new Part is automatically created to contain the imported geometry, along with a default *SECTION_SHELL and *MAT_ELASTIC to ensure the model is valid.
Creates a Connected Mesh: The script performs node merging during the import process. This ensures that triangles sharing a vertex in the STL file will share the same node in PRIMER, resulting in a clean, connected shell mesh.
Progress Feedback for Large Files: For files larger than 5MB, a text-based progress percentage is displayed in the main dialogue box during the import, providing feedback and assurance that the script is working.