Main Content

vrcadcleanup

(To be removed) Clean up virtual world 3D file exported from CAD tools

vrcadcleanup will be removed in a future release. For more information, see Version History.

Syntax

vrcadcleanup('filename')
vrcadcleanup('filename', 'hint')

Description

vrcadcleanup('filename') copies the specified file to a backup file with the extension bak. It then modifies the virtual world 3D file exported from Pro/ENGINEER™ or SolidWorks®. This cleanup enables the Simulink® 3D Animation™ software to use these files.

vrcadcleanup performs the following modifications to VRML files:

  • Removal of everything except inlines, viewpoints, and transforms

  • Provision of names for inline transforms

Note

You can use vrcadcleanup with VRML files (.wrl), but not with X3D files (.x3d or .x3dv).

vrcadcleanup('filename', 'hint') takes in account the value of 'hint' during conversion. Possible value of 'hint' includes:

ArgumentDescription
'solidworks' Assumes that the software is exporting the original set of virtual world 3D files from SolidWorks. This option adds or increments the numerical suffix to the node names to match the part names that exist in the corresponding physical modeling XML file.

This function expects the input file structure to correspond to the typical output of the specified CAD tools. The typical input file should contain:

  • A structure of viewpoints and inline nodes (possibly contained in one layer of transform nodes)

  • One inline node for each part of the exported assembly

The function also performs the following:

  • Upon output, discards any additional nodes, including transform nodes, that do not contain inline nodes.

  • Processes hierarchically organized assemblies, where inline files instead of part geometries contain additional groups of nested node inline nodes. In such subassembly files, copies all inline references to the main virtual world 3D file. The function wraps these inline references with a Transform node, using a name that corresponds to the subassembly name.

Note

If you call this function for a file that is not a product of a CAD export filter, the output file might be corrupted.

Version History

Introduced in R2009a

collapse all

R2023b: To be removed

The vrcadcleanup will be removed in a future release. Instead, use sim3d classes and Simulation 3D blocks to interface MATLAB® and Simulink with the Unreal Engine® 3D simulation environment. To get started, see Create 3D Simulations in Unreal Engine Environment.