From d69e3fdb5eba6652b3d423f0ec1cf2f5cc97f737 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 20 Jun 2022 12:46:49 +0100 Subject: [PATCH] Specify a winding for Hyperlynx arcs. I can't test it, so it's a 50:50 guess. We may need to flip the test.... --- pcbnew/exporters/export_hyperlynx.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pcbnew/exporters/export_hyperlynx.cpp b/pcbnew/exporters/export_hyperlynx.cpp index 48d2985e4a..e31fe73a2f 100644 --- a/pcbnew/exporters/export_hyperlynx.cpp +++ b/pcbnew/exporters/export_hyperlynx.cpp @@ -477,12 +477,17 @@ bool HYPERLYNX_EXPORTER::writeNetObjects( const std::vector& aObjec else if( PCB_ARC* arc = dyn_cast( item ) ) { const wxString layerName = m_board->GetLayerName( arc->GetLayer() ); + VECTOR2I start = arc->GetStart(); + VECTOR2I end = arc->GetEnd(); + + if( arc->GetArcAngleStart() < arc->GetArcAngleEnd() ) + std::swap( start, end ); m_out->Print( 1, "(ARC X1=%.10f Y1=%.10f X2=%.10f Y2=%.10f XC=%.10f YC=%.10f R=%.10f W=%.10f L=\"%s\")\n", - iu2hyp( arc->GetStart().x ), - iu2hyp( arc->GetStart().y ), - iu2hyp( arc->GetEnd().x ), - iu2hyp( arc->GetEnd().y ), + iu2hyp( start.x ), + iu2hyp( start.y ), + iu2hyp( end.x ), + iu2hyp( end.y ), iu2hyp( arc->GetCenter().x ), iu2hyp( arc->GetCenter().y ), iu2hyp( arc->GetRadius() ),