PDF shapes imported in Inkscape

Post questions on how to use or achieve an effect in Inkscape.
JeanLucCoulon
Posts: 8
Joined: Tue Aug 14, 2012 11:04 pm

PDF shapes imported in Inkscape

Postby JeanLucCoulon » Tue Aug 14, 2012 11:15 pm

Hi,

I import shapes from pdf in Inskape. The general shape is half a circle with both end connected with a straight line.
I want to shrink the shape by a given value (say 2 millimeters).

So, I have converted the shape to a path and tried the shrink the path... and this doesnt work.

Having a close look to my shape, I remarked that the lines are not "lines" but a shape also. Some kind of ribbon with an outines and the path is created this way. i.e, the straight lines are rectangles so this rectangles are shrinked and not the general shape.

Is there a way to have lines really lines when imported from pdf? :?:

Jean-Luc

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

Re: PDF shapes imported in Inkscape

Postby brynn » Wed Aug 15, 2012 2:42 am

Image
Welcome Jean-Luc!

Mmmm.....well, in whatever way the objects exist in PDF, that probably can't be changed in Inkscape. But we might still be able to get around these problems. I'm just not entirely clear about the objects in your image, and what you want to do. Do you only want to make the half circles smaller, and not the lines/rectangles?

Actually, this might be hard to do, without seeing the image. Can you share either the SVG file, with PDF already imported? Or at least a screenshot?

If not, try to select only the half circles, and not the lines, before you do Object to Path.

JeanLucCoulon
Posts: 8
Joined: Tue Aug 14, 2012 11:04 pm

Re: PDF shapes imported in Inkscape

Postby JeanLucCoulon » Wed Aug 15, 2012 5:42 pm

Thanks for the welcome.
Here are examples.
In fact, these are sections (shadows) of the hull of a sailboat model.
In the construction process, I add planks so I need to shrink the shape for the value of the plank thickness.
Attached the original pdf file.
I have to create 1 file for each one (example svg attached)
Attachments
couple-5-A3.svg
shadow 5
(14.96 KiB) Downloaded 141 times
couples.pdf
hull section pdf
(34.56 KiB) Downloaded 147 times

JeanLucCoulon
Posts: 8
Joined: Tue Aug 14, 2012 11:04 pm

Re: PDF shapes imported in Inkscape

Postby JeanLucCoulon » Thu Aug 16, 2012 3:59 am

Thanks for the welcome

(I've posted a reply this morning - for me - but I don't see it, so I retry).

I plan to build a sailboat model.
The hull is built from sections (shadows) and covered with small planks.
I've pdf drawings of the shadows. But I need to shrink them by the thickness of the plank.

Attached :
- the original pdf file for all the shadows drawings
- two examples of svg shadows extracted from the previous pdf

Regards

Jean-Luc
couples.pdf
shadows, pdf
(34.56 KiB) Downloaded 143 times

couple-8-A3.svg
shadow #8
(16.3 KiB) Downloaded 144 times

couple-12.svg
shadow #12
(7.96 KiB) Downloaded 165 times

JeanLucCoulon
Posts: 8
Joined: Tue Aug 14, 2012 11:04 pm

Re: PDF shapes imported in Inkscape

Postby JeanLucCoulon » Thu Aug 16, 2012 4:10 am

thank you for the welcome

JeanLucCoulon
Posts: 8
Joined: Tue Aug 14, 2012 11:04 pm

Re: PDF shapes imported in Inkscape

Postby JeanLucCoulon » Thu Aug 16, 2012 4:11 am

thank you for the welcome.

I tried twice to post a reply with attached pdf and svg examples but... nothing happens when I submit the message. I am returned to the subject page... :roll:

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

Re: PDF shapes imported in Inkscape

Postby brynn » Thu Aug 16, 2012 10:57 am

The reason for the delay in posting your messages, is part of this forum's defense against spam. The first 2 messages of every new member must be approved. We're not such a large forum that someone is "on duty" at every moment. So sometimes there may be a day or 2 lag (at the very most) before new messages by new members are posted. But the good news is that you've reached that point, and now your messages will be posted immediately, as you expect :D

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

Re: PDF shapes imported in Inkscape

Postby brynn » Thu Aug 16, 2012 11:46 am

Oh wow, I'm glad I asked for illustrations. Here's what I imagined from your original description:

samp0.PNG
samp0.PNG (2.06 KiB) Viewed 2768 times
:lol:

So the answer to your question, you can't change the "ribbon lines" into real lines (paths). It appears they were drawn that way in the original PDF. I have no idea why each line is composed of shorter pieces, instead of a single line. But they can be either Combined or Grouped, so that they act as one. Let me make sure I understand which parts you want to shrink though. Another screenshot:

samp1.PNG
samp1.PNG (37.7 KiB) Viewed 2768 times


I've highlighted the outer line red, and left one section selected, to show the smaller pieces. Is that the line you want to make smaller, the whole red line? So that the outline of the hull has a smaller area? That can absolutely be done. There are a couple of ways to do it, and one would probably be better than the other. But before I go into detail, I want to make sure I understand. If it's not the red line, which line or lines do you need to connect together and make smaller?

