Using Imported PDF drawings

Post questions on how to use or achieve an effect in Inkscape.
Old Grey
Posts: 70
Joined: Sat Dec 12, 2015 11:26 am

Using Imported PDF drawings

Postby Old Grey » Sat Dec 12, 2015 12:01 pm

I want to draw some electronics parts to in put into Fritzing(PCB design program) - they have to be svg drawings hence Inkscape -.

I have a technical drawing of the component in PDF, which I have imported, but because there are many different views of it all on the one page, is it possible to copy just a small section of the original drawing and paste it into a new Inkscape page, to make an individual part picture, and then edit it. In the edit I want to remove the dimensions and their lines, and then scale it to 1:1 real size.

http://www.te.com/usa-en/product-174917 ... gistration

I've only been on Inkscape about 3 days and was wondering if this is possible, as it would save time drawing it.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Using Imported PDF drawings

Postby brynn » Sat Dec 12, 2015 12:33 pm

Are you talking about JPN_CD_174917_M7.pdf?

I've downloaded and opened in Inkscape, and all the objects are paths, so yes, you can do what you want (assuming I'm understanding correctly what you want to do). PDFs can contain raster content though, which generally can't be edited with Inkscape. So as long as the PDF content is vector, you should be able to edit in Inkscape.

If you're asking for a way to automate the process you describe, the only way I know would be to write a custom script. Unfortunately, I can't help with scripts. Or of course, you can do it "manually".

I'm not sure which parts you want to be separated. That file (assuming is the one you're talking about) contains 12,425 objects, and that includes the dimension arrows and text. (Although the text is really paths, too.) But still, to separate each single object into a new SVG file, would be a lot of work, and take a lot of time. But there are 10 major groupings, so making 10 SVG files would not be so daunting.

I don't see any easy way to select only the dimension arrows (which are quite fancy, and contain 52 nodes for 2-sided arrow, and 27 nodes for 1-side arrow). In some areas, you can drag a selection box around several to many arrows at a time (sometimes called rubberband selection). So that will help.

Well, before I study the file further, I should be sure this is the right one! But there might be other shortcuts for selecting among that huge number of paths, that you might be able to use.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Using Imported PDF drawings

Postby Moini » Sat Dec 12, 2015 12:43 pm

Do things need to be ungrouped? Didn't open the file, but maybe that was the problem?
Ungrouping can be done by selecting the group, then doing Ctrl+Shift+G or Ctrl+U.

Deleting selected items can be done with Backspace or Del.

Both actions are also available via right-click context menu.

Always look at the status line at the bottom if something doesn't work as expected. It's really useful!

