0% found this document useful (0 votes)
13 views46 pages

ECAD Import Module User Guide

The ECAD Import Module User's Guide provides instructions for importing and exporting ECAD files, specifically for PCB, MEMS, and IC formats, enabling the creation of 3D geometries for simulation in COMSOL Multiphysics. It details the supported file formats, import settings, and geometry preparation processes, as well as guidance on accessing documentation and support resources. The guide emphasizes the importance of configuring import options and understanding layer stackup information for accurate geometry generation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views46 pages

ECAD Import Module User Guide

The ECAD Import Module User's Guide provides instructions for importing and exporting ECAD files, specifically for PCB, MEMS, and IC formats, enabling the creation of 3D geometries for simulation in COMSOL Multiphysics. It details the supported file formats, import settings, and geometry preparation processes, as well as guidance on accessing documentation and support resources. The guide emphasizes the importance of configuring import options and understanding layer stackup information for accurate geometry generation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ECAD Import Module

User’s Guide
ECAD Import Module User’s Guide
© 1998–2024 COMSOL
Protected by patents listed on [Link]/patents, or see Help > About COMSOL Multiphysics on
the File menu in the COMSOL Desktop for less detailed lists of U.S. Patents that may apply. Patents
pending.
This Documentation and the Programs described herein are furnished under the COMSOL Software License
Agreement ([Link]/sla) and may be used or copied only under the terms of the license
agreement.
Support for implementation of the ODB++ Format was provided by Mentor Graphics Corporation pursuant
to the ODB++ Solutions Development Partnership General Terms and Conditions. ODB++ is a trademark
of Mentor Graphics Corporation.
COMSOL, the COMSOL logo, COMSOL Multiphysics, COMSOL Desktop, COMSOL Compiler,
COMSOL Server, and LiveLink are either registered trademarks or trademarks of COMSOL AB. All other
trademarks are the property of their respective owners, and COMSOL AB and its subsidiaries and products
are not affiliated with, endorsed by, sponsored by, or supported by those trademark owners. For a list of such
trademark owners, see [Link]/trademarks.
Version: COMSOL 6.3

Contact Information
Visit the Contact COMSOL page at [Link]/contact to submit general inquiries
or search for an address and phone number. You can also visit the Worldwide Sales Offices
page at [Link]/contact/offices for address and contact information.

If you need to contact Support, an online request form is located on the COMSOL Access
page at [Link]/support/case. Useful links:

• Support Center: [Link]/support


• Product Download: [Link]/product-download
• Product Updates: [Link]/product-update
• COMSOL Blog: [Link]/blogs
• Discussion Forum: [Link]/forum
• Events: [Link]/events
• COMSOL Video Gallery: [Link]/videos
• Support Knowledge Base: [Link]/support/knowledgebase
• Learning Center: [Link]

Part number: CM023601


C o n t e n t s

Chapter 1: Introduction

About This Guide 6


About the ECAD Import Module. . . . . . . . . . . . . . . . . 6
Where Do I Access the Documentation and Application Libraries? . . . . 6

Chapter 2: Importing and Exporting ECAD Files

Importing PCB File Formats 12


Import Settings for IPC-2581 and ODB++ Files . . . . . . . . . . . 12
File Formats for Printed Circuit Boards (PCBs) . . . . . . . . . . . 24
Preparing PCB Geometries for Simulation . . . . . . . . . . . . . 25

Importing and Exporting MEMS and IC File Formats 27


Import Settings for GDS-II Files . . . . . . . . . . . . . . . . . 27
Exporting OASIS . . . . . . . . . . . . . . . . . . . . . . . 32
The GDS-II File Format . . . . . . . . . . . . . . . . . . . . 33
Preparing the Geometry . . . . . . . . . . . . . . . . . . . . 34

Chapter 3: Programming and Command Reference

Commands 36
Import of ECAD Files . . . . . . . . . . . . . . . . . . . . . 36
Exporting Geometry to OASIS (2D) . . . . . . . . . . . . . . . 44

CONTENTS |3
4 | CONTENTS
1

Introduction

Welcome to the ECAD Import Module. This User’s Guide details features and
functionality available with the product.

This introductory chapter is About This Guide.

5
About This Guide
This documentation covers the ECAD Import Module.

About the ECAD Import Module


This product extends the functionality of COMSOL Multiphysics by enabling modeling using
imported ECAD design files.

The import capabilities cover the GDS II, ODB++®, and IPC-2581 file formats and include
the creation of 3D geometry during the import operation. The export capabilities cover
OASIS file format.

Where Do I Access the Documentation and Application Libraries?


A number of internet resources have more information about COMSOL, including licensing
and technical information. The electronic documentation, topic-based (or context-based)
help, and the application libraries are all accessed through the COMSOL Desktop.

If you are reading the documentation as a PDF file on your computer, the
blue links do not work to open an application or content referenced in a
different guide. However, if you are using the Help system in COMSOL
Multiphysics, these links work to other modules (as long as you have a
license), application examples, and documentation sets.

THE DOCUMENTATION AND ONLINE HELP


The COMSOL Multiphysics Reference Manual describes all core physics interfaces and
functionality included with the COMSOL Multiphysics license. This book also has
instructions about how to use COMSOL Multiphysics and how to access the electronic
Documentation and Help content.

Opening Topic-Based Help


The Help window is useful as it is connected to many of the features on the GUI. To learn
more about a node in the Model Builder, or a window on the Desktop, click to highlight a
node or window, then press F1 to open the Help window, which then displays information

