SVG Editor

Hi, which software do you recomend to edit the SVG drawing. Thanks Patgadget Montreal

Posted 3 years, 2 months ago by patgadget

Inkscape is an open-source SVG editor. http://www.inkscape.org/

Posted 3 years, 2 months ago by Jonathan Cohen

And the commercial option is Adobe Illustrator. We're currently drafting a part making tutorial that will guide you through the process of creating a part.

Posted 3 years, 2 months ago by André Knörig

hi Pat - Here's the tutorial on how to produce SVGs for Frtizing with Illustrator. Hopefully we'll have one for inkscape soon enough:

http://fritzing.org/learning/tutorials/making-parts/part-creation-illustrator/

Posted 3 years, 2 months ago by Jenny Chowdhury

Try this instead: http://fritzing.org/learning/tutorials/creating-custom-parts/.

- j

Posted 1 year, 7 months ago by Jonathan Cohen

Thanks for the quick answer, but the broken link talks about how to use Illustrator to create parts and the link you recommended (http://fritzing.org/learning/tutorials/creating-custom-parts/) is a tutorial for creating custom parts with the built-in parts editor. Not quite the same thing.

However, the page you mention does point to http://fritzing.org/learning/tutorials/creating-custom-parts/providing-part-graphics/ and it in turns points to http://fritzing.org/fritzings-graphic-standards/ and that is the page that made me look for the tutorial about Illustrator in the first place. (Even though I'm actually using Inkscape.)

[sigh] That wasn't all that clear, was it? OK, let me start again.

I'm trying to create a part. I have exact dimensions, but I find that the breadboard template appears to be in some — to me — unknown scale. I.e., I don't understand how Inkscape/Friting gets the px/mm ratio. Specifically, if I set a rectangle to be x mm wide, it doesn't match the breadboard pin spacing of 0.100 mil (1/10" or 2.54mm) at all.

What confuses even more is the statement in the PCB View Graphics description:

  1. The stroke of a footprint should be at least 0.5mm (20mils) thick, otherwise the connection might be ruined while drilling and soldering will be much harder.
  2. The hole itself should be at least 1mm (40mils) thick, so you would actually need to create a circle which is at least 1.5mm wide in diameter, because half of the stroke is drawn inside the circle.
  3. If your part fits on the breadboard, the distance between the footprints should be 5mm (100mils) long.

I have highlighted the fascinating use of 'mil' here.

A 'mil' is a 1/1000'th of an inch. An inch is 25.4mm. Standard pin spacing on breadboards, DIPs etc., is 1/10'th of an inch, or 100mil, or 2.54mm (and yes, I personally hate non-metric measurement systems too — and with a burning passion). Anyway...

So, 0.5mm is ~19.685mil, or maybe better stated the other way — since breadboard metrics is in mils — 20mil is 0.508mm. Those 1.6% errors will add up real fast.

OK. So 40mil 1.016mm and 1mm is 39.37mil.

But above all, 5mm is not even close to 100mil !!! 5mm is ~196.850394mil !

 

Sorry for the flame, but this cost me a lot of time before I realized that I could not expect to trust any of the metrics as documented.

What I really want to know is: How do I use Inkscape to create accurate part images? I see lot's of discussion threads where people talk about jiggling things and trying to align them by eye. This feels fundamentally wrong as we have very accurate parts specification on just about every datasheet ever printed and it is just a question of copying the numbers.

So, is there a system for the scaling of the SVG files? I will be grateful for any help I can get, even if it means hand editing the XML.

Posted 1 year, 7 months ago by Johan™ Strandberg

Hi Johan,

There's some technical background about Fritzing parts you can read:  http://fritzing.org/contributing/developer/fritzing-part-format/.  It's not all about SVGs, but there are some useful hints.

Are you working on footprints, or also schematic, and breadboard images?  In any case, in general, your best bet is to start out with a pre-existing part from the Fritzing core SVG folders, and then modify it.  

Now about measurements and SVGs.  One of the pleasures of SVG is that the format can support extremely accurate placement.  At the top level of the SVG, there are three attributes, "width", "height", and "viewBox".  The width and height are real world measurements that can be specified in units such as cm, mm, inches, etc.  You can set those in the Document Properties dialog in Inkscape's File menu (but for a more reliable approach see below).

The viewBox attribute defines a rectangle, in arbitrary dimensionless units, which are proportionally related to the width and height.  In Fritzing the viewBox attribute is always of the form viewBox="0 0 w h".  All the other coordinates in the SVG file (for lines, circles, paths, etc.) are then given relative to w and h.  

For example, many Fritzing files use inches as units, and use 1000 dpi as the basis for the viewBox.  So you might see something like 

svg width='0.46684in' height='0.20306in' viewBox='0 0 466.84 203.06'

I haven't found a way to reliably set width, height, and viewBox in Inkscape without using the XML editor (under the edit menu) to add/modify the attributes at the top-level svg element.

But once you get those attributes set up, then when you start drawing all the measurements will be in terms relative to the viewBox--which is proportional to the real-world width and height you've set--so it's therefore possible to position elements with a high level of both precision and accuracy.

Hope this helps.  Ask more, if not.

- j

 



Posted 1 year, 7 months ago by Jonathan Cohen

PS.  I changed the offending value from 100mils to 200mils.  Thanks for pointing out the error.

Posted 1 year, 7 months ago by Jonathan Cohen

Thanks!  The Fritzing Part Format is exactly what I needed and I had not groked that the viewBox was the magic sauce that made metrics work. I'm getting right at it!

But... two minor points.

[A] The standard "distance between footprints" is 100mil, not 200mil. That is 2.54mm, not 5mm.

[B] A mil is not the same as 1/20'th of a mm. That's just so. A mil is 1/1000'th of an inch. An inch is exactly 0.0254m. The length of the meter is not negotiable.

Why am I picking on the "a mil is not 0.05mm"? Because it is vitally important when creating parts for Fritzing, or your manufactured circuit boards won't be the right size.

Example:

I have a connector with 1x20 pins, each 100mil apart. Thus the distance between centers of pin 1 and pin 20 is 19*100mil, or 1.900 inch, i.e., 48.26mm. However, if I incorrectly use a spacing between pin centers of 2.5mm, I get 47.5mm. The difference of 0.76mm is enough that the part probably won't fit without brute force. For a longer connector, or a bigger part like a shield, it just won't work at all.

I think this only a documentation error (and possibly a parts error if any parts have been created based on a 2.5mm pin spacing.) In real life it probably only matters to get this right on the circuit layout, but partial correctness would be stupefyingly confusing.

Posted 1 year, 7 months ago by Johan™ Strandberg

Post a Reply

Please login to post a reply.

  • RSS
  • Atom
  • Print this
© 2007 - 2011 University of Applied Sciences Potsdam