|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
|
<html> |
|
|
<head> |
|
|
|
|
|
|
|
|
<meta name="Description" content="KLayout layout viewer and editor project page" /> |
|
|
<meta name="Keywords" content="KLayout OASIS GDS2 viewer editor layout semiconductor mask chip design" /> |
|
|
<meta name="abstract" content="KLayout is a free layout viewer and editor for several formats commonly used in the semiconductor industry to transfer layout data" /> |
|
|
<meta name="URL" content="https://www.klayout.de/" /> |
|
|
<meta name="Author" content="Matthias Koefferlein" /> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/> |
|
|
<meta http-equiv="Content-Script-Type" content="text/javascript" /> |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
|
|
|
|
<title>KLayout Layout Viewer And Editor</title> |
|
|
|
|
|
|
|
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.klayout.de/news.xml"/> |
|
|
<link rel="stylesheet" type="text/css" href="https://www.klayout.de/format.css?v2.0"/> |
|
|
<link rel="shortcut icon" href="https://www.klayout.de/favicon.ico"/> |
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="https://www.klayout.de/fonts.css"/> |
|
|
|
|
|
|
|
|
<script src="https://www.klayout.de/jquery-3.4.1.min.js"></script> |
|
|
|
|
|
|
|
|
<link href="https://www.klayout.de/bootstrap-4.3.1-dist/css/bootstrap.min.css" rel="stylesheet"> |
|
|
<script src="https://www.klayout.de/bootstrap-4.3.1-dist/js/bootstrap.min.js"></script> |
|
|
|
|
|
|
|
|
|
|
|
</head> |
|
|
|
|
|
<body> |
|
|
|
|
|
<div class="klayout-header"> |
|
|
|
|
|
<div class="container mb-5"> |
|
|
|
|
|
<nav class="navbar navbar-dark navbar-expand-lg"> |
|
|
|
|
|
<a class="navbar-brand" href="https://www.klayout.de"><img src="https://www.klayout.de/klayout.png" srcset="https://www.klayout.de/klayout-x2.png 2x" alt="KLayout"></a> |
|
|
|
|
|
<div class="collapse navbar-collapse" id="navbarToggleExternalContent"> |
|
|
|
|
|
<ul class="navbar-nav ml-auto mr-auto"> |
|
|
|
|
|
<li class="nav-item dropdown active mr-4"> |
|
|
<a class="nav-link dropdown-toggle klayout-menu" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
About |
|
|
</a> |
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdown"> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/intro.html">KLayout Project</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/doc.html">Documentation</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/galleries.html">Galleries</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/credits.html">Credits</a> |
|
|
<div class="dropdown-divider"></div> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/contact.html">Contact</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/impressum.html">Impressum / Imprint</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/privacy_policy.html">Datenschutz / Privacy Policy</a> |
|
|
</div> |
|
|
</li> |
|
|
<li class="nav-item active mr-4"> |
|
|
<a class="nav-link klayout-menu" href="https://www.klayout.de/build.html">Get KLayout</a> |
|
|
</li> |
|
|
<li class="nav-item active mr-4"> |
|
|
<a class="nav-link klayout-menu" href="https://sami.klayout.org">Package Index</a> |
|
|
</li> |
|
|
<li class="nav-item active mr-5"> |
|
|
<a class="nav-link klayout-menu" href="https://www.klayout.de/forum">Forum</a> |
|
|
</li> |
|
|
<li class="nav-item active"> |
|
|
<span class="nav-link klayout-menu"> |
|
|
<a href="https://f-si.org"><img src="https://www.klayout.de/f-si_logo_32h_w.png" border="0" title="Free Silicon Foundation" alt="F-Si"/></a> |
|
|
<a class="ml-4" href="https://github.com/KLayout"><img src="https://www.klayout.de/GitHub-Mark-32px-white.png" border="0" title="KLayout on GitHub" alt="GitHub"/></a> |
|
|
</span> |
|
|
</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation"> |
|
|
<span class="navbar-toggler-icon"></span> |
|
|
</button> |
|
|
|
|
|
</nav> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="container"> |
|
|
|
|
|
<h1>DXF Format</h1> |
|
|
|
|
|
<p> |
|
|
This is a brief description of the DXF format or more precisely: the subset of DXF that KLayout understands. |
|
|
Syntactically, DXF is a very simple format. The basic problem when reading DXF however is how to interpret it. |
|
|
Apparently, it is more or less a dump of the object properties of the CAD tool, and many questions regarding the |
|
|
interpretation of the properties are left open. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
The implementation of KLayout is based on a number of test cases and comparison with other viewers. |
|
|
In some cases, the interpretation of features was varying (for example, the interpretation of array instances). |
|
|
In that case, TrueView (see link below) was believed to be the main authority in DXF interpretation. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
Here are some links and references to other free viewers: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li><a href="http://en.wikipedia.org/wiki/AutoCAD_DXF">DXF page on Wikipedia</a></li> |
|
|
<li><a href="http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=12272454&linkID=10809853">DXF specification page</a></li> |
|
|
<li><a href="http://usa.autodesk.com/adsk/servlet/pc/index?id=6703438&siteID=123112">TrueView viewer</a></li> |
|
|
<li><a href="http://www.sharecad.org">Online viewer (www.ShareCAD.org)</a></li> |
|
|
<li><a href="http://www.edrawingsviewer.com">eDrawings viewer</a></li> |
|
|
</ul> |
|
|
|
|
|
<h2>Basic format</h2> |
|
|
|
|
|
<p> |
|
|
DXF consists of records of a very simple structure: |
|
|
</p> |
|
|
|
|
|
<pre> |
|
|
<Group-Code> <Value> |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
The group code is an integer which implicitly defines the value type and |
|
|
acts as a key for the value. |
|
|
In ASCII DXF, group codes and values are written in a single line each. |
|
|
These are the group codes and values relevant for layout data: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li><b>0</b>: string (keyword)</li> |
|
|
<li><b>2</b>: string (arbitrary)</li> |
|
|
<li><b>6</b>: string</li> |
|
|
<li><b>8</b>: string</li> |
|
|
<li><b>10..13</b>: double precision coordinate</li> |
|
|
<li><b>20..23</b>: double precision coordinate</li> |
|
|
<li><b>30..33</b>: double precision coordinate</li> |
|
|
<li><b>39</b>: double precision coordinate</li> |
|
|
<li><b>40..45</b>: double precision floating point value</li> |
|
|
<li><b>50</b>: double precision angle (in degree)</li> |
|
|
<li><b>62</b>: 16 bit integer value</li> |
|
|
<li><b>66</b>: 16 bit integer value </li> |
|
|
<li><b>70</b>: 16 bit integer value</li> |
|
|
<li><b>210</b>: double precision coordinate</li> |
|
|
<li><b>220</b>: double precision coordinate</li> |
|
|
<li><b>230</b>: double precision coordinate</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
Pure ASCII DXF allows the lines to contain leading or trailing blanks. KLayout also tries to identify |
|
|
stray blank lines and skip them. Some systems generate such files. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
There is also a binary version of the DXF format with this basic structure: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li>Header (22 Bytes): "AutoCAD Binary DXF<CR><LF><SUB><NULL></li> |
|
|
<li>16 bit integers: 2 btyes, LSB firs</li> |
|
|
<li>double: 8 bytes, LSB firs</li> |
|
|
<li>string: zero-terminated</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
Apparently the binary format is rarely used. It suffers from a pretty basic issue: since the data type |
|
|
of a value - hence the byte count - is implicitly determined by the group code, exact knowledge of the data type |
|
|
associated with each group code is required. |
|
|
</p> |
|
|
|
|
|
<h2>General structure</h2> |
|
|
|
|
|
<p> |
|
|
This is the general structure of a DXF file as KLayout understands it. This is a schematic representation. |
|
|
The "//" comments are not part of the file - they are provided for readability. |
|
|
In addition, group codes and values have been written on one line. In ASCII DXF, group codes and values are on separate lines. |
|
|
The indentation indicates coherent sections. "..." indicates that other group code / value pairs may be present which are read over: |
|
|
</p> |
|
|
|
|
|
<pre> |
|
|
// header section |
|
|
0 "SECTION" |
|
|
2 "HEADER" |
|
|
... |
|
|
0 "ENDSEC" |
|
|
... |
|
|
// tables section |
|
|
0 "SECTION" |
|
|
2 "TABLES" |
|
|
... |
|
|
// layer table |
|
|
0 "TABLE" |
|
|
2 "LAYER" |
|
|
70 (# of layers - do not use for reading) |
|
|
... |
|
|
// each layer |
|
|
0 "LAYER" |
|
|
2 (layer name) |
|
|
62 (color code) |
|
|
6 (line style) |
|
|
... |
|
|
0 "ENDTAB" |
|
|
... |
|
|
0 "ENDSEC" |
|
|
... |
|
|
// blocks section |
|
|
0 "SECTION" |
|
|
2 "BLOCKS" |
|
|
... |
|
|
// each block |
|
|
0 "BLOCK" |
|
|
8 (layer name - always 0?) |
|
|
2 (block name) |
|
|
70 (flags - always 64?) |
|
|
10 (base point X) |
|
|
20 (base point Y) |
|
|
... |
|
|
// each entity |
|
|
0 (entity type) |
|
|
... (specific for entity) |
|
|
... |
|
|
0 "ENDBLK" |
|
|
... |
|
|
0 "ENDSEC" |
|
|
... |
|
|
// entities (top level cell) |
|
|
0 "SECTION" |
|
|
2 "ENTITIES" |
|
|
... |
|
|
// each entity |
|
|
0 (entity type) |
|
|
... (specific for entity) |
|
|
... |
|
|
0 "ENDSEC" |
|
|
... |
|
|
// end of file |
|
|
0 "EOF" |
|
|
</pre> |
|
|
|
|
|
<p>KLayout reads these entities which are described in detail below:</p> |
|
|
|
|
|
<ul> |
|
|
<li><b>POLYLINE</b>: polygon, paths</li> |
|
|
<li><b>LWPOLYLINE</b>: polygon, paths</li> |
|
|
<li><b>SPLINE</b>: a spline line segment</li> |
|
|
<li><b>TRACE</b>: a four-point polygon</li> |
|
|
<li><b>ARC</b>: an arc segment</li> |
|
|
<li><b>ELLIPSE</b>: an elliptic segment</li> |
|
|
<li><b>INSERT</b>: cell reference</li> |
|
|
<li><b>LINE</b>: parts of polygon contours, path</li> |
|
|
<li><b>SOLID</b>: triangle or tetragon</li> |
|
|
<li><b>HATCH</b>: a filled area (polygon)</li> |
|
|
<li><b>CIRCLE</b>: a circle</li> |
|
|
<li><b>DIMENSION</b>: a dimension drawing</li> |
|
|
<li><b>TEXT</b>: text</li> |
|
|
<li><b>ATTRIB</b>: text</li> |
|
|
<li><b>MTEXT</b>: multi-line text</li> |
|
|
</ul> |
|
|
|
|
|
<h3>POLYLINE entity</h3> |
|
|
|
|
|
<pre> |
|
|
0 "POLYLINE" |
|
|
8 (layer name) |
|
|
210 (extrusion direction x) |
|
|
220 (extrusion direction y) |
|
|
230 (extrusion direction z) |
|
|
70 (flags - bit 0 for closed (1) or open (0) polyline) |
|
|
40 (start width) |
|
|
41 (end width) |
|
|
... |
|
|
// each vertex |
|
|
0 "VERTEX" |
|
|
8 (layer name - what for?) |
|
|
10 (position X) |
|
|
20 (position Y) |
|
|
42 (bulge) |
|
|
40 (start width) |
|
|
41 (end width) |
|
|
... |
|
|
0 "SEQEND" |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
A closed polyline with a width of 0 usually creates a polygon (unless in "keep lines" mode - see below). |
|
|
A polyline with a width > 0 creates a path. |
|
|
A non-closed polyline with a width of 0 creates a path with width 0 or contributes to the edges that |
|
|
will be merged in "merge lines" mode. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
Polylines with constant width are translated into GDS PATH objects. Polylines with non-constant |
|
|
width are translated into polygons. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
For paths: no round ends are provided. Variable extensions have to be emulated by extending the first and last segment. |
|
|
</p> |
|
|
|
|
|
<h3>LWPOLYLINE entity for polygons</h3> |
|
|
|
|
|
<pre> |
|
|
0 "LWPOLYLINE" |
|
|
8 (layer name) |
|
|
210 (extrusion direction x) |
|
|
220 (extrusion direction y) |
|
|
230 (extrusion direction z) |
|
|
70 (flags - see POLYLINE) |
|
|
42 (bulge) |
|
|
43 (common width) |
|
|
... |
|
|
// each vertex |
|
|
10 (position X) |
|
|
20 (position Y) |
|
|
40 (start width of segment) |
|
|
41 (end width of segment) |
|
|
... |
|
|
0 "SEQEND" |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
LWPOLYLINE entities are alternative representations of POLYLINE entities and are treated alike. |
|
|
</p> |
|
|
|
|
|
<h3>ARC entity</h3> |
|
|
|
|
|
<pre> |
|
|
0 "ARC" |
|
|
8 (layer name) |
|
|
210 (extrusion direction x) |
|
|
220 (extrusion direction y) |
|
|
230 (extrusion direction z) |
|
|
10 (center X) |
|
|
20 (center Y) |
|
|
50 (start angle) |
|
|
51 (end angle) |
|
|
... |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
An ARC creates a path with width 0 or contributes to the edges that |
|
|
will be merged in "merge lines" mode. |
|
|
The arc will be interpolated according to the number of points per circle specified |
|
|
in the reader options. |
|
|
</p> |
|
|
|
|
|
<h3>ELLIPSE entity</h3> |
|
|
|
|
|
<pre> |
|
|
0 "ELLIPSE" |
|
|
8 (layer name) |
|
|
210 (extrusion direction x) |
|
|
220 (extrusion direction y) |
|
|
230 (extrusion direction z) |
|
|
10 (center X) |
|
|
20 (center Y) |
|
|
11 (main axis X) |
|
|
21 (main axis Y) |
|
|
40 (minor axis radius) |
|
|
41 (start angle) |
|
|
42 (end angle) |
|
|
... |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
An ELLIPSE creates a path with width 0 or contributes to the edges that |
|
|
will be merged in "merge lines" mode. |
|
|
The arc will be interpolated according to the number of points per circle specified |
|
|
in the reader options. |
|
|
</p> |
|
|
|
|
|
<h3>SPLINE entity</h3> |
|
|
|
|
|
<pre> |
|
|
0 "SPLINE" |
|
|
8 (layer name) |
|
|
210 (extrusion direction x) |
|
|
220 (extrusion direction y) |
|
|
230 (extrusion direction z) |
|
|
71 (degree) |
|
|
... |
|
|
// each vertex |
|
|
10 (position X) |
|
|
20 (position Y) |
|
|
... |
|
|
// each knot |
|
|
40 (knot value) |
|
|
... |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
A spline creates a path with width 0 or contributes to the edges that |
|
|
will be merged in "merge lines" mode. |
|
|
</p> |
|
|
|
|
|
<h3>TRACE entity</h3> |
|
|
|
|
|
<pre> |
|
|
0 "TRACE" |
|
|
8 (layer name) |
|
|
210 (extrusion direction x) |
|
|
220 (extrusion direction y) |
|
|
230 (extrusion direction z) |
|
|
2 (block name) |
|
|
10 (position1 X) |
|
|
20 (position1 Y) |
|
|
11 (position2 X) |
|
|
21 (position2 Y) |
|
|
12 (position3 X) |
|
|
22 (position3 Y) |
|
|
13 (position4 X) |
|
|
23 (position4 Y) |
|
|
... |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
A TRACE entity generates a polygon with four vertices. |
|
|
</p> |
|
|
|
|
|
<h3>SOLID entity</h3> |
|
|
|
|
|
<pre> |
|
|
0 "SOLID" |
|
|
8 (layer name) |
|
|
210 (extrusion direction x) |
|
|
220 (extrusion direction y) |
|
|
230 (extrusion direction z) |
|
|
2 (block name) |
|
|
10 (position1 X) |
|
|
20 (position1 Y) |
|
|
11 (position2 X) |
|
|
21 (position2 Y) |
|
|
12 (position3 X) |
|
|
22 (position3 Y) |
|
|
13 (position4 X) |
|
|
23 (position4 Y) |
|
|
... |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
To get a correctly ordered tetragon, points 3 and 4 must be swapped. A triangle is formed by setting position 3 and 4 to the same coordinates. |
|
|
</p> |
|
|
|
|
|
<h3>DIMENSION entity</h3> |
|
|
|
|
|
<pre> |
|
|
0 "DIMENSION" |
|
|
2 (block name) |
|
|
8 (layer) |
|
|
... |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
A DIMENSION entity is only implemented as importing the drawing block without a displacement |
|
|
using the given layer on "0" wildcard layers inside the block. |
|
|
</p> |
|
|
|
|
|
<h3>INSERT entity</h3> |
|
|
|
|
|
<pre> |
|
|
0 "INSERT" |
|
|
8 (layer name) |
|
|
2 (block name) |
|
|
10 (position X) |
|
|
20 (position Y) |
|
|
41 (scale factor X - can be negative for mirroring) |
|
|
42 (scale factor Y - can be negative for mirroring) |
|
|
50 (rotation angle) |
|
|
70 (number of columns - optional) |
|
|
71 (number of rows - optional) |
|
|
44 (column spacing - optional) |
|
|
45 (row spacing - optional) |
|
|
... |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
The layer specified overrides the "0" layer inside the block. This requires layer specific variants. |
|
|
This override is inherited by child cells as well. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
The array vectors specified by number of column spacing and row spacing is rotated by the given angle, but not scaled or mirrored. |
|
|
</p> |
|
|
|
|
|
<h3>LINE entity</h3> |
|
|
|
|
|
<pre> |
|
|
0 "LINE" |
|
|
8 (layer name) |
|
|
210 (extrusion direction x) |
|
|
220 (extrusion direction y) |
|
|
230 (extrusion direction z) |
|
|
10 (start position X) |
|
|
20 (start position Y) |
|
|
11 (start position X) |
|
|
21 (start position Y) |
|
|
41 (scale factor X - can be -1 for mirroring) |
|
|
42 (scale factor Y - can be -1 for mirroring) |
|
|
39 (thickness - can be 0) |
|
|
... |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
Lines are converted into paths with the specified width or contribute to the lines merged in "merge lines" mode. |
|
|
</p> |
|
|
|
|
|
<h3>CIRCLE entity</h3> |
|
|
|
|
|
<pre> |
|
|
0 "CIRCLE" |
|
|
8 (layer name) |
|
|
210 (extrusion direction x) |
|
|
220 (extrusion direction y) |
|
|
230 (extrusion direction z) |
|
|
10 (center position X) |
|
|
20 (center position Y) |
|
|
40 (radius) |
|
|
... |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
Circles are converted to single-point, round-ended paths. |
|
|
</p> |
|
|
|
|
|
<h3>TEXT entity</h3> |
|
|
|
|
|
<pre> |
|
|
0 "TEXT" |
|
|
8 (layer name) |
|
|
210 (extrusion direction x) |
|
|
220 (extrusion direction y) |
|
|
230 (extrusion direction z) |
|
|
10 (position X) |
|
|
20 (position Y) |
|
|
11 (second alignment position X) |
|
|
21 (second alignment position Y) |
|
|
40 (height) |
|
|
50 (rotation) |
|
|
71 (mirror flags) |
|
|
72 (horizontal alignment) |
|
|
73 (vertical alignment) |
|
|
1 (text string) |
|
|
</pre> |
|
|
|
|
|
<h3>MTEXT entity</h3> |
|
|
|
|
|
<pre> |
|
|
0 "MTEXT" |
|
|
8 (layer name) |
|
|
210 (extrusion direction x) |
|
|
220 (extrusion direction y) |
|
|
230 (extrusion direction z) |
|
|
10 (position X) |
|
|
20 (position Y) |
|
|
11 (baseline vector X) |
|
|
21 (baseline vector Y) |
|
|
40 (height) |
|
|
41 (width) |
|
|
46 (alternative width) |
|
|
50 (rotation) |
|
|
71 (alignment flags) |
|
|
75 (columns flag) |
|
|
1 (text string) |
|
|
3 (text string continuation) |
|
|
</pre> |
|
|
|
|
|
<h3>ATTRIB entity</h3> |
|
|
|
|
|
<p> |
|
|
The ATTRIB entity is basically handled like the TEXT entity except |
|
|
that group 74 is used for the vertical alignment. |
|
|
</p> |
|
|
|
|
|
<h3>HATCH entity</h3> |
|
|
|
|
|
<pre> |
|
|
0 "HATCH" |
|
|
8 (layer name) |
|
|
210 (extrusion direction x) |
|
|
220 (extrusion direction y) |
|
|
230 (extrusion direction z) |
|
|
91 (number of loops (contours)) |
|
|
// each loop: |
|
|
92 (flags, usually 3: External (bit 0) | Polyline (bit 1)) |
|
|
93 (number of edges in the first loop) |
|
|
// each point: |
|
|
10 (position X) |
|
|
20 (position Y) |
|
|
... more points with 10/20 group codes |
|
|
... more loops (group codes 92, 93, 10, 20 ...) |
|
|
... |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
A hatch entity creates a polygon. Individual polygon parts are combined with the even-odd union rule: an overlapping contour |
|
|
can cancel an area of another contour even if the orientation of both is the same. |
|
|
</p> |
|
|
|
|
|
<h2>Other topics</h2> |
|
|
|
|
|
<h3><a name="polygon_modes"/>Polygon formation and LINE/POLYLINE interpretation</a></h3> |
|
|
|
|
|
<p> |
|
|
The are several ways to form polygons from DXF input, which are controlled by the LINE/POLYLINE mode setting on the |
|
|
reader options page. The following modes are provided: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li>Automatic</li> |
|
|
<li>Keep lines</li> |
|
|
<li>Create polygons from closed polylines with width = 0</li> |
|
|
<li>Merge lines with width = 0 into polygons</li> |
|
|
<li>Merge lines and auto-close open contours</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
"Automatic" mode will select the following modes: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li>"Keep lines" if at least one SOLID or HATCH entity is present</li> |
|
|
<li>"Create polygons from closed polylines with width = 0" if at least one closed POLYLINE or LWPOLYLINE entity with width = 0 is present</li> |
|
|
<li>"Merge lines with width = 0 into polygons" otherwise.</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
The modes have the following effect: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li>SOLID entities always form filled tetragons or triangles.</li> |
|
|
<li>HATCH entities always form complex polygons.</li> |
|
|
<li>Closed POLYLINE or LWPOLYLINE entities with width = 0 form polygons unless "keep lines" mode is selected. In "auto-close" mode, non-closed polylines will form a closed polygon by connecting the first and last point.</li> |
|
|
<li>Multiple segments specified by either SPLINE,ARC,ELLIPSE,LINE or POLYLINE/LWPOLYLINE entities with width = 0 are joined and, if they form a loop, create a polygon in the "merge lines" modes. In "auto-close" mode, open contours will be closed by connecting the first and last point. |
|
|
Reverse-oriented loops can create holes in outer loops.</li> |
|
|
</ul> |
|
|
|
|
|
<h3>Extrusion direction</h3> |
|
|
|
|
|
<p> |
|
|
The extrusion direction specified by the group codes 210, 220 and 230 is by default (0,0,1). This is the normal case. Extrusion direction (0,0,-1) |
|
|
is also supported. In this case, the shapes will be mirrored at the Y axis. |
|
|
</p> |
|
|
|
|
|
<h3>INSERT entities with layer specification</h3> |
|
|
|
|
|
<p> |
|
|
Layer "0" is a "wildcard" layer and can be overridden on a per-instance |
|
|
basis by a instance specific layer. If the instance has itself "0" layer assigned, no |
|
|
override takes place (or it does not have any effect). |
|
|
</p> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
</body> |
|
|
</html> |
|
|
|
|
|
|