GithubHelp home page GithubHelp logo

gdscpp's Introduction

GDScpp

GDScpp is a C++ library that make GDS file manipulation easier. Even though GDScpp can be compiled as a stand-alone program, it is intended to be used as a library.

Version: 1.1

Features

  • Convert GDS data to ASCII.
  • Easily create GDS files.
  • Import GDS files.
  • Extract the root GDS structures.
  • Create a hierarchy diagram of all the GDS structure dependencies.
  • Direct importing of GDS files with redundancy checking
  • Create bounding box of all the GDS structures

Getting Started

Prerequisites

The following packages is required to successfully compile and execute GDScpp.

apt install build-essencials cmake  # for compiling
apt install graphviz                # for creating hierarchy diagram(dot file)

Installation

# Current directory: GDScpp root
mkdir build && cd build
cmake ..
make

Usage

A few examples are provided in the examples folder to show some of GDScpp's functionality.

#include "gdsCpp.hpp"

int main(int argc, char *argv[]){
  gdscpp fooGDS;
  gdsSTR fooSTR;

  fooSTR.name = "example";

  std::vector<int> corX = {  0, 200, 400};
  std::vector<int> corY = {700, 900, 700};
  fooSTR.PATH.push_back(drawPath(1, 5, corX, corY));

  corX = {200, 200};
  corY = {900, 000};
  fooSTR.PATH.push_back(drawPath(1, 5, corX, corY));

  corX = {0, 150, 150, 250, 250, 150, 150, 400, 400,   0, 0};
  corY = {0,   0, 250, 250, 150, 150,   0,   0, 400, 400, 0};
  fooSTR.BOUNDARY.push_back(drawBoundary(2, corX, corY));

  fooGDS.setSTR(fooSTR);
  fooGDS.write(fileName);

  return 0;
}

gdsExample

GDS Interpreter

Translate GDS file directly to ASCII.

./gdscpp -i input.gds
or
./gdscpp -i input.gds >> outfile.txt

GDS Read Write

Imports a GDS file into memory and exports a minimal GDS file out.

./gdscpp -rw input.gds -o output.gds

GDS Root Structures

Calculates the root structures of the GDS file

./gdscpp -rs input.gds

GDS structure hierarchy

generates a diagram of the hierarchical structure of the GDS file.

./gdscpp -r input.gds

Work in progress

  • Create a map to easily find the structures
  • Refactoring of GDScpp into a more standard library format
  • Extract a desired GDS structure to a separate file

Notes

  • Text and nodes are not fully supported.
  • Box is currently not supported.

Change Log

2020-06-11 Improved GDS read-in redundancy checking; AREF, BOX and TEXT is working; Bug fixes. 2020-02-25 Updated Readme, added get_database_units_in_m function.

gdscpp's People

Contributors

heinrichherbst avatar judefdiv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gdscpp's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.