Fix DXF export of circles, arcs and the title block at the right (#1339)

Circles and arcs: drawArcEllipse() split each curve into quarters and
fitted a circular ARC through a point half way between the curve and its
chord, so every circle came out as a flattened diamond. A circle or an
arc of one is now one exact CIRCLE or ARC. R10 has no ELLIPSE entity, so
a true ellipse is a polyline through the curve, one point every 5
degrees. The export also used a different scale on each axis, which made
round things oval; it now uses one, the largest that fits the sheet.

Title block at the right: the DXF laid the horizontal template out in
the narrow vertical strip, squashing it into the top corner. It is now
laid out horizontally and turned a quarter, as draw() turns the painter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ispyisail
2026-10-07 08:13:52 +13:00
parent 0708338bce
commit 83f72c95c6
11 changed files with 325 additions and 153 deletions
+5 -2
View File
@@ -91,15 +91,18 @@ void TitleBlockTemplateRenderer::render(QPainter *provided_painter,
@param titleblock_width
@param file_path
@param color
@param dxf_transform : see TitleBlockTemplate::renderDxf()
*/
void TitleBlockTemplateRenderer::renderDxf(QRectF &title_block_rect,
int titleblock_width,
QString &file_path,
int color) {
int color,
const QTransform &dxf_transform) {
if (!m_titleblock_template) return;
m_titleblock_template -> renderDxf(title_block_rect,
m_context,
titleblock_width,
file_path, color);
file_path, color,
dxf_transform);
}