@@ -1759,14 +1759,20 @@ void QgsDwgImporter::addPolyline( const DRW_Polyline &data )
1759
1759
{
1760
1760
QgsCircularString *c = new QgsCircularString ();
1761
1761
c->setPoints ( s );
1762
- // QgsDebugMsg( QStringLiteral( "add circular string:%1" ).arg( c->asWkt() ) );
1762
+
1763
+ if ( i > 0 )
1764
+ c->moveVertex ( QgsVertexId ( 0 , 0 , 0 ), cc.endPoint () );
1765
+
1763
1766
cc.addCurve ( c );
1764
1767
}
1765
1768
else
1766
1769
{
1767
1770
QgsLineString *c = new QgsLineString ();
1768
1771
c->setPoints ( s );
1769
- // QgsDebugMsg( QStringLiteral( "add line string:%1" ).arg( c->asWkt() ) );
1772
+
1773
+ if ( i > 0 )
1774
+ c->moveVertex ( QgsVertexId ( 0 , 0 , 0 ), cc.endPoint () );
1775
+
1770
1776
cc.addCurve ( c );
1771
1777
}
1772
1778
@@ -2454,21 +2460,30 @@ void QgsDwgImporter::addHatch( const DRW_Hatch *pdata )
2454
2460
ls->setPoints ( QgsPointSequence ()
2455
2461
<< QgsPoint ( QgsWkbTypes::PointZ, l->basePoint .x , l->basePoint .y , l->basePoint .z )
2456
2462
<< QgsPoint ( QgsWkbTypes::PointZ, l->secPoint .x , l->secPoint .y , l->secPoint .z ) );
2457
- QgsDebugMsg ( QStringLiteral ( " add line string:%1" ).arg ( ls->asWkt () ) );
2463
+
2464
+ if ( j > 0 )
2465
+ ls->moveVertex ( QgsVertexId ( 0 , 0 , 0 ), cc->endPoint () );
2466
+
2458
2467
cc->addCurve ( ls );
2459
2468
}
2460
2469
else if ( a )
2461
2470
{
2462
2471
QgsCircularString *cs = new QgsCircularString ();
2463
2472
circularStringFromArc ( *a, *cs );
2464
- QgsDebugMsg ( QStringLiteral ( " add line string:%1" ).arg ( cs->asWkt () ) );
2473
+
2474
+ if ( j > 0 )
2475
+ cs->moveVertex ( QgsVertexId ( 0 , 0 , 0 ), cc->endPoint () );
2476
+
2465
2477
cc->addCurve ( cs );
2466
2478
}
2467
2479
else if ( sp )
2468
2480
{
2469
2481
QgsLineString *ls = new QgsLineString ();
2470
2482
lineFromSpline ( *sp, *ls );
2471
- QgsDebugMsg ( QStringLiteral ( " add line string:%1" ).arg ( ls->asWkt () ) );
2483
+
2484
+ if ( j > 0 )
2485
+ ls->moveVertex ( QgsVertexId ( 0 , 0 , 0 ), cc->endPoint () );
2486
+
2472
2487
cc->addCurve ( ls );
2473
2488
}
2474
2489
else
@@ -2486,6 +2501,8 @@ void QgsDwgImporter::addHatch( const DRW_Hatch *pdata )
2486
2501
#endif
2487
2502
}
2488
2503
2504
+ cc->moveVertex ( QgsVertexId ( 0 , 0 , 0 ), cc->endPoint () );
2505
+
2489
2506
if ( i == 0 )
2490
2507
{
2491
2508
// QgsDebugMsg( QStringLiteral( "set exterior ring:%1" ).arg( cc->asWkt() ) );
0 commit comments