(For the scaling part, I might have an extension for you: https://github.com/Moini/inkscape-realscale-extension )

Edit: and don't forget to *not* save the result as pdf. Info will be lost, so save to (inkscape) svg.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Old Grey
Posts: 70
Joined: Sat Dec 12, 2015 11:26 am

Re: Using Imported PDF drawings

Postby Old Grey » Sat Dec 12, 2015 12:58 pm

brynn wrote:Are you talking about JPN_CD_174917_M7.pdf?


Yep, that's the one.

I was mainly thinking if I could set a rectangle around the 2nd part view from the left(plan view), copy, and then paste to new, but that doesn't work.

I'm not advanced enough to completely understand your method, but from what you are saying you have to select each line and transfer them

I just want to erase the arrows and dimensions so that it's a graphical representation of the part in only 1 view. If you were looking down on the actual part it would like like the 2nd PDF view.

Fritzing wants 3 drawings

This is what parts look like in Fritzing Breadboard style - like the 2nd or 3rd in the PDF but coloured in -.
Image

This is what parts look like in Fritzing PCB style - they have to be dimensionally accurate so you know where to put them on a PCB , like the 4th drawing in the PDF
Image

Schematic is a simple line drawing - I can probably handle this -
Image

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Using Imported PDF drawings

Postby brynn » Sat Dec 12, 2015 1:44 pm

It would be easier to make multiple selections of many arrows at once, if you ungroup. Object menu > Ungroup (or button on the command bar). It's all 1 group, so just need to do it once. (With my 4 gb of RAM, it was a 30 second wait for the ungroup to finish working.)

Like Moini said, keep an eye on the status bar. When the Selection tool is enabled, the status bar will always tell you what kind of object and how many objects are selected.

For example, when you first try to click on something in that file, the status bar will say Group of 12000 (whatever the number was) objects. After you ungroup, it will say 12000 objects of type Path.

After that, use the Selection tool to drag a selection box around things that you want to delete. For example, below, the red rectangles represent where I would drag a selection box. Of course you can do that in other areas too. I was just too lazy to mark them all.

sel.png
sel.png (186.26 KiB) Viewed 4340 times

If they aren't neatly arranged, or you can't select only the objects you want to select, without selecting objects you want to keep, then hold the Shift key while you click once on each object, to select as many as you can at once.

Sometimes, maybe you can select a whole lot of objects you want to delete, with selection box, but you can't avoid selecting 1 or 2 or 3 objects that you want to keep. Then, drag a selection box. And then while holding the Shift key, click once on the pieces that you want to keep. That will deselect them, leaving only the ones you want to delete selected.

Note -- Since you've used the word "erase" I just want to encourage you NOT to use the Eraser tool. It's not the best tool to use for this. Either Edit menu > Delete, or I usually just use the Delete key. Or if there's any chance you might need these parts later, instead of deleting, I would move to another layer. Then that layer can be hidded, and those parts are still in the file, if you should need them later.

Although if you're not going to scale them, along with everything else, I guess they wouldn't be useful anyway.

Old Grey
Posts: 70
Joined: Sat Dec 12, 2015 11:26 am

Re: Using Imported PDF drawings

Postby Old Grey » Sun Dec 13, 2015 5:47 am

That was tough, but I think I'm getting somewhere - not as simple as GIMP -.

I finally got selection to work. Before the selection rectangle was grabbing air, no objects selected. Ungrouping also didn't work. I had to Select All, and then press Ungroup, and now things get selected.

I copied the 4th view and pasted it in a new sheet and started selecting lines using the Edit Path By Nodes button, and pressing Cut - delete didn't work -.

I scaled by locking W and H and putting in 91.7mm(84.7 + 7 for the hole), and it's the right size now.

The Fritzing rules say that the stroke has to be 0.5mm, so I don't know if I can thicken the lines, but I might just leave it and provide a warning to space things further away incase a PCB track gets cut.

All I have to do now is copy the 2nd view, cut the legs off the rectangle socket, scale it, and line it up over the holes of the 4th view on a different layer and the PCB view is done.

Another couple of questions :-
I select individual lines with shift-click in EPBN to do a bunch of cuts in one hit, but sometime it selects the wrong line. Can I go back and unselect the last line and continue click-shifting without having to start again on that group?
Is there a measuring ruler that can tell you the distance between 2 clicks?

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Using Imported PDF drawings

Postby tylerdurden » Sun Dec 13, 2015 9:03 am

Selecting should allow de-selecting with another click on the selected .

The ruler tool is usually a click and drag affair (spacebar to freeze display), but on a drawing with many paths, it tends to bog down to the point of useless.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Using Imported PDF drawings

Postby brynn » Sun Dec 13, 2015 7:42 pm

You can easily deselect one object at a time, from a multiple selection, using the Selection tool. Hold the Shift key and click once on each object that you want to deselect. Try it! Holding Shift key, click to see it be deselected, click again to see it re-selected, click again deselect, etc.

Using the Node tool, it's not very easy to deselect. Sometimes I've managed to deselect with the Node tool, but it's tricky.

Yes, as td said, ruler tool, I think offical name is Measurement tool (icon is a stubby ruler). It doesn't measure between clicks, but measures from 1 click to wherever you stop dragging it. Info (distance, angle) is flashed on the canvas, until you release the mouse button -- then the info is gone. If you enable Snapping properly, you can be sure that the measurement is precise. (Otherwise it depends on your dexterity and where you stop dragging.) Let us know if you need help with Snapping. Info in manual: http://tavmjong.free.fr/INKSCAPE/MANUAL ... pping.html

Extensions menu > Visualize Path > Measure Path... measures the length of a path, and places a new text object on the canvas, which is the distance measurement.

With everything ungrouped now, you should be able to select and delete using the Selection tool. If you select with the Node tool, you have to take one more step, which is selecting all the nodes in the selected path. So click on the path to select the path, then Ctrl + a to select all the nodes. Then you can Delete.

Or another routine. Select with Node tool, then switch to Selection tool, then Delete. I would probably use only the Selection tool for this....probably zooming will make selection easier too.

You can make the paths any width you want. Object menu > Fill and Stroke > Stroke Style tab > Width

not as simple as GIMP

I don't know about that. I think it's a simple matter of what you're accustomed to using. For example, since I don't know GIMP very well, I would find it harder to do with GIMP. However, comparing GIMP and Inkscape is literally like comparing apples and oranges. GIMP is a raster editor, and Inkscape is a vector editor. GIMP does have some limited ability to create and edit vector paths, but Inkscape is far superior as far as vector editing.
Last edited by brynn on Mon Dec 14, 2015 9:00 am, edited 1 time in total.
Reason: typo

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Using Imported PDF drawings

Postby Moini » Mon Dec 14, 2015 8:24 am

Look at the options in the align dialog. You can select which object things should be aligned relative to (the dropdown). Make sure you have only the objects selected you want to align. Don't select 'treat selection as group'.
Then it usually works correctly ;)

If it still doesn't, upload the file, and make a screenshot of your selection with the align dialog open and the mouse cursor pointing at what you click on.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Using Imported PDF drawings

Postby Moini » Mon Dec 14, 2015 8:25 am

Huh, wasn't there a post by Old Grey just before I started to type the above?...
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Using Imported PDF drawings

Postby brynn » Mon Dec 14, 2015 9:05 am

Yes, moderator log shows Old Grey deleted a message here. (Oh, those newbie days I remember so well. So much to learn!) (Still learning some things ;))

Old Grey
Posts: 70
Joined: Sat Dec 12, 2015 11:26 am

Re: Using Imported PDF drawings

Postby Old Grey » Mon Dec 14, 2015 9:37 am

Yah, I got all that working. Thanks

Image

It goes a lot faster when you know more stuff.

The major differences that stand out to me with GIMP compared to Inkscape, is that selection is a lot more complicated, and there is a lot more options - Inkscape is more powerful -.

Now I have to draw the schematic - should be a simple box with 48 legs -, and the complicated Breadboard drawing.


Return to “Help with using Inkscape”