[solved] Cropping a drawing using Clip and Set not working
-
- Posts: 97
- Joined: Thu Jan 22, 2015 9:11 pm
- Location: Holland (the Netherlands)
[solved] Cropping a drawing using Clip and Set not working
Hello,
Yes, I know that you cannot crop things in Inkscape, at least not in the usual sense of the meaning of clipping. Browsed through this forum and found a thread where brynn advised a method using the Clip feature: (viewtopic.php?f=5&t=1938).
I have a two layer drawing one with just a A4 graph paper with millimeter grid and above that a second layer containing a drawing which covers only a small part of the A4 graph paper layer.
Now I want to crop both layers just around the drawing.
I used the method described in that thread but it does not work. Arriving at: Object > Clip > Set, nothing happens.
What am I forgetting to do?
In the attachment I give that particular drawing.
Yes, I know that you cannot crop things in Inkscape, at least not in the usual sense of the meaning of clipping. Browsed through this forum and found a thread where brynn advised a method using the Clip feature: (viewtopic.php?f=5&t=1938).
I have a two layer drawing one with just a A4 graph paper with millimeter grid and above that a second layer containing a drawing which covers only a small part of the A4 graph paper layer.
Now I want to crop both layers just around the drawing.
I used the method described in that thread but it does not work. Arriving at: Object > Clip > Set, nothing happens.
What am I forgetting to do?
In the attachment I give that particular drawing.
- Attachments
-
- Opg.10-blz.236-Gain-Ra-kar.svg
- (197.01 KiB) Downloaded 215 times
Last edited by AnalogueMan on Thu Jan 21, 2016 10:56 pm, edited 1 time in total.
Analogue man in a digital world
Re: Cropping a drawing using Clip and Set not working
Maybe unlock the grid layer first - then select everything (Masking object is on top) and go Object->Clipping->Set. (Not sure about the English UI entries as used a localized version):

Cheers
P.

Cheers
P.
Re: Cropping a drawing using Clip and Set not working
Wow, you sure found an old message there!
In your attached SVG file, I don't see a clipping path. Probably that will be a rectangle (or maybe square) around the black plotted graph in layer Gain-vs-Ra. And it will need to be on top of everything else (in layer Gain-vs-Ra).
Select the clipping path and the red graph, and do Object menu > Clip > Set
If you want to keep everything together, you could Group the red graph and the plotted graph (black) either before or after you do the Clip.
Last note -- Layer 1 with the red graph is locked, so you'll need to unlock it, to be able to select it.
Oops - Polygon sneaked in while I was typing
In your attached SVG file, I don't see a clipping path. Probably that will be a rectangle (or maybe square) around the black plotted graph in layer Gain-vs-Ra. And it will need to be on top of everything else (in layer Gain-vs-Ra).
Select the clipping path and the red graph, and do Object menu > Clip > Set
If you want to keep everything together, you could Group the red graph and the plotted graph (black) either before or after you do the Clip.
Last note -- Layer 1 with the red graph is locked, so you'll need to unlock it, to be able to select it.
Oops - Polygon sneaked in while I was typing

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
-
- Posts: 97
- Joined: Thu Jan 22, 2015 9:11 pm
- Location: Holland (the Netherlands)
Re: Cropping a drawing using Clip and Set not working
Sorry guys, but after countless trial and errors ( with some Inkscape crashes), I cannot get it done
.
Only once I got to the desired result but forgot what I did to get there.
In the attachment I again give the drawing but now with the (wanted to crop area) rectangle drawn in the top layer.
And I unlocked both layers.
Can someone please give a step by step procedure to produce the desired result?
Thanks in advance!!