JeanLucCoulon
Posts: 8
Joined: Tue Aug 14, 2012 11:04 pm

Re: PDF shapes imported in Inkscape

Postby JeanLucCoulon » Thu Aug 16, 2012 4:54 pm

Hi,

I think the lines are splitted because they are originally built from a CAD program and each individual spline is moved to pdf.

Yes the whole red line is what I want. More: if you have a look at the svg files you will see I have duplicated it (symetry) and added the "cap". So the result is a whole outline.

This is this outilne I want to "shrink". With a single line instead of the "ribbon", it is obvious in inkscape. (same outine, inside the original one at 2 - or so - millimeters).

J-L

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

Re: PDF shapes imported in Inkscape

Postby brynn » Fri Aug 17, 2012 4:50 am

There may be 2 ways to do this, and 1 would be easy. But there's only one way, if you absolutely need a single path (rather than "ribbon"). Oh ok, I see that you have Grouped them, to make a single outline. Well, that was the easy way.

The harder way is to use node editing. Many people avoid node editing at almost all costs. I rather enjoy it, actually. So here's how it goes.

1 -- While they are still Grouped, add a stroke and remove the fill. The ribbons appear to be 0.353 mm (or 1.25 px) wide, or something very close to that.....which I mention just in case you want the new stroked path to be the same width. Now they are ribbon outlines.
2 -- Ungroup.
3 -- You'll have to work zoomed in quite a bit, to make it easier to select nodes. Using the Node tool, click between the 2 nodes at each end of the ribbon outline, to sselect them. Then click "Delete segment between 2 non-endnodes" button on the control bar.
4 -- Path menu > Break apart. Now you'll have 2 parallel paths (railroad tracks).
5 -- Deselect, then select one of them and Delete. Be sure to delete the same one for each separate ribbon -- always delete the one on the left, or always the one on the right. (Or always on the inside or always outside.)
6 -- After you do that for all the ribbon pieces, you'll need to connect the open paths. Using Shift key, you can select 2 paths at the same time. Where the paths meet, their endnodes will be overlapping. Using the Node tool, draw tiny selection box to highlight them both. Then "Join selected nodes" button on control bar. Do that for all the sections, and eventually you will have a complete closed path.

Now, having said all that, you can still shrink the outline, by having them grouped as is. And indeed, if every one of those concentric "ribbon" paths have to be made into a single path, it will become quite a bit of work. But that's up to you :D

Let us know if you have any problems. I think I put all the info into those steps, but there might be a couple of nuances that I didn't explain in fullest of detail.

JeanLucCoulon
Posts: 8
Joined: Tue Aug 14, 2012 11:04 pm

Re: PDF shapes imported in Inkscape

Postby JeanLucCoulon » Fri Aug 17, 2012 7:34 am

Thanks a lots, it works.
It is quite a lot of work...
I've removed the symetrical part and recrated it after the work on the paths.

Another question: I use the inset function, is it possible to to chosse a step value in an other unit than px (millimeters would be nice)? 8-)

J-L

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

Re: PDF shapes imported in Inkscape

Postby brynn » Fri Aug 17, 2012 1:14 pm

Hi Jean-Luc,
Good to hear!

Uummm....no I don't think you can change the unit of the step distance. But you could convert the needed mm distance to px.....although now as I say that, I'm not sure if an Inkscape pixel is the same size as a screen pixel. (Edit -- I know that an Inkscape inch is not the same as a real inch. But not sure if the same for pixel.)

However, I'm wondering if Path Inset will be the best or proper technique? It will round any sharp corners. Granted a movement of 2 mm would result in only slightly rounded corners. (The more the offset, the rounder the corners.) Anyway, I'm wondering if it would be better to scale it by the needed amount. And note that I'm fully aware that scaling smaller, and insetting a path, are NOT the same thing. But in this case, they could be pretty darn close. (You'll notice the difference in the more vertical portions near the bottom of the hull.) It sounds like you need precision, so you might want to try both scaling and insetting, to learn if there's much difference, and whether it's acceptable. By scaling, you can use mm units. But on the other hand, the rounded corners can probably be corrected, if everything else is right, after insetting.

JeanLucCoulon
Posts: 8
Joined: Tue Aug 14, 2012 11:04 pm

Re: PDF shapes imported in Inkscape

Postby JeanLucCoulon » Fri Aug 17, 2012 8:00 pm

Thanks
As I don't build a nuclear plant nor a particles accelerator, I don't need a big precision. As I will then print the result on a sheet of paper, then glue it on an plank and saw it, there are many imprecisions in the whole process.

I will try both and see.
Inset is very handy because I can keep the original shape on the same drawing.

Thanks again

Jean-Luc

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

Re: PDF shapes imported in Inkscape

Postby brynn » Sat Aug 18, 2012 10:25 am

You're welcome :D
Have fun!


Return to “Help with using Inkscape”