DXF - Add Polylines, use for conductors and rectangles

This commit is contained in:
David Varley
2020-09-11 11:22:08 +10:00
parent 046d7c6b59
commit 6b1d51bab8
4 changed files with 102 additions and 161 deletions

View File

@@ -639,9 +639,17 @@ void ExportDialog::generateDxf(
//Draw conductors
foreach(Conductor *cond, list_conductors) {
QPolygonF poly;
bool firstseg = true;
foreach(ConductorSegment *segment, cond -> segmentsList()) {
Createdxf::drawLine(file_path,QLineF(cond->pos()+segment->firstPoint(),cond->pos()+segment->secondPoint()),0);
//Createdxf::drawLine(file_path,QLineF(cond->pos()+segment->firstPoint(),cond->pos()+segment->secondPoint()),0);
if(firstseg){
poly << cond->pos()+segment->firstPoint();
firstseg = false;
}
poly << cond->pos()+segment->secondPoint();
}
Createdxf::drawPolyline(file_path,poly,0);
//Draw conductor text item
ConductorTextItem *textItem = cond -> textItem();
if (textItem) {