parts_editor_help.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <meta content="text/html; charset=ISO-8859-1"
  5. http-equiv="Content-Type">
  6. <title>Parts Editor Help</title>
  7. </head>
  8. <body>
  9. <div class="moz-text-html" lang="x-western">
  10. <div class="moz-cite-prefix"><br>
  11. We have decided to release the new Parts Editor in two phases.
  12. The first phase, included in release 0.7.9, is already easier to
  13. use&nbsp; and more powerful than the old Parts Editor, but you
  14. still have to do a lot of preliminary work using an SVG editor
  15. like Inkscape, Illustrator, or CorelDRAW. In the next phase we
  16. hope to eliminate much of the need to use these programs.<br>
  17. <br>
  18. <big><big><b>How to start</b></big></big><br>
  19. <br>
  20. The new approach is very different from that of the old Parts
  21. Editor, and explaining that difference is the purpose of this
  22. document. The first big change is that you cannot create a new
  23. part from scratch--you must begin with a part that already
  24. exists. So the best thing to do is to find a part that is pretty
  25. close to what you eventually want. If your part is really
  26. different from anything else, then just to try to match the
  27. number of connectors. For example, if your part needs 39 pins,
  28. then start with a generic IC part, change it to a SIP (single
  29. inline package) and give it 39 pins. Though finding a part to
  30. begin with may seem like a burden, it will save you effort as
  31. you go through the process.<br>
  32. <br>
  33. You can open the new parts editor by right-clicking a part in a
  34. sketch and choosing the 'Edit' option; choosing 'Edit' from the
  35. Part menu; right clicking a part in the Parts Bin and choosing
  36. the 'Edit' option; or using the Parts Bin drop down menu.<br>
  37. <br>
  38. <big><big><b>Six views</b></big></big><br>
  39. <br>
  40. The new Parts Editor no longer tries to display everything in a
  41. single view.&nbsp; Instead, it works like the sketch window
  42. which has multiple tabs with only one tab visible at a
  43. time.&nbsp; In the new Parts Editor there are six tabs:
  44. Breadboard view, Schematic view, PCB view, Icon view, Metadata
  45. view, and Connectors view. As you might expect, the first four
  46. views are for the part images; the Metadata view is where you
  47. enter the part's title, author, and other properties; and the
  48. Connectors view is for editing connector metadata, and for
  49. adding or removing connectors. For the latter, you just type in
  50. the number of connectors you want.<br>
  51. <big><big><br>
  52. <b>Loading new images</b></big></big><br>
  53. <br>
  54. To load the SVGs for your part, switch to the appropriate view,
  55. and use <b>File &gt; Load image for view</b>. As before, you
  56. can load SVGs in all views and gEDA .fp files and KICAD .mod
  57. files in PCB view only. To create an SVG for any view, you must
  58. use an external SVG editor (Inkscape, Illustrator, CorelDRAW, or
  59. a text editor) to layout the elements that will be used as
  60. connectors. The SVG example below uses &lt;circle&gt; elements
  61. for connectors.<br>
  62. <br>
  63. Loading PNG or JPG images directly is possible, but since these
  64. become SVG images with only a single element, there is no way to
  65. place individual connectors. We also&nbsp; discourage the use of
  66. PNG and JPG because these are raster-based rather than
  67. vector-based, so they don't look good when scaled. If you still
  68. prefer to use PNG or JPG, we recommend that for now you open
  69. them in an external SVG editor and add connector elements there
  70. (see below for more about 'connector elements'). Save the result
  71. as an SVG, and use that in the Parts Editor.&nbsp; In phase 2
  72. you will be able to add connector elements directly in the Parts
  73. Editor.<br>
  74. <br>
  75. Since you have already begun with a part, it may be that you
  76. will only have to load a single image for a particular view--you
  77. do not have to replace all the images in the original part.<br>
  78. <br>
  79. It is still necessary to prepare SVGs for PCB view by grouping
  80. elements in layers: copper0, silkscreen, copper1, etc. (Layering
  81. will be handled in the phase 2 parts editor.) The best way to
  82. understand the layers is to open up one of the core pcb svg
  83. files, For example have a look at the file crystal_hc49U.svg.
  84. Silkscreen layer has four while lines, the two copper layers
  85. share a pair of circles as connector elements.<br>
  86. <br>
  87. <tt>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>
  88. &lt;svg baseProfile="tiny" height="0.20306in" version="1.2"
  89. viewBox="0 0 46684 20306" width="0.46684in"
  90. xmlns="http://www.w3.org/2000/svg"&gt;</tt><tt><br>
  91. </tt>
  92. <blockquote><tt>&lt;desc&gt;Fritzing footprint SVG&lt;/desc&gt;</tt><br>
  93. <tt>&lt;g id="silkscreen"&gt;</tt><br>
  94. <blockquote><tt>&lt;line stroke="white" stroke-width="1000"
  95. x1="1000" x2="45684" y1="1000" y2="1000"/&gt;</tt><br>
  96. <tt>&lt;line stroke="white" stroke-width="1000" x1="45684"
  97. x2="45684" y1="1000" y2="19306"/&gt;</tt><br>
  98. <tt>&lt;line stroke="white" stroke-width="1000" x1="45684"
  99. x2="1000" y1="19306" y2="19306"/&gt;</tt><br>
  100. <tt>&lt;line stroke="white" stroke-width="1000" x1="1000"
  101. x2="1000" y1="19306" y2="1000"/&gt;</tt><br>
  102. </blockquote>
  103. <tt>&lt;/g&gt;</tt><br>
  104. <tt>&lt;g id="copper1"&gt;&lt;g id="copper0"&gt;</tt><br>
  105. <blockquote><tt>&lt;circle cx="13736" cy="10153" fill="none"
  106. id="connector0pin" r="2750" stroke="rgb(255, 191, 0)"
  107. stroke-width="2000"/&gt;</tt><br>
  108. <tt>&lt;circle cx="32948" cy="10153" fill="none"
  109. id="connector1pin" r="2750" stroke="rgb(255, 191, 0)"
  110. stroke-width="2000"/&gt;</tt><br>
  111. </blockquote>
  112. <tt>&lt;/g&gt;</tt><tt>&lt;/g&gt;</tt><br>
  113. </blockquote>
  114. <tt>&lt;/svg&gt;</tt><br>
  115. <br>
  116. Sometimes you will want to reuse the breadboard image as your
  117. icon image. There is a shortcut for this under <b>File &gt;
  118. Reuse breadboard image</b>. You can also find the options: <b>File
  119. &gt; Reuse schematic image</b>, and <b>File &gt; Reuse PCB
  120. image</b>. <br>
  121. <br>
  122. For certain parts--like a breadboard--there is only one view
  123. image. For technical reasons, you have to tell the Parts Editor
  124. this is what you want.&nbsp; Use <b>View &gt; Make only this
  125. view visible</b> from the current view (one of Breadboard,
  126. Schematic, or PCB) to make the part invisible in the other two
  127. views.<br>
  128. <br>
  129. <big><big><b>Undo, save, show in folder</b></big></big><br>
  130. <br>
  131. The next big difference from the old Parts Editor is that undo
  132. is always available, even after loading view images.
  133. Furthermore, you can save your changes at any point and keep
  134. working--the new Parts Editor is less like a dialog and more
  135. like a full document window.<br>
  136. <br>
  137. If you start with a core part (i.e. a part from the Fritzing
  138. distro), saving from the Parts Editor is disabled. You must use
  139. <b>Save as new part</b>, because you cannot change a core part.
  140. <b>Save as new part</b> creates a new part in your local storage
  141. area (explained below) and this part is added to the "My Parts"
  142. Bin--it is a copy of the original part (plus whatever changes
  143. you have already made so far using the Parts Editor). If you are
  144. editing a custom part that was in a sketch, the part will be
  145. updated whenever you save. If you want the new part to display
  146. in the My Parts Bin the next time you run Fritzing, remember to
  147. save the bin (use the drop down menu at the upper left of the
  148. bin). If you start editing from a part in the My Parts Bin you
  149. have a choice between <b>Save </b>(which will overwrite the
  150. part), and <b>Save As New Part</b> (which will create a new
  151. part and add it to the My Parts Bin). If you copy a part into My
  152. Parts Bin from some other bin, then probably <b>Save </b>will
  153. be disabled.<br>
  154. <br>
  155. On Windows the local storage folder is something like
  156. C:\Users\[username]\AppData\Roaming\Fritzing\parts\user\, and
  157. SVGs are stored in
  158. C:\Users\[username]\AppData\Roaming\Fritzing\parts\svg\user\. On
  159. Linux and Mac this would be ~/.config/Fritzing/parts/user/ and
  160. ~/.config/Fritzing/parts/svg/user/. <br>
  161. <br>
  162. To find the SVG image for the current view on the desktop,
  163. choose <b>File &gt; Show in Folder</b>. On Mac and Windows this
  164. will open a folder on your desktop with the SVG file selected.
  165. Under Linux you get the folder but no file selection (if anyone
  166. has advice about how to get selection to work, we would be
  167. grateful).<br>
  168. <big><big><br>
  169. <b>Associating a connector with its SVG counterpart</b></big></big><br>
  170. <br>
  171. The next task will be to associate each connector with its
  172. counterpart in the SVG for each view. This is handled very
  173. differently from before. For an example, I am going to use
  174. images from a part created by Shunichi Yamamoto (who graciously
  175. gave us permission to include them in this tutorial, and who
  176. also helped beta test the new Parts Editor).&nbsp; <br>
  177. <br>
  178. The new part will have 39 pins, so we begin with a Generic IC
  179. part and drag it into an empty sketch. There we use the
  180. Inspector to change it a to SIP and give it 39 pins. Then we
  181. open that in the new Parts Editor with a right-click.&nbsp; <br>
  182. <br>
  183. <img alt="starting up" src="images/start.png" height="363"
  184. width="599"><br>
  185. <br>
  186. Next we load the new breadboard image using <b>File &gt; Load
  187. image for view</b>.&nbsp; In the Tools widget at the upper
  188. right, you see a list of connectors. Choose one to make it the <b>current
  189. </b>or <b>active</b> <b>connector</b>. If it has already been
  190. associated with an SVG element, that element will display a
  191. marquee highlight. Since we are just starting out, we will
  192. choose pin1 which is not currently associated with any SVG
  193. element.<br>
  194. <br>
  195. <img alt="pin1" src="images/pin1.png" height="319" width="419"><br>
  196. <br>
  197. To create the actual association click the "Select graphic"
  198. button over in the Connectors widget. This basically puts you in
  199. a "mode" that lasts until the next time you mouse down. If you
  200. want to escape the mode, click anywhere outside the part or use
  201. the escape key. You can only make the association when you are
  202. in this mode (this keeps you from accidentally associating a
  203. connector to a graphic when you didn't intend to). <br>
  204. <br>
  205. In the mode, move your mouse over the SVG. As you do so,
  206. different SVG elements will highlight. It is often the case that
  207. any given mouse location can refer to multiple SVG elements (or
  208. groups of elements). Use the shift-key plus the mouse wheel to
  209. highlight other elements above or beneath the currently
  210. highlighted one (in the z-order)--the mouse wheel without the
  211. shift key will pan or zoom as usual (depending on your
  212. preferences setting for wheel events). If you are already on the
  213. bottom layer then the next wheel "downward" will make the
  214. element flash white; a similar white flash will occur if you are
  215. already at the top layer and wheel "upward". In other words, the
  216. flash signifies you can't move any further in the z-order in
  217. that direction.<br>
  218. <br>
  219. Here are three highlights from the same mouse position, using
  220. the mouse wheel + shift:<br>
  221. <br>
  222. <img alt="highlight1" src="images/highlight1.png" height="161"
  223. width="348"><br>
  224. <img alt="highlight2" src="images/highlight2.png" height="160"
  225. width="350"><br>
  226. <img alt="highlight3" src="images/highlight3.png" height="159"
  227. width="349"><br>
  228. <br>
  229. The first highlight is the one we want so we mouse down when the
  230. wheel gets us back to that small rectangle. Now the element has
  231. a marquee to show that it is the current pin, and you also see
  232. the <b>terminal point</b> as a crosshair which defaults to the
  233. center. The terminal point is the place where a wire attaches to
  234. the connector.<br>
  235. <br>
  236. <img alt="assoc1" src="images/assoc1.png" height="161"
  237. width="349"><br>
  238. <br>
  239. After associating pin2 and pin3 we have:<br>
  240. <br>
  241. <img alt="pin3" src="images/pin3.png" height="160" width="347"><br>
  242. <br>
  243. <big><big><b>Adjusting terminal points</b></big></big><br>
  244. <br>
  245. In PCB and Breadboard view the terminal point is usually the
  246. center of the connector so you don't have to do any thing
  247. else.&nbsp; But in schematic view the terminal point is usually
  248. near the end of the connector. So let's go to schematic
  249. view.&nbsp; We start with the original SVG image. Note how the
  250. connectors are already showing their anchor points. Pin3 is the
  251. current connector.<br>
  252. <br>
  253. <img alt="schematic" src="images/schematic1.png" height="573"
  254. width="718"><br>
  255. <br>
  256. Now we load the new schematic image and start associating pins.<br>
  257. <br>
  258. <img alt="schematic2" src="images/schematic2.png" height="640"
  259. width="519"><br>
  260. <br>
  261. Here is what the Connectors widget looks like with pin3 as the
  262. current connector:<br>
  263. <br>
  264. <img alt="tools1" src="images/tools1.png" height="463"
  265. width="348"><br>
  266. <br>
  267. Notice that since we have selected graphics for three of the
  268. connectors, those connectors are checked in the connector list.<br>
  269. <br>
  270. You can use the buttons or spinners to adjust the terminal
  271. point. Here is a close up after hitting the W button, and
  272. clicking the X spinner twice (look at the pin marked 'AN2'): <br>
  273. <br>
  274. <img alt="schematic3" src="images/schematic3.png" height="492"
  275. width="536"><br>
  276. <br>
  277. You can also drag the terminal point directly by mousing down on
  278. it when its SVG element is highlighted.<br>
  279. <big><big><br>
  280. <b>Setting internal connections</b></big></big><br>
  281. <br>
  282. An internal connection is when a two or more connectors in a
  283. part are already connected, for example the GND connectors on
  284. the Arduino UNO. You can specify and edit internal connections
  285. by clicking on the "Set internal connections" checkbox in the
  286. Connectors widget--it's beneath the connectors list (you can see
  287. it in the image of the Connectors widget, above). Since we are
  288. talking about the Arduino UNO, here is what it looks like when
  289. Set internal connections is checked:<br>
  290. <br>
  291. <img alt="bus1" src="images/bus1.png" height="319" width="419"><br>
  292. <br>
  293. The green lines represent the internal connections. To remove an
  294. internal connection, right-click the line and choose "Remove
  295. internal connection". To add a new connection, just drag a line
  296. out from one connector to another.<br>
  297. <b><br>
  298. </b><b><big><big>Known limitations</big></big></b><br>
  299. <br>
  300. The following feature are due in phase two: <br>
  301. <ul>
  302. <li>adding holes</li>
  303. <li>mixing THT and SMD connectors--for now you must start with
  304. an SMD part to create a new SMD part, and start with a
  305. through-hole part to create a new through-hole part. <br>
  306. </li>
  307. <li>control over SVG element layering</li>
  308. <li>direct manipulation of SVG elements</li>
  309. <li>setting up parts with bendable legs.</li>
  310. </ul>
  311. <b><br>
  312. </b> <b><big><big>Bye for now</big></big></b><br>
  313. <br>
  314. That's pretty much the phase one story. We hope you like what
  315. you've seen. Stay tuned for phase two.<br>
  316. <br>
  317. <br>
  318. </div>
  319. </div>
  320. </body>
  321. </html>