beam_surface

A beam creates a pipe which connects two polygons at each end. The polygons must have the same number of vertices but may lie in planes which are not parallel to each other. For the description of the parameters involved see the image below.

../../_images/beam_description.png

In the following example, the variable [poly] dictates the the number of vertexes in each polygon at the ends of the beam.

../../_images/kgeobag_beam_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: No.

XML element: <beam_surface>
C++ type: KGWrappedSurface<KGBeam>
Child elements

Element

Description

beam

Attributes

Attribute

Type

Description

name

string

Example:

<beam_surface name="example_beam_surface">
    <beam longitudinal_mesh_count="20" axial_mesh_count="20">
        <define name="poly" value="50"/>
        <define name="radius" value=".5"/>
        <define name="z_start_max" value="-.25"/>
        <define name="z_start_min" value="-.75"/>
        <define name="z_end_max" value=".75"/>
        <define name="z_end_min" value=".25"/>
        <loop variable="i" start="0" end="[poly]" step="1">
        <start_line x1="{[radius]*TMath::Cos(2.*TMath::Pi()*[i]/[poly])}" y1="{[radius]*TMath::Sin(2.*TMath::Pi()*[i]/[poly])}" z1="{([z_start_max]+[z_start_min])*.5 + ([z_start_max]-[z_start_min])*TMath::Cos(2.*TMath::Pi()*[i]/[poly])}" x2="{[radius]*TMath::Cos(2.*TMath::Pi()*(([i]+1) mod [poly])/[poly])}" y2="{[radius]*TMath::Sin(2.*TMath::Pi()*(([i]+1) mod [poly])/[poly])}" z2="{([z_start_max]+[z_start_min])*.5 + ([z_start_max]-[z_start_min])*TMath::Cos(2.*TMath::Pi()*(([i]+1) mod [poly])/[poly])}"/>
            <end_line x1="{[radius]*TMath::Cos(2.*TMath::Pi()*[i]/[poly])}" y1="{[radius]*TMath::Sin(2.*TMath::Pi()*[i]/[poly])}" z1="{([z_end_max]+[z_end_min])*.5 + ([z_end_max]-[z_end_min])*TMath::Cos(2.*TMath::Pi()*[i]/[poly])}" x2="{[radius]*TMath::Cos(2.*TMath::Pi()*(([i]+1) mod [poly])/[poly])}" y2="{[radius]*TMath::Sin(2.*TMath::Pi()*(([i]+1) mod [poly])/[poly])}" z2="{([z_end_max]+[z_end_min])*.5 + ([z_end_max]-[z_end_min])*TMath::Cos(2.*TMath::Pi()*(([i]+1) mod [poly])/[poly])}"/>
        </loop>
    </beam>
</beam_surface>

Used as:

More information

Explained in: Complex Shapes in KGeoBag

Appears in the documentation:

Used in example configurations: