Skip to content

Commit

Permalink
Move to .NET 5, fix -help error
Browse files Browse the repository at this point in the history
  • Loading branch information
CaiB committed Nov 23, 2021
1 parent 780fde7 commit 206b4b6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,5 @@ ASALocalRun/
.localhistory/

# BeatPulse healthcheck temp database
healthchecksdb
healthchecksdb
/Properties/launchSettings.json
3 changes: 2 additions & 1 deletion GDStoSVG/GDStoSVG.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<Nullable>enable</Nullable>
<StartupObject>GDStoSVG.Program</StartupObject>
</PropertyGroup>

</Project>
3 changes: 2 additions & 1 deletion GDStoSVG/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ static void Main(string[] args)

for(int i = 0; i < args.Length; i++)
{
if (i == 0) { GDSFile = args[i]; }
if (args[i].Equals("-help", StringComparison.OrdinalIgnoreCase)) { PrintHelp(); return; }
else if (i == 0) { GDSFile = args[i]; }
else if (args[i].Equals("-csv", StringComparison.OrdinalIgnoreCase) && args.Length > i + 1) { CSVFile = args[i + 1]; }
else if (args[i].Equals("-svg", StringComparison.OrdinalIgnoreCase) && args.Length > i + 1) { SVGFile = args[i + 1]; }
else if (args[i].Equals("-unit", StringComparison.OrdinalIgnoreCase) && args.Length > i + 1) { TopUnit = args[i + 1]; }
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
Fully integrated system to convert GDSII format files, such as the ones exported from Cadence Virtuoso, into SVG graphics for printing or display.

Prerequisites:
- [.NET Core 3.1](https://dotnet.microsoft.com/download/dotnet-core)
- [.NET 5](https://dotnet.microsoft.com/download/dotnet)

Should work on Windows, Linux, and Mac. Theoretically big-endian platforms are also supported (untested).

## Usage
1) Export your layout as GDSII format from the CAD software you're using. (see below)
2) Run this utility in info mode to determine layers, by running `GDStoSVG.exe <myfile.gds> -info`
3) It will output design units and layer info to the console. Using this layer list, and the generated SVG file (same name as the input GDS), locate components on a specific layer (all items on a layer are grouped together), and determine what each layer ID corresponds to.
- If your SVG file is too large to open, you may want to export only a sub-unit to start, by using the `-unit <UNIT>` parameter, with one of the units listed from step 2.
4) Create a CSV file with your layer IDs, names, colours, and opacities in the required format (see `GDStoSVG.exe -help` for info).
5) Test your CSV file by running `GDStoSVG.exe <myfile.gds> -csv <layers.csv> -info`.
6) Repeat until you are happy with the layer assignments, and there are no unassigned layers remaining (unless you don't care about those layers).
Expand Down

0 comments on commit 206b4b6

Please sign in to comment.