Design and Development of a Macro to Compare Sections of Planes to Parts Using Programming with Visual Basic for Applications in CATIA
Fecha
2023-01-16
Título de la revista
ISSN de la revista
Título del volumen
Editor
Multidisciplinary Digital Publishing Institute (MDPI)
Resumen
This article presents an application for educational purposes in the field of engineering
graphics, which corrects the dihedral projections of the sections of a plane for a part by comparing
the solution provided by the student with that obtained through 3D CAD modelling software.
Said application is generated as a macro in CATIA (Computer-Aided Three-Dimensional Interactive
Application), which is included as a tool in the ‘Part Design’ module. The code of this macro is written
in the CATVBA language, utilizes the CATIA internal editor, and takes advantage of the capabilities
offered by Visual Basic for Applications (VBA) in the design of Graphical User Interfaces (GUI). The
operation of the macro consists of obtaining the section in the 3D CAD model, projecting it onto three
dihedral projections of the part (elevation, plan, and profile), and calculating the visible and hidden
lines by means of a numerical process based on dividing the lines into discrete sections. Likewise,
to obtain numerical results, the section obtained in CATIA (reference section) is compared with the
section provided by the student (section that needed to be corrected) by means of a spreadsheet
(Microsoft Excel). The data of the coordinates of the points of the reference section are exported to
said spreadsheet as is the data of the coordinates of the section that needed to be corrected, which is
contained in a file with a dxf format (Drawing eXchange Format). From these data, by programming
the appropriate formulae in the cells of the spreadsheet, the numerical values of the errors are
obtained, thereby locating said errors in the dihedral projections of the section which needed to be
corrected. Likewise, the application can be programmed to compare the central symmetry of both of
the sections.
Descripción
Palabras clave
macro, visual basic for applications, CATIA, Microsoft Excel, planar section, computer-aided design, errors
Citación
Rojas-Sola, J.I.; del Río-Cidoncha, G.; Ortíz-Marín, R.; Moya-Ocaña, J.A. Design and Development of a Macro to Compare Sections of Planes to Parts Using Programming with Visual Basic for Applications in CATIA. Symmetry 2023, 15, 242. https://doi.org/10.3390/sym15010242