From 3ed196859f7a499b8908ff1700cf53d4fb67eb70 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Mon, 29 Jan 2024 19:59:41 +0300 Subject: [PATCH] STEP export: build a segment from last point for segment case as well. https://gitlab.com/kicad/code/kicad/-/issues/16807 --- pcbnew/exporters/step/step_pcb_model.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pcbnew/exporters/step/step_pcb_model.cpp b/pcbnew/exporters/step/step_pcb_model.cpp index bf69ba282b..ef33cfacb8 100644 --- a/pcbnew/exporters/step/step_pcb_model.cpp +++ b/pcbnew/exporters/step/step_pcb_model.cpp @@ -806,7 +806,10 @@ bool STEP_PCB_MODEL::MakeShapes( std::vector& aShapes, const SHAPE lastPt = firstPt; } - if( addSegment( lastPt, seg.B ) ) + if( lastPt != seg.A ) + addSegment( lastPt, seg.A ); + + if( addSegment( seg.A, seg.B ) ) lastPt = seg.B; }