6 | CHAPTER 1: INTRODUCTION
about that feature (or click a node in the Model Builder followed by the Help button ( ).
This is called topic-based (or context) help.

To open the Help window:

• In the Model Builder, Application Builder, or Physics Builder click a node or


window and then press F1.
• On any toolbar (for example, Home, Definitions, or Geometry), hover the
mouse over a button (for example, Add Physics or Build All) and then
press F1.
• From the File menu, click Help ( ).
• In the upper-right corner of the COMSOL Desktop, click the Help ( )
button.

To open the Help window:

• In the Model Builder or Physics Builder click a node or window and then
press F1.
• In the main toolbar, click the Help ( ) button.
• From the main menu, select Help>Help.

ABOUT THIS GUIDE | 7


Opening the Documentation Window

To open the Documentation window:

• Press Ctrl+F1.
• From the File menu select Help>Documentation ( ).

To open the Documentation window:

• Press Ctrl+F1.
• In the main toolbar, click the Documentation ( ) button.
• From the main menu, select Help>Documentation.

THE APPLICATION LIBRARIES WINDOW


Each application includes documentation with the theoretical background and step-by-step
instructions to create a model application. The applications are available in COMSOL as
MPH-files that you can open for further investigation. You can use the step-by-step
instructions and the actual applications as a template for your own modeling and applications.
In most models, SI units are used to describe the relevant properties, parameters, and
dimensions in most examples, but other unit systems are available.

Once the Application Libraries window is opened, you can search by name or browse under
a module folder name. Click to view a summary of the application and its properties, including
options to open it or a PDF document.

The Application Libraries Window in the COMSOL Multiphysics


Reference Manual.

8 | CHAPTER 1: INTRODUCTION
Opening the Application Libraries Window
To open the Application Libraries window ( ):

• In the Home toolbar, click Windows and select Application Libraries.


When the toolbar is compressed, you sometimes find it under
Layout>Windows.
• From the File menu select Application Libraries.

To include the latest versions of model examples, from the File>Help menu
select ( ) Update COMSOL Application Libraries.

From the File or Windows menu select Application Libraries.

To include the latest versions of model examples, from the Help menu
select ( ) Update COMSOL Application Libraries.

CONTACTING COMSOL BY EMAIL


For general product information, contact COMSOL at info@[Link].

To receive technical support from COMSOL for the COMSOL products, please contact your
local COMSOL representative or send your questions to support@[Link]. An automatic
notification and case number is sent to you by email.

ABOUT THIS GUIDE | 9


COMSOL WEBSITES

COMSOL website [Link]


Contact COMSOL [Link]/contact
COMSOL Access [Link]/access
Support Center [Link]/support
Product Download [Link]/product-download
Product Updates [Link]/product-update
COMSOL Blog [Link]/blogs
Discussion Forum [Link]/forum
Events [Link]/events
COMSOL Video Gallery [Link]/videos
Support Knowledge Base [Link]/support/knowledgebase

10 | CHAPTER 1: INTRODUCTION
2

Importing and Exporting ECAD Files

ECAD file formats have been designed to transfer information necessary for the
manufacturing of printed circuit boards (PCBs), integrated circuits (ICs), and
microelectromechanical systems (MEMS) devices. You can import data from
ECAD files to generate geometry for simulation. During the import of an ECAD
file, geometry objects are generated based on the 2D layouts and stackup
information found in the files.

In this section:

• Importing PCB File Formats


• Importing and Exporting MEMS and IC File Formats

11
Importing PCB File Formats
In this section:

• Import Settings for IPC-2581 and ODB++ FilesImport Settings for IPC-2581 and
ODB++ Files
• Preparing PCB Geometries for Simulation

Import Settings for IPC-2581 and ODB++ Files


To add an Import node, from the Home or Geometry toolbar, click Import ( ). In the
Source section of the Settings window, set the type of file to import to ECAD file. You
can also skip this step as the type of the selected file is automatically recognized. Click
Browse to locate the file to import, or enter the path to the file. Before clicking the
Import button consider to review and configure the import options, especially the layer
thickness information, since in many cases the IPC-2581 files and ODB++ archives do
not include all necessary information to construct a 3D geometry.

The length unit in the file is detected and displayed in the Settings window. To use the
unit in the file as the length unit for the geometry sequence select the Update geometry
unit checkbox. The checkbox is selected by default if the Import node is added as the
first node in the geometry sequence. The length unit of the geometry sequence is set
to inch when the length unit mil is detected in the selected file.

LAYERS

Grouping of Geometries
To determine the extrusion method used for generating the 3D geometry from the 2D
layouts select one of the available alternatives from the Grouping of geometries list in the
Layers section of the Settings window:

• All. This alternative is available only in 3D. The import algorithm extrudes in one
operation all imported copper and dielectric layers into a single 3D geometry object.
From each copper layer, the imported symbols, such as lines, pads, and surfaces, are
combined before extrusion. The copper and dielectric layers become domains in the
resulting object. To be able to connect the layers, the algorithm requires that the
2D layouts fulfill certain rules. If the import fails, switch to the By layer grouping
option.

12 | CHAPTER 2: IMPORTING AND EXPORTING ECAD FILES


• By layer. Use this alternative to extrude each layer separately. The imported symbols,
such as lines, pads, or surfaces, from the copper layers are combined before
extrusion. Several geometry objects, one for each imported copper and dielectric
layer, are generated upon import.
• No grouping. Use this alternative to import and extrude individually each symbol
from the copper layers. The import results in separate objects for imported symbols
and dielectric layers. You can use this option if you want to manually delete certain
objects after import, but it is recommended to do this only for relatively simple
geometries.

When using the No grouping alternative you have the option to import line symbols as
curve objects by selecting the Ignore line width checkbox.

Note: Using the ignore line width option you can sometimes be useful to construct
geometry objects from the information on other layers than copper and dielectric. To
do this configure an Import node to import the layer using the No grouping method,
and with the Ignore line width checkbox selected. Also, from the Elevations list select
Manual, and set the elevation to an appropriate value, but keep the default zero layer
thickness. After the import use geometry operations to convert the imported curve
objects to surface objects, and extrude those to 3D components.

IMPORTING PCB FILE FORMATS | 13


Copper Layers
The Type of import list specifies whether copper layers are extruded or not by the
import.

Inner layer Top layer Inner layer Top layer

Top dielectric Top dielectric


Inner dielectric Inner dielectric

Bottom layer Bottom layer


Type of import: Full 3D Type of import: Metal shell
Elevations: Elevations:
Metal layer inside dielectric layer above Metal layer inside dielectric layer above

Inner layer Top layer Inner layer Top layer

Top dielectric Top dielectric


Inner dielectric Inner dielectric

Bottom layer Bottom layer


Type of import: Full 3D Type of import: Metal shell
Elevations: Elevations:
Metal layer between dielectric layers Metal layer between dielectric layers

The Full 3D option imports all copper layers with a thickness according to the table in
the Layers section of the Settings window. The layer elevations are determined
according to Elevations, see in the next section Controlling The Layer Stackup. With
the Metal shell option copper layers are imported as embedded boundaries between
dielectric regions. As illustrated in the figure above, switching to Metal shell changes

14 | CHAPTER 2: IMPORTING AND EXPORTING ECAD FILES


the elevation of dielectric layers when Elevations is set to Metal layer between dielectric
layers.

For 3D imports, when the geometry grouping All and the import type
Metal shells are used together, an isolated copper layer cannot be imported
if the import also includes another solid (dielectric) layer. In this case use
the By layer grouping, or add two Import features to the geometry
sequence, one to import the copper layer, and a second one for the solid
layers.

Controlling The Layer Stackup


The import can read stackup information from the PCB file, such as the thickness for
copper and dielectric layers. The layer information is displayed in the table in the Layers
section of the Settings window. Sometimes the layer thickness is not included in the
export from the ECAD program, so the layers get the default zero thickness. Therefore
it is recommended that these values are checked before importing.

To decide how elevations are calculated for the imported layers, select one of the
options for Elevations:

• Select Metal layer inside dielectric layer above to position interior copper layers inside
the dielectric layer immediately above the copper layer. The layer elevations in the
table are calculated automatically from the layer Thickness values. Using this option
together with Type of Import set to Full 3D, the total thickness of the board is
calculated as the sum of the dielectric layer thicknesses, plus the thickness of the top
and bottom copper layers.
• Select Metal layer between dielectric layers to position interior copper layers between
the dielectric layers immediately below and above the copper layer. The layer
elevations in the table are calculated automatically from the layer Thickness values.
Using this option together with Type of Import set to Full 3D, all copper layers,
including the interior copper layers, contribute to the total thickness of the circuit
board, which is the sum of the thicknesses of all copper and dielectric layers. Extra
dielectric layers are created for each copper layer at their respective z-extents and
with the same shape as other dielectric layers to pad the gap between the main
dielectrics. These are called in-layer dielectric.
• Select Manual to enable the manual repositioning of layers in the stackup. The
Elevation column appears in the table where you can enter values for the lower z
positions of the layers. Any changes to the Elevation column in the table are lost

IMPORTING PCB FILE FORMATS | 15


when you switch to one of the other two options for Elevations. The Manual option
is available only when Grouping of geometries is set to By layer or No grouping.

Inner layer Top layer Inner layer Top layer

Top dielectric Top dielectric

Inner dielectric Inner dielectric

Bottom layer Bottom layer


Elevations: Elevations:
Metal layer inside dielectric layer above Metal layer between dielectric layers

When Grouping of geometries is set to By layer with the Metal layer between dielectric
layers option for calculating elevations, the checkbox Unite metal layer and in-layer
dielectric appears and is selected by default. If checkbox is selected, unites each copper
layer with their respective in-layer dielectric. If checkbox is cleared, you get the copper
and in-layer dielectric as separate objects.

Select the Show names from file checkbox to display the layer names as included in the
PCB file. This is useful after assigning new layer names that are used in the COMSOL
application.

The table contains the following columns:

• The Name column displays the layer names from the file. You can edit the entries to
give more descriptive names to the layers. The names that appear here are used to
name the resulting geometry objects and the selections when the Layer selections
checkbox is selected under Selections of Resulting Entities.
• The Name in file column is visible only when you select the Show names from file
checkbox above the table. The Name in file column always displays the layer name
from the PCB file, even after editing the Name column.
• The Type column declares the type of layers. Depending on their type, the import
treats layers differently during import. For example, the geometry from a layer of
type Metal is extruded only if the Type of import is set to Full 3D. Layers of type
Dielectric are extruded, when selected in the Import column, according to the
thickness and elevation data in the table. A union of the objects from the Outline
layer is used as the PCB outline to determine the extent of the dielectric layers. The
Drill layer type means that the objects in the layer define drilled holes in the PCB.
ODB++ files may sometimes contain copper layers with the context set to MISC.

16 | CHAPTER 2: IMPORTING AND EXPORTING ECAD FILES


These are displayed as layers of type Metal misc in the table, and they are by default
not selected for import, similarly to layers of type Other.
• The values in the Thickness column are used as the extrusion distances for the layers.
The layer elevations are calculated based on these values unless the Elevation column
is displayed. The values in the layer Thickness column can always be changed prior
to import.
• The values in the Elevation column control the lower z positions of the layers. By
adjusting the values you can adjust the position of layers in the stackup. The
Elevation column is only displayed when Elevations is set to Manual.
• The Import column. Clear the checkbox for layers that do not need to be imported.

To save the layers table to a text file, click the Save to File button ( ) under the table.
To load layer table information from a text file, click the Load from File button ( )
under the table. Only the editable data in the table is affected when loading from file.
Layer data in the file that does not match the existing layers in the table is ignored. To
reset the thickness and elevation values in the table to the last read data from the PCB
file click the Reset Thickness and Elevation button ( ). To select the Import checkbox
in the table for all copper and dielectric layers click the Select All Metal and Dielectric
Layers for Import button ( ). Click the Clear All Imports button ( ) to clear all
checkboxes in the Import column. To reload the layer information from the PCB file
to the table click the Reload Layers button ( ). This will replace all content in the
table with data from the PCB file.

Dielectric Layers
When the PCB file includes the outline of the PCB board in the file the dielectric
regions are generated to the shape of the board. Even if the dielectric layers are selected
for import in the Layers to import table, the import and extrusion of the corresponding
objects or domains can be turned off by clearing the Import dielectric regions checkbox.

DRILL HOLES
Most printed circuit boards have three types of drilling holes: Plated Through Holes,
Non-Plated Through Holes, and Vias. Choose from the Drill layer handling list

IMPORTING PCB FILE FORMATS | 17


(available only when the Grouping of geometries is By Layer) how to handle the drill
holes specified in the file:

• Modify layer objects (default) – This option unites/subtracts the drill layers with/
from the layers it intersects. When this is selected, the following checkboxes appear:
- Create domains for the cores of vias (selected by default). When this is selected, the
cores of the vias become domains. When this is cleared, the cores of the vias
become void.
- Via cores through metal layers (cleared by default). When this is selected, the vias
will go through the metal layers. When this is cleared, the vias will not affect the
metal layers.
- Create domains for the cores of plated holes (selected by default). When this is
selected, the cores of the plated holes will become domains. When this is cleared,
the cores of the plated holes will become void.
- Plated hole cores through metal layers (selected by default). When this is selected,
the plated holes will go through the metal layers. When this is cleared, the plated
holes will not affect the metal layers.
- Create domains for non-plated holes (cleared by default). When this is selected, the
non-plated holes will become domains. When this is cleared, the non-plated holes
will become void. Note that non-plated holes always go through all the layers.
• Create separate objects — This option creates one object for each metal and
dielectric layer the drill layers intersects. When this is selected, the following
checkboxes appear:
- Via cores through metal layers (cleared by default). When cleared, you get no
objects for intersections of vias with metal layers.
- Plated hole cores through metal layers (selected by default). When cleared, you get
no objects for intersections of plated holes with metal layers.

Specify the plating thickness of the plated holes and vias in the field Plating thickness
(default 0) in 3D. When you set a positive thickness value, each drill hole will be
surrounded by a cylindrical layer with the given thickness, except for non-plated drill
holes. The plating will always be united with or become a part of the drill layer object.
You will get no extra object for the plating if you choose Create separate objects. Note
that the plating thickness is also available if Grouping of geometries is set to No grouping,
in which case the platings become separate objects from their respective cores.

18 | CHAPTER 2: IMPORTING AND EXPORTING ECAD FILES


COMPONENTS
Simplified 2D or 3D geometries can be generated for components by selecting the
checkbox Import component outlines (cleared by default).

In a 3D geometry, you can specify whether the component should be represented by


the extruded outline or by a surface as a 2D outline. From the Height of components
list, select From file (default) to extrude the 2D component outline to the height
specified in the file. Select Zero to import the component outline represented by a face.

Component outlines are positioned by default on the top copper layer or below the
bottom copper layer. You can specify an offset for the vertical component placement
in the Elevation offset for top components field for components on the top copper layer
and the Elevation offset for bottom components field for the components on the bottom
copper layer.

The components will be assigned an attribute, where the values are the component
names and are assigned to their respective component’s domain or surface (depending
on if the component is 2D or 3D). This attribute also has the field “package” whose
value is the package for each component. The attribute tag is controlled in the text field
Component attribute tag. If there are multiple import features, their component
attributes will be renamed after their respective import features, for example,
[Link] and [Link]. If desired, these features could contribute to
a single attribute by changing both attribute tags to have the same name, for example,
component.

You can use a Logical Expression Selection (Geometry Sequences) feature


to create a selection that selects the domains or boundaries of some
components, for example, using the
expression [Link]('C2','C5','C7') ||
[Link]('SIP9') in the Logical Expression field.

SIMPLIFY AND REPAIR

Interior Boundaries
By default the Keep interior boundaries checkbox is cleared to instruct the import to
remove all interior boundaries on the imported layers. Interior boundaries on the
copper layers are the result of the union of the individual symbols that make up the
traces. Ignoring the interior boundaries keeps the geometry complexity to a minimum
and can also make the import more robust in some situations.

IMPORTING PCB FILE FORMATS | 19


Copper Text and Objects Outside the Board Boundary
It is common that the copper layouts have text objects that provide information, and
are not part of any electrical circuits. Shapes may be also included for example to mark
the board boundaries, and these shapes are often positioned outside the board. Such
objects may make it more difficult to construct the geometry and are usually of no
interest in a physical simulation.

Select the Ignore text objects checkbox to skip all objects in a PCB file that have the
TEXT tag set. To prevent objects outside the board from being imported select the
checkbox Ignore objects outside of board. Objects that are positioned outside the board,
at a distance greater than that specified by the offset in the Offset from boundary field,
are ignored by the import. The default value for the offset is 0.1 mm, which means
that objects that are further into the board than 0.1 mm from the board boundary are
imported. The offset should only be taken as an approximation. It is only checked
where the object has its defining points, which are not necessarily the same points that
can be seen on an object after it has been imported. For example, a trace is defined by
its start and end points, which lie on the centerline of the trace. Similarly, a circle might
be defined by four points (south, north, east, and west). Thus, an object might be
ignored even if an edge is further inside the board than the specified offset, as long as
all the points that define the object are farther away from the boundary than the offset.

Repair
Geometry repair is controlled via the Repair imported objects checkbox and the Repair
tolerance list. Change the Repair tolerance from Automatic to Relative to manually
specify a tolerance in the Relative repair tolerance field. Automatic means a relative repair
tolerance of 106.

When selected, the geometry repair is active when combining the objects to generate
the 2D geometry of each layer, and also when the layers are combined together after
extrusion. By increasing the repair tolerance, problems with short edges arising when
combining the objects can sometimes be circumvented. A repair tolerance that is too
high may however lead to breaking the geometry. As a guideline, the relative tolerance
should be kept between 105 to 108. Values at the lower end of this interval may
result in faster import at the cost of a higher number of short edges being present in
the imported geometry. Read about how to remove short edges in the next section.

Ignore Vertices in Layers


Select the Ignore vertices with continuous tangent checkbox (cleared by default), to
remove, in each layer, vertices that connect two edges that have tangent directions
making an angle less than the Continuous tangent tolerance.

20 | CHAPTER 2: IMPORTING AND EXPORTING ECAD FILES


Select the Eliminate short edges checkbox (cleared by default) to eliminate edges that
are shorter than the Maximum edge length, by ignoring one or both of their adjacent
vertices.

SELECTIONS OF RESULTING ENTITIES


Select the Resulting objects selection checkbox to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

Select the Layer selections checkbox to create predefined selections — for domains,
boundaries, and objects — in subsequent nodes in the geometry sequence for each
imported layer in the PCB file. The boundary selection for all layers include all
boundaries of the objects.

To make the resulting entities that the layers consist of available as selections in all
applicable selection lists (in physics and materials settings, for example), choose an
option from the Show in physics list: All levels, Domain selection, or Boundary selection.
The default is All levels, which makes predefined selections available on all applicable
levels, suitable for use with materials and physics defined in domains and boundaries.
For use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

When the Layer selections checkbox is enabled, one selection will be created for each
layer and for each geometric entity level, object, domain and boundary, for example:
SIG1, DIEL_1, GND, DIEL_2, SIG2.

IMPORTING PCB FILE FORMATS | 21


For each DRILL layer, the following selections are available:

• If the Plating thickness is zero:


- When Create domains for the cores of vias or Create Separate objects is selected: A
domain and a boundary selection for the vias, for example, [Link]. Note that
boundary selection includes all the boundaries of the vias.
- When Create domains for the cores of plated holes or Create separate objects is
selected: A domain and a boundary selection for the plated holes, for example,
[Link]. Note that boundary selection includes all the boundaries of the
plated holes.
- When Create domains for non-plated holes or Create separate objects is selected: A
domain and a boundary selection for the non-plated holes, for example,
[Link]. Note that boundary selection includes all the boundaries of
the non-plated holes.

• If the Plating thickness is positive:

- When Create domains for the cores of vias or Create Separate objects is selected: A
domain and a boundary selection for the vias, for example [Link].
Domain and boundary selections for the plating thickness of the vias, for
example, [Link]. Note that boundary selection includes all the
boundaries of the vias.
- When Create domains for the cores of plated holes or Create separate objects is
selected: A domain and a boundary selection for the plated holes, for example,
[Link]. Domain and boundary selections for the plating thickness
of the plated holes, for example [Link]. Note that boundary
selection includes all the boundaries of the plated holes.
- When Create domains for non-plated holes or Create separate objects is selected: A
domain and a boundary selection for the non-plated holes, for example,
[Link]. Note that boundary selection includes all the boundaries of
the non-plated holes.

When the checkbox Unite metal layer and in-layer dielectric is selected, the selections
for all geometric levels are available for metal, for example INNER (which selects the
entities corresponding to the metal). For the domain and boundary levels, in-layer
dielectric selections are available, for example, [Link] (which selects entities
corresponding to the dielectric). Note that the object selection is not available for
in-layer dielectric. All boundary selections include all external boundaries of the layer.

22 | CHAPTER 2: IMPORTING AND EXPORTING ECAD FILES


When the checkbox Unite metal layer and in-layer dielectric is cleared, the selections for
all geometric levels are available for both metal and dielectric, for example, INNER
(which selects the entities corresponding to the metal) and [Link] (which
selects entities corresponding to the dielectric).

When the checkbox Import component outlines is selected, two selections are created
for top and bottom components for all geometric levels (object, domain, and
boundary), for example, COMP_BOT and COMP_TOP, referring to the bottom and top
components, respectively.

Additionally, the import creates domain selection Metal, which selects all the metal
layers. If there is no drill hole plating, the drill hole cores are also included, or if plating
exists, it instead includes the plating domains. It does not include non-plated holes.
The domain selection for Dielectric selects everything else except the components. The
boundary selection Metal is always created and all external boundaries of the metal
domains are selected.

If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

NET SELECTIONS
The sections Domain Net Selections (in 2D and 3D) and Boundary Net Selections (in
3D), contain a table that lists the generated selections for the imported nets. Net
selections are generated when importing IPC-2581 and ODB++ files. The tables
contain the following columns, ordered from left to right:

• Name — This column contains the name of the selection.


• Keep — The checkbox in this column is cleared by default, and determines whether
the selection will be available for use in geometry features following the Import
feature.
• Physics — The checkbox in this column is selected by default. Provided that also the
Keep checkbox has been selected, it determines whether the selection will be
available in all applicable selection lists in physics and materials settings, for example.
If the Import node has been added under the Plane Geometry node of a Work
Plane, this column header is titled 3D. If the Import node has been added to a
geometry part, this column header is titled Instances.
• Contribute to — Select a cumulative selection from the list in this column to make
the resulting entities contribute to a cumulative selection. The default, None, gives

IMPORTING PCB FILE FORMATS | 23


no contribution. Contributing to a cumulative selection does not require that the
Keep checkbox has been selected.

Click the New Cumulative Selection button under the tables to create a new cumulative
selection (see Cumulative Selections in the COMSOL Multiphysics Reference
Manual).

The entities in a selection are highlighted in yellow in the Graphics window when the
selection is clicked in the table. To zoom in on the selection use the Zoom to Selection
button in the Graphics toolbar.

The net selection names are derived from the net and layer names imported from the
PCB file. Generated net selections are one for each net and then selections for each
intersection between the net selections and all other selection generated from the
import. For example, for the default behavior of the drill holes handling, importing a
board with three copper layers (SIG1, GND, SIG2), two dielectric layers (SIG1_DIEL,
GND_DIEL), and one drill layer (DRILL1), that contains a net named NET, the following
selections are generated: NET, NET.SIG1, [Link], NET.SIG2, NET.SIG1_DIEL,
NET.GND_DIEL, NET.DRILL1_PLATED, NET.DRILL1_VIA. The selection NET is the
union of all other selections for this net. If the name of a net is the same as the name
of a layer, for example GND, the suffix _N is attached to the name of the net selection to
avoid a name clash between net and layer selections.

Empty net selections are not generated; that is, a selection for the net is generated only
when the intersection of the net and the layer contains entities. For entities that do not
belong to a net, the selection NONET is generated.

The boundary net selections include all the boundaries for the copper, dielectric and
drill layers. Note that edge and vertex selections are not generated for nets.

To view the list of all objects, you can use the Selection List window, that
you can access from the Geometry toolbar. The top part of the Selection
List window lists all geometry objects in the geometry sequence. The
bottom part of the window lists all named selections, including the kept
net selections.

File Formats for Printed Circuit Boards (PCBs)


The IPC-2581 and OBD++ file formats can handle most of the information needed to
manufacture a PCB. For generating a geometry for simulation, the import

24 | CHAPTER 2: IMPORTING AND EXPORTING ECAD FILES


functionality can read some of this information, such as the layout of copper layers, the
layout for the vias, the board outline, and layer stackup information.

Importing and Meshing a PCB Geometry from an ODB++ Archive:


Application Library path ECAD_Import_Module/Tutorials/pcb_import

An ECAD file for PCBs may also include layers with 2D layouts that specify, for
example, the component outlines on the board. You can also import these layers. In a
file, the 2D layouts consist of shapes, also called symbols, which build the geometry of
copper traces and pads. A large number of symbols are specified by the supported PCB
formats — lines, circles, rectangles, and surfaces to name a few.

THE ODB++ FORMAT


The ODB++ format defines a directory structure with several files, each containing
parts of information about the PCB. An entire PCB layout is often distributed as
zipped or unzipped tar archives.

The ODB++ import reads the layer list and the first step in the file. From the first step,
the layer features, the board outline and package information are extracted. Multiple
step files are not supported.

Microwave Filter on PCB with Stress: Application Library path


RF_Module/Filters/pcb_microwave_filter_with_stress

Preparing PCB Geometries for Simulation


As a first step, it is always beneficial to remove all features from the geometry that are
not important for the simulation. This is usually best done in the ECAD software
before importing the geometry into COMSOL. Most ECAD or EDA programs
support design rule checks (DRC), which test the entire layout and check that all
features (vias, conductors, and components) are separated according to certain rules.
With such checks, the layout is free from overlapping vias and conductors touching
other conductors or vias. This also ensures that the special extrude functionality of the
ECAD import works appropriately. If the file contains such design-rule violations, the
extrude operation might fail and issue an error message stating that it could not handle
the topology of the layout.

IMPORTING PCB FILE FORMATS | 25


The best approach to handle such problems is to perform a DRC with your ECAD
software and produce new layout files. If this is not possible, import the layout in 2D
and try to identify the problematic features.

When importing to 3D, the import code can extrude the 2D layouts created from the
imported data. Alternatively, you can let the import generate surface objects or import
the layers onto a work plane in 3D. This can be useful if you want to modify the
imported 2D layouts before extruding them.

Before meshing the geometry created from imported ECAD files, it can be helpful to
eliminate short edges during the import. Do this by selecting the checkboxes Ignore
vertices with continuous tangent and Eliminate short edges in the import settings. Note
that you can also remove short edges from the geometry by using the automatic
Geometry Cleanup or by manually adding a Remove Details feature; see Remove
Details and Geometry Cleanup in the COMSOL Multiphysics Reference Manual.

The imported geometry often consists of objects with very high aspect ratios, which
are hard to mesh with a tetrahedral mesh generator. As a result, it is usually necessary
to use interactive meshing of the imported geometry in a by-layer fashion. Assume that
the top and bottom layers are metal layers. All metal layers can often be meshed using
swept meshing, but dielectric layers usually cannot be meshed that way because the
source and target boundaries do not look the same. Begin by meshing from the
bottom or top layer, starting with a triangular or quadrilateral boundary mesh. Then,
mesh layer by layer, where each metal layer gets a swept mesh, and each dielectric layer
(with vias) gets an unstructured tetrahedral mesh. When starting with a quadrilateral
boundary mesh, the swept mesher generates hex elements, and pyramid elements are
automatically inserted when the tetrahedral mesher generates the mesh for the
dielectric layers. Finally, if there is a surrounding air domain mesh it using the
tetrahedral mesher.

Another possibility is to create the geometry for meshing and physics by forming the
assembly of the metal and dielectric objects generated by the import. This can be
controlled by the Form Union/Assembly node in the Geometry branch of the model tree.
When forming an assembly, identity pairs connect the touching faces between the
layers. To generate the mesh for the individual layers, use the swept mesher. By this
method it can be easier to resolve details on the copper layers while limiting the
number of element layers in the extrusion direction.

Importing and Meshing a PCB Geometry from an ODB++ Archive:


Application Library path ECAD_Import_Module/Tutorials/pcb_import

26 | CHAPTER 2: IMPORTING AND EXPORTING ECAD FILES


Importing and Exporting MEMS and
IC File Formats
In this section:

• Import Settings for GDS-II Files


• Exporting OASIS
• Preparing the Geometry

Import Settings for GDS-II Files


To add an Import node, from the Home or Geometry toolbar, click Import ( ). In the
Import section of the Settings window, set the type of file to import to ECAD file. You
can also skip this step as the type of the selected file is automatically recognized by the
code. Click Browse to locate the file to import, or enter the path to the file. Before
clicking the Import button configure the layer thickness, since the GDS-II files do not
include the necessary layer thickness and elevation information to construct a 3D
geometry.

For the length unit in the file m is always displayed, since GDS-II files do not specify
a unit. To use the displayed unit as the length unit for the geometry sequence select
the Update geometry unit checkbox. The checkbox is selected by default if the Import
node is added as the first node in the geometry sequence.

CELL SELECTION
Data contained in GDS-II files is organized in hierarchical structure consisting of cells.
Select a cell name from the Cell to import list to limit the import to the selected cell
beneath the top cell in the hierarchy. Use the default choice in this list to import the
top cell. By default all subcells below the selected cell are imported. To import only
one subcell type, select the cell from the Filter by subcell list. The difference between
selecting a cell and filtering the top cell by the same cell is that the latter alternative
includes all instances of the selected cell, whereas the first case only includes the
selected instance of the cell.

GROUPING OF GEOMETRIES
The import operation can import each layer into its own geometry object, or import
each object from the layers in the file into its own geometry object. To determine

IMPORTING AND EXPORTING MEMS AND IC FILE FORMATS | 27


which method to use select one of the available alternatives from the Grouping of
geometries list:

• By layer. Use this alternative to combine the imported objects from each layer into
a single geometry object. Several geometry objects, one for each imported layer, are
output by the import.
• No grouping. Use this alternative to import each object from the layers into
individual geometry objects. To construct the geometry objects the import
performs a union of all the segments.

With the Type of import setting the extrusion of layers can be switched on or off. The
Full 3D option imports all layers with a thickness, as specified in the Layers to import
table. With the Metal shell option layers are imported as one surface object per layer
(with grouping By layer), or one surface object per imported object (with grouping No
grouping).

CONTROLLING THE LAYER STACKUP


Since layer stackup information is not included in GDS-II files, the layers are assigned
a default zero thickness in the Layers to import table. These values can be edited before
importing the GDS-II file.

Select the Manual control of elevations checkbox to position the layers in the z direction.
When Manual control of elevations is not selected, the z positions of the layers are
calculated automatically from the layer Thickness values.

Select the Show names from file checkbox to display the layer names as included in the
GDS-II file. This is useful after assigning new layer names that are used in the
COMSOL application.

If the datatype record is used in the file for grouping of objects on a layer you can select
the Split by datatype checkbox to treat geometry objects of the same datatype as a
separate layer. The parent layer is then split into as many separate layers as there are
datatypes defined. For example, a layer that contains objects that are grouped into two
datatypes will be split into two separate layers after selecting the checkbox. The name
of the new layers is obtained by appending the datatype to the name of the parent layer.

Note: When the Split by datatype checkbox is selected the import will generate the
geometry only for those layers that contain objects with the datatype record set in the
file.

28 | CHAPTER 2: IMPORTING AND EXPORTING ECAD FILES


The Layers to import table contains the following columns:

• The Name column displays the layer names from the file. You can edit the entries to
give more descriptive names to the layers. The names that appear here are used to
name the resulting geometry objects and the selections when the Layer selections
checkbox is selected under Selections of Resulting Entities.
• The Name in file column is visible only when you select the Show names from file
checkbox above the table. The Name in file column always displays the layer name
from the GDS-II file, even after editing the Name column.
• The Type column declares the type of layers. GDS-II files do not specify layer types,
and the layer type is always set to Metal.
• The values in the Thickness column are used as the extrusion distances for the layers.
Layer elevations are also calculated based on these values when Manual control of
elevations is not enabled. The values in the layer Thickness column can always be
changed prior to import. Note that GDS-II files do not contain layer thickness (nor
elevation) data.
• The values in the Elevation column control the lower z positions of the layers. By
adjusting the values you can adjust the position of layers in the stackup. The
Elevation column is only displayed when Manual control of elevations is enabled.
• The Import column. Clear the checkbox for layers that do not need to be imported.

To save the layers table to a text file, click the Save to File button ( ) under the table.
To load layer table information from a text file, click the Load from File button ( )
under the table. Only the editable data in the table is affected when loading from file.
Layer data in the file that does not match the existing layers in the table is ignored. To
reset the thickness and elevation values in the table to the last read data from the GDS
file click the Reset Thickness and Elevation button ( ). To select the Import checkbox
in the table for all layers click the Select All Metal and Dielectric Layers for Import button
( ). Click the Clear All Imports button ( ) to clear all checkboxes in the Import
column. To reload the layer information from the GDS file to the table click the Reload
Layers button ( ). This is useful in case the GDS file has changed since the last time
it was read, and includes additional layers. By clicking Reload Layers you can load the
information for the new layers into the table, while keeping any edits you have done in
the table for layers that are also found in the new file. Note that layers that are not
found in the new file are removed from the table.

IMPORTING AND EXPORTING MEMS AND IC FILE FORMATS | 29


INTERIOR BOUNDARIES
By default the Keep interior boundaries checkbox is cleared to instruct the import to
remove all interior boundaries on the imported layers. This keeps the geometry
complexity to a minimum and can also make the import more robust in some
situations.

ARC RECOGNITION
Recognition of arcs and straight lines can significantly reduce the complexity of
imported layouts from GDS files. With the Recognize arcs set to Automatic, all polygon
chains that represent arcs are identified and replaced with more efficient curve objects,
and polygon segments that lie on a single straight line are recognized and joined into
a single straight segment.

With Recognize arcs set to Manual, the following settings will help you fine tune the
process of the merging of segments into a single circular arc:

• Minimum angle between segments: this parameter prohibits merging of two adjacent
polygon segments to a circular arc if the angle between them is less than the
provided number.
• Maximum angle between segments: this prohibits merging of two adjacent polygon
segments to a circular arc if the angle between them is greater than the provided
number.
• Maximum curvature deviation: this prohibits merging a polygon segment to the
constructed circular arc if that would (relatively) change the curvature by more than
the provided number.
• Maximum length deviation: this prohibits merging of two adjacent polygon segments
to a circular arc if the relative difference between the lengths is greater than the
provided number.
• Maximum deviation from circle: the allowed maximum relative error between the
polygon segments and the constructed circular arc.

In manual arc recognition mode, the Find straight lines checkbox controls whether to
convert several polygon segments that lie on a straight line into a single straight
segment. This option uses the number in the Minimum angle between segments field to
determine if a group of segments lie on the same straight line.

Short polygon segments that are difficult to eliminate using arc recognition can usually
be removed as described in the section Ignore Vertices in Layers.

30 | CHAPTER 2: IMPORTING AND EXPORTING ECAD FILES


REPAIR
Geometry repair is controlled via the Repair imported data checkbox and the Repair
tolerance list. Change the Repair tolerance from Automatic to Relative to manually
specify a tolerance in the Relative repair tolerance field. The geometry repair allows to
repair incorrectly drawn objects, such as polygons with (small) gaps.

If selected, the geometry repair is also active when combining the imported objects in
a cell or layer. By increasing the repair tolerance, problems with short edges arising
when combining the objects can sometimes be circumvented.

IGNORE VERTICES IN LAYERS


Select the Ignore vertices with continuous tangent checkbox (cleared by default), to
remove, in each layer, vertices that connect two edges that have tangent directions
making an angle less than the Continuous tangent tolerance.

Select the Eliminate short edges checkbox (cleared by default), to eliminate, by ignoring
one or both of their adjacent vertices, edges that are shorter than the Maximum edge
length.

SELECTIONS OF RESULTING ENTITIES


If you want to make the resulting entities contribute to a cumulative selection, select
a cumulative selection from the Contribute to list (the default, None, gives no
contribution), or click the New button to create a new cumulative selection (see
Cumulative Selections in the COMSOL Multiphysics Reference Manual).

Select the Resulting objects selection checkbox to create predefined selections (for all
levels — objects, domains, boundaries, edges, and points — that are applicable) in
subsequent nodes in the geometry sequence. To also make all or one of the types of
resulting entities (domains, boundaries, edges, and points) that the resulting objects
consist of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, Boundary selection, Edge selection, or Point selection. The default is Domain
selection, which is suitable for use with materials and physics defined in domains. For
use with a boundary condition, for example, choose Boundary selection. These
selections do not appear as separate selection nodes in the model tree. Select Off to not
make any selection available outside of the geometry sequence.

Select the Layer selections checkbox to create predefined selections — for domains,
boundaries, and objects — in subsequent nodes in the geometry sequence for each
imported layer in the GDS file. To also make all of one of the resulting entities that the
layers consist of available as selections in all applicable selection lists (in physics and

IMPORTING AND EXPORTING MEMS AND IC FILE FORMATS | 31


materials settings, for example), choose an option from the Show in physics list: All
levels, Domain selection, or Boundary selection. The default is All levels, which makes
predefined selections available on all applicable levels, suitable for use with materials
and physics defined in domains and boundaries. For use with a boundary condition,
for example, choose Boundary selection. These selections do not appear as separate
selection nodes in the model tree. Select Off to not make any selection available outside
of the geometry sequence.

Select the Cell selections checkbox to create predefined selections — for domains and
boundaries — in subsequent nodes in the geometry sequence for each imported cell
in the GDS file. To also make all of one of the resulting entities that the cells consist
of available as selections in all applicable selection lists (in physics and materials
settings, for example), choose an option from the Show in physics list: All levels, Domain
selection, or Boundary selection. The default is Domain selection, if available, which is
suitable for use with materials and physics defined in domains. For use with a boundary
condition, for example, choose Boundary selection. These selections do not appear as
separate selection nodes in the model tree. Select Off to not make any selection available
outside of the geometry sequence.

Exporting OASIS
With a license for the ECAD Import Module you can export 2D geometry objects to
the OASIS (*.oas) format. To do this:

• right-click the Geometry node and select Export ( ), or


• in the Geometry toolbar click Export ( ).

Then, in the Export window, the File type list, select OASIS (*.oas). Use the Browse
( ) button to choose the filename, or enter a filename including the path in the
Filename field.

Next, select Export selected objects to export only chosen geometry objects or select
Export entire finalized geometry to export the resulting geometry of a Form Union or
Form Assembly operation. Note that Export entire finalized geometry is not available
when exporting from 3D components and the Selection list will only show geometry
objects that come from work plane features.

To export the geometry to the selected file, click the Export ( ) button. A
confirmation message appears in the Messages window.

32 | CHAPTER 2: IMPORTING AND EXPORTING ECAD FILES


ADVANCED
When exporting to the OASIS file format the Approximation detail list is available with
the following options:

• As in Graphics preference Detail (default). This takes the rendering mesh from the
Graphics window, which is controlled by the Graphics preference Detail.
• Coarse. This uses a rendering mesh with detail Coarse.
• Normal. This uses a rendering mesh with detail Normal.
• Fine. This uses a rendering mesh with detail Fine.

When exporting from 3D components the exported file will contain corresponding 2D
geometry objects in the local coordinate system of the corresponding work plane. In
this case a table with each work plane will appear. The table consists of three columns
representing:

• Work plane - It contains the tags of all work planes in the geometry. If no object from
work plane is selected in the Selection list, the corresponding row will be grayed out.
• Layer number - The number assigned to each layer in the file. You can edit this
number.
• Layer name - The name assigned to each layer. The default names use the
corresponding feature labels and they can be edited.

During export the selected objects that belong to a specific work plane will be saved in
the file, and they will be assigned to the layer specified for that work plane in the table.
It is possible to assign multiple work planes to the same layer by entering the same layer
number in multiple rows. Rows with the same Layer number must also have the same
Layer name.

The GDS-II File Format


The GDS-II file format is commonly used for mask layout production used in the
manufacturing process of semiconductor devices and MEMS devices. The file is a
binary file, containing information about drawing units, geometry objects made of
polygons, and object drawing hierarchy. The drawing hierarchy is made up of a library
of cell definitions, where each cell can be instantiated (drawn several times) with
scaling, translation, mirroring, and rotation. It is also possible to repeat a cell as an
array of drawn objects. This is very useful for mask layouts of integrated circuits, which
often consist of millions of transistors. There are usually only a few transistor
configurations present on the layout, and each transistor configuration only has to be

IMPORTING AND EXPORTING MEMS AND IC FILE FORMATS | 33


defined once. You can configure the import to include only selected cells, see Cell
Selection. Geometry objects in the cells belong to different layers which represent
different steps in the manufacturing process. Geometry objects can also be assigned
data types that are sometimes used to group together objects.

FILE EXTENSION
The file extension of the GDS-II format is usually .gds, and the ECAD import
requires it to be so, otherwise it cannot identify the file as a GDS-II file. If the file has
a different extension, it must be changed to .gds before importing the file.

SUPPORTED FEATURES
There are several record types in a GDS-II file that are of no interest in a geometry
import and these are ignored. There are also a few record types that actually could be
imported as a geometry object, but are also ignored. One such example is the Text
record, which produce a lot of mesh elements and is usually of no interest in a
simulation. Below is a list of the supported record types:

• Boundary: a closed polyline object


• Box: a box object
• Path: a path with a thickness
• Sref: an instance of a cell that can be translated, rotated, scaled, and mirrored
• Aref: an n-by-m array of Sref objects
• Element: specification of a cell

Preparing the Geometry


The GDS-II format does not contain layer stackup information, such as thickness and
elevation, this has to be supplied before import to create a 3D structure by extrusion.
For extruding the layers, the import algorithm performs several extrude operations to
generate one geometry object per layer.

Several layers on the same height is common for semiconductor layouts, where the
fabrication process includes deposition followed by etching and then redepositing of a
different layer. To handle such a process scheme, after the import, you can do etching
by removing a layer from other objects, by using the Difference button from the Boolean
Operations submenu in the Geometry toolbar. You can find the various import options
described under the section Grouping of Geometries.

34 | CHAPTER 2: IMPORTING AND EXPORTING ECAD FILES


3

Programming and Command Reference

In this section you find detailed COMSOL API reference information for the
geometry features in the ECAD Import Module.

In this section:

• Commands

35
Commands
Import of ECAD Files

PURPOSE
Import geometry objects from an ECAD file in 2D and 3D using the ECAD Import
Module

SYNTAX
[Link](<tag>).feature().create(<ftag>,"Import");
[Link](<tag>).feature(<ftag>).set(property,<value>);
[Link](<tag>).feature(<ftag>).getType(property);
[Link](<tag>).feature(<ftag>).getStringMatrix("layerprop");
[Link](<tag>).feature(<ftag>).importData();

DESCRIPTION
Use [Link](<tag>).feature().create(<ftag>,"Import") to create a
geometry import feature.

When the property filename is set to a file recognized as an ECAD file, the property
ecadtype is automatically initialized to either gds, ipc2581, or odb++. The following
properties are available:
TABLE 3-1: VALID PROPERTY/VALUE PAIRS.

PROPERTY VALUE DEFAULT DESCRIPTION

contangletol double 5 or Continuous tangent


5[deg] tolerance. Only used if
ignorecontvtx is on.
contributeto String none Tag of cumulative selection
to contribute to.
createselection on | off off Create selections.
ecadtype gds | ipc2581 | unknown Type of ECAD file. A read
odb++ | unknown only property that is
automatically initialized from
the property filename.
elevation String[] Empty Z-position of layers.

36 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


TABLE 3-1: VALID PROPERTY/VALUE PAIRS.

PROPERTY VALUE DEFAULT DESCRIPTION

elimshortedg on | off off Eliminate short edges by


ignoring vertices in layers.
Only used when type is
ecad.
filename String Empty Filename.
fileunit String Empty The length unit in file. Read
only.
grouping all | layer | none layer The grouping of the
imported layers, where all
returns one single object,
and layer gives you one
object per layer. For the
import of GDS files the use
of all is not recommended.
In 2D, all is the same as
layer.
height String[] Empty Thickness of layers.
ignorecontvtx on | off off Ignore vertices with
continuous tangent in layers.
Only used when type is
ecad.
importlayer String[] Empty The entries in the array
govern if the corresponding
layer is to be imported. Each
entry value is either "on" or
"off".
importtype full3d | shell full3d Determine if metal layers are
imported as solid or faces in
3D.
intbnd on | off off Keep interior boundaries on
layers.
layername String[] Empty The user names for the
layers. Empty string implies
the name is taken from the
ECAD file.
maxedglen double 0 Maximum edge length. Only
used if elimshortedg is on.
repairgeom on | off on Repair imported objects.

COMMANDS | 37
TABLE 3-1: VALID PROPERTY/VALUE PAIRS.

PROPERTY VALUE DEFAULT DESCRIPTION

repairtol double 1e-5 Repair tolerance, relative to


(for size of union of imported
GDS) objects. Setting this property
1e-6 will automatically set
(for repairtoltype to relative
ODB++ and repairgeom to on.
and
IPC-2581
repairtoltype auto | relative auto Determine if repair
tolerance is set automatically
or manually by the
repairtol property.
sellayer on | off on Create layer selections.
sellayershow all | dom | bnd | all Show layer selections in
off physics, materials, and so on,
and in part instances (when
sellayer is on). This
property is not available in a
work plane’s Plane
Geometry.
selresult on | off off Create selections of all
resulting objects.
selresultshow all | obj | dom | The Show selections of resulting
bnd | edg | pnt | highest objects in physics, materials,
off available and so on, or in part
entity level instances. obj is not
except available in a component’s
obj; geometry. dom, bnd, and
usually edg are not available in all
dom. features.
updategeomunit Boolean true or The default is true if the
false feature is the first in the
geometry sequence,
otherwise false. If true,
the geometry sequence unit
will be updated to the
fileunit value when
performing the import.

38 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


The file specified by filename can be of any of the following formats:
TABLE 3-2: SUPPORTED FILE FORMATS.

FILE FORMAT FILE EXTENSIONS ECADTYPE

GDS .gds gds


IPC-2581 .cvg,.xml ipc2581
ODB++® .zip, .tar, .tgz, . odb++
[Link]

The imported objects are represented using COMSOL’s geometry modeler.

The property ecadtype determines which properties are available, see Table 3-2 for
supported types. The property ecadtype is read only, and it is automatically initialized
from the property filename, according to Table 3-2.

The property importlayer determines which layers to import. It is a string array of


the same length as the number of layers, holding the strings on or off. The property
is initialized with a valid default when setting the property filename.

To inspect available layers in a file, use the method

[Link](<tag>).feature(<ftag>).getStringMatrix("layerprop");

It returns a String[][], with the same number of rows as the number of layers, that
contains information about each layer.

The property height determines the height of all layers. It is a string array of the same
length as the number of layers, holding string representations of the layer height, for
example 1[mm]. The property is initialized with a valid default when setting the
property filename.

The property elevation determines the Z-position of all layers. It is a string array of
the same length as the number of layers, holding string representations of the layer
elevation. Read more about how this property is initialized with a valid default for the
supported formats in the following sections:

• Import of ODB++ and IPC-2581 Files,


• Import of GDS Files.

If selresult is set to on, a selection is created for all resulting entities of each type
(object, domain, boundary, edge, and point), for use in the geometry sequence. To
access the object selection, use [Link](<tag>).selection(<ftag>), where
<tag> is the geometry tag and <ftag> is the feature tag. To access the other selections,
use [Link](<tag>).selection(<ftag>.<lvl>), where <tag> is the geometry

COMMANDS | 39
tag, <ftag> is the feature tag, and <lvl> is one of dom, bnd, edg, or pnt. If, in
addition, selresultshow is set to a value other than off, all or some of these
selections appear for use outside the geometry sequence. To access these selections, use
[Link](<tag>_<ftag>_<lvl>), where <tag> is the geometry tag,
<ftag> is the feature tag, and <lvl> is one of dom, bnd, edg, or pnt.

If sellayer is set to on, a selection is created for all resulting entities of the types
object, domain, and boundary, of each layer, for use in the geometry sequence. To
access the object selections, use [Link](<tag>).selection(<ftag>_<otag>),
where <otag> is a tag derived from the name of the imported layer. <otag> is derived
by replacing space and dot characters with underscore characters and removing other
characters that are not numbers or uppercase or lowercase English characters (A–Z and
a–z). Additionally, if required to make <otag> unique, _<m> is appended, where <m>
is an integer. To access the other selections, use [Link](<tag>).
selection(<ftag>_<otag>.dom) or [Link](<tag>).
selection(<ftag>_<otag>.bnd), where <otag> is a tag derived from the name of
the imported layer. If, in addition, sellayershow is set to a value other than off, all
or some of these selections appear for use outside the geometry sequence.

To access these selections, use [Link](<tag>_<ftag>_<otag>_dom) or


[Link](<tag>_<ftag>_<otag>_bnd), where <otag> is a tag derived
from the name of the imported layer.

IMPORT OF ODB++ AND IPC-2581 FILES


Properties that are only available when ecadtype is ipc2581, odb++.
TABLE 3-3: VALID PROPERTY/VALUE PAIRS FOR IPC-2581 AND ODB++.

PROPERTY NAME PROPERTY VALUE DEFAULT DESCRIPTION

compattrtag String featureTag Component attribute tag


.component
compbottomoffset double 0 Elevation offset for bottom
components (only in 3D)
compheight fromfile | fromfile Height of components (only in
zero 3D)
comptopoffset double 0 Elevation offset for top
components (only in 3D)
dielectric on | off on Import dielectric regions
drillhandling separate | modify Drill layer handling
modify

40 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


TABLE 3-3: VALID PROPERTY/VALUE PAIRS FOR IPC-2581 AND ODB++.

PROPERTY NAME PROPERTY VALUE DEFAULT DESCRIPTION

elevationtype metalabove | metalabove Select how elevations should


metalbetween be determined.
| manual
ignorelinewidth on | off off Import line symbols as curve
objects by ignoring the line
width during import
ignoreoffset double -0.1[mm] Offset used when
ignoreoutsideboard is on.
The file unit is used if no unit is
specified.
ignoreoutsideboard on | off off Ignore objects for which the
defining points fall outside the
board boundary incremented
with the offset defined by
ignoreoffset
ignoretext on | off on Ignore objects marked as text
in the files
importcomponents on | off off Import component outlines
nonplatedholedom on | off off Create domains for non-plated
holes
platedholedom on | off on Create domains for the cores
of plated holes
platedholethrough on | off on Plated hole cores through
metal layers
platingthickness double 0 Drill hole plating thickness
selnetkeepbnd on | off false Keep boundary net selections
selnetkeepdom on | off false Keep domain net selections
selnetnamebnd String[] Empty Names of boundary net
selections (read only)
selnetnamedom String[] Empty Names of domain net
selections (read only)
selnettagbnd String[] Empty Tags of boundary net
selections (read only, hidden in
GUI)
selnettagdom String[] Empty Tags of domain net selections
(read only, hidden in GUI)

COMMANDS | 41
TABLE 3-3: VALID PROPERTY/VALUE PAIRS FOR IPC-2581 AND ODB++.

PROPERTY NAME PROPERTY VALUE DEFAULT DESCRIPTION

selnetcontributeto String[] Empty Tags of cumulative selection to


bnd contribute to (or none to not
contribute), for boundary net
selections
selnetcontributeto String[] Empty Tags of cumulative selection to
dom contribute to (or none to not
contribute), for domain net
selections
selnetshowbnd on | off off Show boundary net selections
in physics, materials, and so
on; in part instances; or in 3D
from a plane geometry
selnetshowdom on | off off Show domain net selections in
physics, materials, and so on;
in part instances; or in 3D
from a plane geometry
unitemetalanddiel on | off on Unite metal layer and in-layer
dielectric
viadom on | off on Create domains for cores of
vias
viathrough on | off off Via cores through metal layers
The property elevationtype controls how imported layers are positioned in the
Z direction. When elevationtype is metalabove or metalbetween, the imported
layers are stacked on top of each other with no gaps, so the Z-positions are computed
from the height property. When elevationtype is manual and grouping is set to
layer or none, the imported layers are positioned in the Z direction as specified by the
elevation property. To switch to manual control of elevations it is recommended to
first set elevationtype to manual, then set the values for the height and elevation
properties.

The property elevation is initialized with a valid default on these occasions:

• when setting the property filename,


• when setting the property elevationtype to metalabove or metalbetween,
• when setting the property elevationtype to manual,

42 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


• when elevationtype is metalabove or metalbetween, and the value of the
height property is changed,
• when elevationtype is metalabove or metalbetween, and the value of the
importtype property is changed.

You can use the net selection tag as a key when setting array elements in the other
properties by using set(property,<ntag>, value), where <ntag> is a tag derived
from the name of the net selection.

To access net selections, use [Link](<tag>_<ftag>_<ntag>_dom) or


[Link](<tag>_<ftag>_<ntag>_bnd), where <ntag> is the tag of the net
selection.

IMPORT OF GDS FILES


If the file type is GDS, you can create additional selections for each imported cell by
using the properties selcell and selcellshow.

Properties that are only available when ecadtype is gds.


TABLE 3-4: VALID PROPERTY/VALUE PAIRS FOR GDS.

PROPERTY NAME PROPERTY DEFAULT DESCRIPTION


VALUE

arcdistancetol double 0.3 Tolerance for segment length


deviation.
arcmaxangle double 36 Maximum angle for segments.
arcminangle double 3.6 Minimum angle for segments to
part of an arc.
arcmaxcircledev double 1e-3 Maximum allowed point deviation
from a circle, relative to the circle
radius.
arcradiustol double 0.4 Tolerance for arc curvature.
cell String Empty Name of cell to import. The top
cell is imported by default.
cellfilter String Empty Name of cell to include. Leave
empty to include all cells below
the cell selected by the cell
property.
findarcs auto | auto Control arc recognition.
manual | off

COMMANDS | 43
TABLE 3-4: VALID PROPERTY/VALUE PAIRS FOR GDS.

PROPERTY NAME PROPERTY DEFAULT DESCRIPTION


VALUE

findlines on | off on Turn on straight line recognition.


Only available when findarcs is
manual.
manualelevation on | off off Manual control of elevations.
selcell on | off off Create cell selections.
selcellshow all | dom | dom Show cell selections in physics,
bnd | off materials, and so on, and in part
instances (when selcell is on).
This property is not available in a
work plane’s Plane Geometry.
splitbydatatype on | off off Treat datatypes as separate layers
The property manualelevation controls how imported layers are positioned in the
Z direction. When manualelevation is off, the imported layers are stacked on top
of each other with no gaps, so the Z-positions are computed from the height
property. When manualelevation is on and grouping is set to layer or none, the
imported layers are positioned in the Z direction as specified by the elevation
property. To switch to manual control of elevations it is recommended to first set
manualelevation to on, then set the values for the height and elevation
properties.

The property elevation is initialized with a valid default on these occasions:

• when setting the property filename,


• when setting the property manualelevation to off,
• when manualelevation is off, and the value of the height property is changed,
• when manualelevation is off, and the value of the importtype property is
changed.

When findarcs is auto or manual, line segments are combined to form arcs. If
findarcs is manual, the properties arcdistancetol, arcradiustol, arcminangle,
arcmaxangle, and findlines can be used to tune the arc recognition algorithm,
otherwise the algorithm tries to determine optimal parameters.

Exporting Geometry to OASIS (2D)


To export the finalized geometry to a file, enter

44 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE


[Link](<ctag>).geom(<tag>).exportFinal(<filename>);

where <filename> is a string for a file system path or a file location URI referencing
a file version in a Model Manager database.

To export selected geometry objects to a file, first select the objects to export using

[Link](<ctag>).geom(<tag>).export().selection().
set(<objnames>);

Set a file format using

[Link](<ctag>).geom(<tag>).export().setType(<format>);

where <format> is “oasis”, the OASIS (*.oas) file format.

Export the file by entering

[Link](<ctag>).geom(<tag>).export(<filename>);

ADVANCED SETTINGS FOR OASIS FILES


Set curve approximation detail for OASIS export by using

[Link](<ctag>).geom(<tag>).export().
setOasisApproxDetail(<detail>);

where <detail> is String set to graphics (default), coarse, normal, fine.

Get curve approximation detail for OASIS export by using

[Link](<ctag>).geom(<tag>).export().
getOasisApproxDetail();

The method returns a String.

Get the Work plane column in Layers table for Oasis export in 3D (read only) using

[Link](<ctag>).geom(<tag>).export().
getLayerWorkPlanes();

The method returns a String[].

Set the Layer number for a work plane in Layers table for OASIS export in 3D using

[Link](<ctag>).geom(<tag>).export().
setLayerNumber(<index>,<layer>);

where <index> is the index number of the row in the table and <layer> is the Layer
number you want to assign to that row.

Get the Layer number column in Layers table for OASIS export in 3D using

[Link](<ctag>).geom(<tag>).export().getLayerNumbers();

COMMANDS | 45
The method returns an int[] value.

Set the Layer name for a work plane in Layers table for OASIS export in 3D using

[Link](<ctag>).geom(<tag>).export().
setLayerName(<index>,<name>);

where <index> is the index number of the row in the table and <name> is a String of
the Layer name you want to assign to that row.

Get the Layer name column in Layers table for OASIS export in 3D using

[Link](<ctag>).geom(<tag>).export().getLayerNames();

The method returns a String[].

46 | CHAPTER 3: PROGRAMMING AND COMMAND REFERENCE

You might also like