Step file import of trimmed NURBS surfaces
Versión 1.1.0 (585 KB) por
Michael Loibl
Reads geometries from .stp/.step files. The type of geometries are NURBS surfaces. Multiple patches and trimmed patches are recognized.
Get started
The easiest way to test the provided code is to run the script "test_step_import". Plotting functions are illustrating your import and help to check whether the import worked correctly. A set of really simple geometries is provided - they start with "geometry_". The import was also tested for more complex geometries. However, these files cannot be provided due to licensing reasons.
Import function
The main contribution is the step import function "import_STEP.m". It reads a geometry from a .stp/.step file. The type of geometry is limited to NURBS surfaces (including B-splines of course). Multiple patches and trimmed patches are recognized. The aim of the code is to make the NURBS description of geometries created in CAD available and usable in Matlab.
Plotting of imported geometry
When running the script "test_step_import", you see automatically plots in the parametric and physical space. Thereby, you can easily check whether your import worked correctly. You can change the resolution of the plots:
resolution_param = 10; % resolution of trimming curves in the parametric space
resolution_phys.surf = 2; % resolution of surfaces in the physical space
resolution_phys.curv = 10; % resolution of curves in the physical space
Creating a step file
I created my step files with Rhino 7, but hopefully every other CAD software should work as well. Important is that the parametric description of your trimming curves is included in the step file. In Rhino, this is an extra option in the export menu. Furthermore, I select the AP214 AutomativeDesign format when exporting my geometries.
Problems with your import
In case your geometry cannot be imported but is a NURBS surface, please contact me. I can try to extend the import function for your geometry.
Citar como
Michael Loibl (2024). Step file import of trimmed NURBS surfaces (https://www.mathworks.com/matlabcentral/fileexchange/123425-step-file-import-of-trimmed-nurbs-surfaces), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2019b
Compatible con cualquier versión desde R2006a hasta R2022b
Compatibilidad con las plataformas
Windows macOS LinuxEtiquetas
Agradecimientos
Inspirado por: Plot 2D/3D Vector with Arrow
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.1.0 | Bug fix: The edges of closed cylinders were falsely detected. New plotting features. |
|
|
1.0.0 |
|