In PLC-Lab, dynamic geometric shapes can be joined together to form any body. These then form a unit in the simulation and are connected inseparably. There may be gaps between the individual objects; this is comparable to a sieve.
Generally, there are two options available to combine objects in PLC-Lab into one body.
You can learn how to use the solid joint here: Solid joint
The action "Create a body" has the same effect as a solid joint. This raises the question of when to use the joint and when to use the action.
To simplify: if you want to combine more than two objects into one body, you should use the action "Create a body". If, for example, such a body group is to be firmly connected with another object, then the solid joint should be used
The following video shows this very clearly. A container is built with the help of a body group and then attached to the piston rod of the cylinder with a solid joint.
In principle, you could also implement the container with the help of several solid joints. This would also work.
The other advantage of the body group, in particular where numerous objects are involved, is that it behaves like a drawing group. This means that you can e.g. zoom in and out of the group while keeping the relative position of the objects to each other. If an object within the group is copied with the mouse, then the newly created object is also part of the group and thus part of the body.
A disadvantage of the body group is that objects that do not belong to the body are arranged within the group. In this case it is not obvious that these objects do not actually belong to the body. Here a solid joint would be better because the symbols of the joint visually indicate the affiliation.
Similar to the draw groups, the body groups are surrounded by a frame. We used different frames so that you can tell the group types apart.
In the image above you can see a draw group on the left side and a body group on the right side. You can see that the rectangles for the border of the groups are different.
The following steps are necessary to create a body group:
These steps are carried out in the example.
To select a body group, click on one of the objects of the group while it is not selected.
This causes the selection thumbs to appear at the corner points of the group.
When the body group is selected, you can move it. To do this, click on an area in the group in which an object is located.
To select an object in a body group, first select the group. Next, you can select the target object by clicking on it.
In the example you can see that the group is selected first and then the blue circle is clicked when the group has been selected. This also causes the selection thumbs to appear on the selected circle.
When an object is selected in a body group and the selection thumbs are visible, you can move it with the mouse or keyboard.
When you move the object, the dimensions of the body group also change at the same time.
To switch a body group to rotation mode, double-click an object of the body group while the body group is not selected. Then the thumbs indicate that the body group can be rotated. As with normal objects, you can also rotate in 15° steps by pressing the Shift key while rotating.
You can see that all elements of the body group rotate with the rotation point in the center of the body group. If you click on a free area of the drawing board after the rotation process, you deselect the body group and exit rotation mode.
When the body group is selected, you can activate the rotation mode of an object by double-clicking on the object in the body group. This is then signaled by the thumbs on the object. Now you can rotate the object with the mouse. When you press the Shift key, the rotation takes place in 15° steps.
You can also rotate several objects at the same time in a similar way. To do this, select the objects you want to rotate (hold down the Shift key while clicking), then double-click on one of the selected objects. All selected objects then switch to rotation mode.
If you want to dissolve a body group, proceed as follows:
This dissolves the body group; but the objects will remain in a draw group. If you want to dissolve the draw group as well, you can choose the action "Dissolve the draw group" in the section "Draw group" of the action list.
When you create a body group, an object will be the master object of the body. Certain properties can only be modified using this object. These properties cannot be modified using the other objects of the body.
The following properties among others can only be modified using the master object:
These are properties that must be consistent for the entire body. For this reason, a change can only be made to the master object.
To see which object of a body group is the master object, double-click with the right mouse button on an object of the group.
After double-clicking with the right mouse button, the elements of the body group are given a double frame. The master object also has a yellow border.
If you now want to change one of the properties which is only available via the master object, click on the master object with the left mouse button so that it is selected and its properties are displayed.
Double-clicking again with the right mouse button on an object of the body group removes the frames around the objects.
The properties of the master object are of course also available without the frames around the objects being present. These are only used to determine the master object. If you know which one is the master object, these are not necessary.
If you want to add objects to an existing body group, proceed as follows:
These steps are shown below:
To separate individual objects from a body group, proceed as follows:
When you use the mouse to copy the objects in a body group (see also: Copy with mouse), the new object is also an element of the body group. This also applies when copying several objects.
When you copy an object using the clipboard (copy & paste), i.e. with the keys [CTRL] + [C] and [CTRL] + [V], the new object is not part of the body group. The same applies to duplicating using the keys [CTRL] + [D].
When copying an entire body group, the same actions apply as when copying objects. You can copy using the mouse or keyboard.
See also: Copying objects