Exporting a Geometry
You can export geometry objects to a COMSOL Multiphysics binary file (.mphbin) or text file (.mphtxt).
To export an existing geometry to file:
In the Geometry toolbar, click Export (), or
Right-click the Geometry node and select Export () from the context menu.
Then, use the following sections to specify the settings of the export:
Export
Select a file type among the available formats in the File type list and enter a filename including the path in the Filename field (or click Browse to specify the filename). Click the downward arrow for the Location menu () to choose Edit Location () (if it is a database location), Copy Location (), and (if you have copied a file location) Paste Location ().
For the COMSOL Multiphysics file types, select the objects to export by first clicking the Export selected objects button and then adding the objects to export to the Selection, or click the Export Entire Finalized Geometry button to export the result of the finalize operation. For STL file export, select what to export from the Geometric entity level list. The different option are Objects, Domains, or Boundaries. Then add the objects or entities to the Selection.
For a geometry part and for a Plane Geometry of a work plane, the Export Entire Finalized Geometry option does not exist, so that button and the Export selected objects button are not available. Instead, just add objects to export to the Selection list.
Click Export to export the selected geometry to the specified file. Click the downward arrow next to Export to select Export To which opens the fullscreen Export window to export the geometry to a database location. A confirmation message appears in The Messages Window.
Advanced
Compatibility for MPHBIN and MPHTXT Files
To export a geometry to use in an earlier version of COMSOL Multiphysics in the COMSOL format, select a version from the Compatible with version list.
The .mphbin and .mphtxt formats do not contain unit information. When the exported file is imported into a geometry with a different length unit, you can use a Scale feature to scale the imported objects to the correct size.
Extra Settings for DXF Files (2D)
From the Curve representation list, select how to represent curves in the exported geometry objects by choosing one of the options Exact representation (default), Approximate splines with circular arcs, or Approximate with polygons. For the two approximations, use the Approximation detail setting to specify how closely the approximation will follow the original geometry. Choose As in graphics preference Detail (default) to use the same rendering detail that is used for the Graphics window. The rendering detail is controlled by a preference setting for Graphics. Use the options Coarse, Normal, or Fine to manually specify the approximation detail without changing the preference setting.
To specify how to handle edges that are adjacent to domains, use the Domain handling setting. Choose Represent edges domainwise (default) to export the edges of each domain as one or several closed LWPOLYLINEs, if possible, or else a sequence of alternating LWPOLYLINEs, ELLIPSEs, and SPLINEs.. This means that each interior edge will be represented twice in the file. Use this option if the receiving software forms domains based on closed LWPOLYLINEs and you need the domains in that software. Choose Represent interior edges once to export each connected domain component as one or several LWPOLYLINEs, if possible, or else a sequence of alternating LWPOLYLINEs, ELLIPSEs, and SPLINEs. The interior edges will appear separately. This option is useful if you don’t need the domains or the interior edges in the receiving software.
Also see Import for details of how to import CAD file formats.