Is there a way to have sub-objects within an object?

Say I have a rectangle and want to split it to 4 shapes:

I want to have the middle point be not fixed, and hence the shape of the sub-objects be flexible. If I move the middle point, then the sub-objects should be changed. For now the colors are just bucket filled, which are just 4 new objects.

Answer

enter image description here

  1. A rectangle is drawn, Path > Object to Path is applied to get a proper path with nodes at the corners

  2. A triangle is drawn with the Bezier tool (=the Pen). It snaps exactly if you have snaps to nodes ON.

  3. Two more triangles are drawn

  4. All is selected (see NOTE1) and the midpoint nodes are selected by dragging with the node tool over them. Then the selected nodes are moved together with the node tool.

NOTE1: In Inkscape you must at first select the parts with the normal selection tool to be sure the node tool takes all nodes in the same place when you drag a selection rectangle with the node tool.

ADD: Thanks to user Billy Kerr for inserting this animation.

To make the same with curved part seams probably needs something else. But if there’s only the midpoint node and nodes in the corners of the rectangle it works. In the next image the parts have hefty overlaps to avoid gaps when the midpoint is moved:

enter image description here

If it happens that you need a way to unite or bind together the parts so that they keep their colors and you can move the midpoint by moving one single item without causing gaps, not several simultaneously selected nodes, you want something that Inkscape doesn’t have. CAD software and advanced animation software have “constraints” which keep things together.

Another way is to use some geometric deformation and adjust it to get apparent midpoint movement. I must skip these subjects due missing advanced animation or pro level parametric CAD software and actual skills how to use them.

But one “move only single item” version is possible in elementary way also in entry level freeware CAD. It’s “Move the top vertex of a 3D four side colored pyramide”:

enter image description here

The pyramide is a 3D solid, it’s not separate paths like the triangles in the Inkscape version. Top view makes it look planar:

enter image description here

Attribution
Source : Link , Question Author : Ooker , Answer Author : user287001

Leave a Comment