MeshKernel
Public Member Functions | Public Attributes | List of all members
meshkernel::Network1D Class Reference

A class describing a network 1d. More...

#include <Network1D.hpp>

Public Member Functions

 Network1D ()=default
 Default constructor.
 
 Network1D (Projection projection)
 
 Network1D (std::vector< std::vector< Point >> const &polyLines, Projection projection)
 Construct a mesh1d by discretizing polyLines. More...
 
void ComputeFixedChainages (std::vector< std::vector< double >> const &fixedChainagesByPolyline, double minFaceSize, double fixedChainagesOffset)
 Compute the chainages from fixed point locations. More...
 
void ComputeOffsettedChainages (double offset)
 Compute the chainages at a regular offset for all polylines. More...
 
std::vector< std::vector< Point > > ComputeDiscretizationsFromChainages ()
 Computes the discretization points from the chainages for all polylines. More...
 

Public Attributes

Projection m_projection
 The projection used.
 

Detailed Description

A class describing a network 1d.

A network 1d contains a series of polylines and a series of fixed points at predefined chainages.

Constructor & Destructor Documentation

◆ Network1D() [1/2]

meshkernel::Network1D::Network1D ( Projection  projection)
Parameters
[in]projectionThe projection to use

◆ Network1D() [2/2]

meshkernel::Network1D::Network1D ( std::vector< std::vector< Point >> const &  polyLines,
Projection  projection 
)

Construct a mesh1d by discretizing polyLines.

Parameters
[in]polyLinesThe polylines to be discretize
[in]projectionThe projection to use

Member Function Documentation

◆ ComputeDiscretizationsFromChainages()

std::vector<std::vector<Point> > meshkernel::Network1D::ComputeDiscretizationsFromChainages ( )

Computes the discretization points from the chainages for all polylines.

Returns
A discretization vector for each polyline

◆ ComputeFixedChainages()

void meshkernel::Network1D::ComputeFixedChainages ( std::vector< std::vector< double >> const &  fixedChainagesByPolyline,
double  minFaceSize,
double  fixedChainagesOffset 
)

Compute the chainages from fixed point locations.

Parameters
[in]fixedChainagesByPolylineThe fixed chainages. These are the locations where the discretization points before and after must be at a distance equal to fixedChainagesOffset
[in]minFaceSizeThe minimum face size. The distance between two points must be no less than this length
[in]fixedChainagesOffsetThe offset to use for fixed chainages

◆ ComputeOffsettedChainages()

void meshkernel::Network1D::ComputeOffsettedChainages ( double  offset)

Compute the chainages at a regular offset for all polylines.

Parameters
[in]offsetThe offset between points

The documentation for this class was generated from the following file: