cee::vtfx::CrossSectionsBlock

class CrossSectionsBlock : public Block

A block for storing cross sections.

../_images/crosssections.png

A cross sections block is used by the element block to define the cross section representation of the beams (BEAMS and BEAMS_3) in the element block.

The cross sections block contains a number of cross sections definitions which are added using addCrossSection(). Each cross section is defined by a type (CrossSectionType) and a set of parameters (name + value). Each cross section type has a predefined set of parameter names. You need to set a value for ALL parameters for the given cross section type. See table below for full list of cross section types and their parameters.

Creating a cross section block:

// Create cross sections block
cee::PtrRef<cee::vtfx::CrossSectionsBlock> csBlock = new cee::vtfx::CrossSectionsBlock(11);

// Add cross section of type BAR
csBlock->addCrossSection(cee::vtfx::CrossSectionsBlock::BEAM_BAR,
    { "OffsetY", "OffsetZ", "Height", "WidthTop", "WidthBottom" },
    { 0.0f,      0.0f,      2.0f,     2.0f,       1.0f });

// Write the geometry info block
database->writeBlock(csBlock.get());

To use a cross section block in an element block, call ElementBlock::setCrossSectionsBlockId() with the id of the cross sections block. When adding the elements to the element block using cross sections expansion, some additional data is required.

  • Cross sections mapping: One cross section mapping per element. The mapping is an index into the cross sections block.
  • Directions: One direction per element. The direction is the direction of the beam.
  • Eccentricities: One eccentricity per element node. The eccentricity is the offset of the node from the center of the cross section.

Set the cross sections mapping, directions and eccentricities using ElementBlock::addElementsWithCrossSections().

Using this cross sections block in an element block:

// Create element block
cee::PtrRef<cee::vtfx::ElementBlock> elementBlock = new cee::vtfx::ElementBlock(1, false, false); 
elementBlock->setNodeBlockId(1); // Use node block with id = 1
elementBlock->setCrossSectionsBlockId(11); // Use cross sections block with id = 11

// Set the element data for 2 elements of type BEAMS
std::vector<int> elementNodes = { 0, 1, 2, 3 };

// One cross sections mapping per element. 0 = first cross section in cross sections block
std::vector<int> crossSectionsMapping = { 0, 0 }; 

// One direction per element
std::vector<cee::Vec3f> directions = { cee::Vec3f(0.0f,  1.0f, 0.0f)};

// Add the elements and their cross sections mapping, directions and eccentricities
elementBlock->addElementsWithCrossSections(cee::vtfx::ElementBlock::BEAMS, elementNodes, 
                                           crossSectionsMapping, directions));

// Write the element block
database->writeBlock(elementBlock.get());

Cross section parameters

Enum Description
BEAM_IORH Cross section type I or H beam
BEAM_PIPE A pipe beam cross section
BEAM_BOX A box beam cross section
BEAM_CYLINDER A cylinder beam cross section
BEAM_L An L beam cross section
BEAM_CHANNEL A beam cross section channel
BEAM_BAR A bar beam cross section
BEAM_UNSYMMETRIC_I An unsymmetrical I beam cross section
BEAM_CONE A cylinder beam cross section with different diameter for each end of the beam

See CrossSectionType for a description and illustration of different cross section types and their parameters.

Public Types

enum CrossSectionType

Cross section types for CrossSectionsBlock.

Values:

enumerator BEAM_IORH

Cross Section Type I or H Beam.

../_images/iorh.png

Parameters Description
OffsetY Y Offset in Y direction from the center of the cross section to the center of the beam
OffsetZ Z Offset in Z direction from the center of the cross section to the center of the beam
Height HZ Height of beam at current location
WidthTop BT Width of top flange
ThicknessTop TT Thickness of top flange
ThicknessWeb TY Thickness of beam web
WidthBottom BB Width of bottom flange
ThicknessBottom TB Thickness of bottom flange

enumerator BEAM_PIPE

A pipe beam cross section.

Both outer diameter and thickness can be set

../_images/pipe.png

Parameters Description
OffsetY Y Offset in Y direction from the center of the cross section to the center of the beam
OffsetZ Z Offset in Z direction from the center of the cross section to the center of the beam
OuterDiameter DY Outer diameter of pipe
Thickness T Thickness of pipe

enumerator BEAM_BOX

A box beam cross section.

../_images/box.png

