Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Simple gerber parser meant to be used in conjuction with the gerber-types crate

License

NotificationsYou must be signed in to change notification settings

NemoAndrea/gerber-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simplegerber parser written in rust to be used with thegerber-types crate.

use std::fs::File;use std::io::{BufRead,BufReader};use gerber_parser::parser::parse_gerber;// open a .gbr file from systemlet file =File::open(path).unwrap();let reader =BufReader::new(file);// Now we parse the file to a GerberDoclet gerber_doc:GerberDoc =parse_gerber(reader);// it is possible to convert to an 'atomic' representation purely// in terms of Vec<Command> of the gerber-types cratelet commands:Vec<Command> = gerber_doc.to_commands();

Current State

⚠️ Note: this package is still in development and does not cover the full Gerber spec

Currently missing

  • AllAM commands
  • LM,LR,LS,IP commands (note: these are deprecated in the spec)
  • AB commands

Partial:

  • TheTF andTA commands only support a limited range of arguments; custom attributes will result in an error

General to-do

  • Do proper coordinate check (compatibility withformat specification)
  • Test with output from more programs (I use f360 and that seems to work)

About

Simple gerber parser meant to be used in conjuction with the gerber-types crate

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp