- Right now, MATLAB does not support the conversion of MATLAB files to CAD files in STEP format (STP/STEP file is a 3D CAD file format).
- Instead, you can make use of "stlwrite" function in MATLAB to export the figure as an STL file, which is a commonly used 3D CAD file format.
- For creating stl file: In the Matlab command window, type "stlwrite(filename,vertices,faces)". where "filename" is the name, you want to give to the STL file, "vertices" is the vertices data from the figure, and "faces" is the face data from the figure.
- The STL file will be saved in the current Matlab working directory.
- Then, this STL file can be imported into a 3D CAD software and can be saved as an STP file.
How create a 3d model then save as step file format (stp) ?
204 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jenifer NG
el 8 de Feb. de 2023
Respondida: Gayatri Rathod
el 1 de Mzo. de 2023
Dear All,
Could anyone know how to create a 3d model then save as stp file ?
for example: a spare box with edge a =10cm.
Thanks and Regards
Han
0 comentarios
Respuesta aceptada
Gayatri Rathod
el 1 de Mzo. de 2023
Hi Jenifer,
In MATLAB, the patch function can be used to generate a 3D model by specifying the vertices and faces of the object. This function provides a convenient way to plot and visualize 3D objects in MATLAB.
Here's an example code to create a box with edges of length 10 cm:
% Define box edges
a = 0.1; % meters
% Create box vertices
vertices = [0 0 0; a 0 0; a a 0; 0 a 0; 0 0 a; a 0 a; a a a; 0 a a];
% Create box faces
faces = [1 2 3 4; 2 6 7 3; 4 3 7 8; 1 5 8 4; 1 2 6 5; 5 6 7 8];
% Plot box
patch('Vertices', vertices, 'Faces', faces, 'FaceColor','red');
To save the model as .stp file: -
Hope it helps!
Regards,
Gayatri Rathod
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre MATLAB Support Package for USB Webcams en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!