Dangerous Prototypes

General Category => General discussion => Topic started by: rng on March 15, 2013, 04:06:03 am

Title: Razen - A new PCB CAD tool I'm working on.
Post by: rng on March 15, 2013, 04:06:03 am
Hi all,

Longtime Dangerous Prototypes lurker here. I've been working on a PCB CAD tool for a while and thought it'd be of interest to people.

I've used various versions of Eagle for ages and have always wanted to make something that fixed some things that annoyed me about it. The main features I'm focusing on are:

- A simple integrated UI with unified schematic and layout editors
- A version-controlled backend. All design information is stored in Mercurial repositories, so history about edits to the design are available (the designs are also JSON, so they're easy to process with other tools/languages).
- A Python scriptable core. Everything about the design and editor are scriptable in Python, so you can automate editing functions (like generate footprints and symbols) with scripts but also make new editing tools.

It's still a work in process, but the core functionality, while very rough around the edges, is in place. I'm trying to get a version ready for testing by next month. If anyone has comments or questions, let me know!

Oh, it appears I can't post links as a first-time poster, so it should be the first hit when you google "razencad".
Title: Re: Razen - A new PCB CAD tool I'm working on.
Post by: neslekkim on March 15, 2013, 07:50:27 am
http://razencad.com/ (http://razencad.com/)

Cool!

Will the library be usable?, I have tried designspark and eagle, and searching for components is.. confusing, Eagle is a bit better, but still.
Title: Re: Razen - A new PCB CAD tool I'm working on.
Post by: rng on March 15, 2013, 03:59:23 pm
Thanks!

I pretty quickly moved to using only parts from my own set of libraries, so I honestly never had much issue with the Eagle library interface. What's the problem with their search functionality? Is it just not very effective with a huge number of parts/libraries?
Title: Re: Razen - A new PCB CAD tool I'm working on.
Post by: elgonzo on March 16, 2013, 09:46:50 pm
This looks quite promising, rng!

Will there be any documentation of the (work-in-progress) Python scripting API available, either as document (online, PDF, ...) or as pseudo/source code listing all available API calls?

Although i will need to try the Alpha before commenting on your project, i already have some questions regarding the Python scripting screenshot on your web site, and which i want to ask you, right here, right now...

In the particular screenshot, the following Python function for creating a ring of LEDs is shown (replicated here in my post for purposes of reference and because i cannot/do not want to put a link in my post):

Code: [Select]
def main(proj):
    t = Transform.indent()
    angle = 0
    for i in rang(16):
        pos = t.apply_point(0,12)
        name = "D%d" % i
        _,f = proj.part(name, pos, "rng/razen-lib-led", "led)
      f.angle = angle
      t = t.rot(22.5)
      angle += 22.5 
   

It seems that you pass a project object to the main function, which i assume is the active project.
Will there be ways to access other open projects (assuming that the software can have multiple projects open)?
Also, would it be possible to load and create new projects (for example for importers or for batch processing)?

I assume from the script, that the function proj.part(...) returns a tuple of the form (SchematicSymbolObject, PcbFootprintObject), with both having the same initial coordinates specified by the variable "pos". Is this correct?

Anyway, you project looks interesting. As you poll for a potential price bracket for your software, i don't expect this to become open source, right?

p.s.: Being a longtime lurker here too, and your post made me coming out of my lurker hole :)
Title: Re: Razen - A new PCB CAD tool I'm working on.
Post by: rng on March 19, 2013, 11:52:26 pm
[quote author="elgonzo"]This looks quite promising, rng!

Will there be any documentation of the (work-in-progress) Python scripting API available, either as document (online, PDF, ...) or as pseudo/source code listing all available API calls?[/quote]

Definitely (I have some very rough docs generated from docstrings in the sources), and I will try to put up the current state of the API docs soon, but chances are it'll change significantly between now and any release! There will also be example scripts in the distribution.

[quote author="elgonzo"]It seems that you pass a project object to the main function, which i assume is the active project.
Will there be ways to access other open projects (assuming that the software can have multiple projects open)?
Also, would it be possible to load and create new projects (for example for importers or for batch processing)?[/quote]

Yes, that script dialog is passed the project from the currently active tab and evaluates the code you enter in real time. But there will be a way to access all open projects, as well as create new tabs and open projects in them. More generally there will be a way to script UI functionality (for example: open new tab, load project X rev Y into the tab, apply these schematic transforms, export to Z, etc).

I'm also hoping to add the ability to use the API from commandline scripts (as a Python library wrapping the core schematic/layout engine) for batch converters/importers/analysers.

[quote author="elgonzo"]I assume from the script, that the function proj.part(...) returns a tuple of the form (SchematicSymbolObject, PcbFootprintObject), with both having the same initial coordinates specified by the variable "pos". Is this correct?[/quote]

Exactly. Not the best interface I think, but it's worked for the scripts I've written so far :)

[quote author="elgonzo"]Anyway, you project looks interesting. As you poll for a potential price bracket for your software, i don't expect this to become open source, right?[/quote]

The file format and API will be open and documented, but no, no plans for open sourcing yet.
Title: Re: Razen - A new PCB CAD tool I'm working on.
Post by: rng on September 18, 2013, 05:42:16 pm
Hi all,

Razen is now in open beta for Windows, Mac and Linux. I received a bunch of useful suggestions from people testing the alpha versions, and have improved Razen significantly since I first posted it.

If you're interested in giving it a try, the latest version is always available on the download page (http://http://razencad.com/download.html). I'd appreciate any bug reports, feature suggestions, or just general comments and questions.

I've put up a page with a few demo projects (http://http://razencad.com/examples.html) created in Razen, which you can open with the beta version:
(http://http://razencad.com/img/examples/example-attiny-usb_s.png)
(http://http://razencad.com/img/examples/example-matrix-game_s.png)

I also built a quick WebGL 3D history viewer (http://http://static.razencad.com/webrender/) for a demo project:

(http://http://razencad.com/img/webrender.png)

Again, any comments, suggestions or questions are welcome.

Thanks!
Title: Re: Razen - A new PCB CAD tool I'm working on.
Post by: guan on October 15, 2013, 08:14:04 pm
Does anyone know how to create a via (route a trace with a via) in Razen? I can’t for the life of me figure this out, and I think I’ve tried every single key on the keyboard as a shortcut. I am pretty sure it is possible because some of the sample projects have vias.