Only once I got to the desired result but forgot what I did to get there.
In the attachment I again give the drawing but now with the (wanted to crop area) rectangle drawn in the top layer.
And I unlocked both layers.
Can someone please give a step by step procedure to produce the desired result?
Thanks in advance!!
- Attachments
-
- Gain-Ra-kar.svg
- (197.27 KiB) Downloaded 212 times
Analogue man in a digital world
Re: Cropping a drawing using Clip and Set not working
All you need is to draw a rectangle around the whole scene with your cursor to make sure everything is selected and go Main menu ->Objects ->Clipping path-> Set.
Cheers
P.
Cheers
P.
-
- Posts: 97
- Joined: Thu Jan 22, 2015 9:11 pm
- Location: Holland (the Netherlands)
Re: Cropping a drawing using Clip and Set not working
Polygon wrote:All you need is to draw a rectangle around the whole scene with your cursor to make sure everything is selected and go Main menu ->Objects ->Clipping path-> Set.
Cheers
P.
If I try to do that, the whole layer1 moves....
Analogue man in a digital world
Re: Cropping a drawing using Clip and Set not working
Hi.
Some general notes.
Layers are implemented as "special groups". You cannot clip two objects on two different layers with "the same" clipping path. (You could clone the clipping path on a layer and use the clonnes for clipping on others though but that's unnecessary most cases.)
On your document setup.
You want to draw on a mm scale on an A4 sized page yet your default unit is pt.
And you also have a grid with pt units preventing you from accurate working.
More than that you set the snapping distance to incredibly small distance.
These won't make your work easier but more complicated instead.
On creating the mm scales. They are not that accurate now, probably those were made manually?
There is an extension creating such grids even with various colours thank's to Ragnar.
I for one would draw it manually though, by using the interpolate subpaths lpe.
There was a correct distortion on text/page or something similar, this guide can help you getting the concept.
You only need to draw one line, duplicate it, move it horizontally/vertically, combine the two together and apply the lpe for parallel lines.
Then they can be converted to paths by Ctrl+Shift+C, broken apart (Ctrl+Shift+K) and grouped together (Ctrl+G), so that you can access unnecessary lines and delete them/change stroke widths, combine some together etc.
Sorry just cannot break it down to effective steps, so adding a sample -without using clipping (the grid in question was reconstructed.)
Some general notes.
Layers are implemented as "special groups". You cannot clip two objects on two different layers with "the same" clipping path. (You could clone the clipping path on a layer and use the clonnes for clipping on others though but that's unnecessary most cases.)
On your document setup.
You want to draw on a mm scale on an A4 sized page yet your default unit is pt.
And you also have a grid with pt units preventing you from accurate working.
More than that you set the snapping distance to incredibly small distance.
These won't make your work easier but more complicated instead.
On creating the mm scales. They are not that accurate now, probably those were made manually?
There is an extension creating such grids even with various colours thank's to Ragnar.
I for one would draw it manually though, by using the interpolate subpaths lpe.
There was a correct distortion on text/page or something similar, this guide can help you getting the concept.
You only need to draw one line, duplicate it, move it horizontally/vertically, combine the two together and apply the lpe for parallel lines.
Then they can be converted to paths by Ctrl+Shift+C, broken apart (Ctrl+Shift+K) and grouped together (Ctrl+G), so that you can access unnecessary lines and delete them/change stroke widths, combine some together etc.
Sorry just cannot break it down to effective steps, so adding a sample -without using clipping (the grid in question was reconstructed.)
-
- Posts: 97
- Joined: Thu Jan 22, 2015 9:11 pm
- Location: Holland (the Netherlands)
Re: Cropping a drawing using Clip and Set not working
Thanks Lazur URH for your elaborate explanation. It takes time to digest this. Here it is 23:00 hrs local time.
Will come back on it tomorrow.....
Will come back on it tomorrow.....
Analogue man in a digital world
Re: Cropping a drawing using Clip and Set not working
Lazur URH wrote:Some general notes.
Layers are implemented as "special groups". You cannot clip two objects on two different layers with "the same" clipping path.
Can´t confirm as I just took AnalogueMan´s SVG - select everything - set clipping - done:

Cheers
P.
Re: Cropping a drawing using Clip and Set not working
Hmm you are right.
(0:34 am here)
(0:34 am here)
Re: Cropping a drawing using Clip and Set not working
Polygon wrote:Lazur URH wrote:Some general notes.
Layers are implemented as "special groups". You cannot clip two objects on two different layers with "the same" clipping path.
Can´t confirm as I just took AnalogueMan´s SVG - select everything - set clipping - done:
Polygon, yes, layers are implemented in Inkscape as special groups, because there is no SVG standard for layers (at least not yet....I'm not sure about ever).
Lazur, I've clipped across layers many, many times, without problems. And that's why I didn't mention it, in the suggestions I made for AnalogueMan.
However, I'm having the same result as AM, where the clipped grid is shifted upwards. I don't know for sure why it's happening, but I can make a good guess. The displacement of the clip result reminds me of a well-known bug, which I think AM may have run into previously (if I recall correctly....maybe was someone else....). The "fix" for that bug, is NOT to use the default Layer 1. When I move the red grid into a new layer, the clip works flawlessly, even across layers!
Another possible problem, or at least a potential source of future problems, is that handmade vector grid. Drawing a grid like that can cause performance issues, because it eats up RAM. And it can also cause display problems. I wasn't sure if the displaced grid was caused by the transform attribute bug or a display issue. But since it was solved by avoiding the tranform bug, I think that's probably the reason.
AM is there some reason you drew the red grid manually, instead of using the grids that Inkscape provides (Document Properties > Grids)? They are completely configurable to any unit or set of units. You can even change the color.
I don't know about the various grids that can be created using extensions, being inaccurate, as Lazur suggested. But since it's a simple rectangular grid, you don't really need to use the extensions anyway.
Polygon, I wonder if you don't experience the problem that AM, Lazur and I do, because of using a different operating system?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Cropping a drawing using Clip and Set not working
brynn wrote:Polygon, I wonder if you don't experience the problem that AM, Lazur and I do, because of using a different operating system?
That´s maybe the case - but for me it´s a straight forward operation with no issues as you can see in the AnimGIF.
Cheers
P.
-
- Posts: 97
- Joined: Thu Jan 22, 2015 9:11 pm
- Location: Holland (the Netherlands)
Re: Cropping a drawing using Clip and Set not working
Getting a little bit desperate here.
When I do exactly what Polygon does in his answer with that animation,I get this.
See the attachment.
When I do exactly what Polygon does in his answer with that animation,I get this.
See the attachment.
- Attachments
-
- Crop-problem.jpg (96.9 KiB) Viewed 6025 times
Analogue man in a digital world
Re: Cropping a drawing using Clip and Set not working
Yes, I get that same result, and I've found the solution. Please read my last message above.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Cropping a drawing using Clip and Set not working
Just for those wondering - the difference is that Polygon uses a (unstable) development snapshot build (maybe forgot about that, or does not care, or ...). Several issues with clipping have been fixed in Inkscape trunk (0.91+devel) after the release of current stable Inkscape 0.91, these fixes will be available in a future stable version of Inkscape.
-
- Posts: 97
- Joined: Thu Jan 22, 2015 9:11 pm
- Location: Holland (the Netherlands)
Re: Cropping a drawing using Clip and Set not working
brynn wrote:
However, I'm having the same result as AM, where the clipped grid is shifted upwards. I don't know for sure why it's happening, but I can make a good guess. The displacement of the clip result reminds me of a well-known bug, which I think AM may have run into previously (if I recall correctly....maybe was someone else....). The "fix" for that bug, is NOT to use the default Layer 1. When I move the red grid into a new layer, the clip works flawlessly, even across layers!
Using this the cropping problem is solved!
Sorry brynn that I overlooked the above in your response
.
I certainly will make a note about this in my little "how to" Inkscape knowledge book.
Thanks all for helping me here!
Will go studying what Lazur URH wrote in his last response. I still have a lot to learn about the proper use of Inkscape
.
AnalogueMan.
However, I'm having the same result as AM, where the clipped grid is shifted upwards. I don't know for sure why it's happening, but I can make a good guess. The displacement of the clip result reminds me of a well-known bug, which I think AM may have run into previously (if I recall correctly....maybe was someone else....). The "fix" for that bug, is NOT to use the default Layer 1. When I move the red grid into a new layer, the clip works flawlessly, even across layers!
Using this the cropping problem is solved!


I certainly will make a note about this in my little "how to" Inkscape knowledge book.
Thanks all for helping me here!
Will go studying what Lazur URH wrote in his last response. I still have a lot to learn about the proper use of Inkscape

AnalogueMan.
Analogue man in a digital world
Re: Cropping a drawing using Clip and Set not working
Good, I'm glad you got it working!
My experience in learning to use Inkscape, is that the more I learned, the more I realize how much more there is to learn! It seems like the deeper I go into it, the deeper Inkscape becomes.
My experience in learning to use Inkscape, is that the more I learned, the more I realize how much more there is to learn! It seems like the deeper I go into it, the deeper Inkscape becomes.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
-
- Posts: 97
- Joined: Thu Jan 22, 2015 9:11 pm
- Location: Holland (the Netherlands)
Re: Cropping a drawing using Clip and Set not working[Solved]
brynn wrote:
My experience in learning to use Inkscape, is that the more I learned, the more I realize how much more there is to learn! It seems like the deeper I go into it, the deeper Inkscape becomes.
So I do not have to be too much ashamed .....
My experience in learning to use Inkscape, is that the more I learned, the more I realize how much more there is to learn! It seems like the deeper I go into it, the deeper Inkscape becomes.
So I do not have to be too much ashamed .....

Analogue man in a digital world
Re: Cropping a drawing using Clip and Set not working[Solved]
Nope 

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
-
- Posts: 97
- Joined: Thu Jan 22, 2015 9:11 pm
- Location: Holland (the Netherlands)
Re: Cropping a drawing using Clip and Set not working
Lazur URH wrote:Hi.
Some general notes.
Layers are implemented as "special groups". You cannot clip two objects on two different layers with "the same" clipping path. (You could clone the clipping path on a layer and use the clonnes for clipping on others though but that's unnecessary most cases.)
On your document setup.
You want to draw on a mm scale on an A4 sized page yet your default unit is pt.
And you also have a grid with pt units preventing you from accurate working.
More than that you set the snapping distance to incredibly small distance.
These won't make your work easier but more complicated instead.
On creating the mm scales. They are not that accurate now, probably those were made manually?
There is an extension creating such grids even with various colours thank's to Ragnar.
I for one would draw it manually though, by using the interpolate subpaths lpe.
There was a correct distortion on text/page or something similar, this guide can help you getting the concept.
You only need to draw one line, duplicate it, move it horizontally/vertically, combine the two together and apply the lpe for parallel lines.
Then they can be converted to paths by Ctrl+Shift+C, broken apart (Ctrl+Shift+K) and grouped together (Ctrl+G), so that you can access unnecessary lines and delete them/change stroke widths, combine some together etc.
Sorry just cannot break it down to effective steps, so adding a sample -without using clipping (the grid in question was reconstructed.)
Sorry for my late response. You wrote:
On creating the mm scales. They are not that accurate now, probably those were made manually?
There is an extension creating such grids even with various colours thank's to Ragnar.
I for one would draw it manually though, by using the interpolate subpaths lpe.
In fact I do not have to do this. I use the files available on this website:
http://incompetech.com/graphpaper
I always start assembling the kind of graph paper I need and then import it and use it as the first layer
when drawing a new graph.
So I do not have to worry about making for instance a millimetre graph and then having to draw lines at exactly the same distance from the preceding one or, in other cases, have to make a logarithmic grid myself. Saves a lot of work.
But the links you gave are very interesting and I will certainly have a close look at them.
Analogue man in a digital world
Re: Cropping a drawing using Clip and Set not working[Solved]
Who would know that.
Anyway, here is the mentioned topic on creating graph paper with custom colours.
Anyway, here is the mentioned topic on creating graph paper with custom colours.
-
- Posts: 97
- Joined: Thu Jan 22, 2015 9:11 pm
- Location: Holland (the Netherlands)
Re: Cropping a drawing using Clip and Set not working[Solved]
Lazur URH wrote:Who would know that.
Anyway, here is the mentioned topic on creating graph paper with custom colours.
Thank you very much Lazur URH for the link to this thread!

Analogue man in a digital world