GDS-Render v1.2.1
gds-types.h
Go to the documentation of this file.
1/*
2 * GDSII-Converter
3 * Copyright (C) 2018 Mario Hüttel <mario.huettel@gmx.net>
4 *
5 * This file is part of GDSII-Converter.
6 *
7 * GDSII-Converter is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * GDSII-Converter is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
18 */
19
31#ifndef __GDS_TYPES_H__
32#define __GDS_TYPES_H__
33
34#include <stdint.h>
35#include <glib.h>
36
37#define CELL_NAME_MAX (100)
39/* Maybe use the macros that ship with the compiler? */
40#define MIN(a,b) (((a) < (b)) ? (a) : (b))
41#define MAX(a,b) (((a) > (b)) ? (a) : (b))
46
49{
52 GRAPHIC_BOX = 2
53};
54
63struct gds_point {
64 int x;
65 int y;
66};
67
79 int marker;
81};
82
87 uint16_t year;
88 uint16_t month;
89 uint16_t day;
90 uint16_t hour;
91 uint16_t minute;
92 uint16_t second;
93};
94
100 GList *vertices;
103 int16_t layer;
104 int16_t datatype;
105};
106
115 double angle;
117};
118
122struct gds_cell {
126 GList *child_cells;
130};
131
140 GList *cells;
141 GList *cell_names ;
142};
143
146#endif /* __GDS_TYPES_H__ */
graphics_type
Types of graphic objects.
Definition: gds-types.h:49
path_type
Defines the line caps of a path.
Definition: gds-types.h:58
#define CELL_NAME_MAX
Maximum length of a gds_cell::name or a gds_library::name.
Definition: gds-types.h:37
@ GRAPHIC_POLYGON
An arbitrary polygon.
Definition: gds-types.h:51
@ GRAPHIC_PATH
Path. Esentially a line.
Definition: gds-types.h:50
@ GRAPHIC_BOX
A rectangle.
Definition: gds-types.h:52
@ PATH_SQUARED
Definition: gds-types.h:58
@ PATH_ROUNDED
Definition: gds-types.h:58
@ PATH_FLUSH
Definition: gds-types.h:58
@ GDS_CELL_CHECK_NOT_RUN
Definition: gds-types.h:45
For the internal use of the checker.
Definition: gds-types.h:78
Stores the result of the cell checks.
Definition: gds-types.h:71
struct gds_cell_checks::_check_internals _internal
int unresolved_child_count
Number of unresolved cell instances inside this cell. Default: GDS_CELL_CHECK_NOT_RUN.
Definition: gds-types.h:72
int affected_by_reference_loop
1 if the cell is affected by a reference loop and therefore not renderable. Default: GDS_CELL_CHECK_N...
Definition: gds-types.h:73
This represents an instanc of a cell inside another cell.
Definition: gds-types.h:110
int flipped
Mirrored on x-axis before rotation.
Definition: gds-types.h:114
double angle
Angle of rotation (counter clockwise) in degrees.
Definition: gds-types.h:115
double magnification
magnification
Definition: gds-types.h:116
struct gds_cell * cell_ref
Referenced gds_cell structure.
Definition: gds-types.h:112
struct gds_point origin
Origin.
Definition: gds-types.h:113
char ref_name[CELL_NAME_MAX]
Name of referenced cell.
Definition: gds-types.h:111
A Cell inside a gds_library.
Definition: gds-types.h:122
struct gds_time_field mod_time
Definition: gds-types.h:124
struct gds_cell_checks checks
Checking results.
Definition: gds-types.h:129
struct gds_time_field access_time
Definition: gds-types.h:125
char name[CELL_NAME_MAX]
Definition: gds-types.h:123
GList * child_cells
List of gds_cell_instance elements.
Definition: gds-types.h:126
struct gds_library * parent_library
Pointer to parent library.
Definition: gds-types.h:128
GList * graphic_objs
List of gds_graphics.
Definition: gds-types.h:127
A GDS graphics object.
Definition: gds-types.h:98
int16_t datatype
Data type of graphic object.
Definition: gds-types.h:104
enum graphics_type gfx_type
Type of graphic.
Definition: gds-types.h:99
enum path_type path_render_type
Line cap.
Definition: gds-types.h:101
int width_absolute
Width. Not used for objects other than paths.
Definition: gds-types.h:102
int16_t layer
Layer the graphic object is on.
Definition: gds-types.h:103
GList * vertices
List of gds_point.
Definition: gds-types.h:100
GDS Toplevel library.
Definition: gds-types.h:135
struct gds_time_field mod_time
Definition: gds-types.h:137
double unit_in_meters
Definition: gds-types.h:139
struct gds_time_field access_time
Definition: gds-types.h:138
GList * cells
Definition: gds-types.h:140
char name[CELL_NAME_MAX]
Definition: gds-types.h:136
GList * cell_names
Definition: gds-types.h:141
A point in the 2D plane. Sometimes referred to as vertex.
Definition: gds-types.h:63
Date information for cells and libraries.
Definition: gds-types.h:86
uint16_t second
Definition: gds-types.h:92
uint16_t hour
Definition: gds-types.h:90
uint16_t month
Definition: gds-types.h:88
uint16_t year
Definition: gds-types.h:87
uint16_t minute
Definition: gds-types.h:91
uint16_t day
Definition: gds-types.h:89