Skip to content
Permalink
Browse files

dxf export: fix output of closed 3d polylines (fixes #20242)

(cherry picked from commit 56ec473)
  • Loading branch information
jef-n committed Feb 21, 2019
1 parent 23c01de commit db823175cf5c89bc066621e34a8d922c2f80eb87
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/core/dxf/qgsdxfexport.cpp
@@ -3477,9 +3477,6 @@ void QgsDxfExport::writePolyline( const QgsPointSequence &line, const QString &l
return;
}

bool polygon = line[0] == line[ line.size() - 1 ];
if ( polygon )
--n;
if ( n < 2 )
{
QgsDebugMsg( QStringLiteral( "writePolyline: line too short layer=%1 lineStyleName=%2" ).arg( layer, lineStyleName ) );
@@ -3488,6 +3485,10 @@ void QgsDxfExport::writePolyline( const QgsPointSequence &line, const QString &l

if ( mForce2d || !line.at( 0 ).is3D() )
{
bool polygon = line[0] == line[ line.size() - 1 ];
if ( polygon )
--n;

writeGroup( 0, QStringLiteral( "LWPOLYLINE" ) );
writeHandle();
writeGroup( 8, layer );

0 comments on commit db82317

Please sign in to comment.
You can’t perform that action at this time.