DIY Layout Creator - software for easy drawing PCB, vero and perfboard layouts

Started by bancika, May 01, 2006, 08:00:21 PM

Previous topic - Next topic

~arph

I am interested in what your aims are for this. Are you planning on both schematic drawing and layout drawing?
In other words are we aiming at a (much)simpler type of eagle?

It might be a good idea to ponder over some data structures before you get on your way (and back from the states)
I came up with this basic generic structure for components:

1) To keep complexity low for now I assume there is a default grid (as in perf, or vero, no special lead spacings etc.)

base:   Component
             attr: name, value, package

base:   Package
             attr: name, dimension (nodes bounding box) , nodes (points in bounding box grid), schema_representation (paint), fysical_representation (paint)
                  optionally: gridsize (for future support of different lead spacing)

base:   Node (connection terminal.. eg. a resistor has two and a transister/fet three)
             attr: name, value, nodes ( a list of nodes it is connected to )

In this case you can use the same component classes for the schema and the layout, as well as keeping track wich nodes are connected to which and have separate drawing classes (schema_representation and fysical_repersentation,  ...) for the packages.

This also makes it possible to change a components package (capacitors and resistors tend to vary in size and transistor pinouts differ too).

I'll keep you updated when more ideas pop in my head. I'll start using email now.

Yes, we are reinventing the wheel, but not a pirelli with 22" spinners, preferrable more like a wooden circle with a hole in it.

nordine

downloaded the java version for Vista, but don't know what to do then

i have the jar file, then what?

bside2234

You extract the zip file to where you want the program. Double click the jar file and the program opens.

bancika

I like the idea of having different packages for the same component, good idea. It makes it a bit more complicated, but I think it's feasable. Will think more... :)
The new version of DIY Layout Creator is out, check it out here


ConanB

Very much looking forward to this open java style. I guess I'll have to refresh my java skills, haven't touched the stuff since my mobile phone developing days.

While your on the topic of making the components seperate, thought much about a plugin system? Not exactly sure how that would work with java, but say an extra folder with user made "exporters", or something to that effect. Could be neat to allow people to write plugins that can save out a schematic, or something. I could just be talking crazy talk; need my morning coffee still while I'm stairing at our developer tools at work which are all plugin driven.

Conan.

bancika

Quote from: ConanB on August 04, 2008, 08:23:20 PM
Very much looking forward to this open java style. I guess I'll have to refresh my java skills, haven't touched the stuff since my mobile phone developing days.

While your on the topic of making the components seperate, thought much about a plugin system? Not exactly sure how that would work with java, but say an extra folder with user made "exporters", or something to that effect. Could be neat to allow people to write plugins that can save out a schematic, or something. I could just be talking crazy talk; need my morning coffee still while I'm stairing at our developer tools at work which are all plugin driven.

Conan.

yeah, I'll probably make plugins for exporting that would work similar to component extensions (components are also treated like plugins).

Cheers
The new version of DIY Layout Creator is out, check it out here


~arph

To start of, are there any particular areas you'd like me to think about or start on? my specialities are swing/user interfaces,  custom graphics (and animation), but ?I can do other stuff just as wel. Might be a good idea to use for instance substance as a look and feel.

Regards,

Arnoud

bancika

Actually I need some help on how to detect if user has clicked on a component (and of course find out which component is that).
The way I planned to make drawing work is to pass Graphics from main drawing pane to each component which would paint itself.
In the old version, when you add a rectangle, it would create a  rectangle with same size and position in the memory and then use that to determine if user has clicked on the component. I don't think this can work now...
Any ideas are highly appreciated.
Cheers
The new version of DIY Layout Creator is out, check it out here


ConanB

Can't that still work?
I guess i'm just used to PC game overlays where the GUI is still arranged in a tree-view in memory so you have the root and everything attached to it in front-to-back order that you can just poll when the mouse clicks.
The individual GUI elements each implement the "OnMouseDown" that is passed the mouse coordinates and just does it's own check if the mouse is over it.

But I may be misunderstanding your questions?

bancika

well, I'm trying to move that logic out of component code and if I only give component a canvas (graphics) to draw onto I don't know how can I capture what's drawn. One idea is to implement my own graphics and then draw through it to the canvas while remembering what's drawn, but that sucks cause I'd have to implement every method from graphics2D.
The new version of DIY Layout Creator is out, check it out here


ConanB


~arph

Yes I'd leave it in the component.  I see it (now) like this:

There is a base component that has a paint method, in that paint method you paint your package. (let's leave the schematic version out of scope for a second)
also, you catch your mouseclicks coming from your package there. The actual bounds of that base component are determined by the package, so that is also where you catch the clicks. The component itself is not a visible element. The package is. (package by the way will not be a valid Java name  ;) )

Every other component will extend from that. so then every other component only has to set it's own package and the package does the drawing.. mouse clicks are handled by the parent. (you probably also want to add a mouselistener to the actual solder nodes)

The nice thing about this is that if a user clicks on a component the component immediatly knows this . And you don't have to worry about scanning all components on a grid and translating coordinates etc.

I'll try and code a quick example for this when I'm in the train back home.

Regards,

Arnoud

~arph

Oh, and the logic doesn't have to be in the component code... as long as the component catches the event and delegates it somewhere else.. (eg. tells the main frame or grid that it was clicked )

bancika

I don't fully understand. Do you suggest that component should be an actual swing component? That could be a problem if user clicks on a transparent part of the component (image), that would also trigger mouse event.
Btw, old version draws everything on a JPanel which determines where's clicked.
The new version of DIY Layout Creator is out, check it out here


~arph

Yes, I sent you an example of that. I'll find a way around the clicking on non visual parts (by validating the event with the Component again), as for now you are right about that (eg, in my example the electrolytes are also rectangles...)

bancika

I was thinking something: how limiting would it be if you could only drag component by dragging control nodes? Of course, there would be an option to drag all nodes at once (holding ctrl or something)...
Tnx
The new version of DIY Layout Creator is out, check it out here


bancika

Quote from: bancika on August 12, 2008, 10:12:35 AM
I was thinking something: how limiting would it be if you could only drag component by dragging control nodes? Of course, there would be an option to drag all nodes at once (holding ctrl or something)...
Tnx


forget about this, I think I figured out a good (and hopefully fast) way to do it properly...
The new version of DIY Layout Creator is out, check it out here


bancika

anyone interested in doing a design for DIYLC dedicated sourceforge site?
I'm not too good at design. Here's the address http://diylc.sourceforge.net/

Thanks,
Bancika
The new version of DIY Layout Creator is out, check it out here


loss1234

Quick question on the OLD DIY LAYOUT CREATOR (not java)

When I say render to press n peel, i notice it does not make a reverse image. SO my question is this. DO I NEED TO REVERSE IT OR DOES THAT HAPPEN THROUGH THE PROCESS OF IRONING ON TO THE COPPER (i cant remember..its been a while)

I assume i am looking at the project TOP DOWN when in the layout creator itself? (pin 1 on an opamp is actually Pin1 correct?

thanks. anything else i should know for making PNPs?

thanks so much

bancika

The new version of DIY Layout Creator is out, check it out here