# 3.1.6: Line to Beam

Fig. 3.1.6.1 shows how the “LineToBeam”-component takes two lines as input, finds out how they connect and outputs beams as well as a set of unique points which are their end-points. Lines with end-points of identical index get automatically removed. Unless lines get removed, there is a one to one correspondence between the list of input lines and output beams.

The “LineToBeam”-component accepts only straight lines as geometric input. Therefore polylines and the like need to be exploded into segments first. All coordinates are in meters (or feet in case of Imperial units).

The “Color”-input lets one define a color for the rendering of elements. In order to display the colors activate the “Elements”-button in submenu “Colors” of the “ModelView”-component. In addition the option “Cross section” of the submenu “Render Settings” of the “BeamView”-component needs to be on.

Elements can be given non-unique names via the “Id”-input . It takes a list of strings as identifiers for beams. The default value is an empty string. Each beam has a name by default: its zero based index in the model. Identifiers provide a useful means to group the beams in order to modify or display them.

Cross sections can be attached to elements with the “CroSec”-input. Cross section definitions via the “Assemble”-component override these settings.

 Input Property “Pts” The order in which points appear in the output node-list is random by default. However it is sometimes advantageous to identify certain points by their list index in order to put loads on them or to define supports. This can be achieved by feeding a list of coordinates into the “Points”-plug. They will be placed at the beginning of the output nodes-list. So in order that the end-points of the structure in fig. 3.1.6.1 have index 0 and 1 it is necessary to input a list of points with coordinates (0/0/0) and (8/0/0). “New” If this plug has the value “False” only those lines will be added to the structure that start and end at one of the points given in the input points-list. “Remove” If this option has the value “True” the "LineToBeam"-component checks for lines that lie on each other and merges such duplicates into one. This prevents an error that is hard to detect by visual inspection alone: Two lines on the same spot mean double member stiffness in the structural model. Alternatively apply the “Remove Duplicate Lines”-component from the Karamba3D utilities section on the list of incoming lines. This assures a one-to-one correspondence between lines and elements. “LDist” Sets the limit distance for two points to be merged into one. Points supplied via lines count as identical if their distance is less than that given in “LDist”. The default value of “LDist” is $5mm$. The snapping of nodes does not apply to points supplied via the “Pt”-input-plug. The mechanism for attaching duplicate nodes to elements is identical to that used by the “Assemble”-component (see section 3.1.1). “Z-Ori” The default orientation of beams and trusses is described in section 3.1.14. The “Z-Ori”-input lets one define a non-standard direction for the local Z-axis. “Bending” Allows to switch off the bending stiffness of beams. This turns them into trusses. For details see section 3.1.10.