Parameters Description
OffsetY Y Offset in Y direction from the center of the cross section to the center of the beam
OffsetZ Z Offset in Z direction from the center of the cross section to the center of the beam
Height HZ Height of beam at current location
Width BY Width of box beam
ThicknessTop TT Thickness of top flange
ThicknessWebs TY Thickness of vertical walls (webs) of box section
ThicknessBottom TB Thickness of bottom flange

enumerator BEAM_CYLINDER

A cylinder beam cross section.

Parameters Description
OffsetY Offset in Y direction from the center of the cross section to the center of the beam
OffsetZ Offset in Z direction from the center of the cross section to the center of the beam
OuterDiameter Outer diameter of cylinder

enumerator BEAM_L

An L beam cross section.

../_images/l.png

Parameters Description
OffsetY Y Offset in Y direction from the center of the cross section to the center of the beam
OffsetZ Z Offset in Z direction from the center of the cross section to the center of the beam
Height HZ Height of beam at current location
Width BY Width of flange
ThicknessWeb TY Thickness of beam web
ThicknessFlange TZ Thickness of flange
Orientation K Web orientation of L section.
0 = web located in the negative local y-direction
1 = web located in the positive local y-direction

enumerator BEAM_CHANNEL

A beam cross section channel.

../_images/channel.png

Parameters Description
OffsetY Y Offset in Y direction from the center of the cross section to the center of the beam
OffsetZ Z Offset in Z direction from the center of the cross section to the center of the beam
Height HZ Height of beam at current location
Width BY Width of top and bottom flange
ThicknessWeb TY Thickness of beam web
ThicknessFlange TZ Thickness of top and bottom flange
Orientation K Web orientation of channel section.
0 = web located in the negative local y-direction
1 = web located in the positive local y-direction

enumerator BEAM_BAR

A bar beam cross section.

../_images/bar.png

Parameters Description
OffsetY Y Offset in Y direction from the center of the cross section to the center of the beam
OffsetZ Z Offset in Z direction from the center of the cross section to the center of the beam
Height HZ Height of beam
WidthTop BT Width of bar at top
WidthBottom BB Width of bar at bottom

enumerator BEAM_UNSYMMETRIC_I

An unsymmetrical I beam cross section.

../_images/unsymmetric_i.png

Parameters Description
OffsetY Y Offset in Y direction from the center of the cross section to the center of the beam
OffsetZ Z Offset in Z direction from the center of the cross section to the center of the beam
Height HZ Height of beam at current location
ThicknessWeb TY Thickness of beam web
WidthTop BT Width of top flange
WidthTopPos B1 Width of half top flange in positive local y-direction
ThicknessTop TT Thickness of top flange
WidthBottom BB Width of bottom flange
WidthBottomPos B2 Width of half bottom flange in positive local y- direction
ThicknessBottom TB Thickness of bottom flange

enumerator BEAM_CONE

A cylinder beam cross section with different diameter for each end of the beam.

Parameters Description
OffsetY Offset in Y direction from the center of the cross section to the center of the beam
OffsetZ Offset in Z direction from the center of the cross section to the center of the beam
OuterDiameter1 Outer diameter of cylinder at one end of the beam
OuterDiameter2 Outer diameter of cylinder at the other end of the beam

enumerator UNKNOWN_CROSS_SECTION

Unknown cross section type.

Public Functions

CrossSectionsBlock(int blockId)

Constructs an empty cross sections block.

blockId must be >= 0 and unique for all cross section blocks within a database.

virtual ~CrossSectionsBlock()
int addCrossSection(CrossSectionType type, const std::vector<Str> &parameterNames, const std::vector<float> &parameterValues)

Adds a cross section to the cross sections block.

A cross sections is defined by a type (CrossSectionType) and a set of parameters (name + value).

Only BEAMS and BEAMS_3 element types can have cross sections.

parameterNames and parameterValues must have the same size. All parameters for the given cross section type must be provided along with a corresponding value. See CrossSectionType for a list of cross section types and their parameters.

The cross sections in this block are referenced by the element block when adding elements with cross sections using addElementsWithCrossSections(). The cross sections mappings (crossSectionIndices) are indices into the cross sections block.

If success, returns the index of the newly added cross section, otherwise returns -1. See the log for details if the function returns -1.

size_t crossSectionCount() const

Returns the number of cross sections in the cross sections block.

CrossSectionType crossSectionType(size_t index) const

Returns the cross section type for the cross section at index.

std::vector<Str> crossSectionParameterNames(size_t index) const

Returns the parameter names for the cross section at index.

std::vector<float> crossSectionParameterValues(size_t index) const

Returns the parameter values for the cross section at index.