Mobile app version of vmapp.org
Login or Join
Murphy569

: Cut rectangle using line I have managed to obtain the SVG graph from google spreadsheet using developer tools. What I did First I ran this command in console: I clicked on the output blue

@Murphy569

Posted in: #Inkscape #Path

I have managed to obtain the SVG graph from google spreadsheet using developer tools.

What I did

First I ran this command in console:



I clicked on the output blue square which opened the node in the main HTML inspector:



Finally, I copied the outer HTML:



I'm mentioning this for googlers and anyone who'd like to reproduce my steps.

What I don't like

The image is a little bit malformed when opened it in inkscape:



All I need to do to fix that is to cut the rectangles along the most bottom guideline:



How would I do that?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Murphy569

2 Comments

Sorted by latest first Latest Oldest Best

 

@Welton168

Here's an easy way to do it if the bars are rectangles and you'd like to keep them that way:


Use the bezier tool to draw a line where you'd like the cut to be placed. (Hold the shift key to ensure a perfectly horizontal line, and begin drawing with a click-release instead of a click-hold to ensure a straight line.)
Turn on snap, and ensure that "Snap to paths" is checked.
Ctrl+click to select one of the rectangles. (The Ctrl key helps to select objects directly if they're nested within groups.)
Choose the node tool (press N)
Grab the lower point on the rectangle and drag it up the line, letting it snap.
Repeat for other bars.

10% popularity Vote Up Vote Down


 

@Welton168

I'd use the "difference" operation. Here's an example of what it can do:



Start with a path like the blob shown above.
Create another path on top (stacking order matters here) for the part that you wish to remove, like the rectangle above.
Select them both and choose "Path" > "Difference".


Since you have multiple objects on which you'd like to perform the same operation, you have a couple options:


Duplicate the cutting path before applying each difference operation. This way you're left with another one to use for the next path you'd like to modify in the same way.
Select all paths that you want to cut. Choose "Path" > "Combine" to make them all the same. (You may need to use "Path" > "Object to path" first depending on the situation.)


Also, another tip: if the objects you'd like to cut are nested deep within groups, then use Ctrl+click to select them without selecting their containing groups first. Otherwise, continue double clicking on the containing groups to "enter" the groups. (Not sure if your case will even have any grouping though.)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme