How to break an object into pieces?
How to break an object into pieces?
Hello, I would like to cut a rectangle up into various sizes and shapes based on a series of paths I have drawn on top of it. Imagine I have rectangle in one layer. Then in a layer above it, I draw a line from each corner to the opposite corner, and lines from the midpoint of each side to the opposite. Now I'd like to break the rectangle into the various triangles that are formed by this construction. Does inkscape offer a way to do this?
Re: How to break an object into pieces?
You need to have all the objects in one layer, then use the Division command from the Path menu. You will need to use only two objects at a time, the line on top + rectangle or one of the cut objects.
Try to play with all the other path options
Try to play with all the other path options

just hand over the chocolate and nobody gets hurt
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download
Re: How to break an object into pieces?
Hi - Just for fun, I made up a little tutorial. I used Intersection and Difference.
Preparation:

Tutorial
There's probably an easier way to do this. But since no one else offered, I thought I would show what I came up with. If anyone does come up with an easier way, I'd be interested to see it.
Anyway, I hope this helps, Justin
Preparation:
- Enable a grid, View menu > Grid.
- Click "Enable snapping" on the Snap control bar, also "Snap nodes or handles" and "Snap to grid".
- Using the Rectangle tool
draw a rectangle of the size you want. Drag it down to where the bottom left corner is at (0,0). (This is only for convenience in keeping all the parts the same size.) You could place this on a layer below, if you want.
- Using the Selection tool
pull a horizontal Guide out of the top ruler, and drag it to the vertical center of the rectangle. Position the cursor over the guide (so that it's highlighted) and double-click. In the dialog that opens, enter the number in the Y field that is half the height of your rectangle. Next pull a vertical Guide out of the ruler on the left and drag it to the horizontal center of the rectangle. Select the Guide, double-click, and enter the number in the X field that represents half the width of your rectangle.

Tutorial
- Using the Pen tool
draw a sort of hourglass, starting at the red X and in the direction of the blue arrows, placing nodes at each corner of your rectangle.
- Zoom into the place where the path intersects itself, the center of your rectangle. Using the Node tool
add a new node at the intersection. While it's still selected, click "Break path at selected node". Repeat the process on the other part of the path, so that you end up with 4 end nodes, all positioned at what was previously the intersection of the path, the center of your rectangle.
- Still using the Node tool
move the new end nodes slightly away from that point. Select the 2 that belong to the top triangle, and click "Join selected end nodes". Repeat for the bottom triangle. Now snap the new nodes back to the center, where they were before, and where the path originally intersected itself, the center of your rectangle.
- Give them some color fill. I used yellow.
- Using the Pen tool
draw a sort of sideways squared-off figure 8; as shown, starting at the red X, moving in the direction of the blue arrows, establishing nodes at each corner angle. Use the Guides to place the 2nd, 3rd, 5th and 6th nodes.
- Zoom into the place where the path intersects itself, which is also the center of your rectangle. Using the Node tool
add a new node at the intersection. While it's still selected, click "Break path at selected node". Do the same for the other part of the path, so that you end up with 4 end nodes, all positioned at what was previously the intersection of the path, the center of your rectangle.
- Still using the Node tool
move the new end nodes slightly away from that point. Select the 2 that belong to the little rectangle at the top left, and click "Join selected end nodes". Repeat for the rectangle at the bottom right. Now snap the 2 new nodes back to the center of your rectangle, the place where the path originally intersected itself.
- Give them some color, I used aqua.
- Using the Selection tool
- Duplicate the aqua rectangles. Click "Flip selected object horizontally", and give them yet another color, I used green.
- Duplicate the green rectangles. Then move both copies to the bottom of the stack (z-order).
- Select the aqua rectangles, Duplicate them, and move both copies to the bottom of the stack (z-order).
- Select the yellow triangles. Duplicate them 3 times.
- Still using the Selection tool
- Select the yellow triangles and the green rectangles. Click Path menu > Intersection.
- Select the yellow triangles and the aqua rectangles. Click Path menu > Intersection.
- Select the yellow triangles and the green rectangles. Click Path menu > Difference.
- Select the yellow triangles and the aqua rectangles. Click Path menu > Difference.
- There's not really a Step 11. #11 in the tutorial just shows the individual triangles.
There's probably an easier way to do this. But since no one else offered, I thought I would show what I came up with. If anyone does come up with an easier way, I'd be interested to see it.
Anyway, I hope this helps, Justin

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: How to break an object into pieces?
Nice tutorial, Brynn. I'd suggest the following:
1. Draw the rectangle you want and convert it to a path.
2. Select all 4 nodes and do add nodes, which will place a node at the midpoint of each segment.
3. Duplicate rectangle and do object to guides.
4. With "snap to guides" enabled use the pen tool to draw a path from corner to corner and from midpoint to midpoint.
5. Now there are a few options. You can select all paths, combine, stroke to path, break apart. (Note if you do it this way you will need to swap fill and stroke as the triangles will be filled with no stroke all the same color, looking like a single rectangle still.) Or you can select all paths except the rectangle, combine, and combine; then select the combined path and the rectangle and do division.
1. Draw the rectangle you want and convert it to a path.
2. Select all 4 nodes and do add nodes, which will place a node at the midpoint of each segment.
3. Duplicate rectangle and do object to guides.
4. With "snap to guides" enabled use the pen tool to draw a path from corner to corner and from midpoint to midpoint.
5. Now there are a few options. You can select all paths, combine, stroke to path, break apart. (Note if you do it this way you will need to swap fill and stroke as the triangles will be filled with no stroke all the same color, looking like a single rectangle still.) Or you can select all paths except the rectangle, combine, and combine; then select the combined path and the rectangle and do division.
Re: How to break an object into pieces?
Oh, very nice!
I must use Object to guides more often.
I must use Object to guides more often.
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