Body Groups

What are body groups?

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.

  1. Joining two objects by means of the joint "Solid joint" in the section "Joints" in the PLC-Lab tool list.
  2. Creating a body group with the action "Create a body" in the section "Body group" of the action list.

You can learn how to use the solid joint here: Solid joint

The difference between body groups and solid joints

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.

The appearance of a body group

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.

Handling a body group

Creating a body group

The following steps are necessary to create a body group:

  1. Select the objects that you want to combine in a body group.
  2. Choose the action "Create a body" in the section "Body group".

These steps are carried out in the example.

Selecting a body group

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.

Moving the body 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.

Selecting an object in a body group

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.

Moving an object in a body group

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.

Rotating a body group

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.

Rotating an object in a body group

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.

Dissolving a body group

If you want to dissolve a body group, proceed as follows:

  1. Select a body group.
  2. Choose the action "Dissolve the body group" in the section "Body group" of the action list.

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.

Displaying the master object in the body group

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:

  • Property "Object will influenced by a conveying element"
  • Property "Object is a mother-object with the id"
  • Property "Objet is a destroyer"
  • Property "Object destroys child-objects with id"
  • Property "Physical type of the object"
  • Property "Depends on gravity"

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.

Adding object(s) to a body group

If you want to add objects to an existing body group, proceed as follows:

  1. Select the master object in the body group.
  2. Choose the action "Add object to body" in the section "Body group" of the action list.
  3. Select the object(s) that you want to add to the body.
  4. Choose the action "Add object to body" in the section "Body group" of the action list.

These steps are shown below:

Separating object(s) from a body group

To separate individual objects from a body group, proceed as follows:

  1. Select the body group.
  2. Select the object in the body group.
  3. Choose the action "Separate object from body" in the section "Body group" of the action list.
  4. The object is then no longer part of the body group. You can also use this action with several objects at the same time.

Copying object(s) to a body group: 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.

Copying the entire body group: 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

Video about body groups