PolylineExtrusion3d
Extrudes a three-dimensional polyline in a given direction to produce a quadrilateral mesh surface.
Access to parameter description
This algorithm replicates the input polyline in a predefined direction and in its opposite direction with a regular spacing. A quadrilateral mesh is thus generated, considering each polyline vertex as a mesh vertex.
Figure 1. Polyline extrusion: (a) input polyline regularized by PolylineResampler3d,
(b) extruded quadrilateral mesh in blue
Access to parameter description
This algorithm replicates the input polyline in a predefined direction and in its opposite direction with a regular spacing. A quadrilateral mesh is thus generated, considering each polyline vertex as a mesh vertex.
![]() (a) |
![]() (b) |
- The extrusion direction is defined by the direction parameter.
- The total length of the extrusion is defined by the sum of the forwardLength and backwardLength parameters.
- The number of parallel polylines forming the output surface is deduced from the nodeCount parameter.
Function Syntax
This function returns outputSurface.
// Function prototype
std::shared_ptr<iolink::ArrayXd> polylineExtrusion3d( std::shared_ptr<iolink::ArrayXd> inputPolyline, double forwardLength, double backwardLength, uint32_t nodeCount, iolink::Vector3d direction, std::shared_ptr<iolink::ArrayXd> outputSurface = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
inputPolyline |
The input ArrayXd to extrude.
The indexation needs to be {coordinate, index}, where coordinate is the axis index (0 for X, 1 for Y and 2 for Z) and index is a label identifying the vertex. |
ArrayXd | nullptr | |
![]() |
forwardLength |
The extrusion length from the input polyline in the extrusion direction.
This length is expressed in world coordinates. |
Float64 | >=0 | 1 |
![]() |
backwardLength |
The extrusion length from the input polyline opposite to the extrusion direction.
This length is expressed in world coordinates. |
Float64 | >=0 | 1 |
![]() |
nodeCount |
Number of nodes to create along the whole extruded section along the sum of forward and backward lengths. | UInt32 | Any value | 20 |
![]() |
direction |
The extrusion direction.
This direction is expressed in the coordinate system of the input polyline. |
Vector3d | Any value | {0.f, 0.f, 1.f} |
![]() |
outputSurface |
The output surface.
The dimensions of the generated ArrayXd is [3, n, m] with:
|
ArrayXd | nullptr |
Object Examples
std::shared_ptr< iolink::ArrayXd> polyline3d_1( new iolink::ArrayXd( { 0 } ) ); readArrayXd( std::string( IMAGEDEVDATA_OBJECTS_FOLDER ) + "polyline3d_1.arrayxd", polyline3d_1); PolylineExtrusion3d polylineExtrusion3dAlgo; polylineExtrusion3dAlgo.setInputPolyline( polyline3d_1 ); polylineExtrusion3dAlgo.setForwardLength( 1 ); polylineExtrusion3dAlgo.setBackwardLength( 1 ); polylineExtrusion3dAlgo.setNodeCount( 20 ); polylineExtrusion3dAlgo.setDirection( {0, 0, 1} ); polylineExtrusion3dAlgo.execute(); std::cout << "outputSurface:" << polylineExtrusion3dAlgo.outputSurface()->shape();
Function Examples
std::shared_ptr< iolink::ArrayXd> polyline3d_1( new iolink::ArrayXd( { 0 } ) ); readArrayXd( std::string( IMAGEDEVDATA_OBJECTS_FOLDER ) + "polyline3d_1.arrayxd", polyline3d_1); auto result = polylineExtrusion3d( polyline3d_1, 1, 1, 20, {0, 0, 1} ); std::cout << "outputSurface:" << result->shape();