Skip to content

Commit

Permalink
dxf export: don't use 3D coordinates for filled circles (followup b3b…
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 2, 2016
1 parent c277e6e commit f470dfb
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/core/dxf/qgsdxfexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3551,11 +3551,11 @@ void QgsDxfExport::writeFilledCircle( const QString &layer, const QColor& color,

void QgsDxfExport::writeFilledCircle( const QString &layer, const QColor& color, const QgsPointV2 &pt, double radius )
{
writeGroup( 0, "HATCH" ); // Entity type
writeGroup( 0, "HATCH" ); // Entity type
writeHandle();
writeGroup( 330, mBlockHandle );
writeGroup( 100, "AcDbEntity" );
writeGroup( 8, layer ); // Layer name
writeGroup( 8, layer ); // Layer name
writeGroup( color ); // Color (0 by block, 256 by layer)
writeGroup( 100, "AcDbHatch" );

Expand All @@ -3566,26 +3566,23 @@ void QgsDxfExport::writeFilledCircle( const QString &layer, const QColor& color,
writeGroup( 70, 1 ); // Solid fill flag (solid fill = 1; pattern fill = 0)
writeGroup( 71, 0 ); // Associativity flag (associative = 1; non-associative = 0)


writeGroup( 91, 1 ); // Number of boundary paths (loops)

writeGroup( 92, 7 ); // Boundary path type flag (bit coded): 0 = Default; 1 = External; 2 = Polyline 4 = Derived; 8 = Textbox; 16 = Outermost
writeGroup( 72, 2 );
writeGroup( 92, 3 ); // Boundary path type flag (bit coded): 0 = Default; 1 = External; 2 = Polyline 4 = Derived; 8 = Textbox; 16 = Outermost
writeGroup( 72, 1 );
writeGroup( 73, 1 ); // Is closed flag
writeGroup( 93, 2 ); // Number of polyline vertices

writeGroup( 0, QgsPointV2( QgsWKBTypes::PointZ, pt.x() - radius, pt.y() ) );
writeGroup( 0, QgsPointV2( QgsWKBTypes::Point, pt.x() - radius, pt.y() ) );
writeGroup( 42, 1.0 );

writeGroup( 0, QgsPointV2( QgsWKBTypes::PointZ, pt.x() + radius, pt.y() ) );
writeGroup( 0, QgsPointV2( QgsWKBTypes::Point, pt.x() + radius, pt.y() ) );
writeGroup( 42, 1.0 );

writeGroup( 97, 0 ); // Number of source boundary objects

writeGroup( 75, 1 ); // Hatch style: 0 = Hatch "odd parity" area (Normal style), 1 = Hatch outermost area only (Outer style), 2 = Hatch through entire area (Ignore style)
writeGroup( 75, 0 ); // Hatch style: 0 = Hatch "odd parity" area (Normal style), 1 = Hatch outermost area only (Outer style), 2 = Hatch through entire area (Ignore style)
writeGroup( 76, 1 ); // Hatch pattern type: 0 = User-defined; 1 = Predefined; 2 = Custom
writeGroup( 47, 0.0059696789328105 ); // Pixel size

writeGroup( 98, 0 ); // Number of seed points
}

Expand Down

0 comments on commit f470dfb

Please sign in to comment.