Scale vertex lineweights in DXF import
DXF lineweights are always in 100th of mm, so scale the set weights on import Fixes https://gitlab.com/kicad/code/kicad/issues/9854
This commit is contained in:
parent
63f67b7e5b
commit
1160bd94b0
|
@ -272,6 +272,7 @@ double DXF_IMPORT_PLUGIN::lineWeightToWidth( int lw, DXF_IMPORT_LAYER* aLayer )
|
|||
|
||||
// All lineweights >= 0 are always in 100ths of mm
|
||||
double mm = m_defaultThickness;
|
||||
|
||||
if( lw >= 0 )
|
||||
{
|
||||
mm = lw / 100.0;
|
||||
|
@ -382,10 +383,11 @@ void DXF_IMPORT_PLUGIN::addVertex( const DL_VertexData& aData )
|
|||
double lineWidth = lineWeightToWidth( attributes.getWidth(), layer );
|
||||
|
||||
/* support for per-vertex-encoded linewidth (Cadence uses it) */
|
||||
/* linewidths are scaled by 100 in DXF */
|
||||
if( aData.startWidth > 0.0 )
|
||||
lineWidth = aData.startWidth;
|
||||
lineWidth = aData.startWidth / 100.0;
|
||||
else if ( aData.endWidth > 0.0 )
|
||||
lineWidth = aData.endWidth;
|
||||
lineWidth = aData.endWidth / 100.0;
|
||||
|
||||
const DL_VertexData* vertex = &aData;
|
||||
|
||||
|
|
Loading…
Reference in New Issue