rod_surface

The rod element can be used to create a rod like structure along a series of linear segments in three dimensional space. The rod has a circular cross section which is approximated by a polygon (governed by the axial_mesh_count parameter). This shape is defined by a radius (thickness of the rod) and a piecewise linear path specified by a by a list of in-order vertexes.

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

  • Works with GeometryViewer: No.

The following XML example creates a helix shaped rod surface, as follows:

XML element: <rod_surface>
C++ type: KGWrappedSurface<KGRod>
Defined in: KGRodBuilder.hh:96
Child elements

Element

Description

rod

Attributes

Attribute

Type

Description

name

string

Example:

<rod_surface name="example_rod_surface">
    <rod radius="0.2" longitudinal_mesh_count="100" axial_mesh_count="12">
        <define name="n_turns" value="5"/>
        <define name="n_segments_per_turn" value="36"/>
        <define name="coil_radius" value="1."/>
        <define name="height_per_turn" value="1."/>
        <loop variable="i" start="0" end="{[n_turns]*[n_segments_per_turn]}" step="1">
            <vertex x="{[coil_radius]*TMath::Cos(2.*TMath::Pi()*([i] mod [n_segments_per_turn])/[n_segments_per_turn])}" y="{[coil_radius]*TMath::Sin(2.*TMath::Pi()*([i] mod [n_segments_per_turn])/[n_segments_per_turn])}" z="{[i]*[height_per_turn]/[n_segments_per_turn]}"/>
        </loop>
    </rod>
</rod_surface>

Used as:

More information

Explained in: Complex Shapes in KGeoBag

Appears in the documentation:

Used in example configurations: